Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-cloud-yunqueyilian
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.wechat
pica-cloud-yunqueyilian
提交
e3f61fc8
提交
e3f61fc8
编写于
11月 04, 2020
作者:
wangyongbo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改刷数据逻辑
上级
00e23cfe
变更
7
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
164 行增加
和
2 行删除
+164
-2
PatPatientRepeat.java
...queyilian/server/controller/refresh/PatPatientRepeat.java
+44
-0
RefreshController.java
...ueyilian/server/controller/refresh/RefreshController.java
+13
-0
RefreshService.java
...unqueyilian/server/controller/refresh/RefreshService.java
+2
-0
RefreshServiceImpl.java
...eyilian/server/controller/refresh/RefreshServiceImpl.java
+32
-1
RefreshMapper.java
...loud/wechat/yunqueyilian/server/mapper/RefreshMapper.java
+11
-0
ReturnUtil.java
...ca/cloud/wechat/yunqueyilian/server/utils/ReturnUtil.java
+10
-1
RefreshMapper.xml
server/src/main/resources/mybatis/RefreshMapper.xml
+52
-0
未找到文件。
server/src/main/java/com/pica/cloud/wechat/yunqueyilian/server/controller/refresh/PatPatientRepeat.java
0 → 100644
浏览文件 @
e3f61fc8
package
com
.
pica
.
cloud
.
wechat
.
yunqueyilian
.
server
.
controller
.
refresh
;
public
class
PatPatientRepeat
{
private
Integer
id
;
private
String
nickname
;
private
String
mobilePhone
;
private
String
ids
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getNickname
()
{
return
nickname
;
}
public
void
setNickname
(
String
nickname
)
{
this
.
nickname
=
nickname
==
null
?
null
:
nickname
.
trim
();
}
public
String
getMobilePhone
()
{
return
mobilePhone
;
}
public
void
setMobilePhone
(
String
mobilePhone
)
{
this
.
mobilePhone
=
mobilePhone
==
null
?
null
:
mobilePhone
.
trim
();
}
public
String
getIds
()
{
return
ids
;
}
public
void
setIds
(
String
ids
)
{
this
.
ids
=
ids
;
}
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/wechat/yunqueyilian/server/controller/refresh/RefreshController.java
浏览文件 @
e3f61fc8
...
@@ -31,6 +31,19 @@ public class RefreshController extends BaseController {
...
@@ -31,6 +31,19 @@ public class RefreshController extends BaseController {
return
ReturnUtil
.
getPicaResponse
(
PicaResultCode
.
SUCCESS
);
return
ReturnUtil
.
getPicaResponse
(
PicaResultCode
.
SUCCESS
);
}
}
@LoginPermission
@PostMapping
(
"/initPatient2"
)
public
PicaResponse
initPatient2
(
@RequestParam
(
"id"
)
Integer
id
)
{
PicaUser
picaUser
=
fetchPicaUser
();
if
(
picaUser
.
getId
()
==
766
)
{
refreshService
.
initPatient2
(
id
);
}
return
ReturnUtil
.
getPicaResponse
(
PicaResultCode
.
SUCCESS
);
}
@LoginPermission
@LoginPermission
@PostMapping
(
"/patDocMapping1"
)
@PostMapping
(
"/patDocMapping1"
)
public
PicaResponse
patDocMapping1
(
@RequestParam
(
"id"
)
Integer
id
)
{
public
PicaResponse
patDocMapping1
(
@RequestParam
(
"id"
)
Integer
id
)
{
...
...
server/src/main/java/com/pica/cloud/wechat/yunqueyilian/server/controller/refresh/RefreshService.java
浏览文件 @
e3f61fc8
...
@@ -14,6 +14,8 @@ public interface RefreshService {
...
@@ -14,6 +14,8 @@ public interface RefreshService {
void
initPatient
(
Integer
id
);
void
initPatient
(
Integer
id
);
void
initPatient2
(
Integer
id
);
void
patDocMapping1
(
Integer
id
);
void
patDocMapping1
(
Integer
id
);
void
patDocMapping2
(
Integer
id
);
void
patDocMapping2
(
Integer
id
);
...
...
server/src/main/java/com/pica/cloud/wechat/yunqueyilian/server/controller/refresh/RefreshServiceImpl.java
浏览文件 @
e3f61fc8
package
com
.
pica
.
cloud
.
wechat
.
yunqueyilian
.
server
.
controller
.
refresh
;
package
com
.
pica
.
cloud
.
wechat
.
yunqueyilian
.
server
.
controller
.
refresh
;
import
com.pica.cloud.foundation.utils.utils.StringUtil
;
import
com.pica.cloud.wechat.yunqueyilian.server.mapper.RefreshMapper
;
import
com.pica.cloud.wechat.yunqueyilian.server.mapper.RefreshMapper
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -42,7 +43,8 @@ public class RefreshServiceImpl implements RefreshService {
...
@@ -42,7 +43,8 @@ public class RefreshServiceImpl implements RefreshService {
List
<
PatPatient
>
patRealList
=
new
ArrayList
<>();
List
<
PatPatient
>
patRealList
=
new
ArrayList
<>();
for
(
PatPatient
pat
:
patList
)
{
for
(
PatPatient
pat
:
patList
)
{
/**校验是否有已存在业务,商城、服务包、微信绑定*/
/**校验是否有已存在业务,商城、服务包、微信绑定*/
if
(
refreshMapper
.
validateTradeOrder
(
pat
.
getId
())
>
0
||
refreshMapper
.
validateFollowUp
(
pat
.
getId
())
>
0
||
refreshMapper
.
validateWechat
(
pat
.
getId
())
>
0
)
{
if
(
refreshMapper
.
validateTradeOrder
(
pat
.
getId
())
>
0
||
refreshMapper
.
validateAddress
(
pat
.
getId
())
>
0
||
refreshMapper
.
validateFollowUp
(
pat
.
getId
())
>
0
||
refreshMapper
.
validateWechat
(
pat
.
getId
())
>
0
)
{
continue
;
continue
;
}
else
{
}
else
{
patRealList
.
add
(
pat
);
patRealList
.
add
(
pat
);
...
@@ -93,5 +95,34 @@ public class RefreshServiceImpl implements RefreshService {
...
@@ -93,5 +95,34 @@ public class RefreshServiceImpl implements RefreshService {
}
}
}
}
}
}
@Override
public
void
initPatient2
(
Integer
id
)
{
List
<
PatPatientRepeat
>
list
=
refreshMapper
.
queryRepeatPat2
(
id
);
int
refreshIndex
=
0
;
logger
.
info
(
"开始处理数据:"
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
for
(
PatPatientRepeat
repeat
:
list
)
{
if
(
StringUtil
.
isNotNull
(
repeat
.
getIds
()))
{
String
[]
strIds
=
repeat
.
getIds
().
split
(
","
);
List
<
PatPatient
>
patPatients
=
refreshMapper
.
queryListPatByIds
(
strIds
);
if
(
CollectionUtils
.
isNotEmpty
(
patPatients
))
{
for
(
PatPatient
pat
:
patPatients
)
{
/**校验是否有已存在业务,商城、服务包、微信绑定*/
if
(
refreshMapper
.
validateTradeOrder
(
pat
.
getId
())
>
0
||
refreshMapper
.
validateAddress
(
pat
.
getId
())
>
0
||
refreshMapper
.
validateFollowUp
(
pat
.
getId
())
>
0
)
{
continue
;
}
else
{
if
(
refreshMapper
.
validateWechat
(
pat
.
getId
())
>
0
)
{
refreshMapper
.
updateRatient
(
pat
.
getId
());
refreshMapper
.
updateRatientInfo
(
pat
.
getId
());
}
}
}
}
}
}
}
}
}
}
server/src/main/java/com/pica/cloud/wechat/yunqueyilian/server/mapper/RefreshMapper.java
浏览文件 @
e3f61fc8
...
@@ -2,6 +2,7 @@ package com.pica.cloud.wechat.yunqueyilian.server.mapper;
...
@@ -2,6 +2,7 @@ package com.pica.cloud.wechat.yunqueyilian.server.mapper;
import
com.pica.cloud.wechat.yunqueyilian.server.controller.refresh.PatDocPatMapping
;
import
com.pica.cloud.wechat.yunqueyilian.server.controller.refresh.PatDocPatMapping
;
import
com.pica.cloud.wechat.yunqueyilian.server.controller.refresh.PatPatient
;
import
com.pica.cloud.wechat.yunqueyilian.server.controller.refresh.PatPatient
;
import
com.pica.cloud.wechat.yunqueyilian.server.controller.refresh.PatPatientRepeat
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -17,6 +18,8 @@ public interface RefreshMapper {
...
@@ -17,6 +18,8 @@ public interface RefreshMapper {
Integer
validateTradeOrder
(
@Param
(
"id"
)
Integer
id
);
Integer
validateTradeOrder
(
@Param
(
"id"
)
Integer
id
);
Integer
validateAddress
(
@Param
(
"id"
)
Integer
id
);
Integer
validateFollowUp
(
@Param
(
"id"
)
Integer
id
);
Integer
validateFollowUp
(
@Param
(
"id"
)
Integer
id
);
Integer
validateWechat
(
@Param
(
"id"
)
Integer
id
);
Integer
validateWechat
(
@Param
(
"id"
)
Integer
id
);
...
@@ -39,4 +42,12 @@ public interface RefreshMapper {
...
@@ -39,4 +42,12 @@ public interface RefreshMapper {
void
updatePatMaping2
(
PatDocPatMapping
mapping
);
void
updatePatMaping2
(
PatDocPatMapping
mapping
);
List
<
PatPatientRepeat
>
queryRepeatPat2
(
@Param
(
"id"
)
Integer
id
);
List
<
PatPatient
>
queryListPatByIds
(
@Param
(
"ids"
)
String
[]
ids
);
void
updateRatient
(
@Param
(
"id"
)
Integer
id
);
void
updateRatientInfo
(
@Param
(
"id"
)
Integer
id
);
}
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/wechat/yunqueyilian/server/utils/ReturnUtil.java
浏览文件 @
e3f61fc8
...
@@ -6,13 +6,15 @@ import com.pica.cloud.foundation.entity.PicaResultCode;
...
@@ -6,13 +6,15 @@ import com.pica.cloud.foundation.entity.PicaResultCode;
/**
/**
* 封装返回参数工具类
* 封装返回参数工具类
*
* @author andong
* @author andong
* @create 2018/7/4
* @create 2018/7/4
*/
*/
public
class
ReturnUtil
{
public
class
ReturnUtil
{
private
ReturnUtil
(){
private
ReturnUtil
()
{
throw
new
IllegalStateException
(
"Utility class"
);
throw
new
IllegalStateException
(
"Utility class"
);
}
}
//生成返回信息
//生成返回信息
public
static
<
T
>
PicaResponse
<
T
>
getPicaResponse
(
PicaResultCode
picaResultCode
)
{
public
static
<
T
>
PicaResponse
<
T
>
getPicaResponse
(
PicaResultCode
picaResultCode
)
{
PicaResponse
.
Builder
<
T
>
builder
=
new
PicaResponse
.
Builder
<>();
PicaResponse
.
Builder
<
T
>
builder
=
new
PicaResponse
.
Builder
<>();
...
@@ -37,4 +39,11 @@ public class ReturnUtil {
...
@@ -37,4 +39,11 @@ public class ReturnUtil {
return
builder
.
setCode
(
code
).
setMessage
(
message
).
setData
(
data
).
build
();
return
builder
.
setCode
(
code
).
setMessage
(
message
).
setData
(
data
).
build
();
}
}
public
static
void
main
(
String
[]
args
)
{
Integer
[]
integers
=
new
Integer
[]{};
String
[]
strs
=
new
String
[]{};
for
(
int
i
=
0
;
i
<
integers
.
length
;
i
++)
{
System
.
out
.
println
(
" update trade_goods_images set goods_img_url = '"
+
strs
[
i
]
+
"' where goods_id = "
+
integers
[
i
]
+
";"
);
}
}
}
}
server/src/main/resources/mybatis/RefreshMapper.xml
浏览文件 @
e3f61fc8
...
@@ -34,6 +34,14 @@
...
@@ -34,6 +34,14 @@
and delete_flag = 1
and delete_flag = 1
</select>
</select>
<select
id=
"validateAddress"
parameterType=
"java.lang.Integer"
resultType=
"java.lang.Integer"
>
select
count(1)
from pica_trade.trade_order_address
where patient_id = #{id}
and delete_flag = 1
</select>
<select
id=
"validateFollowUp"
parameterType=
"java.lang.Integer"
resultType=
"java.lang.Integer"
>
<select
id=
"validateFollowUp"
parameterType=
"java.lang.Integer"
resultType=
"java.lang.Integer"
>
select
select
count(1)
count(1)
...
@@ -140,5 +148,49 @@
...
@@ -140,5 +148,49 @@
) a
) a
)
)
</select>
</select>
<select
id=
"queryRepeatPat2"
resultType=
"com.pica.cloud.wechat.yunqueyilian.server.controller.refresh.PatPatientRepeat"
parameterType=
"java.lang.Integer"
>
select
nickname as nickname,
mobile_phone as mobilePhone,
ids as ids
from pat_patient_repeat_1102
where id > #{id}
and delete_flag = 1
and type = 1
and (mobile_phone is null or mobile_phone = '')
</select>
<select
id=
"queryListPatByIds"
parameterType=
"java.lang.Object"
resultType=
"com.pica.cloud.wechat.yunqueyilian.server.controller.refresh.PatPatient"
>
select
id as id,
nickname as nickname,
mobile_phone as mobilePhone
from pat_patient
where delete_flag = 1
and id in
<foreach
collection=
"ids"
index=
"index"
item=
"id"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
order by id desc
</select>
<update
id=
"updateRatient"
parameterType=
"java.lang.Integer"
>
update pat_patient
set nickname = '',
modified_id = 3,
modified_time = now()
where id = #{id}
and delete_flag = 1
</update>
<update
id=
"updateRatientInfo"
parameterType=
"java.lang.Integer"
>
update pat_patient_info
set nickname = '',
modified_id = 3,
modified_time = now()
where patient_id = #{id}
and delete_flag = 1
</update>
</mapper>
</mapper>
\ No newline at end of file
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录