فهرست منبع

学校添加片区

shuzhan 3 سال پیش
والد
کامیت
1ae595d493

+ 3 - 0
common/src/main/java/com/jpsoft/campus/modules/base/entity/SchoolInfo.java

@@ -124,6 +124,9 @@ public class SchoolInfo {
     @ApiModelProperty(value = "招生片区")
     @ApiModelProperty(value = "招生片区")
     private String district;
     private String district;
 
 
+    @ApiModelProperty(value = "小升初招生片区")
+    private String districtMiddle;
+
     /**
     /**
      * 学校编码"
      * 学校编码"
      */
      */

+ 6 - 1
common/src/main/resources/mapper/base/SchoolInfo.xml

@@ -26,6 +26,7 @@
         <result property="type" column="type_"/>
         <result property="type" column="type_"/>
         <result property="isOpen" column="is_open"/>
         <result property="isOpen" column="is_open"/>
         <result property="district" column="district_"/>
         <result property="district" column="district_"/>
+        <result property="districtMiddle" column="district_middle"/>
     </resultMap>
     </resultMap>
     <insert id="insert" parameterType="com.jpsoft.campus.modules.base.entity.SchoolInfo">
     <insert id="insert" parameterType="com.jpsoft.campus.modules.base.entity.SchoolInfo">
         <!--
         <!--
@@ -36,7 +37,7 @@
         <![CDATA[
         <![CDATA[
 		insert into base_school_info
 		insert into base_school_info
 	    (id_,create_by,create_time,update_by,update_time,del_flag,name_,logo_,enrollment_type,address_,phone_,
 	    (id_,create_by,create_time,update_by,update_time,del_flag,name_,logo_,enrollment_type,address_,phone_,
-	    lector_introduction,longitude_,latitude_,code_,introduction_,parent_id,school_code,type_,is_open,district_)
+	    lector_introduction,longitude_,latitude_,code_,introduction_,parent_id,school_code,type_,is_open,district_,district_middle)
 		values
 		values
 		(
 		(
             #{id,jdbcType=VARCHAR}
             #{id,jdbcType=VARCHAR}
@@ -60,6 +61,7 @@
             ,#{type,jdbcType=VARCHAR}
             ,#{type,jdbcType=VARCHAR}
             ,#{isOpen,jdbcType= NUMERIC }
             ,#{isOpen,jdbcType= NUMERIC }
             ,#{district,jdbcType=VARCHAR}
             ,#{district,jdbcType=VARCHAR}
+            ,#{districtMiddle,jdbcType=VARCHAR}
 		)
 		)
 	]]>
 	]]>
     </insert>
     </insert>
@@ -129,6 +131,9 @@
             <if test="district!=null">
             <if test="district!=null">
                 district_=#{district,jdbcType=VARCHAR},
                 district_=#{district,jdbcType=VARCHAR},
             </if>
             </if>
+            <if test="districtMiddle!=null">
+                district_middle=#{districtMiddle,jdbcType=VARCHAR},
+            </if>
         </set>
         </set>
         where id_=#{id}
         where id_=#{id}
     </update>
     </update>

+ 5 - 3
web/src/main/java/com/jpsoft/campus/modules/mobile/controller/NewsApiController.java

@@ -66,14 +66,16 @@ public class NewsApiController {
 
 
     @PostMapping("normalNewsList")
     @PostMapping("normalNewsList")
     @ApiOperation(value = "手机端新闻(非轮播新闻)")
     @ApiOperation(value = "手机端新闻(非轮播新闻)")
-    public MessageResult<Map> normalNewsList(@RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex,
-                                             @RequestParam(value = "pageSize", defaultValue = "10") int pageSize){
+    public MessageResult<Map> normalNewsList(
+            @RequestParam(value = "type", defaultValue = "1") String type,
+            @RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex,
+            @RequestParam(value = "pageSize", defaultValue = "10") int pageSize){
 
 
         MessageResult<Map> messageResult = new MessageResult<>();
         MessageResult<Map> messageResult = new MessageResult<>();
 
 
         try {
         try {
             Map<String,Object> searchParams = new HashMap<>();
             Map<String,Object> searchParams = new HashMap<>();
-            searchParams.put("type","2");
+            searchParams.put("type",type);
             searchParams.put("status","1");
             searchParams.put("status","1");
 
 
             List<Sort> sortList = new ArrayList<>();
             List<Sort> sortList = new ArrayList<>();