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

20191129 解决冲突

流水线 #17963 已失败 于阶段
in 0 second
......@@ -11,7 +11,7 @@
<groupId>com.pica.cloud.account</groupId>
<artifactId>pica-cloud-account-client</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
<name>pica-cloud-account-client</name>
<packaging>jar</packaging>
......
package com.pica.cloud.account.account.client;
import com.pica.cloud.foundation.entity.PicaResponse;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
* @author andong
* @create 2019/7/19
*/
@FeignClient(name = "13201-pica-cloud-account")
public interface CaptchaClient {
@GetMapping("/account/account/acknowledge")
PicaResponse<Boolean> acknowledge(@RequestParam("captchaToken") String captchaToken,
@RequestParam("captchaAnswer") String captchaAnswer);
}
......@@ -74,11 +74,23 @@
</exclusions>
</dependency>
<dependency>
<!--<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
</dependency>-->
<dependency>
<groupId>com.corundumstudio.socketio</groupId>
<artifactId>netty-socketio</artifactId>
<version>1.7.17</version>
</dependency>
<dependency>
<groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>com.pica.cloud.foundation</groupId>
<artifactId>pica-cloud-utils</artifactId>
......@@ -130,6 +142,12 @@
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>net.spy</groupId>
<artifactId>spymemcached</artifactId>
......@@ -176,6 +194,7 @@
</dependency>
</dependencies>
</dependencyManagement>
......
package com.pica.cloud.account.account.server;
import com.pica.cloud.foundation.service.starter.XxlJobConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
......@@ -9,7 +9,7 @@ import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@SpringBootApplication(scanBasePackages = "com.pica.cloud", exclude = {XxlJobConfiguration.class})
@SpringBootApplication(scanBasePackages = "com.pica.cloud")
@EnableDiscoveryClient
@EnableSwagger2
@EnableFeignClients(basePackages = "com.pica.cloud")
......
......@@ -76,23 +76,36 @@ public class Test {
// String encryptEntity1Json = JSONObject.toJSONString(encryptEntity1);
// System.out.println(encryptEntity1Json);
System.out.println("--------------------登录接口-------------");
BaseRequest login = new BaseRequest();
login.setMobile("13024112588");
login.setPassword("d0dcbf0d12a6b1e7fbfa2ce5848f3eff"); //qq123456
String con = JSONObject.toJSONString(login);
//通过十六位随机数对参数明文进行加密 contentResult
String contentResult = AESUtil.aesEncrypt(con, "YCPQPx4qpQjEjDea"); //十六位随机数
// System.out.println("--------------------登录接口-------------");
//<<<<<<< HEAD
String publicKey="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCa6j3SJwXr/pLLwb6Pq8pi9StPq+Wvm6vu+LWQB1hNqClWk0jQm5GnF6Kj0ac2gqgsMsutc3hhMaaX2QZvLX+gFQHC/ufGBdBbpPtDeGWsQItsMf/xqqlkLPkc7eVTyfsmrpQM7BG9LVvaPVXPVUcZfJNBaYuR4+Sf6Zi2ayI/hQIDAQAB";
//拿到RAS公钥,对上面的随机数进行加密
String keyResult = RSAUtil.encrypt("YCPQPx4qpQjEjDea",publicKey);
EncryptEntity encryptTest = new EncryptEntity();
encryptTest.setContent(contentResult);
encryptTest.setKey(keyResult);
System.out.println(JSONObject.toJSONString(encryptTest));
// BaseRequest login = new BaseRequest();
// login.setMobile("13024112588");
// login.setPassword("d0dcbf0d12a6b1e7fbfa2ce5848f3eff");
//=======
//
// BaseRequest login = new BaseRequest();
// login.setMobile("13024112588");
// login.setPassword("d0dcbf0d12a6b1e7fbfa2ce5848f3eff"); //qq123456
//>>>>>>> dev-sensitive-20191112
// String con = JSONObject.toJSONString(login);
// //通过十六位随机数对参数明文进行加密 contentResult
// String contentResult = AESUtil.aesEncrypt(con, "YCPQPx4qpQjEjDea"); //十六位随机数
//
//<<<<<<< HEAD
// String contentResult = AESUtil.aesEncrypt(con, "YCPQPx4qpQjEjDea");
//
// String keyResult = RSAUtil.encrypt("YCPQPx4qpQjEjDea",publicKey);
//=======
// String publicKey="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCa6j3SJwXr/pLLwb6Pq8pi9StPq+Wvm6vu+LWQB1hNqClWk0jQm5GnF6Kj0ac2gqgsMsutc3hhMaaX2QZvLX+gFQHC/ufGBdBbpPtDeGWsQItsMf/xqqlkLPkc7eVTyfsmrpQM7BG9LVvaPVXPVUcZfJNBaYuR4+Sf6Zi2ayI/hQIDAQAB";
// //拿到RAS公钥,对上面的随机数进行加密
// String keyResult = RSAUtil.encrypt("YCPQPx4qpQjEjDea",publicKey);
//
//>>>>>>> dev-sensitive-20191112
// EncryptEntity encryptTest = new EncryptEntity();
// encryptTest.setContent(contentResult);
// encryptTest.setKey(keyResult);
// System.out.println(JSONObject.toJSONString(encryptTest));
System.out.println("--------------------修改密码接口-------------");
BaseRequest changePwd = new BaseRequest();
......@@ -109,8 +122,8 @@ public class Test {
System.out.println("--------------------获取验证码接口-------------");
BaseRequest authCode = new BaseRequest();
authCode.setFlag(3);
authCode.setMobile("13024112092");
authCode.setFlag(1);
authCode.setMobile("13024112100");
String authCodeStr = JSONObject.toJSONString(authCode);
System.out.println(authCodeStr);
String contentResult2 = AESUtil.aesEncrypt(authCodeStr, "YCPQPx4qpQjEjDea");
......@@ -124,9 +137,9 @@ public class Test {
//获取注册参数
BaseRequest register = null;
register = new BaseRequest();
register.setMobile("13024112092");
register.setMobile("13024112100");
register.setPassword("D0DCBF0D12A6B1E7FBFA2CE5848F3EFF");
register.setAuthCode("843895");
register.setAuthCode("654003");
String registerString3 = JSONObject.toJSONString(register);
String contentResult3 = AESUtil.aesEncrypt(registerString3, "YCPQPx4qpQjEjDea");
String keyResult3 = RSAUtil.encrypt("YCPQPx4qpQjEjDea",publicKey);
......@@ -137,15 +150,22 @@ public class Test {
System.out.println("--------------------一键登录接口-------------");
BaseRequest loginRegister = null;
loginRegister = new BaseRequest();
loginRegister.setMobile("13024112081");
loginRegister.setAuthCode("163173");
String registerString4 = JSONObject.toJSONString(loginRegister);
//AES CONTENT
String contentResult4 = AESUtil.aesEncrypt(registerString4, "YCPQPx4qpQjEjDea");
//RSA KEY
String keyResult4 = RSAUtil.encrypt("YCPQPx4qpQjEjDea",publicKey);
EncryptEntity encryptTest4 = new EncryptEntity();
encryptTest4.setContent(contentResult4);
encryptTest4.setKey(keyResult4);
System.out.println(JSONObject.toJSONString(encryptTest4));
......
package com.pica.cloud.account.account.server.starter;
package com.pica.cloud.account.account.server.configuration;
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
import org.slf4j.Logger;
......@@ -8,13 +8,14 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Created on 2019/11/6 15:39
* Created on 2019/11/14 13:44
* author:crs
* Description:配置式job
* Description:JobExecutorConfiguration
*/
@Configuration
public class JobExecutorConfiguration {
private Logger logger = LoggerFactory.getLogger(JobExecutorConfiguration.class);
@Value("${xxl.job.admin.addresses}")
......@@ -52,7 +53,4 @@ public class JobExecutorConfiguration {
return xxlJobSpringExecutor;
}
}
package com.pica.cloud.account.account.server.configuration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;
@Configuration
@RefreshScope
//@RefreshScope
public class PropertiesConfiguration {
private Logger logger = LoggerFactory.getLogger(PropertiesConfiguration.class);
@Value("${pica.cloud.message.url}")
private String messageUrl;
......
......@@ -32,6 +32,10 @@ import java.util.*;
*/
public abstract class AccountBaseController extends BaseController {
private static final String KEY_PREFIX = "token-doctor-";
private Logger logger = LoggerFactory.getLogger(AccountBaseController.class);
@Autowired
......
......@@ -58,7 +58,7 @@ public class AccountController extends AccountBaseController {
@GetMapping("/test")
public String test() {
return "test";
return "{\"status\":\"UP\"}";
}
@ApiOperation("获取登录验证码")
......
......@@ -34,14 +34,14 @@ public class CaptchaController {
return PicaResponse.toResponse(captchaToken);
}
/*
@ApiOperation("校验图形验证码")
@GetMapping("/acknowledge")
public PicaResponse<Boolean> acknowledge(@ApiParam("token") @RequestParam("token") String token,
@ApiParam("answer") @RequestParam("answer") String answer) {
boolean valid = captchaService.acknowledge(token, answer);
public PicaResponse<Boolean> acknowledge(@ApiParam("captchaToken") @RequestParam("captchaToken") String captchaToken,
@ApiParam("captchaAnswer") @RequestParam("captchaAnswer") String captchaAnswer) {
boolean valid = captchaService.acknowledge(captchaToken, captchaAnswer);
return PicaResponse.toResponse(valid);
}
*/
}
......@@ -51,7 +51,6 @@ public class RegisterController extends AccountBaseController {
String flag = AccountTypeEnum.SYSCODE_TYPE_REGISTER.getCode() + "";
accountUtils.checkMobilePhoneAndAuthCode(mobile, flag, authCode);
accountUtils.checkPassword(request.getPassword());
LoginResult result = null;
request.setFlag(AccountTypeEnum.SYSCODE_TYPE_REGISTER.getCode());
request.setProductType(super.getProductType());
......
......@@ -81,6 +81,6 @@ public class LoginResult {
}
public void setDoctorId(String doctorId) {
this.doctorId = AESUtil.encryptV0(doctorId);
this.doctorId = doctorId;
}
}
package com.pica.cloud.account.account.server.entity;
import java.util.Date;
/**
* @author andong
* @create 2019/11/18
*/
public class PProtocolLog {
private Integer id;
private String userId;
private Integer protocolId;
private Short status;
private Integer type;
private Integer userType;
private Integer deleteFlag;
private Integer createdId;
private Date createdTime;
private Integer modifiedId;
private Date modifiedTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public Integer getProtocolId() {
return protocolId;
}
public void setProtocolId(Integer protocolId) {
this.protocolId = protocolId;
}
public Short getStatus() {
return status;
}
public void setStatus(Short status) {
this.status = status;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public Integer getUserType() {
return userType;
}
public void setUserType(Integer userType) {
this.userType = userType;
}
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Integer getCreatedId() {
return createdId;
}
public void setCreatedId(Integer createdId) {
this.createdId = createdId;
}
public Date getCreatedTime() {
return createdTime;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Integer getModifiedId() {
return modifiedId;
}
public void setModifiedId(Integer modifiedId) {
this.modifiedId = modifiedId;
}
public Date getModifiedTime() {
return modifiedTime;
}
public void setModifiedTime(Date modifiedTime) {
this.modifiedTime = modifiedTime;
}
}
package com.pica.cloud.account.account.server.entity;
import java.util.Date;
public class PUserRole {
private Integer id;
private Integer systemId;
private Integer userRoleId;
private Integer userId;
private Integer userType;
private String param1;
private String param2;
private String param3;
private String param4;
private String param5;
private Integer status;
private Integer deleteFlag;
private Integer creatId;
private Date creatTime;
private Integer modifyId;
private Date modifyTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getSystemId() {
return systemId;
}
public void setSystemId(Integer systemId) {
this.systemId = systemId;
}
public Integer getUserRoleId() {
return userRoleId;
}
public void setUserRoleId(Integer userRoleId) {
this.userRoleId = userRoleId;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public Integer getUserType() {
return userType;
}
public void setUserType(Integer userType) {
this.userType = userType;
}
public String getParam1() {
return param1;
}
public void setParam1(String param1) {
this.param1 = param1 == null ? null : param1.trim();
}
public String getParam2() {
return param2;
}
public void setParam2(String param2) {
this.param2 = param2 == null ? null : param2.trim();
}
public String getParam3() {
return param3;
}
public void setParam3(String param3) {
this.param3 = param3 == null ? null : param3.trim();
}
public String getParam4() {
return param4;
}
public void setParam4(String param4) {
this.param4 = param4 == null ? null : param4.trim();
}
public String getParam5() {
return param5;
}
public void setParam5(String param5) {
this.param5 = param5 == null ? null : param5.trim();
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Integer getCreatId() {
return creatId;
}
public void setCreatId(Integer creatId) {
this.creatId = creatId;
}
public Date getCreatTime() {
return creatTime;
}
public void setCreatTime(Date creatTime) {
this.creatTime = creatTime;
}
public Integer getModifyId() {
return modifyId;
}
public void setModifyId(Integer modifyId) {
this.modifyId = modifyId;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
}
\ No newline at end of file
......@@ -23,7 +23,8 @@ public class AccountRepeatDataJob extends IJobHandler {
@Override
public ReturnT<String> execute(String s) throws Exception {
accountInfoDetailMapper.processAccountRepeatData();
XxlJobLogger.log("刷新数据");
return null;
XxlJobLogger.log("AccountRepeatDataJob");
return SUCCESS;
}
}
......@@ -39,7 +39,7 @@ public class DoctorRepeatDataJob {
if (exist==null){
cacheClient.set(KEY,"1");
cacheClient.expire(KEY, 60 * 10);
logger.info("开始执行刷新doctor表中重复的记录");
logger.info("DoctorRepeatDataJob:开始执行刷新doctor表中重复的记录");
int row = doctorMapper.processDoctorRepeatData();
logger.info("此次数据刷新影响的行数:{}", row);
try {
......
......@@ -61,4 +61,5 @@ public interface AccountInfoDetailMapper {
void updateDeleteByPrimaryKey(Integer acctId);
void processAccountRepeatData();
}
......@@ -2,6 +2,7 @@ package com.pica.cloud.account.account.server.mapper;
import com.pica.cloud.account.account.server.entity.AgreementLogEntity;
import com.pica.cloud.account.account.server.entity.PProtocolLog;
public interface AgreementLogEntityMapper {
int deleteByPrimaryKey(Long id);
......@@ -15,4 +16,10 @@ public interface AgreementLogEntityMapper {
int updateByPrimaryKeySelective(AgreementLogEntity record);
int updateByPrimaryKey(AgreementLogEntity record);
Integer getLatestProtocolId(int type);
int insertProtocolLog(PProtocolLog record);
int updateSignNum(Integer id);
}
\ No newline at end of file
package com.pica.cloud.account.account.server.mapper;
import com.pica.cloud.account.account.server.entity.PUserRole;
public interface PUserRoleMapper {
int deleteByPrimaryKey(Integer id);
int insert(PUserRole record);
int insertSelective(PUserRole record);
PUserRole selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(PUserRole record);
int updateByPrimaryKey(PUserRole record);
}
\ No newline at end of file
package com.pica.cloud.account.account.server.queue;
import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
//import org.springframework.amqp.core.*;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
/**
......
package com.pica.cloud.account.account.server.queue;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
//import org.springframework.amqp.core.AmqpTemplate;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
/**
* Created on 2019/9/11 17:37
......
......@@ -8,6 +8,7 @@ import com.pica.cloud.account.account.server.service.AccountService;
import com.pica.cloud.foundation.encryption.common.constants.EncryptConstants;
import com.pica.cloud.foundation.encryption.util.EncryptUtils;
import com.pica.cloud.foundation.redis.ICacheClient;
import com.pica.cloud.foundation.utils.entity.PicaUser;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
......@@ -18,10 +19,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* @author andong
......@@ -124,6 +122,19 @@ public class AccountServiceImpl implements AccountService {
map.put("id", cacheClient.hget(key, "id"));
map.put("hospital_id", cacheClient.hget(key, "hospital_id"));
map.put("hospital", cacheClient.hget(key, "hospital"));
map.put("name", cacheClient.hget(key, "name"));
// Map<String, String> result = cacheClient.hgetall(key);
// Iterator<Map.Entry<String, String>> iterator = result.entrySet().iterator();
// while(iterator.hasNext()){
// Map.Entry<String, String> next = iterator.next();
// String key1 = next.getKey();
// String value = next.getValue();
// logger.info("更新用户缓存信息已完成数量:{}", key1 + "------>"+value);
// }
// PicaUser picaUser = cacheClient.getToken("F64279B337EA4AE3965853A7CCFDF5A3", PicaUser.class);
// logger.info("更新用户缓存信息已完成数量:", picaUser.toString());
return map;
}
......@@ -160,21 +171,57 @@ public class AccountServiceImpl implements AccountService {
}
}
//更新缓存中hospital_id,hospital信息
//成功返回0,失败返回1
private int refresh(Map<String, Object> doctorMap) {
String doctorId = doctorMap.get("id").toString();
/*
String hospitalId = doctorMap.get("hospital_id") == null ? StringUtils.EMPTY : doctorMap.get("hospital_id").toString();
String hospital = doctorMap.get("hospital") == null ? StringUtils.EMPTY : doctorMap.get("hospital").toString();
String mobile = doctorMap.get("mobile_phone") == null ? StringUtils.EMPTY : doctorMap.get("mobile_phone").toString();
String status = doctorMap.get("status") == null ? StringUtils.EMPTY : doctorMap.get("status").toString();
String avatar_image_url = doctorMap.get("avatar_image_url") == null ? StringUtils.EMPTY : doctorMap.get("avatar_image_url").toString();
String email = doctorMap.get("email") == null ? StringUtils.EMPTY : doctorMap.get("email").toString();
String province = doctorMap.get("province") == null ? StringUtils.EMPTY : doctorMap.get("province").toString();
String province_name = doctorMap.get("province") == null ? StringUtils.EMPTY : doctorMap.get("province_name").toString();
String city = doctorMap.get("city") == null ? StringUtils.EMPTY : doctorMap.get("city").toString();
String city_name = doctorMap.get("city_name") == null ? StringUtils.EMPTY : doctorMap.get("city_name").toString();
String county = doctorMap.get("county") == null ? StringUtils.EMPTY : doctorMap.get("county").toString();
String county_name = doctorMap.get("county_name") == null ? StringUtils.EMPTY : doctorMap.get("county_name").toString();
String town = doctorMap.get("town") == null ? StringUtils.EMPTY : doctorMap.get("town").toString();
String town_name = doctorMap.get("town_name") == null ? StringUtils.EMPTY : doctorMap.get("town_name").toString();
String title = doctorMap.get("title") == null ? StringUtils.EMPTY : doctorMap.get("title").toString();
String title_id = doctorMap.get("title_id") == null ? StringUtils.EMPTY : doctorMap.get("title_id").toString();
*/
String name = doctorMap.get("name") == null ? StringUtils.EMPTY : doctorMap.get("name").toString();
String key = KEY_PREFIX + doctorId;
try {
String cacheId = cacheClient.hget(key, "id");
if (StringUtils.isBlank(cacheId)) {
return 0; //未找到用户缓存数据,不做更新
}
cacheClient.hset(key, "hospital_id", StringUtils.isEmpty(hospitalId) ? "0" : hospitalId);
cacheClient.hset(key, "hospital", hospital);
/**
cacheClient.hset(key, "hospital_id", StringUtils.isEmpty(hospitalId) ? "0" : hospitalId);
cacheClient.hset(key, "hospital", hospital);
cacheClient.hset(key, "province_name", province_name);
cacheClient.hset(key, "city_name", city_name);
cacheClient.hset(key, "county_name", county_name);
cacheClient.hset(key, "town_name", town_name);
cacheClient.hset(key, "province_id", province);
cacheClient.hset(key, "city_id", city);
cacheClient.hset(key, "county_id", county);
cacheClient.hset(key, "town_id", town);
cacheClient.hset(key, "mobile", mobile);
cacheClient.hset(key, "status", status);
cacheClient.hset(key, "avatar_image_url", avatar_image_url);
cacheClient.hset(key, "email", email);
cacheClient.hset(key, "title_id", title_id);
cacheClient.hset(key, "title", title);
*/
cacheClient.hset(key, "name", name);
return 0;
} catch (Exception ex) {
return 1;
......
......@@ -22,8 +22,10 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.HashMap;
import java.util.concurrent.ExecutorService;
@Service
......@@ -33,6 +35,9 @@ public class RegisterServiceImpl implements RegisterService {
private Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private PUserRoleMapper pUserRoleMapper;
@Autowired
private AccountInfoDetailMapper accountInfoDetailMapper;
......@@ -72,6 +77,7 @@ public class RegisterServiceImpl implements RegisterService {
* @param baseRequest 参数模型
* @return
*/
@Transactional
@Override
public LoginResult register(BaseRequest baseRequest) {
String mobile = baseRequest.getMobile();
......@@ -126,6 +132,9 @@ public class RegisterServiceImpl implements RegisterService {
account.setFirstLoginTime(currentTime);
account.setLastLoginTime(currentTime);
account.setPassword(password);
if (!StringUtils.isBlank(password)){
account.setEntireFlag(3);
}
accountMapper.insertSelective(account);
}
Long userId = accountUtils.getUserIdByAcctId(productType, acctId);
......@@ -136,7 +145,6 @@ public class RegisterServiceImpl implements RegisterService {
account.setMobilePhone(mobile);
account.setRegisterSource(sourceType);
String newToken = tokenUtils.generateToken(account);
LoginResult result = new LoginResult();
result.setToken(newToken);
result.setUserId(userId);
......@@ -155,6 +163,7 @@ public class RegisterServiceImpl implements RegisterService {
AccountTypeEnum.LOG_TYPE_LOGIN.getCode());
picaLogUtils.info(entity);
processAgreement(userId);
processRoleMap(userId);
redisClient.del(REPEAT_REGISTER_PREFIX + mobile);
return result;
} catch (Exception e) {
......@@ -172,6 +181,35 @@ public class RegisterServiceImpl implements RegisterService {
}
}
/**
* 异步处理用户角色
* @param userId
*/
private void processRoleMap(Long userId) {
ExecutorServiceUtils.getExecutor().submit(new Runnable() {
@Override
public void run() {
Date date = new Date();
PUserRole pUserRole = new PUserRole();
pUserRole.setSystemId(5);
pUserRole.setUserRoleId(2);
pUserRole.setUserId(userId.intValue());
pUserRole.setUserType(1);
pUserRole.setStatus(2);
pUserRole.setDeleteFlag(1);
pUserRole.setCreatId(userId.intValue());
pUserRole.setCreatTime(date);
pUserRole.setModifyId(userId.intValue());
pUserRole.setModifyTime(date);
pUserRoleMapper.insertSelective(pUserRole);
pUserRole.setSystemId(1);
pUserRoleMapper.insertSelective(pUserRole);
pUserRole.setSystemId(3);
pUserRoleMapper.insertSelective(pUserRole);
}
});
}
/**
* 长海项目医生自动注册,并完善信息
*
......@@ -237,31 +275,50 @@ public class RegisterServiceImpl implements RegisterService {
private void processAgreement(Long userId) {
ExecutorService executor = ExecutorServiceUtils.getExecutor();
executor.submit(() -> {
//用户协议
Date currentTime = new Date();
Integer userVersion = agreementEntityMapper.selectByType(AccountAgreementEnum.USER_AGREEMENT.getCode());
AgreementLogEntity userAgreementLogEntity = new AgreementLogEntity();
userAgreementLogEntity.setAgreement_type(AccountAgreementEnum.USER_AGREEMENT.getCode());
userAgreementLogEntity.setDoctor_id(userId);
userAgreementLogEntity.setVersion(userVersion.toString());
userAgreementLogEntity.setCreated_id(userId);
userAgreementLogEntity.setCreated_time(currentTime);
userAgreementLogEntity.setModified_id(userId);
userAgreementLogEntity.setModified_time(currentTime);
userAgreementLogEntity.setDelete_flag(1);
agreementLogEntityMapper.insert(userAgreementLogEntity);
//隐私协议
Integer privateVersion = agreementEntityMapper.selectByType(AccountAgreementEnum.PRIVACY_AGREEMENT.getCode());
AgreementLogEntity privateAgreementLogEntity = new AgreementLogEntity();
privateAgreementLogEntity.setAgreement_type(AccountAgreementEnum.PRIVACY_AGREEMENT.getCode());
privateAgreementLogEntity.setDoctor_id(userId);
privateAgreementLogEntity.setVersion(privateVersion.toString());
privateAgreementLogEntity.setCreated_id(userId);
privateAgreementLogEntity.setCreated_time(currentTime);
privateAgreementLogEntity.setModified_id(userId);
privateAgreementLogEntity.setModified_time(currentTime);
privateAgreementLogEntity.setDelete_flag(1);
agreementLogEntityMapper.insert(privateAgreementLogEntity);
// //用户协议
// Date currentTime = new Date();
// Integer userVersion = agreementEntityMapper.selectByType(AccountAgreementEnum.USER_AGREEMENT.getCode());
// AgreementLogEntity userAgreementLogEntity = new AgreementLogEntity();
// userAgreementLogEntity.setAgreement_type(AccountAgreementEnum.USER_AGREEMENT.getCode());
// userAgreementLogEntity.setDoctor_id(userId);
// userAgreementLogEntity.setVersion(userVersion.toString());
// userAgreementLogEntity.setCreated_id(userId);
// userAgreementLogEntity.setCreated_time(currentTime);
// userAgreementLogEntity.setModified_id(userId);
// userAgreementLogEntity.setModified_time(currentTime);
// userAgreementLogEntity.setDelete_flag(1);
// agreementLogEntityMapper.insert(userAgreementLogEntity);
// //隐私协议
// Integer privateVersion = agreementEntityMapper.selectByType(AccountAgreementEnum.PRIVACY_AGREEMENT.getCode());
// AgreementLogEntity privateAgreementLogEntity = new AgreementLogEntity();
// privateAgreementLogEntity.setAgreement_type(AccountAgreementEnum.PRIVACY_AGREEMENT.getCode());
// privateAgreementLogEntity.setDoctor_id(userId);
// privateAgreementLogEntity.setVersion(privateVersion.toString());
// privateAgreementLogEntity.setCreated_id(userId);
// privateAgreementLogEntity.setCreated_time(currentTime);
// privateAgreementLogEntity.setModified_id(userId);
// privateAgreementLogEntity.setModified_time(currentTime);
// privateAgreementLogEntity.setDelete_flag(1);
// agreementLogEntityMapper.insert(privateAgreementLogEntity);
Integer protocolId = agreementLogEntityMapper.getLatestProtocolId(2); //获取最新用户协议ID
PProtocolLog log = new PProtocolLog();
log.setUserId(userId.toString());
log.setProtocolId(protocolId);
log.setUserType(2);
log.setType(2);
log.setStatus((short) 1);
log.setCreatedId(userId.intValue());
log.setModifiedId(userId.intValue());
agreementLogEntityMapper.insertProtocolLog(log);
agreementLogEntityMapper.updateSignNum(protocolId); //更新用户协议签署数量
protocolId = agreementLogEntityMapper.getLatestProtocolId(3); //获取最新隐私协议ID
log.setProtocolId(protocolId);
log.setType(3);
agreementLogEntityMapper.insertProtocolLog(log);
agreementLogEntityMapper.updateSignNum(protocolId); //更新隐私协议签署数量
});
}
}
......@@ -170,13 +170,14 @@ public class AESUtil {
System.out.println("-------------加密---------");
String content = "13024112588";
System.out.println("加密前:" + content);
System.out.println("加密密钥和解密密钥:" + KEY);
System.out.println("-------------解密---------");
String encrypt = aesEncrypt(content, KEY);
System.out.println("加密后:" + encrypt);
String decrypt = aesDecrypt(encrypt, KEY);
String decrypt = aesDecrypt("ieE4wN+GkIxm8S8tSVqTow==", KEY);
System.out.println("解密后:" + decrypt);
//请求参数解密处理
......
package com.pica.cloud.account.account.server.util;
import com.pica.cloud.account.account.server.entity.Account;
import com.pica.cloud.account.account.server.entity.Doctor;
import com.pica.cloud.account.account.server.mapper.DoctorMapper;
import com.pica.cloud.foundation.redis.ICacheClient;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
......@@ -27,6 +29,8 @@ public class TokenUtils {
@Qualifier("cacheMigrateClient")
private ICacheClient cacheClient;
@Autowired
private DoctorMapper doctorMapper;
/**
* 校验token的状态
......@@ -49,8 +53,14 @@ public class TokenUtils {
Integer registerSource = account.getRegisterSource();
String newToken = "";
try {
//用户id
//先清除旧token
String value = "token-doctor-" + account.getId().toString();
String sourceType = AccountUtils.getSourceType(registerSource);
String oldToken = cacheClient.get(value + "-"+sourceType);
if (StringUtils.isNotBlank(oldToken)) {
Long del = cacheClient.del(oldToken);
logger.info("num:---->"+del);
}
// 根据不同的产品线设置token有效期
int expiredSeconds = 24 * 60 * 60;
if (registerSource != 3 && registerSource != 5) {
......@@ -61,30 +71,52 @@ public class TokenUtils {
//存储token对应的用户id,数据结构如:(token-FF9FCB0D93A642328A01C279701B7607:token-doctor-1)
cacheClient.set(Key, value, expiredSeconds);
//存储不同终端对应的token,数据结构如:(token-doctor-12345678-app:token-FF9FCB0D93A642328A01C279701B7607)
String sourceType = AccountUtils.getSourceType(registerSource);
//String sourceType = AccountUtils.getSourceType(registerSource);
cacheClient.set(value + "-" + sourceType, Key, expiredSeconds);
//用户数据放入redis缓存
String userData = cacheClient.hget(value, "id");
if (org.apache.commons.lang3.StringUtils.isEmpty(userData)) {
Map<String, String> data = new HashMap<>();
data.put("token", newToken);
data.put("id", account.getId() + "");
data.put("acctId", account.getAcctId() + "");
data.put("mobile", account.getMobilePhone());
data.put("name", account.getMobilePhone().replaceAll("(\\d{3})\\d{4}(\\w{4})", "$1****$2"));
data.put("created_time", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(account.getCreatTime()));
data.put("sysCode", sourceType);
Iterator<Map.Entry<String, String>> iterator = data.entrySet().iterator();
while (iterator.hasNext()) {
Map.Entry<String, String> map = iterator.next();
String key = map.getKey();
String valueInfo = map.getValue();
//存储token:(token-doctor-1:用户数据)
cacheClient.hset(value, key, valueInfo);
}
Map<String, String> data = new HashMap<>();
data.put("token", newToken);
data.put("id", account.getId() + "");
data.put("acctId", account.getAcctId() + "");
if (!StringUtils.isBlank(account.getMobilePhone())) {
data.put("mobile", AESUtil.encryptV0(account.getMobilePhone()));
} else {
cacheClient.hset(value, "token", newToken);
data.put("mobile", "");
}
data.put("name", account.getMobilePhone().replaceAll("(\\d{3})\\d{4}(\\w{4})", "$1****$2"));
data.put("created_time", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(account.getCreatTime()));
data.put("sysCode", sourceType);
if (account.getId() != null) {
Doctor doctor = doctorMapper.selectByPrimaryKey(account.getId().intValue());
data.put("town_id", doctor.getTown() + "");
data.put("town_name", doctor.getTownName() + "");
data.put("county_id", doctor.getCounty() + "");
data.put("county_name", doctor.getCountyName() + "");
data.put("city_id", doctor.getCity() + "");
data.put("city_name", doctor.getCityName() + "");
data.put("province_id", doctor.getProvince() + "");
data.put("province_name", doctor.getProvinceName() + "");
data.put("hospital", doctor.getHospital() + "");
data.put("hospital_id", doctor.getHospitalId() + "");
data.put("department", doctor.getDepartment() + "");
data.put("department_id", doctor.getDepartmentId() + "");
data.put("title", doctor.getTitle() + "");
data.put("title_id", doctor.getTitleId() + "");
data.put("status", doctor.getStatus() + "");
if (!StringUtils.isBlank(doctor.getName())){
data.put("name", doctor.getName() + "");
}
}
Iterator<Map.Entry<String, String>> iterator = data.entrySet().iterator();
while (iterator.hasNext()) {
Map.Entry<String, String> map = iterator.next();
String key = map.getKey();
String valueInfo = map.getValue();
//存储token:(token-doctor-1:用户数据)
cacheClient.hset(value, key, valueInfo);
}
// } else {
// cacheClient.hset(value, "token", newToken);
// }
} catch (Exception ex) {
logger.error("生成token异常:{}" + ex.getMessage(), ex);
}
......
......@@ -69,3 +69,8 @@ xxl.job.executor.logpath=/opt/xxl-job-logs/jobhandler
### xxl-job log retention days
xxl.job.executor.logretentiondays=-1
pica.cloud.message.url=https://dev-sc.yunqueyi.com/message
......@@ -66,3 +66,5 @@ xxl.job.executor.logpath=/opt/xxl-job-logs/jobhandler
xxl.job.executor.logretentiondays=-1
pica.cloud.message.url=https://sc.yunqueyi.com/message
......@@ -51,10 +51,17 @@ spring.rabbitmq.username=appuser
spring.rabbitmq.password=AqLfvyWOvLQEUzdI
spring.rabbitmq.virtual-host=account-register-vhost
<<<<<<< HEAD
# Job config begin
# 控制器地址:服务启动自动注册到控制器中
xxl.job.admin.addresses=http://192.168.110.133:7899/job
=======
# Job config begin
# 控制器地址:服务启动自动注册到控制器中
xxl.job.admin.addresses=http://192.168.110.133:7899/job
>>>>>>> dev-sensitive-20191112
#执行器命名规则job-exec-<申请Port>
xxl.job.executor.appname=job-exec-7906
xxl.job.executor.ip=
......@@ -67,3 +74,7 @@ xxl.job.accessToken=
xxl.job.executor.logpath=/opt/xxl-job-logs/jobhandler
### xxl-job log retention days
xxl.job.executor.logretentiondays=-1
pica.cloud.message.url=https://test1-sc.yunqueyi.com/message
......@@ -67,3 +67,7 @@ xxl.job.accessToken=
xxl.job.executor.logpath=/opt/xxl-job-logs/jobhandler
### xxl-job log retention days
xxl.job.executor.logretentiondays=-1
pica.cloud.message.url=https://uat-sc.yunqueyi.com/message
......@@ -67,6 +67,12 @@
update account_info set modified_id=#{id}, modified_time=#{modifiedTime},mobile_phone=#{mobilePhone} where id=#{id} and delete_flag=1
</update>
<!--<update id="processAccountRepeatData">-->
<!--update account_info set delete_flag=2, modified_id=101432928, modified_time=now() where id in (select id from (select pd.id from account_info pd-->
<!--inner JOIN (SELECT mobile_phone,MIN(id) as id FROM account_info WHERE delete_flag=1 and mobile_phone is not null GROUP BY mobile_phone having count(*)>1) inn-->
<!--on pd.id != inn.id and pd.mobile_phone = inn.mobile_phone) ttt);-->
<!--</update>-->
<!--修改用户的密码-->
<update id="updatePasswordByPrimaryKey"
parameterType="com.pica.cloud.account.account.server.entity.AccountInfoEntity">
......
......@@ -308,7 +308,10 @@
</select>
<select id="getHospitalInfoByPage" resultType="map">
select id, hospital_id, hospital
select id, hospital_id, hospital,mobile_phone,name,
status, avatar_image_url, email,
province, province_name,city, city_name, county, county_name,town, town_name,
title,title_id
from p_doctor
where delete_flag = 1
<if test="id != null">
......
......@@ -140,4 +140,72 @@
modified_time = #{modified_time,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="getLatestProtocolId" resultType="java.lang.Integer" parameterType="java.lang.Integer">
select id
from p_protocol
where type = #{type} and delete_flag = 1
order by id desc
limit 1
</select>
<insert id="insertProtocolLog" parameterType="com.pica.cloud.account.account.server.entity.PProtocolLog" >
insert into p_protocol_log
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="userId != null" >
user_id,
</if>
<if test="protocolId != null" >
protocol_id,
</if>
<if test="status != null" >
status,
</if>
<if test="type != null" >
type,
</if>
<if test="userType != null" >
user_type,
</if>
delete_flag,
<if test="createdId != null" >
created_id,
</if>
created_time,
<if test="modifiedId != null" >
modified_id,
</if>
modified_time,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="userId != null" >
#{userId,jdbcType=VARCHAR},
</if>
<if test="protocolId != null" >
#{protocolId,jdbcType=INTEGER},
</if>
<if test="status != null" >
#{status,jdbcType=SMALLINT},
</if>
<if test="type != null" >
#{type,jdbcType=INTEGER},
</if>
<if test="userType != null" >
#{userType,jdbcType=INTEGER},
</if>
1,
<if test="createdId != null" >
#{createdId,jdbcType=INTEGER},
</if>
now(),
<if test="modifiedId != null" >
#{modifiedId,jdbcType=INTEGER},
</if>
now()
</trim>
</insert>
<update id="updateSignNum" parameterType="java.lang.Integer">
update p_protocol set sign_num = sign_num + 1 where id = #{id}
</update>
</mapper>
\ No newline at end of file
......@@ -84,12 +84,14 @@
<!--刷新重复的记录-->
<update id="processDoctorRepeatData">
update p_doctor set delete_flag=2, modify_id=101432928, modify_time=now() where id in (select id from (select pd.id from p_doctor pd
inner JOIN (SELECT mobile_phone,MIN(id) as id FROM p_doctor WHERE delete_flag=1 and mobile_phone is not null GROUP BY mobile_phone having count(*)>1) inn
on pd.id != inn.id and pd.mobile_phone = inn.mobile_phone) ttt);
update p_doctor set delete_flag=2, modify_id=101432928, modify_time=now() where id in (select id from (select pd.id from p_doctor pd
inner JOIN (SELECT mobile_phone,MIN(id) as id FROM p_doctor WHERE delete_flag=1 and mobile_phone is not null GROUP BY mobile_phone having count(*)>1) inn
on pd.id != inn.id and pd.mobile_phone = inn.mobile_phone) ttt);
</update>
<!--通过手机号查询用户id-->
<select id="selectDoctorIdByMobile" parameterType="java.lang.String" resultType="java.lang.Long">
SELECT id
......
<?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" >
<mapper namespace="com.pica.cloud.account.account.server.mapper.PUserRoleMapper" >
<resultMap id="BaseResultMap" type="com.pica.cloud.account.account.server.entity.PUserRole" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="system_id" property="systemId" jdbcType="INTEGER" />
<result column="user_role_id" property="userRoleId" jdbcType="INTEGER" />
<result column="user_id" property="userId" jdbcType="INTEGER" />
<result column="user_type" property="userType" jdbcType="INTEGER" />
<result column="param_1" property="param1" jdbcType="VARCHAR" />
<result column="param_2" property="param2" jdbcType="VARCHAR" />
<result column="param_3" property="param3" jdbcType="VARCHAR" />
<result column="param_4" property="param4" jdbcType="VARCHAR" />
<result column="param_5" property="param5" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="delete_flag" property="deleteFlag" jdbcType="INTEGER" />
<result column="creat_id" property="creatId" jdbcType="INTEGER" />
<result column="creat_time" property="creatTime" jdbcType="TIMESTAMP" />
<result column="modify_id" property="modifyId" jdbcType="INTEGER" />
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, system_id, user_role_id, user_id, user_type, param_1, param_2, param_3, param_4,
param_5, status, delete_flag, creat_id, creat_time, modify_id, modify_time
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from p_user_role_mapping
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from p_user_role_mapping
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.pica.cloud.account.account.server.entity.PUserRole" >
insert into p_user_role_mapping (id, system_id, user_role_id,
user_id, user_type, param_1,
param_2, param_3, param_4,
param_5, status, delete_flag,
creat_id, creat_time, modify_id,
modify_time)
values (#{id,jdbcType=INTEGER}, #{systemId,jdbcType=INTEGER}, #{userRoleId,jdbcType=INTEGER},
#{userId,jdbcType=INTEGER}, #{userType,jdbcType=INTEGER}, #{param1,jdbcType=VARCHAR},
#{param2,jdbcType=VARCHAR}, #{param3,jdbcType=VARCHAR}, #{param4,jdbcType=VARCHAR},
#{param5,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
#{creatId,jdbcType=INTEGER}, #{creatTime,jdbcType=TIMESTAMP}, #{modifyId,jdbcType=INTEGER},
#{modifyTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.pica.cloud.account.account.server.entity.PUserRole" >
insert into p_user_role_mapping
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="systemId != null" >
system_id,
</if>
<if test="userRoleId != null" >
user_role_id,
</if>
<if test="userId != null" >
user_id,
</if>
<if test="userType != null" >
user_type,
</if>
<if test="param1 != null" >
param_1,
</if>
<if test="param2 != null" >
param_2,
</if>
<if test="param3 != null" >
param_3,
</if>
<if test="param4 != null" >
param_4,
</if>
<if test="param5 != null" >
param_5,
</if>
<if test="status != null" >
status,
</if>
<if test="deleteFlag != null" >
delete_flag,
</if>
<if test="creatId != null" >
creat_id,
</if>
<if test="creatTime != null" >
creat_time,
</if>
<if test="modifyId != null" >
modify_id,
</if>
<if test="modifyTime != null" >
modify_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="systemId != null" >
#{systemId,jdbcType=INTEGER},
</if>
<if test="userRoleId != null" >
#{userRoleId,jdbcType=INTEGER},
</if>
<if test="userId != null" >
#{userId,jdbcType=INTEGER},
</if>
<if test="userType != null" >
#{userType,jdbcType=INTEGER},
</if>
<if test="param1 != null" >
#{param1,jdbcType=VARCHAR},
</if>
<if test="param2 != null" >
#{param2,jdbcType=VARCHAR},
</if>
<if test="param3 != null" >
#{param3,jdbcType=VARCHAR},
</if>
<if test="param4 != null" >
#{param4,jdbcType=VARCHAR},
</if>
<if test="param5 != null" >
#{param5,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=INTEGER},
</if>
<if test="deleteFlag != null" >
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="creatId != null" >
#{creatId,jdbcType=INTEGER},
</if>
<if test="creatTime != null" >
#{creatTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyId != null" >
#{modifyId,jdbcType=INTEGER},
</if>
<if test="modifyTime != null" >
#{modifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.pica.cloud.account.account.server.entity.PUserRole" >
update p_user_role_mapping
<set >
<if test="systemId != null" >
system_id = #{systemId,jdbcType=INTEGER},
</if>
<if test="userRoleId != null" >
user_role_id = #{userRoleId,jdbcType=INTEGER},
</if>
<if test="userId != null" >
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="userType != null" >
user_type = #{userType,jdbcType=INTEGER},
</if>
<if test="param1 != null" >
param_1 = #{param1,jdbcType=VARCHAR},
</if>
<if test="param2 != null" >
param_2 = #{param2,jdbcType=VARCHAR},
</if>
<if test="param3 != null" >
param_3 = #{param3,jdbcType=VARCHAR},
</if>
<if test="param4 != null" >
param_4 = #{param4,jdbcType=VARCHAR},
</if>
<if test="param5 != null" >
param_5 = #{param5,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=INTEGER},
</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>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.pica.cloud.account.account.server.entity.PUserRole" >
update p_user_role_mapping
set system_id = #{systemId,jdbcType=INTEGER},
user_role_id = #{userRoleId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER},
user_type = #{userType,jdbcType=INTEGER},
param_1 = #{param1,jdbcType=VARCHAR},
param_2 = #{param2,jdbcType=VARCHAR},
param_3 = #{param3,jdbcType=VARCHAR},
param_4 = #{param4,jdbcType=VARCHAR},
param_5 = #{param5,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
creat_id = #{creatId,jdbcType=INTEGER},
creat_time = #{creatTime,jdbcType=TIMESTAMP},
modify_id = #{modifyId,jdbcType=INTEGER},
modify_time = #{modifyTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册