Your Name
2023-03-15 cab3425bb92d01f3494eb25c1f299038dc634c65
service-user/src/main/java/com/java110/user/api/StaffApi.java
@@ -11,6 +11,8 @@
import com.java110.user.bmo.staffAppAuth.ISaveStaffAppAuthBMO;
import com.java110.user.bmo.staffAppAuth.IUpdateStaffAppAuthBMO;
import com.java110.utils.cache.MappingCache;
import com.java110.utils.cache.UrlCache;
import com.java110.utils.constant.MappingConstant;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.vo.ResultVo;
@@ -136,18 +138,17 @@
    public ResponseEntity<String> generatorQrCode(@RequestHeader(value = "store-id") String storeId,
                                                  @RequestHeader(value = "user-id") String userId,
                                                  @RequestParam(value = "communityId") String communityId) {
        SmallWeChatDto smallWeChatDto = new SmallWeChatDto();
        smallWeChatDto.setObjId(communityId);
        smallWeChatDto.setObjType(SmallWeChatDto.OBJ_TYPE_COMMUNITY);
        smallWeChatDto.setWechatType(SmallWeChatDto.WECHAT_TYPE_PUBLIC);
        List<SmallWeChatDto> smallWeChatDtos = smallWeChatInnerServiceSMOImpl.querySmallWeChats(smallWeChatDto);
        String ownerUrl = MappingCache.getValue("OWNER_WECHAT_URL")
        String ownerUrl = UrlCache.getOwnerUrl()
                + "/app/staffAuth?storeId=" + storeId + "&staffId=" + userId
                + "&communityId=" + communityId + "&appId=" + AppDto.WECHAT_OWNER_APP_ID;
        if (smallWeChatDtos != null && smallWeChatDtos.size() > 0) {
            ownerUrl += ("&wAppId=" + smallWeChatDtos.get(0).getAppid());
            ownerUrl += ("&wAppId=" + smallWeChatDtos.get(0).getAppId());
        }
        return ResultVo.createResponseEntity(ownerUrl);
    }