Просмотр исходного кода

更新接口改成ids 逗号拼接

lqc 4 лет назад
Родитель
Сommit
882f72c690

+ 4 - 1
src/main/java/com/mokamrp/privates/controller/pangu/FosterwxCashWorkClientController.java

@@ -273,7 +273,10 @@ public class FosterwxCashWorkClientController {
     @PostMapping(value = "/changeTaskMobileStatus", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
     @ApiOperation(value = "客户端返回发送状态  根据id更新状态<br>状态(1:待发送;2:发送中;3:已发送;4:已过期;5:发送失败)")
     public Object changeTaskMobileStatus(FosterwxCashScheduleTaskMobile fosterwxCashScheduleTaskMobile) {
-        fosterwxCashScheduleTaskMobileService.updateById(fosterwxCashScheduleTaskMobile);
+        Arrays.asList(fosterwxCashScheduleTaskMobile.getIds().split(",")).forEach(id -> {
+            fosterwxCashScheduleTaskMobile.setId(Integer.valueOf(id));
+            fosterwxCashScheduleTaskMobileService.updateById(fosterwxCashScheduleTaskMobile);
+        });
 
         return AjaxResult.success("更新成功!");
     }

+ 10 - 0
src/main/java/com/mokamrp/privates/mapper/pangu/pojo/FosterwxCashScheduleTaskMobile.java

@@ -64,6 +64,8 @@ public class FosterwxCashScheduleTaskMobile extends Model<FosterwxCashScheduleTa
     @TableField(exist = false)
     private FosterwxCashMobile fosterwxCashMobile;
 
+    @TableField(exist = false)
+    private String ids;
 
     public Integer getId() {
         return id;
@@ -154,4 +156,12 @@ public class FosterwxCashScheduleTaskMobile extends Model<FosterwxCashScheduleTa
     public void setFosterwxCashMobile(FosterwxCashMobile fosterwxCashMobile) {
         this.fosterwxCashMobile = fosterwxCashMobile;
     }
+
+    public String getIds() {
+        return ids;
+    }
+
+    public void setIds(String ids) {
+        this.ids = ids;
+    }
 }