diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsServiceImpl.java index f5179757..30bc69fc 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsServiceImpl.java @@ -168,6 +168,8 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept WxQrCodeUtils.generateQrCode(savePath, "pages/project_qr/index", "SIGID=2&QRPID="+subdeptsUser.getProjectId()+"&PARID="+subdeptsUser.getId(), accessToken); subdeptsUser.setQrCode(profilePath); proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(subdeptsUser); + proProjectInfoSubdepts.setQrCode(profilePath); + proProjectInfoSubdeptsMapper.updateProProjectInfoSubdepts(proProjectInfoSubdepts); } }catch (Exception e){ log.error(e.getMessage()); diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java index 809bc70e..740ae03f 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java @@ -519,14 +519,56 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.WTDL.getCode())){ ProProjectInfoSubdepts proProjectInfoSubdepts = proProjectInfoSubdeptsMapper.selectProProjectInfoSubdeptsById(proProjectInfoSubdeptsUsers.getSubDeptId()); proProjectInfoSubdepts.setApproveStatus(ApproveStatus.exempt.getCode()); + // 生成二维码 + try { + String accessToken = wxMpService.getAccessToken(); + String filePath = DateUtils.datePath()+"/"+System.currentTimeMillis()+".png"; + String savePath = ProfileConfig.profilePath+"/"+filePath; + String profilePath = ProfileConfig.profile+"/"+filePath; + log.info("accessToken...{}",accessToken); + // 生成二维码 + WxQrCodeUtils.generateQrCode(savePath, "pages/project_qr/index", "SIGID=2&QRPID="+proProjectInfoSubdeptsUsers.getProjectId()+"&PARID="+proProjectInfoSubdeptsUsers.getId(), accessToken); + proProjectInfoSubdepts.setQrCode(profilePath); + proProjectInfoSubdeptsUsers.setQrCode(profilePath); + }catch (Exception e){ + log.error(e.getMessage()); + } proProjectInfoSubdeptsMapper.updateProProjectInfoSubdepts(proProjectInfoSubdepts); + }else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.XMJL.getCode())){ + try { + String accessToken = wxMpService.getAccessToken(); + String filePath = DateUtils.datePath()+"/"+System.currentTimeMillis()+".png"; + String savePath = ProfileConfig.profilePath+"/"+filePath; + String profilePath = ProfileConfig.profile+"/"+filePath; + log.info("accessToken...{}",accessToken); + // 生成二维码 + WxQrCodeUtils.generateQrCode(savePath, "pages/project_qr/index", "SIGID=3&QRPID="+proProjectInfoSubdeptsUsers.getProjectId()+"&PARID="+proProjectInfoSubdeptsUsers.getId(), accessToken); + proProjectInfoSubdeptsUsers.setQrCode(profilePath); + }catch (Exception e){ + log.error(e.getMessage()); + } }else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.BZZ.getCode())){ ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup = proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupById(proProjectInfoSubdeptsUsers.getSubDeptGroup()); proProjectInfoSubdeptsGroup.setApproveStatus(ApproveStatus.exempt.getCode()); proProjectInfoSubdeptsGroupMapper.updateProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup); + try { + String accessToken = wxMpService.getAccessToken(); + String filePath = DateUtils.datePath()+"/"+System.currentTimeMillis()+".png"; + String savePath = ProfileConfig.profilePath+"/"+filePath; + String profilePath = ProfileConfig.profile+"/"+filePath; + log.info("accessToken...{}",accessToken); + // 生成二维码 + WxQrCodeUtils.generateQrCode(savePath, "pages/project_qr/index", "SIGID=4&QRPID="+proProjectInfoSubdeptsUsers.getProjectId()+"&PARID="+proProjectInfoSubdeptsUsers.getId(), accessToken); + proProjectInfoSubdeptsUsers.setQrCode(profilePath); + }catch (Exception e){ + log.error(e.getMessage()); + } } + proProjectInfoSubdeptsUsers.setUseStatus(UseStateEnums.IN.getCode()); proProjectInfoSubdeptsUsers.setApproveStatus(ApproveStatus.exempt.getCode()); proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers); + //增加入场 + uniService.syncUniUser(proProjectInfoSubdeptsUsers.getUserId(),proProjectInfoSubdeptsUsers.getProjectId()); } /**