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
提交
f5dd2814
提交
f5dd2814
编写于
6月 04, 2020
作者:
Peijun.zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add 客服系统删除医生 恢复接口
上级
e211fed9
流水线
#26247
已失败 于阶段
in 0 second
变更
14
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
834 行增加
和
1 行删除
+834
-1
DoctorController.java
...d/account/account/server/controller/DoctorController.java
+21
-0
DoctorEducation.java
.../cloud/account/account/server/entity/DoctorEducation.java
+145
-0
DoctorHospital.java
...a/cloud/account/account/server/entity/DoctorHospital.java
+115
-0
AccountInfoDetailMapper.java
...ccount/account/server/mapper/AccountInfoDetailMapper.java
+4
-0
DoctorEducationMapper.java
.../account/account/server/mapper/DoctorEducationMapper.java
+21
-0
DoctorHospitalMapper.java
...d/account/account/server/mapper/DoctorHospitalMapper.java
+21
-0
DoctorMapper.java
...ica/cloud/account/account/server/mapper/DoctorMapper.java
+5
-0
RevertAcctsReq.java
...pica/cloud/account/account/server/req/RevertAcctsReq.java
+35
-0
DoctorService.java
...a/cloud/account/account/server/service/DoctorService.java
+4
-0
DoctorServiceImpl.java
...ccount/account/server/service/impl/DoctorServiceImpl.java
+47
-0
AccountInfoEntityMapper.xml
...er/src/main/resources/mybatis/AccountInfoEntityMapper.xml
+10
-1
DoctorEducationMapper.xml
server/src/main/resources/mybatis/DoctorEducationMapper.xml
+211
-0
DoctorHospitalMapper.xml
server/src/main/resources/mybatis/DoctorHospitalMapper.xml
+176
-0
DoctorMapper.xml
server/src/main/resources/mybatis/DoctorMapper.xml
+19
-0
未找到文件。
server/src/main/java/com/pica/cloud/account/account/server/controller/DoctorController.java
浏览文件 @
f5dd2814
...
...
@@ -4,16 +4,20 @@ import com.pica.cloud.account.account.server.entity.AccountUser;
import
com.pica.cloud.account.account.server.entity.Doctor
;
import
com.pica.cloud.account.account.server.enums.AccountExceptionEnum
;
import
com.pica.cloud.account.account.server.exception.AccountException
;
import
com.pica.cloud.account.account.server.req.RevertAcctsReq
;
import
com.pica.cloud.account.account.server.service.DoctorService
;
import
com.pica.cloud.account.account.server.util.AccountUtils
;
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.service.starter.interceptor.EnabledLoginValidate
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* Created on 2019/9/10 18:51
* author:crs
...
...
@@ -78,4 +82,21 @@ public class DoctorController extends AccountBaseController {
doctorService
.
deleteDoctorInfo
(
id
,
super
.
getDoctorIdByToken
());
return
PicaResponse
.
toResponse
();
}
/**
* @Description 恢复客服系统误删除医生
* @Author peijun.zhao
* @Date 2020/6/3 17:39
* @ModifyDate 2020/6/3 17:39
* @Params [doctorIds]
* @Return com.pica.cloud.foundation.entity.PicaResponse
*/
@PostMapping
(
value
=
"/revert"
)
@EnabledLoginValidate
public
PicaResponse
revertDoctor
(
@RequestBody
RevertAcctsReq
revertAcctsReq
)
{
if
(
"revertAccts"
.
equals
(
revertAcctsReq
.
getType
())){
doctorService
.
revertAccts
(
revertAcctsReq
.
getDoctorIds
());
}
return
PicaResponse
.
toResponse
();
}
}
server/src/main/java/com/pica/cloud/account/account/server/entity/DoctorEducation.java
0 → 100644
浏览文件 @
f5dd2814
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
entity
;
import
java.util.Date
;
public
class
DoctorEducation
{
private
Integer
id
;
private
Integer
doctorId
;
private
String
schoolName
;
private
Integer
majorId
;
private
String
majorName
;
private
String
educationId
;
private
String
educationName
;
private
String
year
;
private
Integer
deleteFlag
;
private
Integer
creatId
;
private
Date
creatTime
;
private
Integer
modifyId
;
private
Date
modifyTime
;
private
String
graduatedYear
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getDoctorId
()
{
return
doctorId
;
}
public
void
setDoctorId
(
Integer
doctorId
)
{
this
.
doctorId
=
doctorId
;
}
public
String
getSchoolName
()
{
return
schoolName
;
}
public
void
setSchoolName
(
String
schoolName
)
{
this
.
schoolName
=
schoolName
==
null
?
null
:
schoolName
.
trim
();
}
public
Integer
getMajorId
()
{
return
majorId
;
}
public
void
setMajorId
(
Integer
majorId
)
{
this
.
majorId
=
majorId
;
}
public
String
getMajorName
()
{
return
majorName
;
}
public
void
setMajorName
(
String
majorName
)
{
this
.
majorName
=
majorName
==
null
?
null
:
majorName
.
trim
();
}
public
String
getEducationId
()
{
return
educationId
;
}
public
void
setEducationId
(
String
educationId
)
{
this
.
educationId
=
educationId
==
null
?
null
:
educationId
.
trim
();
}
public
String
getEducationName
()
{
return
educationName
;
}
public
void
setEducationName
(
String
educationName
)
{
this
.
educationName
=
educationName
==
null
?
null
:
educationName
.
trim
();
}
public
String
getYear
()
{
return
year
;
}
public
void
setYear
(
String
year
)
{
this
.
year
=
year
==
null
?
null
:
year
.
trim
();
}
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
;
}
public
String
getGraduatedYear
()
{
return
graduatedYear
;
}
public
void
setGraduatedYear
(
String
graduatedYear
)
{
this
.
graduatedYear
=
graduatedYear
==
null
?
null
:
graduatedYear
.
trim
();
}
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/entity/DoctorHospital.java
0 → 100644
浏览文件 @
f5dd2814
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
entity
;
import
java.util.Date
;
public
class
DoctorHospital
{
private
Long
id
;
private
Long
doctorId
;
private
Long
hospitalId
;
private
Integer
status
;
private
Integer
sysCode
;
private
String
memo
;
private
Integer
deleteFlag
;
private
Long
createdId
;
private
Date
createdTime
;
private
Long
modifiedId
;
private
Date
modifiedTime
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getDoctorId
()
{
return
doctorId
;
}
public
void
setDoctorId
(
Long
doctorId
)
{
this
.
doctorId
=
doctorId
;
}
public
Long
getHospitalId
()
{
return
hospitalId
;
}
public
void
setHospitalId
(
Long
hospitalId
)
{
this
.
hospitalId
=
hospitalId
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Integer
getSysCode
()
{
return
sysCode
;
}
public
void
setSysCode
(
Integer
sysCode
)
{
this
.
sysCode
=
sysCode
;
}
public
String
getMemo
()
{
return
memo
;
}
public
void
setMemo
(
String
memo
)
{
this
.
memo
=
memo
==
null
?
null
:
memo
.
trim
();
}
public
Integer
getDeleteFlag
()
{
return
deleteFlag
;
}
public
void
setDeleteFlag
(
Integer
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
}
public
Long
getCreatedId
()
{
return
createdId
;
}
public
void
setCreatedId
(
Long
createdId
)
{
this
.
createdId
=
createdId
;
}
public
Date
getCreatedTime
()
{
return
createdTime
;
}
public
void
setCreatedTime
(
Date
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
public
Long
getModifiedId
()
{
return
modifiedId
;
}
public
void
setModifiedId
(
Long
modifiedId
)
{
this
.
modifiedId
=
modifiedId
;
}
public
Date
getModifiedTime
()
{
return
modifiedTime
;
}
public
void
setModifiedTime
(
Date
modifiedTime
)
{
this
.
modifiedTime
=
modifiedTime
;
}
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/mapper/AccountInfoDetailMapper.java
浏览文件 @
f5dd2814
...
...
@@ -6,6 +6,8 @@ import org.apache.ibatis.annotations.Param;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
import
java.util.List
;
@Component
public
interface
AccountInfoDetailMapper
{
/**
...
...
@@ -66,4 +68,6 @@ public interface AccountInfoDetailMapper {
void
processAccountRepeatData
();
int
updateRevertByAcctIds
(
List
<
Integer
>
list
);
}
server/src/main/java/com/pica/cloud/account/account/server/mapper/DoctorEducationMapper.java
0 → 100644
浏览文件 @
f5dd2814
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
mapper
;
import
com.pica.cloud.account.account.server.entity.DoctorEducation
;
import
java.util.List
;
public
interface
DoctorEducationMapper
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
DoctorEducation
record
);
int
insertSelective
(
DoctorEducation
record
);
DoctorEducation
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
DoctorEducation
record
);
int
updateByPrimaryKey
(
DoctorEducation
record
);
int
updateRevertByDocIds
(
List
<
Integer
>
list
);
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/mapper/DoctorHospitalMapper.java
0 → 100644
浏览文件 @
f5dd2814
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
mapper
;
import
com.pica.cloud.account.account.server.entity.DoctorHospital
;
import
java.util.List
;
public
interface
DoctorHospitalMapper
{
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
DoctorHospital
record
);
int
insertSelective
(
DoctorHospital
record
);
DoctorHospital
selectByPrimaryKey
(
Long
id
);
int
updateByPrimaryKeySelective
(
DoctorHospital
record
);
int
updateByPrimaryKey
(
DoctorHospital
record
);
int
updateRevertByDocIds
(
List
<
Integer
>
list
);
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/mapper/DoctorMapper.java
浏览文件 @
f5dd2814
...
...
@@ -8,6 +8,8 @@ import org.apache.ibatis.annotations.Param;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
import
java.util.List
;
@Component
public
interface
DoctorMapper
{
/**
...
...
@@ -99,6 +101,9 @@ public interface DoctorMapper {
Integer
getAcctIdByDoctorId
(
long
id
);
List
<
Doctor
>
getRevertListByDoctorIds
(
List
<
Integer
>
list
);
int
updateRevertByIdList
(
List
<
Integer
>
list
);
/**
* 更新p_doctor表的修改记录
...
...
server/src/main/java/com/pica/cloud/account/account/server/req/RevertAcctsReq.java
0 → 100644
浏览文件 @
f5dd2814
// Copyright 2016-2101 Pica.
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
req
;
import
java.util.List
;
/**
* @ClassName RevertAcctsReq
* @Description TODO
* @Author peijun.zhao
* @Date 2020/6/3 17:43
* @ModifyDate 2020/6/3 17:43
* @Version 1.0
*/
public
class
RevertAcctsReq
{
private
List
<
Integer
>
doctorIds
;
private
String
type
;
public
List
<
Integer
>
getDoctorIds
()
{
return
doctorIds
;
}
public
void
setDoctorIds
(
List
<
Integer
>
doctorIds
)
{
this
.
doctorIds
=
doctorIds
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
}
server/src/main/java/com/pica/cloud/account/account/server/service/DoctorService.java
浏览文件 @
f5dd2814
...
...
@@ -2,6 +2,8 @@ package com.pica.cloud.account.account.server.service;
import
com.pica.cloud.account.account.server.entity.Doctor
;
import
java.util.List
;
/**
* Created on 2019/9/11 11:01
* author:crs
...
...
@@ -50,4 +52,6 @@ public interface DoctorService {
* @param acctId
*/
void
unbindWeChat
(
int
acctId
);
void
revertAccts
(
List
<
Integer
>
doctorIds
);
}
server/src/main/java/com/pica/cloud/account/account/server/service/impl/DoctorServiceImpl.java
浏览文件 @
f5dd2814
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.pica.cloud.account.account.server.entity.AccountInfoEntity
;
import
com.pica.cloud.account.account.server.entity.Doctor
;
import
com.pica.cloud.account.account.server.enums.AccountExceptionEnum
;
import
com.pica.cloud.account.account.server.enums.AccountTypeEnum
;
import
com.pica.cloud.account.account.server.exception.AccountException
;
import
com.pica.cloud.account.account.server.mapper.AccountInfoDetailMapper
;
import
com.pica.cloud.account.account.server.mapper.DoctorEducationMapper
;
import
com.pica.cloud.account.account.server.mapper.DoctorHospitalMapper
;
import
com.pica.cloud.account.account.server.mapper.DoctorMapper
;
import
com.pica.cloud.account.account.server.service.DoctorService
;
import
com.pica.cloud.account.account.server.util.AESUtil
;
import
com.pica.cloud.account.account.server.util.AccountUtils
;
import
com.pica.cloud.foundation.utils.entity.PicaDoctor
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
...
...
@@ -20,6 +26,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* Created on 2019/9/11 11:02
...
...
@@ -35,11 +43,19 @@ public class DoctorServiceImpl implements DoctorService {
@Autowired
private
AccountInfoDetailMapper
accountInfoDetailMapper
;
@Autowired
private
DoctorEducationMapper
doctorEducationMapper
;
@Autowired
private
DoctorHospitalMapper
doctorHospitalMapper
;
@Override
public
Doctor
getDoctorInfo
(
Integer
id
)
{
return
doctorMapper
.
selectByPrimaryKey
(
id
);
}
private
Logger
logger
=
LoggerFactory
.
getLogger
(
this
.
getClass
());
@Transactional
@Override
public
void
modifyDoctorInfo
(
Doctor
doctor
,
Long
doctorId
)
{
...
...
@@ -148,4 +164,35 @@ public class DoctorServiceImpl implements DoctorService {
public
void
unbindWeChat
(
int
acctId
)
{
doctorMapper
.
unbindWeChat
(
acctId
);
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
revertAccts
(
List
<
Integer
>
doctorIds
)
{
logger
.
info
(
"revertAccts:{}"
,
JSONObject
.
toJSONString
(
doctorIds
));
if
(
doctorIds
.
size
()
==
0
){
return
;
}
//check docIds 是否都是已经删除了
List
<
Doctor
>
docList
=
doctorMapper
.
getRevertListByDoctorIds
(
doctorIds
);
if
(
docList
.
size
()
!=
doctorIds
.
size
()){
logger
.
error
(
"revertAccts: 入参中存在未删除的医生id"
);
return
;
}
//revert doctor数据
doctorMapper
.
updateRevertByIdList
(
doctorIds
);
//revert account数据
List
<
Integer
>
acctIds
=
docList
.
stream
().
map
(
obj
->
obj
.
getAcctId
()).
collect
(
Collectors
.
toList
());
accountInfoDetailMapper
.
updateRevertByAcctIds
(
acctIds
);
//revert doctor 教育信息
doctorEducationMapper
.
updateRevertByDocIds
(
doctorIds
);
//revert 医生机构
doctorHospitalMapper
.
updateRevertByDocIds
(
doctorIds
);
logger
.
info
(
"revertAccts:end"
);
}
}
server/src/main/resources/mybatis/AccountInfoEntityMapper.xml
浏览文件 @
f5dd2814
...
...
@@ -59,7 +59,16 @@
<!--逻辑删除用户-->
<update
id=
"updateDeleteByPrimaryKey"
>
update account_info set delete_flag=2,modified_time=now(), modified_id=#{map.modifyId} where id=#{map.acctId}
</update>
</update>
<update
id=
"updateRevertByAcctIds"
parameterType=
"java.util.List"
>
update account_info set
delete_flag = 1, modified_time = now(), modified_id = 99999999
where delete_flag = 2 and id in
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</update>
<!--更新用户的手机号-->
<update
id=
"updateMobileByPrimaryKey"
...
...
server/src/main/resources/mybatis/DoctorEducationMapper.xml
0 → 100644
浏览文件 @
f5dd2814
<?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.DoctorEducationMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pica.cloud.account.account.server.entity.DoctorEducation"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"doctor_id"
property=
"doctorId"
jdbcType=
"INTEGER"
/>
<result
column=
"school_name"
property=
"schoolName"
jdbcType=
"VARCHAR"
/>
<result
column=
"major_id"
property=
"majorId"
jdbcType=
"INTEGER"
/>
<result
column=
"major_name"
property=
"majorName"
jdbcType=
"VARCHAR"
/>
<result
column=
"education_id"
property=
"educationId"
jdbcType=
"VARCHAR"
/>
<result
column=
"education_name"
property=
"educationName"
jdbcType=
"VARCHAR"
/>
<result
column=
"year"
property=
"year"
jdbcType=
"VARCHAR"
/>
<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"
/>
<result
column=
"graduated_year"
property=
"graduatedYear"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, doctor_id, school_name, major_id, major_name, education_id, education_name, year,
delete_flag, creat_id, creat_time, modify_id, modify_time, graduated_year
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select
<include
refid=
"Base_Column_List"
/>
from p_doctor_education
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from p_doctor_education
where id = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.pica.cloud.account.account.server.entity.DoctorEducation"
>
insert into p_doctor_education (id, doctor_id, school_name,
major_id, major_name, education_id,
education_name, year, delete_flag,
creat_id, creat_time, modify_id,
modify_time, graduated_year)
values (#{id,jdbcType=INTEGER}, #{doctorId,jdbcType=INTEGER}, #{schoolName,jdbcType=VARCHAR},
#{majorId,jdbcType=INTEGER}, #{majorName,jdbcType=VARCHAR}, #{educationId,jdbcType=VARCHAR},
#{educationName,jdbcType=VARCHAR}, #{year,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=INTEGER},
#{creatId,jdbcType=INTEGER}, #{creatTime,jdbcType=TIMESTAMP}, #{modifyId,jdbcType=INTEGER},
#{modifyTime,jdbcType=TIMESTAMP}, #{graduatedYear,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.pica.cloud.account.account.server.entity.DoctorEducation"
>
insert into p_doctor_education
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"doctorId != null"
>
doctor_id,
</if>
<if
test=
"schoolName != null"
>
school_name,
</if>
<if
test=
"majorId != null"
>
major_id,
</if>
<if
test=
"majorName != null"
>
major_name,
</if>
<if
test=
"educationId != null"
>
education_id,
</if>
<if
test=
"educationName != null"
>
education_name,
</if>
<if
test=
"year != null"
>
year,
</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>
<if
test=
"graduatedYear != null"
>
graduated_year,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=INTEGER},
</if>
<if
test=
"doctorId != null"
>
#{doctorId,jdbcType=INTEGER},
</if>
<if
test=
"schoolName != null"
>
#{schoolName,jdbcType=VARCHAR},
</if>
<if
test=
"majorId != null"
>
#{majorId,jdbcType=INTEGER},
</if>
<if
test=
"majorName != null"
>
#{majorName,jdbcType=VARCHAR},
</if>
<if
test=
"educationId != null"
>
#{educationId,jdbcType=VARCHAR},
</if>
<if
test=
"educationName != null"
>
#{educationName,jdbcType=VARCHAR},
</if>
<if
test=
"year != null"
>
#{year,jdbcType=VARCHAR},
</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>
<if
test=
"graduatedYear != null"
>
#{graduatedYear,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.pica.cloud.account.account.server.entity.DoctorEducation"
>
update p_doctor_education
<set
>
<if
test=
"doctorId != null"
>
doctor_id = #{doctorId,jdbcType=INTEGER},
</if>
<if
test=
"schoolName != null"
>
school_name = #{schoolName,jdbcType=VARCHAR},
</if>
<if
test=
"majorId != null"
>
major_id = #{majorId,jdbcType=INTEGER},
</if>
<if
test=
"majorName != null"
>
major_name = #{majorName,jdbcType=VARCHAR},
</if>
<if
test=
"educationId != null"
>
education_id = #{educationId,jdbcType=VARCHAR},
</if>
<if
test=
"educationName != null"
>
education_name = #{educationName,jdbcType=VARCHAR},
</if>
<if
test=
"year != null"
>
year = #{year,jdbcType=VARCHAR},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"creatId != null"
>
creat_id = #{creatId,jdbcType=INTEGER},
</if>
<if
test=
"creatTime != null"
>
creat_time = #{creatTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"modifyId != null"
>
modify_id = #{modifyId,jdbcType=INTEGER},
</if>
<if
test=
"modifyTime != null"
>
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"graduatedYear != null"
>
graduated_year = #{graduatedYear,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.pica.cloud.account.account.server.entity.DoctorEducation"
>
update p_doctor_education
set doctor_id = #{doctorId,jdbcType=INTEGER},
school_name = #{schoolName,jdbcType=VARCHAR},
major_id = #{majorId,jdbcType=INTEGER},
major_name = #{majorName,jdbcType=VARCHAR},
education_id = #{educationId,jdbcType=VARCHAR},
education_name = #{educationName,jdbcType=VARCHAR},
year = #{year,jdbcType=VARCHAR},
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},
graduated_year = #{graduatedYear,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateRevertByDocIds"
parameterType=
"java.util.List"
>
update p_doctor_education
set
delete_flag = 1,
modify_id = 99999999,
modify_time = now()
where delete_flag = 2 and doctor_id in
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</update>
</mapper>
\ No newline at end of file
server/src/main/resources/mybatis/DoctorHospitalMapper.xml
0 → 100644
浏览文件 @
f5dd2814
<?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.DoctorHospitalMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pica.cloud.account.account.server.entity.DoctorHospital"
>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"doctor_id"
property=
"doctorId"
jdbcType=
"BIGINT"
/>
<result
column=
"hospital_id"
property=
"hospitalId"
jdbcType=
"BIGINT"
/>
<result
column=
"status"
property=
"status"
jdbcType=
"INTEGER"
/>
<result
column=
"sys_code"
property=
"sysCode"
jdbcType=
"INTEGER"
/>
<result
column=
"memo"
property=
"memo"
jdbcType=
"VARCHAR"
/>
<result
column=
"delete_flag"
property=
"deleteFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"created_id"
property=
"createdId"
jdbcType=
"BIGINT"
/>
<result
column=
"created_time"
property=
"createdTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"modified_id"
property=
"modifiedId"
jdbcType=
"BIGINT"
/>
<result
column=
"modified_time"
property=
"modifiedTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, doctor_id, hospital_id, status, sys_code, memo, 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_hospital
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from doctor_hospital
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
parameterType=
"com.pica.cloud.account.account.server.entity.DoctorHospital"
>
insert into doctor_hospital (id, doctor_id, hospital_id,
status, sys_code, memo,
delete_flag, created_id, created_time,
modified_id, modified_time)
values (#{id,jdbcType=BIGINT}, #{doctorId,jdbcType=BIGINT}, #{hospitalId,jdbcType=BIGINT},
#{status,jdbcType=INTEGER}, #{sysCode,jdbcType=INTEGER}, #{memo,jdbcType=VARCHAR},
#{deleteFlag,jdbcType=INTEGER}, #{createdId,jdbcType=BIGINT}, #{createdTime,jdbcType=TIMESTAMP},
#{modifiedId,jdbcType=BIGINT}, #{modifiedTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.pica.cloud.account.account.server.entity.DoctorHospital"
>
insert into doctor_hospital
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"doctorId != null"
>
doctor_id,
</if>
<if
test=
"hospitalId != null"
>
hospital_id,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"sysCode != null"
>
sys_code,
</if>
<if
test=
"memo != null"
>
memo,
</if>
<if
test=
"deleteFlag != null"
>
delete_flag,
</if>
<if
test=
"createdId != null"
>
created_id,
</if>
<if
test=
"createdTime != null"
>
created_time,
</if>
<if
test=
"modifiedId != null"
>
modified_id,
</if>
<if
test=
"modifiedTime != null"
>
modified_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"doctorId != null"
>
#{doctorId,jdbcType=BIGINT},
</if>
<if
test=
"hospitalId != null"
>
#{hospitalId,jdbcType=BIGINT},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
<if
test=
"sysCode != null"
>
#{sysCode,jdbcType=INTEGER},
</if>
<if
test=
"memo != null"
>
#{memo,jdbcType=VARCHAR},
</if>
<if
test=
"deleteFlag != null"
>
#{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createdId != null"
>
#{createdId,jdbcType=BIGINT},
</if>
<if
test=
"createdTime != null"
>
#{createdTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"modifiedId != null"
>
#{modifiedId,jdbcType=BIGINT},
</if>
<if
test=
"modifiedTime != null"
>
#{modifiedTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.pica.cloud.account.account.server.entity.DoctorHospital"
>
update doctor_hospital
<set
>
<if
test=
"doctorId != null"
>
doctor_id = #{doctorId,jdbcType=BIGINT},
</if>
<if
test=
"hospitalId != null"
>
hospital_id = #{hospitalId,jdbcType=BIGINT},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=INTEGER},
</if>
<if
test=
"sysCode != null"
>
sys_code = #{sysCode,jdbcType=INTEGER},
</if>
<if
test=
"memo != null"
>
memo = #{memo,jdbcType=VARCHAR},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createdId != null"
>
created_id = #{createdId,jdbcType=BIGINT},
</if>
<if
test=
"createdTime != null"
>
created_time = #{createdTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"modifiedId != null"
>
modified_id = #{modifiedId,jdbcType=BIGINT},
</if>
<if
test=
"modifiedTime != null"
>
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.pica.cloud.account.account.server.entity.DoctorHospital"
>
update doctor_hospital
set doctor_id = #{doctorId,jdbcType=BIGINT},
hospital_id = #{hospitalId,jdbcType=BIGINT},
status = #{status,jdbcType=INTEGER},
sys_code = #{sysCode,jdbcType=INTEGER},
memo = #{memo,jdbcType=VARCHAR},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
created_id = #{createdId,jdbcType=BIGINT},
created_time = #{createdTime,jdbcType=TIMESTAMP},
modified_id = #{modifiedId,jdbcType=BIGINT},
modified_time = #{modifiedTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateRevertByDocIds"
parameterType=
"java.util.List"
>
update doctor_hospital
set
delete_flag = 1,
modified_id = 99999999,
modified_time = now()
where delete_flag = 2 and doctor_id in
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</update>
</mapper>
\ No newline at end of file
server/src/main/resources/mybatis/DoctorMapper.xml
浏览文件 @
f5dd2814
...
...
@@ -1045,4 +1045,23 @@
<select
id=
"getAcctIdByDoctorId"
resultType=
"java.lang.Integer"
parameterType=
"java.lang.Long"
>
select acct_id from p_doctor where id = #{id}
</select>
<select
id=
"getRevertListByDoctorIds"
resultMap=
"BaseResultMap"
parameterType=
"java.util.List"
>
select * from p_doctor where delete_flag = 2
and id IN
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</select>
<update
id=
"updateRevertByIdList"
parameterType=
"java.util.List"
>
update p_doctor
set delete_flag = 1, modify_time = now(), modify_id = 99999999
where delete_flag = 2 and id in
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</update>
</mapper>
\ No newline at end of file
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录