智慧保安后台管理-外网
Administrator
2021-09-27 345d17cf82e1bbc1fbfbeec10193c2bed59cd674
src/main/java/org/springblade/modules/apply/controller/ExamPaymentController.java
@@ -4,14 +4,19 @@
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.common.utils.arg;
import org.springblade.core.mp.support.Condition;
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.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
/**
 * @author zhongrj
@@ -70,7 +75,7 @@
    * @param examPayment 考试缴费信息对象
    */
   @PostMapping("/submit")
   public R submit(@RequestBody ExamPayment examPayment) {
   public R submit(@RequestBody ExamPayment examPayment) throws Exception {
      return R.status(examPaymentService.saveOrUpdate(examPayment));
   }
@@ -81,6 +86,12 @@
    */
   @PostMapping("/remove")
   public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) {
      List<String> list = Arrays.asList(ids.split(","));
      list.forEach(id -> {
         //内网同步
         String s1 = "delete from sys_exam_payment where id = " + "'" + id + "'";
         FtpUtil.sqlFileUpload(s1);
      });
      return R.status(examPaymentService.removeByIds(Func.toLongList(ids)));
   }