|
@@ -2,6 +2,8 @@ package com.songhua.system.controller;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
+
|
|
|
|
+import com.songhua.common.core.domain.entity.SysUser;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -23,14 +25,13 @@ import com.songhua.common.core.page.TableDataInfo;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 票种管理Controller
|
|
* 票种管理Controller
|
|
- *
|
|
|
|
|
|
+ *
|
|
* @author ruoyi
|
|
* @author ruoyi
|
|
* @date 2024-11-04
|
|
* @date 2024-11-04
|
|
*/
|
|
*/
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("/system/ticket")
|
|
@RequestMapping("/system/ticket")
|
|
-public class PzTicketTypeManagementController extends BaseController
|
|
|
|
-{
|
|
|
|
|
|
+public class PzTicketTypeManagementController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private IPzTicketTypeManagementService pzTicketTypeManagementService;
|
|
private IPzTicketTypeManagementService pzTicketTypeManagementService;
|
|
|
|
|
|
@@ -39,8 +40,7 @@ public class PzTicketTypeManagementController extends BaseController
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:management:list')")
|
|
@PreAuthorize("@ss.hasPermi('system:management:list')")
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
- public TableDataInfo list(PzTicketTypeManagement pzTicketTypeManagement)
|
|
|
|
- {
|
|
|
|
|
|
+ public TableDataInfo list(PzTicketTypeManagement pzTicketTypeManagement) {
|
|
startPage();
|
|
startPage();
|
|
List<PzTicketTypeManagement> list = pzTicketTypeManagementService.selectPzTicketTypeManagementList(pzTicketTypeManagement);
|
|
List<PzTicketTypeManagement> list = pzTicketTypeManagementService.selectPzTicketTypeManagementList(pzTicketTypeManagement);
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
@@ -52,8 +52,7 @@ public class PzTicketTypeManagementController extends BaseController
|
|
@PreAuthorize("@ss.hasPermi('system:management:export')")
|
|
@PreAuthorize("@ss.hasPermi('system:management:export')")
|
|
@Log(title = "票种管理", businessType = BusinessType.EXPORT)
|
|
@Log(title = "票种管理", businessType = BusinessType.EXPORT)
|
|
@PostMapping("/export")
|
|
@PostMapping("/export")
|
|
- public void export(HttpServletResponse response, PzTicketTypeManagement pzTicketTypeManagement)
|
|
|
|
- {
|
|
|
|
|
|
+ public void export(HttpServletResponse response, PzTicketTypeManagement pzTicketTypeManagement) {
|
|
List<PzTicketTypeManagement> list = pzTicketTypeManagementService.selectPzTicketTypeManagementList(pzTicketTypeManagement);
|
|
List<PzTicketTypeManagement> list = pzTicketTypeManagementService.selectPzTicketTypeManagementList(pzTicketTypeManagement);
|
|
ExcelUtil<PzTicketTypeManagement> util = new ExcelUtil<PzTicketTypeManagement>(PzTicketTypeManagement.class);
|
|
ExcelUtil<PzTicketTypeManagement> util = new ExcelUtil<PzTicketTypeManagement>(PzTicketTypeManagement.class);
|
|
util.exportExcel(response, list, "票种管理数据");
|
|
util.exportExcel(response, list, "票种管理数据");
|
|
@@ -64,8 +63,7 @@ public class PzTicketTypeManagementController extends BaseController
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:management:query')")
|
|
@PreAuthorize("@ss.hasPermi('system:management:query')")
|
|
@GetMapping(value = "/{id}")
|
|
@GetMapping(value = "/{id}")
|
|
- public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
|
|
- {
|
|
|
|
|
|
+ public AjaxResult getInfo(@PathVariable("id") Long id) {
|
|
return success(pzTicketTypeManagementService.selectPzTicketTypeManagementById(id));
|
|
return success(pzTicketTypeManagementService.selectPzTicketTypeManagementById(id));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -75,8 +73,7 @@ public class PzTicketTypeManagementController extends BaseController
|
|
@PreAuthorize("@ss.hasPermi('system:management:add')")
|
|
@PreAuthorize("@ss.hasPermi('system:management:add')")
|
|
@Log(title = "票种管理", businessType = BusinessType.INSERT)
|
|
@Log(title = "票种管理", businessType = BusinessType.INSERT)
|
|
@PostMapping
|
|
@PostMapping
|
|
- public AjaxResult add(@RequestBody PzTicketTypeManagement pzTicketTypeManagement)
|
|
|
|
- {
|
|
|
|
|
|
+ public AjaxResult add(@RequestBody PzTicketTypeManagement pzTicketTypeManagement) {
|
|
return toAjax(pzTicketTypeManagementService.insertPzTicketTypeManagement(pzTicketTypeManagement));
|
|
return toAjax(pzTicketTypeManagementService.insertPzTicketTypeManagement(pzTicketTypeManagement));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -86,8 +83,7 @@ public class PzTicketTypeManagementController extends BaseController
|
|
@PreAuthorize("@ss.hasPermi('system:management:edit')")
|
|
@PreAuthorize("@ss.hasPermi('system:management:edit')")
|
|
@Log(title = "票种管理", businessType = BusinessType.UPDATE)
|
|
@Log(title = "票种管理", businessType = BusinessType.UPDATE)
|
|
@PutMapping
|
|
@PutMapping
|
|
- public AjaxResult edit(@RequestBody PzTicketTypeManagement pzTicketTypeManagement)
|
|
|
|
- {
|
|
|
|
|
|
+ public AjaxResult edit(@RequestBody PzTicketTypeManagement pzTicketTypeManagement) {
|
|
return toAjax(pzTicketTypeManagementService.updatePzTicketTypeManagement(pzTicketTypeManagement));
|
|
return toAjax(pzTicketTypeManagementService.updatePzTicketTypeManagement(pzTicketTypeManagement));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -96,9 +92,16 @@ public class PzTicketTypeManagementController extends BaseController
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:management:remove')")
|
|
@PreAuthorize("@ss.hasPermi('system:management:remove')")
|
|
@Log(title = "票种管理", businessType = BusinessType.DELETE)
|
|
@Log(title = "票种管理", businessType = BusinessType.DELETE)
|
|
- @DeleteMapping("/{ids}")
|
|
|
|
- public AjaxResult remove(@PathVariable Long[] ids)
|
|
|
|
- {
|
|
|
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
|
+ public AjaxResult remove(@PathVariable Long[] ids) {
|
|
return toAjax(pzTicketTypeManagementService.deletePzTicketTypeManagementByIds(ids));
|
|
return toAjax(pzTicketTypeManagementService.deletePzTicketTypeManagementByIds(ids));
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 状态修改
|
|
|
|
+ */
|
|
|
|
+ @PutMapping("/changeStatus")
|
|
|
|
+ public AjaxResult changeStatus(@RequestBody PzTicketTypeManagement pzTicketTypeManagement) {
|
|
|
|
+ return toAjax(pzTicketTypeManagementService.updateStatus(pzTicketTypeManagement));
|
|
|
|
+ }
|
|
}
|
|
}
|