Explorar o código

新闻模块添加地区投放功能

wanghui %!s(int64=8) %!d(string=hai) anos
pai
achega
907f1ba436

+ 1 - 1
generatorConfig.xml

@@ -8,6 +8,6 @@
     <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="AFT" />
     <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="AFT" />
     <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="AFT" type="XMLMAPPER" />
-    <table schema="aft" tableName="country_code"/>
+    <table schema="aft" tableName="branch_office_info"/>
   </context>
 </generatorConfiguration>

+ 33 - 0
schema/20170822-init-branch-office.sql

@@ -0,0 +1,33 @@
+#创建分公司管理表
+create table branch_office_info(
+	id int(4) primary key auto_increment,
+	name varchar(32) comment '分公司名字',
+	website varchar(32) not null comment '分公司网络地址',
+	contact_number varchar(11) comment '联系号码',
+	contact_address varchar(64) comment '联系地址',
+	logo_img varchar(64) comment 'LOGO图片',
+	qr_img varchar(64) comment '二维码图片',
+	province_id int(4) not null comment '所属省份'
+);
+#初始化数据
+insert into branch_office_info values(1,'南昌科德','nckd.jishutao.com',null,null,null,null,26);
+insert into branch_office_info values(2,'福州科宇','fzky.jishutao.com',null,null,null,null,25);
+insert into branch_office_info values(3,'贵州科德','gzkd.jishutao.com',null,null,null,null,6);
+insert into branch_office_info values(4,'大连科德','dlkd.jishutao.com',null,null,null,null,28);
+insert into branch_office_info values(5,'广州科中','gzkz.jishutao.com',null,null,null,null,12);
+insert into branch_office_info values(6,'河南科德','hnkd.jishutao.com',null,null,null,null,9);
+insert into branch_office_info values(7,'昆明科道','kmkd.jishutao.com',null,null,null,null,7);
+insert into branch_office_info values(8,'石家庄科中','sjzkz.jishutao.com',null,null,null,null,19);
+insert into branch_office_info values(9,'青岛科德','qdkd.jishutao.com',null,null,null,null,27);
+insert into branch_office_info values(10,'长春科德','cckd.jishutao.com',null,null,null,null,29);
+insert into branch_office_info values(11,'广州科丰','gzkf.jishutao.com',null,null,null,null,12);
+insert into branch_office_info values(12,'北京科德','bjkd.jishutao.com',null,null,null,null,1);
+insert into branch_office_info values(13,'山东科德','sdkd.jishutao.com',null,null,null,null,27);
+insert into branch_office_info values(14,'江苏科德','jskd.jishutao.com',null,null,null,null,22);
+insert into branch_office_info values(15,'武汉科汇','whkh.jishutao.com',null,null,null,null,10);
+insert into branch_office_info values(16,'合肥科稻','hfkd.jishutao.com',null,null,null,null,24);
+insert into branch_office_info values(17,'成都科德','cdkd.jishutao.com',null,null,null,null,5);
+insert into branch_office_info values(18,'内蒙古科发','nmgkf.jishutao.com',null,null,null,null,21);
+insert into branch_office_info values(19,'南宁科发','nnkf.jishutao.com',null,null,null,null,13);
+insert into branch_office_info values(20,'沈阳科德','sykd.jishutao.com',null,null,null,null,28);
+insert into branch_office_info values(21,'湖南科德','www.jishutao.com',null,null,null,null,11);

+ 76 - 0
src/main/java/com/goafanti/common/dao/BranchOfficeInfoMapper.java

@@ -0,0 +1,76 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.BranchOfficeInfo;
+import com.goafanti.common.model.BranchOfficeInfoExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface BranchOfficeInfoMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	long countByExample(BranchOfficeInfoExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	int deleteByExample(BranchOfficeInfoExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	int insert(BranchOfficeInfo record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	int insertSelective(BranchOfficeInfo record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	List<BranchOfficeInfo> selectByExample(BranchOfficeInfoExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	BranchOfficeInfo selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	int updateByExampleSelective(@Param("record") BranchOfficeInfo record,
+			@Param("example") BranchOfficeInfoExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	int updateByExample(@Param("record") BranchOfficeInfo record, @Param("example") BranchOfficeInfoExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	int updateByPrimaryKeySelective(BranchOfficeInfo record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	int updateByPrimaryKey(BranchOfficeInfo record);
+}

+ 333 - 0
src/main/java/com/goafanti/common/mapper/BranchOfficeInfoMapper.xml

@@ -0,0 +1,333 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.BranchOfficeInfoMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.BranchOfficeInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 22 09:20:20 CST 2017.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="website" jdbcType="VARCHAR" property="website" />
+    <result column="contact_number" jdbcType="VARCHAR" property="contactNumber" />
+    <result column="contact_address" jdbcType="VARCHAR" property="contactAddress" />
+    <result column="logo_img" jdbcType="VARCHAR" property="logoImg" />
+    <result column="qr_img" jdbcType="VARCHAR" property="qrImg" />
+    <result column="province_id" jdbcType="INTEGER" property="provinceId" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 22 09:20:20 CST 2017.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 22 09:20:20 CST 2017.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 22 09:20:20 CST 2017.
+    -->
+    id, name, website, contact_number, contact_address, logo_img, qr_img, province_id
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.BranchOfficeInfoExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 22 09:20:20 CST 2017.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from branch_office_info
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 22 09:20:20 CST 2017.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from branch_office_info
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 22 09:20:20 CST 2017.
+    -->
+    delete from branch_office_info
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.BranchOfficeInfoExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 22 09:20:20 CST 2017.
+    -->
+    delete from branch_office_info
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.BranchOfficeInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 22 09:20:20 CST 2017.
+    -->
+    insert into branch_office_info (id, name, website, 
+      contact_number, contact_address, logo_img, 
+      qr_img, province_id)
+    values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{website,jdbcType=VARCHAR}, 
+      #{contactNumber,jdbcType=VARCHAR}, #{contactAddress,jdbcType=VARCHAR}, #{logoImg,jdbcType=VARCHAR}, 
+      #{qrImg,jdbcType=VARCHAR}, #{provinceId,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.BranchOfficeInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 22 09:20:20 CST 2017.
+    -->
+    insert into branch_office_info
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="name != null">
+        name,
+      </if>
+      <if test="website != null">
+        website,
+      </if>
+      <if test="contactNumber != null">
+        contact_number,
+      </if>
+      <if test="contactAddress != null">
+        contact_address,
+      </if>
+      <if test="logoImg != null">
+        logo_img,
+      </if>
+      <if test="qrImg != null">
+        qr_img,
+      </if>
+      <if test="provinceId != null">
+        province_id,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="website != null">
+        #{website,jdbcType=VARCHAR},
+      </if>
+      <if test="contactNumber != null">
+        #{contactNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="contactAddress != null">
+        #{contactAddress,jdbcType=VARCHAR},
+      </if>
+      <if test="logoImg != null">
+        #{logoImg,jdbcType=VARCHAR},
+      </if>
+      <if test="qrImg != null">
+        #{qrImg,jdbcType=VARCHAR},
+      </if>
+      <if test="provinceId != null">
+        #{provinceId,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.BranchOfficeInfoExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 22 09:20:20 CST 2017.
+    -->
+    select count(*) from branch_office_info
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 22 09:20:20 CST 2017.
+    -->
+    update branch_office_info
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.name != null">
+        name = #{record.name,jdbcType=VARCHAR},
+      </if>
+      <if test="record.website != null">
+        website = #{record.website,jdbcType=VARCHAR},
+      </if>
+      <if test="record.contactNumber != null">
+        contact_number = #{record.contactNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="record.contactAddress != null">
+        contact_address = #{record.contactAddress,jdbcType=VARCHAR},
+      </if>
+      <if test="record.logoImg != null">
+        logo_img = #{record.logoImg,jdbcType=VARCHAR},
+      </if>
+      <if test="record.qrImg != null">
+        qr_img = #{record.qrImg,jdbcType=VARCHAR},
+      </if>
+      <if test="record.provinceId != null">
+        province_id = #{record.provinceId,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 22 09:20:20 CST 2017.
+    -->
+    update branch_office_info
+    set id = #{record.id,jdbcType=INTEGER},
+      name = #{record.name,jdbcType=VARCHAR},
+      website = #{record.website,jdbcType=VARCHAR},
+      contact_number = #{record.contactNumber,jdbcType=VARCHAR},
+      contact_address = #{record.contactAddress,jdbcType=VARCHAR},
+      logo_img = #{record.logoImg,jdbcType=VARCHAR},
+      qr_img = #{record.qrImg,jdbcType=VARCHAR},
+      province_id = #{record.provinceId,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.BranchOfficeInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 22 09:20:20 CST 2017.
+    -->
+    update branch_office_info
+    <set>
+      <if test="name != null">
+        name = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="website != null">
+        website = #{website,jdbcType=VARCHAR},
+      </if>
+      <if test="contactNumber != null">
+        contact_number = #{contactNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="contactAddress != null">
+        contact_address = #{contactAddress,jdbcType=VARCHAR},
+      </if>
+      <if test="logoImg != null">
+        logo_img = #{logoImg,jdbcType=VARCHAR},
+      </if>
+      <if test="qrImg != null">
+        qr_img = #{qrImg,jdbcType=VARCHAR},
+      </if>
+      <if test="provinceId != null">
+        province_id = #{provinceId,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.BranchOfficeInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 22 09:20:20 CST 2017.
+    -->
+    update branch_office_info
+    set name = #{name,jdbcType=VARCHAR},
+      website = #{website,jdbcType=VARCHAR},
+      contact_number = #{contactNumber,jdbcType=VARCHAR},
+      contact_address = #{contactAddress,jdbcType=VARCHAR},
+      logo_img = #{logoImg,jdbcType=VARCHAR},
+      qr_img = #{qrImg,jdbcType=VARCHAR},
+      province_id = #{provinceId,jdbcType=INTEGER}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 16 - 7
src/main/java/com/goafanti/common/mapper/NewsMapper.xml

@@ -14,13 +14,14 @@
     <result column="source_url" jdbcType="VARCHAR" property="sourceUrl" />
     <result column="summary" jdbcType="VARCHAR" property="summary" />
     <result column="jmrh_flag" jdbcType="INTEGER" property="jmrhFlag" />
+    <result column="province_id" jdbcType="INTEGER" property="provinceId" /> 
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.News">
     <result column="content" jdbcType="LONGVARCHAR" property="content" />
   </resultMap>
   <sql id="Base_Column_List">
     id, create_time, edit_time, title, title_img, author, type, hot, source, source_url, 
-    summary,jmrh_flag
+    summary,jmrh_flag,province_id
   </sql>
   <sql id="Blob_Column_List">
     content
@@ -41,13 +42,13 @@
     insert into news (id, create_time, edit_time, 
       title, title_img, author, 
       type, hot, source, 
-      source_url, summary, content,jmrh_flag
+      source_url, summary, content,jmrh_flag,province_id
       )
     values (#{id,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{editTime,jdbcType=TIMESTAMP}, 
       #{title,jdbcType=VARCHAR}, #{titleImg,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, 
       #{type,jdbcType=INTEGER}, #{hot,jdbcType=INTEGER}, #{source,jdbcType=VARCHAR}, 
       #{sourceUrl,jdbcType=VARCHAR}, #{summary,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR},
-      #{jmrhFlag,jdbcType=INTEGER}
+      #{jmrhFlag,jdbcType=INTEGER}, #{provinceId,jdbcType=INTEGER}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.News">
@@ -90,7 +91,10 @@
         content,
       </if>
       <if test="jmrhFlag != null">
-      	jmrhFlag,
+      	jmrh_flag,
+      </if>
+      <if test="provinceId != null">
+      	province_id,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -131,7 +135,10 @@
         #{content,jdbcType=LONGVARCHAR},
       </if>
        <if test="jmrhFlag != null">
-        #{content,jdbcType=INTEGER},
+        #{jmrhFlag,jdbcType=INTEGER},
+      </if>
+      <if test="provinceId != null">
+        #{provinceId,jdbcType=INTEGER},
       </if>
     </trim>
   </insert>
@@ -190,7 +197,8 @@
       source_url = #{sourceUrl,jdbcType=VARCHAR},
       summary = #{summary,jdbcType=VARCHAR},
       content = #{content,jdbcType=LONGVARCHAR},
-      jmrh_flag = #{jmrhFlag,jdbcType=INTEGER}
+      jmrh_flag = #{jmrhFlag,jdbcType=INTEGER},
+      province_id = #{provinceId,jdbcType=INTEGER}
     where id = #{id,jdbcType=BIGINT}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.News">
@@ -205,7 +213,8 @@
       source = #{source,jdbcType=VARCHAR},
       source_url = #{sourceUrl,jdbcType=VARCHAR},
       summary = #{summary,jdbcType=VARCHAR},
-       jmrh_flag = #{jmrhFlag,jdbcType=INTEGER}
+      jmrh_flag = #{jmrhFlag,jdbcType=INTEGER},
+      province_id = #{provinceId,jdbcType=INTEGER}
     where id = #{id,jdbcType=BIGINT}
   </update>
   

+ 16 - 11
src/main/java/com/goafanti/common/mapper/NewsMapperExt.xml

@@ -116,19 +116,24 @@
   
   <select id="findPortalList" resultType="com.goafanti.news.bo.NewsPortalList">
 		select
-			id, 
-			create_time as createTime, 
-			title , 
-			title_img as titleImg, 
-			type, 
-			hot, 
-			summary,
-			source,
-			content
-		from news
+			a.id,
+			a.create_time as createTime,
+			a.title,
+			a.title_img as titleImg,
+			a.type,
+			a.hot,
+			a.summary,
+			a.source,
+			a.content
+		from news a
+		join branch_office_info b
+		on a.province_id = b.province_id
 		where 1 =1
 		<if test="type != null and type != 0" >
-			and type = #{type,jdbcType=INTEGER}
+			and a.type = #{type,jdbcType=INTEGER}
+		</if>
+		<if test="website != null">
+			and b.website = #{website,jdbcType=VARCHAR}
 		</if>
 		order by create_time desc
 		limit #{pageNo,jdbcType=INTEGER}, #{pageSize,jdbcType=INTEGER}

+ 189 - 0
src/main/java/com/goafanti/common/model/BranchOfficeInfo.java

@@ -0,0 +1,189 @@
+package com.goafanti.common.model;
+
+public class BranchOfficeInfo {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column branch_office_info.id
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column branch_office_info.name
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	private String name;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column branch_office_info.website
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	private String website;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column branch_office_info.contact_number
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	private String contactNumber;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column branch_office_info.contact_address
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	private String contactAddress;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column branch_office_info.logo_img
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	private String logoImg;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column branch_office_info.qr_img
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	private String qrImg;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column branch_office_info.province_id
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	private Integer provinceId;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column branch_office_info.id
+	 * @return  the value of branch_office_info.id
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column branch_office_info.id
+	 * @param id  the value for branch_office_info.id
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column branch_office_info.name
+	 * @return  the value of branch_office_info.name
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column branch_office_info.name
+	 * @param name  the value for branch_office_info.name
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column branch_office_info.website
+	 * @return  the value of branch_office_info.website
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public String getWebsite() {
+		return website;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column branch_office_info.website
+	 * @param website  the value for branch_office_info.website
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public void setWebsite(String website) {
+		this.website = website;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column branch_office_info.contact_number
+	 * @return  the value of branch_office_info.contact_number
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public String getContactNumber() {
+		return contactNumber;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column branch_office_info.contact_number
+	 * @param contactNumber  the value for branch_office_info.contact_number
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public void setContactNumber(String contactNumber) {
+		this.contactNumber = contactNumber;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column branch_office_info.contact_address
+	 * @return  the value of branch_office_info.contact_address
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public String getContactAddress() {
+		return contactAddress;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column branch_office_info.contact_address
+	 * @param contactAddress  the value for branch_office_info.contact_address
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public void setContactAddress(String contactAddress) {
+		this.contactAddress = contactAddress;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column branch_office_info.logo_img
+	 * @return  the value of branch_office_info.logo_img
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public String getLogoImg() {
+		return logoImg;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column branch_office_info.logo_img
+	 * @param logoImg  the value for branch_office_info.logo_img
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public void setLogoImg(String logoImg) {
+		this.logoImg = logoImg;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column branch_office_info.qr_img
+	 * @return  the value of branch_office_info.qr_img
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public String getQrImg() {
+		return qrImg;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column branch_office_info.qr_img
+	 * @param qrImg  the value for branch_office_info.qr_img
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public void setQrImg(String qrImg) {
+		this.qrImg = qrImg;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column branch_office_info.province_id
+	 * @return  the value of branch_office_info.province_id
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public Integer getProvinceId() {
+		return provinceId;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column branch_office_info.province_id
+	 * @param provinceId  the value for branch_office_info.province_id
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public void setProvinceId(Integer provinceId) {
+		this.provinceId = provinceId;
+	}
+}

+ 801 - 0
src/main/java/com/goafanti/common/model/BranchOfficeInfoExample.java

@@ -0,0 +1,801 @@
+package com.goafanti.common.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class BranchOfficeInfoExample {
+    /**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	protected String orderByClause;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	protected boolean distinct;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	protected List<Criteria> oredCriteria;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public BranchOfficeInfoExample() {
+		oredCriteria = new ArrayList<Criteria>();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public void setOrderByClause(String orderByClause) {
+		this.orderByClause = orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public String getOrderByClause() {
+		return orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public void setDistinct(boolean distinct) {
+		this.distinct = distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public boolean isDistinct() {
+		return distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public List<Criteria> getOredCriteria() {
+		return oredCriteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public void or(Criteria criteria) {
+		oredCriteria.add(criteria);
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public Criteria or() {
+		Criteria criteria = createCriteriaInternal();
+		oredCriteria.add(criteria);
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public Criteria createCriteria() {
+		Criteria criteria = createCriteriaInternal();
+		if (oredCriteria.size() == 0) {
+			oredCriteria.add(criteria);
+		}
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	protected Criteria createCriteriaInternal() {
+		Criteria criteria = new Criteria();
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public void clear() {
+		oredCriteria.clear();
+		orderByClause = null;
+		distinct = false;
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	protected abstract static class GeneratedCriteria {
+		protected List<Criterion> criteria;
+
+		protected GeneratedCriteria() {
+			super();
+			criteria = new ArrayList<Criterion>();
+		}
+
+		public boolean isValid() {
+			return criteria.size() > 0;
+		}
+
+		public List<Criterion> getAllCriteria() {
+			return criteria;
+		}
+
+		public List<Criterion> getCriteria() {
+			return criteria;
+		}
+
+		protected void addCriterion(String condition) {
+			if (condition == null) {
+				throw new RuntimeException("Value for condition cannot be null");
+			}
+			criteria.add(new Criterion(condition));
+		}
+
+		protected void addCriterion(String condition, Object value, String property) {
+			if (value == null) {
+				throw new RuntimeException("Value for " + property + " cannot be null");
+			}
+			criteria.add(new Criterion(condition, value));
+		}
+
+		protected void addCriterion(String condition, Object value1, Object value2, String property) {
+			if (value1 == null || value2 == null) {
+				throw new RuntimeException("Between values for " + property + " cannot be null");
+			}
+			criteria.add(new Criterion(condition, value1, value2));
+		}
+
+		public Criteria andIdIsNull() {
+			addCriterion("id is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIsNotNull() {
+			addCriterion("id is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdEqualTo(Integer value) {
+			addCriterion("id =", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotEqualTo(Integer value) {
+			addCriterion("id <>", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThan(Integer value) {
+			addCriterion("id >", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+			addCriterion("id >=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThan(Integer value) {
+			addCriterion("id <", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThanOrEqualTo(Integer value) {
+			addCriterion("id <=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIn(List<Integer> values) {
+			addCriterion("id in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotIn(List<Integer> values) {
+			addCriterion("id not in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdBetween(Integer value1, Integer value2) {
+			addCriterion("id between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotBetween(Integer value1, Integer value2) {
+			addCriterion("id not between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andNameIsNull() {
+			addCriterion("name is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andNameIsNotNull() {
+			addCriterion("name is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andNameEqualTo(String value) {
+			addCriterion("name =", value, "name");
+			return (Criteria) this;
+		}
+
+		public Criteria andNameNotEqualTo(String value) {
+			addCriterion("name <>", value, "name");
+			return (Criteria) this;
+		}
+
+		public Criteria andNameGreaterThan(String value) {
+			addCriterion("name >", value, "name");
+			return (Criteria) this;
+		}
+
+		public Criteria andNameGreaterThanOrEqualTo(String value) {
+			addCriterion("name >=", value, "name");
+			return (Criteria) this;
+		}
+
+		public Criteria andNameLessThan(String value) {
+			addCriterion("name <", value, "name");
+			return (Criteria) this;
+		}
+
+		public Criteria andNameLessThanOrEqualTo(String value) {
+			addCriterion("name <=", value, "name");
+			return (Criteria) this;
+		}
+
+		public Criteria andNameLike(String value) {
+			addCriterion("name like", value, "name");
+			return (Criteria) this;
+		}
+
+		public Criteria andNameNotLike(String value) {
+			addCriterion("name not like", value, "name");
+			return (Criteria) this;
+		}
+
+		public Criteria andNameIn(List<String> values) {
+			addCriterion("name in", values, "name");
+			return (Criteria) this;
+		}
+
+		public Criteria andNameNotIn(List<String> values) {
+			addCriterion("name not in", values, "name");
+			return (Criteria) this;
+		}
+
+		public Criteria andNameBetween(String value1, String value2) {
+			addCriterion("name between", value1, value2, "name");
+			return (Criteria) this;
+		}
+
+		public Criteria andNameNotBetween(String value1, String value2) {
+			addCriterion("name not between", value1, value2, "name");
+			return (Criteria) this;
+		}
+
+		public Criteria andWebsiteIsNull() {
+			addCriterion("website is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andWebsiteIsNotNull() {
+			addCriterion("website is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andWebsiteEqualTo(String value) {
+			addCriterion("website =", value, "website");
+			return (Criteria) this;
+		}
+
+		public Criteria andWebsiteNotEqualTo(String value) {
+			addCriterion("website <>", value, "website");
+			return (Criteria) this;
+		}
+
+		public Criteria andWebsiteGreaterThan(String value) {
+			addCriterion("website >", value, "website");
+			return (Criteria) this;
+		}
+
+		public Criteria andWebsiteGreaterThanOrEqualTo(String value) {
+			addCriterion("website >=", value, "website");
+			return (Criteria) this;
+		}
+
+		public Criteria andWebsiteLessThan(String value) {
+			addCriterion("website <", value, "website");
+			return (Criteria) this;
+		}
+
+		public Criteria andWebsiteLessThanOrEqualTo(String value) {
+			addCriterion("website <=", value, "website");
+			return (Criteria) this;
+		}
+
+		public Criteria andWebsiteLike(String value) {
+			addCriterion("website like", value, "website");
+			return (Criteria) this;
+		}
+
+		public Criteria andWebsiteNotLike(String value) {
+			addCriterion("website not like", value, "website");
+			return (Criteria) this;
+		}
+
+		public Criteria andWebsiteIn(List<String> values) {
+			addCriterion("website in", values, "website");
+			return (Criteria) this;
+		}
+
+		public Criteria andWebsiteNotIn(List<String> values) {
+			addCriterion("website not in", values, "website");
+			return (Criteria) this;
+		}
+
+		public Criteria andWebsiteBetween(String value1, String value2) {
+			addCriterion("website between", value1, value2, "website");
+			return (Criteria) this;
+		}
+
+		public Criteria andWebsiteNotBetween(String value1, String value2) {
+			addCriterion("website not between", value1, value2, "website");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactNumberIsNull() {
+			addCriterion("contact_number is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactNumberIsNotNull() {
+			addCriterion("contact_number is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactNumberEqualTo(String value) {
+			addCriterion("contact_number =", value, "contactNumber");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactNumberNotEqualTo(String value) {
+			addCriterion("contact_number <>", value, "contactNumber");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactNumberGreaterThan(String value) {
+			addCriterion("contact_number >", value, "contactNumber");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactNumberGreaterThanOrEqualTo(String value) {
+			addCriterion("contact_number >=", value, "contactNumber");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactNumberLessThan(String value) {
+			addCriterion("contact_number <", value, "contactNumber");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactNumberLessThanOrEqualTo(String value) {
+			addCriterion("contact_number <=", value, "contactNumber");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactNumberLike(String value) {
+			addCriterion("contact_number like", value, "contactNumber");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactNumberNotLike(String value) {
+			addCriterion("contact_number not like", value, "contactNumber");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactNumberIn(List<String> values) {
+			addCriterion("contact_number in", values, "contactNumber");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactNumberNotIn(List<String> values) {
+			addCriterion("contact_number not in", values, "contactNumber");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactNumberBetween(String value1, String value2) {
+			addCriterion("contact_number between", value1, value2, "contactNumber");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactNumberNotBetween(String value1, String value2) {
+			addCriterion("contact_number not between", value1, value2, "contactNumber");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactAddressIsNull() {
+			addCriterion("contact_address is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactAddressIsNotNull() {
+			addCriterion("contact_address is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactAddressEqualTo(String value) {
+			addCriterion("contact_address =", value, "contactAddress");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactAddressNotEqualTo(String value) {
+			addCriterion("contact_address <>", value, "contactAddress");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactAddressGreaterThan(String value) {
+			addCriterion("contact_address >", value, "contactAddress");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactAddressGreaterThanOrEqualTo(String value) {
+			addCriterion("contact_address >=", value, "contactAddress");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactAddressLessThan(String value) {
+			addCriterion("contact_address <", value, "contactAddress");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactAddressLessThanOrEqualTo(String value) {
+			addCriterion("contact_address <=", value, "contactAddress");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactAddressLike(String value) {
+			addCriterion("contact_address like", value, "contactAddress");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactAddressNotLike(String value) {
+			addCriterion("contact_address not like", value, "contactAddress");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactAddressIn(List<String> values) {
+			addCriterion("contact_address in", values, "contactAddress");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactAddressNotIn(List<String> values) {
+			addCriterion("contact_address not in", values, "contactAddress");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactAddressBetween(String value1, String value2) {
+			addCriterion("contact_address between", value1, value2, "contactAddress");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactAddressNotBetween(String value1, String value2) {
+			addCriterion("contact_address not between", value1, value2, "contactAddress");
+			return (Criteria) this;
+		}
+
+		public Criteria andLogoImgIsNull() {
+			addCriterion("logo_img is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andLogoImgIsNotNull() {
+			addCriterion("logo_img is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andLogoImgEqualTo(String value) {
+			addCriterion("logo_img =", value, "logoImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andLogoImgNotEqualTo(String value) {
+			addCriterion("logo_img <>", value, "logoImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andLogoImgGreaterThan(String value) {
+			addCriterion("logo_img >", value, "logoImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andLogoImgGreaterThanOrEqualTo(String value) {
+			addCriterion("logo_img >=", value, "logoImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andLogoImgLessThan(String value) {
+			addCriterion("logo_img <", value, "logoImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andLogoImgLessThanOrEqualTo(String value) {
+			addCriterion("logo_img <=", value, "logoImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andLogoImgLike(String value) {
+			addCriterion("logo_img like", value, "logoImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andLogoImgNotLike(String value) {
+			addCriterion("logo_img not like", value, "logoImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andLogoImgIn(List<String> values) {
+			addCriterion("logo_img in", values, "logoImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andLogoImgNotIn(List<String> values) {
+			addCriterion("logo_img not in", values, "logoImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andLogoImgBetween(String value1, String value2) {
+			addCriterion("logo_img between", value1, value2, "logoImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andLogoImgNotBetween(String value1, String value2) {
+			addCriterion("logo_img not between", value1, value2, "logoImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andQrImgIsNull() {
+			addCriterion("qr_img is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andQrImgIsNotNull() {
+			addCriterion("qr_img is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andQrImgEqualTo(String value) {
+			addCriterion("qr_img =", value, "qrImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andQrImgNotEqualTo(String value) {
+			addCriterion("qr_img <>", value, "qrImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andQrImgGreaterThan(String value) {
+			addCriterion("qr_img >", value, "qrImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andQrImgGreaterThanOrEqualTo(String value) {
+			addCriterion("qr_img >=", value, "qrImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andQrImgLessThan(String value) {
+			addCriterion("qr_img <", value, "qrImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andQrImgLessThanOrEqualTo(String value) {
+			addCriterion("qr_img <=", value, "qrImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andQrImgLike(String value) {
+			addCriterion("qr_img like", value, "qrImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andQrImgNotLike(String value) {
+			addCriterion("qr_img not like", value, "qrImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andQrImgIn(List<String> values) {
+			addCriterion("qr_img in", values, "qrImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andQrImgNotIn(List<String> values) {
+			addCriterion("qr_img not in", values, "qrImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andQrImgBetween(String value1, String value2) {
+			addCriterion("qr_img between", value1, value2, "qrImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andQrImgNotBetween(String value1, String value2) {
+			addCriterion("qr_img not between", value1, value2, "qrImg");
+			return (Criteria) this;
+		}
+
+		public Criteria andProvinceIdIsNull() {
+			addCriterion("province_id is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andProvinceIdIsNotNull() {
+			addCriterion("province_id is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andProvinceIdEqualTo(Integer value) {
+			addCriterion("province_id =", value, "provinceId");
+			return (Criteria) this;
+		}
+
+		public Criteria andProvinceIdNotEqualTo(Integer value) {
+			addCriterion("province_id <>", value, "provinceId");
+			return (Criteria) this;
+		}
+
+		public Criteria andProvinceIdGreaterThan(Integer value) {
+			addCriterion("province_id >", value, "provinceId");
+			return (Criteria) this;
+		}
+
+		public Criteria andProvinceIdGreaterThanOrEqualTo(Integer value) {
+			addCriterion("province_id >=", value, "provinceId");
+			return (Criteria) this;
+		}
+
+		public Criteria andProvinceIdLessThan(Integer value) {
+			addCriterion("province_id <", value, "provinceId");
+			return (Criteria) this;
+		}
+
+		public Criteria andProvinceIdLessThanOrEqualTo(Integer value) {
+			addCriterion("province_id <=", value, "provinceId");
+			return (Criteria) this;
+		}
+
+		public Criteria andProvinceIdIn(List<Integer> values) {
+			addCriterion("province_id in", values, "provinceId");
+			return (Criteria) this;
+		}
+
+		public Criteria andProvinceIdNotIn(List<Integer> values) {
+			addCriterion("province_id not in", values, "provinceId");
+			return (Criteria) this;
+		}
+
+		public Criteria andProvinceIdBetween(Integer value1, Integer value2) {
+			addCriterion("province_id between", value1, value2, "provinceId");
+			return (Criteria) this;
+		}
+
+		public Criteria andProvinceIdNotBetween(Integer value1, Integer value2) {
+			addCriterion("province_id not between", value1, value2, "provinceId");
+			return (Criteria) this;
+		}
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table branch_office_info
+	 * @mbg.generated  Tue Aug 22 09:20:20 CST 2017
+	 */
+	public static class Criterion {
+		private String condition;
+		private Object value;
+		private Object secondValue;
+		private boolean noValue;
+		private boolean singleValue;
+		private boolean betweenValue;
+		private boolean listValue;
+		private String typeHandler;
+
+		public String getCondition() {
+			return condition;
+		}
+
+		public Object getValue() {
+			return value;
+		}
+
+		public Object getSecondValue() {
+			return secondValue;
+		}
+
+		public boolean isNoValue() {
+			return noValue;
+		}
+
+		public boolean isSingleValue() {
+			return singleValue;
+		}
+
+		public boolean isBetweenValue() {
+			return betweenValue;
+		}
+
+		public boolean isListValue() {
+			return listValue;
+		}
+
+		public String getTypeHandler() {
+			return typeHandler;
+		}
+
+		protected Criterion(String condition) {
+			super();
+			this.condition = condition;
+			this.typeHandler = null;
+			this.noValue = true;
+		}
+
+		protected Criterion(String condition, Object value, String typeHandler) {
+			super();
+			this.condition = condition;
+			this.value = value;
+			this.typeHandler = typeHandler;
+			if (value instanceof List<?>) {
+				this.listValue = true;
+			} else {
+				this.singleValue = true;
+			}
+		}
+
+		protected Criterion(String condition, Object value) {
+			this(condition, value, null);
+		}
+
+		protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+			super();
+			this.condition = condition;
+			this.value = value;
+			this.secondValue = secondValue;
+			this.typeHandler = typeHandler;
+			this.betweenValue = true;
+		}
+
+		protected Criterion(String condition, Object value, Object secondValue) {
+			this(condition, value, secondValue, null);
+		}
+	}
+
+	/**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table branch_office_info
+     *
+     * @mbg.generated do_not_delete_during_merge Tue Aug 22 09:15:13 CST 2017
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+}

+ 13 - 0
src/main/java/com/goafanti/common/model/News.java

@@ -74,6 +74,11 @@ public class News {
 	 */
 	private Integer jmrhFlag;
 	
+	/**
+	 *  新闻发布省份
+	 */
+	private Integer provinceId;
+	
 	@JsonFormat(shape = Shape.STRING)
 	public Long getId() {
 		return id;
@@ -179,6 +184,14 @@ public class News {
 		this.jmrhFlag = jmrhFlag;
 	}
 
+	public Integer getProvinceId() {
+		return provinceId;
+	}
+
+	public void setProvinceId(Integer provinceId) {
+		this.provinceId = provinceId;
+	}
+
 	public String getCreateTimeFormattedDate() {
 		if (this.createTime == null) {
 			return null;

+ 14 - 1
src/main/java/com/goafanti/news/bo/InputNews.java

@@ -39,7 +39,11 @@ public class InputNews {
 	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
     private Integer jmrhFlag;
-    
+	
+	@Max(value = 34, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Integer provinceId;
+	
 	private String	content;
 
 	public Long getId() {
@@ -129,4 +133,13 @@ public class InputNews {
 	public void setJmrhFlag(Integer jmrhFlag) {
 		this.jmrhFlag = jmrhFlag;
 	}
+
+	public Integer getProvinceId() {
+		return provinceId;
+	}
+
+	public void setProvinceId(Integer provinceId) {
+		this.provinceId = provinceId;
+	}
+
 }

+ 3 - 2
src/main/java/com/goafanti/news/controller/NewsController.java

@@ -73,14 +73,15 @@ public class NewsController extends BaseController {
 	 */
 	@RequestMapping(value = "/portal/news/list", method = RequestMethod.GET)
 	@ResponseBody
-	public Result portalNewsList(Integer type, String pageSize, String pageNo, String noCache) {
+	public Result portalNewsList(Integer type, String pageSize, String pageNo, String noCache,HttpServletRequest request) {
 		Result res = new Result();
 		if (StringUtils.equals(noCache, "clear")) {
 			newsService.cleanPortalList();
 		}
+		String domainName = request.getServerName();
 		Integer pN = getPageNo(pageNo);
 		Integer pS = getPageSize(pageSize);
-		res.setData(newsService.findPortalList(pS, (pN - 1) * pS, type));
+		res.setData(newsService.findPortalList(pS, (pN - 1) * pS, type,domainName));
 		return res;
 	}
 

+ 3 - 3
src/main/java/com/goafanti/news/service/NewsService.java

@@ -140,13 +140,13 @@ public class NewsService extends BaseMybatisDao<NewsMapper> {
 		return newsMapper.batchDeleteByPrimaryKey(id);
 	}
 	
-	@Cacheable(value = "NewsPortalListCache", key = "'NewsPortalList:Page:'+#pageNo+'Type:'+#type+'Size:'+#pageSize")
-	public List<NewsPortalList> findPortalList(Integer pSize, Integer pNo, Integer type) {
+	@Cacheable(value = "NewsPortalListCache", key = "'NewsPortalList:Page:'+#pageNo+'Type:'+#type+'Size:'+#pageSize+'domainName:'+#domainName")
+	public List<NewsPortalList> findPortalList(Integer pSize, Integer pNo, Integer type,String domainName) {
 		Map<String, Object> params = new HashMap<String, Object>();
 		params.put("type", type);
-		
 		params.put("pageSize", pSize);
 		params.put("pageNo", pNo);
+		params.put("website", domainName);
 		return newsMapper.findPortalList(params);
 	}
 	

+ 1 - 1
src/main/resources/props/config_local.properties

@@ -53,7 +53,7 @@ session.validate.timespan=18000000
 
 app.name=AFT
 
-static.host=//sb.jishutao.com/1.0.40
+static.host=//sb.jishutao.com/1.0.41
 
 upload.path=/Users/xiaolong/Sites/upload
 upload.private.path=/Users/xiaolong/Sites/doc