| | |
| | | package com.mzl.flower.web.v2.sms; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.mzl.flower.base.BaseController; |
| | | import com.mzl.flower.base.R; |
| | | import com.mzl.flower.base.ReturnDataDTO; |
| | | import com.mzl.flower.dto.request.sms.SmsTaskDTO; |
| | | import com.mzl.flower.dto.request.sms.SmsTaskQueryDTO; |
| | | import com.mzl.flower.dto.response.coupon.CouponTemplateUserVO; |
| | | import com.mzl.flower.dto.response.coupon.CouponTemplateVO; |
| | | import com.mzl.flower.dto.response.sms.SmsSelectVO; |
| | | import com.mzl.flower.dto.response.sms.SmsTaskVO; |
| | | import com.mzl.flower.service.sms.SmsTaskService; |
| | | import com.mzl.flower.utils.ConverterUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.IOException; |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | @PostMapping("/new") |
| | | @ApiOperation(value = "保存短信任务", httpMethod = "POST") |
| | | public ResponseEntity<ReturnDataDTO> create(@RequestBody SmsTaskDTO smsTaskDTO) { |
| | | public ResponseEntity<ReturnDataDTO> create(@RequestBody SmsTaskDTO smsTaskDTO) throws IOException { |
| | | smsTaskService.saveSmsTask(smsTaskDTO); |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | @PostMapping(value = "/edit") |
| | | @ApiOperation(value = "更新短信任务", httpMethod = "POST") |
| | | public ResponseEntity<ReturnDataDTO> update(@RequestBody SmsTaskDTO smsTaskDTO) { |
| | | public ResponseEntity<ReturnDataDTO> update(@RequestBody SmsTaskDTO smsTaskDTO) throws IOException { |
| | | smsTaskService.updateSmsTask(smsTaskDTO); |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | @GetMapping("/select/{id}") |
| | | @ApiOperation(value = "任务筛选详情列表", httpMethod = "GET") |
| | | public ResponseEntity<ReturnDataDTO<SmsSelectVO>> selectList(@PathVariable(name = "id") Long id) { |
| | | return returnData(R.SUCCESS.getCode(), smsTaskService.getSelectList(id)); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | public ResponseEntity<ReturnDataDTO> get(@PathVariable Long id) { |
| | | SmsTaskVO smsTaskVO = smsTaskService.getDetailById(id); |
| | | return returnData(R.SUCCESS.getCode(), smsTaskVO); |
| | | } |
| | | |
| | | } |