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
提交
51c3e31b
提交
51c3e31b
编写于
10月 25, 2019
作者:
rushui.chen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
20191025 添加删除医生的接口
上级
44b1028a
流水线
#16310
已失败 于阶段
in 2 second
变更
8
流水线
1
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
77 行增加
和
43 行删除
+77
-43
DoctorController.java
...d/account/account/server/controller/DoctorController.java
+6
-4
AccountInfoDetailMapper.java
...ccount/account/server/mapper/AccountInfoDetailMapper.java
+1
-0
DoctorMapper.java
...ica/cloud/account/account/server/mapper/DoctorMapper.java
+2
-0
DoctorService.java
...a/cloud/account/account/server/service/DoctorService.java
+7
-0
AccountServiceImpl.java
...count/account/server/service/impl/AccountServiceImpl.java
+1
-0
DoctorServiceImpl.java
...ccount/account/server/service/impl/DoctorServiceImpl.java
+13
-3
AccountInfoEntityMapper.xml
...er/src/main/resources/mybatis/AccountInfoEntityMapper.xml
+5
-0
DoctorMapper.xml
server/src/main/resources/mybatis/DoctorMapper.xml
+42
-36
未找到文件。
server/src/main/java/com/pica/cloud/account/account/server/controller/DoctorController.java
浏览文件 @
51c3e31b
...
@@ -72,8 +72,10 @@ public class DoctorController extends AccountBaseController {
...
@@ -72,8 +72,10 @@ public class DoctorController extends AccountBaseController {
}
}
@ApiOperation
(
"客服系统删除医生信息"
)
// public PicaResponse deleteDoctor(){
@GetMapping
(
value
=
"/delete/{id}"
)
//
public
PicaResponse
deleteDoctor
(
@PathVariable
(
"id"
)
Integer
id
)
{
// }
doctorService
.
deleteDoctorInfo
(
id
);
return
PicaResponse
.
toResponse
();
}
}
}
server/src/main/java/com/pica/cloud/account/account/server/mapper/AccountInfoDetailMapper.java
浏览文件 @
51c3e31b
...
@@ -49,4 +49,5 @@ public interface AccountInfoDetailMapper {
...
@@ -49,4 +49,5 @@ public interface AccountInfoDetailMapper {
int
insertSelective
(
AccountInfoEntity
record
);
int
insertSelective
(
AccountInfoEntity
record
);
void
updateDeleteByPrimaryKey
(
Integer
acctId
);
}
}
server/src/main/java/com/pica/cloud/account/account/server/mapper/DoctorMapper.java
浏览文件 @
51c3e31b
...
@@ -73,6 +73,8 @@ public interface DoctorMapper {
...
@@ -73,6 +73,8 @@ public interface DoctorMapper {
PICAPDoctor
queryDoctor
(
long
doctorId
);
PICAPDoctor
queryDoctor
(
long
doctorId
);
void
updateDeleteByPrimaryKey
(
Integer
id
);
/**
/**
* 通过手机号获取用户id
* 通过手机号获取用户id
* @param mobile
* @param mobile
...
...
server/src/main/java/com/pica/cloud/account/account/server/service/DoctorService.java
浏览文件 @
51c3e31b
...
@@ -24,6 +24,13 @@ public interface DoctorService {
...
@@ -24,6 +24,13 @@ public interface DoctorService {
*/
*/
void
modifyDoctorInfo
(
Doctor
doctor
);
void
modifyDoctorInfo
(
Doctor
doctor
);
/**
* 修改医生信息
*
* @param id 待修改数据
*/
void
deleteDoctorInfo
(
Integer
id
);
/**
/**
* 客服系统新增医生用户
* 客服系统新增医生用户
*
*
...
...
server/src/main/java/com/pica/cloud/account/account/server/service/impl/AccountServiceImpl.java
浏览文件 @
51c3e31b
...
@@ -35,6 +35,7 @@ public class AccountServiceImpl implements AccountService {
...
@@ -35,6 +35,7 @@ public class AccountServiceImpl implements AccountService {
@Autowired
@Autowired
private
AccountMapper
accountMapper
;
private
AccountMapper
accountMapper
;
@Autowired
@Autowired
private
AccountInfoDetailMapper
accountInfoDetailMapper
;
private
AccountInfoDetailMapper
accountInfoDetailMapper
;
@Autowired
@Autowired
...
...
server/src/main/java/com/pica/cloud/account/account/server/service/impl/DoctorServiceImpl.java
浏览文件 @
51c3e31b
...
@@ -41,15 +41,15 @@ public class DoctorServiceImpl implements DoctorService {
...
@@ -41,15 +41,15 @@ public class DoctorServiceImpl implements DoctorService {
@Override
@Override
public
void
modifyDoctorInfo
(
Doctor
doctor
)
{
public
void
modifyDoctorInfo
(
Doctor
doctor
)
{
Integer
id
=
doctor
.
getId
();
Integer
id
=
doctor
.
getId
();
if
(
id
==
null
)
{
if
(
id
==
null
)
{
throw
new
AccountException
(
AccountExceptionEnum
.
PICA_PARAMS_ERROR
);
throw
new
AccountException
(
AccountExceptionEnum
.
PICA_PARAMS_ERROR
);
}
}
Doctor
entity
=
doctorMapper
.
selectByPrimaryKey
(
id
);
Doctor
entity
=
doctorMapper
.
selectByPrimaryKey
(
id
);
if
(
entity
==
null
)
{
if
(
entity
==
null
)
{
throw
new
AccountException
(
AccountExceptionEnum
.
PICA_NOT_EXIST
);
throw
new
AccountException
(
AccountExceptionEnum
.
PICA_NOT_EXIST
);
}
}
String
mobilePhone
=
doctor
.
getMobilePhone
();
String
mobilePhone
=
doctor
.
getMobilePhone
();
if
(!
StringUtils
.
isBlank
(
mobilePhone
)){
if
(!
StringUtils
.
isBlank
(
mobilePhone
))
{
AccountUtils
.
checkMobilePhone
(
doctor
.
getMobilePhone
());
AccountUtils
.
checkMobilePhone
(
doctor
.
getMobilePhone
());
}
}
doctor
.
setMobilePhone
(
AESUtil
.
encryptV0
(
mobilePhone
));
doctor
.
setMobilePhone
(
AESUtil
.
encryptV0
(
mobilePhone
));
...
@@ -57,6 +57,16 @@ public class DoctorServiceImpl implements DoctorService {
...
@@ -57,6 +57,16 @@ public class DoctorServiceImpl implements DoctorService {
doctorMapper
.
updateByPrimaryKeySelective
(
doctor
);
doctorMapper
.
updateByPrimaryKeySelective
(
doctor
);
}
}
@Transactional
@Override
public
void
deleteDoctorInfo
(
Integer
id
)
{
//p_doctor表修改记录状态
doctorMapper
.
updateDeleteByPrimaryKey
(
id
);
Doctor
doctor
=
doctorMapper
.
selectByPrimaryKey
(
id
);
Integer
acctId
=
doctor
.
getAcctId
();
accountInfoDetailMapper
.
updateDeleteByPrimaryKey
(
acctId
);
}
/**
/**
* 客服管理后台添加医生
* 客服管理后台添加医生
* 1)当前医生信息是否存在,如果已经存在直接抛出异常;
* 1)当前医生信息是否存在,如果已经存在直接抛出异常;
...
...
server/src/main/resources/mybatis/AccountInfoEntityMapper.xml
浏览文件 @
51c3e31b
...
@@ -43,6 +43,11 @@
...
@@ -43,6 +43,11 @@
update account_info set created_id=#{acctId}, modified_id=#{acctId} where id=#{acctId}
update account_info set created_id=#{acctId}, modified_id=#{acctId} where id=#{acctId}
</update>
</update>
<!--逻辑删除用户-->
<update
id=
"updateDeleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
update account_info set delete_flag=2,modified_time=now(), modified_id=#{acctId} where id=#{acctId}
</update>
<!--更新用户的手机号-->
<!--更新用户的手机号-->
<update
id=
"updateMobileByPrimaryKey"
<update
id=
"updateMobileByPrimaryKey"
parameterType=
"com.pica.cloud.account.account.server.entity.AccountInfoEntity"
>
parameterType=
"com.pica.cloud.account.account.server.entity.AccountInfoEntity"
>
...
...
server/src/main/resources/mybatis/DoctorMapper.xml
浏览文件 @
51c3e31b
...
@@ -92,7 +92,8 @@
...
@@ -92,7 +92,8 @@
<!--通过手机号码查询医生信息-->
<!--通过手机号码查询医生信息-->
<select
id=
"getDoctorInfoByMobile"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
<select
id=
"getDoctorInfoByMobile"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM p_doctor
FROM p_doctor
where mobile_phone = #{phone}
where mobile_phone = #{phone}
and delete_flag = 1
and delete_flag = 1
...
@@ -105,6 +106,11 @@
...
@@ -105,6 +106,11 @@
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</select>
</select>
<!--删除用户-->
<update
id=
"updateDeleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
update p_doctor set delete_flag=2,modify_time=now(), modify_id=#{id} where id=#{id} limit 1
</update>
<!--根据手机号获取数据-->
<!--根据手机号获取数据-->
<!--<select id="getDoctorInfoByMobile" resultType="com.pica.cloud.account.account.server.entity.DoctorEntity"-->
<!--<select id="getDoctorInfoByMobile" resultType="com.pica.cloud.account.account.server.entity.DoctorEntity"-->
<!--parameterType="java.lang.String">-->
<!--parameterType="java.lang.String">-->
...
@@ -323,7 +329,6 @@
...
@@ -323,7 +329,6 @@
</update>
</update>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from p_doctor
delete from p_doctor
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
...
@@ -372,7 +377,8 @@
...
@@ -372,7 +377,8 @@
#{birthday,jdbcType=DATE}, #{showFlag,jdbcType=INTEGER}, #{acctId,jdbcType=INTEGER}
#{birthday,jdbcType=DATE}, #{showFlag,jdbcType=INTEGER}, #{acctId,jdbcType=INTEGER}
)
)
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.pica.cloud.account.account.server.entity.Doctor"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<insert
id=
"insertSelective"
parameterType=
"com.pica.cloud.account.account.server.entity.Doctor"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into p_doctor
insert into p_doctor
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
...
@@ -926,7 +932,6 @@
...
@@ -926,7 +932,6 @@
</update>
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.pica.cloud.account.account.server.entity.Doctor"
>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.pica.cloud.account.account.server.entity.Doctor"
>
update p_doctor
update p_doctor
set sex = #{sex,jdbcType=INTEGER},
set sex = #{sex,jdbcType=INTEGER},
...
@@ -1003,7 +1008,8 @@
...
@@ -1003,7 +1008,8 @@
where acct_id = #{acctId}
where acct_id = #{acctId}
</update>
</update>
<select
id=
"queryDoctor"
resultType=
"com.pica.cloud.account.account.server.entity.PICAPDoctor"
parameterType=
"java.lang.Long"
>
<select
id=
"queryDoctor"
resultType=
"com.pica.cloud.account.account.server.entity.PICAPDoctor"
parameterType=
"java.lang.Long"
>
SELECT aa.id, aa.sex, aa.name, aa.mobile_phone, aa.status,
SELECT aa.id, aa.sex, aa.name, aa.mobile_phone, aa.status,
aa.type, aa.hospital_id, aa.department_id, aa.title_id,aa.card,
aa.type, aa.hospital_id, aa.department_id, aa.title_id,aa.card,
aa.hospital as hospital, aa.department, aa.title, aa.cert_image_url,
aa.hospital as hospital, aa.department, aa.title, aa.cert_image_url,
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录