Browse Source

订单功能修改

wanghui 8 years ago
parent
commit
039afe165f
25 changed files with 2270 additions and 841 deletions
  1. 2 1
      GeneratorConfig.xml
  2. 25 24
      src/main/java/com/goafanti/common/controller/WebpageController.java
  3. 6 0
      src/main/java/com/goafanti/common/dao/PermissionMapper.java
  4. 75 0
      src/main/java/com/goafanti/common/dao/TOrderDetailMapper.java
  5. 21 13
      src/main/java/com/goafanti/common/dao/TOrderMapper.java
  6. 43 3
      src/main/java/com/goafanti/common/mapper/PermissionMapper.xml
  7. 366 0
      src/main/java/com/goafanti/common/mapper/TOrderDetailMapper.xml
  8. 65 125
      src/main/java/com/goafanti/common/mapper/TOrderMapper.xml
  9. 9 0
      src/main/java/com/goafanti/common/model/Permission.java
  10. 82 197
      src/main/java/com/goafanti/common/model/TOrder.java
  11. 238 0
      src/main/java/com/goafanti/common/model/TOrderDetail.java
  12. 903 0
      src/main/java/com/goafanti/common/model/TOrderDetailExample.java
  13. 40 370
      src/main/java/com/goafanti/common/model/TOrderExample.java
  14. 12 50
      src/main/java/com/goafanti/order/bo/OrderDetailBo.java
  15. 76 0
      src/main/java/com/goafanti/order/bo/C2COrderDetailBo.java
  16. 68 0
      src/main/java/com/goafanti/order/bo/CommodityDetailBo.java
  17. 5 4
      src/main/java/com/goafanti/order/service/OrderService.java
  18. 91 51
      src/main/java/com/goafanti/order/service/impl/OrderServiceImpl.java
  19. 16 0
      src/main/java/com/goafanti/permission/bo/Menu.java
  20. 30 0
      src/main/java/com/goafanti/permission/bo/Navigation.java
  21. 25 0
      src/main/java/com/goafanti/permission/bo/SubMenu.java
  22. 32 0
      src/main/java/com/goafanti/permission/controller/NewPermissionApiController.java
  23. 5 0
      src/main/java/com/goafanti/permission/service/PermissionService.java
  24. 33 1
      src/main/java/com/goafanti/permission/service/impl/PermissionServiceImpl.java
  25. 2 2
      src/main/resources/shiro_base_auth.ini

+ 2 - 1
GeneratorConfig.xml

@@ -10,6 +10,7 @@
     <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="t_order"/>
+    <!-- <table schema="aft" tableName="t_order"/> -->
+    <table schema="aft" tableName="t_order_detail"/> 
   </context>
 </generatorConfiguration>

+ 25 - 24
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -62,30 +62,6 @@ public class WebpageController extends BaseController {
 	@Resource
 	private MarketingManagementService marketingManagementService; 
 
-	/**
-	 * 首页
-	 */
-	@RequestMapping(value = "/portal/index", method = RequestMethod.GET)
-	public ModelAndView portalIndex(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/index");
-		List<Banners> banners = bannersService.findPortalBanners(BannersType.SHOU_YE.getKey());
-		if (!banners.isEmpty()) {
-			modelview.addObject("banner", banners.get(0));
-		}
-		//modelview.addObject("zfwl", newsService.findIndexNewsList(0, NewsType.ZFWL.getCode(), 2));
-		modelview.addObject("jtdt", newsService.findIndexNewsList(0, NewsType.JTDT.getCode(), 4));
-		List<MarketingManagementBo> achievementList = marketingManagementService.selectMarketList(
-				MarketingPage.mainAchievement.getPageUrl(), MarketingPage.mainAchievement.getBoothType());
-		List<MarketingManagementBo> demandList = marketingManagementService.selectMarketList(
-				MarketingPage.mainDemand.getPageUrl(), MarketingPage.mainDemand.getBoothType());
-		List<MarketingManagementBo> speciaList = marketingManagementService.selectMarketList(
-				MarketingPage.specialist.getPageUrl(), MarketingPage.specialist.getBoothType());
-		modelview.addObject("achievementList", achievementList);
-		modelview.addObject("demandList", demandList);
-		modelview.addObject("speciaList", speciaList);
-		return modelview;
-	}
-
 	@RequestMapping(value = "/user/account/index", method = RequestMethod.GET)
 	public ModelAndView index(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/user/account/index");
@@ -321,6 +297,31 @@ public class WebpageController extends BaseController {
 		return modelview;
 	}
 	
+
+	/**
+	 * 首页
+	 */
+	@RequestMapping(value = "/portal/index", method = RequestMethod.GET)
+	public ModelAndView portalIndex(HttpServletRequest request, ModelAndView modelview) {
+		modelview.setViewName("/portal/index");
+		List<Banners> banners = bannersService.findPortalBanners(BannersType.SHOU_YE.getKey());
+		if (!banners.isEmpty()) {
+			modelview.addObject("banner", banners.get(0));
+		}
+		//modelview.addObject("zfwl", newsService.findIndexNewsList(0, NewsType.ZFWL.getCode(), 2));
+		modelview.addObject("jtdt", newsService.findIndexNewsList(0, NewsType.JTDT.getCode(), 4));
+		List<MarketingManagementBo> achievementList = marketingManagementService.selectMarketList(
+				MarketingPage.mainAchievement.getPageUrl(), MarketingPage.mainAchievement.getBoothType());
+		List<MarketingManagementBo> demandList = marketingManagementService.selectMarketList(
+				MarketingPage.mainDemand.getPageUrl(), MarketingPage.mainDemand.getBoothType());
+		List<MarketingManagementBo> speciaList = marketingManagementService.selectMarketList(
+				MarketingPage.specialist.getPageUrl(), MarketingPage.specialist.getBoothType());
+		modelview.addObject("achievementList", achievementList);
+		modelview.addObject("demandList", demandList);
+		modelview.addObject("speciaList", speciaList);
+		return modelview;
+	}
+
 	@RequestMapping(value = "/portal/technologyTrading/achievement", method = RequestMethod.GET)
 	public ModelAndView portalSearchAchievement(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/technologyTrading/achievement");

+ 6 - 0
src/main/java/com/goafanti/common/dao/PermissionMapper.java

@@ -4,7 +4,9 @@ import java.util.List;
 import java.util.Set;
 
 import com.goafanti.common.model.Permission;
+import com.goafanti.permission.bo.Navigation;
 import com.goafanti.permission.bo.PermissionBo;
+import com.goafanti.permission.bo.SubMenu;
 
 public interface PermissionMapper {
     int deleteByPrimaryKey(String id);
@@ -64,4 +66,8 @@ public interface PermissionMapper {
 	String selectIdByName(String name);
 	
 	int selectCountByid(String id);
+	
+	List<Navigation> selectNavList(String aid);
+
+	List<SubMenu> selectMenuList(String superId);
 }

+ 75 - 0
src/main/java/com/goafanti/common/dao/TOrderDetailMapper.java

@@ -0,0 +1,75 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.TOrderDetail;
+import com.goafanti.common.model.TOrderDetailExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface TOrderDetailMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	long countByExample(TOrderDetailExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	int deleteByExample(TOrderDetailExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	int deleteByPrimaryKey(String id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	int insert(TOrderDetail record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	int insertSelective(TOrderDetail record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	List<TOrderDetail> selectByExample(TOrderDetailExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	TOrderDetail selectByPrimaryKey(String id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	int updateByExampleSelective(@Param("record") TOrderDetail record, @Param("example") TOrderDetailExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	int updateByExample(@Param("record") TOrderDetail record, @Param("example") TOrderDetailExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	int updateByPrimaryKeySelective(TOrderDetail record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	int updateByPrimaryKey(TOrderDetail record);
+}

+ 21 - 13
src/main/java/com/goafanti/common/dao/TOrderMapper.java

@@ -1,8 +1,9 @@
 package com.goafanti.common.dao;
 
 import com.goafanti.common.model.TOrder;
+import com.goafanti.common.model.TOrderDetail;
 import com.goafanti.common.model.TOrderExample;
-import com.goafanti.order.bo.OrderDetailBo;
+import com.goafanti.order.bo.CommodityDetailBo;
 
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
@@ -11,67 +12,67 @@ public interface TOrderMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	long countByExample(TOrderExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	int deleteByExample(TOrderExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	int deleteByPrimaryKey(Long orderNo);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	int insert(TOrder record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	int insertSelective(TOrder record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	List<TOrder> selectByExample(TOrderExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	TOrder selectByPrimaryKey(Long orderNo);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	int updateByExampleSelective(@Param("record") TOrder record, @Param("example") TOrderExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	int updateByExample(@Param("record") TOrder record, @Param("example") TOrderExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	int updateByPrimaryKeySelective(TOrder record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	int updateByPrimaryKey(TOrder record);
 
@@ -81,5 +82,12 @@ public interface TOrderMapper {
 	 * @param orderType
 	 * @return
 	 */
-	OrderDetailBo selectCommodityDetail(@Param("commodityId")String commodityId, @Param("commodityType")Integer commodityType);
+	CommodityDetailBo selectCommodityDetail(@Param("commodityId")String commodityId, @Param("commodityType")Integer commodityType);
+	
+	/**
+	 * 查询订单详情商品
+	 * @param orderId
+	 * @return
+	 */
+	List<TOrderDetail> selectOrderCommodity(@Param("orderId")String orderId);
 }

+ 43 - 3
src/main/java/com/goafanti/common/mapper/PermissionMapper.xml

@@ -14,10 +14,11 @@
     <result column="status" jdbcType="VARCHAR" property="status" />
     <result column="show_order" jdbcType="VARCHAR" property="showOrder" />
     <result column="super_id" jdbcType="VARCHAR" property="superId" />
+    <result column="type" jdbcType="INTEGER" property="type"/>
   </resultMap>
   <sql id="Base_Column_List">
     id, url, name,create_id as createId ,create_time as createTime,update_time as updateTime,
-     deleted_sign as deletedSign, aut_no as autNo, hierarchies,status ,show_order as showOrder, super_id as superId
+     deleted_sign as deletedSign, aut_no as autNo, hierarchies,status ,show_order as showOrder, super_id as superId,type
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
     select 
@@ -113,12 +114,12 @@
     insert into permission (id, url, name, 
       create_id, create_time, update_time, 
       deleted_sign, aut_no, hierarchies, 
-      status, show_order, super_id
+      status, show_order, super_id,type
       )
     values (#{id,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
       #{createId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, 
       #{deletedSign,jdbcType=VARCHAR}, #{autNo,jdbcType=VARCHAR}, #{hierarchies,jdbcType=VARCHAR}, 
-      #{status,jdbcType=VARCHAR}, #{showOrder,jdbcType=VARCHAR}, #{superId,jdbcType=VARCHAR}
+      #{status,jdbcType=VARCHAR}, #{showOrder,jdbcType=VARCHAR}, #{superId,jdbcType=VARCHAR},#{type,jdbcType=INTEGER}
       )
   </insert>
   <select id="selectAdminNameById" parameterType="java.lang.String" resultType="java.lang.String">
@@ -218,6 +219,9 @@
       <if test="superId != null">
         super_id = #{superId,jdbcType=VARCHAR},
       </if>
+      <if test="type != null">
+      	type = #{type,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR} 		
   </update>
@@ -281,4 +285,40 @@
   		where
   		pid=#{id,jdbcType=VARCHAR} 
   </select>
+  <select id="selectNavList" parameterType="java.lang.String" resultType="com.goafanti.permission.bo.Navigation">
+		<choose>
+			<when test="aid == null">
+				select
+					id,
+					name,
+					url
+				from
+					permission
+				where type = 0
+			</when>
+			<otherwise>
+				select
+					d.id,
+					d.name,
+					d.url
+				from
+					user_role a left join role b on
+					a.rid = b.id left join role_permission c on
+					b.id = c.rid left join permission d on
+					c.pid = d.id
+				where d.type = 0 and a.uid = #{aid,jdbcType=VARCHAR}
+			</otherwise>
+		</choose>
+  </select>
+  <select id="selectMenuList" parameterType="java.lang.String" resultType="com.goafanti.permission.bo.SubMenu">
+		select
+			id,
+			name,
+			url
+		from
+			permission
+		where
+			super_id = #{superId,jdbcType=VARCHAR}
+			and (type = 1 or type = 2)
+  </select>
 </mapper>

+ 366 - 0
src/main/java/com/goafanti/common/mapper/TOrderDetailMapper.xml

@@ -0,0 +1,366 @@
+<?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.TOrderDetailMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderDetail">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 10 13:43:11 CST 2018.
+    -->
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="order_no" jdbcType="BIGINT" property="orderNo" />
+    <result column="commodity_id" jdbcType="VARCHAR" property="commodityId" />
+    <result column="commodity_name" jdbcType="VARCHAR" property="commodityName" />
+    <result column="commodity_quantity" jdbcType="INTEGER" property="commodityQuantity" />
+    <result column="commodity_price" jdbcType="DECIMAL" property="commodityPrice" />
+    <result column="commodity_type" jdbcType="INTEGER" property="commodityType" />
+    <result column="commodity_mode" jdbcType="VARCHAR" property="commodityMode" />
+    <result column="discount_price" jdbcType="DECIMAL" property="discountPrice" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </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 Wed Jan 10 13:43:11 CST 2018.
+    -->
+    <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 Wed Jan 10 13:43:11 CST 2018.
+    -->
+    <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 Wed Jan 10 13:43:11 CST 2018.
+    -->
+    id, order_no, commodity_id, commodity_name, commodity_quantity, commodity_price, 
+    commodity_type, commodity_mode, discount_price, create_time
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderDetailExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 10 13:43:11 CST 2018.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from t_order_detail
+    <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.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 10 13:43:11 CST 2018.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from t_order_detail
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 10 13:43:11 CST 2018.
+    -->
+    delete from t_order_detail
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderDetailExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 10 13:43:11 CST 2018.
+    -->
+    delete from t_order_detail
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.TOrderDetail">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 10 13:43:11 CST 2018.
+    -->
+    insert into t_order_detail (id, order_no, commodity_id, 
+      commodity_name, commodity_quantity, commodity_price, 
+      commodity_type, commodity_mode, discount_price, 
+      create_time)
+    values (#{id,jdbcType=VARCHAR}, #{orderNo,jdbcType=BIGINT}, #{commodityId,jdbcType=VARCHAR}, 
+      #{commodityName,jdbcType=VARCHAR}, #{commodityQuantity,jdbcType=INTEGER}, #{commodityPrice,jdbcType=DECIMAL}, 
+      #{commodityType,jdbcType=INTEGER}, #{commodityMode,jdbcType=VARCHAR}, #{discountPrice,jdbcType=DECIMAL}, 
+      #{createTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderDetail">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 10 13:43:11 CST 2018.
+    -->
+    insert into t_order_detail
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="orderNo != null">
+        order_no,
+      </if>
+      <if test="commodityId != null">
+        commodity_id,
+      </if>
+      <if test="commodityName != null">
+        commodity_name,
+      </if>
+      <if test="commodityQuantity != null">
+        commodity_quantity,
+      </if>
+      <if test="commodityPrice != null">
+        commodity_price,
+      </if>
+      <if test="commodityType != null">
+        commodity_type,
+      </if>
+      <if test="commodityMode != null">
+        commodity_mode,
+      </if>
+      <if test="discountPrice != null">
+        discount_price,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="orderNo != null">
+        #{orderNo,jdbcType=BIGINT},
+      </if>
+      <if test="commodityId != null">
+        #{commodityId,jdbcType=VARCHAR},
+      </if>
+      <if test="commodityName != null">
+        #{commodityName,jdbcType=VARCHAR},
+      </if>
+      <if test="commodityQuantity != null">
+        #{commodityQuantity,jdbcType=INTEGER},
+      </if>
+      <if test="commodityPrice != null">
+        #{commodityPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="commodityType != null">
+        #{commodityType,jdbcType=INTEGER},
+      </if>
+      <if test="commodityMode != null">
+        #{commodityMode,jdbcType=VARCHAR},
+      </if>
+      <if test="discountPrice != null">
+        #{discountPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.TOrderDetailExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 10 13:43:11 CST 2018.
+    -->
+    select count(*) from t_order_detail
+    <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 Wed Jan 10 13:43:11 CST 2018.
+    -->
+    update t_order_detail
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.orderNo != null">
+        order_no = #{record.orderNo,jdbcType=BIGINT},
+      </if>
+      <if test="record.commodityId != null">
+        commodity_id = #{record.commodityId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.commodityName != null">
+        commodity_name = #{record.commodityName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.commodityQuantity != null">
+        commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
+      </if>
+      <if test="record.commodityPrice != null">
+        commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="record.commodityType != null">
+        commodity_type = #{record.commodityType,jdbcType=INTEGER},
+      </if>
+      <if test="record.commodityMode != null">
+        commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.discountPrice != null">
+        discount_price = #{record.discountPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </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 Wed Jan 10 13:43:11 CST 2018.
+    -->
+    update t_order_detail
+    set id = #{record.id,jdbcType=VARCHAR},
+      order_no = #{record.orderNo,jdbcType=BIGINT},
+      commodity_id = #{record.commodityId,jdbcType=VARCHAR},
+      commodity_name = #{record.commodityName,jdbcType=VARCHAR},
+      commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
+      commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
+      commodity_type = #{record.commodityType,jdbcType=INTEGER},
+      commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
+      discount_price = #{record.discountPrice,jdbcType=DECIMAL},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderDetail">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 10 13:43:11 CST 2018.
+    -->
+    update t_order_detail
+    <set>
+      <if test="orderNo != null">
+        order_no = #{orderNo,jdbcType=BIGINT},
+      </if>
+      <if test="commodityId != null">
+        commodity_id = #{commodityId,jdbcType=VARCHAR},
+      </if>
+      <if test="commodityName != null">
+        commodity_name = #{commodityName,jdbcType=VARCHAR},
+      </if>
+      <if test="commodityQuantity != null">
+        commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
+      </if>
+      <if test="commodityPrice != null">
+        commodity_price = #{commodityPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="commodityType != null">
+        commodity_type = #{commodityType,jdbcType=INTEGER},
+      </if>
+      <if test="commodityMode != null">
+        commodity_mode = #{commodityMode,jdbcType=VARCHAR},
+      </if>
+      <if test="discountPrice != null">
+        discount_price = #{discountPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderDetail">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 10 13:43:11 CST 2018.
+    -->
+    update t_order_detail
+    set order_no = #{orderNo,jdbcType=BIGINT},
+      commodity_id = #{commodityId,jdbcType=VARCHAR},
+      commodity_name = #{commodityName,jdbcType=VARCHAR},
+      commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
+      commodity_price = #{commodityPrice,jdbcType=DECIMAL},
+      commodity_type = #{commodityType,jdbcType=INTEGER},
+      commodity_mode = #{commodityMode,jdbcType=VARCHAR},
+      discount_price = #{discountPrice,jdbcType=DECIMAL},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 65 - 125
src/main/java/com/goafanti/common/mapper/TOrderMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sat Dec 30 15:36:11 CST 2017.
+      This element was generated on Wed Jan 10 12:36:22 CST 2018.
     -->
     <id column="order_no" jdbcType="BIGINT" property="orderNo" />
     <result column="creater" jdbcType="VARCHAR" property="creater" />
@@ -13,11 +13,6 @@
     <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="buyer_id" jdbcType="VARCHAR" property="buyerId" />
     <result column="seller_id" jdbcType="VARCHAR" property="sellerId" />
-    <result column="commodity_id" jdbcType="VARCHAR" property="commodityId" />
-    <result column="commodity_quantity" jdbcType="INTEGER" property="commodityQuantity" />
-    <result column="commodity_price" jdbcType="DECIMAL" property="commodityPrice" />
-    <result column="commodity_type" jdbcType="INTEGER" property="commodityType" />
-    <result column="commodity_mode" jdbcType="VARCHAR" property="commodityMode" />
     <result column="first_payment" jdbcType="DECIMAL" property="firstPayment" />
     <result column="order_amount" jdbcType="DECIMAL" property="orderAmount" />
     <result column="brokerage_amount" jdbcType="DECIMAL" property="brokerageAmount" />
@@ -35,13 +30,13 @@
     <result column="order_channel" jdbcType="INTEGER" property="orderChannel" />
     <result column="order_remarks" jdbcType="VARCHAR" property="orderRemarks" />
     <result column="delete_sign" jdbcType="BIT" property="deleteSign" />
-    <result column="commodity_name" jdbcType="VARCHAR" property="commodityName" />
+    <result column="isDemand" jdbcType="INTEGER" property="isdemand" />
   </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 Sat Dec 30 15:36:11 CST 2017.
+      This element was generated on Wed Jan 10 12:36:22 CST 2018.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -75,7 +70,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sat Dec 30 15:36:11 CST 2017.
+      This element was generated on Wed Jan 10 12:36:22 CST 2018.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -109,19 +104,19 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sat Dec 30 15:36:11 CST 2017.
+      This element was generated on Wed Jan 10 12:36:22 CST 2018.
     -->
-    order_no, creater, create_time, update_time, buyer_id, seller_id, commodity_id, commodity_quantity, 
-    commodity_price, commodity_type, commodity_mode, first_payment, order_amount, brokerage_amount, 
-    brokerage_proportion, actually_first_payment, actually_total_payment, actually_brokerage_amount, 
-    order_status, intention_status, trading_status, technology_transfer_progress, payment_status, 
-    liquidation_status, order_follower, order_channel, order_remarks, delete_sign, commodity_name
+    order_no, creater, create_time, update_time, buyer_id, seller_id, first_payment, 
+    order_amount, brokerage_amount, brokerage_proportion, actually_first_payment, actually_total_payment, 
+    actually_brokerage_amount, order_status, intention_status, trading_status, technology_transfer_progress, 
+    payment_status, liquidation_status, order_follower, order_channel, order_remarks, 
+    delete_sign, isDemand
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sat Dec 30 15:36:11 CST 2017.
+      This element was generated on Wed Jan 10 12:36:22 CST 2018.
     -->
     select
     <if test="distinct">
@@ -140,7 +135,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sat Dec 30 15:36:11 CST 2017.
+      This element was generated on Wed Jan 10 12:36:22 CST 2018.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -151,7 +146,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sat Dec 30 15:36:11 CST 2017.
+      This element was generated on Wed Jan 10 12:36:22 CST 2018.
     -->
     delete from t_order
     where order_no = #{orderNo,jdbcType=BIGINT}
@@ -160,7 +155,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sat Dec 30 15:36:11 CST 2017.
+      This element was generated on Wed Jan 10 12:36:22 CST 2018.
     -->
     delete from t_order
     <if test="_parameter != null">
@@ -171,36 +166,34 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sat Dec 30 15:36:11 CST 2017.
+      This element was generated on Wed Jan 10 12:36:22 CST 2018.
     -->
     insert into t_order (order_no, creater, create_time, 
       update_time, buyer_id, seller_id, 
-      commodity_id, commodity_quantity, commodity_price, 
-      commodity_type, commodity_mode, first_payment, 
-      order_amount, brokerage_amount, brokerage_proportion, 
-      actually_first_payment, actually_total_payment, 
-      actually_brokerage_amount, order_status, intention_status, 
-      trading_status, technology_transfer_progress, 
-      payment_status, liquidation_status, order_follower, 
-      order_channel, order_remarks, delete_sign, 
-      commodity_name)
+      first_payment, order_amount, brokerage_amount, 
+      brokerage_proportion, actually_first_payment, 
+      actually_total_payment, actually_brokerage_amount, 
+      order_status, intention_status, trading_status, 
+      technology_transfer_progress, payment_status, 
+      liquidation_status, order_follower, order_channel, 
+      order_remarks, delete_sign, isDemand
+      )
     values (#{orderNo,jdbcType=BIGINT}, #{creater,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
       #{updateTime,jdbcType=TIMESTAMP}, #{buyerId,jdbcType=VARCHAR}, #{sellerId,jdbcType=VARCHAR}, 
-      #{commodityId,jdbcType=VARCHAR}, #{commodityQuantity,jdbcType=INTEGER}, #{commodityPrice,jdbcType=DECIMAL}, 
-      #{commodityType,jdbcType=INTEGER}, #{commodityMode,jdbcType=VARCHAR}, #{firstPayment,jdbcType=DECIMAL}, 
-      #{orderAmount,jdbcType=DECIMAL}, #{brokerageAmount,jdbcType=DECIMAL}, #{brokerageProportion,jdbcType=DECIMAL}, 
-      #{actuallyFirstPayment,jdbcType=DECIMAL}, #{actuallyTotalPayment,jdbcType=DECIMAL}, 
-      #{actuallyBrokerageAmount,jdbcType=DECIMAL}, #{orderStatus,jdbcType=INTEGER}, #{intentionStatus,jdbcType=INTEGER}, 
-      #{tradingStatus,jdbcType=INTEGER}, #{technologyTransferProgress,jdbcType=INTEGER}, 
-      #{paymentStatus,jdbcType=INTEGER}, #{liquidationStatus,jdbcType=INTEGER}, #{orderFollower,jdbcType=VARCHAR}, 
-      #{orderChannel,jdbcType=INTEGER}, #{orderRemarks,jdbcType=VARCHAR}, #{deleteSign,jdbcType=BIT}, 
-      #{commodityName,jdbcType=VARCHAR})
+      #{firstPayment,jdbcType=DECIMAL}, #{orderAmount,jdbcType=DECIMAL}, #{brokerageAmount,jdbcType=DECIMAL}, 
+      #{brokerageProportion,jdbcType=DECIMAL}, #{actuallyFirstPayment,jdbcType=DECIMAL}, 
+      #{actuallyTotalPayment,jdbcType=DECIMAL}, #{actuallyBrokerageAmount,jdbcType=DECIMAL}, 
+      #{orderStatus,jdbcType=INTEGER}, #{intentionStatus,jdbcType=INTEGER}, #{tradingStatus,jdbcType=INTEGER}, 
+      #{technologyTransferProgress,jdbcType=INTEGER}, #{paymentStatus,jdbcType=INTEGER}, 
+      #{liquidationStatus,jdbcType=INTEGER}, #{orderFollower,jdbcType=VARCHAR}, #{orderChannel,jdbcType=INTEGER}, 
+      #{orderRemarks,jdbcType=VARCHAR}, #{deleteSign,jdbcType=BIT}, #{isdemand,jdbcType=INTEGER}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrder">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sat Dec 30 15:36:11 CST 2017.
+      This element was generated on Wed Jan 10 12:36:22 CST 2018.
     -->
     insert into t_order
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -222,21 +215,6 @@
       <if test="sellerId != null">
         seller_id,
       </if>
-      <if test="commodityId != null">
-        commodity_id,
-      </if>
-      <if test="commodityQuantity != null">
-        commodity_quantity,
-      </if>
-      <if test="commodityPrice != null">
-        commodity_price,
-      </if>
-      <if test="commodityType != null">
-        commodity_type,
-      </if>
-      <if test="commodityMode != null">
-        commodity_mode,
-      </if>
       <if test="firstPayment != null">
         first_payment,
       </if>
@@ -288,8 +266,8 @@
       <if test="deleteSign != null">
         delete_sign,
       </if>
-      <if test="commodityName != null">
-        commodity_name,
+      <if test="isdemand != null">
+        isDemand,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -311,21 +289,6 @@
       <if test="sellerId != null">
         #{sellerId,jdbcType=VARCHAR},
       </if>
-      <if test="commodityId != null">
-        #{commodityId,jdbcType=VARCHAR},
-      </if>
-      <if test="commodityQuantity != null">
-        #{commodityQuantity,jdbcType=INTEGER},
-      </if>
-      <if test="commodityPrice != null">
-        #{commodityPrice,jdbcType=DECIMAL},
-      </if>
-      <if test="commodityType != null">
-        #{commodityType,jdbcType=INTEGER},
-      </if>
-      <if test="commodityMode != null">
-        #{commodityMode,jdbcType=VARCHAR},
-      </if>
       <if test="firstPayment != null">
         #{firstPayment,jdbcType=DECIMAL},
       </if>
@@ -377,8 +340,8 @@
       <if test="deleteSign != null">
         #{deleteSign,jdbcType=BIT},
       </if>
-      <if test="commodityName != null">
-        #{commodityName,jdbcType=VARCHAR},
+      <if test="isdemand != null">
+        #{isdemand,jdbcType=INTEGER},
       </if>
     </trim>
   </insert>
@@ -386,7 +349,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sat Dec 30 15:36:11 CST 2017.
+      This element was generated on Wed Jan 10 12:36:22 CST 2018.
     -->
     select count(*) from t_order
     <if test="_parameter != null">
@@ -397,7 +360,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sat Dec 30 15:36:11 CST 2017.
+      This element was generated on Wed Jan 10 12:36:22 CST 2018.
     -->
     update t_order
     <set>
@@ -419,21 +382,6 @@
       <if test="record.sellerId != null">
         seller_id = #{record.sellerId,jdbcType=VARCHAR},
       </if>
-      <if test="record.commodityId != null">
-        commodity_id = #{record.commodityId,jdbcType=VARCHAR},
-      </if>
-      <if test="record.commodityQuantity != null">
-        commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
-      </if>
-      <if test="record.commodityPrice != null">
-        commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
-      </if>
-      <if test="record.commodityType != null">
-        commodity_type = #{record.commodityType,jdbcType=INTEGER},
-      </if>
-      <if test="record.commodityMode != null">
-        commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
-      </if>
       <if test="record.firstPayment != null">
         first_payment = #{record.firstPayment,jdbcType=DECIMAL},
       </if>
@@ -485,8 +433,8 @@
       <if test="record.deleteSign != null">
         delete_sign = #{record.deleteSign,jdbcType=BIT},
       </if>
-      <if test="record.commodityName != null">
-        commodity_name = #{record.commodityName,jdbcType=VARCHAR},
+      <if test="record.isdemand != null">
+        isDemand = #{record.isdemand,jdbcType=INTEGER},
       </if>
     </set>
     <if test="_parameter != null">
@@ -497,7 +445,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sat Dec 30 15:36:11 CST 2017.
+      This element was generated on Wed Jan 10 12:36:22 CST 2018.
     -->
     update t_order
     set order_no = #{record.orderNo,jdbcType=BIGINT},
@@ -506,11 +454,6 @@
       update_time = #{record.updateTime,jdbcType=TIMESTAMP},
       buyer_id = #{record.buyerId,jdbcType=VARCHAR},
       seller_id = #{record.sellerId,jdbcType=VARCHAR},
-      commodity_id = #{record.commodityId,jdbcType=VARCHAR},
-      commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
-      commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
-      commodity_type = #{record.commodityType,jdbcType=INTEGER},
-      commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
       first_payment = #{record.firstPayment,jdbcType=DECIMAL},
       order_amount = #{record.orderAmount,jdbcType=DECIMAL},
       brokerage_amount = #{record.brokerageAmount,jdbcType=DECIMAL},
@@ -528,7 +471,7 @@
       order_channel = #{record.orderChannel,jdbcType=INTEGER},
       order_remarks = #{record.orderRemarks,jdbcType=VARCHAR},
       delete_sign = #{record.deleteSign,jdbcType=BIT},
-      commodity_name = #{record.commodityName,jdbcType=VARCHAR}
+      isDemand = #{record.isdemand,jdbcType=INTEGER}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -537,7 +480,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sat Dec 30 15:36:11 CST 2017.
+      This element was generated on Wed Jan 10 12:36:22 CST 2018.
     -->
     update t_order
     <set>
@@ -556,21 +499,6 @@
       <if test="sellerId != null">
         seller_id = #{sellerId,jdbcType=VARCHAR},
       </if>
-      <if test="commodityId != null">
-        commodity_id = #{commodityId,jdbcType=VARCHAR},
-      </if>
-      <if test="commodityQuantity != null">
-        commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
-      </if>
-      <if test="commodityPrice != null">
-        commodity_price = #{commodityPrice,jdbcType=DECIMAL},
-      </if>
-      <if test="commodityType != null">
-        commodity_type = #{commodityType,jdbcType=INTEGER},
-      </if>
-      <if test="commodityMode != null">
-        commodity_mode = #{commodityMode,jdbcType=VARCHAR},
-      </if>
       <if test="firstPayment != null">
         first_payment = #{firstPayment,jdbcType=DECIMAL},
       </if>
@@ -622,8 +550,8 @@
       <if test="deleteSign != null">
         delete_sign = #{deleteSign,jdbcType=BIT},
       </if>
-      <if test="commodityName != null">
-        commodity_name = #{commodityName,jdbcType=VARCHAR},
+      <if test="isdemand != null">
+        isDemand = #{isdemand,jdbcType=INTEGER},
       </if>
     </set>
     where order_no = #{orderNo,jdbcType=BIGINT}
@@ -632,7 +560,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sat Dec 30 15:36:11 CST 2017.
+      This element was generated on Wed Jan 10 12:36:22 CST 2018.
     -->
     update t_order
     set creater = #{creater,jdbcType=VARCHAR},
@@ -640,11 +568,6 @@
       update_time = #{updateTime,jdbcType=TIMESTAMP},
       buyer_id = #{buyerId,jdbcType=VARCHAR},
       seller_id = #{sellerId,jdbcType=VARCHAR},
-      commodity_id = #{commodityId,jdbcType=VARCHAR},
-      commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
-      commodity_price = #{commodityPrice,jdbcType=DECIMAL},
-      commodity_type = #{commodityType,jdbcType=INTEGER},
-      commodity_mode = #{commodityMode,jdbcType=VARCHAR},
       first_payment = #{firstPayment,jdbcType=DECIMAL},
       order_amount = #{orderAmount,jdbcType=DECIMAL},
       brokerage_amount = #{brokerageAmount,jdbcType=DECIMAL},
@@ -662,11 +585,11 @@
       order_channel = #{orderChannel,jdbcType=INTEGER},
       order_remarks = #{orderRemarks,jdbcType=VARCHAR},
       delete_sign = #{deleteSign,jdbcType=BIT},
-      commodity_name = #{commodityName,jdbcType=VARCHAR}
+      isDemand = #{isdemand,jdbcType=INTEGER}
     where order_no = #{orderNo,jdbcType=BIGINT}
   </update>
   
-  <select id="selectCommodityDetail" resultType="com.goafanti.order.bo.OrderDetailBo">
+  <select id="selectCommodityDetail" resultType="com.goafanti.order.bo.CommodityDetailBo">
   	<choose>
   		<when test="commodityType == 0">
   			select id as commodityId,bname as commodityName,ifnull(price,0) as commodityPrice from business_project where id = #{commodityId,jdbcType=VARCHAR}
@@ -759,4 +682,21 @@
 			a.order_no = #{orderNo,jdbcType=BIGINT}
 		</if>
   </select>
+  
+  <select id="selectOrderCommodity" parameterType="java.lang.String" resultType="com.goafanti.common.model.TOrderDetail">
+		select
+			id,
+			order_id as orderId,
+			commodity_id as commodityId,
+			commodity_name as commodityName,
+			commodity_quantity as commodityQuantity,
+			commodity_price as commodityPrice,
+			commodity_type as commodityType,
+			commodity_mode as commodityMode,
+			discount_price as discountPrice
+		from
+			t_order_detail
+		where
+			order_id = #{orderId,jdbcType=VARCHAR}
+  </select>
 </mapper>

+ 9 - 0
src/main/java/com/goafanti/common/model/Permission.java

@@ -34,6 +34,7 @@ public class Permission  {
 	
 	private String superId;	
 
+	private Integer type;
 	public String getCreateId() {
 		return createId;
 	}
@@ -129,4 +130,12 @@ public class Permission  {
 	public void setName(String name) {
 		this.name = name;
 	}
+
+	public Integer getType() {
+		return type;
+	}
+
+	public void setType(Integer type) {
+		this.type = type;
+	}
 }

+ 82 - 197
src/main/java/com/goafanti/common/model/TOrder.java

@@ -7,154 +7,129 @@ public class TOrder {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.order_no
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private Long orderNo;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.creater
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private String creater;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.create_time
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private Date createTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.update_time
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private Date updateTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.buyer_id
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private String buyerId;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.seller_id
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private String sellerId;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.commodity_id
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
-	 */
-	private String commodityId;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.commodity_quantity
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
-	 */
-	private Integer commodityQuantity;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.commodity_price
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
-	 */
-	private BigDecimal commodityPrice;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.commodity_type
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
-	 */
-	private Integer commodityType;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.commodity_mode
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
-	 */
-	private String commodityMode;
-	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.first_payment
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private BigDecimal firstPayment;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.order_amount
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private BigDecimal orderAmount;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.brokerage_amount
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private BigDecimal brokerageAmount;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.brokerage_proportion
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private BigDecimal brokerageProportion;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.actually_first_payment
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private BigDecimal actuallyFirstPayment;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.actually_total_payment
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private BigDecimal actuallyTotalPayment;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.actually_brokerage_amount
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private BigDecimal actuallyBrokerageAmount;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.order_status
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private Integer orderStatus;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.intention_status
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private Integer intentionStatus;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.trading_status
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private Integer tradingStatus;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.technology_transfer_progress
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private Integer technologyTransferProgress;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.payment_status
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private Integer paymentStatus;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.liquidation_status
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private Integer liquidationStatus;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.order_follower
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private String orderFollower;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.order_channel
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private Integer orderChannel;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.order_remarks
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private String orderRemarks;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.delete_sign
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	private Boolean deleteSign;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.commodity_name
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order.isDemand
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
-	private String commodityName;
+	private Integer isdemand;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.order_no
 	 * @return  the value of t_order.order_no
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public Long getOrderNo() {
 		return orderNo;
@@ -163,7 +138,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.order_no
 	 * @param orderNo  the value for t_order.order_no
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setOrderNo(Long orderNo) {
 		this.orderNo = orderNo;
@@ -172,7 +147,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.creater
 	 * @return  the value of t_order.creater
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public String getCreater() {
 		return creater;
@@ -181,7 +156,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.creater
 	 * @param creater  the value for t_order.creater
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setCreater(String creater) {
 		this.creater = creater;
@@ -190,7 +165,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.create_time
 	 * @return  the value of t_order.create_time
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -199,7 +174,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.create_time
 	 * @param createTime  the value for t_order.create_time
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
@@ -208,7 +183,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.update_time
 	 * @return  the value of t_order.update_time
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public Date getUpdateTime() {
 		return updateTime;
@@ -217,7 +192,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.update_time
 	 * @param updateTime  the value for t_order.update_time
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setUpdateTime(Date updateTime) {
 		this.updateTime = updateTime;
@@ -226,7 +201,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.buyer_id
 	 * @return  the value of t_order.buyer_id
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public String getBuyerId() {
 		return buyerId;
@@ -235,7 +210,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.buyer_id
 	 * @param buyerId  the value for t_order.buyer_id
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setBuyerId(String buyerId) {
 		this.buyerId = buyerId;
@@ -244,7 +219,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.seller_id
 	 * @return  the value of t_order.seller_id
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public String getSellerId() {
 		return sellerId;
@@ -253,106 +228,16 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.seller_id
 	 * @param sellerId  the value for t_order.seller_id
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setSellerId(String sellerId) {
 		this.sellerId = sellerId;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.commodity_id
-	 * @return  the value of t_order.commodity_id
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
-	 */
-	public String getCommodityId() {
-		return commodityId;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.commodity_id
-	 * @param commodityId  the value for t_order.commodity_id
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
-	 */
-	public void setCommodityId(String commodityId) {
-		this.commodityId = commodityId;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.commodity_quantity
-	 * @return  the value of t_order.commodity_quantity
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
-	 */
-	public Integer getCommodityQuantity() {
-		return commodityQuantity;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.commodity_quantity
-	 * @param commodityQuantity  the value for t_order.commodity_quantity
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
-	 */
-	public void setCommodityQuantity(Integer commodityQuantity) {
-		this.commodityQuantity = commodityQuantity;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.commodity_price
-	 * @return  the value of t_order.commodity_price
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
-	 */
-	public BigDecimal getCommodityPrice() {
-		return commodityPrice;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.commodity_price
-	 * @param commodityPrice  the value for t_order.commodity_price
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
-	 */
-	public void setCommodityPrice(BigDecimal commodityPrice) {
-		this.commodityPrice = commodityPrice;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.commodity_type
-	 * @return  the value of t_order.commodity_type
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
-	 */
-	public Integer getCommodityType() {
-		return commodityType;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.commodity_type
-	 * @param commodityType  the value for t_order.commodity_type
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
-	 */
-	public void setCommodityType(Integer commodityType) {
-		this.commodityType = commodityType;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.commodity_mode
-	 * @return  the value of t_order.commodity_mode
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
-	 */
-	public String getCommodityMode() {
-		return commodityMode;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.commodity_mode
-	 * @param commodityMode  the value for t_order.commodity_mode
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
-	 */
-	public void setCommodityMode(String commodityMode) {
-		this.commodityMode = commodityMode;
-	}
-
-	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.first_payment
 	 * @return  the value of t_order.first_payment
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public BigDecimal getFirstPayment() {
 		return firstPayment;
@@ -361,7 +246,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.first_payment
 	 * @param firstPayment  the value for t_order.first_payment
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setFirstPayment(BigDecimal firstPayment) {
 		this.firstPayment = firstPayment;
@@ -370,7 +255,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.order_amount
 	 * @return  the value of t_order.order_amount
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public BigDecimal getOrderAmount() {
 		return orderAmount;
@@ -379,7 +264,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.order_amount
 	 * @param orderAmount  the value for t_order.order_amount
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setOrderAmount(BigDecimal orderAmount) {
 		this.orderAmount = orderAmount;
@@ -388,7 +273,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.brokerage_amount
 	 * @return  the value of t_order.brokerage_amount
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public BigDecimal getBrokerageAmount() {
 		return brokerageAmount;
@@ -397,7 +282,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.brokerage_amount
 	 * @param brokerageAmount  the value for t_order.brokerage_amount
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setBrokerageAmount(BigDecimal brokerageAmount) {
 		this.brokerageAmount = brokerageAmount;
@@ -406,7 +291,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.brokerage_proportion
 	 * @return  the value of t_order.brokerage_proportion
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public BigDecimal getBrokerageProportion() {
 		return brokerageProportion;
@@ -415,7 +300,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.brokerage_proportion
 	 * @param brokerageProportion  the value for t_order.brokerage_proportion
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setBrokerageProportion(BigDecimal brokerageProportion) {
 		this.brokerageProportion = brokerageProportion;
@@ -424,7 +309,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.actually_first_payment
 	 * @return  the value of t_order.actually_first_payment
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public BigDecimal getActuallyFirstPayment() {
 		return actuallyFirstPayment;
@@ -433,7 +318,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.actually_first_payment
 	 * @param actuallyFirstPayment  the value for t_order.actually_first_payment
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setActuallyFirstPayment(BigDecimal actuallyFirstPayment) {
 		this.actuallyFirstPayment = actuallyFirstPayment;
@@ -442,7 +327,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.actually_total_payment
 	 * @return  the value of t_order.actually_total_payment
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public BigDecimal getActuallyTotalPayment() {
 		return actuallyTotalPayment;
@@ -451,7 +336,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.actually_total_payment
 	 * @param actuallyTotalPayment  the value for t_order.actually_total_payment
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setActuallyTotalPayment(BigDecimal actuallyTotalPayment) {
 		this.actuallyTotalPayment = actuallyTotalPayment;
@@ -460,7 +345,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.actually_brokerage_amount
 	 * @return  the value of t_order.actually_brokerage_amount
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public BigDecimal getActuallyBrokerageAmount() {
 		return actuallyBrokerageAmount;
@@ -469,7 +354,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.actually_brokerage_amount
 	 * @param actuallyBrokerageAmount  the value for t_order.actually_brokerage_amount
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setActuallyBrokerageAmount(BigDecimal actuallyBrokerageAmount) {
 		this.actuallyBrokerageAmount = actuallyBrokerageAmount;
@@ -478,7 +363,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.order_status
 	 * @return  the value of t_order.order_status
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public Integer getOrderStatus() {
 		return orderStatus;
@@ -487,7 +372,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.order_status
 	 * @param orderStatus  the value for t_order.order_status
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setOrderStatus(Integer orderStatus) {
 		this.orderStatus = orderStatus;
@@ -496,7 +381,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.intention_status
 	 * @return  the value of t_order.intention_status
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public Integer getIntentionStatus() {
 		return intentionStatus;
@@ -505,7 +390,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.intention_status
 	 * @param intentionStatus  the value for t_order.intention_status
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setIntentionStatus(Integer intentionStatus) {
 		this.intentionStatus = intentionStatus;
@@ -514,7 +399,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.trading_status
 	 * @return  the value of t_order.trading_status
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public Integer getTradingStatus() {
 		return tradingStatus;
@@ -523,7 +408,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.trading_status
 	 * @param tradingStatus  the value for t_order.trading_status
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setTradingStatus(Integer tradingStatus) {
 		this.tradingStatus = tradingStatus;
@@ -532,7 +417,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.technology_transfer_progress
 	 * @return  the value of t_order.technology_transfer_progress
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public Integer getTechnologyTransferProgress() {
 		return technologyTransferProgress;
@@ -541,7 +426,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.technology_transfer_progress
 	 * @param technologyTransferProgress  the value for t_order.technology_transfer_progress
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setTechnologyTransferProgress(Integer technologyTransferProgress) {
 		this.technologyTransferProgress = technologyTransferProgress;
@@ -550,7 +435,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.payment_status
 	 * @return  the value of t_order.payment_status
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public Integer getPaymentStatus() {
 		return paymentStatus;
@@ -559,7 +444,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.payment_status
 	 * @param paymentStatus  the value for t_order.payment_status
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setPaymentStatus(Integer paymentStatus) {
 		this.paymentStatus = paymentStatus;
@@ -568,7 +453,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.liquidation_status
 	 * @return  the value of t_order.liquidation_status
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public Integer getLiquidationStatus() {
 		return liquidationStatus;
@@ -577,7 +462,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.liquidation_status
 	 * @param liquidationStatus  the value for t_order.liquidation_status
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setLiquidationStatus(Integer liquidationStatus) {
 		this.liquidationStatus = liquidationStatus;
@@ -586,7 +471,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.order_follower
 	 * @return  the value of t_order.order_follower
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public String getOrderFollower() {
 		return orderFollower;
@@ -595,7 +480,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.order_follower
 	 * @param orderFollower  the value for t_order.order_follower
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setOrderFollower(String orderFollower) {
 		this.orderFollower = orderFollower;
@@ -604,7 +489,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.order_channel
 	 * @return  the value of t_order.order_channel
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public Integer getOrderChannel() {
 		return orderChannel;
@@ -613,7 +498,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.order_channel
 	 * @param orderChannel  the value for t_order.order_channel
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setOrderChannel(Integer orderChannel) {
 		this.orderChannel = orderChannel;
@@ -622,7 +507,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.order_remarks
 	 * @return  the value of t_order.order_remarks
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public String getOrderRemarks() {
 		return orderRemarks;
@@ -631,7 +516,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.order_remarks
 	 * @param orderRemarks  the value for t_order.order_remarks
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setOrderRemarks(String orderRemarks) {
 		this.orderRemarks = orderRemarks;
@@ -640,7 +525,7 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.delete_sign
 	 * @return  the value of t_order.delete_sign
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public Boolean getDeleteSign() {
 		return deleteSign;
@@ -649,27 +534,27 @@ public class TOrder {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.delete_sign
 	 * @param deleteSign  the value for t_order.delete_sign
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setDeleteSign(Boolean deleteSign) {
 		this.deleteSign = deleteSign;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.commodity_name
-	 * @return  the value of t_order.commodity_name
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order.isDemand
+	 * @return  the value of t_order.isDemand
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
-	public String getCommodityName() {
-		return commodityName;
+	public Integer getIsdemand() {
+		return isdemand;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.commodity_name
-	 * @param commodityName  the value for t_order.commodity_name
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order.isDemand
+	 * @param isdemand  the value for t_order.isDemand
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
-	public void setCommodityName(String commodityName) {
-		this.commodityName = commodityName;
+	public void setIsdemand(Integer isdemand) {
+		this.isdemand = isdemand;
 	}
 }

+ 238 - 0
src/main/java/com/goafanti/common/model/TOrderDetail.java

@@ -0,0 +1,238 @@
+package com.goafanti.common.model;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class TOrderDetail {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_detail.id
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	private String id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_detail.order_no
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	private Long orderNo;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_detail.commodity_id
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	private String commodityId;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_detail.commodity_name
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	private String commodityName;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_detail.commodity_quantity
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	private Integer commodityQuantity;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_detail.commodity_price
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	private BigDecimal commodityPrice;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_detail.commodity_type
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	private Integer commodityType;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_detail.commodity_mode
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	private String commodityMode;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_detail.discount_price
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	private BigDecimal discountPrice;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_detail.create_time
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	private Date createTime;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_detail.id
+	 * @return  the value of t_order_detail.id
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public String getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_detail.id
+	 * @param id  the value for t_order_detail.id
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_detail.order_no
+	 * @return  the value of t_order_detail.order_no
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public Long getOrderNo() {
+		return orderNo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_detail.order_no
+	 * @param orderNo  the value for t_order_detail.order_no
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public void setOrderNo(Long orderNo) {
+		this.orderNo = orderNo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_detail.commodity_id
+	 * @return  the value of t_order_detail.commodity_id
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public String getCommodityId() {
+		return commodityId;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_detail.commodity_id
+	 * @param commodityId  the value for t_order_detail.commodity_id
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public void setCommodityId(String commodityId) {
+		this.commodityId = commodityId;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_detail.commodity_name
+	 * @return  the value of t_order_detail.commodity_name
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public String getCommodityName() {
+		return commodityName;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_detail.commodity_name
+	 * @param commodityName  the value for t_order_detail.commodity_name
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public void setCommodityName(String commodityName) {
+		this.commodityName = commodityName;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_detail.commodity_quantity
+	 * @return  the value of t_order_detail.commodity_quantity
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public Integer getCommodityQuantity() {
+		return commodityQuantity;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_detail.commodity_quantity
+	 * @param commodityQuantity  the value for t_order_detail.commodity_quantity
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public void setCommodityQuantity(Integer commodityQuantity) {
+		this.commodityQuantity = commodityQuantity;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_detail.commodity_price
+	 * @return  the value of t_order_detail.commodity_price
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public BigDecimal getCommodityPrice() {
+		return commodityPrice;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_detail.commodity_price
+	 * @param commodityPrice  the value for t_order_detail.commodity_price
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public void setCommodityPrice(BigDecimal commodityPrice) {
+		this.commodityPrice = commodityPrice;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_detail.commodity_type
+	 * @return  the value of t_order_detail.commodity_type
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public Integer getCommodityType() {
+		return commodityType;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_detail.commodity_type
+	 * @param commodityType  the value for t_order_detail.commodity_type
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public void setCommodityType(Integer commodityType) {
+		this.commodityType = commodityType;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_detail.commodity_mode
+	 * @return  the value of t_order_detail.commodity_mode
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public String getCommodityMode() {
+		return commodityMode;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_detail.commodity_mode
+	 * @param commodityMode  the value for t_order_detail.commodity_mode
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public void setCommodityMode(String commodityMode) {
+		this.commodityMode = commodityMode;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_detail.discount_price
+	 * @return  the value of t_order_detail.discount_price
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public BigDecimal getDiscountPrice() {
+		return discountPrice;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_detail.discount_price
+	 * @param discountPrice  the value for t_order_detail.discount_price
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public void setDiscountPrice(BigDecimal discountPrice) {
+		this.discountPrice = discountPrice;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_detail.create_time
+	 * @return  the value of t_order_detail.create_time
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_detail.create_time
+	 * @param createTime  the value for t_order_detail.create_time
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+}

+ 903 - 0
src/main/java/com/goafanti/common/model/TOrderDetailExample.java

@@ -0,0 +1,903 @@
+package com.goafanti.common.model;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Date;
+
+public class TOrderDetailExample {
+    /**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	protected String orderByClause;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	protected boolean distinct;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	protected List<Criteria> oredCriteria;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public TOrderDetailExample() {
+		oredCriteria = new ArrayList<Criteria>();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public void setOrderByClause(String orderByClause) {
+		this.orderByClause = orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public String getOrderByClause() {
+		return orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public void setDistinct(boolean distinct) {
+		this.distinct = distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public boolean isDistinct() {
+		return distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public List<Criteria> getOredCriteria() {
+		return oredCriteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public void or(Criteria criteria) {
+		oredCriteria.add(criteria);
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	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 t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	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 t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	protected Criteria createCriteriaInternal() {
+		Criteria criteria = new Criteria();
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	public void clear() {
+		oredCriteria.clear();
+		orderByClause = null;
+		distinct = false;
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	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(String value) {
+			addCriterion("id =", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotEqualTo(String value) {
+			addCriterion("id <>", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThan(String value) {
+			addCriterion("id >", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThanOrEqualTo(String value) {
+			addCriterion("id >=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThan(String value) {
+			addCriterion("id <", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThanOrEqualTo(String value) {
+			addCriterion("id <=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLike(String value) {
+			addCriterion("id like", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotLike(String value) {
+			addCriterion("id not like", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIn(List<String> values) {
+			addCriterion("id in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotIn(List<String> values) {
+			addCriterion("id not in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdBetween(String value1, String value2) {
+			addCriterion("id between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotBetween(String value1, String value2) {
+			addCriterion("id not between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoIsNull() {
+			addCriterion("order_no is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoIsNotNull() {
+			addCriterion("order_no is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoEqualTo(Long value) {
+			addCriterion("order_no =", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoNotEqualTo(Long value) {
+			addCriterion("order_no <>", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoGreaterThan(Long value) {
+			addCriterion("order_no >", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoGreaterThanOrEqualTo(Long value) {
+			addCriterion("order_no >=", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoLessThan(Long value) {
+			addCriterion("order_no <", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoLessThanOrEqualTo(Long value) {
+			addCriterion("order_no <=", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoIn(List<Long> values) {
+			addCriterion("order_no in", values, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoNotIn(List<Long> values) {
+			addCriterion("order_no not in", values, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoBetween(Long value1, Long value2) {
+			addCriterion("order_no between", value1, value2, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoNotBetween(Long value1, Long value2) {
+			addCriterion("order_no not between", value1, value2, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdIsNull() {
+			addCriterion("commodity_id is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdIsNotNull() {
+			addCriterion("commodity_id is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdEqualTo(String value) {
+			addCriterion("commodity_id =", value, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdNotEqualTo(String value) {
+			addCriterion("commodity_id <>", value, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdGreaterThan(String value) {
+			addCriterion("commodity_id >", value, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdGreaterThanOrEqualTo(String value) {
+			addCriterion("commodity_id >=", value, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdLessThan(String value) {
+			addCriterion("commodity_id <", value, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdLessThanOrEqualTo(String value) {
+			addCriterion("commodity_id <=", value, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdLike(String value) {
+			addCriterion("commodity_id like", value, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdNotLike(String value) {
+			addCriterion("commodity_id not like", value, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdIn(List<String> values) {
+			addCriterion("commodity_id in", values, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdNotIn(List<String> values) {
+			addCriterion("commodity_id not in", values, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdBetween(String value1, String value2) {
+			addCriterion("commodity_id between", value1, value2, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdNotBetween(String value1, String value2) {
+			addCriterion("commodity_id not between", value1, value2, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityNameIsNull() {
+			addCriterion("commodity_name is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityNameIsNotNull() {
+			addCriterion("commodity_name is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityNameEqualTo(String value) {
+			addCriterion("commodity_name =", value, "commodityName");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityNameNotEqualTo(String value) {
+			addCriterion("commodity_name <>", value, "commodityName");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityNameGreaterThan(String value) {
+			addCriterion("commodity_name >", value, "commodityName");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityNameGreaterThanOrEqualTo(String value) {
+			addCriterion("commodity_name >=", value, "commodityName");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityNameLessThan(String value) {
+			addCriterion("commodity_name <", value, "commodityName");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityNameLessThanOrEqualTo(String value) {
+			addCriterion("commodity_name <=", value, "commodityName");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityNameLike(String value) {
+			addCriterion("commodity_name like", value, "commodityName");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityNameNotLike(String value) {
+			addCriterion("commodity_name not like", value, "commodityName");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityNameIn(List<String> values) {
+			addCriterion("commodity_name in", values, "commodityName");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityNameNotIn(List<String> values) {
+			addCriterion("commodity_name not in", values, "commodityName");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityNameBetween(String value1, String value2) {
+			addCriterion("commodity_name between", value1, value2, "commodityName");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityNameNotBetween(String value1, String value2) {
+			addCriterion("commodity_name not between", value1, value2, "commodityName");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityQuantityIsNull() {
+			addCriterion("commodity_quantity is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityQuantityIsNotNull() {
+			addCriterion("commodity_quantity is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityQuantityEqualTo(Integer value) {
+			addCriterion("commodity_quantity =", value, "commodityQuantity");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityQuantityNotEqualTo(Integer value) {
+			addCriterion("commodity_quantity <>", value, "commodityQuantity");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityQuantityGreaterThan(Integer value) {
+			addCriterion("commodity_quantity >", value, "commodityQuantity");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityQuantityGreaterThanOrEqualTo(Integer value) {
+			addCriterion("commodity_quantity >=", value, "commodityQuantity");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityQuantityLessThan(Integer value) {
+			addCriterion("commodity_quantity <", value, "commodityQuantity");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityQuantityLessThanOrEqualTo(Integer value) {
+			addCriterion("commodity_quantity <=", value, "commodityQuantity");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityQuantityIn(List<Integer> values) {
+			addCriterion("commodity_quantity in", values, "commodityQuantity");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityQuantityNotIn(List<Integer> values) {
+			addCriterion("commodity_quantity not in", values, "commodityQuantity");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityQuantityBetween(Integer value1, Integer value2) {
+			addCriterion("commodity_quantity between", value1, value2, "commodityQuantity");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityQuantityNotBetween(Integer value1, Integer value2) {
+			addCriterion("commodity_quantity not between", value1, value2, "commodityQuantity");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityPriceIsNull() {
+			addCriterion("commodity_price is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityPriceIsNotNull() {
+			addCriterion("commodity_price is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityPriceEqualTo(BigDecimal value) {
+			addCriterion("commodity_price =", value, "commodityPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityPriceNotEqualTo(BigDecimal value) {
+			addCriterion("commodity_price <>", value, "commodityPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityPriceGreaterThan(BigDecimal value) {
+			addCriterion("commodity_price >", value, "commodityPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityPriceGreaterThanOrEqualTo(BigDecimal value) {
+			addCriterion("commodity_price >=", value, "commodityPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityPriceLessThan(BigDecimal value) {
+			addCriterion("commodity_price <", value, "commodityPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityPriceLessThanOrEqualTo(BigDecimal value) {
+			addCriterion("commodity_price <=", value, "commodityPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityPriceIn(List<BigDecimal> values) {
+			addCriterion("commodity_price in", values, "commodityPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityPriceNotIn(List<BigDecimal> values) {
+			addCriterion("commodity_price not in", values, "commodityPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityPriceBetween(BigDecimal value1, BigDecimal value2) {
+			addCriterion("commodity_price between", value1, value2, "commodityPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityPriceNotBetween(BigDecimal value1, BigDecimal value2) {
+			addCriterion("commodity_price not between", value1, value2, "commodityPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityTypeIsNull() {
+			addCriterion("commodity_type is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityTypeIsNotNull() {
+			addCriterion("commodity_type is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityTypeEqualTo(Integer value) {
+			addCriterion("commodity_type =", value, "commodityType");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityTypeNotEqualTo(Integer value) {
+			addCriterion("commodity_type <>", value, "commodityType");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityTypeGreaterThan(Integer value) {
+			addCriterion("commodity_type >", value, "commodityType");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityTypeGreaterThanOrEqualTo(Integer value) {
+			addCriterion("commodity_type >=", value, "commodityType");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityTypeLessThan(Integer value) {
+			addCriterion("commodity_type <", value, "commodityType");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityTypeLessThanOrEqualTo(Integer value) {
+			addCriterion("commodity_type <=", value, "commodityType");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityTypeIn(List<Integer> values) {
+			addCriterion("commodity_type in", values, "commodityType");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityTypeNotIn(List<Integer> values) {
+			addCriterion("commodity_type not in", values, "commodityType");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityTypeBetween(Integer value1, Integer value2) {
+			addCriterion("commodity_type between", value1, value2, "commodityType");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityTypeNotBetween(Integer value1, Integer value2) {
+			addCriterion("commodity_type not between", value1, value2, "commodityType");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityModeIsNull() {
+			addCriterion("commodity_mode is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityModeIsNotNull() {
+			addCriterion("commodity_mode is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityModeEqualTo(String value) {
+			addCriterion("commodity_mode =", value, "commodityMode");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityModeNotEqualTo(String value) {
+			addCriterion("commodity_mode <>", value, "commodityMode");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityModeGreaterThan(String value) {
+			addCriterion("commodity_mode >", value, "commodityMode");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityModeGreaterThanOrEqualTo(String value) {
+			addCriterion("commodity_mode >=", value, "commodityMode");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityModeLessThan(String value) {
+			addCriterion("commodity_mode <", value, "commodityMode");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityModeLessThanOrEqualTo(String value) {
+			addCriterion("commodity_mode <=", value, "commodityMode");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityModeLike(String value) {
+			addCriterion("commodity_mode like", value, "commodityMode");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityModeNotLike(String value) {
+			addCriterion("commodity_mode not like", value, "commodityMode");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityModeIn(List<String> values) {
+			addCriterion("commodity_mode in", values, "commodityMode");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityModeNotIn(List<String> values) {
+			addCriterion("commodity_mode not in", values, "commodityMode");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityModeBetween(String value1, String value2) {
+			addCriterion("commodity_mode between", value1, value2, "commodityMode");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityModeNotBetween(String value1, String value2) {
+			addCriterion("commodity_mode not between", value1, value2, "commodityMode");
+			return (Criteria) this;
+		}
+
+		public Criteria andDiscountPriceIsNull() {
+			addCriterion("discount_price is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andDiscountPriceIsNotNull() {
+			addCriterion("discount_price is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andDiscountPriceEqualTo(BigDecimal value) {
+			addCriterion("discount_price =", value, "discountPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andDiscountPriceNotEqualTo(BigDecimal value) {
+			addCriterion("discount_price <>", value, "discountPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andDiscountPriceGreaterThan(BigDecimal value) {
+			addCriterion("discount_price >", value, "discountPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andDiscountPriceGreaterThanOrEqualTo(BigDecimal value) {
+			addCriterion("discount_price >=", value, "discountPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andDiscountPriceLessThan(BigDecimal value) {
+			addCriterion("discount_price <", value, "discountPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andDiscountPriceLessThanOrEqualTo(BigDecimal value) {
+			addCriterion("discount_price <=", value, "discountPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andDiscountPriceIn(List<BigDecimal> values) {
+			addCriterion("discount_price in", values, "discountPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andDiscountPriceNotIn(List<BigDecimal> values) {
+			addCriterion("discount_price not in", values, "discountPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andDiscountPriceBetween(BigDecimal value1, BigDecimal value2) {
+			addCriterion("discount_price between", value1, value2, "discountPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andDiscountPriceNotBetween(BigDecimal value1, BigDecimal value2) {
+			addCriterion("discount_price not between", value1, value2, "discountPrice");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeIsNull() {
+			addCriterion("create_time is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeIsNotNull() {
+			addCriterion("create_time is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeEqualTo(Date value) {
+			addCriterion("create_time =", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeNotEqualTo(Date value) {
+			addCriterion("create_time <>", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeGreaterThan(Date value) {
+			addCriterion("create_time >", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+			addCriterion("create_time >=", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeLessThan(Date value) {
+			addCriterion("create_time <", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+			addCriterion("create_time <=", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeIn(List<Date> values) {
+			addCriterion("create_time in", values, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeNotIn(List<Date> values) {
+			addCriterion("create_time not in", values, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeBetween(Date value1, Date value2) {
+			addCriterion("create_time between", value1, value2, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+			addCriterion("create_time not between", value1, value2, "createTime");
+			return (Criteria) this;
+		}
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_order_detail
+	 * @mbg.generated  Wed Jan 10 13:43:11 CST 2018
+	 */
+	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 t_order_detail
+     *
+     * @mbg.generated do_not_delete_during_merge Wed Jan 10 11:16:44 CST 2018
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+}

+ 40 - 370
src/main/java/com/goafanti/common/model/TOrderExample.java

@@ -8,23 +8,23 @@ import java.util.List;
 public class TOrderExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public TOrderExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -32,7 +32,7 @@ public class TOrderExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -40,7 +40,7 @@ public class TOrderExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -48,7 +48,7 @@ public class TOrderExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -56,7 +56,7 @@ public class TOrderExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -64,7 +64,7 @@ public class TOrderExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -72,7 +72,7 @@ public class TOrderExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -80,7 +80,7 @@ public class TOrderExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -90,7 +90,7 @@ public class TOrderExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -102,7 +102,7 @@ public class TOrderExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -111,7 +111,7 @@ public class TOrderExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -121,7 +121,7 @@ public class TOrderExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -554,326 +554,6 @@ public class TOrderExample {
 			return (Criteria) this;
 		}
 
-		public Criteria andCommodityIdIsNull() {
-			addCriterion("commodity_id is null");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityIdIsNotNull() {
-			addCriterion("commodity_id is not null");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityIdEqualTo(String value) {
-			addCriterion("commodity_id =", value, "commodityId");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityIdNotEqualTo(String value) {
-			addCriterion("commodity_id <>", value, "commodityId");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityIdGreaterThan(String value) {
-			addCriterion("commodity_id >", value, "commodityId");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityIdGreaterThanOrEqualTo(String value) {
-			addCriterion("commodity_id >=", value, "commodityId");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityIdLessThan(String value) {
-			addCriterion("commodity_id <", value, "commodityId");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityIdLessThanOrEqualTo(String value) {
-			addCriterion("commodity_id <=", value, "commodityId");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityIdLike(String value) {
-			addCriterion("commodity_id like", value, "commodityId");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityIdNotLike(String value) {
-			addCriterion("commodity_id not like", value, "commodityId");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityIdIn(List<String> values) {
-			addCriterion("commodity_id in", values, "commodityId");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityIdNotIn(List<String> values) {
-			addCriterion("commodity_id not in", values, "commodityId");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityIdBetween(String value1, String value2) {
-			addCriterion("commodity_id between", value1, value2, "commodityId");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityIdNotBetween(String value1, String value2) {
-			addCriterion("commodity_id not between", value1, value2, "commodityId");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityQuantityIsNull() {
-			addCriterion("commodity_quantity is null");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityQuantityIsNotNull() {
-			addCriterion("commodity_quantity is not null");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityQuantityEqualTo(Integer value) {
-			addCriterion("commodity_quantity =", value, "commodityQuantity");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityQuantityNotEqualTo(Integer value) {
-			addCriterion("commodity_quantity <>", value, "commodityQuantity");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityQuantityGreaterThan(Integer value) {
-			addCriterion("commodity_quantity >", value, "commodityQuantity");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityQuantityGreaterThanOrEqualTo(Integer value) {
-			addCriterion("commodity_quantity >=", value, "commodityQuantity");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityQuantityLessThan(Integer value) {
-			addCriterion("commodity_quantity <", value, "commodityQuantity");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityQuantityLessThanOrEqualTo(Integer value) {
-			addCriterion("commodity_quantity <=", value, "commodityQuantity");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityQuantityIn(List<Integer> values) {
-			addCriterion("commodity_quantity in", values, "commodityQuantity");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityQuantityNotIn(List<Integer> values) {
-			addCriterion("commodity_quantity not in", values, "commodityQuantity");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityQuantityBetween(Integer value1, Integer value2) {
-			addCriterion("commodity_quantity between", value1, value2, "commodityQuantity");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityQuantityNotBetween(Integer value1, Integer value2) {
-			addCriterion("commodity_quantity not between", value1, value2, "commodityQuantity");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityPriceIsNull() {
-			addCriterion("commodity_price is null");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityPriceIsNotNull() {
-			addCriterion("commodity_price is not null");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityPriceEqualTo(BigDecimal value) {
-			addCriterion("commodity_price =", value, "commodityPrice");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityPriceNotEqualTo(BigDecimal value) {
-			addCriterion("commodity_price <>", value, "commodityPrice");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityPriceGreaterThan(BigDecimal value) {
-			addCriterion("commodity_price >", value, "commodityPrice");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityPriceGreaterThanOrEqualTo(BigDecimal value) {
-			addCriterion("commodity_price >=", value, "commodityPrice");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityPriceLessThan(BigDecimal value) {
-			addCriterion("commodity_price <", value, "commodityPrice");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityPriceLessThanOrEqualTo(BigDecimal value) {
-			addCriterion("commodity_price <=", value, "commodityPrice");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityPriceIn(List<BigDecimal> values) {
-			addCriterion("commodity_price in", values, "commodityPrice");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityPriceNotIn(List<BigDecimal> values) {
-			addCriterion("commodity_price not in", values, "commodityPrice");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityPriceBetween(BigDecimal value1, BigDecimal value2) {
-			addCriterion("commodity_price between", value1, value2, "commodityPrice");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityPriceNotBetween(BigDecimal value1, BigDecimal value2) {
-			addCriterion("commodity_price not between", value1, value2, "commodityPrice");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityTypeIsNull() {
-			addCriterion("commodity_type is null");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityTypeIsNotNull() {
-			addCriterion("commodity_type is not null");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityTypeEqualTo(Integer value) {
-			addCriterion("commodity_type =", value, "commodityType");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityTypeNotEqualTo(Integer value) {
-			addCriterion("commodity_type <>", value, "commodityType");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityTypeGreaterThan(Integer value) {
-			addCriterion("commodity_type >", value, "commodityType");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityTypeGreaterThanOrEqualTo(Integer value) {
-			addCriterion("commodity_type >=", value, "commodityType");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityTypeLessThan(Integer value) {
-			addCriterion("commodity_type <", value, "commodityType");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityTypeLessThanOrEqualTo(Integer value) {
-			addCriterion("commodity_type <=", value, "commodityType");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityTypeIn(List<Integer> values) {
-			addCriterion("commodity_type in", values, "commodityType");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityTypeNotIn(List<Integer> values) {
-			addCriterion("commodity_type not in", values, "commodityType");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityTypeBetween(Integer value1, Integer value2) {
-			addCriterion("commodity_type between", value1, value2, "commodityType");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityTypeNotBetween(Integer value1, Integer value2) {
-			addCriterion("commodity_type not between", value1, value2, "commodityType");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityModeIsNull() {
-			addCriterion("commodity_mode is null");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityModeIsNotNull() {
-			addCriterion("commodity_mode is not null");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityModeEqualTo(String value) {
-			addCriterion("commodity_mode =", value, "commodityMode");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityModeNotEqualTo(String value) {
-			addCriterion("commodity_mode <>", value, "commodityMode");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityModeGreaterThan(String value) {
-			addCriterion("commodity_mode >", value, "commodityMode");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityModeGreaterThanOrEqualTo(String value) {
-			addCriterion("commodity_mode >=", value, "commodityMode");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityModeLessThan(String value) {
-			addCriterion("commodity_mode <", value, "commodityMode");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityModeLessThanOrEqualTo(String value) {
-			addCriterion("commodity_mode <=", value, "commodityMode");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityModeLike(String value) {
-			addCriterion("commodity_mode like", value, "commodityMode");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityModeNotLike(String value) {
-			addCriterion("commodity_mode not like", value, "commodityMode");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityModeIn(List<String> values) {
-			addCriterion("commodity_mode in", values, "commodityMode");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityModeNotIn(List<String> values) {
-			addCriterion("commodity_mode not in", values, "commodityMode");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityModeBetween(String value1, String value2) {
-			addCriterion("commodity_mode between", value1, value2, "commodityMode");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityModeNotBetween(String value1, String value2) {
-			addCriterion("commodity_mode not between", value1, value2, "commodityMode");
-			return (Criteria) this;
-		}
-
 		public Criteria andFirstPaymentIsNull() {
 			addCriterion("first_payment is null");
 			return (Criteria) this;
@@ -1914,80 +1594,70 @@ public class TOrderExample {
 			return (Criteria) this;
 		}
 
-		public Criteria andCommodityNameIsNull() {
-			addCriterion("commodity_name is null");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityNameIsNotNull() {
-			addCriterion("commodity_name is not null");
-			return (Criteria) this;
-		}
-
-		public Criteria andCommodityNameEqualTo(String value) {
-			addCriterion("commodity_name =", value, "commodityName");
+		public Criteria andIsdemandIsNull() {
+			addCriterion("isDemand is null");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommodityNameNotEqualTo(String value) {
-			addCriterion("commodity_name <>", value, "commodityName");
+		public Criteria andIsdemandIsNotNull() {
+			addCriterion("isDemand is not null");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommodityNameGreaterThan(String value) {
-			addCriterion("commodity_name >", value, "commodityName");
+		public Criteria andIsdemandEqualTo(Integer value) {
+			addCriterion("isDemand =", value, "isdemand");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommodityNameGreaterThanOrEqualTo(String value) {
-			addCriterion("commodity_name >=", value, "commodityName");
+		public Criteria andIsdemandNotEqualTo(Integer value) {
+			addCriterion("isDemand <>", value, "isdemand");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommodityNameLessThan(String value) {
-			addCriterion("commodity_name <", value, "commodityName");
+		public Criteria andIsdemandGreaterThan(Integer value) {
+			addCriterion("isDemand >", value, "isdemand");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommodityNameLessThanOrEqualTo(String value) {
-			addCriterion("commodity_name <=", value, "commodityName");
+		public Criteria andIsdemandGreaterThanOrEqualTo(Integer value) {
+			addCriterion("isDemand >=", value, "isdemand");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommodityNameLike(String value) {
-			addCriterion("commodity_name like", value, "commodityName");
+		public Criteria andIsdemandLessThan(Integer value) {
+			addCriterion("isDemand <", value, "isdemand");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommodityNameNotLike(String value) {
-			addCriterion("commodity_name not like", value, "commodityName");
+		public Criteria andIsdemandLessThanOrEqualTo(Integer value) {
+			addCriterion("isDemand <=", value, "isdemand");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommodityNameIn(List<String> values) {
-			addCriterion("commodity_name in", values, "commodityName");
+		public Criteria andIsdemandIn(List<Integer> values) {
+			addCriterion("isDemand in", values, "isdemand");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommodityNameNotIn(List<String> values) {
-			addCriterion("commodity_name not in", values, "commodityName");
+		public Criteria andIsdemandNotIn(List<Integer> values) {
+			addCriterion("isDemand not in", values, "isdemand");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommodityNameBetween(String value1, String value2) {
-			addCriterion("commodity_name between", value1, value2, "commodityName");
+		public Criteria andIsdemandBetween(Integer value1, Integer value2) {
+			addCriterion("isDemand between", value1, value2, "isdemand");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommodityNameNotBetween(String value1, String value2) {
-			addCriterion("commodity_name not between", value1, value2, "commodityName");
+		public Criteria andIsdemandNotBetween(Integer value1, Integer value2) {
+			addCriterion("isDemand not between", value1, value2, "isdemand");
 			return (Criteria) this;
 		}
 	}
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_order
-	 * @mbg.generated  Sat Dec 30 15:36:11 CST 2017
+	 * @mbg.generated  Wed Jan 10 12:36:22 CST 2018
 	 */
 	public static class Criterion {
 		private String condition;

+ 12 - 50
src/main/java/com/goafanti/order/bo/OrderDetailBo.java

@@ -1,22 +1,12 @@
 package com.goafanti.order.bo;
 
-public class OrderDetailBo {
+import java.util.List;
+
+public class C2BOrderDetailBo{
 	/** 订单编号 **/
 	private String orderNo;
-	/** 商品id **/
-	private String commodityId;
-	/** 商品名称 **/
-	private String commodityName;
-	/** 商品单价 **/
-	private String commodityPrice;
-	/** 商品数量 **/
-	private Integer commodityQuantity; 
-	/** 商品型号 **/
-	private String commodityMode;
 	/** 首付金 **/
 	private String firstPayment;
-	/** 商品类型 **/
-	private Integer commodityType;
 	/** 订单创建时间 **/
 	private String createTime;
 	/** 订单金额 **/
@@ -29,6 +19,8 @@ public class OrderDetailBo {
 	private String sellerId;
 	/** 订单状态 **/
 	private String orderStatus;
+	/** 商品信息 **/
+	private List<CommodityDetailBo> commoditys;
 	/** 可操作订单 **/
 	private OperatorActive operatorActive;
 	public String getOrderNo() {
@@ -37,48 +29,12 @@ public class OrderDetailBo {
 	public void setOrderNo(String orderNo) {
 		this.orderNo = orderNo;
 	}
-	public String getCommodityId() {
-		return commodityId;
-	}
-	public void setCommodityId(String commodityId) {
-		this.commodityId = commodityId;
-	}
-	public String getCommodityName() {
-		return commodityName;
-	}
-	public void setCommodityName(String commodityName) {
-		this.commodityName = commodityName;
-	}
-	public String getCommodityPrice() {
-		return commodityPrice;
-	}
-	public void setCommodityPrice(String commodityPrice) {
-		this.commodityPrice = commodityPrice;
-	}
-	public Integer getCommodityQuantity() {
-		return commodityQuantity;
-	}
-	public void setCommodityQuantity(Integer commodityQuantity) {
-		this.commodityQuantity = commodityQuantity;
-	}
-	public String getCommodityMode() {
-		return commodityMode;
-	}
-	public void setCommodityMode(String commodityMode) {
-		this.commodityMode = commodityMode;
-	}
 	public String getFirstPayment() {
 		return firstPayment;
 	}
 	public void setFirstPayment(String firstPayment) {
 		this.firstPayment = firstPayment;
 	}
-	public Integer getCommodityType() {
-		return commodityType;
-	}
-	public void setCommodityType(Integer commodityType) {
-		this.commodityType = commodityType;
-	}
 	public String getCreateTime() {
 		return createTime;
 	}
@@ -115,10 +71,16 @@ public class OrderDetailBo {
 	public void setOrderStatus(String orderStatus) {
 		this.orderStatus = orderStatus;
 	}
+	public List<CommodityDetailBo> getCommoditys() {
+		return commoditys;
+	}
+	public void setCommoditys(List<CommodityDetailBo> commoditys) {
+		this.commoditys = commoditys;
+	}
 	public OperatorActive getOperatorActive() {
 		return operatorActive;
 	}
 	public void setOperatorActive(OperatorActive operatorActive) {
 		this.operatorActive = operatorActive;
 	}
-}
+}

+ 76 - 0
src/main/java/com/goafanti/order/bo/C2COrderDetailBo.java

@@ -0,0 +1,76 @@
+package com.goafanti.order.bo;
+
+public class C2COrderDetailBo extends CommodityDetailBo{
+	/** 订单编号 **/
+	private String orderNo;
+	/** 首付金 **/
+	private String firstPayment;
+	/** 订单创建时间 **/
+	private String createTime;
+	/** 订单金额 **/
+	private String orderAmount;
+	/** 订单留言 **/
+	private String orderRemarks;
+	/** 商品简介 **/
+	private String introduction;
+	/** 卖方id **/
+	private String sellerId;
+	/** 订单状态 **/
+	private String orderStatus;
+	/** 可操作订单 **/
+	private OperatorActive operatorActive;
+	public String getOrderNo() {
+		return orderNo;
+	}
+	public void setOrderNo(String orderNo) {
+		this.orderNo = orderNo;
+	}
+	public String getFirstPayment() {
+		return firstPayment;
+	}
+	public void setFirstPayment(String firstPayment) {
+		this.firstPayment = firstPayment;
+	}
+	public String getCreateTime() {
+		return createTime;
+	}
+	public void setCreateTime(String createTime) {
+		this.createTime = createTime;
+	}
+	public String getOrderAmount() {
+		return orderAmount;
+	}
+	public void setOrderAmount(String orderAmount) {
+		this.orderAmount = orderAmount;
+	}
+	public String getOrderRemarks() {
+		return orderRemarks;
+	}
+	public void setOrderRemarks(String orderRemarks) {
+		this.orderRemarks = orderRemarks;
+	}
+	public String getIntroduction() {
+		return introduction;
+	}
+	public void setIntroduction(String introduction) {
+		this.introduction = introduction;
+	}
+	public String getSellerId() {
+		return sellerId;
+	}
+	public void setSellerId(String sellerId) {
+		this.sellerId = sellerId;
+	}
+	public String getOrderStatus() {
+		return orderStatus;
+	}
+	public void setOrderStatus(String orderStatus) {
+		this.orderStatus = orderStatus;
+	}
+	public OperatorActive getOperatorActive() {
+		return operatorActive;
+	}
+	public void setOperatorActive(OperatorActive operatorActive) {
+		this.operatorActive = operatorActive;
+	}
+}

+ 68 - 0
src/main/java/com/goafanti/order/bo/CommodityDetailBo.java

@@ -0,0 +1,68 @@
+package com.goafanti.order.bo;
+
+public class CommodityDetailBo {
+	/** 商品id **/
+	private String commodityId;
+	/** 商品名称 **/
+	private String commodityName;
+	/** 商品单价 **/
+	private String commodityPrice;
+	/** 商品数量 **/
+	private Integer commodityQuantity; 
+	/** 商品型号 **/
+	private String commodityMode;
+	/** 商品类型 **/
+	private Integer commodityType;
+	/** 商品实价 **/
+	private String discountPrice;
+	/** 卖方ID **/
+	private String sellerId;
+	public String getCommodityId() {
+		return commodityId;
+	}
+	public void setCommodityId(String commodityId) {
+		this.commodityId = commodityId;
+	}
+	public String getCommodityName() {
+		return commodityName;
+	}
+	public void setCommodityName(String commodityName) {
+		this.commodityName = commodityName;
+	}
+	public String getCommodityPrice() {
+		return commodityPrice;
+	}
+	public void setCommodityPrice(String commodityPrice) {
+		this.commodityPrice = commodityPrice;
+	}
+	public Integer getCommodityQuantity() {
+		return commodityQuantity;
+	}
+	public void setCommodityQuantity(Integer commodityQuantity) {
+		this.commodityQuantity = commodityQuantity;
+	}
+	public String getCommodityMode() {
+		return commodityMode;
+	}
+	public void setCommodityMode(String commodityMode) {
+		this.commodityMode = commodityMode;
+	}
+	public Integer getCommodityType() {
+		return commodityType;
+	}
+	public void setCommodityType(Integer commodityType) {
+		this.commodityType = commodityType;
+	}
+	public String getDiscountPrice() {
+		return discountPrice;
+	}
+	public void setDiscountPrice(String discountPrice) {
+		this.discountPrice = discountPrice;
+	}
+	public String getSellerId() {
+		return sellerId;
+	}
+	public void setSellerId(String sellerId) {
+		this.sellerId = sellerId;
+	}
+}

+ 5 - 4
src/main/java/com/goafanti/order/service/OrderService.java

@@ -5,7 +5,8 @@ import java.text.ParseException;
 
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.order.bo.FundingListBo;
-import com.goafanti.order.bo.OrderDetailBo;
+import com.goafanti.order.bo.C2BOrderDetailBo;
+import com.goafanti.order.bo.C2COrderDetailBo;
 
 public interface OrderService {
 	
@@ -15,7 +16,7 @@ public interface OrderService {
 	 * @param orderType 订单类型
 	 * @return
 	 */
-	OrderDetailBo selectCommodityDetail(String commodityId,Integer orderType);
+	C2COrderDetailBo selectCommodityDetail(String commodityId,Integer orderType);
 
 	/**
 	 * 添加意向
@@ -53,14 +54,14 @@ public interface OrderService {
 	 * @param confirm 是否
 	 * @return
 	 */
-	Pagination<OrderDetailBo> selectOrderList(boolean confirm,Integer pageNo,Integer PageSize);
+	Pagination<C2BOrderDetailBo> selectOrderList(boolean confirm,Integer pageNo,Integer PageSize);
 
 	/**
 	 * 查询订单详情
 	 * @param orderNo
 	 * @return
 	 */
-	OrderDetailBo selectOrderDetail(Long orderNo);
+	C2BOrderDetailBo selectOrderDetail(Long orderNo);
 
 	/**
 	 * 查询流水记录

+ 91 - 51
src/main/java/com/goafanti/order/service/impl/OrderServiceImpl.java

@@ -1,5 +1,6 @@
 package com.goafanti.order.service.impl;
 
+import java.lang.reflect.InvocationTargetException;
 import java.math.BigDecimal;
 import java.text.ParseException;
 import java.util.ArrayList;
@@ -9,6 +10,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
+import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -18,11 +20,13 @@ import com.goafanti.common.bo.Error;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.dao.TFundingRecordsMapper;
+import com.goafanti.common.dao.TOrderDetailMapper;
 import com.goafanti.common.dao.TOrderMapper;
 import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.TFundingRecords;
 import com.goafanti.common.model.TOrder;
+import com.goafanti.common.model.TOrderDetail;
 import com.goafanti.common.model.User;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.DecimalCalculate;
@@ -31,8 +35,10 @@ import com.goafanti.core.mybatis.JDBCIdGenerator;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.order.bo.FundingListBo;
+import com.goafanti.order.bo.CommodityDetailBo;
 import com.goafanti.order.bo.OperatorActive;
-import com.goafanti.order.bo.OrderDetailBo;
+import com.goafanti.order.bo.C2BOrderDetailBo;
+import com.goafanti.order.bo.C2COrderDetailBo;
 import com.goafanti.order.enums.AuditState;
 import com.goafanti.order.enums.CommodityType;
 import com.goafanti.order.enums.IntentionSate;
@@ -53,6 +59,8 @@ public class OrderServiceImpl extends BaseMybatisDao<TOrderMapper> implements Or
 	@Autowired
 	private TOrderMapper tOrderMapper;
 	@Autowired
+	private TOrderDetailMapper tOrderDetailMapper;
+	@Autowired
 	private JDBCIdGenerator	idGenerator;
 	@Autowired
 	private TFundingRecordsMapper tFundingRecordsMapper;
@@ -63,35 +71,44 @@ public class OrderServiceImpl extends BaseMybatisDao<TOrderMapper> implements Or
 	private final double DEFAULT_BROKERAGE_PROPORTION = 0; //佣金比例
 	private final double DEFAULT_COMMODITY_DISCOUNT = 1; //折扣比例
 	private final String DEFAULT_COMMODITY_MODE = "NO_MODE"; //暂无规格
+	private final String DEFAULT_CREATER = "PLATFORM";//平台方
 	@Override
-	public OrderDetailBo selectCommodityDetail(String commodityId, Integer commodityType) {
-		OrderDetailBo bo = tOrderMapper.selectCommodityDetail(commodityId,commodityType);
-		bo.setOrderNo(String.valueOf(idGenerator.generateId()));
-		bo.setCreateTime(DateUtils.formatDate(new Date(),AFTConstants.YYYYMMDDHHMMSS));
-		bo.setCommodityType(commodityType);
-		if(bo.getCommodityPrice().equals("0"))
-			bo.setCommodityPrice("面议");
-		else
-			bo.setCommodityPrice(bo.getCommodityPrice()+" 万");
-		if(StringUtils.isBlank(bo.getFirstPayment())) 
-			bo.setFirstPayment("面议");
-		else 
-			bo.setFirstPayment(bo.getFirstPayment()+" 万");
+	public C2COrderDetailBo selectCommodityDetail(String commodityId, Integer commodityType) {
+		C2COrderDetailBo bo = new C2COrderDetailBo();
+		CommodityDetailBo cdb = tOrderMapper.selectCommodityDetail(commodityId,commodityType);
+		try {
+			BeanUtils.copyProperties(bo, cdb);
+			bo.setOrderNo(String.valueOf(idGenerator.generateId()));
+			bo.setCreateTime(DateUtils.formatDate(new Date(),AFTConstants.YYYYMMDDHHMMSS));
+			bo.setCommodityType(commodityType);
+			if(bo.getCommodityPrice().equals("0"))
+				bo.setCommodityPrice("面议");
+			else
+				bo.setCommodityPrice(bo.getCommodityPrice()+" 万");
+			if(StringUtils.isBlank(bo.getFirstPayment())) 
+				bo.setFirstPayment("面议");
+			else 
+				bo.setFirstPayment(bo.getFirstPayment()+" 万");
+		} catch (IllegalAccessException | InvocationTargetException e) {
+			e.printStackTrace();
+		}
 		return bo;
 	}
 
+	/**
+	 * 后期规则:自营服务订单 、需求订单、其他订单不能同时加入购物车
+	 */
 	@Override
 	public int addIntention(Long orderNo, String commodityId, String commodityMode, Integer commodityQuantity,Integer commodityType, 
 			String createTime,String remarks) throws ParseException {
-		OrderDetailBo bo =  tOrderMapper.selectCommodityDetail(commodityId,commodityType);
+		CommodityDetailBo bo =  tOrderMapper.selectCommodityDetail(commodityId,commodityType);
 		BigDecimal commodityPrice = StringUtils.isBlank(bo.getCommodityPrice()) ? DEFAULT_COMMODITY_PRICE 
-				: new BigDecimal(DecimalCalculate.mul(Double.valueOf(bo.getCommodityPrice()),DEFAULT_COMMODITY_DISCOUNT));
-		BigDecimal orderAmount = new BigDecimal(DecimalCalculate.mul(commodityPrice.doubleValue(),Double.valueOf(String.valueOf(commodityQuantity))));
+				: new BigDecimal(Double.valueOf(bo.getCommodityPrice()));
+		BigDecimal discountPrice = new BigDecimal(DecimalCalculate.mul(commodityPrice.doubleValue(),DEFAULT_COMMODITY_DISCOUNT));
+		BigDecimal orderAmount = new BigDecimal(DecimalCalculate.mul(discountPrice.doubleValue(),Double.valueOf(String.valueOf(commodityQuantity))));
 		TOrder tOrder = new TOrder();
-		tOrder.setOrderNo(orderNo);
-		tOrder.setCommodityId(commodityId);
-		tOrder.setCommodityName(bo.getCommodityName());
-		tOrder.setCreater(TokenManager.getUserToken().getNickname());
+		tOrder.setOrderNo(orderNo);	
+		tOrder.setCreater(DEFAULT_CREATER);
 		tOrder.setCreateTime(DateUtils.parseDate(createTime, AFTConstants.YYYYMMDDHHMMSS));
 		if(commodityType == CommodityType.DEMAND_PROVIDE.getTypeCode()){
 			tOrder.setBuyerId(StringUtils.isBlank(bo.getSellerId()) ? DEFAULT_PLATFORM_ID : bo.getSellerId());
@@ -100,18 +117,26 @@ public class OrderServiceImpl extends BaseMybatisDao<TOrderMapper> implements Or
 			tOrder.setBuyerId(TokenManager.getUserId());
 			tOrder.setSellerId(StringUtils.isBlank(bo.getSellerId()) ? DEFAULT_PLATFORM_ID : bo.getSellerId());
 		}
-		tOrder.setCommodityMode(StringUtils.isBlank(commodityMode)?DEFAULT_COMMODITY_MODE: commodityMode);
-		tOrder.setCommodityType(commodityType);
-		tOrder.setCommodityQuantity(commodityQuantity);
 		tOrder.setBrokerageProportion(new BigDecimal(DEFAULT_BROKERAGE_PROPORTION));
-		tOrder.setBrokerageAmount(new BigDecimal(DecimalCalculate.mul(commodityPrice.doubleValue(), DEFAULT_BROKERAGE_PROPORTION)));
+		tOrder.setBrokerageAmount(new BigDecimal(DecimalCalculate.mul(discountPrice.doubleValue(), DEFAULT_BROKERAGE_PROPORTION)));
 		tOrder.setFirstPayment(DEFAULT_FIRST_PAYMENT);
-		tOrder.setCommodityPrice(commodityPrice);
 		tOrder.setOrderAmount(orderAmount);
 		tOrder.setOrderRemarks(remarks);
 		tOrder.setDeleteSign(Boolean.FALSE);
 		tOrder.setOrderChannel(OrderChannel.APP.getCode());
+		tOrder.setIsdemand(commodityType == CommodityType.DEMAND_PROVIDE.getTypeCode() ? AFTConstants.YES : AFTConstants.NO);
 		setOrderState(OrderAction.ADD_INTENTION, new BigDecimal(0), tOrder, false);
+		
+		TOrderDetail tOrderDetail = new TOrderDetail();
+		tOrderDetail.setOrderNo(orderNo);
+		tOrderDetail.setCommodityId(commodityId);
+		tOrderDetail.setCommodityName(bo.getCommodityName());
+		tOrderDetail.setCommodityMode(StringUtils.isBlank(commodityMode)?DEFAULT_COMMODITY_MODE: commodityMode);
+		tOrderDetail.setCommodityType(commodityType);
+		tOrderDetail.setCommodityQuantity(commodityQuantity);
+		tOrderDetail.setCommodityPrice(commodityPrice);
+		tOrderDetail.setDiscountPrice(discountPrice);
+		tOrderDetailMapper.insert(tOrderDetail);
 		tOrderMapper.insert(tOrder);
 		return 1;
 	}
@@ -322,7 +347,7 @@ public class OrderServiceImpl extends BaseMybatisDao<TOrderMapper> implements Or
 						&& tOrder.getPaymentStatus() == PaymentState.WAIT_PAY_FIRST_BALANCE.getCode()
 						&& tOrder.getLiquidationStatus() == LiquidationSate.WAIT_FOR_PAY.getCode()) {
 					/** 需求订单 开始 **/
-					if (tOrder.getCommodityType() == CommodityType.DEMAND_PROVIDE.getTypeCode()) {
+					if (tOrder.getIsdemand() == AFTConstants.YES) {
 						active.setConfirmIntention(true);
 						active.setRefuseIntention(true);
 					} else {
@@ -353,7 +378,7 @@ public class OrderServiceImpl extends BaseMybatisDao<TOrderMapper> implements Or
 					active.setPayForLast(false);
 				}
 				boolean flag = true;
-				if (tOrder.getCommodityType() == CommodityType.DEMAND_PROVIDE.getTypeCode()) { //需求订单
+				if (tOrder.getIsdemand() == AFTConstants.YES) { //需求订单
 					if(tOrder.getOrderStatus() == OrderState.INTENTION.getCode()
 							|| tOrder.getIntentionStatus() == IntentionSate.WAIT_SELLER_CONFIRM.getCode()
 							|| tOrder.getTradingStatus() == TradingState.WAIT_FOR_TRADE.getCode()){
@@ -388,7 +413,7 @@ public class OrderServiceImpl extends BaseMybatisDao<TOrderMapper> implements Or
 						&& tOrder.getPaymentStatus() == PaymentState.WAIT_PAY_FIRST_BALANCE.getCode()
 						&& tOrder.getLiquidationStatus() == LiquidationSate.WAIT_FOR_PAY.getCode()) {
 					/** 需求订单  开始**/
-					if(tOrder.getCommodityType() == CommodityType.DEMAND_PROVIDE.getTypeCode()){ 
+					if(tOrder.getIsdemand() == AFTConstants.YES){ 
 						active.setConfirmIntention(false);
 						active.setRefuseIntention(false);
 					}else{
@@ -508,31 +533,40 @@ public class OrderServiceImpl extends BaseMybatisDao<TOrderMapper> implements Or
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<OrderDetailBo> selectOrderList(boolean confirm,Integer pageNo,Integer pageSize) {
+	public Pagination<C2BOrderDetailBo> selectOrderList(boolean confirm,Integer pageNo,Integer pageSize) {
 		Map<String, Object> params = new HashMap<String, Object>();
-		Pagination<OrderDetailBo> result = new Pagination<OrderDetailBo>();
+		Pagination<C2BOrderDetailBo> result = new Pagination<C2BOrderDetailBo>();
 		if(!confirm) params.put("intentionStatus", IntentionSate.WAIT_SELLER_CONFIRM.getCode()); //购买意向
 		params.put("uid", TokenManager.getUserId());
 		Pagination<TOrder> data = (Pagination<TOrder>)findPage("selectOrderListByPage", "selectOrderListCount", params, pageNo, pageSize);
 		List<TOrder> list = (List<TOrder>)data.getList();
-		OrderDetailBo bo = null;
-		List<OrderDetailBo> boList = new ArrayList<OrderDetailBo>(); 
+		C2BOrderDetailBo bo = null;
+		List<C2BOrderDetailBo> boList = new ArrayList<C2BOrderDetailBo>(); 
+		List<CommodityDetailBo> commoditys = new ArrayList<CommodityDetailBo>();
+		CommodityDetailBo cdb = null;
 		if(list.size()>0){
 			for(TOrder t:list){
-				bo = new OrderDetailBo();
+				bo = new C2BOrderDetailBo();
 				bo.setOrderNo(String.valueOf(t.getOrderNo()));
-				bo.setCommodityName(t.getCommodityName());
-				bo.setCommodityQuantity(t.getCommodityQuantity());
-				bo.setCommodityMode(t.getCommodityMode());
-				bo.setCommodityId(t.getCommodityId());
 				bo.setOrderRemarks(t.getOrderRemarks());
-				bo.setCommodityType(t.getCommodityType());
 				bo.setOrderStatus(OrderState.getStatus(t.getOrderStatus()).getDesc());
 				bo.setCreateTime(DateUtils.formatDate(t.getCreateTime(),AFTConstants.YYYYMMDDHHMMSS));
-				bo.setCommodityPrice(String.valueOf(t.getCommodityPrice()).equals("0")?"面议":String.valueOf(t.getCommodityPrice())+" 万");
 				bo.setOrderAmount(String.valueOf(t.getOrderAmount()).equals("0")?"面议":String.valueOf(t.getOrderAmount())+" 万");
 				bo.setFirstPayment(String.valueOf(t.getFirstPayment()).equals("0")?"面议":String.valueOf(t.getFirstPayment())+" 万");
 				bo.setOperatorActive(setOperatorActive(t));
+				List<TOrderDetail> tdList = tOrderMapper.selectOrderCommodity(String.valueOf(t.getOrderNo()));
+				for(TOrderDetail tod : tdList ){
+					cdb = new CommodityDetailBo();
+					cdb.setCommodityPrice(String.valueOf(tod.getCommodityPrice()).equals("0")?"面议":String.valueOf(tod.getCommodityPrice())+" 万");
+					cdb.setDiscountPrice(String.valueOf(tod.getDiscountPrice()).equals("0")?"面议":String.valueOf(tod.getDiscountPrice())+" 万");
+					cdb.setCommodityId(tod.getCommodityId());
+					cdb.setCommodityName(tod.getCommodityName());
+					cdb.setCommodityMode(tod.getCommodityMode());
+					cdb.setCommodityType(tod.getCommodityType());
+					cdb.setCommodityQuantity(tod.getCommodityQuantity());
+					commoditys.add(cdb);
+				}
+				bo.setCommoditys(commoditys);
 				boList.add(bo);
 			}
 		}
@@ -545,22 +579,31 @@ public class OrderServiceImpl extends BaseMybatisDao<TOrderMapper> implements Or
 	}
 
 	@Override
-	public OrderDetailBo selectOrderDetail(Long orderNo) {
+	public C2BOrderDetailBo selectOrderDetail(Long orderNo) {
 		TOrder t = tOrderMapper.selectByPrimaryKey(orderNo);
-		OrderDetailBo bo = new OrderDetailBo();
+		C2BOrderDetailBo bo = new C2BOrderDetailBo();
 		bo.setOrderNo(String.valueOf(t.getOrderNo()));
-		bo.setCommodityName(t.getCommodityName());
-		bo.setCommodityQuantity(t.getCommodityQuantity());
-		bo.setCommodityMode(t.getCommodityMode());
-		bo.setCommodityId(t.getCommodityId());
-		bo.setCommodityType(t.getCommodityType());
 		bo.setOrderRemarks(t.getOrderRemarks());
 		bo.setOrderStatus(OrderState.getStatus(t.getOrderStatus()).getDesc());
 		bo.setCreateTime(DateUtils.formatDate(t.getCreateTime(),AFTConstants.YYYYMMDDHHMMSS));
-		bo.setCommodityPrice(String.valueOf(t.getCommodityPrice()).equals("0")?"面议":String.valueOf(t.getCommodityPrice())+" 万");
 		bo.setOrderAmount(String.valueOf(t.getOrderAmount()).equals("0")?"面议":String.valueOf(t.getOrderAmount())+" 万");
 		bo.setFirstPayment(String.valueOf(t.getFirstPayment()).equals("0")?"面议":String.valueOf(t.getFirstPayment())+" 万");
 		bo.setOperatorActive(setOperatorActive(t));
+		List<CommodityDetailBo> commoditys = new ArrayList<CommodityDetailBo>();
+		CommodityDetailBo cdb = null;
+		List<TOrderDetail> tdList = tOrderMapper.selectOrderCommodity(String.valueOf(t.getOrderNo()));
+		for(TOrderDetail tod : tdList ){
+			cdb = new CommodityDetailBo();
+			cdb.setCommodityPrice(String.valueOf(tod.getCommodityPrice()).equals("0")?"面议":String.valueOf(tod.getCommodityPrice())+" 万");
+			cdb.setDiscountPrice(String.valueOf(tod.getDiscountPrice()).equals("0")?"面议":String.valueOf(tod.getDiscountPrice())+" 万");
+			cdb.setCommodityId(tod.getCommodityId());
+			cdb.setCommodityName(tod.getCommodityName());
+			cdb.setCommodityMode(tod.getCommodityMode());
+			cdb.setCommodityType(tod.getCommodityType());
+			cdb.setCommodityQuantity(tod.getCommodityQuantity());
+			commoditys.add(cdb);
+		}
+		bo.setCommoditys(commoditys);
 		return bo;
 	}
 
@@ -572,11 +615,8 @@ public class OrderServiceImpl extends BaseMybatisDao<TOrderMapper> implements Or
 		params.put("uid", TokenManager.getUserId());
 		Pagination<FundingListBo> data = (Pagination<FundingListBo>)findPage("selectFundingHistoryByPage","selectFundingHistoryCount", params, pageNo, pageSize);
 		List<FundingListBo> list = (List<FundingListBo>)data.getList();
-		OrderDetailBo odBo = null;
 		if(list.size()>0){
 			for(FundingListBo bo:list){
-				odBo = tOrderMapper.selectCommodityDetail(bo.getCommodityId(),bo.getCommodityType());
-				bo.setCommodityName(odBo.getCommodityName());
 				bo.setBusinessDesc(setBusinessDesc(bo.getTransactionSubject(),bo.getTransactionAmount()));
 			}
 		}

+ 16 - 0
src/main/java/com/goafanti/permission/bo/Menu.java

@@ -0,0 +1,16 @@
+package com.goafanti.permission.bo;
+
+import java.util.List;
+
+public class Menu extends SubMenu{
+	private List<SubMenu> subMenus;
+
+	public List<SubMenu> getSubMenus() {
+		return subMenus;
+	}
+
+	public void setSubMenus(List<SubMenu> subMenus) {
+		this.subMenus = subMenus;
+	}
+	
+}

+ 30 - 0
src/main/java/com/goafanti/permission/bo/Navigation.java

@@ -0,0 +1,30 @@
+package com.goafanti.permission.bo;
+
+/**
+ * 导航
+ * @author Administrator
+ *
+ */
+public class Navigation {
+	private String id;
+	private String name;
+	private String url;
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getUrl() {
+		return url;
+	}
+	public void setUrl(String url) {
+		this.url = url;
+	}
+}

+ 25 - 0
src/main/java/com/goafanti/permission/bo/SubMenu.java

@@ -0,0 +1,25 @@
+package com.goafanti.permission.bo;
+
+public class SubMenu {
+	private String id;
+	private String name;
+	private String url;
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getUrl() {
+		return url;
+	}
+	public void setUrl(String url) {
+		this.url = url;
+	}
+}

+ 32 - 0
src/main/java/com/goafanti/permission/controller/NewPermissionApiController.java

@@ -8,11 +8,13 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
 import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
 import com.goafanti.common.dao.PermissionMapper;
 import com.goafanti.common.model.Permission;
 import com.goafanti.common.utils.StringUtils;
+import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.permission.service.PermissionService;
 
 @RestController
@@ -148,4 +150,34 @@ public class NewPermissionApiController extends BaseApiController {
 		return res;
 	}
 	
+	/**
+	 * 查询导航
+	 * @param navId 导航
+	 * @return
+	 */
+	@RequestMapping(value = "/selectNavList",method=RequestMethod.GET)
+	public Result selectNavList(){
+		Result res = new Result();
+		if(TokenManager.hasRole(AFTConstants.SUPERADMIN))
+			res.setData(permissionService.selectNavList(null));
+		else
+			res.setData(permissionService.selectNavList(TokenManager.getAdminId()));
+		return res;
+	}
+	
+	/**
+	 * 查询菜单
+	 * @param navId
+	 * @return
+	 */
+	@RequestMapping(value = "/selectMenuList",method=RequestMethod.GET)
+	public Result selectMenuList(String navId){
+		Result res = new Result();
+		if(StringUtils.isBlank(navId)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"导航栏编号"));
+			return res;
+		}
+		res.setData(permissionService.selectMenuList(navId));
+		return res;
+	}
 }

+ 5 - 0
src/main/java/com/goafanti/permission/service/PermissionService.java

@@ -5,6 +5,8 @@ import java.util.Map;
 import java.util.Set;
 
 import com.goafanti.common.model.Permission;
+import com.goafanti.permission.bo.Menu;
+import com.goafanti.permission.bo.Navigation;
 
 public interface PermissionService {
 
@@ -32,5 +34,8 @@ public interface PermissionService {
 	int updateById(Permission record);
 	
 	Map<String,Object> findPermissionsAll();
+	
+	List<Navigation> selectNavList(String aid);
 
+	List<Menu> selectMenuList(String superId);
 }

+ 33 - 1
src/main/java/com/goafanti/permission/service/impl/PermissionServiceImpl.java

@@ -1,5 +1,7 @@
 package com.goafanti.permission.service.impl;
 
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -7,6 +9,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 
+import org.apache.commons.beanutils.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -18,7 +21,10 @@ import com.goafanti.common.model.Permission;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.permission.service.PermissionService;
+import com.goafanti.permission.bo.Menu;
+import com.goafanti.permission.bo.Navigation;
 import com.goafanti.permission.bo.PermissionBo;
+import com.goafanti.permission.bo.SubMenu;
 
 @Service
 public class PermissionServiceImpl extends BaseMybatisDao<PermissionMapper> implements PermissionService {
@@ -298,6 +304,32 @@ public class PermissionServiceImpl extends BaseMybatisDao<PermissionMapper> impl
 		return params;
 	}
 	
-	
+	@Override
+	public List<Navigation> selectNavList(String aid){
+		return permissionMapper.selectNavList(aid);
+	}
+
+	@Override
+	public List<Menu> selectMenuList(String superId) {
+		List<SubMenu> subMenus = permissionMapper.selectMenuList(superId);
+		List<Menu> menus = new ArrayList<Menu>();
+		try {
+			Menu m = null;
+			for(SubMenu sm: subMenus){
+				m = new Menu();
+				BeanUtils.copyProperties(m, sm);
+				menus.add(m);
+			}
+			if(menus != null && menus.size()>0){
+				for(Menu menu: menus){
+					subMenus = permissionMapper.selectMenuList(menu.getId());
+					menu.setSubMenus(subMenus);
+				}
+			}
+		} catch (IllegalAccessException | InvocationTargetException e) {
+			e.printStackTrace();
+		}
+		return menus;
+	}
 
 }

+ 2 - 2
src/main/resources/shiro_base_auth.ini

@@ -10,8 +10,8 @@
 /admin/login.html=anon
 /admin/set.html=admin
 /admin/index.html=admin
-/app/mlogin=anon
-/app/mregister=anon
+/mlogin=anon
+/mregister=anon
 /signin=anon
 /managesignin=anon
 /register=anon