liusheng
2024-07-02 0b02577ab12ac83a0530b7e0495b513dd0cdabca
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsRecordsController.java
@@ -1,7 +1,8 @@
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;
@@ -23,14 +24,13 @@
/**
 * 短信记录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;
@@ -38,9 +38,8 @@
     * 查询短信记录列表
     */
    @PreAuthorize("@ss.hasPermi('smartor:smsrecords:list')")
    @GetMapping("/list")
    public TableDataInfo list(SmsRecords smsRecords)
    {
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody SmsRecords smsRecords) {
        startPage();
        List<SmsRecords> list = smsRecordsService.selectSmsRecordsList(smsRecords);
        return getDataTable(list);
@@ -52,8 +51,7 @@
    @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, "短信记录数据");
@@ -64,8 +62,7 @@
     */
    @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));
    }
@@ -74,9 +71,8 @@
     */
    @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));
    }
@@ -85,9 +81,8 @@
     */
    @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));
    }
@@ -96,9 +91,8 @@
     */
    @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));
    }
}