|
|
@@ -7,6 +7,8 @@ import com.mokamrp.privates.entity.DelHandle;
|
|
|
import com.mokamrp.privates.entity.PostBasePageHandle;
|
|
|
import com.mokamrp.privates.help.AjaxResult;
|
|
|
import com.mokamrp.privates.entity.ResHandle;
|
|
|
+import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashTaskList;
|
|
|
+import com.mokamrp.privates.service.pangu.FosterwxCashTaskListService;
|
|
|
import org.apache.tomcat.jni.Local;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.BindingResult;
|
|
|
@@ -40,6 +42,9 @@ public class FosterwxCashTaskTemplateController extends BaseController<FosterwxC
|
|
|
@Autowired
|
|
|
public FosterwxCashTaskTemplateService fosterwxCashTaskTemplateService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ public FosterwxCashTaskListService fosterwxCashTaskListService;
|
|
|
+
|
|
|
/*
|
|
|
* @fast
|
|
|
* 默认生成的控制器所继承的父类中有index/add/edit/del四个基础方法,均为post json请求
|
|
|
@@ -55,6 +60,23 @@ public class FosterwxCashTaskTemplateController extends BaseController<FosterwxC
|
|
|
return AjaxResult.success(res);
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("/listPro")
|
|
|
+ public Object listPro(@Valid @RequestBody PostBasePageHandle postBasePageHandle, BindingResult bindingResult){
|
|
|
+ if (bindingResult.hasErrors()) {
|
|
|
+ return AjaxResult.error(HttpStatus.ERROR, bindingResult.getFieldError().getDefaultMessage());
|
|
|
+ }
|
|
|
+ ResHandle<List<FosterwxCashTaskTemplate>> res = fosterwxCashTaskTemplateService.getList(postBasePageHandle);
|
|
|
+ for (FosterwxCashTaskTemplate fosterwxCashTaskTemplate : res.getList()){
|
|
|
+ List<FosterwxCashTaskList> taskList = fosterwxCashTaskListService.list(
|
|
|
+ new QueryWrapper<FosterwxCashTaskList>()
|
|
|
+ .eq("template_id",fosterwxCashTaskTemplate.getId())
|
|
|
+ .last("limit 6")
|
|
|
+ );
|
|
|
+ fosterwxCashTaskTemplate.setTaskList(taskList);
|
|
|
+ }
|
|
|
+ return AjaxResult.success(res);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 软删除
|
|
|
* @param delHandle
|