| | |
| | | package com.smartor.controller; |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | |
| | | /** |
| | | * 短信记录Controller |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-06 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/smartor/smsrecords") |
| | | public class SmsRecordsController extends BaseController |
| | | { |
| | | public class SmsRecordsController extends BaseController { |
| | | @Autowired |
| | | private ISmsRecordsService smsRecordsService; |
| | | |
| | | /** |
| | | * 查询短信记录列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:smsrecords:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SmsRecords smsRecords) |
| | | { |
| | | //@PreAuthorize("@ss.hasPermi('smartor:smsrecords:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody SmsRecords smsRecords) { |
| | | startPage(); |
| | | List<SmsRecords> list = smsRecordsService.selectSmsRecordsList(smsRecords); |
| | | return getDataTable(list); |
| | |
| | | /** |
| | | * 导出短信记录列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:smsrecords:export')") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:smsrecords:export')") |
| | | @Log(title = "短信记录", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, SmsRecords smsRecords) |
| | | { |
| | | public void export(HttpServletResponse response, SmsRecords smsRecords) { |
| | | List<SmsRecords> list = smsRecordsService.selectSmsRecordsList(smsRecords); |
| | | ExcelUtil<SmsRecords> util = new ExcelUtil<SmsRecords>(SmsRecords.class); |
| | | util.exportExcel(response, list, "短信记录数据"); |
| | |
| | | /** |
| | | * 获取短信记录详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:smsrecords:query')") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:smsrecords:query')") |
| | | @GetMapping(value = "/{recordid}") |
| | | public AjaxResult getInfo(@PathVariable("recordid") Long recordid) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("recordid") Long recordid) { |
| | | return success(smsRecordsService.selectSmsRecordsByRecordid(recordid)); |
| | | } |
| | | |
| | | /** |
| | | * 新增短信记录 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:smsrecords:add')") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:smsrecords:add')") |
| | | @Log(title = "短信记录", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody SmsRecords smsRecords) |
| | | { |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody SmsRecords smsRecords) { |
| | | return toAjax(smsRecordsService.insertSmsRecords(smsRecords)); |
| | | } |
| | | |
| | | /** |
| | | * 修改短信记录 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:smsrecords:edit')") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:smsrecords:edit')") |
| | | @Log(title = "短信记录", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody SmsRecords smsRecords) |
| | | { |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody SmsRecords smsRecords) { |
| | | return toAjax(smsRecordsService.updateSmsRecords(smsRecords)); |
| | | } |
| | | |
| | | /** |
| | | * 删除短信记录 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:smsrecords:remove')") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:smsrecords:remove')") |
| | | @Log(title = "短信记录", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{recordids}") |
| | | public AjaxResult remove(@PathVariable Long[] recordids) |
| | | { |
| | | @GetMapping("/remove/{recordids}") |
| | | public AjaxResult remove(@PathVariable Long[] recordids) { |
| | | return toAjax(smsRecordsService.deleteSmsRecordsByRecordids(recordids)); |
| | | } |
| | | } |