Browse Source

新订单退款修改

anderx 6 years ago
parent
commit
9b3ba7dee3

+ 35 - 13
GeneratorConfig.xml

@@ -1,14 +1,36 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
-<generatorConfiguration>
-  <classPathEntry location="C:/Users/Administrator/.dbeaver-drivers/maven/maven-central/mysql/mysql-connector-java-5.1.39.jar" />
-   <!-- <classPathEntry location="E:/mysql-connector-java-5.1.40.jar" /> -->
-  <context id="context1">	
-    <jdbcConnection connectionURL="jdbc:mysql://localhost:3306/aft" 
-    	driverClass="com.mysql.jdbc.Driver" password="123456" userId="dev" />
-    <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="kede-server" />
-    <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="kede-server" />
-    <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="kede-server" type="XMLMAPPER" />
-    <table schema="aft" tableName="new_order_change"/>
-  </context>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
+<generatorConfiguration>
+  <!-- <classPathEntry location="C:/Users/Administrator/.dbeaver-drivers/maven/maven-central/mysql/mysql-connector-java-5.1.39.jar" /> -->
+   <classPathEntry location="C:\Users\Administrator\.dbeaver-drivers\maven\maven-central\mysql\mysql-connector-java-5.1.44.jar" />
+  <context id="context1">	
+    <jdbcConnection connectionURL="jdbc:mysql://101.37.32.31:3306/aft" 
+    	driverClass="com.mysql.jdbc.Driver" password="dev123456" userId="dev" />
+    <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="kede-server" />
+    <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="kede-server" />
+    <javaClientGenerator  targetPackage="com.goafanti.common.dao"  type="XMLMAPPER" targetProject="kede-server"  />
+    <table schema="aft" tableName="new_order_refund"/>
+  </context>
+
+    
+   <!--  <context id="mysql">
+            <commentGenerator>
+                <property name="suppressDate" value="true" />
+                <property name="suppressAllComments" value="true" />
+            </commentGenerator>
+            <jdbcConnection
+                    connectionURL="jdbc:mysql://101.37.32.31:3306/aft?serverTimezone=GMT%2B8"
+                    driverClass="com.mysql.cj.jdbc.Driver" password="dev123456" userId="dev" />
+            <javaTypeResolver>
+                <property name="forceBigDecimals" value="false" />
+            </javaTypeResolver>
+            <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="kede-server" >
+                <property name="constructorBased" value="false"/>
+            </javaModelGenerator>
+            <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="kede-server"/>
+            <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="kede-server" type="SPRING" >
+            </javaClientGenerator>
+            <table  tableName="new_order_refund"  enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"     enableSelectByExample="false"> </table>         	   
+</context> -->
+  
 </generatorConfiguration>

+ 0 - 1
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -40,7 +40,6 @@
     <result column="audit_status" property="auditStatus" jdbcType="INTEGER" />
     <result column="tech_broker_id" property="techBrokerId" jdbcType="VARCHAR" />
     <result column="boutique" property="boutique" jdbcType="INTEGER" />
-    <result column="uid" property="uid" jdbcType="VARCHAR" />
     <result column="urgent_days" property="urgentDays" jdbcType="INTEGER" />
     <result column="urgent_money" property="urgentMoney" jdbcType="DECIMAL" />
   </resultMap>

+ 336 - 381
src/main/java/com/goafanti/common/mapper/NewsMapper.xml

@@ -1,382 +1,337 @@
-<?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.NewsMapper">
-  <resultMap id="BaseResultMap" type="com.goafanti.common.model.News">
-    <id column="id" jdbcType="BIGINT" property="id" />
-    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
-    <result column="edit_time" jdbcType="TIMESTAMP" property="editTime" />
-    <result column="title" jdbcType="VARCHAR" property="title" />
-    <result column="title_img" jdbcType="VARCHAR" property="titleImg" />
-    <result column="author" jdbcType="VARCHAR" property="author" />
-    <result column="type" jdbcType="INTEGER" property="type" />
-    <result column="hot" jdbcType="INTEGER" property="hot" />
-    <result column="source" jdbcType="VARCHAR" property="source" />
-    <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,province_id
-  </sql>
-  <sql id="Blob_Column_List">
-    content
-  </sql>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
-    select 
-    id,
-    content,
-    create_time as createTime, 
-    edit_time as editTime, 
-    title, 
-    title_img as titleImg, 
-    author, 
-    type, 
-    hot,
-    source, 
-    source_url as sourceUrl, 
-    summary,
-    jmrh_flag as jmrhFlag,
-    province_id as provinceId,
-    audit_status as auditStatus,
-    release_status as releaseStatus,
-    top_number as topNumber,
-    hotspot
-    from news
-    where id = #{id,jdbcType=BIGINT}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
-    delete from news
-    where id = #{id,jdbcType=BIGINT}
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.News">
-    insert into news (id, create_time, edit_time, 
-      title, title_img, author, 
-      type, hot, source, 
-      source_url, summary, content,jmrh_flag,province_id,top_number,hotspot
-      )
-    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}, #{provinceId,jdbcType=INTEGER}, #{topNumber,jdbcType=INTEGER}, #{hotspot,jdbcType=INTEGER}
-      )
-  </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.News">
-    insert into news
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
-      <if test="createTime != null">
-        create_time,
-      </if>
-      <if test="editTime != null">
-        edit_time,
-      </if>
-      <if test="title != null">
-        title,
-      </if>
-      <if test="titleImg != null">
-        title_img,
-      </if>
-      <if test="author != null">
-        author,
-      </if>
-      <if test="type != null">
-        type,
-      </if>
-      <if test="hot != null">
-        hot,
-      </if>
-      <if test="source != null">
-        source,
-      </if>
-      <if test="sourceUrl != null">
-        source_url,
-      </if>
-      <if test="summary != null">
-        summary,
-      </if>
-      <if test="content != null">
-        content,
-      </if>
-      <if test="jmrhFlag != null">
-      	jmrh_flag,
-      </if>
-      <if test="provinceId != null">
-      	province_id,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=BIGINT},
-      </if>
-      <if test="createTime != null">
-        #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="editTime != null">
-        #{editTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="title != null">
-        #{title,jdbcType=VARCHAR},
-      </if>
-      <if test="titleImg != null">
-        #{titleImg,jdbcType=VARCHAR},
-      </if>
-      <if test="author != null">
-        #{author,jdbcType=VARCHAR},
-      </if>
-      <if test="type != null">
-        #{type,jdbcType=INTEGER},
-      </if>
-      <if test="hot != null">
-        #{hot,jdbcType=INTEGER},
-      </if>
-      <if test="source != null">
-        #{source,jdbcType=VARCHAR},
-      </if>
-      <if test="sourceUrl != null">
-        #{sourceUrl,jdbcType=VARCHAR},
-      </if>
-      <if test="summary != null">
-        #{summary,jdbcType=VARCHAR},
-      </if>
-      <if test="content != null">
-        #{content,jdbcType=LONGVARCHAR},
-      </if>
-       <if test="jmrhFlag != null">
-        #{jmrhFlag,jdbcType=INTEGER},
-      </if>
-      <if test="provinceId != null">
-        #{provinceId,jdbcType=INTEGER},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.News">
-    update news
-    <set>
-      <if test="createTime != null">
-        create_time = #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="editTime != null">
-        edit_time = #{editTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="title != null">
-        title = #{title,jdbcType=VARCHAR},
-      </if>
-      <if test="titleImg != null">
-        title_img = #{titleImg,jdbcType=VARCHAR},
-      </if>
-      <if test="author != null">
-        author = #{author,jdbcType=VARCHAR},
-      </if>
-      <if test="type != null">
-        type = #{type,jdbcType=INTEGER},
-      </if>
-      <if test="hot != null">
-        hot = #{hot,jdbcType=INTEGER},
-      </if>
-      <if test="source != null">
-        source = #{source,jdbcType=VARCHAR},
-      </if>
-      <if test="sourceUrl != null">
-        source_url = #{sourceUrl,jdbcType=VARCHAR},
-      </if>
-      <if test="summary != null">
-        summary = #{summary,jdbcType=VARCHAR},
-      </if>
-      <if test="content != null">
-        content = #{content,jdbcType=LONGVARCHAR},
-      </if>
-      <if test="jmrhFlag != null">
-        content = #{jmrhFlag,jdbcType=INTEGER},
-      </if>
-    </set>
-    where id = #{id,jdbcType=BIGINT}
-  </update>
-  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.News">
-    update news
-    set create_time = #{createTime,jdbcType=TIMESTAMP},
-      edit_time = #{editTime,jdbcType=TIMESTAMP},
-      title = #{title,jdbcType=VARCHAR},
-      title_img = #{titleImg,jdbcType=VARCHAR},
-      author = #{author,jdbcType=VARCHAR},
-      type = #{type,jdbcType=INTEGER},
-      hot = #{hot,jdbcType=INTEGER},
-      source = #{source,jdbcType=VARCHAR},
-      source_url = #{sourceUrl,jdbcType=VARCHAR},
-      summary = #{summary,jdbcType=VARCHAR},
-      content = #{content,jdbcType=LONGVARCHAR},
-      jmrh_flag = #{jmrhFlag,jdbcType=INTEGER},
-      province_id = #{provinceId,jdbcType=INTEGER},
-      audit_status = #{auditStatus,jdbcType=INTEGER},
-      release_status = #{releaseStatus,jdbcType=INTEGER},
-      top_number = #{topNumber,jdbcType=INTEGER},
-      hotspot = #{hotspot,jdbcType=INTEGER}
-    where id = #{id,jdbcType=BIGINT}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.News">
-    update news
-    set create_time = #{createTime,jdbcType=TIMESTAMP},
-      edit_time = #{editTime,jdbcType=TIMESTAMP},
-      title = #{title,jdbcType=VARCHAR},
-      title_img = #{titleImg,jdbcType=VARCHAR},
-      author = #{author,jdbcType=VARCHAR},
-      type = #{type,jdbcType=INTEGER},
-      hot = #{hot,jdbcType=INTEGER},
-      source = #{source,jdbcType=VARCHAR},
-      source_url = #{sourceUrl,jdbcType=VARCHAR},
-      summary = #{summary,jdbcType=VARCHAR},
-      jmrh_flag = #{jmrhFlag,jdbcType=INTEGER},
-      province_id = #{provinceId,jdbcType=INTEGER}
-    where id = #{id,jdbcType=BIGINT}
-  </update>
-  <select id="portalNewsList" resultType="com.goafanti.news.bo.NewsPortalList">
-		select
-			a.id,
-			DATE_FORMAT(a.create_time,'%Y-%m-%d') as createTime,
-			a.title,
-			a.title_img as titleImg,
-			a.type,
-			a.hot,
-			a.summary,
-			a.source,
-			a.content
-		from news a
-		where
-		a.type != 1 and a.type != 2
-		<if test="provinceId != null">
-			and a.province_id = #{provinceId,jdbcType=INTEGER}
-		</if>
-
-		<if test="type != null and type != 0 " >
-			and a.type = #{type,jdbcType=INTEGER}
-		</if>
-		<!-- 
-		<if test="hot != null">
-			and a.hot = #{hot,jdbcType=INTEGER}
-		</if> 
-		-->
-		<if test="keyword != null">
-			and a.title like concat('%',#{keyword},'%')
-		</if>	
-		order by create_time desc
-		<if test="page_sql != null">
-			${page_sql}
-		</if>
-	</select>
-	
-	<select id="portalNewsCount" resultType="java.lang.Integer">
-		select 
-			count(0)
-		from news a
-		where 
-		a.type != 1 and a.type != 2
-		<if test="provinceId != null">
-			and a.province_id = #{provinceId,jdbcType=INTEGER}
-		</if>
-		<if test="type != null and type != 0 and type != 1 and type != 2" >
-			and a.type = #{type,jdbcType=INTEGER}
-		</if>
-		<!-- 	
-		<if test="hot != null">
-			and a.hot = #{hot,jdbcType=INTEGER}
-		</if>
-		-->
-		<if test="keyword != null">
-			and a.title like concat('%',#{keyword},'%')
-		</if>
-	</select>
-	<select id="portalNewsPolicy" resultType="com.goafanti.news.bo.NewsPortalList">
-		select
-			a.id,
-			DATE_FORMAT(a.create_time,'%Y-%d-%m') as createTime,
-			a.title,
-			a.title_img as titleImg,
-			a.type,
-			a.hot,
-			a.summary,
-			a.source,
-			a.content
-		from news a
-		where
-		a.type =5 or a.type =4
-		order by create_time desc
-	</select>
-	<select id="portalNewsQuestion" resultType="com.goafanti.news.bo.NewsPortalList">
-		select
-			a.id,
-			DATE_FORMAT(a.create_time,'%Y-%d-%m') as createTime,
-			a.title,
-			a.title_img as titleImg,
-			a.type,
-			a.hot,
-			a.summary,
-			a.source,
-			a.content
-		from news a
-		where
-		a.type =2
-		order by create_time desc
-	</select>
-	<select id="newsInterest" resultType="com.goafanti.news.bo.newsInterestBo">
-		select
-		n.id,n.title ,n.create_time as createTime
-	from news_interest ni
-	LEFT  join news n on ni.new_id=n.id
-	where uid=#{uid,jdbcType=VARCHAR}
-	</select>
-	
-	
-	<select id="appNewsList" resultType="com.goafanti.news.bo.NewsPortalList">
-		select
-			a.id,
-			DATE_FORMAT(a.create_time,'%Y-%m-%d') as createTime,
-			a.title,
-			a.title_img as titleImg,
-			a.type,
-			a.hot,
-			a.summary,
-			a.source,
-			a.content,
-			top_number as topNumber,
-    		hotspot
-		from news a
-		left join district_glossory d on a.province_id=d.id
-		where
-		a.type != 1 and a.type != 2
-		<if test="param != null">
-			and a.title like concat('%',#{param},'%')
-			or a.source like concat('%',#{param},'%')
-			or d.name like concat('%',#{param},'%')
-		</if>	
-		order by  IF(ISNULL(top_number),1,0) ,top_number asc,
-				 IF(ISNULL(hotspot),1,0),hotspot  asc,
-				create_time desc
-		<if test="page_sql != null">
-			${page_sql}
-		</if>
-	</select>
-	
-	<select id="appNewsCount" resultType="java.lang.Integer">
-		select 
-			count(0)
-		from news a
-		left join district_glossory d on a.province_id=d.id
-		where 
-		a.type != 1 and a.type != 2
-		<if test="param != null">
-			and a.title like concat('%',#{param},'%')
-			or a.source like concat('%',#{param},'%')
-			or d.name like concat('%',#{param},'%')
-		</if>	
-	</select>
-	
-	
-	
+<?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.NewsMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.News">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="edit_time" jdbcType="TIMESTAMP" property="editTime" />
+    <result column="title" jdbcType="VARCHAR" property="title" />
+    <result column="title_img" jdbcType="VARCHAR" property="titleImg" />
+    <result column="author" jdbcType="VARCHAR" property="author" />
+    <result column="type" jdbcType="INTEGER" property="type" />
+    <result column="hot" jdbcType="INTEGER" property="hot" />
+    <result column="source" jdbcType="VARCHAR" property="source" />
+    <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,province_id
+  </sql>
+  <sql id="Blob_Column_List">
+    content
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
+    select 
+    id,
+    content,
+    create_time as createTime, 
+    edit_time as editTime, 
+    title, 
+    title_img as titleImg, 
+    author, 
+    type, 
+    hot,
+    source, 
+    source_url as sourceUrl, 
+    summary,
+    jmrh_flag as jmrhFlag,
+    province_id as provinceId,
+    audit_status as auditStatus,
+    release_status as releaseStatus,
+    top_number as topNumber,
+    hotspot
+    from news
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from news
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.News">
+    insert into news (id, create_time, edit_time, 
+      title, title_img, author, 
+      type, hot, source, 
+      source_url, summary, content,jmrh_flag,province_id,top_number,hotspot
+      )
+    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}, #{provinceId,jdbcType=INTEGER}, #{topNumber,jdbcType=INTEGER}, #{hotspot,jdbcType=INTEGER}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.News">
+    insert into news
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="editTime != null">
+        edit_time,
+      </if>
+      <if test="title != null">
+        title,
+      </if>
+      <if test="titleImg != null">
+        title_img,
+      </if>
+      <if test="author != null">
+        author,
+      </if>
+      <if test="type != null">
+        type,
+      </if>
+      <if test="hot != null">
+        hot,
+      </if>
+      <if test="source != null">
+        source,
+      </if>
+      <if test="sourceUrl != null">
+        source_url,
+      </if>
+      <if test="summary != null">
+        summary,
+      </if>
+      <if test="content != null">
+        content,
+      </if>
+      <if test="jmrhFlag != null">
+      	jmrh_flag,
+      </if>
+      <if test="provinceId != null">
+      	province_id,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="editTime != null">
+        #{editTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="title != null">
+        #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="titleImg != null">
+        #{titleImg,jdbcType=VARCHAR},
+      </if>
+      <if test="author != null">
+        #{author,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="hot != null">
+        #{hot,jdbcType=INTEGER},
+      </if>
+      <if test="source != null">
+        #{source,jdbcType=VARCHAR},
+      </if>
+      <if test="sourceUrl != null">
+        #{sourceUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="summary != null">
+        #{summary,jdbcType=VARCHAR},
+      </if>
+      <if test="content != null">
+        #{content,jdbcType=LONGVARCHAR},
+      </if>
+       <if test="jmrhFlag != null">
+        #{jmrhFlag,jdbcType=INTEGER},
+      </if>
+      <if test="provinceId != null">
+        #{provinceId,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.News">
+    update news
+    <set>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="editTime != null">
+        edit_time = #{editTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="title != null">
+        title = #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="titleImg != null">
+        title_img = #{titleImg,jdbcType=VARCHAR},
+      </if>
+      <if test="author != null">
+        author = #{author,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        type = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="hot != null">
+        hot = #{hot,jdbcType=INTEGER},
+      </if>
+      <if test="source != null">
+        source = #{source,jdbcType=VARCHAR},
+      </if>
+      <if test="sourceUrl != null">
+        source_url = #{sourceUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="summary != null">
+        summary = #{summary,jdbcType=VARCHAR},
+      </if>
+      <if test="content != null">
+        content = #{content,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="jmrhFlag != null">
+        content = #{jmrhFlag,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.News">
+    update news
+    set create_time = #{createTime,jdbcType=TIMESTAMP},
+      edit_time = #{editTime,jdbcType=TIMESTAMP},
+      title = #{title,jdbcType=VARCHAR},
+      title_img = #{titleImg,jdbcType=VARCHAR},
+      author = #{author,jdbcType=VARCHAR},
+      type = #{type,jdbcType=INTEGER},
+      hot = #{hot,jdbcType=INTEGER},
+      source = #{source,jdbcType=VARCHAR},
+      source_url = #{sourceUrl,jdbcType=VARCHAR},
+      summary = #{summary,jdbcType=VARCHAR},
+      content = #{content,jdbcType=LONGVARCHAR},
+      jmrh_flag = #{jmrhFlag,jdbcType=INTEGER},
+      province_id = #{provinceId,jdbcType=INTEGER},
+      audit_status = #{auditStatus,jdbcType=INTEGER},
+      release_status = #{releaseStatus,jdbcType=INTEGER},
+      top_number = #{topNumber,jdbcType=INTEGER},
+      hotspot = #{hotspot,jdbcType=INTEGER}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.News">
+    update news
+    set create_time = #{createTime,jdbcType=TIMESTAMP},
+      edit_time = #{editTime,jdbcType=TIMESTAMP},
+      title = #{title,jdbcType=VARCHAR},
+      title_img = #{titleImg,jdbcType=VARCHAR},
+      author = #{author,jdbcType=VARCHAR},
+      type = #{type,jdbcType=INTEGER},
+      hot = #{hot,jdbcType=INTEGER},
+      source = #{source,jdbcType=VARCHAR},
+      source_url = #{sourceUrl,jdbcType=VARCHAR},
+      summary = #{summary,jdbcType=VARCHAR},
+      jmrh_flag = #{jmrhFlag,jdbcType=INTEGER},
+      province_id = #{provinceId,jdbcType=INTEGER}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <select id="portalNewsList" resultType="com.goafanti.news.bo.NewsPortalList">
+		select
+			a.id,
+			DATE_FORMAT(a.create_time,'%Y-%m-%d') as createTime,
+			a.title,
+			a.title_img as titleImg,
+			a.type,
+			a.hot,
+			a.summary,
+			a.source,
+			a.content
+		from news a
+		where
+		a.type != 1 and a.type != 2
+		<if test="provinceId != null">
+			and a.province_id = #{provinceId,jdbcType=INTEGER}
+		</if>
+
+		<if test="type != null and type != 0 " >
+			and a.type = #{type,jdbcType=INTEGER}
+		</if>
+		<!-- 
+		<if test="hot != null">
+			and a.hot = #{hot,jdbcType=INTEGER}
+		</if> 
+		-->
+		<if test="keyword != null">
+			and a.title like concat('%',#{keyword},'%')
+		</if>	
+		order by create_time desc
+		<if test="page_sql != null">
+			${page_sql}
+		</if>
+	</select>
+	
+	<select id="portalNewsCount" resultType="java.lang.Integer">
+		select 
+			count(0)
+		from news a
+		where 
+		a.type != 1 and a.type != 2
+		<if test="provinceId != null">
+			and a.province_id = #{provinceId,jdbcType=INTEGER}
+		</if>
+		<if test="type != null and type != 0 and type != 1 and type != 2" >
+			and a.type = #{type,jdbcType=INTEGER}
+		</if>
+		<!-- 	
+		<if test="hot != null">
+			and a.hot = #{hot,jdbcType=INTEGER}
+		</if>
+		-->
+		<if test="keyword != null">
+			and a.title like concat('%',#{keyword},'%')
+		</if>
+	</select>
+	<select id="portalNewsPolicy" resultType="com.goafanti.news.bo.NewsPortalList">
+		select
+			a.id,
+			DATE_FORMAT(a.create_time,'%Y-%d-%m') as createTime,
+			a.title,
+			a.title_img as titleImg,
+			a.type,
+			a.hot,
+			a.summary,
+			a.source,
+			a.content
+		from news a
+		where
+		a.type =5 or a.type =4
+		order by create_time desc
+	</select>
+	<select id="portalNewsQuestion" resultType="com.goafanti.news.bo.NewsPortalList">
+		select
+			a.id,
+			DATE_FORMAT(a.create_time,'%Y-%d-%m') as createTime,
+			a.title,
+			a.title_img as titleImg,
+			a.type,
+			a.hot,
+			a.summary,
+			a.source,
+			a.content
+		from news a
+		where
+		a.type =2
+		order by create_time desc
+	</select>
+	<select id="newsInterest" resultType="com.goafanti.news.bo.newsInterestBo">
+		select
+		n.id,n.title ,n.create_time as createTime
+	from news_interest ni
+	LEFT  join news n on ni.new_id=n.id
+	where uid=#{uid,jdbcType=VARCHAR}
+	</select>
+	
+	
+	
 </mapper>

+ 2 - 3
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -1266,8 +1266,9 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	</if>
   	<if test="specially == 3">
   	 and  a.order_status=2 and a.process_status != 99
+  	</if>
   	 <if test="approval ==0">
-  	and a.approval &gt; 0
+  	and a.approval = 0
   	</if>
   	<if test="approval ==1">
   	and a.approval = 1
@@ -1275,8 +1276,6 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	<if test="approval ==2">
   	and a.approval &gt; 1
   	</if> 
-  	</if>
-  	
   	<if test="specially == 4">
   	and e.main=1
   	and a.process_status in (4,5,6,99)

+ 0 - 1
src/main/java/com/goafanti/common/mapper/TechProjectMapper.xml

@@ -31,7 +31,6 @@
 		<result column="founder" property="founder" jdbcType="VARCHAR" />
 		<result column="contract_id" property="contractId" jdbcType="VARCHAR" />
 		<result column="principal" property="principal" jdbcType="VARCHAR" />
-		<result column="publish_status" property="publishStatus" jdbcType="INTEGER" />
 	</resultMap>
 	<sql id="Base_Column_List">
 		id, uid, serial_number, contacts, department, dispatch_info,

+ 19 - 0
src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java

@@ -26,6 +26,7 @@ import com.goafanti.common.bo.OrderExamineBo;
 import com.goafanti.common.dao.AdminMapper;
 import com.goafanti.common.dao.NewOrderChangeMapper;
 import com.goafanti.common.dao.NewOrderDunMapper;
+import com.goafanti.common.dao.NewOrderRefundMapper;
 import com.goafanti.common.dao.OrderChangeLogMapper;
 import com.goafanti.common.dao.OrderExamineMapper;
 import com.goafanti.common.dao.OrderRefundInvoiceMapper;
@@ -51,6 +52,7 @@ import com.goafanti.common.model.TOrderTask;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.NewOrderChange;
 import com.goafanti.common.model.NewOrderDun;
+import com.goafanti.common.model.NewOrderRefund;
 import com.goafanti.common.utils.ExportExcelUtil;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
@@ -99,6 +101,8 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 	@Autowired
 	private OrganizationManagementMapper	organizationManagementMapper;
 	@Autowired
+	private NewOrderRefundMapper	newOrderRefundMapper;
+	@Autowired
 	private OrderExamineMapper	orderExamineMapper;
 	@Autowired
 	private OrderService	orderService;
@@ -523,7 +527,10 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 	}
 	@Override
 	public int pushCompleteOrderChange(NewOrderChangeBo nb) {
+		//变更完成
 		changeAdopt(nb);
+		//新增退款金额
+		//addOrderRefund(nb);
 		TOrderNew o=pushChange(nb);
 		List<String> alist = new ArrayList<>();
 		alist.add(o.getSalesmanId());
@@ -531,6 +538,17 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 		orderNewService.pushGeneralSendNoticeAndEmail(alist,NoticeStatus.ORDER_CHANGE_END.getCode(), o.getOrderNo(), TokenManager.getAdminId(),0);
 		return 1;
 	}
+	/*private void addOrderRefund(NewOrderChangeBo nb) {
+		NewOrderRefund or=new NewOrderRefund();
+		or.setOrderNo(nb.getOrderNo());
+		or.setRefundAmount(nb.getChangeAmount());
+		or.setRefundStatus(1);//通过
+		or.setReason("变更退款,系统生成。");
+		newOrderRefundMapper.insert(or);
+		
+		
+	}*/
+
 	/**
 	 * 修改订单数据
 	 * @param nb
@@ -554,6 +572,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 		}else if (nob.getType()==OrderChangeType.ZS.getCode()) {
 			pushTaskAndDun(nob.getId(),nob.getOrderNo());
 		}
+		//
 		tOrderNewMapper.updateByPrimaryKeySelective(o);
 		return o; 
 	}

+ 1 - 2
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -499,8 +499,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		if (StringUtils.isNotBlank(depId)) params.put("depId", depId);
 		if (StringUtils.isNotBlank(contractNo)) params.put("contractNo", contractNo);
 		if (null!=liquidationStatus) params.put("liquidationStatus", liquidationStatus);
-		if (null==approval)params.put("approval", 0);
-		else 	params.put("approval", approval);
+		if (null !=approval)params.put("approval", approval);
 		if(null != amountStatus) params.put("amountStatus", amountStatus);
 		if (StringUtils.isNotBlank(orderNo)) params.put("orderNo", orderNo);
 		if (StringUtils.isNotBlank(starTime)) params.put("starTime", starTime);