DX 1 month ago
parent
commit
ce2db30f6a
  1. 8
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taglibrary/TagLibraryController.java
  2. 22
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/TaskSendStartMessageJob.java
  3. 9
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java
  4. 3
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterprise/EnterpriseServiceImpl.java

8
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") @GetMapping("/get")
@Operation(summary = "获得企业标签") @Operation(summary = "获得企业标签")
@Parameter(name = "id", description = "编号", required = true, example = "1024") @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('system:tag-library:query')") // @PreAuthorize("@ss.hasPermission('system:tag-library:query')")
public CommonResult<TagLibraryRespVO> getTagLibrary(@RequestParam("id") Integer id) { public CommonResult<TagLibraryRespVO> getTagLibrary(@RequestParam("id") Integer id) {
TagLibraryDO tagLibrary = tagLibraryService.getTagLibrary(id); TagLibraryDO tagLibrary = tagLibraryService.getTagLibrary(id);
return success(BeanUtils.toBean(tagLibrary, TagLibraryRespVO.class)); return success(BeanUtils.toBean(tagLibrary, TagLibraryRespVO.class));
@ -72,7 +72,7 @@ public class TagLibraryController {
@GetMapping("/page") @GetMapping("/page")
@Operation(summary = "获得标签分页") @Operation(summary = "获得标签分页")
@PreAuthorize("@ss.hasPermission('system:tag-library:query')") // @PreAuthorize("@ss.hasPermission('system:tag-library:query')")
public CommonResult<List<TagLibraryRespVO>> getTagLibraryPage(TagLibraryPageReqVO pageReqVO) { public CommonResult<List<TagLibraryRespVO>> getTagLibraryPage(TagLibraryPageReqVO pageReqVO) {
List<TagLibraryDO> pageResult = tagLibraryService.getTagLibraryPage(pageReqVO); List<TagLibraryDO> pageResult = tagLibraryService.getTagLibraryPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, TagLibraryRespVO.class)); return success(BeanUtils.toBean(pageResult, TagLibraryRespVO.class));
@ -80,7 +80,7 @@ public class TagLibraryController {
@GetMapping("/list") @GetMapping("/list")
@Operation(summary = "获得标签分页") @Operation(summary = "获得标签分页")
@PreAuthorize("@ss.hasPermission('system:tag-library:query')") // @PreAuthorize("@ss.hasPermission('system:tag-library:query')")
public CommonResult<List<TagLibraryRespVO>> getTagLibraryList(String[] codeList) { public CommonResult<List<TagLibraryRespVO>> getTagLibraryList(String[] codeList) {
List<TagLibraryDO> pageResult = tagLibraryService.list(codeList); List<TagLibraryDO> pageResult = tagLibraryService.list(codeList);
return success(BeanUtils.toBean(pageResult, TagLibraryRespVO.class)); return success(BeanUtils.toBean(pageResult, TagLibraryRespVO.class));
@ -88,7 +88,7 @@ public class TagLibraryController {
@GetMapping("/childrenList") @GetMapping("/childrenList")
@Operation(summary = "获得标签分页") // @Operation(summary = "获得标签分页")
@PreAuthorize("@ss.hasPermission('system:tag-library:query')") @PreAuthorize("@ss.hasPermission('system:tag-library:query')")
public CommonResult<List<TagLibraryRespVO>> childrenList(Long id) { public CommonResult<List<TagLibraryRespVO>> childrenList(Long id) {
List<TagLibraryDO> pageResult = tagLibraryService.childrenList(id); List<TagLibraryDO> pageResult = tagLibraryService.childrenList(id);

22
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<EnterpriseInspectionsDO> list = new ArrayList<>(); List<EnterpriseInspectionsDO> list = new ArrayList<>();
for (EnterpriseInspectionsDO enterpriseInspectionsDO : enterpriseInspectionsDOList) { for (EnterpriseInspectionsDO enterpriseInspectionsDO : enterpriseInspectionsDOList) {
//站内信发送通知 //站内信发送通知
NotifySendSingleToUserReqDTO notifyMessage = new NotifySendSingleToUserReqDTO(); // NotifySendSingleToUserReqDTO notifyMessage = new NotifySendSingleToUserReqDTO();
notifyMessage.setUserId(Long.valueOf(enterpriseInspectionsDO.getUserId())); // notifyMessage.setUserId(Long.valueOf(enterpriseInspectionsDO.getUserId()));
notifyMessage.setTemplateCode("task_messages"); // notifyMessage.setTemplateCode("task_messages");
Map<String, Object> templateParams = new HashMap<>(); // Map<String, Object> templateParams = new HashMap<>();
templateParams.put("title", beforeTaskInfo.getTitle()); // templateParams.put("title", beforeTaskInfo.getTitle());
templateParams.put("startTime", DateUtil.format(beforeTaskInfo.getStartDate().atStartOfDay(), DateUtils.FORMAT_YEAR_MONTH_DAY)); // 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("endTime", DateUtil.format(beforeTaskInfo.getEndDate().atStartOfDay(), DateUtils.FORMAT_YEAR_MONTH_DAY) );
templateParams.put("url", "sub/task/detail?taskId="+ enterpriseInspectionsDO.getTaskId()); // templateParams.put("url", "sub/task/detail?taskId="+ enterpriseInspectionsDO.getTaskId());
//
notifyMessage.setTemplateParams(templateParams); // notifyMessage.setTemplateParams(templateParams);
notifyMessageSendApi.sendSingleMessageToMember(notifyMessage); // notifyMessageSendApi.sendSingleMessageToMember(notifyMessage);
enterpriseInspectionsDO.setStatus(2); enterpriseInspectionsDO.setStatus(2);
list.add(enterpriseInspectionsDO); list.add(enterpriseInspectionsDO);

9
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.setState(reqVO.getState());
socialUser.setRawUserInfo(authUser.getRawUserInfo() != null? authUser.getRawUserInfo().toString(): "default"); socialUser.setRawUserInfo(authUser.getRawUserInfo() != null? authUser.getRawUserInfo().toString(): "default");
final int insert = socialUserMapper.insert(socialUser); final int insert = socialUserMapper.insert(socialUser);
if (insert < 0) { if (insert < 0) {
throw exception(INSERT_ERROR); throw exception(INSERT_ERROR);
} }
user = userService.autoRegisterUser(authUser); user = userService.autoRegisterUser(authUser);
//给用户付一个普通用户角色可以上传图片
UserRoleDO userRoleDO = new UserRoleDO();
userRoleDO.setUserId(user.getId());
userRoleDO.setRoleId(2l);
userRoleMapper.insert(userRoleDO);
user.setIsBand(false); user.setIsBand(false);
} else { } else {

3
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); enterpriseTagDOList.add(enterpriseTagDO);
} }
enterpriseTagMapper.insertBatch(enterpriseTagDOList); enterpriseTagMapper.insertBatch(enterpriseTagDOList);
} }
if(!CollectionUtils.isAnyEmpty(createReqVO.getQualis())) if(!CollectionUtils.isAnyEmpty(createReqVO.getQualis()))
@ -255,7 +255,6 @@ public class EnterpriseServiceImpl implements EnterpriseService {
List<EnterprisesUserDO> enterprisesUserDOS = enterprisesUserMapper.selectList(lambdaQueryWrapperX); List<EnterprisesUserDO> enterprisesUserDOS = enterprisesUserMapper.selectList(lambdaQueryWrapperX);
if(!CollectionUtils.isAnyEmpty(enterprisesUserDOS)){ if(!CollectionUtils.isAnyEmpty(enterprisesUserDOS)){
pageReqVO.setEnterpriseIds(CollectionUtils.convertList(enterprisesUserDOS,EnterprisesUserDO::getEnterprisesId)); pageReqVO.setEnterpriseIds(CollectionUtils.convertList(enterprisesUserDOS,EnterprisesUserDO::getEnterprisesId));
} }
} }

Loading…
Cancel
Save