mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-04 04:08:43 +08:00 
			
		
		
		
	Merge remote-tracking branch 'origin/feature/mall_product' into feature/mall_product
This commit is contained in:
		@@ -1,5 +1,6 @@
 | 
				
			|||||||
package cn.iocoder.yudao.module.system.controller.admin.notify;
 | 
					package cn.iocoder.yudao.module.system.controller.admin.notify;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
 | 
				
			||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
 | 
					import cn.iocoder.yudao.framework.common.pojo.CommonResult;
 | 
				
			||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
 | 
					import cn.iocoder.yudao.framework.common.pojo.PageResult;
 | 
				
			||||||
import cn.iocoder.yudao.module.system.controller.admin.notify.vo.template.*;
 | 
					import cn.iocoder.yudao.module.system.controller.admin.notify.vo.template.*;
 | 
				
			||||||
@@ -76,8 +77,12 @@ public class NotifyTemplateController {
 | 
				
			|||||||
    @Operation(summary = "发送站内信")
 | 
					    @Operation(summary = "发送站内信")
 | 
				
			||||||
    @PreAuthorize("@ss.hasPermission('system:notify-template:send-notify')")
 | 
					    @PreAuthorize("@ss.hasPermission('system:notify-template:send-notify')")
 | 
				
			||||||
    public CommonResult<Long> sendNotify(@Valid @RequestBody NotifyTemplateSendReqVO sendReqVO) {
 | 
					    public CommonResult<Long> sendNotify(@Valid @RequestBody NotifyTemplateSendReqVO sendReqVO) {
 | 
				
			||||||
        return success(notifySendService.sendSingleNotifyToAdmin(sendReqVO.getUserId(),
 | 
					        if (UserTypeEnum.MEMBER.getValue().equals(sendReqVO.getUserType())) {
 | 
				
			||||||
                sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams()));
 | 
					            return success(notifySendService.sendSingleNotifyToMember(sendReqVO.getUserId(),
 | 
				
			||||||
 | 
					                    sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams()));
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            return success(notifySendService.sendSingleNotifyToAdmin(sendReqVO.getUserId(),
 | 
				
			||||||
 | 
					                    sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams()));
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,6 +15,10 @@ public class NotifyTemplateSendReqVO {
 | 
				
			|||||||
    @NotNull(message = "用户id不能为空")
 | 
					    @NotNull(message = "用户id不能为空")
 | 
				
			||||||
    private Long userId;
 | 
					    private Long userId;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Schema(description = "用户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
 | 
				
			||||||
 | 
					    @NotNull(message = "用户类型不能为空")
 | 
				
			||||||
 | 
					    private Integer userType;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Schema(description = "模板编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "01")
 | 
					    @Schema(description = "模板编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "01")
 | 
				
			||||||
    @NotEmpty(message = "模板编码不能为空")
 | 
					    @NotEmpty(message = "模板编码不能为空")
 | 
				
			||||||
    private String templateCode;
 | 
					    private String templateCode;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user