|
@@ -1,40 +1,32 @@
|
|
|
package com.jjt.push.controller;
|
|
package com.jjt.push.controller;
|
|
|
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
-import javax.annotation.Resource;
|
|
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
-
|
|
|
|
|
-import io.swagger.annotations.Api;
|
|
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
|
|
-import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.PutMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
import com.jjt.common.annotation.Log;
|
|
import com.jjt.common.annotation.Log;
|
|
|
import com.jjt.common.core.controller.BaseController;
|
|
import com.jjt.common.core.controller.BaseController;
|
|
|
import com.jjt.common.core.domain.AjaxResult;
|
|
import com.jjt.common.core.domain.AjaxResult;
|
|
|
|
|
+import com.jjt.common.core.page.TableDataInfo;
|
|
|
import com.jjt.common.enums.BusinessType;
|
|
import com.jjt.common.enums.BusinessType;
|
|
|
|
|
+import com.jjt.common.utils.poi.ExcelUtil;
|
|
|
import com.jjt.push.domain.PushRecord;
|
|
import com.jjt.push.domain.PushRecord;
|
|
|
import com.jjt.push.service.IPushRecordService;
|
|
import com.jjt.push.service.IPushRecordService;
|
|
|
-import com.jjt.common.utils.poi.ExcelUtil;
|
|
|
|
|
-import com.jjt.common.core.page.TableDataInfo;
|
|
|
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
+
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 推送记录Controller
|
|
* 推送记录Controller
|
|
|
*
|
|
*
|
|
|
* @author jjt
|
|
* @author jjt
|
|
|
- * @date 2024-10-08
|
|
|
|
|
|
|
+ * @date 2024-10-11
|
|
|
*/
|
|
*/
|
|
|
-@Api(tags="推送记录")
|
|
|
|
|
|
|
+@Api(tags = "推送记录")
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("/push/pushRecord")
|
|
@RequestMapping("/push/pushRecord")
|
|
|
-public class PushRecordController extends BaseController
|
|
|
|
|
-{
|
|
|
|
|
|
|
+public class PushRecordController extends BaseController {
|
|
|
@Resource
|
|
@Resource
|
|
|
private IPushRecordService pushRecordService;
|
|
private IPushRecordService pushRecordService;
|
|
|
|
|
|
|
@@ -44,8 +36,7 @@ public class PushRecordController extends BaseController
|
|
|
@ApiOperation("查询推送记录列表")
|
|
@ApiOperation("查询推送记录列表")
|
|
|
@PreAuthorize("@ss.hasPermi('push:pushRecord:list')")
|
|
@PreAuthorize("@ss.hasPermi('push:pushRecord:list')")
|
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
|
- public TableDataInfo list(PushRecord pushRecord)
|
|
|
|
|
- {
|
|
|
|
|
|
|
+ public TableDataInfo list(PushRecord pushRecord) {
|
|
|
startPage();
|
|
startPage();
|
|
|
List<PushRecord> list = pushRecordService.selectPushRecordList(pushRecord);
|
|
List<PushRecord> list = pushRecordService.selectPushRecordList(pushRecord);
|
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
@@ -58,8 +49,7 @@ public class PushRecordController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('push:pushRecord:export')")
|
|
@PreAuthorize("@ss.hasPermi('push:pushRecord:export')")
|
|
|
@Log(title = "推送记录", businessType = BusinessType.EXPORT)
|
|
@Log(title = "推送记录", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/export")
|
|
@PostMapping("/export")
|
|
|
- public void export(HttpServletResponse response, PushRecord pushRecord)
|
|
|
|
|
- {
|
|
|
|
|
|
|
+ public void export(HttpServletResponse response, PushRecord pushRecord) {
|
|
|
List<PushRecord> list = pushRecordService.selectPushRecordList(pushRecord);
|
|
List<PushRecord> list = pushRecordService.selectPushRecordList(pushRecord);
|
|
|
ExcelUtil<PushRecord> util = new ExcelUtil<PushRecord>(PushRecord.class);
|
|
ExcelUtil<PushRecord> util = new ExcelUtil<PushRecord>(PushRecord.class);
|
|
|
util.exportExcel(response, list, "推送记录数据");
|
|
util.exportExcel(response, list, "推送记录数据");
|
|
@@ -71,8 +61,7 @@ public class PushRecordController extends BaseController
|
|
|
@ApiOperation("获取推送记录详细信息")
|
|
@ApiOperation("获取推送记录详细信息")
|
|
|
@PreAuthorize("@ss.hasPermi('push:pushRecord:query')")
|
|
@PreAuthorize("@ss.hasPermi('push:pushRecord:query')")
|
|
|
@GetMapping(value = "/{prId}")
|
|
@GetMapping(value = "/{prId}")
|
|
|
- public AjaxResult getInfo(@PathVariable("prId") Long prId)
|
|
|
|
|
- {
|
|
|
|
|
|
|
+ public AjaxResult getInfo(@PathVariable("prId") Long prId) {
|
|
|
return success(pushRecordService.selectPushRecordByPrId(prId));
|
|
return success(pushRecordService.selectPushRecordByPrId(prId));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -83,8 +72,7 @@ public class PushRecordController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('push:pushRecord:add')")
|
|
@PreAuthorize("@ss.hasPermi('push:pushRecord:add')")
|
|
|
@Log(title = "推送记录", businessType = BusinessType.INSERT)
|
|
@Log(title = "推送记录", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
@PostMapping
|
|
|
- public AjaxResult add(@RequestBody PushRecord pushRecord)
|
|
|
|
|
- {
|
|
|
|
|
|
|
+ public AjaxResult add(@RequestBody PushRecord pushRecord) {
|
|
|
return toAjax(pushRecordService.insertPushRecord(pushRecord));
|
|
return toAjax(pushRecordService.insertPushRecord(pushRecord));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -95,8 +83,7 @@ public class PushRecordController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('push:pushRecord:edit')")
|
|
@PreAuthorize("@ss.hasPermi('push:pushRecord:edit')")
|
|
|
@Log(title = "推送记录", businessType = BusinessType.UPDATE)
|
|
@Log(title = "推送记录", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
@PutMapping
|
|
|
- public AjaxResult edit(@RequestBody PushRecord pushRecord)
|
|
|
|
|
- {
|
|
|
|
|
|
|
+ public AjaxResult edit(@RequestBody PushRecord pushRecord) {
|
|
|
return toAjax(pushRecordService.updatePushRecord(pushRecord));
|
|
return toAjax(pushRecordService.updatePushRecord(pushRecord));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -106,9 +93,8 @@ public class PushRecordController extends BaseController
|
|
|
@ApiOperation("删除推送记录")
|
|
@ApiOperation("删除推送记录")
|
|
|
@PreAuthorize("@ss.hasPermi('push:pushRecord:remove')")
|
|
@PreAuthorize("@ss.hasPermi('push:pushRecord:remove')")
|
|
|
@Log(title = "推送记录", businessType = BusinessType.DELETE)
|
|
@Log(title = "推送记录", businessType = BusinessType.DELETE)
|
|
|
- @DeleteMapping("/{prIds}")
|
|
|
|
|
- public AjaxResult remove(@PathVariable Long[] prIds)
|
|
|
|
|
- {
|
|
|
|
|
|
|
+ @DeleteMapping("/{prIds}")
|
|
|
|
|
+ public AjaxResult remove(@PathVariable Long[] prIds) {
|
|
|
return toAjax(pushRecordService.deletePushRecordByPrIds(prIds));
|
|
return toAjax(pushRecordService.deletePushRecordByPrIds(prIds));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|