From 9481869e7c7af0db99a9f3df119c4812f5cdbdae Mon Sep 17 00:00:00 2001
From: heheng <heheng@123456>
Date: Sun, 26 Jan 2025 14:17:08 +0800
Subject: [PATCH] 修改报错
---
exam-system/src/main/java/com/gkhy/exam/pay/controller/NonCoalPayController.java | 30 ++++++++++++++++++++++--------
1 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/exam-system/src/main/java/com/gkhy/exam/pay/controller/NonCoalPayController.java b/exam-system/src/main/java/com/gkhy/exam/pay/controller/NonCoalPayController.java
index 5fed10f..4fb552d 100644
--- a/exam-system/src/main/java/com/gkhy/exam/pay/controller/NonCoalPayController.java
+++ b/exam-system/src/main/java/com/gkhy/exam/pay/controller/NonCoalPayController.java
@@ -2,6 +2,7 @@
import com.gkhy.exam.pay.dto.rep.NonCoalPayPageRepDto;
import com.gkhy.exam.pay.dto.req.NonCoalPayReqDto;
+import com.gkhy.exam.pay.dto.req.NonCoalPayStuImport;
import com.gkhy.exam.pay.dto.req.NonCoalPayStudentReqDto;
import com.gkhy.exam.pay.dto.req.NonCoalPayTypeEditReqDto;
import com.gkhy.exam.pay.entity.NonCoalPay;
@@ -19,7 +20,6 @@
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -89,7 +89,7 @@
* 新增非煤缴费管理
*/
@PostMapping("/add")
- @PreAuthorize("@ss.hasPermi('noncoal:nonpay:add')")
+ //@PreAuthorize("@ss.hasPermi('noncoal:nonpay:add')")
@ApiOperation(value = "新增非煤缴费管理")
public AjaxResult add(@Validated @RequestBody NonCoalPayReqDto nonCoalPay) {
return toAjax(nonCoalPayService.insertNonCoalPay(nonCoalPay));
@@ -124,7 +124,7 @@
/**
* 删除非煤缴费管理
*/
- @DeleteMapping("/id")
+ @DeleteMapping("/{id}")
@ApiOperation(value = "删除非煤缴费管理")
@ApiImplicitParam(name = "id", dataTypeClass = Long.class, value = "id", required = true)
public AjaxResult remove(@PathVariable Long id) {
@@ -146,14 +146,14 @@
*/
@PostMapping("/editNonCoalStu")
@ApiOperation(value = "修改非煤缴费学员")
- public AjaxResult editNonCoalStu(@RequestBody NonCoalPayStudent nonCoalPayStudent) {
+ public AjaxResult editNonCoalStu(@Validated @RequestBody NonCoalPayStudent nonCoalPayStudent) {
return toAjax(nonCoalPayStudentService.updateNonCoalPayStudent(nonCoalPayStudent));
}
/**
* 删除【请填写功能名称】
*/
- @DeleteMapping("/delNonCalStu/id")
+ @DeleteMapping("/delNonCalStu/{id}")
@ApiOperation(value = "删除非煤缴费学员")
@ApiImplicitParam(name = "id", dataTypeClass = Long.class, value = "id", required = true)
public AjaxResult delNonCalStu(@PathVariable Long id) {
@@ -162,9 +162,11 @@
@PostMapping("/stuImportData")
+ @ApiOperation(value = "导入学员")
+ @ApiImplicitParam(name = "nonCoalPayId", dataTypeClass = Long.class, value = "nonCoalPayId", required = true)
public AjaxResult importData(MultipartFile file, Long nonCoalPayId) throws Exception {
- ExcelUtil<NonCoalPayStudent> util = new ExcelUtil<NonCoalPayStudent>(NonCoalPayStudent.class);
- List<NonCoalPayStudent> nonCoalPayStudents = util.importExcel(file.getInputStream());
+ ExcelUtil<NonCoalPayStuImport> util = new ExcelUtil<NonCoalPayStuImport>(NonCoalPayStuImport.class);
+ List<NonCoalPayStuImport> nonCoalPayStudents = util.importExcel(file.getInputStream());
String operName = getUsername();
String message = nonCoalPayStudentService.importData(nonCoalPayStudents, operName, nonCoalPayId);
return success(message);
@@ -179,7 +181,7 @@
@GetMapping("/nonCoalSelectH5")
- @ApiOperation(value = "H5查询缴费信息")
+ @ApiOperation(value = "非煤H5查询缴费信息")
@Anonymous
@ApiImplicitParams({
@ApiImplicitParam(name = "phone", dataTypeClass = String.class, value = "电话", required = true),
@@ -191,4 +193,16 @@
}
+ @PostMapping("/sendOrder")
+ @ApiOperation(value = "生成财政订单")
+ @Anonymous
+ @RepeatSubmit
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "id", dataTypeClass = Long.class, value = "个人缴费学员数据id,团队缴费数据id", required = true),
+ @ApiImplicitParam(name = "payType", dataTypeClass = String.class, value = "1个人2是团队", required = true),
+ })
+ public AjaxResult sendOrder(@RequestParam("id") Long id, @RequestParam("payType") String payType) {
+ return success(nonCoalPayStudentService.sendOrder(id, payType));
+ }
+
}
--
Gitblit v1.9.2