提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.system.api.notify; |
H |
2 |
|
|
3 |
import com.iailab.framework.common.pojo.CommonResult; |
|
4 |
import com.iailab.module.system.api.notify.dto.NotifySendSingleToUserReqDTO; |
|
5 |
import com.iailab.module.system.service.notify.NotifySendService; |
|
6 |
import org.springframework.validation.annotation.Validated; |
|
7 |
import org.springframework.web.bind.annotation.RestController; |
|
8 |
|
|
9 |
import javax.annotation.Resource; |
|
10 |
|
|
11 |
import static com.iailab.framework.common.pojo.CommonResult.success; |
|
12 |
|
|
13 |
@RestController // 提供 RESTful API 接口,给 Feign 调用 |
|
14 |
@Validated |
|
15 |
public class NotifyMessageSendApiImpl implements NotifyMessageSendApi { |
|
16 |
|
|
17 |
@Resource |
|
18 |
private NotifySendService notifySendService; |
|
19 |
|
|
20 |
@Override |
|
21 |
public CommonResult<Long> sendSingleMessageToAdmin(NotifySendSingleToUserReqDTO reqDTO) { |
|
22 |
return success(notifySendService.sendSingleNotifyToAdmin(reqDTO.getUserId(), |
|
23 |
reqDTO.getTemplateCode(), reqDTO.getTemplateParams())); |
|
24 |
} |
|
25 |
|
|
26 |
@Override |
|
27 |
public CommonResult<Long> sendSingleMessageToMember(NotifySendSingleToUserReqDTO reqDTO) { |
|
28 |
return success(notifySendService.sendSingleNotifyToMember(reqDTO.getUserId(), |
|
29 |
reqDTO.getTemplateCode(), reqDTO.getTemplateParams())); |
|
30 |
} |
|
31 |
|
|
32 |
} |