Commit dcb29c38 by 墨竹

feat:代开发授权修改

parent 83cc66fb
......@@ -19,6 +19,7 @@ import com.gic.haoban.manage.service.entity.TabMiniprogramSetting;
import com.gic.haoban.manage.service.entity.TabWelcome;
import com.gic.haoban.manage.service.pojo.bo.StaffPrivacyUseLogBO;
import com.gic.haoban.manage.service.service.*;
import com.gic.wechat.api.service.qywx.QywxUserApiService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.StringUtils;
......@@ -53,6 +54,8 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
private TabHaobanWelcomeMapper welcomeMapper;
@Autowired
private StaffPrivacyUseLogService staffPrivacyUseLogService;
@Autowired
private QywxUserApiService qywxUserApiService;
@Override
public void callbackReviceEnterprise(QywxCorpInfoSimpleDTO dto) {
......@@ -67,9 +70,17 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
Integer isCustomizedApp = dto.getIsCustomizedApp();
WxEnterpriseDTO wxDTO = EntityUtil.changeEntityByJSON(WxEnterpriseDTO.class, dto);
String wxEnterpriseId = "";
//授权好办小程序
if (isCustomizedApp == null || isCustomizedApp != 1) {
//只需要插入好办小程序企业,代开发 企业表不插入
if (isCustomizedApp != null && isCustomizedApp == 1) {
//代开发
String toOpenCorpid = qywxUserApiService.toOpenCorpid(corpid, siteId);
log.info("明文corpid:{},加密后的toOpenCorpid为:{}", corpid, toOpenCorpid);
TabHaobanWxEnterprise enterprise = this.wxEnterpriseService.getEnterpriseBycorpIdNoStatus(toOpenCorpid);
if (enterprise != null) {
wxEnterpriseId = enterprise.getWxEnterpriseId();
}
} else {
//授权好办小程序
//只需要插入更新好办小程序企业,代开发 企业表不插入
TabHaobanWxEnterprise enterprise = this.wxEnterpriseService.getEnterpriseBycorpIdNoStatus(corpid);
if (enterprise != null) {
wxEnterpriseId = enterprise.getWxEnterpriseId();
......
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