From ce2db30f6a01af334739184bac9565e5ba4f385a Mon Sep 17 00:00:00 2001 From: dx <1242347652@qq.com> Date: Wed, 26 Feb 2025 18:08:23 +0800 Subject: [PATCH] bug --- .../taglibrary/TagLibraryController.java | 8 +++---- .../system/job/TaskSendStartMessageJob.java | 22 +++++++++---------- .../service/auth/AdminAuthServiceImpl.java | 9 ++++++++ .../enterprise/EnterpriseServiceImpl.java | 3 +-- 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taglibrary/TagLibraryController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taglibrary/TagLibraryController.java index 8f7ed9e..9d4c189 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taglibrary/TagLibraryController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taglibrary/TagLibraryController.java @@ -64,7 +64,7 @@ public class TagLibraryController { @GetMapping("/get") @Operation(summary = "获得企业标签") @Parameter(name = "id", description = "编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('system:tag-library:query')") +// @PreAuthorize("@ss.hasPermission('system:tag-library:query')") public CommonResult getTagLibrary(@RequestParam("id") Integer id) { TagLibraryDO tagLibrary = tagLibraryService.getTagLibrary(id); return success(BeanUtils.toBean(tagLibrary, TagLibraryRespVO.class)); @@ -72,7 +72,7 @@ public class TagLibraryController { @GetMapping("/page") @Operation(summary = "获得标签分页") - @PreAuthorize("@ss.hasPermission('system:tag-library:query')") +// @PreAuthorize("@ss.hasPermission('system:tag-library:query')") public CommonResult> getTagLibraryPage(TagLibraryPageReqVO pageReqVO) { List pageResult = tagLibraryService.getTagLibraryPage(pageReqVO); return success(BeanUtils.toBean(pageResult, TagLibraryRespVO.class)); @@ -80,7 +80,7 @@ public class TagLibraryController { @GetMapping("/list") @Operation(summary = "获得标签分页") - @PreAuthorize("@ss.hasPermission('system:tag-library:query')") +// @PreAuthorize("@ss.hasPermission('system:tag-library:query')") public CommonResult> getTagLibraryList(String[] codeList) { List pageResult = tagLibraryService.list(codeList); return success(BeanUtils.toBean(pageResult, TagLibraryRespVO.class)); @@ -88,7 +88,7 @@ public class TagLibraryController { @GetMapping("/childrenList") - @Operation(summary = "获得标签分页") +// @Operation(summary = "获得标签分页") @PreAuthorize("@ss.hasPermission('system:tag-library:query')") public CommonResult> childrenList(Long id) { List pageResult = tagLibraryService.childrenList(id); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/TaskSendStartMessageJob.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/TaskSendStartMessageJob.java index 4dbaaa2..f7c0f9f 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/TaskSendStartMessageJob.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/TaskSendStartMessageJob.java @@ -82,17 +82,17 @@ public class TaskSendStartMessageJob implements JobHandler { List list = new ArrayList<>(); for (EnterpriseInspectionsDO enterpriseInspectionsDO : enterpriseInspectionsDOList) { //站内信发送通知 - NotifySendSingleToUserReqDTO notifyMessage = new NotifySendSingleToUserReqDTO(); - notifyMessage.setUserId(Long.valueOf(enterpriseInspectionsDO.getUserId())); - notifyMessage.setTemplateCode("task_messages"); - Map templateParams = new HashMap<>(); - templateParams.put("title", beforeTaskInfo.getTitle()); - templateParams.put("startTime", DateUtil.format(beforeTaskInfo.getStartDate().atStartOfDay(), DateUtils.FORMAT_YEAR_MONTH_DAY)); - templateParams.put("endTime", DateUtil.format(beforeTaskInfo.getEndDate().atStartOfDay(), DateUtils.FORMAT_YEAR_MONTH_DAY) ); - templateParams.put("url", "sub/task/detail?taskId="+ enterpriseInspectionsDO.getTaskId()); - - notifyMessage.setTemplateParams(templateParams); - notifyMessageSendApi.sendSingleMessageToMember(notifyMessage); +// NotifySendSingleToUserReqDTO notifyMessage = new NotifySendSingleToUserReqDTO(); +// notifyMessage.setUserId(Long.valueOf(enterpriseInspectionsDO.getUserId())); +// notifyMessage.setTemplateCode("task_messages"); +// Map templateParams = new HashMap<>(); +// templateParams.put("title", beforeTaskInfo.getTitle()); +// templateParams.put("startTime", DateUtil.format(beforeTaskInfo.getStartDate().atStartOfDay(), DateUtils.FORMAT_YEAR_MONTH_DAY)); +// templateParams.put("endTime", DateUtil.format(beforeTaskInfo.getEndDate().atStartOfDay(), DateUtils.FORMAT_YEAR_MONTH_DAY) ); +// templateParams.put("url", "sub/task/detail?taskId="+ enterpriseInspectionsDO.getTaskId()); +// +// notifyMessage.setTemplateParams(templateParams); +// notifyMessageSendApi.sendSingleMessageToMember(notifyMessage); enterpriseInspectionsDO.setStatus(2); list.add(enterpriseInspectionsDO); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java index 63b3336..1a88477 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java @@ -328,10 +328,19 @@ public class AdminAuthServiceImpl implements AdminAuthService { socialUser.setState(reqVO.getState()); socialUser.setRawUserInfo(authUser.getRawUserInfo() != null? authUser.getRawUserInfo().toString(): "default"); final int insert = socialUserMapper.insert(socialUser); + + if (insert < 0) { throw exception(INSERT_ERROR); } user = userService.autoRegisterUser(authUser); + + //给用户付一个普通用户角色可以上传图片 + UserRoleDO userRoleDO = new UserRoleDO(); + userRoleDO.setUserId(user.getId()); + userRoleDO.setRoleId(2l); + userRoleMapper.insert(userRoleDO); + user.setIsBand(false); } else { diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterprise/EnterpriseServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterprise/EnterpriseServiceImpl.java index a4b7ba4..4bc6844 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterprise/EnterpriseServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterprise/EnterpriseServiceImpl.java @@ -155,7 +155,7 @@ public class EnterpriseServiceImpl implements EnterpriseService { enterpriseTagDOList.add(enterpriseTagDO); } enterpriseTagMapper.insertBatch(enterpriseTagDOList); - + } if(!CollectionUtils.isAnyEmpty(createReqVO.getQualis())) @@ -255,7 +255,6 @@ public class EnterpriseServiceImpl implements EnterpriseService { List enterprisesUserDOS = enterprisesUserMapper.selectList(lambdaQueryWrapperX); if(!CollectionUtils.isAnyEmpty(enterprisesUserDOS)){ pageReqVO.setEnterpriseIds(CollectionUtils.convertList(enterprisesUserDOS,EnterprisesUserDO::getEnterprisesId)); - } }