Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-cloud-account
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.account
pica-cloud-account
提交
65b0d24a
提交
65b0d24a
编写于
1月 06, 2020
作者:
rushui.chen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
20200106 代码重构禁止跨表查询
上级
5c56ec32
流水线
#20185
已失败 于阶段
in 0 second
变更
9
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
689 行增加
和
668 行删除
+689
-668
pom.xml
server/pom.xml
+6
-0
AgreementLogEntity.java
...oud/account/account/server/entity/AgreementLogEntity.java
+95
-95
PProtocolLog.java
...ica/cloud/account/account/server/entity/PProtocolLog.java
+120
-120
PermissionRoleLogHandler.java
.../account/account/server/job/PermissionRoleLogHandler.java
+15
-15
AgreementEntityMapper.java
.../account/account/server/mapper/AgreementEntityMapper.java
+24
-24
AgreementLogEntityMapper.java
...count/account/server/mapper/AgreementLogEntityMapper.java
+25
-25
RegisterServiceImpl.java
...ount/account/server/service/impl/RegisterServiceImpl.java
+30
-15
AgreementEntityMapper.xml
server/src/main/resources/mybatis/AgreementEntityMapper.xml
+168
-168
AgreementLogEntityMapper.xml
...r/src/main/resources/mybatis/AgreementLogEntityMapper.xml
+206
-206
未找到文件。
server/pom.xml
浏览文件 @
65b0d24a
...
...
@@ -120,6 +120,12 @@
<version>
1.0.1
</version>
</dependency>
<dependency>
<groupId>
com.pica.cloud.patient
</groupId>
<artifactId>
pica-cloud-smartcontract-client
</artifactId>
<version>
1.0.9
</version>
</dependency>
<dependency>
<groupId>
com.pica.cloud.permission
</groupId>
<artifactId>
pica-cloud-permission-client
</artifactId>
...
...
server/src/main/java/com/pica/cloud/account/account/server/entity/AgreementLogEntity.java
浏览文件 @
65b0d24a
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
entity
;
import
java.util.Date
;
public
class
AgreementLogEntity
{
private
Long
id
;
private
Long
doctor_id
;
private
Integer
agreement_type
;
private
String
version
;
private
Integer
delete_flag
;
private
Long
created_id
;
private
Date
created_time
;
private
Long
modified_id
;
private
Date
modified_time
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getDoctor_id
()
{
return
doctor_id
;
}
public
void
setDoctor_id
(
Long
doctor_id
)
{
this
.
doctor_id
=
doctor_id
;
}
public
Integer
getAgreement_type
()
{
return
agreement_type
;
}
public
void
setAgreement_type
(
Integer
agreement_type
)
{
this
.
agreement_type
=
agreement_type
;
}
public
String
getVersion
()
{
return
version
;
}
public
void
setVersion
(
String
version
)
{
this
.
version
=
version
==
null
?
null
:
version
.
trim
();
}
public
Integer
getDelete_flag
()
{
return
delete_flag
;
}
public
void
setDelete_flag
(
Integer
delete_flag
)
{
this
.
delete_flag
=
delete_flag
;
}
public
Long
getCreated_id
()
{
return
created_id
;
}
public
void
setCreated_id
(
Long
created_id
)
{
this
.
created_id
=
created_id
;
}
public
Date
getCreated_time
()
{
return
created_time
;
}
public
void
setCreated_time
(
Date
created_time
)
{
this
.
created_time
=
created_time
;
}
public
Long
getModified_id
()
{
return
modified_id
;
}
public
void
setModified_id
(
Long
modified_id
)
{
this
.
modified_id
=
modified_id
;
}
public
Date
getModified_time
()
{
return
modified_time
;
}
public
void
setModified_time
(
Date
modified_time
)
{
this
.
modified_time
=
modified_time
;
}
}
\ No newline at end of file
//package com.pica.cloud.account.account.server.entity;
//
//import java.util.Date;
//
//public class AgreementLogEntity {
// private Long id;
//
// private Long doctor_id;
//
// private Integer agreement_type;
//
// private String version;
//
// private Integer delete_flag;
//
// private Long created_id;
//
// private Date created_time;
//
// private Long modified_id;
//
// private Date modified_time;
//
// public Long getId() {
// return id;
// }
//
// public void setId(Long id) {
// this.id = id;
// }
//
// public Long getDoctor_id() {
// return doctor_id;
// }
//
// public void setDoctor_id(Long doctor_id) {
// this.doctor_id = doctor_id;
// }
//
// public Integer getAgreement_type() {
// return agreement_type;
// }
//
// public void setAgreement_type(Integer agreement_type) {
// this.agreement_type = agreement_type;
// }
//
// public String getVersion() {
// return version;
// }
//
// public void setVersion(String version) {
// this.version = version == null ? null : version.trim();
// }
//
// public Integer getDelete_flag() {
// return delete_flag;
// }
//
// public void setDelete_flag(Integer delete_flag) {
// this.delete_flag = delete_flag;
// }
//
// public Long getCreated_id() {
// return created_id;
// }
//
// public void setCreated_id(Long created_id) {
// this.created_id = created_id;
// }
//
// public Date getCreated_time() {
// return created_time;
// }
//
// public void setCreated_time(Date created_time) {
// this.created_time = created_time;
// }
//
// public Long getModified_id() {
// return modified_id;
// }
//
// public void setModified_id(Long modified_id) {
// this.modified_id = modified_id;
// }
//
// public Date getModified_time() {
// return modified_time;
// }
//
// public void setModified_time(Date modified_time) {
// this.modified_time = modified_time;
// }
//}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/entity/PProtocolLog.java
浏览文件 @
65b0d24a
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;
//
/
//
**
//
* @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;
//
}
//
}
server/src/main/java/com/pica/cloud/account/account/server/job/PermissionRoleLogHandler.java
浏览文件 @
65b0d24a
...
...
@@ -13,18 +13,18 @@ import org.springframework.stereotype.Component;
* author:crs
* Description:记录doctor修改记录日志
*/
@JobHandler
(
value
=
"PermissionRoleLogHandler"
)
@Component
public
class
PermissionRoleLogHandler
extends
IJobHandler
{
@Autowired
private
PermissionDoctorRoleMapper
permissionDoctorRoleMapper
;
@Override
public
ReturnT
<
String
>
execute
(
String
s
)
throws
Exception
{
XxlJobLogger
.
log
(
"permissionRoleLogRecord start-----"
);
Integer
rows
=
permissionDoctorRoleMapper
.
updatePermissionModifyRecord
();
XxlJobLogger
.
log
(
"permissionLogRecord end-----"
+
rows
);
return
SUCCESS
;
}
}
//
@JobHandler(value = "PermissionRoleLogHandler")
//
@Component
//
public class PermissionRoleLogHandler extends IJobHandler {
//
//
@Autowired
//
private PermissionDoctorRoleMapper permissionDoctorRoleMapper;
//
//
@Override
//
public ReturnT<String> execute(String s) throws Exception {
//
XxlJobLogger.log("permissionRoleLogRecord start-----");
//
Integer rows = permissionDoctorRoleMapper.updatePermissionModifyRecord();
//
XxlJobLogger.log("permissionLogRecord end-----"+rows);
//
return SUCCESS;
//
}
//
}
server/src/main/java/com/pica/cloud/account/account/server/mapper/AgreementEntityMapper.java
浏览文件 @
65b0d24a
...
...
@@ -3,27 +3,27 @@ package com.pica.cloud.account.account.server.mapper;
import
com.pica.cloud.account.account.server.entity.AgreementEntity
;
public
interface
AgreementEntityMapper
{
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
AgreementEntity
record
);
int
insertSelective
(
AgreementEntity
record
);
AgreementEntity
selectByPrimaryKey
(
Long
id
);
/**
* 根据协议类型查询协议
*
* @param agreementType
* @return
*/
Integer
selectByType
(
int
agreementType
);
int
updateByPrimaryKeySelective
(
AgreementEntity
record
);
int
updateByPrimaryKeyWithBLOBs
(
AgreementEntity
record
);
int
updateByPrimaryKey
(
AgreementEntity
record
);
}
\ No newline at end of file
//public interface AgreementEntityMapper {
// int deleteByPrimaryKey(Long id);
//
// int insert(AgreementEntity record);
//
// int insertSelective(AgreementEntity record);
//
// AgreementEntity selectByPrimaryKey(Long id);
//
// /**
// * 根据协议类型查询协议
// *
// * @param agreementType
// * @return
// */
// Integer selectByType(int agreementType);
//
//
// int updateByPrimaryKeySelective(AgreementEntity record);
//
// int updateByPrimaryKeyWithBLOBs(AgreementEntity record);
//
// int updateByPrimaryKey(AgreementEntity record);
//}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/mapper/AgreementLogEntityMapper.java
浏览文件 @
65b0d24a
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
);
int
insert
(
AgreementLogEntity
record
);
int
insertSelective
(
AgreementLogEntity
record
);
AgreementLogEntity
selectByPrimaryKey
(
Long
id
);
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.AgreementLogEntity;
//import com.pica.cloud.account.account.server.entity.PProtocolLog;
//
//public interface AgreementLogEntityMapper {
// int deleteByPrimaryKey(Long id);
//
// int insert(AgreementLogEntity record);
//
// int insertSelective(AgreementLogEntity record);
//
// AgreementLogEntity selectByPrimaryKey(Long id);
//
// 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
server/src/main/java/com/pica/cloud/account/account/server/service/impl/RegisterServiceImpl.java
浏览文件 @
65b0d24a
...
...
@@ -7,7 +7,10 @@ import com.pica.cloud.account.account.server.enums.AccountTypeEnum;
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.AccountLogUtils
;
import
com.pica.cloud.account.account.server.mapper.*
;
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.AccountPatientInfoMapper
;
import
com.pica.cloud.account.account.server.mapper.AgreementLogEntityMapper
;
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.util.AESUtil
;
...
...
@@ -16,14 +19,16 @@ import com.pica.cloud.account.account.server.util.ExecutorServiceUtils;
import
com.pica.cloud.account.account.server.util.TokenUtils
;
import
com.pica.cloud.foundation.encryption.common.constants.EncryptConstants
;
import
com.pica.cloud.foundation.encryption.util.EncryptUtils
;
import
com.pica.cloud.foundation.entity.PicaResponse
;
import
com.pica.cloud.foundation.redis.ICacheClient
;
import
com.pica.cloud.patient.smartcontract.client.AgreementLogClient
;
import
com.pica.cloud.patient.smartcontract.common.dto.PProtocolLog
;
import
com.pica.cloud.permission.permission.client.UseRoleClient
;
import
com.pica.cloud.permission.permission.entity.PUserRole
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
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
;
...
...
@@ -61,11 +66,14 @@ public class RegisterServiceImpl implements RegisterService {
// @Autowired
// private QueueProducer queueProducer;
@Autowired
private
AgreementEntityMapper
agreementEntityMapper
;
// @Autowired
// private AgreementEntityMapper agreementEntityMapper;
// @Autowired
// private AgreementLogEntityMapper agreementLogEntityMapper;
@Autowired
private
AgreementLog
EntityMapper
agreementLogEntityMapper
;
private
AgreementLog
Client
agreementLogClient
;
@Autowired
...
...
@@ -135,7 +143,7 @@ public class RegisterServiceImpl implements RegisterService {
account
.
setLastLoginTime
(
currentTime
);
account
.
setRegisterSource
(
sourceType
);
account
.
setPassword
(
password
);
if
(!
StringUtils
.
isBlank
(
password
)){
if
(!
StringUtils
.
isBlank
(
password
))
{
account
.
setEntireFlag
(
3
);
}
accountMapper
.
insertSelective
(
account
);
...
...
@@ -152,7 +160,7 @@ public class RegisterServiceImpl implements RegisterService {
result
.
setToken
(
newToken
);
result
.
setUserId
(
userId
);
result
.
setEntireFlag
(
1
);
result
.
setDoctorId
(
EncryptUtils
.
encryptContent
(
userId
+
""
,
EncryptConstants
.
ENCRYPT_TYPE_ID
));
result
.
setDoctorId
(
EncryptUtils
.
encryptContent
(
userId
+
""
,
EncryptConstants
.
ENCRYPT_TYPE_ID
));
result
.
setMobile
(
mobile
);
/* ByteArrayOutputStream bos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(bos);
...
...
@@ -181,12 +189,13 @@ public class RegisterServiceImpl implements RegisterService {
throw
new
AccountException
(
AccountExceptionEnum
.
PICA_ALREADY_REGISTER
);
}
}
else
{
throw
new
AccountException
(
AccountExceptionEnum
.
PICA_ALREADY_REGISTER
);
throw
new
AccountException
(
AccountExceptionEnum
.
PICA_ALREADY_REGISTER
);
}
}
/**
* 异步处理用户角色
*
* @param userId
*/
private
void
processRoleMap
(
Long
userId
)
{
...
...
@@ -306,8 +315,11 @@ public class RegisterServiceImpl implements RegisterService {
// privateAgreementLogEntity.setDelete_flag(1);
// agreementLogEntityMapper.insert(privateAgreementLogEntity);
Integer
protocolId
=
agreementLogEntityMapper
.
getLatestProtocolId
(
2
);
//获取最新用户协议ID
Integer
protocolId
=
0
;
PicaResponse
picaResponse
=
agreementLogClient
.
getLatestProtocolId
(
2
);
//获取最新用户协议ID
if
(
picaResponse
!=
null
)
{
protocolId
=
(
Integer
)
picaResponse
.
getData
();
}
PProtocolLog
log
=
new
PProtocolLog
();
log
.
setUserId
(
userId
.
toString
());
log
.
setProtocolId
(
protocolId
);
...
...
@@ -316,14 +328,17 @@ public class RegisterServiceImpl implements RegisterService {
log
.
setStatus
((
short
)
1
);
log
.
setCreatedId
(
userId
.
intValue
());
log
.
setModifiedId
(
userId
.
intValue
());
agreementLog
EntityMapper
.
insertProtocolLog
(
log
);
agreementLog
EntityMapper
.
updateSignNum
(
protocolId
);
//更新用户协议签署数量
agreementLog
Client
.
insertProtocolLog
(
log
);
agreementLog
Client
.
updateSignNum
(
protocolId
);
//更新用户协议签署数量
protocolId
=
agreementLogEntityMapper
.
getLatestProtocolId
(
3
);
//获取最新隐私协议ID
PicaResponse
picaResponseType
=
agreementLogClient
.
getLatestProtocolId
(
3
);
//获取最新隐私协议ID
if
(
picaResponseType
!=
null
)
{
protocolId
=
(
Integer
)
picaResponseType
.
getData
();
}
log
.
setProtocolId
(
protocolId
);
log
.
setType
(
3
);
agreementLog
EntityMapper
.
insertProtocolLog
(
log
);
agreementLog
EntityMapper
.
updateSignNum
(
protocolId
);
//更新隐私协议签署数量
agreementLog
Client
.
insertProtocolLog
(
log
);
agreementLog
Client
.
updateSignNum
(
protocolId
);
//更新隐私协议签署数量
});
}
}
server/src/main/resources/mybatis/AgreementEntityMapper.xml
浏览文件 @
65b0d24a
<
?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.AgreementEntityMapper"
>
<
resultMap
id=
"BaseResultMap"
type=
"com.pica.cloud.account.account.server.entity.AgreementEntity"
>
<
id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/
>
<
result
column=
"agreement_type"
property=
"agreement_type"
jdbcType=
"INTEGER"
/
>
<
result
column=
"version"
property=
"version"
jdbcType=
"VARCHAR"
/
>
<
result
column=
"delete_flag"
property=
"delete_flag"
jdbcType=
"INTEGER"
/
>
<
result
column=
"created_id"
property=
"created_id"
jdbcType=
"BIGINT"
/
>
<
result
column=
"created_time"
property=
"created_time"
jdbcType=
"TIMESTAMP"
/
>
<
result
column=
"modified_id"
property=
"modified_id"
jdbcType=
"BIGINT"
/
>
<
result
column=
"modified_time"
property=
"modified_time"
jdbcType=
"TIMESTAMP"
/
>
<
/resultMap
>
<
resultMap
id=
"ResultMapWithBLOBs"
type=
"com.pica.cloud.account.account.server.entity.AgreementEntity"
extends=
"BaseResultMap"
>
<
result
column=
"agreement_content"
property=
"agreement_content"
jdbcType=
"LONGVARCHAR"
/
>
<
/resultMap
>
<
sql
id=
"Base_Column_List"
>
id, agreement_type, version, delete_flag, created_id, created_time, modified_id,
modified_time
<
/sql
>
<
!--<?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.AgreementEntityMapper">--
>
<
!--<resultMap id="BaseResultMap" type="com.pica.cloud.account.account.server.entity.AgreementEntity">--
>
<
!--<id column="id" property="id" jdbcType="BIGINT"/>--
>
<
!--<result column="agreement_type" property="agreement_type" jdbcType="INTEGER"/>--
>
<
!--<result column="version" property="version" jdbcType="VARCHAR"/>--
>
<
!--<result column="delete_flag" property="delete_flag" jdbcType="INTEGER"/>--
>
<
!--<result column="created_id" property="created_id" jdbcType="BIGINT"/>--
>
<
!--<result column="created_time" property="created_time" jdbcType="TIMESTAMP"/>--
>
<
!--<result column="modified_id" property="modified_id" jdbcType="BIGINT"/>--
>
<
!--<result column="modified_time" property="modified_time" jdbcType="TIMESTAMP"/>--
>
<
!--</resultMap>--
>
<
!--<resultMap id="ResultMapWithBLOBs" type="com.pica.cloud.account.account.server.entity.AgreementEntity"-->
<!--extends="BaseResultMap">--
>
<
!--<result column="agreement_content" property="agreement_content" jdbcType="LONGVARCHAR"/>--
>
<
!--</resultMap>--
>
<
!--<sql id="Base_Column_List">--
>
<!--id, agreement_type, version, delete_flag, created_id, created_time, modified_id, -->
<!--modified_time-->
<
!--</sql>--
>
<
sql
id=
"Blob_Column_List"
>
agreement_content
<
/sql
>
<
!--<sql id="Blob_Column_List">--
>
<!--agreement_content-->
<
!--</sql>--
>
<!--
通过类型获取用户同意的协议的版本
-->
<
select
id=
"selectByType"
parameterType=
"Integer"
resultType=
"Integer"
>
select version from doctor_agreement
where agreement_type = #{agreementType}
<
/select
>
<!--
<!–通过类型获取用户同意的协议的版本–>
-->
<
!--<select id="selectByType" parameterType="Integer" resultType="Integer">--
>
<!--select version from doctor_agreement-->
<!--where agreement_type = #{agreementType}-->
<
!--</select>--
>
<select
id=
"selectByPrimaryKey"
resultMap=
"ResultMapWithBLOBs"
parameterType=
"java.lang.Long"
>
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from doctor_agreement
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from doctor_agreement
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
parameterType=
"com.pica.cloud.account.account.server.entity.AgreementEntity"
>
insert into doctor_agreement (id, agreement_type, version,
delete_flag, created_id, created_time,
modified_id, modified_time, agreement_content
)
values (#{id,jdbcType=BIGINT}, #{agreement_type,jdbcType=INTEGER}, #{version,jdbcType=VARCHAR},
#{delete_flag,jdbcType=INTEGER}, #{created_id,jdbcType=BIGINT}, #{created_time,jdbcType=TIMESTAMP},
#{modified_id,jdbcType=BIGINT}, #{modified_time,jdbcType=TIMESTAMP}, #{agreement_content,jdbcType=LONGVARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.pica.cloud.account.account.server.entity.AgreementEntity"
>
insert into doctor_agreement
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"agreement_type != null"
>
agreement_type,
</if>
<if
test=
"version != null"
>
version,
</if>
<if
test=
"delete_flag != null"
>
delete_flag,
</if>
<if
test=
"created_id != null"
>
created_id,
</if>
<if
test=
"created_time != null"
>
created_time,
</if>
<if
test=
"modified_id != null"
>
modified_id,
</if>
<if
test=
"modified_time != null"
>
modified_time,
</if>
<if
test=
"agreement_content != null"
>
agreement_content,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"agreement_type != null"
>
#{agreement_type,jdbcType=INTEGER},
</if>
<if
test=
"version != null"
>
#{version,jdbcType=VARCHAR},
</if>
<if
test=
"delete_flag != null"
>
#{delete_flag,jdbcType=INTEGER},
</if>
<if
test=
"created_id != null"
>
#{created_id,jdbcType=BIGINT},
</if>
<if
test=
"created_time != null"
>
#{created_time,jdbcType=TIMESTAMP},
</if>
<if
test=
"modified_id != null"
>
#{modified_id,jdbcType=BIGINT},
</if>
<if
test=
"modified_time != null"
>
#{modified_time,jdbcType=TIMESTAMP},
</if>
<if
test=
"agreement_content != null"
>
#{agreement_content,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.pica.cloud.account.account.server.entity.AgreementEntity"
>
update doctor_agreement
<set>
<if
test=
"agreement_type != null"
>
agreement_type = #{agreement_type,jdbcType=INTEGER},
</if>
<if
test=
"version != null"
>
version = #{version,jdbcType=VARCHAR},
</if>
<if
test=
"delete_flag != null"
>
delete_flag = #{delete_flag,jdbcType=INTEGER},
</if>
<if
test=
"created_id != null"
>
created_id = #{created_id,jdbcType=BIGINT},
</if>
<if
test=
"created_time != null"
>
created_time = #{created_time,jdbcType=TIMESTAMP},
</if>
<if
test=
"modified_id != null"
>
modified_id = #{modified_id,jdbcType=BIGINT},
</if>
<if
test=
"modified_time != null"
>
modified_time = #{modified_time,jdbcType=TIMESTAMP},
</if>
<if
test=
"agreement_content != null"
>
agreement_content = #{agreement_content,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.pica.cloud.account.account.server.entity.AgreementEntity"
>
update doctor_agreement
set agreement_type = #{agreement_type,jdbcType=INTEGER},
version = #{version,jdbcType=VARCHAR},
delete_flag = #{delete_flag,jdbcType=INTEGER},
created_id = #{created_id,jdbcType=BIGINT},
created_time = #{created_time,jdbcType=TIMESTAMP},
modified_id = #{modified_id,jdbcType=BIGINT},
modified_time = #{modified_time,jdbcType=TIMESTAMP},
agreement_content = #{agreement_content,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.pica.cloud.account.account.server.entity.AgreementEntity"
>
update doctor_agreement
set agreement_type = #{agreement_type,jdbcType=INTEGER},
version = #{version,jdbcType=VARCHAR},
delete_flag = #{delete_flag,jdbcType=INTEGER},
created_id = #{created_id,jdbcType=BIGINT},
created_time = #{created_time,jdbcType=TIMESTAMP},
modified_id = #{modified_id,jdbcType=BIGINT},
modified_time = #{modified_time,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
<!--<select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Long">-->
<!--select-->
<!--<include refid="Base_Column_List"/>-->
<!--,-->
<!--<include refid="Blob_Column_List"/>-->
<!--from doctor_agreement-->
<!--where id = #{id,jdbcType=BIGINT}-->
<!--</select>-->
<!--<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">-->
<!--delete from doctor_agreement-->
<!--where id = #{id,jdbcType=BIGINT}-->
<!--</delete>-->
<!--<insert id="insert" parameterType="com.pica.cloud.account.account.server.entity.AgreementEntity">-->
<!--insert into doctor_agreement (id, agreement_type, version, -->
<!--delete_flag, created_id, created_time, -->
<!--modified_id, modified_time, agreement_content-->
<!--)-->
<!--values (#{id,jdbcType=BIGINT}, #{agreement_type,jdbcType=INTEGER}, #{version,jdbcType=VARCHAR}, -->
<!--#{delete_flag,jdbcType=INTEGER}, #{created_id,jdbcType=BIGINT}, #{created_time,jdbcType=TIMESTAMP}, -->
<!--#{modified_id,jdbcType=BIGINT}, #{modified_time,jdbcType=TIMESTAMP}, #{agreement_content,jdbcType=LONGVARCHAR}-->
<!--)-->
<!--</insert>-->
<!--<insert id="insertSelective" parameterType="com.pica.cloud.account.account.server.entity.AgreementEntity">-->
<!--insert into doctor_agreement-->
<!--<trim prefix="(" suffix=")" suffixOverrides=",">-->
<!--<if test="id != null">-->
<!--id,-->
<!--</if>-->
<!--<if test="agreement_type != null">-->
<!--agreement_type,-->
<!--</if>-->
<!--<if test="version != null">-->
<!--version,-->
<!--</if>-->
<!--<if test="delete_flag != null">-->
<!--delete_flag,-->
<!--</if>-->
<!--<if test="created_id != null">-->
<!--created_id,-->
<!--</if>-->
<!--<if test="created_time != null">-->
<!--created_time,-->
<!--</if>-->
<!--<if test="modified_id != null">-->
<!--modified_id,-->
<!--</if>-->
<!--<if test="modified_time != null">-->
<!--modified_time,-->
<!--</if>-->
<!--<if test="agreement_content != null">-->
<!--agreement_content,-->
<!--</if>-->
<!--</trim>-->
<!--<trim prefix="values (" suffix=")" suffixOverrides=",">-->
<!--<if test="id != null">-->
<!--#{id,jdbcType=BIGINT},-->
<!--</if>-->
<!--<if test="agreement_type != null">-->
<!--#{agreement_type,jdbcType=INTEGER},-->
<!--</if>-->
<!--<if test="version != null">-->
<!--#{version,jdbcType=VARCHAR},-->
<!--</if>-->
<!--<if test="delete_flag != null">-->
<!--#{delete_flag,jdbcType=INTEGER},-->
<!--</if>-->
<!--<if test="created_id != null">-->
<!--#{created_id,jdbcType=BIGINT},-->
<!--</if>-->
<!--<if test="created_time != null">-->
<!--#{created_time,jdbcType=TIMESTAMP},-->
<!--</if>-->
<!--<if test="modified_id != null">-->
<!--#{modified_id,jdbcType=BIGINT},-->
<!--</if>-->
<!--<if test="modified_time != null">-->
<!--#{modified_time,jdbcType=TIMESTAMP},-->
<!--</if>-->
<!--<if test="agreement_content != null">-->
<!--#{agreement_content,jdbcType=LONGVARCHAR},-->
<!--</if>-->
<!--</trim>-->
<!--</insert>-->
<!--<update id="updateByPrimaryKeySelective"-->
<!--parameterType="com.pica.cloud.account.account.server.entity.AgreementEntity">-->
<!--update doctor_agreement-->
<!--<set>-->
<!--<if test="agreement_type != null">-->
<!--agreement_type = #{agreement_type,jdbcType=INTEGER},-->
<!--</if>-->
<!--<if test="version != null">-->
<!--version = #{version,jdbcType=VARCHAR},-->
<!--</if>-->
<!--<if test="delete_flag != null">-->
<!--delete_flag = #{delete_flag,jdbcType=INTEGER},-->
<!--</if>-->
<!--<if test="created_id != null">-->
<!--created_id = #{created_id,jdbcType=BIGINT},-->
<!--</if>-->
<!--<if test="created_time != null">-->
<!--created_time = #{created_time,jdbcType=TIMESTAMP},-->
<!--</if>-->
<!--<if test="modified_id != null">-->
<!--modified_id = #{modified_id,jdbcType=BIGINT},-->
<!--</if>-->
<!--<if test="modified_time != null">-->
<!--modified_time = #{modified_time,jdbcType=TIMESTAMP},-->
<!--</if>-->
<!--<if test="agreement_content != null">-->
<!--agreement_content = #{agreement_content,jdbcType=LONGVARCHAR},-->
<!--</if>-->
<!--</set>-->
<!--where id = #{id,jdbcType=BIGINT}-->
<!--</update>-->
<!--<update id="updateByPrimaryKeyWithBLOBs"-->
<!--parameterType="com.pica.cloud.account.account.server.entity.AgreementEntity">-->
<!--update doctor_agreement-->
<!--set agreement_type = #{agreement_type,jdbcType=INTEGER},-->
<!--version = #{version,jdbcType=VARCHAR},-->
<!--delete_flag = #{delete_flag,jdbcType=INTEGER},-->
<!--created_id = #{created_id,jdbcType=BIGINT},-->
<!--created_time = #{created_time,jdbcType=TIMESTAMP},-->
<!--modified_id = #{modified_id,jdbcType=BIGINT},-->
<!--modified_time = #{modified_time,jdbcType=TIMESTAMP},-->
<!--agreement_content = #{agreement_content,jdbcType=LONGVARCHAR}-->
<!--where id = #{id,jdbcType=BIGINT}-->
<!--</update>-->
<!--<update id="updateByPrimaryKey" parameterType="com.pica.cloud.account.account.server.entity.AgreementEntity">-->
<!--update doctor_agreement-->
<!--set agreement_type = #{agreement_type,jdbcType=INTEGER},-->
<!--version = #{version,jdbcType=VARCHAR},-->
<!--delete_flag = #{delete_flag,jdbcType=INTEGER},-->
<!--created_id = #{created_id,jdbcType=BIGINT},-->
<!--created_time = #{created_time,jdbcType=TIMESTAMP},-->
<!--modified_id = #{modified_id,jdbcType=BIGINT},-->
<!--modified_time = #{modified_time,jdbcType=TIMESTAMP}-->
<!--where id = #{id,jdbcType=BIGINT}-->
<!--</update>-->
<!--</mapper>-->
\ No newline at end of file
server/src/main/resources/mybatis/AgreementLogEntityMapper.xml
浏览文件 @
65b0d24a
<
?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.AgreementLogEntityMapper"
>
<
resultMap
id=
"BaseResultMap"
type=
"com.pica.cloud.account.account.server.entity.AgreementLogEntity"
>
<
id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/
>
<
result
column=
"doctor_id"
property=
"doctor_id"
jdbcType=
"BIGINT"
/
>
<
result
column=
"agreement_type"
property=
"agreement_type"
jdbcType=
"INTEGER"
/
>
<
result
column=
"version"
property=
"version"
jdbcType=
"VARCHAR"
/
>
<
result
column=
"delete_flag"
property=
"delete_flag"
jdbcType=
"INTEGER"
/
>
<
result
column=
"created_id"
property=
"created_id"
jdbcType=
"BIGINT"
/
>
<
result
column=
"created_time"
property=
"created_time"
jdbcType=
"TIMESTAMP"
/
>
<
result
column=
"modified_id"
property=
"modified_id"
jdbcType=
"BIGINT"
/
>
<
result
column=
"modified_time"
property=
"modified_time"
jdbcType=
"TIMESTAMP"
/
>
<
/resultMap
>
<
sql
id=
"Base_Column_List"
>
id, doctor_id, agreement_type, version, delete_flag, created_id, created_time, modified_id,
modified_time
<
/sql
>
<
select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Long"
>
select
<
include
refid=
"Base_Column_List"
/
>
from doctor_agreement_log
where id = #{id,jdbcType=BIGINT}
<
/select
>
<
delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from doctor_agreement_log
where id = #{id,jdbcType=BIGINT}
<
/delete
>
<
!--<?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.AgreementLogEntityMapper" >--
>
<
!--<resultMap id="BaseResultMap" type="com.pica.cloud.account.account.server.entity.AgreementLogEntity" >--
>
<
!--<id column="id" property="id" jdbcType="BIGINT" />--
>
<
!--<result column="doctor_id" property="doctor_id" jdbcType="BIGINT" />--
>
<
!--<result column="agreement_type" property="agreement_type" jdbcType="INTEGER" />--
>
<
!--<result column="version" property="version" jdbcType="VARCHAR" />--
>
<
!--<result column="delete_flag" property="delete_flag" jdbcType="INTEGER" />--
>
<
!--<result column="created_id" property="created_id" jdbcType="BIGINT" />--
>
<
!--<result column="created_time" property="created_time" jdbcType="TIMESTAMP" />--
>
<
!--<result column="modified_id" property="modified_id" jdbcType="BIGINT" />--
>
<
!--<result column="modified_time" property="modified_time" jdbcType="TIMESTAMP" />--
>
<
!--</resultMap>--
>
<
!--<sql id="Base_Column_List" >--
>
<!--id, doctor_id, agreement_type, version, delete_flag, created_id, created_time, modified_id, -->
<!--modified_time-->
<
!--</sql>--
>
<
!--<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >--
>
<!--select -->
<
!--<include refid="Base_Column_List" />--
>
<!--from doctor_agreement_log-->
<!--where id = #{id,jdbcType=BIGINT}-->
<
!--</select>--
>
<
!--<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >--
>
<!--delete from doctor_agreement_log-->
<!--where id = #{id,jdbcType=BIGINT}-->
<
!--</delete>--
>
<
insert
id=
"insert"
parameterType=
"com.pica.cloud.account.account.server.entity.AgreementLogEntity"
>
insert into doctor_agreement_log (id, doctor_id, agreement_type,
version, delete_flag, created_id,
created_time, modified_id, modified_time)
values (#{id,jdbcType=BIGINT}, #{doctor_id,jdbcType=BIGINT}, #{agreement_type,jdbcType=INTEGER},
#{version,jdbcType=VARCHAR}, #{delete_flag,jdbcType=INTEGER}, #{created_id,jdbcType=BIGINT},
#{created_time,jdbcType=TIMESTAMP}, #{modified_id,jdbcType=BIGINT}, #{modified_time,jdbcType=TIMESTAMP}
)
<
/insert
>
<
!--<insert id="insert" parameterType="com.pica.cloud.account.account.server.entity.AgreementLogEntity" >--
>
<!--insert into doctor_agreement_log (id, doctor_id, agreement_type, -->
<!--version, delete_flag, created_id, -->
<!--created_time, modified_id, modified_time)-->
<!--values (#{id,jdbcType=BIGINT}, #{doctor_id,jdbcType=BIGINT}, #{agreement_type,jdbcType=INTEGER}, -->
<!--#{version,jdbcType=VARCHAR}, #{delete_flag,jdbcType=INTEGER}, #{created_id,jdbcType=BIGINT}, -->
<!--#{created_time,jdbcType=TIMESTAMP}, #{modified_id,jdbcType=BIGINT}, #{modified_time,jdbcType=TIMESTAMP}-->
<!--)-->
<
!--</insert>--
>
<
insert
id=
"insertSelective"
parameterType=
"com.pica.cloud.account.account.server.entity.AgreementLogEntity"
>
insert into doctor_agreement_log
<
trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<
if
test=
"id != null"
>
id,
<
/if
>
<
if
test=
"doctor_id != null"
>
doctor_id,
<
/if
>
<
if
test=
"agreement_type != null"
>
agreement_type,
<
/if
>
<
if
test=
"version != null"
>
version,
<
/if
>
<
if
test=
"delete_flag != null"
>
delete_flag,
<
/if
>
<
if
test=
"created_id != null"
>
created_id,
<
/if
>
<
if
test=
"created_time != null"
>
created_time,
<
/if
>
<
if
test=
"modified_id != null"
>
modified_id,
<
/if
>
<
if
test=
"modified_time != null"
>
modified_time,
<
/if
>
<
/trim
>
<
trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<
if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
<
/if
>
<
if
test=
"doctor_id != null"
>
#{doctor_id,jdbcType=BIGINT},
<
/if
>
<
if
test=
"agreement_type != null"
>
#{agreement_type,jdbcType=INTEGER},
<
/if
>
<
if
test=
"version != null"
>
#{version,jdbcType=VARCHAR},
<
/if
>
<
if
test=
"delete_flag != null"
>
#{delete_flag,jdbcType=INTEGER},
<
/if
>
<
if
test=
"created_id != null"
>
#{created_id,jdbcType=BIGINT},
<
/if
>
<
if
test=
"created_time != null"
>
#{created_time,jdbcType=TIMESTAMP},
<
/if
>
<
if
test=
"modified_id != null"
>
#{modified_id,jdbcType=BIGINT},
<
/if
>
<
if
test=
"modified_time != null"
>
#{modified_time,jdbcType=TIMESTAMP},
<
/if
>
<
/trim
>
<
/insert
>
<
update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.pica.cloud.account.account.server.entity.AgreementLogEntity"
>
update doctor_agreement_log
<
set
>
<
if
test=
"doctor_id != null"
>
doctor_id = #{doctor_id,jdbcType=BIGINT},
<
/if
>
<
if
test=
"agreement_type != null"
>
agreement_type = #{agreement_type,jdbcType=INTEGER},
<
/if
>
<
if
test=
"version != null"
>
version = #{version,jdbcType=VARCHAR},
<
/if
>
<
if
test=
"delete_flag != null"
>
delete_flag = #{delete_flag,jdbcType=INTEGER},
<
/if
>
<
if
test=
"created_id != null"
>
created_id = #{created_id,jdbcType=BIGINT},
<
/if
>
<
if
test=
"created_time != null"
>
created_time = #{created_time,jdbcType=TIMESTAMP},
<
/if
>
<
if
test=
"modified_id != null"
>
modified_id = #{modified_id,jdbcType=BIGINT},
<
/if
>
<
if
test=
"modified_time != null"
>
modified_time = #{modified_time,jdbcType=TIMESTAMP},
<
/if
>
<
/set
>
where id = #{id,jdbcType=BIGINT}
<
/update
>
<
update
id=
"updateByPrimaryKey"
parameterType=
"com.pica.cloud.account.account.server.entity.AgreementLogEntity"
>
update doctor_agreement_log
set doctor_id = #{doctor_id,jdbcType=BIGINT},
agreement_type = #{agreement_type,jdbcType=INTEGER},
version = #{version,jdbcType=VARCHAR},
delete_flag = #{delete_flag,jdbcType=INTEGER},
created_id = #{created_id,jdbcType=BIGINT},
created_time = #{created_time,jdbcType=TIMESTAMP},
modified_id = #{modified_id,jdbcType=BIGINT},
modified_time = #{modified_time,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
<
/update
>
<
!--<insert id="insertSelective" parameterType="com.pica.cloud.account.account.server.entity.AgreementLogEntity" >--
>
<!--insert into doctor_agreement_log-->
<
!--<trim prefix="(" suffix=")" suffixOverrides="," >--
>
<
!--<if test="id != null" >--
>
<!--id,-->
<
!--</if>--
>
<
!--<if test="doctor_id != null" >--
>
<!--doctor_id,-->
<
!--</if>--
>
<
!--<if test="agreement_type != null" >--
>
<!--agreement_type,-->
<
!--</if>--
>
<
!--<if test="version != null" >--
>
<!--version,-->
<
!--</if>--
>
<
!--<if test="delete_flag != null" >--
>
<!--delete_flag,-->
<
!--</if>--
>
<
!--<if test="created_id != null" >--
>
<!--created_id,-->
<
!--</if>--
>
<
!--<if test="created_time != null" >--
>
<!--created_time,-->
<
!--</if>--
>
<
!--<if test="modified_id != null" >--
>
<!--modified_id,-->
<
!--</if>--
>
<
!--<if test="modified_time != null" >--
>
<!--modified_time,-->
<
!--</if>--
>
<
!--</trim>--
>
<
!--<trim prefix="values (" suffix=")" suffixOverrides="," >--
>
<
!--<if test="id != null" >--
>
<!--#{id,jdbcType=BIGINT},-->
<
!--</if>--
>
<
!--<if test="doctor_id != null" >--
>
<!--#{doctor_id,jdbcType=BIGINT},-->
<
!--</if>--
>
<
!--<if test="agreement_type != null" >--
>
<!--#{agreement_type,jdbcType=INTEGER},-->
<
!--</if>--
>
<
!--<if test="version != null" >--
>
<!--#{version,jdbcType=VARCHAR},-->
<
!--</if>--
>
<
!--<if test="delete_flag != null" >--
>
<!--#{delete_flag,jdbcType=INTEGER},-->
<
!--</if>--
>
<
!--<if test="created_id != null" >--
>
<!--#{created_id,jdbcType=BIGINT},-->
<
!--</if>--
>
<
!--<if test="created_time != null" >--
>
<!--#{created_time,jdbcType=TIMESTAMP},-->
<
!--</if>--
>
<
!--<if test="modified_id != null" >--
>
<!--#{modified_id,jdbcType=BIGINT},-->
<
!--</if>--
>
<
!--<if test="modified_time != null" >--
>
<!--#{modified_time,jdbcType=TIMESTAMP},-->
<
!--</if>--
>
<
!--</trim>--
>
<
!--</insert>--
>
<
!--<update id="updateByPrimaryKeySelective" parameterType="com.pica.cloud.account.account.server.entity.AgreementLogEntity" >--
>
<!--update doctor_agreement_log-->
<
!--<set >--
>
<
!--<if test="doctor_id != null" >--
>
<!--doctor_id = #{doctor_id,jdbcType=BIGINT},-->
<
!--</if>--
>
<
!--<if test="agreement_type != null" >--
>
<!--agreement_type = #{agreement_type,jdbcType=INTEGER},-->
<
!--</if>--
>
<
!--<if test="version != null" >--
>
<!--version = #{version,jdbcType=VARCHAR},-->
<
!--</if>--
>
<
!--<if test="delete_flag != null" >--
>
<!--delete_flag = #{delete_flag,jdbcType=INTEGER},-->
<
!--</if>--
>
<
!--<if test="created_id != null" >--
>
<!--created_id = #{created_id,jdbcType=BIGINT},-->
<
!--</if>--
>
<
!--<if test="created_time != null" >--
>
<!--created_time = #{created_time,jdbcType=TIMESTAMP},-->
<
!--</if>--
>
<
!--<if test="modified_id != null" >--
>
<!--modified_id = #{modified_id,jdbcType=BIGINT},-->
<
!--</if>--
>
<
!--<if test="modified_time != null" >--
>
<!--modified_time = #{modified_time,jdbcType=TIMESTAMP},-->
<
!--</if>--
>
<
!--</set>--
>
<!--where id = #{id,jdbcType=BIGINT}-->
<
!--</update>--
>
<
!--<update id="updateByPrimaryKey" parameterType="com.pica.cloud.account.account.server.entity.AgreementLogEntity" >--
>
<!--update doctor_agreement_log-->
<!--set doctor_id = #{doctor_id,jdbcType=BIGINT},-->
<!--agreement_type = #{agreement_type,jdbcType=INTEGER},-->
<!--version = #{version,jdbcType=VARCHAR},-->
<!--delete_flag = #{delete_flag,jdbcType=INTEGER},-->
<!--created_id = #{created_id,jdbcType=BIGINT},-->
<!--created_time = #{created_time,jdbcType=TIMESTAMP},-->
<!--modified_id = #{modified_id,jdbcType=BIGINT},-->
<!--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
>
<
!--<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
>
<
!--<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
<!--<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
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录