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

20191126 旧的协议内容

上级 a5a621ed
流水线 #17759 已失败 于阶段
in 0 second
......@@ -274,50 +274,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); //更新隐私协议签署数量
// 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); //更新隐私协议签署数量
});
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册