Commit 02fd1d30 by 墨竹

Merge branch 'feature_0711' into developer

parents 55e730ae 12935ae8
...@@ -1988,13 +1988,20 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA ...@@ -1988,13 +1988,20 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
ServiceResponse serviceResponse = new ServiceResponse(); ServiceResponse serviceResponse = new ServiceResponse();
if (wxEnterpriseDTO == null) { if (wxEnterpriseDTO == null) {
serviceResponse.setCode(HaoBanErrCodeCommon.ERR_0.getCode()); serviceResponse.setCode(HaoBanErrCodeCommon.ERR_0.getCode());
serviceResponse.setMessage("企微不存在"); serviceResponse.setMessage("企微应用不存在");
return serviceResponse;
}
TabHaobanWxApplication tabHaobanWxApplication = wxApplicationMapper.selectByWxEnterpriseIdAndApplicationType(wxEnterpriseId, 3);
if (tabHaobanWxApplication == null) {
serviceResponse.setCode(HaoBanErrCodeCommon.ERR_0.getCode());
serviceResponse.setMessage("企微代开发应用不存在");
return serviceResponse; return serviceResponse;
} }
if (RedisUtil.isLocked(lockKey)) { if (RedisUtil.isLocked(lockKey)) {
log.info("redis锁,lockKey:{}", lockKey); log.info("redis锁,lockKey:{}", lockKey);
String corpName = wxEnterpriseDTO.getCorpName(); String corpName = tabHaobanWxApplication.getCorpid();
serviceResponse.setCode(HaoBanErrCodeCommon.ERR_0.getCode()); serviceResponse.setCode(HaoBanErrCodeCommon.ERR_0.getCode());
serviceResponse.setMessage(corpName + "已经在转换中,请勿重复操作!"); serviceResponse.setMessage(corpName + "已经在转换中,请勿重复操作!");
return serviceResponse; return serviceResponse;
...@@ -2007,7 +2014,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA ...@@ -2007,7 +2014,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
return serviceResponse; return serviceResponse;
} }
String corpid = wxEnterpriseDTO.getCorpid(); String corpid = tabHaobanWxApplication.getCorpid();
RedisUtil.lock(lockKey, 2L, TimeUnit.HOURS, 0L); RedisUtil.lock(lockKey, 2L, TimeUnit.HOURS, 0L);
...@@ -2094,7 +2101,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA ...@@ -2094,7 +2101,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
private void updateUseridFlagById(String wxEnterpriseId, String corpid) { private void updateUseridFlagById(String wxEnterpriseId, String corpid) {
String serviceCorpid = config.getCorpid(); String serviceCorpid = config.getCorpid();
String openCorpid = qywxUserApiService.toOpenCorpid(corpid, serviceCorpid); String openCorpid = qywxUserApiService.toOpenCorpid(corpid, serviceCorpid);
TabHaobanWxApplication tabHaobanWxApplication = wxApplicationMapper.selectByCorpId(corpid, 3); TabHaobanWxApplication tabHaobanWxApplication = wxApplicationMapper.selectByWxEnterpriseIdAndApplicationType(wxEnterpriseId, 3);
if (tabHaobanWxApplication == null) { if (tabHaobanWxApplication == null) {
log.info("代开发应用不存在:{}", corpid); log.info("代开发应用不存在:{}", corpid);
return; return;
......
...@@ -101,7 +101,13 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService { ...@@ -101,7 +101,13 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
haobanWxApplication.setPermanentCode(permanentCode); haobanWxApplication.setPermanentCode(permanentCode);
haobanWxApplication.setIsCustomizedApp(isCustomizedApp); haobanWxApplication.setIsCustomizedApp(isCustomizedApp);
if (isCustomizedApp != null && isCustomizedApp == 1) { if (isCustomizedApp != null && isCustomizedApp == 1) {
haobanWxApplication.setApplicationType(3); if (siteId.equals(qywxMemberSuite)) {
//会员小程序代开发
haobanWxApplication.setApplicationType(4);
}else {
//好办助手-企业代开发
haobanWxApplication.setApplicationType(3);
}
} }
haobanWxApplication.setWxEnterpriseId(wxEnterpriseId); haobanWxApplication.setWxEnterpriseId(wxEnterpriseId);
wxApplicationService.insert(haobanWxApplication); wxApplicationService.insert(haobanWxApplication);
......
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
<update id="updateUserIdByWxEnterpriseId"> <update id="updateUserIdByWxEnterpriseId">
UPDATE tab_haoban_member_unionid_related a UPDATE tab_haoban_member_unionid_related a
LEFT JOIN tab_haoban_external_clerk_related b ON a.member_unionid_related_id = b.member_unionid_related_id LEFT JOIN tab_haoban_external_clerk_related b ON a.member_unionid_related_id = b.member_unionid_related_id
SET a.wx_user_id = b.wx_user_id,update_time= now() SET a.wx_user_id = b.wx_user_id,a.update_time= now()
WHERE WHERE
a.wx_enterprise_id = #{wxEnterpriseId} a.wx_enterprise_id = #{wxEnterpriseId}
AND b.status_flag IN ( 1, 3, 4 ) AND b.status_flag IN ( 1, 3, 4 )
......
...@@ -351,7 +351,7 @@ ...@@ -351,7 +351,7 @@
<update id="updateUserIdByWxEnterpriseId" parameterType="java.lang.String"> <update id="updateUserIdByWxEnterpriseId" parameterType="java.lang.String">
UPDATE tab_haoban_staff_department_related a UPDATE tab_haoban_staff_department_related a
LEFT JOIN tab_haoban_staff b ON a.staff_id = b.staff_id LEFT JOIN tab_haoban_staff b ON a.staff_id = b.staff_id
SET a.wx_user_id = b.wx_user_id,update_time= now() SET a.wx_user_id = b.wx_user_id,a.update_time= now()
WHERE WHERE
a.wx_enterprise_id = #{wxEnterpriseId} a.wx_enterprise_id = #{wxEnterpriseId}
AND a.status_flag = 1 and b.status_flag = 1; AND a.status_flag = 1 and b.status_flag = 1;
......
...@@ -511,8 +511,8 @@ ...@@ -511,8 +511,8 @@
<select id="listByWxEnterpriseId" resultMap="BaseResultMap" parameterType="java.lang.String"> <select id="listByWxEnterpriseId" resultMap="BaseResultMap" parameterType="java.lang.String">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from where tab_haoban_staff from tab_haoban_staff
wx_enterprise_id = #{wxEnterpriseId} where wx_enterprise_id = #{wxEnterpriseId}
and status_flag = 1 and status_flag = 1
</select> </select>
......
...@@ -686,7 +686,7 @@ ...@@ -686,7 +686,7 @@
<update id="updateUserIdByWxEnterpriseId"> <update id="updateUserIdByWxEnterpriseId">
UPDATE tab_haoban_external_clerk_related a UPDATE tab_haoban_external_clerk_related a
LEFT JOIN tab_haoban_staff b ON a.staff_id = b.staff_id LEFT JOIN tab_haoban_staff b ON a.staff_id = b.staff_id
SET a.wx_user_id = b.wx_user_id,update_time= now() SET a.wx_user_id = b.wx_user_id,a.update_time= now()
WHERE WHERE
a.wx_enterprise_id = #{wxEnterpriseId} a.wx_enterprise_id = #{wxEnterpriseId}
AND a.status_flag IN ( 1, 3, 4 ); AND a.status_flag IN ( 1, 3, 4 );
......
...@@ -443,7 +443,7 @@ ...@@ -443,7 +443,7 @@
<update id="updateUserIdByWxEnterpriseId" parameterType="java.lang.String"> <update id="updateUserIdByWxEnterpriseId" parameterType="java.lang.String">
UPDATE tab_haoban_staff_clerk_relation a UPDATE tab_haoban_staff_clerk_relation a
LEFT JOIN tab_haoban_staff b ON a.staff_id = b.staff_id LEFT JOIN tab_haoban_staff b ON a.staff_id = b.staff_id
SET a.wx_user_id = b.wx_user_id,update_time= now() SET a.wx_user_id = b.wx_user_id,a.update_time= now()
WHERE WHERE
a.wx_enterprise_id = #{wxEnterpriseId} a.wx_enterprise_id = #{wxEnterpriseId}
AND a.status_flag = 1 and b.status_flag = 1 AND a.status_flag = 1 and b.status_flag = 1
......
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
<update id="updateCorpidById"> <update id="updateCorpidById">
update tab_haoban_wx_application update tab_haoban_wx_application
set corpid = #{corpId}, set corpid = #{corpid},
update_time = now() update_time = now()
where wx_application_id = #{wxApplicationId} where wx_application_id = #{wxApplicationId}
and status_flag = 1 and status_flag = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment