提交 514ec5e5 作者: han

Merge branch 'develop' of http://git.mmcuav.cn/iuav/cms into develop

流水线 #7709 已通过 于阶段
in 2 分 24 秒
...@@ -22,4 +22,6 @@ public interface UserSubInfoDao { ...@@ -22,4 +22,6 @@ public interface UserSubInfoDao {
void removeUserSubInfo(String openId); void removeUserSubInfo(String openId);
void updateUserSubInfo(UserSubInfoDO subInfo); void updateUserSubInfo(UserSubInfoDO subInfo);
String getUserOpenidByUnionId(String unionId);
} }
...@@ -17,6 +17,7 @@ import com.mmc.iuav.user.dao.userpoints.UserPointsDao; ...@@ -17,6 +17,7 @@ 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.entity.CompanyInfoDO; import com.mmc.iuav.user.entity.CompanyInfoDO;
import com.mmc.iuav.user.entity.UserAccountDO; import com.mmc.iuav.user.entity.UserAccountDO;
import com.mmc.iuav.user.entity.UserSubInfoDO;
import com.mmc.iuav.user.entity.dronepilot.*; import com.mmc.iuav.user.entity.dronepilot.*;
import com.mmc.iuav.user.entity.userpoints.UserPointsDO; import com.mmc.iuav.user.entity.userpoints.UserPointsDO;
import com.mmc.iuav.user.entity.userpoints.UserPointsDetails; import com.mmc.iuav.user.entity.userpoints.UserPointsDetails;
...@@ -314,7 +315,7 @@ public class PilotCertificationServiceImpl implements PilotCertificationService ...@@ -314,7 +315,7 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
WxMsgVO ws = new WxMsgVO(); WxMsgVO ws = new WxMsgVO();
String unionId = userAccountDO.getUnionId(); String unionId = userAccountDO.getUnionId();
// 查询对应的openId(touser) // 查询对应的openId(touser)
String touser = userSubInfoDao.getUserSubInfoByUnionId(unionId).getOpenId(); String touser = userSubInfoDao.getUserOpenidByUnionId(unionId);
JSONObject jsonObject = spellMsg("飞手执照及能力认证","审核通过"); JSONObject jsonObject = spellMsg("飞手执照及能力认证","审核通过");
ws.setTouser(touser); ws.setTouser(touser);
ws.setTemplateId("9qvgBhfW9yoQJY91iMfhrog8y5eZUPSbo9PLvQzS_vk"); ws.setTemplateId("9qvgBhfW9yoQJY91iMfhrog8y5eZUPSbo9PLvQzS_vk");
......
...@@ -255,8 +255,8 @@ public class WxServiceImpl implements WxService { ...@@ -255,8 +255,8 @@ public class WxServiceImpl implements WxService {
try { try {
accessToken = this.getSubStableAccessToken(); accessToken = this.getSubStableAccessToken();
if (StringUtils.isBlank(ws.getTouser())) { if (StringUtils.isBlank(ws.getTouser())) {
String unionId = userServiceDao.getUserAccountById(ws.getUserAccountId()).getUnionId(); String unionId = userServiceDao.getUserAccountById(ws.getUserAccountId()).getUnionId();// 查询对应的openId(touser)
String touser = userSubInfoDao.getUserSubInfoByUnionId(unionId).getOpenId(); String touser = userSubInfoDao.getUserOpenidByUnionId(unionId);
ws.setTouser(touser); ws.setTouser(touser);
} }
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;
......
...@@ -41,8 +41,13 @@ ...@@ -41,8 +41,13 @@
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>
<select id="getUserOpenidByUnionId" resultType="java.lang.String">
select usi.open_id
from user_sub_info usi
where usi.union_id = #{unionId} and usi.is_deleted=0
</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
( (
......
...@@ -18,4 +18,4 @@ patches: ...@@ -18,4 +18,4 @@ patches:
images: images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG - name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms
newTag: 3ddf3987db40cb422ed301bc69f812b36fa7c298 newTag: 894d7be623eced6509af2c43ce3cee0eb3485a5b
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论