短信推送任务
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
package com.czg.controller.admin;
|
||||
|
||||
import com.czg.BaseQueryParam;
|
||||
import com.czg.market.dto.SmsPushEventDTO;
|
||||
import com.czg.market.dto.SmsShopTemplateDTO;
|
||||
import com.czg.market.service.SmsPushEventService;
|
||||
import com.czg.market.service.SmsShopTemplateService;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.validator.group.InsertGroup;
|
||||
import com.czg.validator.group.UpdateGroup;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 短信推送任务
|
||||
*
|
||||
* @author ww
|
||||
* @description
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/admin/pushEvent")
|
||||
public class SmsPushEventController {
|
||||
@Resource
|
||||
private SmsPushEventService pushEventService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@GetMapping
|
||||
public CzgResult<Page<SmsPushEventDTO>> getPushEventPage(@RequestParam BaseQueryParam param, @RequestParam(required = false) Long id) {
|
||||
Page<SmsPushEventDTO> data = pushEventService.getPushEventPage(param, StpKit.USER.getShopId(), id);
|
||||
return CzgResult.success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
@PostMapping
|
||||
public CzgResult<Void> addPushEvent(@RequestBody @Validated(InsertGroup.class) SmsPushEventDTO param) {
|
||||
param.setShopId(StpKit.USER.getShopId());
|
||||
pushEventService.addPushEvent(param);
|
||||
return CzgResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除任务
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
public CzgResult<Void> deletePushEvent(@PathVariable Long id) {
|
||||
pushEventService.deletePushEvent(id);
|
||||
return CzgResult.success();
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.czg.controller.admin;
|
||||
|
||||
import com.czg.config.RabbitPublisher;
|
||||
import com.czg.market.dto.SmsShopTemplateDTO;
|
||||
import com.czg.market.service.ShopCouponService;
|
||||
import com.czg.market.service.SmsShopTemplateService;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
|
||||
Reference in New Issue
Block a user