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

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

leon 5 лет назад
Родитель
Сommit
14726bd9fb

+ 6 - 2
src/main/java/com/mokamrp/privates/controller/pangu/FosterwxTaskScheduleController.java

@@ -109,8 +109,10 @@ public class FosterwxTaskScheduleController extends BaseController<FosterwxTaskS
                 fosterwxTaskScheduleHandle.setTaskId(fosterwxTaskSchedule.getTaskId());
                 fosterwxTaskScheduleHandle.setStationId(fosterwxTaskSchedule.getStationId());
                 FosterwxTaskSchedule mobileContent = fosterwxTaskScheduleService.getInfo(handle);
-                fosterwxTaskSchedule.setMobileCount(mobileContent.getMobileCount());
-                fosterwxTaskSchedule.setComment(mobileContent.getComment());
+                if (null != mobileContent) {
+                    fosterwxTaskSchedule.setMobileCount(mobileContent.getMobileCount());
+                    fosterwxTaskSchedule.setComment(mobileContent.getComment());
+                }
             });
 
 
@@ -123,6 +125,8 @@ public class FosterwxTaskScheduleController extends BaseController<FosterwxTaskS
     public Object getInfo(@Valid @RequestBody FosterwxTaskScheduleHandle handle) {
         FosterwxTaskSchedule fosterwxTaskSchedule = fosterwxTaskScheduleService.getInfo(handle);
 
+        if (null != fosterwxTaskSchedule) return AjaxResult.error("获取失败!");
+
         Map<String, Object> res = new HashMap<>();
 
         StringBuffer sb = new StringBuffer();

+ 2 - 1
src/main/java/com/mokamrp/privates/mapper/pangu/FosterwxTaskScheduleMapper.xml

@@ -11,6 +11,7 @@
         <result column="template_id" property="templateId"/>
         <result column="task_id" property="taskId"/>
         <result column="task_name" property="taskName"/>
+        <result column="task_content" property="taskContent"/>
         <result column="task_status" property="taskStatus"/>
         <result column="task_send_status" property="taskSendStatus"/>
         <result column="send_date" property="sendDate"/>
@@ -27,7 +28,7 @@
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
         id
-        , station_id, station_name, mobile_code, template_id, task_id, task_name, task_status, task_send_status, send_date, send_time, err_msg, mark, del_flg, create_uid, update_uid, create_at, update_at
+        , station_id, station_name, mobile_code, template_id, task_id, task_name, task_content, task_status, task_send_status, send_date, send_time, err_msg, mark, del_flg, create_uid, update_uid, create_at, update_at
     </sql>
     <select id="getList" resultType="com.mokamrp.privates.mapper.pangu.pojo.FosterwxTaskSchedule">
         SELECT *

+ 13 - 0
src/main/java/com/mokamrp/privates/mapper/pangu/pojo/FosterwxTaskSchedule.java

@@ -60,6 +60,11 @@ public class FosterwxTaskSchedule extends Model<FosterwxTaskSchedule> {
     private String taskName;
 
     /**
+     * 任务内容
+     */
+    private String taskContent;
+
+    /**
      * 任务完成状态(0:待完成,1:已完成,2:已过期)
      */
     private Integer taskStatus;
@@ -177,6 +182,14 @@ public class FosterwxTaskSchedule extends Model<FosterwxTaskSchedule> {
         this.taskName = taskName;
     }
 
+    public String getTaskContent() {
+        return taskContent;
+    }
+
+    public void setTaskContent(String taskContent) {
+        this.taskContent = taskContent;
+    }
+
     public Integer getTaskStatus() {
         return taskStatus;
     }

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

@@ -223,6 +223,8 @@ public class FosterwxTaskScheduleServiceImpl extends ServiceImpl<FosterwxTaskSch
             }
         }
 
+        if (fosterwxTaskScheduleList.isEmpty()) return null;
+
         FosterwxTaskSchedule fosterwxTaskSchedule = fosterwxTaskScheduleList.get(0);
         fosterwxTaskSchedule.setMobileCount(fosterwxTaskScheduleList.size());
         fosterwxTaskSchedule.setComment(mobileCode);