提交 09515b30 编写于 作者: rushui.chen's avatar rushui.chen

20190911 双写模式把信息写入doctor表

上级 b06baf81
流水线 #14366 已失败 于阶段
in 0 second
...@@ -40,6 +40,12 @@ public interface DoctorMapper { ...@@ -40,6 +40,12 @@ public interface DoctorMapper {
int updateByPrimaryKeySelective(Doctor record); int updateByPrimaryKeySelective(Doctor record);
/**
* 通过账户id更新用户信息
* @param doctor
*/
void updateByAcctId(Doctor doctor);
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
int insert(Doctor record); int insert(Doctor record);
...@@ -47,6 +53,4 @@ public interface DoctorMapper { ...@@ -47,6 +53,4 @@ public interface DoctorMapper {
int insertSelective(Doctor record); int insertSelective(Doctor record);
int updateByPrimaryKey(Doctor record); int updateByPrimaryKey(Doctor record);
} }
\ No newline at end of file
...@@ -117,7 +117,6 @@ public class LoginServiceImpl implements LoginService { ...@@ -117,7 +117,6 @@ public class LoginServiceImpl implements LoginService {
} }
} }
@Override @Override
public String loginAndRegister(BaseRequest baseRequest) { public String loginAndRegister(BaseRequest baseRequest) {
String mobile = baseRequest.getMobile(); String mobile = baseRequest.getMobile();
...@@ -237,7 +236,6 @@ public class LoginServiceImpl implements LoginService { ...@@ -237,7 +236,6 @@ public class LoginServiceImpl implements LoginService {
processAccountUnion(request.getAccId(), unionId); processAccountUnion(request.getAccId(), unionId);
} }
private void processAccountUnion(Integer acctId, String unionId) { private void processAccountUnion(Integer acctId, String unionId) {
AccountUnionEntity accountUnionEntity = new AccountUnionEntity(); AccountUnionEntity accountUnionEntity = new AccountUnionEntity();
accountUnionEntity.setAcctId(acctId.longValue()); accountUnionEntity.setAcctId(acctId.longValue());
......
package com.pica.cloud.account.account.server.service.impl; package com.pica.cloud.account.account.server.service.impl;
import com.pica.cloud.account.account.server.entity.AccountInfoEntity; import com.pica.cloud.account.account.server.entity.AccountInfoEntity;
import com.pica.cloud.account.account.server.entity.Doctor;
import com.pica.cloud.account.account.server.enums.AccountExceptionEnum; import com.pica.cloud.account.account.server.enums.AccountExceptionEnum;
import com.pica.cloud.account.account.server.exception.AccountException; import com.pica.cloud.account.account.server.exception.AccountException;
import com.pica.cloud.account.account.server.mapper.AccountInfoDetailMapper; import com.pica.cloud.account.account.server.mapper.AccountInfoDetailMapper;
import com.pica.cloud.account.account.server.mapper.DoctorMapper;
import com.pica.cloud.account.account.server.service.ModifyMobileService; import com.pica.cloud.account.account.server.service.ModifyMobileService;
import com.pica.cloud.foundation.utils.utils.EncryptCreateUtil; import com.pica.cloud.foundation.utils.utils.EncryptCreateUtil;
import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date; import java.util.Date;
...@@ -18,6 +22,12 @@ public class ModifyMobileServiceImpl implements ModifyMobileService { ...@@ -18,6 +22,12 @@ public class ModifyMobileServiceImpl implements ModifyMobileService {
@Autowired @Autowired
private AccountInfoDetailMapper accountInfoDetailMapper; private AccountInfoDetailMapper accountInfoDetailMapper;
@Autowired
private DoctorMapper doctorMapper;
@Value("${doubleWritingMode}")
private boolean doubleWritingMode;
@Override @Override
public void modify(Integer acctId, String mobile) { public void modify(Integer acctId, String mobile) {
AccountInfoEntity entity = accountInfoDetailMapper.selectByPrimaryKey(acctId); AccountInfoEntity entity = accountInfoDetailMapper.selectByPrimaryKey(acctId);
...@@ -31,5 +41,15 @@ public class ModifyMobileServiceImpl implements ModifyMobileService { ...@@ -31,5 +41,15 @@ public class ModifyMobileServiceImpl implements ModifyMobileService {
accountInfoEntity.setModifiedTime(new Date()); accountInfoEntity.setModifiedTime(new Date());
accountInfoEntity.setMobilePhone(EncryptCreateUtil.encrypt(mobile)); accountInfoEntity.setMobilePhone(EncryptCreateUtil.encrypt(mobile));
accountInfoDetailMapper.updateMobileByPrimaryKey(accountInfoEntity); accountInfoDetailMapper.updateMobileByPrimaryKey(accountInfoEntity);
if (doubleWritingMode) {
//更新p_doctor表中用户的手机号
Date currentTime = new Date();
Doctor doctor = new Doctor();
doctor.setAcctId(acctId);
doctor.setModifyTime(currentTime);
doctor.setModifyId(acctId);
doctor.setMobilePhone(EncryptCreateUtil.encrypt(mobile));
doctorMapper.updateByAcctId(doctor);
}
} }
} }
package com.pica.cloud.account.account.server.service.impl; package com.pica.cloud.account.account.server.service.impl;
import com.pica.cloud.account.account.server.entity.AccountInfoEntity; import com.pica.cloud.account.account.server.entity.AccountInfoEntity;
import com.pica.cloud.account.account.server.entity.Doctor;
import com.pica.cloud.account.account.server.entity.LogPWDModifyEntity; import com.pica.cloud.account.account.server.entity.LogPWDModifyEntity;
import com.pica.cloud.account.account.server.enums.AccountTypeEnum; import com.pica.cloud.account.account.server.enums.AccountTypeEnum;
import com.pica.cloud.account.account.server.enums.AccountExceptionEnum; import com.pica.cloud.account.account.server.enums.AccountExceptionEnum;
...@@ -8,10 +9,12 @@ import com.pica.cloud.account.account.server.exception.AccountException; ...@@ -8,10 +9,12 @@ import com.pica.cloud.account.account.server.exception.AccountException;
import com.pica.cloud.account.account.server.log.AccountLogEntityUtils; import com.pica.cloud.account.account.server.log.AccountLogEntityUtils;
import com.pica.cloud.account.account.server.log.AccountLogUtils; import com.pica.cloud.account.account.server.log.AccountLogUtils;
import com.pica.cloud.account.account.server.mapper.AccountInfoDetailMapper; import com.pica.cloud.account.account.server.mapper.AccountInfoDetailMapper;
import com.pica.cloud.account.account.server.mapper.DoctorMapper;
import com.pica.cloud.account.account.server.req.BaseRequest; import com.pica.cloud.account.account.server.req.BaseRequest;
import com.pica.cloud.account.account.server.service.PasswordService; import com.pica.cloud.account.account.server.service.PasswordService;
import com.pica.cloud.foundation.utils.utils.EncryptCreateUtil; import com.pica.cloud.foundation.utils.utils.EncryptCreateUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date; import java.util.Date;
...@@ -22,19 +25,29 @@ public class PasswordServiceImpl implements PasswordService { ...@@ -22,19 +25,29 @@ public class PasswordServiceImpl implements PasswordService {
@Autowired @Autowired
private AccountInfoDetailMapper accountInfoDetailMapper; private AccountInfoDetailMapper accountInfoDetailMapper;
@Autowired
private DoctorMapper doctorMapper;
@Autowired @Autowired
private AccountLogUtils picaLogUtils; private AccountLogUtils picaLogUtils;
@Value("${doubleWritingMode}")
private boolean doubleWritingMode;
@Override @Override
public void modifyPassword(Integer acctId, String oldPwd, String pwd) { public void modifyPassword(Integer acctId, String oldPwd, String pwd) {
AccountInfoEntity entity = accountInfoDetailMapper.selectByPrimaryKey(acctId); AccountInfoEntity entity = accountInfoDetailMapper.selectByPrimaryKey(acctId);
if (entity.getPassword().equals(oldPwd)) { if (entity.getPassword().equals(oldPwd)) {
Date currentTime = new Date();
AccountInfoEntity accountInfoEntity = new AccountInfoEntity(); AccountInfoEntity accountInfoEntity = new AccountInfoEntity();
accountInfoEntity.setId(acctId); accountInfoEntity.setId(acctId);
accountInfoEntity.setModifiedId(acctId); accountInfoEntity.setModifiedId(acctId);
accountInfoEntity.setModifiedTime(new Date()); accountInfoEntity.setModifiedTime(currentTime);
accountInfoEntity.setPassword(pwd); accountInfoEntity.setPassword(pwd);
accountInfoDetailMapper.updatePasswordByPrimaryKey(accountInfoEntity); accountInfoDetailMapper.updatePasswordByPrimaryKey(accountInfoEntity);
if (doubleWritingMode) {
processDoubleWrite(acctId, pwd);
}
//密码修改日志 //密码修改日志
LogPWDModifyEntity logPWDModifyEntity = AccountLogEntityUtils.getLogPWDModifyEntity(acctId, entity.getMobilePhone(), LogPWDModifyEntity logPWDModifyEntity = AccountLogEntityUtils.getLogPWDModifyEntity(acctId, entity.getMobilePhone(),
oldPwd, pwd, AccountTypeEnum.LOG_TYPE_PASSWORD.getCode()); oldPwd, pwd, AccountTypeEnum.LOG_TYPE_PASSWORD.getCode());
...@@ -48,13 +61,18 @@ public class PasswordServiceImpl implements PasswordService { ...@@ -48,13 +61,18 @@ public class PasswordServiceImpl implements PasswordService {
public void forgetPassword(BaseRequest request) { public void forgetPassword(BaseRequest request) {
AccountInfoEntity entity = accountInfoDetailMapper.selectByMobile(EncryptCreateUtil.encrypt(request.getMobile())); AccountInfoEntity entity = accountInfoDetailMapper.selectByMobile(EncryptCreateUtil.encrypt(request.getMobile()));
if (entity != null) { if (entity != null) {
String password = request.getPassword();
Integer accId = entity.getId(); Integer accId = entity.getId();
Date currentTime = new Date();
AccountInfoEntity accountInfoEntity = new AccountInfoEntity(); AccountInfoEntity accountInfoEntity = new AccountInfoEntity();
accountInfoEntity.setId(accId); accountInfoEntity.setId(accId);
accountInfoEntity.setModifiedId(accId); accountInfoEntity.setModifiedId(accId);
accountInfoEntity.setModifiedTime(new Date()); accountInfoEntity.setModifiedTime(currentTime);
accountInfoEntity.setPassword(request.getPassword()); accountInfoEntity.setPassword(password);
accountInfoDetailMapper.updatePasswordByPrimaryKey(accountInfoEntity); accountInfoDetailMapper.updatePasswordByPrimaryKey(accountInfoEntity);
if (doubleWritingMode) {
processDoubleWrite(accId, password);
}
//密码修改日志 //密码修改日志
LogPWDModifyEntity logPWDModifyEntity = AccountLogEntityUtils.getLogPWDModifyEntity(accId, entity.getMobilePhone(), LogPWDModifyEntity logPWDModifyEntity = AccountLogEntityUtils.getLogPWDModifyEntity(accId, entity.getMobilePhone(),
"", request.getPassword(), AccountTypeEnum.LOG_TYPE_PASSWORD.getCode()); "", request.getPassword(), AccountTypeEnum.LOG_TYPE_PASSWORD.getCode());
...@@ -64,4 +82,20 @@ public class PasswordServiceImpl implements PasswordService { ...@@ -64,4 +82,20 @@ public class PasswordServiceImpl implements PasswordService {
throw new AccountException(AccountExceptionEnum.PICA_NOT_REGISTER); throw new AccountException(AccountExceptionEnum.PICA_NOT_REGISTER);
} }
} }
/**
* 双写模式,把密码存储到p_doctor表
*
* @param accId
* @param password
*/
private void processDoubleWrite(Integer accId, String password) {
Date currentTime = new Date();
Doctor doctor = new Doctor();
doctor.setPassword(password);
doctor.setAcctId(accId);
doctor.setModifyTime(currentTime);
doctor.setModifyId(accId);
doctorMapper.updateByAcctId(doctor);
}
} }
...@@ -14,6 +14,7 @@ import com.pica.cloud.account.account.server.log.AccountLogUtils; ...@@ -14,6 +14,7 @@ import com.pica.cloud.account.account.server.log.AccountLogUtils;
import com.pica.cloud.account.account.server.mapper.AccountInfoDetailMapper; import com.pica.cloud.account.account.server.mapper.AccountInfoDetailMapper;
import com.pica.cloud.account.account.server.mapper.AccountMapper; import com.pica.cloud.account.account.server.mapper.AccountMapper;
import com.pica.cloud.account.account.server.mapper.AccountPatientInfoMapper; import com.pica.cloud.account.account.server.mapper.AccountPatientInfoMapper;
import com.pica.cloud.account.account.server.mapper.DoctorMapper;
import com.pica.cloud.account.account.server.req.BaseRequest; import com.pica.cloud.account.account.server.req.BaseRequest;
import com.pica.cloud.account.account.server.service.RegisterService; import com.pica.cloud.account.account.server.service.RegisterService;
import com.pica.cloud.account.account.server.util.AccountUtils; import com.pica.cloud.account.account.server.util.AccountUtils;
...@@ -24,6 +25,7 @@ import org.slf4j.Logger; ...@@ -24,6 +25,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
...@@ -62,13 +64,13 @@ public class RegisterServiceImpl implements RegisterService { ...@@ -62,13 +64,13 @@ public class RegisterServiceImpl implements RegisterService {
Date currentTime = new Date(); Date currentTime = new Date();
int productType = baseRequest.getProductType(); int productType = baseRequest.getProductType();
int sourceType = baseRequest.getSourceType(); int sourceType = baseRequest.getSourceType();
String password = baseRequest.getPassword();
AccountInfoEntity accountInfo = new AccountInfoEntity(); AccountInfoEntity accountInfo = new AccountInfoEntity();
accountInfo.setMobilePhone(EncryptCreateUtil.encrypt(baseRequest.getMobile())); accountInfo.setMobilePhone(EncryptCreateUtil.encrypt(baseRequest.getMobile()));
if (StringUtils.isNotEmpty(baseRequest.getPassword())) { if (StringUtils.isEmpty(password)) {
accountInfo.setPassword(baseRequest.getPassword()); password = "";
} else {
accountInfo.setPassword("");
} }
accountInfo.setPassword(password);
accountInfo.setCreatedTime(currentTime); accountInfo.setCreatedTime(currentTime);
accountInfo.setCreatedId(0); accountInfo.setCreatedId(0);
accountInfo.setModifiedId(0); accountInfo.setModifiedId(0);
...@@ -93,10 +95,11 @@ public class RegisterServiceImpl implements RegisterService { ...@@ -93,10 +95,11 @@ public class RegisterServiceImpl implements RegisterService {
} else { } else {
Account account = new Account(); Account account = new Account();
account.setAcctId(acctId); account.setAcctId(acctId);
account.setMobilePhone(EncryptCreateUtil.encrypt(account.getMobilePhone())); //手机号加密 account.setMobilePhone(EncryptCreateUtil.encrypt(account.getMobilePhone()));
account.setDeleteFlag(1); account.setDeleteFlag(1);
account.setCreatId(0L); account.setCreatId(0L);
account.setModifyId(0L); account.setModifyId(0L);
account.setPassword(password);
account.setCreatTime(currentTime); account.setCreatTime(currentTime);
account.setModifyTime(currentTime); account.setModifyTime(currentTime);
account.setFirstLoginTime(currentTime); account.setFirstLoginTime(currentTime);
......
...@@ -41,4 +41,8 @@ weChatAppID=wx5103ed453ef2dbe8 ...@@ -41,4 +41,8 @@ weChatAppID=wx5103ed453ef2dbe8
weChatAppSecret=6faa9bef3302786c08b2baf278613f38 weChatAppSecret=6faa9bef3302786c08b2baf278613f38
weChatURL=https://api.weixin.qq.com/sns/userinfo? weChatURL=https://api.weixin.qq.com/sns/userinfo?
doubleWritingMode=true
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pica.cloud.account.account.server.mapper.DoctorMapper" > <mapper namespace="com.pica.cloud.account.account.server.mapper.DoctorMapper">
<resultMap id="BaseResultMap" type="com.pica.cloud.account.account.server.entity.Doctor" > <resultMap id="BaseResultMap" type="com.pica.cloud.account.account.server.entity.Doctor">
<id column="id" property="id" jdbcType="INTEGER" /> <id column="id" property="id" jdbcType="INTEGER"/>
<result column="sex" property="sex" jdbcType="INTEGER" /> <result column="sex" property="sex" jdbcType="INTEGER"/>
<result column="name" property="name" jdbcType="VARCHAR" /> <result column="name" property="name" jdbcType="VARCHAR"/>
<result column="mobile_phone" property="mobilePhone" jdbcType="VARCHAR" /> <result column="mobile_phone" property="mobilePhone" jdbcType="VARCHAR"/>
<result column="tel" property="tel" jdbcType="VARCHAR" /> <result column="tel" property="tel" jdbcType="VARCHAR"/>
<result column="status" property="status" jdbcType="INTEGER" /> <result column="status" property="status" jdbcType="INTEGER"/>
<result column="type" property="type" jdbcType="INTEGER" /> <result column="type" property="type" jdbcType="INTEGER"/>
<result column="hospital_id" property="hospitalId" jdbcType="INTEGER" /> <result column="hospital_id" property="hospitalId" jdbcType="INTEGER"/>
<result column="department_id" property="departmentId" jdbcType="INTEGER" /> <result column="department_id" property="departmentId" jdbcType="INTEGER"/>
<result column="title_id" property="titleId" jdbcType="INTEGER" /> <result column="title_id" property="titleId" jdbcType="INTEGER"/>
<result column="hospital" property="hospital" jdbcType="VARCHAR" /> <result column="hospital" property="hospital" jdbcType="VARCHAR"/>
<result column="department" property="department" jdbcType="VARCHAR" /> <result column="department" property="department" jdbcType="VARCHAR"/>
<result column="title" property="title" jdbcType="VARCHAR" /> <result column="title" property="title" jdbcType="VARCHAR"/>
<result column="cert_image_url" property="certImageUrl" jdbcType="VARCHAR" /> <result column="cert_image_url" property="certImageUrl" jdbcType="VARCHAR"/>
<result column="avatar_image_url" property="avatarImageUrl" jdbcType="VARCHAR" /> <result column="avatar_image_url" property="avatarImageUrl" jdbcType="VARCHAR"/>
<result column="auth_time" property="authTime" jdbcType="TIMESTAMP" /> <result column="auth_time" property="authTime" jdbcType="TIMESTAMP"/>
<result column="honor" property="honor" jdbcType="VARCHAR" /> <result column="honor" property="honor" jdbcType="VARCHAR"/>
<result column="skills" property="skills" jdbcType="VARCHAR" /> <result column="skills" property="skills" jdbcType="VARCHAR"/>
<result column="thumb_up_num" property="thumbUpNum" jdbcType="INTEGER" /> <result column="thumb_up_num" property="thumbUpNum" jdbcType="INTEGER"/>
<result column="email" property="email" jdbcType="VARCHAR" /> <result column="email" property="email" jdbcType="VARCHAR"/>
<result column="qrcode" property="qrcode" jdbcType="VARCHAR" /> <result column="qrcode" property="qrcode" jdbcType="VARCHAR"/>
<result column="nickname" property="nickname" jdbcType="VARCHAR" /> <result column="nickname" property="nickname" jdbcType="VARCHAR"/>
<result column="personal_sign" property="personalSign" jdbcType="VARCHAR" /> <result column="personal_sign" property="personalSign" jdbcType="VARCHAR"/>
<result column="delete_flag" property="deleteFlag" jdbcType="INTEGER" /> <result column="delete_flag" property="deleteFlag" jdbcType="INTEGER"/>
<result column="creat_id" property="creatId" jdbcType="INTEGER" /> <result column="creat_id" property="creatId" jdbcType="INTEGER"/>
<result column="creat_time" property="creatTime" jdbcType="TIMESTAMP" /> <result column="creat_time" property="creatTime" jdbcType="TIMESTAMP"/>
<result column="modify_id" property="modifyId" jdbcType="INTEGER" /> <result column="modify_id" property="modifyId" jdbcType="INTEGER"/>
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" /> <result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP"/>
<result column="praise_num" property="praiseNum" jdbcType="INTEGER" /> <result column="praise_num" property="praiseNum" jdbcType="INTEGER"/>
<result column="password" property="password" jdbcType="VARCHAR" /> <result column="password" property="password" jdbcType="VARCHAR"/>
<result column="info" property="info" jdbcType="VARCHAR" /> <result column="info" property="info" jdbcType="VARCHAR"/>
<result column="rank" property="rank" jdbcType="VARCHAR" /> <result column="rank" property="rank" jdbcType="VARCHAR"/>
<result column="province" property="province" jdbcType="BIGINT" /> <result column="province" property="province" jdbcType="BIGINT"/>
<result column="province_name" property="provinceName" jdbcType="VARCHAR" /> <result column="province_name" property="provinceName" jdbcType="VARCHAR"/>
<result column="city" property="city" jdbcType="BIGINT" /> <result column="city" property="city" jdbcType="BIGINT"/>
<result column="city_name" property="cityName" jdbcType="VARCHAR" /> <result column="city_name" property="cityName" jdbcType="VARCHAR"/>
<result column="county" property="county" jdbcType="BIGINT" /> <result column="county" property="county" jdbcType="BIGINT"/>
<result column="county_name" property="countyName" jdbcType="VARCHAR" /> <result column="county_name" property="countyName" jdbcType="VARCHAR"/>
<result column="town" property="town" jdbcType="BIGINT" /> <result column="town" property="town" jdbcType="BIGINT"/>
<result column="town_name" property="townName" jdbcType="VARCHAR" /> <result column="town_name" property="townName" jdbcType="VARCHAR"/>
<result column="invite_code" property="inviteCode" jdbcType="VARCHAR" /> <result column="invite_code" property="inviteCode" jdbcType="VARCHAR"/>
<result column="invite_start_time" property="inviteStartTime" jdbcType="TIMESTAMP" /> <result column="invite_start_time" property="inviteStartTime" jdbcType="TIMESTAMP"/>
<result column="gaoxueya_password" property="gaoxueyaPassword" jdbcType="VARCHAR" /> <result column="gaoxueya_password" property="gaoxueyaPassword" jdbcType="VARCHAR"/>
<result column="sms_send_num" property="smsSendNum" jdbcType="INTEGER" /> <result column="sms_send_num" property="smsSendNum" jdbcType="INTEGER"/>
<result column="total_sms_send_num" property="totalSmsSendNum" jdbcType="INTEGER" /> <result column="total_sms_send_num" property="totalSmsSendNum" jdbcType="INTEGER"/>
<result column="entire_flag" property="entireFlag" jdbcType="BIT" /> <result column="entire_flag" property="entireFlag" jdbcType="BIT"/>
<result column="doctor_project_type" property="doctorProjectType" jdbcType="INTEGER" /> <result column="doctor_project_type" property="doctorProjectType" jdbcType="INTEGER"/>
<result column="reg_time" property="regTime" jdbcType="DATE" /> <result column="reg_time" property="regTime" jdbcType="DATE"/>
<result column="last_login_time" property="lastLoginTime" jdbcType="TIMESTAMP" /> <result column="last_login_time" property="lastLoginTime" jdbcType="TIMESTAMP"/>
<result column="unionid" property="unionid" jdbcType="VARCHAR" /> <result column="unionid" property="unionid" jdbcType="VARCHAR"/>
<result column="register_source" property="registerSource" jdbcType="INTEGER" /> <result column="register_source" property="registerSource" jdbcType="INTEGER"/>
<result column="comment" property="comment" jdbcType="VARCHAR" /> <result column="comment" property="comment" jdbcType="VARCHAR"/>
<result column="administer_title_id" property="administerTitleId" jdbcType="INTEGER" /> <result column="administer_title_id" property="administerTitleId" jdbcType="INTEGER"/>
<result column="administer_title" property="administerTitle" jdbcType="VARCHAR" /> <result column="administer_title" property="administerTitle" jdbcType="VARCHAR"/>
<result column="register_type" property="registerType" jdbcType="INTEGER" /> <result column="register_type" property="registerType" jdbcType="INTEGER"/>
<result column="first_login_time" property="firstLoginTime" jdbcType="TIMESTAMP" /> <result column="first_login_time" property="firstLoginTime" jdbcType="TIMESTAMP"/>
<result column="card" property="card" jdbcType="VARCHAR" /> <result column="card" property="card" jdbcType="VARCHAR"/>
<result column="birthday" property="birthday" jdbcType="DATE" /> <result column="birthday" property="birthday" jdbcType="DATE"/>
<result column="show_flag" property="showFlag" jdbcType="INTEGER" /> <result column="show_flag" property="showFlag" jdbcType="INTEGER"/>
<result column="acct_id" property="acctId" jdbcType="INTEGER" /> <result column="acct_id" property="acctId" jdbcType="INTEGER"/>
</resultMap> </resultMap>
<sql id="Base_Column_List" > <sql id="Base_Column_List">
id, sex, name, mobile_phone, tel, status, type, hospital_id, department_id, title_id, id, sex, name, mobile_phone, tel, status, type, hospital_id, department_id, title_id,
hospital, department, title, cert_image_url, avatar_image_url, auth_time, honor, hospital, department, title, cert_image_url, avatar_image_url, auth_time, honor,
skills, thumb_up_num, email, qrcode, nickname, personal_sign, delete_flag, creat_id, skills, thumb_up_num, email, qrcode, nickname, personal_sign, delete_flag, creat_id,
...@@ -73,18 +73,18 @@ ...@@ -73,18 +73,18 @@
reg_time, last_login_time, unionid, register_source, comment, administer_title_id, reg_time, last_login_time, unionid, register_source, comment, administer_title_id,
administer_title, register_type, first_login_time, card, birthday, show_flag, acct_id administer_title, register_type, first_login_time, card, birthday, show_flag, acct_id
</sql> </sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from p_doctor
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select
<include refid="Base_Column_List"/>
from p_doctor
where id = #{id,jdbcType=INTEGER}
</select>
<!--根据手机号获取数据--> <!--根据手机号获取数据-->
<select id="getDoctorInfoByMobile" resultType="com.pica.cloud.account.account.server.entity.DoctorEntity" <select id="getDoctorInfoByMobile" resultType="com.pica.cloud.account.account.server.entity.DoctorEntity"
parameterType="java.lang.String"> parameterType="java.lang.String">
SELECT aa.id, aa.sex, aa.unionid, aa.name, aa.mobile_phone, aa.status, aa.type, aa.hospital_id, aa.department_id, SELECT aa.id, aa.sex, aa.unionid, aa.name, aa.mobile_phone, aa.status, aa.type, aa.hospital_id, aa.department_id,
aa.title_id, ifnull(bb.name,aa.hospital) as hospital, aa.title_id, ifnull(bb.name,aa.hospital) as hospital,
ifnull(pde.name,aa.department) as department, ifnull(pt.name,aa.title) as title, aa.cert_image_url, ifnull(pde.name,aa.department) as department, ifnull(pt.name,aa.title) as title, aa.cert_image_url,
...@@ -114,19 +114,206 @@ ...@@ -114,19 +114,206 @@
limit 0,1 limit 0,1
</select> </select>
<!--通过账户id查询用户信息--> <!--通过账户id查询用户信息-->
<select id="selectUserIdByAcctId" parameterType="java.lang.Integer"> <select id="selectUserIdByAcctId" parameterType="java.lang.Integer">
SELECT id SELECT id
FROM p_doctor FROM p_doctor
where acct_id = #{acctId} where acct_id = #{acctId}
and delete_flag = 1 and delete_flag = 1
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > <!--通过账户id更新用户信息-->
<update id="updateByAcctId" parameterType="com.pica.cloud.account.account.server.entity.Doctor">
update p_doctor
<set>
<if test="sex != null">
sex = #{sex,jdbcType=INTEGER},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="mobilePhone != null">
mobile_phone = #{mobilePhone,jdbcType=VARCHAR},
</if>
<if test="tel != null">
tel = #{tel,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="hospitalId != null">
hospital_id = #{hospitalId,jdbcType=INTEGER},
</if>
<if test="departmentId != null">
department_id = #{departmentId,jdbcType=INTEGER},
</if>
<if test="titleId != null">
title_id = #{titleId,jdbcType=INTEGER},
</if>
<if test="hospital != null">
hospital = #{hospital,jdbcType=VARCHAR},
</if>
<if test="department != null">
department = #{department,jdbcType=VARCHAR},
</if>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="certImageUrl != null">
cert_image_url = #{certImageUrl,jdbcType=VARCHAR},
</if>
<if test="avatarImageUrl != null">
avatar_image_url = #{avatarImageUrl,jdbcType=VARCHAR},
</if>
<if test="authTime != null">
auth_time = #{authTime,jdbcType=TIMESTAMP},
</if>
<if test="honor != null">
honor = #{honor,jdbcType=VARCHAR},
</if>
<if test="skills != null">
skills = #{skills,jdbcType=VARCHAR},
</if>
<if test="thumbUpNum != null">
thumb_up_num = #{thumbUpNum,jdbcType=INTEGER},
</if>
<if test="email != null">
email = #{email,jdbcType=VARCHAR},
</if>
<if test="qrcode != null">
qrcode = #{qrcode,jdbcType=VARCHAR},
</if>
<if test="nickname != null">
nickname = #{nickname,jdbcType=VARCHAR},
</if>
<if test="personalSign != null">
personal_sign = #{personalSign,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="creatId != null">
creat_id = #{creatId,jdbcType=INTEGER},
</if>
<if test="creatTime != null">
creat_time = #{creatTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyId != null">
modify_id = #{modifyId,jdbcType=INTEGER},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="praiseNum != null">
praise_num = #{praiseNum,jdbcType=INTEGER},
</if>
<if test="password != null">
password = #{password,jdbcType=VARCHAR},
</if>
<if test="info != null">
info = #{info,jdbcType=VARCHAR},
</if>
<if test="rank != null">
rank = #{rank,jdbcType=VARCHAR},
</if>
<if test="province != null">
province = #{province,jdbcType=BIGINT},
</if>
<if test="provinceName != null">
province_name = #{provinceName,jdbcType=VARCHAR},
</if>
<if test="city != null">
city = #{city,jdbcType=BIGINT},
</if>
<if test="cityName != null">
city_name = #{cityName,jdbcType=VARCHAR},
</if>
<if test="county != null">
county = #{county,jdbcType=BIGINT},
</if>
<if test="countyName != null">
county_name = #{countyName,jdbcType=VARCHAR},
</if>
<if test="town != null">
town = #{town,jdbcType=BIGINT},
</if>
<if test="townName != null">
town_name = #{townName,jdbcType=VARCHAR},
</if>
<if test="inviteCode != null">
invite_code = #{inviteCode,jdbcType=VARCHAR},
</if>
<if test="inviteStartTime != null">
invite_start_time = #{inviteStartTime,jdbcType=TIMESTAMP},
</if>
<if test="gaoxueyaPassword != null">
gaoxueya_password = #{gaoxueyaPassword,jdbcType=VARCHAR},
</if>
<if test="smsSendNum != null">
sms_send_num = #{smsSendNum,jdbcType=INTEGER},
</if>
<if test="totalSmsSendNum != null">
total_sms_send_num = #{totalSmsSendNum,jdbcType=INTEGER},
</if>
<if test="entireFlag != null">
entire_flag = #{entireFlag,jdbcType=BIT},
</if>
<if test="doctorProjectType != null">
doctor_project_type = #{doctorProjectType,jdbcType=INTEGER},
</if>
<if test="regTime != null">
reg_time = #{regTime,jdbcType=DATE},
</if>
<if test="lastLoginTime != null">
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
</if>
<if test="unionid != null">
unionid = #{unionid,jdbcType=VARCHAR},
</if>
<if test="registerSource != null">
register_source = #{registerSource,jdbcType=INTEGER},
</if>
<if test="comment != null">
comment = #{comment,jdbcType=VARCHAR},
</if>
<if test="administerTitleId != null">
administer_title_id = #{administerTitleId,jdbcType=INTEGER},
</if>
<if test="administerTitle != null">
administer_title = #{administerTitle,jdbcType=VARCHAR},
</if>
<if test="registerType != null">
register_type = #{registerType,jdbcType=INTEGER},
</if>
<if test="firstLoginTime != null">
first_login_time = #{firstLoginTime,jdbcType=TIMESTAMP},
</if>
<if test="card != null">
card = #{card,jdbcType=VARCHAR},
</if>
<if test="birthday != null">
birthday = #{birthday,jdbcType=DATE},
</if>
<if test="showFlag != null">
show_flag = #{showFlag,jdbcType=INTEGER},
</if>
<if test="acctId != null">
acct_id = #{acctId,jdbcType=INTEGER},
</if>
</set>
where acct_id = #{acctId,jdbcType=INTEGER}
</update>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from p_doctor delete from p_doctor
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</delete> </delete>
<insert id="insert" parameterType="com.pica.cloud.account.account.server.entity.Doctor" > <insert id="insert" parameterType="com.pica.cloud.account.account.server.entity.Doctor">
insert into p_doctor (id, sex, name, insert into p_doctor (id, sex, name,
mobile_phone, tel, status, mobile_phone, tel, status,
type, hospital_id, department_id, type, hospital_id, department_id,
...@@ -170,557 +357,562 @@ ...@@ -170,557 +357,562 @@
#{birthday,jdbcType=DATE}, #{showFlag,jdbcType=INTEGER}, #{acctId,jdbcType=INTEGER} #{birthday,jdbcType=DATE}, #{showFlag,jdbcType=INTEGER}, #{acctId,jdbcType=INTEGER}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.pica.cloud.account.account.server.entity.Doctor" > <insert id="insertSelective" parameterType="com.pica.cloud.account.account.server.entity.Doctor">
insert into p_doctor insert into p_doctor
<trim prefix="(" suffix=")" suffixOverrides="," > <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null" > <if test="id != null">
id, id,
</if> </if>
<if test="sex != null" > <if test="sex != null">
sex, sex,
</if> </if>
<if test="name != null" > <if test="name != null">
name, name,
</if> </if>
<if test="mobilePhone != null" > <if test="mobilePhone != null">
mobile_phone, mobile_phone,
</if> </if>
<if test="tel != null" > <if test="tel != null">
tel, tel,
</if> </if>
<if test="status != null" > <if test="status != null">
status, status,
</if> </if>
<if test="type != null" > <if test="type != null">
type, type,
</if> </if>
<if test="hospitalId != null" > <if test="hospitalId != null">
hospital_id, hospital_id,
</if> </if>
<if test="departmentId != null" > <if test="departmentId != null">
department_id, department_id,
</if> </if>
<if test="titleId != null" > <if test="titleId != null">
title_id, title_id,
</if> </if>
<if test="hospital != null" > <if test="hospital != null">
hospital, hospital,
</if> </if>
<if test="department != null" > <if test="department != null">
department, department,
</if> </if>
<if test="title != null" > <if test="title != null">
title, title,
</if> </if>
<if test="certImageUrl != null" > <if test="certImageUrl != null">
cert_image_url, cert_image_url,
</if> </if>
<if test="avatarImageUrl != null" > <if test="avatarImageUrl != null">
avatar_image_url, avatar_image_url,
</if> </if>
<if test="authTime != null" > <if test="authTime != null">
auth_time, auth_time,
</if> </if>
<if test="honor != null" > <if test="honor != null">
honor, honor,
</if> </if>
<if test="skills != null" > <if test="skills != null">
skills, skills,
</if> </if>
<if test="thumbUpNum != null" > <if test="thumbUpNum != null">
thumb_up_num, thumb_up_num,
</if> </if>
<if test="email != null" > <if test="email != null">
email, email,
</if> </if>
<if test="qrcode != null" > <if test="qrcode != null">
qrcode, qrcode,
</if> </if>
<if test="nickname != null" > <if test="nickname != null">
nickname, nickname,
</if> </if>
<if test="personalSign != null" > <if test="personalSign != null">
personal_sign, personal_sign,
</if> </if>
<if test="deleteFlag != null" > <if test="deleteFlag != null">
delete_flag, delete_flag,
</if> </if>
<if test="creatId != null" > <if test="creatId != null">
creat_id, creat_id,
</if> </if>
<if test="creatTime != null" > <if test="creatTime != null">
creat_time, creat_time,
</if> </if>
<if test="modifyId != null" > <if test="modifyId != null">
modify_id, modify_id,
</if> </if>
<if test="modifyTime != null" > <if test="modifyTime != null">
modify_time, modify_time,
</if> </if>
<if test="praiseNum != null" > <if test="praiseNum != null">
praise_num, praise_num,
</if> </if>
<if test="password != null" > <if test="password != null">
password, password,
</if> </if>
<if test="info != null" > <if test="info != null">
info, info,
</if> </if>
<if test="rank != null" > <if test="rank != null">
rank, rank,
</if> </if>
<if test="province != null" > <if test="province != null">
province, province,
</if> </if>
<if test="provinceName != null" > <if test="provinceName != null">
province_name, province_name,
</if> </if>
<if test="city != null" > <if test="city != null">
city, city,
</if> </if>
<if test="cityName != null" > <if test="cityName != null">
city_name, city_name,
</if> </if>
<if test="county != null" > <if test="county != null">
county, county,
</if> </if>
<if test="countyName != null" > <if test="countyName != null">
county_name, county_name,
</if> </if>
<if test="town != null" > <if test="town != null">
town, town,
</if> </if>
<if test="townName != null" > <if test="townName != null">
town_name, town_name,
</if> </if>
<if test="inviteCode != null" > <if test="inviteCode != null">
invite_code, invite_code,
</if> </if>
<if test="inviteStartTime != null" > <if test="inviteStartTime != null">
invite_start_time, invite_start_time,
</if> </if>
<if test="gaoxueyaPassword != null" > <if test="gaoxueyaPassword != null">
gaoxueya_password, gaoxueya_password,
</if> </if>
<if test="smsSendNum != null" > <if test="smsSendNum != null">
sms_send_num, sms_send_num,
</if> </if>
<if test="totalSmsSendNum != null" > <if test="totalSmsSendNum != null">
total_sms_send_num, total_sms_send_num,
</if> </if>
<if test="entireFlag != null" > <if test="entireFlag != null">
entire_flag, entire_flag,
</if> </if>
<if test="doctorProjectType != null" > <if test="doctorProjectType != null">
doctor_project_type, doctor_project_type,
</if> </if>
<if test="regTime != null" > <if test="regTime != null">
reg_time, reg_time,
</if> </if>
<if test="lastLoginTime != null" > <if test="lastLoginTime != null">
last_login_time, last_login_time,
</if> </if>
<if test="unionid != null" > <if test="unionid != null">
unionid, unionid,
</if> </if>
<if test="registerSource != null" > <if test="registerSource != null">
register_source, register_source,
</if> </if>
<if test="comment != null" > <if test="comment != null">
comment, comment,
</if> </if>
<if test="administerTitleId != null" > <if test="administerTitleId != null">
administer_title_id, administer_title_id,
</if> </if>
<if test="administerTitle != null" > <if test="administerTitle != null">
administer_title, administer_title,
</if> </if>
<if test="registerType != null" > <if test="registerType != null">
register_type, register_type,
</if> </if>
<if test="firstLoginTime != null" > <if test="firstLoginTime != null">
first_login_time, first_login_time,
</if> </if>
<if test="card != null" > <if test="card != null">
card, card,
</if> </if>
<if test="birthday != null" > <if test="birthday != null">
birthday, birthday,
</if> </if>
<if test="showFlag != null" > <if test="showFlag != null">
show_flag, show_flag,
</if> </if>
<if test="acctId != null" > <if test="acctId != null">
acct_id, acct_id,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides="," > <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null" > <if test="id != null">
#{id,jdbcType=INTEGER}, #{id,jdbcType=INTEGER},
</if> </if>
<if test="sex != null" > <if test="sex != null">
#{sex,jdbcType=INTEGER}, #{sex,jdbcType=INTEGER},
</if> </if>
<if test="name != null" > <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>
<if test="mobilePhone != null" > <if test="mobilePhone != null">
#{mobilePhone,jdbcType=VARCHAR}, #{mobilePhone,jdbcType=VARCHAR},
</if> </if>
<if test="tel != null" > <if test="tel != null">
#{tel,jdbcType=VARCHAR}, #{tel,jdbcType=VARCHAR},
</if> </if>
<if test="status != null" > <if test="status != null">
#{status,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
</if> </if>
<if test="type != null" > <if test="type != null">
#{type,jdbcType=INTEGER}, #{type,jdbcType=INTEGER},
</if> </if>
<if test="hospitalId != null" > <if test="hospitalId != null">
#{hospitalId,jdbcType=INTEGER}, #{hospitalId,jdbcType=INTEGER},
</if> </if>
<if test="departmentId != null" > <if test="departmentId != null">
#{departmentId,jdbcType=INTEGER}, #{departmentId,jdbcType=INTEGER},
</if> </if>
<if test="titleId != null" > <if test="titleId != null">
#{titleId,jdbcType=INTEGER}, #{titleId,jdbcType=INTEGER},
</if> </if>
<if test="hospital != null" > <if test="hospital != null">
#{hospital,jdbcType=VARCHAR}, #{hospital,jdbcType=VARCHAR},
</if> </if>
<if test="department != null" > <if test="department != null">
#{department,jdbcType=VARCHAR}, #{department,jdbcType=VARCHAR},
</if> </if>
<if test="title != null" > <if test="title != null">
#{title,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
</if> </if>
<if test="certImageUrl != null" > <if test="certImageUrl != null">
#{certImageUrl,jdbcType=VARCHAR}, #{certImageUrl,jdbcType=VARCHAR},
</if> </if>
<if test="avatarImageUrl != null" > <if test="avatarImageUrl != null">
#{avatarImageUrl,jdbcType=VARCHAR}, #{avatarImageUrl,jdbcType=VARCHAR},
</if> </if>
<if test="authTime != null" > <if test="authTime != null">
#{authTime,jdbcType=TIMESTAMP}, #{authTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="honor != null" > <if test="honor != null">
#{honor,jdbcType=VARCHAR}, #{honor,jdbcType=VARCHAR},
</if> </if>
<if test="skills != null" > <if test="skills != null">
#{skills,jdbcType=VARCHAR}, #{skills,jdbcType=VARCHAR},
</if> </if>
<if test="thumbUpNum != null" > <if test="thumbUpNum != null">
#{thumbUpNum,jdbcType=INTEGER}, #{thumbUpNum,jdbcType=INTEGER},
</if> </if>
<if test="email != null" > <if test="email != null">
#{email,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR},
</if> </if>
<if test="qrcode != null" > <if test="qrcode != null">
#{qrcode,jdbcType=VARCHAR}, #{qrcode,jdbcType=VARCHAR},
</if> </if>
<if test="nickname != null" > <if test="nickname != null">
#{nickname,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR},
</if> </if>
<if test="personalSign != null" > <if test="personalSign != null">
#{personalSign,jdbcType=VARCHAR}, #{personalSign,jdbcType=VARCHAR},
</if> </if>
<if test="deleteFlag != null" > <if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="creatId != null" > <if test="creatId != null">
#{creatId,jdbcType=INTEGER}, #{creatId,jdbcType=INTEGER},
</if> </if>
<if test="creatTime != null" > <if test="creatTime != null">
#{creatTime,jdbcType=TIMESTAMP}, #{creatTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="modifyId != null" > <if test="modifyId != null">
#{modifyId,jdbcType=INTEGER}, #{modifyId,jdbcType=INTEGER},
</if> </if>
<if test="modifyTime != null" > <if test="modifyTime != null">
#{modifyTime,jdbcType=TIMESTAMP}, #{modifyTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="praiseNum != null" > <if test="praiseNum != null">
#{praiseNum,jdbcType=INTEGER}, #{praiseNum,jdbcType=INTEGER},
</if> </if>
<if test="password != null" > <if test="password != null">
#{password,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
</if> </if>
<if test="info != null" > <if test="info != null">
#{info,jdbcType=VARCHAR}, #{info,jdbcType=VARCHAR},
</if> </if>
<if test="rank != null" > <if test="rank != null">
#{rank,jdbcType=VARCHAR}, #{rank,jdbcType=VARCHAR},
</if> </if>
<if test="province != null" > <if test="province != null">
#{province,jdbcType=BIGINT}, #{province,jdbcType=BIGINT},
</if> </if>
<if test="provinceName != null" > <if test="provinceName != null">
#{provinceName,jdbcType=VARCHAR}, #{provinceName,jdbcType=VARCHAR},
</if> </if>
<if test="city != null" > <if test="city != null">
#{city,jdbcType=BIGINT}, #{city,jdbcType=BIGINT},
</if> </if>
<if test="cityName != null" > <if test="cityName != null">
#{cityName,jdbcType=VARCHAR}, #{cityName,jdbcType=VARCHAR},
</if> </if>
<if test="county != null" > <if test="county != null">
#{county,jdbcType=BIGINT}, #{county,jdbcType=BIGINT},
</if> </if>
<if test="countyName != null" > <if test="countyName != null">
#{countyName,jdbcType=VARCHAR}, #{countyName,jdbcType=VARCHAR},
</if> </if>
<if test="town != null" > <if test="town != null">
#{town,jdbcType=BIGINT}, #{town,jdbcType=BIGINT},
</if> </if>
<if test="townName != null" > <if test="townName != null">
#{townName,jdbcType=VARCHAR}, #{townName,jdbcType=VARCHAR},
</if> </if>
<if test="inviteCode != null" > <if test="inviteCode != null">
#{inviteCode,jdbcType=VARCHAR}, #{inviteCode,jdbcType=VARCHAR},
</if> </if>
<if test="inviteStartTime != null" > <if test="inviteStartTime != null">
#{inviteStartTime,jdbcType=TIMESTAMP}, #{inviteStartTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="gaoxueyaPassword != null" > <if test="gaoxueyaPassword != null">
#{gaoxueyaPassword,jdbcType=VARCHAR}, #{gaoxueyaPassword,jdbcType=VARCHAR},
</if> </if>
<if test="smsSendNum != null" > <if test="smsSendNum != null">
#{smsSendNum,jdbcType=INTEGER}, #{smsSendNum,jdbcType=INTEGER},
</if> </if>
<if test="totalSmsSendNum != null" > <if test="totalSmsSendNum != null">
#{totalSmsSendNum,jdbcType=INTEGER}, #{totalSmsSendNum,jdbcType=INTEGER},
</if> </if>
<if test="entireFlag != null" > <if test="entireFlag != null">
#{entireFlag,jdbcType=BIT}, #{entireFlag,jdbcType=BIT},
</if> </if>
<if test="doctorProjectType != null" > <if test="doctorProjectType != null">
#{doctorProjectType,jdbcType=INTEGER}, #{doctorProjectType,jdbcType=INTEGER},
</if> </if>
<if test="regTime != null" > <if test="regTime != null">
#{regTime,jdbcType=DATE}, #{regTime,jdbcType=DATE},
</if> </if>
<if test="lastLoginTime != null" > <if test="lastLoginTime != null">
#{lastLoginTime,jdbcType=TIMESTAMP}, #{lastLoginTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="unionid != null" > <if test="unionid != null">
#{unionid,jdbcType=VARCHAR}, #{unionid,jdbcType=VARCHAR},
</if> </if>
<if test="registerSource != null" > <if test="registerSource != null">
#{registerSource,jdbcType=INTEGER}, #{registerSource,jdbcType=INTEGER},
</if> </if>
<if test="comment != null" > <if test="comment != null">
#{comment,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR},
</if> </if>
<if test="administerTitleId != null" > <if test="administerTitleId != null">
#{administerTitleId,jdbcType=INTEGER}, #{administerTitleId,jdbcType=INTEGER},
</if> </if>
<if test="administerTitle != null" > <if test="administerTitle != null">
#{administerTitle,jdbcType=VARCHAR}, #{administerTitle,jdbcType=VARCHAR},
</if> </if>
<if test="registerType != null" > <if test="registerType != null">
#{registerType,jdbcType=INTEGER}, #{registerType,jdbcType=INTEGER},
</if> </if>
<if test="firstLoginTime != null" > <if test="firstLoginTime != null">
#{firstLoginTime,jdbcType=TIMESTAMP}, #{firstLoginTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="card != null" > <if test="card != null">
#{card,jdbcType=VARCHAR}, #{card,jdbcType=VARCHAR},
</if> </if>
<if test="birthday != null" > <if test="birthday != null">
#{birthday,jdbcType=DATE}, #{birthday,jdbcType=DATE},
</if> </if>
<if test="showFlag != null" > <if test="showFlag != null">
#{showFlag,jdbcType=INTEGER}, #{showFlag,jdbcType=INTEGER},
</if> </if>
<if test="acctId != null" > <if test="acctId != null">
#{acctId,jdbcType=INTEGER}, #{acctId,jdbcType=INTEGER},
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.pica.cloud.account.account.server.entity.Doctor" >
update p_doctor
<set > <update id="updateByPrimaryKeySelective" parameterType="com.pica.cloud.account.account.server.entity.Doctor">
<if test="sex != null" > update p_doctor
sex = #{sex,jdbcType=INTEGER}, <set>
</if> <if test="sex != null">
<if test="name != null" > sex = #{sex,jdbcType=INTEGER},
name = #{name,jdbcType=VARCHAR}, </if>
</if> <if test="name != null">
<if test="mobilePhone != null" > name = #{name,jdbcType=VARCHAR},
mobile_phone = #{mobilePhone,jdbcType=VARCHAR}, </if>
</if> <if test="mobilePhone != null">
<if test="tel != null" > mobile_phone = #{mobilePhone,jdbcType=VARCHAR},
tel = #{tel,jdbcType=VARCHAR}, </if>
</if> <if test="tel != null">
<if test="status != null" > tel = #{tel,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER}, </if>
</if> <if test="status != null">
<if test="type != null" > status = #{status,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER}, </if>
</if> <if test="type != null">
<if test="hospitalId != null" > type = #{type,jdbcType=INTEGER},
hospital_id = #{hospitalId,jdbcType=INTEGER}, </if>
</if> <if test="hospitalId != null">
<if test="departmentId != null" > hospital_id = #{hospitalId,jdbcType=INTEGER},
department_id = #{departmentId,jdbcType=INTEGER}, </if>
</if> <if test="departmentId != null">
<if test="titleId != null" > department_id = #{departmentId,jdbcType=INTEGER},
title_id = #{titleId,jdbcType=INTEGER}, </if>
</if> <if test="titleId != null">
<if test="hospital != null" > title_id = #{titleId,jdbcType=INTEGER},
hospital = #{hospital,jdbcType=VARCHAR}, </if>
</if> <if test="hospital != null">
<if test="department != null" > hospital = #{hospital,jdbcType=VARCHAR},
department = #{department,jdbcType=VARCHAR}, </if>
</if> <if test="department != null">
<if test="title != null" > department = #{department,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR}, </if>
</if> <if test="title != null">
<if test="certImageUrl != null" > title = #{title,jdbcType=VARCHAR},
cert_image_url = #{certImageUrl,jdbcType=VARCHAR}, </if>
</if> <if test="certImageUrl != null">
<if test="avatarImageUrl != null" > cert_image_url = #{certImageUrl,jdbcType=VARCHAR},
avatar_image_url = #{avatarImageUrl,jdbcType=VARCHAR}, </if>
</if> <if test="avatarImageUrl != null">
<if test="authTime != null" > avatar_image_url = #{avatarImageUrl,jdbcType=VARCHAR},
auth_time = #{authTime,jdbcType=TIMESTAMP}, </if>
</if> <if test="authTime != null">
<if test="honor != null" > auth_time = #{authTime,jdbcType=TIMESTAMP},
honor = #{honor,jdbcType=VARCHAR}, </if>
</if> <if test="honor != null">
<if test="skills != null" > honor = #{honor,jdbcType=VARCHAR},
skills = #{skills,jdbcType=VARCHAR}, </if>
</if> <if test="skills != null">
<if test="thumbUpNum != null" > skills = #{skills,jdbcType=VARCHAR},
thumb_up_num = #{thumbUpNum,jdbcType=INTEGER}, </if>
</if> <if test="thumbUpNum != null">
<if test="email != null" > thumb_up_num = #{thumbUpNum,jdbcType=INTEGER},
email = #{email,jdbcType=VARCHAR}, </if>
</if> <if test="email != null">
<if test="qrcode != null" > email = #{email,jdbcType=VARCHAR},
qrcode = #{qrcode,jdbcType=VARCHAR}, </if>
</if> <if test="qrcode != null">
<if test="nickname != null" > qrcode = #{qrcode,jdbcType=VARCHAR},
nickname = #{nickname,jdbcType=VARCHAR}, </if>
</if> <if test="nickname != null">
<if test="personalSign != null" > nickname = #{nickname,jdbcType=VARCHAR},
personal_sign = #{personalSign,jdbcType=VARCHAR}, </if>
</if> <if test="personalSign != null">
<if test="deleteFlag != null" > personal_sign = #{personalSign,jdbcType=VARCHAR},
delete_flag = #{deleteFlag,jdbcType=INTEGER}, </if>
</if> <if test="deleteFlag != null">
<if test="creatId != null" > delete_flag = #{deleteFlag,jdbcType=INTEGER},
creat_id = #{creatId,jdbcType=INTEGER}, </if>
</if> <if test="creatId != null">
<if test="creatTime != null" > creat_id = #{creatId,jdbcType=INTEGER},
creat_time = #{creatTime,jdbcType=TIMESTAMP}, </if>
</if> <if test="creatTime != null">
<if test="modifyId != null" > creat_time = #{creatTime,jdbcType=TIMESTAMP},
modify_id = #{modifyId,jdbcType=INTEGER}, </if>
</if> <if test="modifyId != null">
<if test="modifyTime != null" > modify_id = #{modifyId,jdbcType=INTEGER},
modify_time = #{modifyTime,jdbcType=TIMESTAMP}, </if>
</if> <if test="modifyTime != null">
<if test="praiseNum != null" > modify_time = #{modifyTime,jdbcType=TIMESTAMP},
praise_num = #{praiseNum,jdbcType=INTEGER}, </if>
</if> <if test="praiseNum != null">
<if test="password != null" > praise_num = #{praiseNum,jdbcType=INTEGER},
password = #{password,jdbcType=VARCHAR}, </if>
</if> <if test="password != null">
<if test="info != null" > password = #{password,jdbcType=VARCHAR},
info = #{info,jdbcType=VARCHAR}, </if>
</if> <if test="info != null">
<if test="rank != null" > info = #{info,jdbcType=VARCHAR},
rank = #{rank,jdbcType=VARCHAR}, </if>
</if> <if test="rank != null">
<if test="province != null" > rank = #{rank,jdbcType=VARCHAR},
province = #{province,jdbcType=BIGINT}, </if>
</if> <if test="province != null">
<if test="provinceName != null" > province = #{province,jdbcType=BIGINT},
province_name = #{provinceName,jdbcType=VARCHAR}, </if>
</if> <if test="provinceName != null">
<if test="city != null" > province_name = #{provinceName,jdbcType=VARCHAR},
city = #{city,jdbcType=BIGINT}, </if>
</if> <if test="city != null">
<if test="cityName != null" > city = #{city,jdbcType=BIGINT},
city_name = #{cityName,jdbcType=VARCHAR}, </if>
</if> <if test="cityName != null">
<if test="county != null" > city_name = #{cityName,jdbcType=VARCHAR},
county = #{county,jdbcType=BIGINT}, </if>
</if> <if test="county != null">
<if test="countyName != null" > county = #{county,jdbcType=BIGINT},
county_name = #{countyName,jdbcType=VARCHAR}, </if>
</if> <if test="countyName != null">
<if test="town != null" > county_name = #{countyName,jdbcType=VARCHAR},
town = #{town,jdbcType=BIGINT}, </if>
</if> <if test="town != null">
<if test="townName != null" > town = #{town,jdbcType=BIGINT},
town_name = #{townName,jdbcType=VARCHAR}, </if>
</if> <if test="townName != null">
<if test="inviteCode != null" > town_name = #{townName,jdbcType=VARCHAR},
invite_code = #{inviteCode,jdbcType=VARCHAR}, </if>
</if> <if test="inviteCode != null">
<if test="inviteStartTime != null" > invite_code = #{inviteCode,jdbcType=VARCHAR},
invite_start_time = #{inviteStartTime,jdbcType=TIMESTAMP}, </if>
</if> <if test="inviteStartTime != null">
<if test="gaoxueyaPassword != null" > invite_start_time = #{inviteStartTime,jdbcType=TIMESTAMP},
gaoxueya_password = #{gaoxueyaPassword,jdbcType=VARCHAR}, </if>
</if> <if test="gaoxueyaPassword != null">
<if test="smsSendNum != null" > gaoxueya_password = #{gaoxueyaPassword,jdbcType=VARCHAR},
sms_send_num = #{smsSendNum,jdbcType=INTEGER}, </if>
</if> <if test="smsSendNum != null">
<if test="totalSmsSendNum != null" > sms_send_num = #{smsSendNum,jdbcType=INTEGER},
total_sms_send_num = #{totalSmsSendNum,jdbcType=INTEGER}, </if>
</if> <if test="totalSmsSendNum != null">
<if test="entireFlag != null" > total_sms_send_num = #{totalSmsSendNum,jdbcType=INTEGER},
entire_flag = #{entireFlag,jdbcType=BIT}, </if>
</if> <if test="entireFlag != null">
<if test="doctorProjectType != null" > entire_flag = #{entireFlag,jdbcType=BIT},
doctor_project_type = #{doctorProjectType,jdbcType=INTEGER}, </if>
</if> <if test="doctorProjectType != null">
<if test="regTime != null" > doctor_project_type = #{doctorProjectType,jdbcType=INTEGER},
reg_time = #{regTime,jdbcType=DATE}, </if>
</if> <if test="regTime != null">
<if test="lastLoginTime != null" > reg_time = #{regTime,jdbcType=DATE},
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP}, </if>
</if> <if test="lastLoginTime != null">
<if test="unionid != null" > last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
unionid = #{unionid,jdbcType=VARCHAR}, </if>
</if> <if test="unionid != null">
<if test="registerSource != null" > unionid = #{unionid,jdbcType=VARCHAR},
register_source = #{registerSource,jdbcType=INTEGER}, </if>
</if> <if test="registerSource != null">
<if test="comment != null" > register_source = #{registerSource,jdbcType=INTEGER},
comment = #{comment,jdbcType=VARCHAR}, </if>
</if> <if test="comment != null">
<if test="administerTitleId != null" > comment = #{comment,jdbcType=VARCHAR},
administer_title_id = #{administerTitleId,jdbcType=INTEGER}, </if>
</if> <if test="administerTitleId != null">
<if test="administerTitle != null" > administer_title_id = #{administerTitleId,jdbcType=INTEGER},
administer_title = #{administerTitle,jdbcType=VARCHAR}, </if>
</if> <if test="administerTitle != null">
<if test="registerType != null" > administer_title = #{administerTitle,jdbcType=VARCHAR},
register_type = #{registerType,jdbcType=INTEGER}, </if>
</if> <if test="registerType != null">
<if test="firstLoginTime != null" > register_type = #{registerType,jdbcType=INTEGER},
first_login_time = #{firstLoginTime,jdbcType=TIMESTAMP}, </if>
</if> <if test="firstLoginTime != null">
<if test="card != null" > first_login_time = #{firstLoginTime,jdbcType=TIMESTAMP},
card = #{card,jdbcType=VARCHAR}, </if>
</if> <if test="card != null">
<if test="birthday != null" > card = #{card,jdbcType=VARCHAR},
birthday = #{birthday,jdbcType=DATE}, </if>
</if> <if test="birthday != null">
<if test="showFlag != null" > birthday = #{birthday,jdbcType=DATE},
show_flag = #{showFlag,jdbcType=INTEGER}, </if>
</if> <if test="showFlag != null">
<if test="acctId != null" > show_flag = #{showFlag,jdbcType=INTEGER},
acct_id = #{acctId,jdbcType=INTEGER}, </if>
</if> <if test="acctId != null">
</set> acct_id = #{acctId,jdbcType=INTEGER},
where id = #{id,jdbcType=INTEGER} </if>
</update> </set>
<update id="updateByPrimaryKey" parameterType="com.pica.cloud.account.account.server.entity.Doctor" > where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.pica.cloud.account.account.server.entity.Doctor">
update p_doctor update p_doctor
set sex = #{sex,jdbcType=INTEGER}, set sex = #{sex,jdbcType=INTEGER},
name = #{name,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR},
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册