Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
cms
Commits
23415e7a
提交
23415e7a
authored
8月 31, 2023
作者:
zhenjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
公众号用户同步功能
上级
b1a44cd4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
58 行增加
和
49 行删除
+58
-49
UserAccountVO.java
...c/main/java/com/mmc/iuav/user/model/vo/UserAccountVO.java
+2
-0
UserAccountServiceImpl.java
...om/mmc/iuav/user/service/impl/UserAccountServiceImpl.java
+10
-4
WxServiceImpl.java
...in/java/com/mmc/iuav/user/service/impl/WxServiceImpl.java
+2
-2
UserSubInfoDao.xml
...service-user/src/main/resources/mapper/UserSubInfoDao.xml
+44
-43
没有找到文件。
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/UserAccountVO.java
浏览文件 @
23415e7a
...
@@ -75,4 +75,6 @@ public class UserAccountVO implements Serializable {
...
@@ -75,4 +75,6 @@ public class UserAccountVO implements Serializable {
private
Integer
totalPoints
;
private
Integer
totalPoints
;
@ApiModelProperty
(
value
=
"小猪算账电签状态:0否,1是"
)
@ApiModelProperty
(
value
=
"小猪算账电签状态:0否,1是"
)
private
Integer
xzAuthStatus
;
private
Integer
xzAuthStatus
;
@ApiModelProperty
(
value
=
"是否关注公众号"
)
private
Integer
subStatus
;
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/UserAccountServiceImpl.java
浏览文件 @
23415e7a
...
@@ -6,10 +6,7 @@ import com.mmc.iuav.response.ResultBody;
...
@@ -6,10 +6,7 @@ import com.mmc.iuav.response.ResultBody;
import
com.mmc.iuav.response.ResultEnum
;
import
com.mmc.iuav.response.ResultEnum
;
import
com.mmc.iuav.user.controller.userpoints.config.NumberOfUserPoints
;
import
com.mmc.iuav.user.controller.userpoints.config.NumberOfUserPoints
;
import
com.mmc.iuav.user.controller.userpoints.config.UserPointsEnum
;
import
com.mmc.iuav.user.controller.userpoints.config.UserPointsEnum
;
import
com.mmc.iuav.user.dao.CompanyDao
;
import
com.mmc.iuav.user.dao.*
;
import
com.mmc.iuav.user.dao.CooperationDao
;
import
com.mmc.iuav.user.dao.RealNameAuthDao
;
import
com.mmc.iuav.user.dao.UserServiceDao
;
import
com.mmc.iuav.user.dao.userpoints.UserPointsDao
;
import
com.mmc.iuav.user.dao.userpoints.UserPointsDao
;
import
com.mmc.iuav.user.dao.userpoints.UserPointsDetailsDao
;
import
com.mmc.iuav.user.dao.userpoints.UserPointsDetailsDao
;
import
com.mmc.iuav.user.dao.xzsz.XzDao
;
import
com.mmc.iuav.user.dao.xzsz.XzDao
;
...
@@ -80,6 +77,9 @@ public class UserAccountServiceImpl implements UserAccountService {
...
@@ -80,6 +77,9 @@ public class UserAccountServiceImpl implements UserAccountService {
@Autowired
@Autowired
private
XzDao
xzDao
;
private
XzDao
xzDao
;
@Autowired
private
UserSubInfoDao
userSubInfoDao
;
@Override
@Override
public
UserAccountVO
getUserAccountInfoByUnionId
(
String
unionId
)
{
public
UserAccountVO
getUserAccountInfoByUnionId
(
String
unionId
)
{
...
@@ -122,6 +122,12 @@ public class UserAccountServiceImpl implements UserAccountService {
...
@@ -122,6 +122,12 @@ public class UserAccountServiceImpl implements UserAccountService {
if
(
xzAuthDO
!=
null
)
{
if
(
xzAuthDO
!=
null
)
{
userAccountVO
.
setXzAuthStatus
(
xzAuthDO
.
getXzAuthStatus
());
userAccountVO
.
setXzAuthStatus
(
xzAuthDO
.
getXzAuthStatus
());
}
}
UserSubInfoDO
userSubInfoDO
=
userSubInfoDao
.
getUserSubInfoByUnionId
(
userAccountDO
.
getUnionId
());
if
(
userSubInfoDO
!=
null
&&
userSubInfoDO
.
getRegStatus
().
equals
(
1
))
{
userAccountVO
.
setSubStatus
(
1
);
}
else
{
userAccountVO
.
setSubStatus
(
0
);
}
return
userAccountVO
;
return
userAccountVO
;
}
}
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/WxServiceImpl.java
浏览文件 @
23415e7a
...
@@ -247,7 +247,7 @@ public class WxServiceImpl implements WxService {
...
@@ -247,7 +247,7 @@ public class WxServiceImpl implements WxService {
public
ResultBody
sendSubTemplateMsg
(
WxMsgVO
ws
)
{
public
ResultBody
sendSubTemplateMsg
(
WxMsgVO
ws
)
{
String
accessToken
=
null
;
String
accessToken
=
null
;
try
{
try
{
accessToken
=
this
.
getSubAccessToken
();
accessToken
=
this
.
getSub
Stable
AccessToken
();
String
url
=
"https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="
+
accessToken
;
String
url
=
"https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="
+
accessToken
;
String
param
=
ws
.
buildTemplateMsg
();
String
param
=
ws
.
buildTemplateMsg
();
String
result
=
HttpHelper
.
httpPost
(
url
,
param
);
String
result
=
HttpHelper
.
httpPost
(
url
,
param
);
...
@@ -378,7 +378,7 @@ public class WxServiceImpl implements WxService {
...
@@ -378,7 +378,7 @@ public class WxServiceImpl implements WxService {
@Override
@Override
public
ResultBody
moveSubUserUnionIdToTest
()
{
public
ResultBody
moveSubUserUnionIdToTest
()
{
String
accessToken
=
this
.
getSubStableAccessToken
();
String
accessToken
=
this
.
getSubStableAccessToken
();
String
url
=
"https://api.weixin.qq.com/cgi-bin/user/get?access_token="
+
accessToken
+
"&next_openid="
+
"oB6kk6
tIoPLdaHGVv3oImiCVpyVw
"
;
String
url
=
"https://api.weixin.qq.com/cgi-bin/user/get?access_token="
+
accessToken
+
"&next_openid="
+
"oB6kk6
obNektxM62mjj9PJHPtcME
"
;
String
jsonStr
=
HttpsRequestUtil
.
httpsGet
(
url
,
null
);
String
jsonStr
=
HttpsRequestUtil
.
httpsGet
(
url
,
null
);
log
.
info
(
"all users:{}"
,
jsonStr
);
log
.
info
(
"all users:{}"
,
jsonStr
);
JSONObject
obj
=
JSONObject
.
parseObject
(
jsonStr
);
JSONObject
obj
=
JSONObject
.
parseObject
(
jsonStr
);
...
...
csm-service/cms-service-user/src/main/resources/mapper/UserSubInfoDao.xml
浏览文件 @
23415e7a
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mmc.iuav.user.dao.UserSubInfoDao"
>
<mapper
namespace=
"com.mmc.iuav.user.dao.UserSubInfoDao"
>
<resultMap
id=
"userSubInfoResultMap"
type=
"com.mmc.iuav.user.entity.UserSubInfoDO"
>
<resultMap
id=
"userSubInfoResultMap"
type=
"com.mmc.iuav.user.entity.UserSubInfoDO"
>
<id
property=
"id"
column=
"id"
/>
<id
property=
"id"
column=
"id"
/>
<result
property=
"openId"
column=
"open_id"
/>
<result
property=
"openId"
column=
"open_id"
/>
<result
property=
"unionId"
column=
"union_id"
/>
<result
property=
"unionId"
column=
"union_id"
/>
<result
property=
"nickName"
column=
"nick_name"
/>
<result
property=
"nickName"
column=
"nick_name"
/>
<result
property=
"regStatus"
column=
"reg_status"
/>
<result
property=
"regStatus"
column=
"reg_status"
/>
<result
property=
"deleted"
column=
"is_deleted"
/>
<result
property=
"deleted"
column=
"is_deleted"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
</resultMap>
<select
id=
"getUserSubInfo"
resultMap=
"userSubInfoResultMap"
parameterType=
"String"
>
<select
id=
"getUserSubInfo"
resultMap=
"userSubInfoResultMap"
parameterType=
"String"
>
select u.id,u.open_id,u.union_id,u.nick_name,u.reg_status,
select u.id,u.open_id,u.union_id,u.nick_name,u.reg_status,
u.is_deleted,u.create_time,u.update_time
u.is_deleted,u.create_time,u.update_time
from user_sub_info u
from user_sub_info u
where u.open_id = #{openId}
where u.open_id = #{openId}
</select>
</select>
<select
id=
"getUserSubInfoById"
resultMap=
"userSubInfoResultMap"
parameterType=
"Integer"
>
<select
id=
"getUserSubInfoById"
resultMap=
"userSubInfoResultMap"
parameterType=
"Integer"
>
select usi.id,usi.open_id,usi.union_id,usi.nick_name,usi.is_deleted
select usi.id,usi.open_id,usi.union_id,usi.nick_name,usi.is_deleted
from user_account ua
from user_account ua
inner join user_sub_info usi on usi.union_id=ua.union_id
inner join user_sub_info usi on usi.union_id=ua.union_id
where usi.is_deleted=0 and ua.is_deleted=0
where usi.is_deleted=0 and ua.is_deleted=0
and ua.user_account_id = #{userAccountId}
and ua.user_account_id = #{userAccountId}
</select>
</select>
<select
id=
"getUserSubInfoByUnionId"
resultMap=
"userSubInfoResultMap"
parameterType=
"String"
>
<select
id=
"getUserSubInfoByUnionId"
resultMap=
"userSubInfoResultMap"
parameterType=
"String"
>
select usi.id,usi.open_id,usi.union_id,usi.nick_name,usi.is_deleted
select usi.id,usi.open_id,usi.union_id,usi.nick_name,usi.is_deleted
,usi.reg_status
from user_sub_info usi
from user_sub_info usi
where usi.union_id = #{unionId} and usi.is_deleted=0
where usi.union_id = #{unionId} and usi.is_deleted=0
</select>
</select>
<select
id=
"countUserSubInfo"
resultType=
"Integer"
parameterType=
"String"
>
<select
id=
"countUserSubInfo"
resultType=
"Integer"
parameterType=
"String"
>
select count(*)
select count(*)
from user_sub_info u
from user_sub_info u
where u.open_id = #{openId} and is_deleted = 0
where u.open_id = #{openId} and is_deleted = 0
</select>
</select>
<insert
id=
"insertUserSubInfo"
useGeneratedKeys=
"true"
<insert
id=
"insertUserSubInfo"
useGeneratedKeys=
"true"
keyProperty=
"id"
parameterType=
"com.mmc.iuav.user.entity.UserSubInfoDO"
>
keyProperty=
"id"
parameterType=
"com.mmc.iuav.user.entity.UserSubInfoDO"
>
insert into user_sub_info
insert into user_sub_info
(
(
open_id,union_id,nick_name,reg_status,is_deleted,create_time,update_time
open_id,union_id,nick_name,reg_status,is_deleted,create_time,update_time
...
@@ -53,28 +53,28 @@
...
@@ -53,28 +53,28 @@
#{openId},#{unionId},#{nickName},#{regStatus},#{deleted},#{createTime},#{updateTime}
#{openId},#{unionId},#{nickName},#{regStatus},#{deleted},#{createTime},#{updateTime}
)
)
</insert>
</insert>
<update
id=
"removeUserSubInfo"
parameterType=
"String"
>
<update
id=
"removeUserSubInfo"
parameterType=
"String"
>
update user_sub_info
update user_sub_info
set is_deleted = 1
set is_deleted = 1
where open_id = #{openId}
where open_id = #{openId}
</update>
</update>
<update
id=
"updateUserSubInfo"
<update
id=
"updateUserSubInfo"
parameterType=
"com.mmc.iuav.user.entity.UserSubInfoDO"
>
parameterType=
"com.mmc.iuav.user.entity.UserSubInfoDO"
>
update user_sub_info
update user_sub_info
<set>
<set>
<if
test=
"unionId != null and unionId != '' "
>
<if
test=
"unionId != null and unionId != '' "
>
union_id = #{unionId},
union_id = #{unionId},
</if>
</if>
<if
test=
"nickName != null"
>
<if
test=
"nickName != null"
>
nick_name = #{nickName},
nick_name = #{nickName},
</if>
</if>
<if
test=
"regStatus != null"
>
<if
test=
"regStatus != null"
>
reg_status = #{regStatus},
reg_status = #{regStatus},
</if>
</if>
</set>
</set>
where open_id = #{openId}
where open_id = #{openId}
</update>
</update>
</mapper>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论