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
提交
bd33890d
提交
bd33890d
编写于
10月 11, 2019
作者:
rushui.chen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
“20191011 注册接口完善协议信息
上级
73cdb0a4
流水线
#15691
已失败 于阶段
in 1 second
变更
11
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
648 行增加
和
10 行删除
+648
-10
AutoCodeController.java
...account/account/server/controller/AutoCodeController.java
+1
-1
AgreementEntity.java
.../cloud/account/account/server/entity/AgreementEntity.java
+96
-0
AgreementLogEntity.java
...oud/account/account/server/entity/AgreementLogEntity.java
+95
-0
AccountAgreementEnum.java
...ud/account/account/server/enums/AccountAgreementEnum.java
+28
-0
AccountLogUtils.java
...ica/cloud/account/account/server/log/AccountLogUtils.java
+2
-6
AgreementEntityMapper.java
.../account/account/server/mapper/AgreementEntityMapper.java
+29
-0
AgreementLogEntityMapper.java
...count/account/server/mapper/AgreementLogEntityMapper.java
+18
-0
RegisterServiceImpl.java
...ount/account/server/service/impl/RegisterServiceImpl.java
+49
-3
ExecutorServiceUtils.java
...oud/account/account/server/util/ExecutorServiceUtils.java
+16
-0
AgreementEntityMapper.xml
server/src/main/resources/mybatis/AgreementEntityMapper.xml
+171
-0
AgreementLogEntityMapper.xml
...r/src/main/resources/mybatis/AgreementLogEntityMapper.xml
+143
-0
未找到文件。
server/src/main/java/com/pica/cloud/account/account/server/controller/
Sys
CodeController.java
→
server/src/main/java/com/pica/cloud/account/account/server/controller/
Auto
CodeController.java
浏览文件 @
bd33890d
...
@@ -27,7 +27,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -27,7 +27,7 @@ import org.springframework.web.bind.annotation.RestController;
@Api
(
description
=
"短信验证码资源"
)
@Api
(
description
=
"短信验证码资源"
)
@RestController
@RestController
@RequestMapping
(
value
=
"/authCode"
)
@RequestMapping
(
value
=
"/authCode"
)
public
class
Sys
CodeController
extends
AccountBaseController
{
public
class
Auto
CodeController
extends
AccountBaseController
{
private
final
String
AUTH_CODE_PREFIX
=
"authCode-"
;
private
final
String
AUTH_CODE_PREFIX
=
"authCode-"
;
...
...
server/src/main/java/com/pica/cloud/account/account/server/entity/AgreementEntity.java
0 → 100644
浏览文件 @
bd33890d
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
entity
;
import
java.util.Date
;
public
class
AgreementEntity
{
private
Long
id
;
private
Integer
agreement_type
;
private
String
version
;
private
String
agreement_content
;
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
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
;
}
public
String
getAgreement_content
()
{
return
agreement_content
;
}
public
void
setAgreement_content
(
String
agreement_content
)
{
this
.
agreement_content
=
agreement_content
==
null
?
null
:
agreement_content
.
trim
();
}
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/entity/AgreementLogEntity.java
0 → 100644
浏览文件 @
bd33890d
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/enums/AccountAgreementEnum.java
0 → 100644
浏览文件 @
bd33890d
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
enums
;
/**
* Created on 2019/10/11 19:08
* author:crs
* Description:账户协议类型
*/
public
enum
AccountAgreementEnum
{
USER_AGREEMENT
(
1
,
"用户协议"
),
PRIVACY_AGREEMENT
(
5
,
"隐私协议"
);
private
int
code
;
private
String
desc
;
AccountAgreementEnum
(
int
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
public
int
getCode
()
{
return
code
;
}
public
void
setCode
(
int
code
)
{
this
.
code
=
code
;
}
}
server/src/main/java/com/pica/cloud/account/account/server/log/AccountLogUtils.java
浏览文件 @
bd33890d
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
log
;
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
log
;
import
com.pica.cloud.account.account.server.util.ExecutorServiceUtils
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.ExecutorService
;
...
@@ -13,17 +14,12 @@ import java.util.concurrent.Executors;
...
@@ -13,17 +14,12 @@ import java.util.concurrent.Executors;
@Component
@Component
public
class
AccountLogUtils
{
public
class
AccountLogUtils
{
/**
* 线程池
*/
ExecutorService
executor
=
Executors
.
newFixedThreadPool
(
30
);
/**
/**
* 日志记录方法
* 日志记录方法
*
*
* @param accountLogEntity
* @param accountLogEntity
*/
*/
public
void
info
(
AccountLogEntity
accountLogEntity
)
{
public
void
info
(
AccountLogEntity
accountLogEntity
)
{
executor
.
submit
(
new
AccountLogTask
(
accountLogEntity
));
ExecutorServiceUtils
.
getExecutor
()
.
submit
(
new
AccountLogTask
(
accountLogEntity
));
}
}
}
}
server/src/main/java/com/pica/cloud/account/account/server/mapper/AgreementEntityMapper.java
0 → 100644
浏览文件 @
bd33890d
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
server/src/main/java/com/pica/cloud/account/account/server/mapper/AgreementLogEntityMapper.java
0 → 100644
浏览文件 @
bd33890d
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
mapper
;
import
com.pica.cloud.account.account.server.entity.AgreementLogEntity
;
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
);
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/service/impl/RegisterServiceImpl.java
浏览文件 @
bd33890d
...
@@ -3,19 +3,19 @@ package com.pica.cloud.account.account.server.service.impl;
...
@@ -3,19 +3,19 @@ package com.pica.cloud.account.account.server.service.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.pica.cloud.account.account.server.constants.Constants
;
import
com.pica.cloud.account.account.server.constants.Constants
;
import
com.pica.cloud.account.account.server.entity.*
;
import
com.pica.cloud.account.account.server.entity.*
;
import
com.pica.cloud.account.account.server.enums.AccountAgreementEnum
;
import
com.pica.cloud.account.account.server.enums.AccountExceptionEnum
;
import
com.pica.cloud.account.account.server.enums.AccountExceptionEnum
;
import
com.pica.cloud.account.account.server.enums.AccountTypeEnum
;
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.exception.AccountException
;
import
com.pica.cloud.account.account.server.log.AccountLogEntityUtils
;
import
com.pica.cloud.account.account.server.log.AccountLogEntityUtils
;
import
com.pica.cloud.account.account.server.log.AccountLogUtils
;
import
com.pica.cloud.account.account.server.log.AccountLogUtils
;
import
com.pica.cloud.account.account.server.mapper.AccountInfoDetailMapper
;
import
com.pica.cloud.account.account.server.mapper.*
;
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.queue.QueueProducer
;
import
com.pica.cloud.account.account.server.queue.QueueProducer
;
import
com.pica.cloud.account.account.server.req.BaseRequest
;
import
com.pica.cloud.account.account.server.req.BaseRequest
;
import
com.pica.cloud.account.account.server.service.RegisterService
;
import
com.pica.cloud.account.account.server.service.RegisterService
;
import
com.pica.cloud.account.account.server.util.AESUtil
;
import
com.pica.cloud.account.account.server.util.AESUtil
;
import
com.pica.cloud.account.account.server.util.AccountUtils
;
import
com.pica.cloud.account.account.server.util.AccountUtils
;
import
com.pica.cloud.account.account.server.util.ExecutorServiceUtils
;
import
com.pica.cloud.account.account.server.util.TokenUtils
;
import
com.pica.cloud.account.account.server.util.TokenUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -24,7 +24,10 @@ import org.springframework.stereotype.Service;
...
@@ -24,7 +24,10 @@ import org.springframework.stereotype.Service;
import
java.io.ByteArrayOutputStream
;
import
java.io.ByteArrayOutputStream
;
import
java.io.DataOutputStream
;
import
java.io.DataOutputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.concurrent.ExecutorService
;
@Service
@Service
public
class
RegisterServiceImpl
implements
RegisterService
{
public
class
RegisterServiceImpl
implements
RegisterService
{
...
@@ -50,6 +53,12 @@ public class RegisterServiceImpl implements RegisterService {
...
@@ -50,6 +53,12 @@ public class RegisterServiceImpl implements RegisterService {
@Autowired
@Autowired
private
QueueProducer
queueProducer
;
private
QueueProducer
queueProducer
;
@Autowired
private
AgreementEntityMapper
agreementEntityMapper
;
@Autowired
private
AgreementLogEntityMapper
agreementLogEntityMapper
;
/**
/**
* 1)注册功能:默认未完善信息;
* 1)注册功能:默认未完善信息;
* 2)注册成功后发送mq消息,让别的服务初始化数据;
* 2)注册成功后发送mq消息,让别的服务初始化数据;
...
@@ -136,9 +145,46 @@ public class RegisterServiceImpl implements RegisterService {
...
@@ -136,9 +145,46 @@ public class RegisterServiceImpl implements RegisterService {
AccountTypeEnum
.
LOGIN_REGISTER
.
getCode
(),
baseRequest
.
getLoginIp
(),
AccountTypeEnum
.
LOGIN_STATUS_SUCCESS
.
getCode
(),
AccountTypeEnum
.
LOGIN_REGISTER
.
getCode
(),
baseRequest
.
getLoginIp
(),
AccountTypeEnum
.
LOGIN_STATUS_SUCCESS
.
getCode
(),
AccountTypeEnum
.
LOG_TYPE_LOGIN
.
getCode
());
AccountTypeEnum
.
LOG_TYPE_LOGIN
.
getCode
());
picaLogUtils
.
info
(
entity
);
picaLogUtils
.
info
(
entity
);
processAgreement
(
userId
);
return
result
;
return
result
;
}
else
{
}
else
{
throw
new
AccountException
(
AccountExceptionEnum
.
PICA_ALREADY_REGISTER
);
throw
new
AccountException
(
AccountExceptionEnum
.
PICA_ALREADY_REGISTER
);
}
}
}
}
/**
* 异步处理协议信息
* 1)从协议表中获取最新的协议信息;
* 2)将协议加入到用户协议表中
*/
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
);
});
}
}
}
server/src/main/java/com/pica/cloud/account/account/server/util/ExecutorServiceUtils.java
0 → 100644
浏览文件 @
bd33890d
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
util
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
/**
* Created on 2019/10/11 18:58
* author:crs
* Description:线程池工具类
*/
public
class
ExecutorServiceUtils
{
public
static
ExecutorService
getExecutor
()
{
return
Executors
.
newFixedThreadPool
(
30
);
}
}
server/src/main/resources/mybatis/AgreementEntityMapper.xml
0 → 100644
浏览文件 @
bd33890d
<?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>
<!--通过类型获取用户同意的协议的版本-->
<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
server/src/main/resources/mybatis/AgreementLogEntityMapper.xml
0 → 100644
浏览文件 @
bd33890d
<?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=
"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>
</mapper>
\ No newline at end of file
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录