智慧保安后台管理-外网项目备份
src/main/java/org/springblade/modules/apply/controller/ExamPaymentController.java
@@ -9,10 +9,15 @@
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.FTP.FtpUtil;
import org.springblade.modules.apply.entity.ExamPayment;
import org.springblade.modules.apply.service.ExamPaymentService;
import org.springblade.modules.apply.vo.ExamPaymentVO;
import org.springblade.modules.system.service.MyAsyncService;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
/**
 * @author zhongrj
@@ -25,10 +30,12 @@
public class ExamPaymentController {
   private final ExamPaymentService examPaymentService;
   private final MyAsyncService myAsyncService;
   /**
    * 自定义分页
    * @param query page,size
    *
    * @param query       page,size
    * @param examPayment 考试缴费信息对象
    */
   @GetMapping("/page")
@@ -48,6 +55,7 @@
   /**
    * 新增
    *
    * @param examPayment 考试缴费信息对象
    */
   @PostMapping("/save")
@@ -59,6 +67,7 @@
   /**
    * 修改
    *
    * @param examPayment 考试缴费信息对象
    */
   @PostMapping("/update")
@@ -68,27 +77,35 @@
   /**
    * 新增或修改
    *
    * @param examPayment 考试缴费信息对象
    */
   @PostMapping("/submit")
   public R submit(@RequestBody ExamPayment examPayment) throws Exception {
      arg.test01(arg.url+"/examPayment/submit",examPayment);
      return R.status(examPaymentService.saveOrUpdate(examPayment));
   }
   /**
    * 删除
    *
    * @param ids 考试缴费信息ids 数组
    */
   @PostMapping("/remove")
   public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) {
      arg.sendPostRemoveByIds(arg.url+"/examPayment/remove",ids);
      List<String> list = Arrays.asList(ids.split(","));
      list.forEach(id -> {
         //内网同步
         String s1 = "delete from sys_exam_payment where id = " + "'" + id + "'";
         //FtpUtil.sqlFileUpload(s1);
         myAsyncService.dataSync(s1);
      });
      return R.status(examPaymentService.removeByIds(Func.toLongList(ids)));
   }
   /**
    * 详情
    *
    * @param examPayment 考试缴费信息对象
    */
   @GetMapping("/detail")