Эх сурвалжийг харах

Merge remote-tracking branch 'origin/dev'

guq 7 жил өмнө
parent
commit
f2bb7889d9

+ 6 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/HomeWork.java

@@ -36,4 +36,10 @@ public class HomeWork implements Serializable{
 
     private String task_notifier;
 
+    private String classz_name;
+
+    private String grade_name;
+
+    private Date publish_date;
+
 }

+ 10 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/Notify.java

@@ -27,6 +27,8 @@ public class Notify implements Serializable{
 
     private String notify_stu;
 
+    private Date publish_date;
+
     public String getNotify_details() {
         return notify_details;
     }
@@ -122,4 +124,12 @@ public class Notify implements Serializable{
     public void setSchool_id(Long school_id) {
         this.school_id = school_id;
     }
+
+    public Date getPublish_date() {
+        return publish_date;
+    }
+
+    public void setPublish_date(Date publish_date) {
+        this.publish_date = publish_date;
+    }
 }

+ 9 - 3
applications/school/school-server/src/main/resources/mapper/HomeWorkMapper.xml

@@ -14,6 +14,9 @@
     <result column="task_context" property="task_context" jdbcType="LONGVARCHAR" />
     <result column="task_files" property="task_files" jdbcType="LONGVARCHAR" />
     <result column="task_notifier" property="task_notifier" jdbcType="LONGVARCHAR" />
+    <result column="classz_name" property="classz_name" jdbcType="VARCHAR" />
+    <result column="grade_name" property="grade_name" jdbcType="VARCHAR" />
+    <result column="publish_date" property="publish_date" jdbcType="TIMESTAMP" />
   </resultMap>
 
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
@@ -30,12 +33,14 @@
     insert into task_notify (subject_id, task_title,
       task_status, create_date, start_date, 
       end_date, task_creator, school_id, 
-      task_context, task_files, task_notifier
+      task_context, task_files, task_notifier,
+      classz_name, grade_name
       )
     values (#{subject_id,jdbcType=BIGINT}, #{task_title,jdbcType=VARCHAR},
       #{task_status,jdbcType=INTEGER}, #{create_date,jdbcType=TIMESTAMP}, #{start_date,jdbcType=TIMESTAMP}, 
       #{end_date,jdbcType=TIMESTAMP}, #{task_creator,jdbcType=BIGINT}, #{school_id,jdbcType=BIGINT}, 
-      #{task_context,jdbcType=LONGVARCHAR}, #{task_files,jdbcType=LONGVARCHAR}, #{task_notifier,jdbcType=LONGVARCHAR}
+      #{task_context,jdbcType=LONGVARCHAR}, #{task_files,jdbcType=LONGVARCHAR}, #{task_notifier,jdbcType=LONGVARCHAR},
+      #{task_title,jdbcType=VARCHAR},#{task_title,jdbcType=VARCHAR}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.HomeWork" >
@@ -195,7 +200,8 @@
   </select>
   <update id="updateByPublish" parameterType="java.lang.Long">
     update task_notify
-    set task_status = 1
+    set task_status = 1 ,
+      publish_date = now()
     where task_id = #{task_id,jdbcType=BIGINT}
   </update>
 </mapper>

+ 3 - 1
applications/school/school-server/src/main/resources/mapper/NotifyMapper.xml

@@ -14,6 +14,7 @@
     <result column="notify_files" property="notify_files" jdbcType="LONGVARCHAR" />
     <result column="notify_teacher" property="notify_teacher" jdbcType="LONGVARCHAR" />
     <result column="notify_stu" property="notify_stu" jdbcType="LONGVARCHAR" />
+    <result column="publish_date" property="publish_date" jdbcType="TIMESTAMP" />
   </resultMap>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
     select *
@@ -192,7 +193,8 @@
   </select>
   <update id="updateByPublish" parameterType="java.lang.Long">
     update notify
-    set notify_status = 1
+    set notify_status = 1 ,
+      publish_date = now()
     where notify_id = #{notify_id,jdbcType=BIGINT}
   </update>
 </mapper>