|
|
@@ -13,6 +13,7 @@ import com.mokamrp.privates.mapper.pojo.User;
|
|
|
import com.mokamrp.privates.service.pangu.FosterwxCashAccountScheduleService;
|
|
|
import com.mokamrp.privates.service.pangu.FosterwxCashScheduleTaskListService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.validation.BindingResult;
|
|
|
@@ -55,6 +56,7 @@ public class FosterwxCashAccountScheduleController extends BaseController<Foster
|
|
|
*/
|
|
|
|
|
|
@PostMapping("/list")
|
|
|
+ @ApiOperation(value = "获取列表信息")
|
|
|
public Object list(@Valid @RequestBody FosterwxCashAccountScheduleHandle handle, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
return AjaxResult.error(HttpStatus.ERROR, bindingResult.getFieldError().getDefaultMessage());
|
|
|
@@ -64,6 +66,7 @@ public class FosterwxCashAccountScheduleController extends BaseController<Foster
|
|
|
}
|
|
|
|
|
|
@PostMapping("/addPro")
|
|
|
+ @ApiOperation(value = "新建按钮")
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public Object addPro(@RequestBody FosterwxCashAccountSchedule fosterwxCashAccountSchedule, @AuthUser User user) {
|
|
|
this.onInsert(fosterwxCashAccountSchedule);
|
|
|
@@ -79,6 +82,7 @@ public class FosterwxCashAccountScheduleController extends BaseController<Foster
|
|
|
return AjaxResult.success("新建成功");
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "导入排期按钮")
|
|
|
@PostMapping("/importSchedule")
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public Object importSchedule(@RequestBody MultipartFile file, @AuthUser User user) {
|
|
|
@@ -114,6 +118,7 @@ public class FosterwxCashAccountScheduleController extends BaseController<Foster
|
|
|
|
|
|
@PostMapping("/immediateCreate")
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
+ @ApiOperation(value = "立即生成----缺少typer的接口")
|
|
|
public Object immediateCreate(FosterwxCashAccountScheduleHandle handle) {
|
|
|
Arrays.asList(handle.getIds().split(REGEX)).forEach(id -> fosterwxCashAccountScheduleService.createTask(Integer.valueOf(id)));
|
|
|
|
|
|
@@ -121,6 +126,7 @@ public class FosterwxCashAccountScheduleController extends BaseController<Foster
|
|
|
}
|
|
|
|
|
|
@PostMapping("/preview")
|
|
|
+ @ApiOperation(value = "预览按钮---缺少老王的方法")
|
|
|
public Object priview(FosterwxCashAccountScheduleHandle handle) {
|
|
|
// TODO 等老王的接口
|
|
|
|
|
|
@@ -128,6 +134,7 @@ public class FosterwxCashAccountScheduleController extends BaseController<Foster
|
|
|
}
|
|
|
|
|
|
@PostMapping("/cancelTask")
|
|
|
+ @ApiOperation(value = "取消任务按钮")
|
|
|
public Object cancelTask(FosterwxCashAccountScheduleHandle handle, @AuthUser User user) {
|
|
|
Arrays.asList(handle.getIds().split(REGEX)).forEach(id -> fosterwxCashScheduleTaskListService.cancelTask(Integer.valueOf(id), user.getId()));
|
|
|
|