Bläddra i källkod

Merge branch 'master' of http://git.mokasz.com/marketing/moka-private

leon 5 år sedan
förälder
incheckning
082f4f1e78

+ 10 - 10
src/main/java/com/mokamrp/privates/controller/pangu/FosterwxMobileController.java

@@ -83,28 +83,28 @@ public class FosterwxMobileController extends BaseController<FosterwxMobile> {
 
 
     @PostMapping("/addPro")
     @PostMapping("/addPro")
     @Transactional(rollbackFor = Exception.class)
     @Transactional(rollbackFor = Exception.class)
-    public Object addPro(@RequestBody FosterwxMobile fosterwxMobile, @AuthUser User authUser) {
+    public Object addPro(@Valid @RequestBody AddHandle<FosterwxMobile> addHandle, @AuthUser User authUser) {
         // 新增账号
         // 新增账号
-        fosterwxMobileService.save(fosterwxMobile);
+        fosterwxMobileService.save(addHandle.getRaw());
         // 判断开始做任务时间是否设置了
         // 判断开始做任务时间是否设置了
         AjaxResult ajaxResult = null;
         AjaxResult ajaxResult = null;
-        if (null != fosterwxMobile.getTaskStartAt() && fosterwxMobile.getWxStatus() != 2) {
-            ajaxResult = fosterwxTaskScheduleService.insertByTaskDate(fosterwxMobile, authUser, false);
+        if (null != addHandle.getRaw().getTaskStartAt() && addHandle.getRaw().getWxStatus() != 2) {
+            ajaxResult = fosterwxTaskScheduleService.insertByTaskDate(addHandle.getRaw(), authUser, false);
         }
         }
 
 
-        if (null == ajaxResult) return AjaxResult.success(HttpMsg.success,fosterwxMobile.getId());
+        if (null == ajaxResult) return AjaxResult.success(HttpMsg.success,addHandle.getRaw().getId());
 
 
         return ajaxResult;
         return ajaxResult;
     }
     }
 
 
     @PutMapping("/edit")
     @PutMapping("/edit")
     @Transactional(rollbackFor = Exception.class)
     @Transactional(rollbackFor = Exception.class)
-    public Object edit(@RequestBody FosterwxMobile fosterwxMobile, @AuthUser User authUser) {
-        FosterwxMobile oldVO = fosterwxMobileService.getById(fosterwxMobile.getId());
+    public Object edit(@Valid @RequestBody EditHandle<FosterwxMobile> editHandle, @AuthUser User authUser) {
+        FosterwxMobile fosterwxMobile = editHandle.getRaw();
+        FosterwxMobile oldVO = fosterwxMobileService.getById(editHandle.getIds());
         // 新增账号
         // 新增账号
-        fosterwxMobileService.updateById(fosterwxMobile);
-        fosterwxMobile = fosterwxMobileService.getById(fosterwxMobile.getId());
-
+        fosterwxMobileService.update(fosterwxMobile,new QueryWrapper<FosterwxMobile>().eq("id",editHandle.getIds()));
+        fosterwxMobile = fosterwxMobileService.getById(editHandle.getIds());
         // 判断开始做任务时间是否设置了
         // 判断开始做任务时间是否设置了
         AjaxResult ajaxResult = null;
         AjaxResult ajaxResult = null;
         if (null != fosterwxMobile.getTaskStartAt()) {
         if (null != fosterwxMobile.getTaskStartAt()) {

+ 2 - 0
src/main/java/com/mokamrp/privates/service/pangu/impl/FosterwxTaskScheduleServiceImpl.java

@@ -20,6 +20,7 @@ import org.springframework.stereotype.Service;
 
 
 import java.time.LocalDate;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
@@ -59,6 +60,7 @@ public class FosterwxTaskScheduleServiceImpl extends ServiceImpl<FosterwxTaskSch
         Page<FosterwxTaskSchedule> pageObj = new Page<FosterwxTaskSchedule>(page, pagesize);
         Page<FosterwxTaskSchedule> pageObj = new Page<FosterwxTaskSchedule>(page, pagesize);
         QueryWrapper<FosterwxTaskSchedule> fosterwxTaskScheduleQueryWrapper = new QueryWrapper<>();
         QueryWrapper<FosterwxTaskSchedule> fosterwxTaskScheduleQueryWrapper = new QueryWrapper<>();
         fosterwxTaskScheduleQueryWrapper.select("distinct station_id,station_name,task_id,task_name,task_status,task_send_status,create_uid,send_time,err_msg,mark");
         fosterwxTaskScheduleQueryWrapper.select("distinct station_id,station_name,task_id,task_name,task_status,task_send_status,create_uid,send_time,err_msg,mark");
+        fosterwxTaskScheduleQueryWrapper.eq("send_date", LocalDate.parse(date, DateTimeFormatter.ofPattern("yyyy-MM-dd")));
         fosterwxTaskScheduleQueryWrapper.orderByDesc("station_id");
         fosterwxTaskScheduleQueryWrapper.orderByDesc("station_id");
         fosterwxTaskScheduleQueryWrapper.orderByDesc("task_id");
         fosterwxTaskScheduleQueryWrapper.orderByDesc("task_id");