| | |
| | | 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 |
| | |
| | | public class ExamPaymentController { |
| | | |
| | | private final ExamPaymentService examPaymentService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * @param query page,size |
| | | * |
| | | * @param query page,size |
| | | * @param examPayment 考试缴费信息对象 |
| | | */ |
| | | @GetMapping("/page") |
| | |
| | | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param examPayment 考试缴费信息对象 |
| | | */ |
| | | @PostMapping("/save") |
| | |
| | | |
| | | /** |
| | | * 修改 |
| | | * |
| | | * @param examPayment 考试缴费信息对象 |
| | | */ |
| | | @PostMapping("/update") |
| | |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | * |
| | | * @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") |