Browse Source

Merge branch 'master' of http://git.ds-bay.com/project/kmall-pt

csk 6 years ago
parent
commit
bfe934e68d
100 changed files with 5900 additions and 434 deletions
  1. 73 0
      kmall-admin/src/main/java/com/kmall/admin/entity/GoodsEntity.java
  2. 72 0
      kmall-admin/src/main/java/com/kmall/admin/entity/ProductStoreRelaEntity.java
  3. 2 2
      kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsServiceImpl.java
  4. 4 4
      kmall-admin/src/main/resources/conf/db.properties
  5. 42 20
      kmall-admin/src/main/resources/mybatis/mapper/GoodsDao.xml
  6. 72 2
      kmall-admin/src/main/resources/mybatis/mapper/ProductStoreRelaDao.xml
  7. 77 6
      kmall-admin/src/main/resources/mybatis/mapper/StoreDao.xml
  8. 20 6
      kmall-api/src/main/java/com/kmall/api/api/ApiAuthController.java
  9. 108 14
      kmall-api/src/main/java/com/kmall/api/api/ApiCartController.java
  10. 31 9
      kmall-api/src/main/java/com/kmall/api/api/ApiCouponController.java
  11. 6 4
      kmall-api/src/main/java/com/kmall/api/api/ApiGoodsController.java
  12. 3 0
      kmall-api/src/main/java/com/kmall/api/api/ApiGoodsGroupController.java
  13. 32 6
      kmall-api/src/main/java/com/kmall/api/api/ApiIndexController.java
  14. 22 16
      kmall-api/src/main/java/com/kmall/api/api/ApiPayController.java
  15. 34 9
      kmall-api/src/main/java/com/kmall/api/api/ApiUserController.java
  16. 8 1
      kmall-api/src/main/java/com/kmall/api/cache/UserTokenCache.java
  17. 237 0
      kmall-api/src/main/java/com/kmall/api/contants/Dict.java
  18. 7 1
      kmall-api/src/main/java/com/kmall/api/dao/ApiCartMapper.java
  19. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiCommentMapper.java
  20. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiCommentPictureMapper.java
  21. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiCouponMapper.java
  22. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiGoodsGroupOpenDetailMapper.java
  23. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiGoodsGroupOpenMapper.java
  24. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiGoodsMapper.java
  25. 6 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiOrderGoodsMapper.java
  26. 5 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiOrderMapper.java
  27. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiProductMapper.java
  28. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiSysPrinterMapper.java
  29. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiUserCouponMapper.java
  30. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiUserLevelMapper.java
  31. 4 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiUserMapper.java
  32. 13 0
      kmall-api/src/main/java/com/kmall/api/dao/MallMngChangeMapper.java
  33. 12 0
      kmall-api/src/main/java/com/kmall/api/dao/MallOrderExceptionRecordMapper.java
  34. 10 0
      kmall-api/src/main/java/com/kmall/api/dao/MallOrderProcessRecordMapper.java
  35. 9 0
      kmall-api/src/main/java/com/kmall/api/dao/MallOrderRefundMapper.java
  36. 10 0
      kmall-api/src/main/java/com/kmall/api/dao/MallStoreGoodsGalleryMapper.java
  37. 10 0
      kmall-api/src/main/java/com/kmall/api/dao/MallStoreMngChangeMapper.java
  38. 9 0
      kmall-api/src/main/java/com/kmall/api/dao/MallStoreMngMapper.java
  39. 10 0
      kmall-api/src/main/java/com/kmall/api/dao/MallUserCollectionMapper.java
  40. 15 0
      kmall-api/src/main/java/com/kmall/api/dao/PayerChildOrderRealMapper.java
  41. 9 0
      kmall-api/src/main/java/com/kmall/api/dao/SysExceptionRecordMapper.java
  42. 10 0
      kmall-api/src/main/java/com/kmall/api/dao/SysParamMapper.java
  43. 38 0
      kmall-api/src/main/java/com/kmall/api/dto/SendMsgVo.java
  44. 37 36
      kmall-api/src/main/java/com/kmall/api/entity/AdVo.java
  45. 82 0
      kmall-api/src/main/java/com/kmall/api/entity/CartVo.java
  46. 84 3
      kmall-api/src/main/java/com/kmall/api/entity/GoodsVo.java
  47. 132 0
      kmall-api/src/main/java/com/kmall/api/entity/MallMngChange.java
  48. 112 0
      kmall-api/src/main/java/com/kmall/api/entity/MallOrderExceptionRecord.java
  49. 112 0
      kmall-api/src/main/java/com/kmall/api/entity/MallOrderProcessRecord.java
  50. 183 0
      kmall-api/src/main/java/com/kmall/api/entity/MallOrderRefund.java
  51. 132 0
      kmall-api/src/main/java/com/kmall/api/entity/MallStoreGoodsGallery.java
  52. 142 0
      kmall-api/src/main/java/com/kmall/api/entity/MallStoreMng.java
  53. 142 0
      kmall-api/src/main/java/com/kmall/api/entity/MallStoreMngChange.java
  54. 92 0
      kmall-api/src/main/java/com/kmall/api/entity/MallUserCollection.java
  55. 93 0
      kmall-api/src/main/java/com/kmall/api/entity/OrderGoodsVo.java
  56. 142 1
      kmall-api/src/main/java/com/kmall/api/entity/OrderVo.java
  57. 239 0
      kmall-api/src/main/java/com/kmall/api/entity/PayerChildOrderRealEntity.java
  58. 35 23
      kmall-api/src/main/java/com/kmall/api/entity/SmsLogVo.java
  59. 82 0
      kmall-api/src/main/java/com/kmall/api/entity/SysExceptionRecord.java
  60. 82 0
      kmall-api/src/main/java/com/kmall/api/entity/SysParam.java
  61. 16 0
      kmall-api/src/main/java/com/kmall/api/entity/TokenEntity.java
  62. 60 0
      kmall-api/src/main/java/com/kmall/api/entity/UserVo.java
  63. 5 0
      kmall-api/src/main/java/com/kmall/api/service/ApiCartService.java
  64. 5 0
      kmall-api/src/main/java/com/kmall/api/service/ApiOrderGoodsService.java
  65. 208 85
      kmall-api/src/main/java/com/kmall/api/service/ApiOrderService.java
  66. 26 7
      kmall-api/src/main/java/com/kmall/api/service/ApiPayService.java
  67. 3 3
      kmall-api/src/main/java/com/kmall/api/service/ApiUserService.java
  68. 51 0
      kmall-api/src/main/java/com/kmall/api/service/PayerChildOrderRealService.java
  69. 2 1
      kmall-api/src/main/java/com/kmall/api/service/TokenService.java
  70. 11 1
      kmall-api/src/main/java/com/kmall/api/util/ApiBaseAction.java
  71. 135 0
      kmall-api/src/main/java/com/kmall/api/util/HttpRequestUtil.java
  72. 79 0
      kmall-api/src/main/java/com/kmall/api/util/SendMsgUtil.java
  73. 4 4
      kmall-api/src/main/resources/mybatis/mapper/ApiAdMapper.xml
  74. 205 52
      kmall-api/src/main/resources/mybatis/mapper/ApiCartMapper.xml
  75. 31 8
      kmall-api/src/main/resources/mybatis/mapper/ApiGoodsMapper.xml
  76. 93 3
      kmall-api/src/main/resources/mybatis/mapper/ApiOrderGoodsMapper.xml
  77. 238 6
      kmall-api/src/main/resources/mybatis/mapper/ApiOrderMapper.xml
  78. 61 36
      kmall-api/src/main/resources/mybatis/mapper/ApiStoreMapper.xml
  79. 126 54
      kmall-api/src/main/resources/mybatis/mapper/ApiUserMapper.xml
  80. 151 0
      kmall-api/src/main/resources/mybatis/mapper/MallMngChangeMapper.xml
  81. 130 0
      kmall-api/src/main/resources/mybatis/mapper/MallOrderExceptionRecordMapper.xml
  82. 130 0
      kmall-api/src/main/resources/mybatis/mapper/MallOrderProcessRecordMapper.xml
  83. 201 0
      kmall-api/src/main/resources/mybatis/mapper/MallOrderRefundMapper.xml
  84. 151 0
      kmall-api/src/main/resources/mybatis/mapper/MallStoreGoodsGalleryMapper.xml
  85. 161 0
      kmall-api/src/main/resources/mybatis/mapper/MallStoreMngChangeMapper.xml
  86. 161 0
      kmall-api/src/main/resources/mybatis/mapper/MallStoreMngMapper.xml
  87. 110 0
      kmall-api/src/main/resources/mybatis/mapper/MallUserCollectionMapper.xml
  88. 143 0
      kmall-api/src/main/resources/mybatis/mapper/PayerChildOrderRealMapper.xml
  89. 100 0
      kmall-api/src/main/resources/mybatis/mapper/SysExceptionRecordMapper.xml
  90. 100 0
      kmall-api/src/main/resources/mybatis/mapper/SysParamMapper.xml
  91. 2 0
      kmall-common/src/main/java/com/kmall/common/dao/SysSmsLogDao.java
  92. 2 0
      kmall-common/src/main/java/com/kmall/common/dao/TemplateConfDao.java
  93. 11 0
      kmall-common/src/main/java/com/kmall/common/entity/SysSmsLogEntity.java
  94. 2 0
      kmall-common/src/main/java/com/kmall/common/service/impl/SysSmsLogServiceImpl.java
  95. 4 4
      kmall-common/src/main/java/com/kmall/common/utils/redis/JedisUtil.java
  96. 1 1
      kmall-common/src/main/java/com/kmall/common/utils/wechat/WechatUtil.java
  97. 9 2
      kmall-common/src/main/resources/mybatis/mapper/SysSmsLogDao.xml
  98. 2 1
      wx-mall/app.js
  99. 2 1
      wx-mall/app.json
  100. 5 2
      wx-mall/app.wxss

+ 73 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/GoodsEntity.java

@@ -107,6 +107,79 @@ public class GoodsEntity implements Serializable {
     //品牌
     private String brandName;
 
+
+
+    private String sku;
+
+    private String goodsBizType;
+
+    private String createrSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
+    private Date tstm;
+
+    public String getSku() {
+        return sku;
+    }
+
+    public void setSku(String sku) {
+        this.sku = sku;
+    }
+
+    public String getGoodsBizType() {
+        return goodsBizType;
+    }
+
+    public void setGoodsBizType(String goodsBizType) {
+        this.goodsBizType = goodsBizType;
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn;
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+
+
     public Long getCreateUserDeptId() {
         return createUserDeptId;
     }

+ 72 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/ProductStoreRelaEntity.java

@@ -2,6 +2,7 @@ package com.kmall.admin.entity;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.util.Date;
 
 /**
  * 实体
@@ -58,6 +59,77 @@ public class ProductStoreRelaEntity implements Serializable {
     private String productSn;
     private String categoryName;
 
+
+
+    private String sku;
+    private String goodsBizType;
+
+    private String createrSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
+    private Date tstm;
+
+    public String getSku() {
+        return sku;
+    }
+
+    public void setSku(String sku) {
+        this.sku = sku;
+    }
+
+    public String getGoodsBizType() {
+        return goodsBizType;
+    }
+
+    public void setGoodsBizType(String goodsBizType) {
+        this.goodsBizType = goodsBizType;
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn;
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+
     /**
      * 设置:主键
      */

+ 2 - 2
kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsServiceImpl.java

@@ -59,13 +59,11 @@ public class GoodsServiceImpl implements GoodsService {
     }
 
     @Override
-    @DataFilter(userAlias = "mall_goods.create_user_id", deptAlias = "mall_goods.create_user_dept_id")
     public List<GoodsEntity> queryList(Map<String, Object> map) {
         return goodsDao.queryList(map);
     }
 
     @Override
-    @DataFilter(userAlias = "mall_goods.create_user_id", deptAlias = "mall_goods.create_user_dept_id")
     public int queryTotal(Map<String, Object> map) {
         return goodsDao.queryTotal(map);
     }
@@ -163,6 +161,8 @@ public class GoodsServiceImpl implements GoodsService {
         goods.setCreateUserId(user.getUserId());
         goods.setUpdateUserId(user.getUserId());
         goods.setUpdateTime(new Date());
+        goods.setModTime(new Date());
+        goods.setCreateTime(new Date());
         return goodsDao.save(goods);
     }
 

+ 4 - 4
kmall-admin/src/main/resources/conf/db.properties

@@ -1,14 +1,14 @@
 ########## 数据库配置 ##########
 
 #========== 开发环境 ==========
-jdbc.url=jdbc:mysql://localhost:3306/kmall_pt?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
-jdbc.username=root
-jdbc.password=111111
+jdbc.url=jdbc:mysql://120.76.84.45:3306/kmall_pt?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
+jdbc.username=ceshi
+jdbc.password=abc-123
 
 jdbc.initialSize=5
 jdbc.maxActive=30
 
-jdbc.minPoolSize=2
+jdbc.minPoolSize=2+
 jdbc.maxIdleTime=30000
 jdbc.idleConnectionTestPeriod=100
 

+ 42 - 20
kmall-admin/src/main/resources/mybatis/mapper/GoodsDao.xml

@@ -15,7 +15,6 @@
         <result property="goodsDesc" column="goods_desc"/>
         <result property="isOnSale" column="is_on_sale"/>
         <result property="addTime" column="add_time"/>
-        <result property="updateTime" column="update_time"/>
         <result property="sortOrder" column="sort_order"/>
         <result property="isDelete" column="is_delete"/>
         <result property="attributeCategory" column="attribute_category"/>
@@ -36,10 +35,14 @@
         <result property="isLimited" column="is_limited"/>
         <result property="isHot" column="is_hot"/>
         <result property="marketPrice" column="market_price"/>
-        <result property="createUserId" column="create_user_id"/>
-        <result property="createUserDeptId" column="create_user_dept_id"/>
-        <result property="updateUserId" column="update_user_id"/>
         <result property="goodsType" column="goodsType"/>
+        <result property="sku" column="sku"/>
+        <result property="goodsBizType" column="goods_biz_type"/>
+        <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+        <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+        <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+        <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
     </resultMap>
 
     <select id="queryObject" resultType="com.kmall.admin.entity.GoodsEntity">
@@ -76,7 +79,6 @@
         mall_goods.goods_brief,
         mall_goods.is_on_sale,
         mall_goods.add_time,
-        mall_goods.update_time,
         mall_goods.sort_order,
         mall_goods.is_delete,
         mall_goods.attribute_category,
@@ -97,9 +99,6 @@
         mall_goods.is_limited,
         mall_goods.is_hot,
         mall_goods.market_price,
-        mall_goods.create_user_id,
-        mall_goods.create_user_dept_id,
-        mall_goods.update_user_id,
         mall_category.name category_name,
         mall_attribute_category.name attribute_category_name,
         mall_brand.name brand_name,
@@ -166,7 +165,6 @@
         `goods_desc`,
         `is_on_sale`,
         `add_time`,
-        `update_time`,
         `sort_order`,
         `is_delete`,
         `attribute_category`,
@@ -187,9 +185,13 @@
         `is_limited`,
         `is_hot`,
         `market_price`,
-        `create_user_id`,
-        `create_user_dept_id`,
-        `update_user_id`
+        `sku`,
+        `goods_biz_type`,
+        `create_sn`,
+        `create_time`,
+        `moder_sn`,
+        `mod_time`,
+        `tstm`
         )
         values
         (
@@ -204,7 +206,6 @@
         #{goodsDesc},
         #{isOnSale},
         #{addTime},
-        #{updateTime},
         #{sortOrder},
         #{isDelete},
         #{attributeCategory},
@@ -225,9 +226,13 @@
         #{isLimited},
         #{isHot},
         #{marketPrice},
-        #{createUserId},
-        #{createUserDeptId},
-        #{updateUserId}
+        #{sku},
+        #{goodsBizType},
+        #{createrSn},
+        #{createTime},
+        #{moderSn},
+        #{modTime},
+        #{tstm}
         )
     </insert>
 
@@ -244,7 +249,6 @@
             <if test="goodsDesc != null">`goods_desc` = #{goodsDesc},</if>
             <if test="isOnSale != null">`is_on_sale` = #{isOnSale},</if>
             <if test="addTime != null">`add_time` = #{addTime},</if>
-            <if test="updateTime != null">`update_time` = #{updateTime},</if>
             <if test="sortOrder != null">`sort_order` = #{sortOrder},</if>
             <if test="isDelete != null">`is_delete` = #{isDelete},</if>
             <if test="attributeCategory != null">`attribute_category` = #{attributeCategory},</if>
@@ -265,9 +269,27 @@
             <if test="isLimited != null">`is_limited` = #{isLimited},</if>
             <if test="isHot != null">`is_hot` = #{isHot},</if>
             <if test="marketPrice != null">`market_price` = #{marketPrice},</if>
-            <if test="createUserId != null">`create_user_id` = #{createUserId},</if>
-            <if test="createUserId != null">`create_user_dept_id` = #{createUserDeptId},</if>
-            <if test="updateUserId != null">`update_user_id` = #{updateUserId},</if>
+            <if test="sku != null" >
+                sku = #{sku,jdbcType=VARCHAR},
+            </if>
+            <if test="goodsBizType != null" >
+                goods_biz_type = #{goodsBizType,jdbcType=CHAR},
+            </if>
+            <if test="createrSn != null" >
+                creater_sn = #{createrSn,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null" >
+                create_time = #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="moderSn != null" >
+                moder_sn = #{moderSn,jdbcType=VARCHAR},
+            </if>
+            <if test="modTime != null" >
+                mod_time = #{modTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="tstm != null" >
+                tstm = #{tstm,jdbcType=TIMESTAMP},
+            </if>
         </set>
         where id = #{id}
     </update>

+ 72 - 2
kmall-admin/src/main/resources/mybatis/mapper/ProductStoreRelaDao.xml

@@ -19,6 +19,14 @@
         <result property="goodsSn" column="goodsSn"/>
         <result property="productSn" column="productSn"/>
         <result property="categoryName" column="categoryName"/>
+
+        <result column="sku" property="sku" jdbcType="VARCHAR" />
+        <result column="goods_biz_type" property="goodsBizType" jdbcType="CHAR" />
+        <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+        <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+        <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+        <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
     </resultMap>
 
     <select id="queryObject" resultType="com.kmall.admin.entity.ProductStoreRelaEntity">
@@ -32,6 +40,7 @@
 			a.`market_price`,
 			a.`stock_price`,
 			a.`sell_volume`,
+			a.sku,a.goods_biz_type, a.creater_sn, a.create_time, a.moder_sn, a.mod_time, a.tstm,
 			b.goods_sn goodsSn,
 			c.goods_sn productSn,
 			b.name goodsName,
@@ -56,6 +65,7 @@
         a.`market_price`,
         a.`stock_price`,
         a.`sell_volume`,
+        a.sku,a.goods_biz_type, a.creater_sn, a.create_time, a.moder_sn, a.mod_time, a.tstm,
         b.goods_sn goodsSn,
         c.goods_sn productSn,
         b.name goodsName,
@@ -80,6 +90,7 @@
         a.`market_price`,
         a.`stock_price`,
         a.`sell_volume`,
+        a.sku,a.goods_biz_type, a.creater_sn, a.create_time, a.moder_sn, a.mod_time, a.tstm,
         b.goods_sn goodsSn,
         c.goods_sn productSn,
         b.name goodsName,
@@ -160,7 +171,27 @@
 			`retail_price`,
 			`market_price`,
             `stock_price`,
-            `sell_volume`)
+            `sell_volume`,
+
+        <if test="sku != null" >
+            sku,
+        </if>
+        <if test="goodsBizType != null" >
+            goods_biz_type,
+        </if>
+        <if test="createrSn != null" >
+            creater_sn,
+        </if>
+        <if test="createTime != null" >
+            create_time,
+        </if>
+        <if test="moderSn != null" >
+            moder_sn,
+        </if>
+        <if test="modTime != null" >
+            mod_time
+        </if>
+        )
 		values(
 			#{storeId},
 			#{productId},
@@ -169,7 +200,27 @@
 			#{retailPrice},
 			#{marketPrice},
 			#{stockPrice},
-			#{sellVolume})
+			#{sellVolume},
+
+        <if test="sku != null" >
+            #{sku,jdbcType=VARCHAR},
+        </if>
+        <if test="goodsBizType != null" >
+            #{goodsBizType,jdbcType=CHAR},
+        </if>
+        <if test="createrSn != null" >
+            #{createrSn,jdbcType=VARCHAR},
+        </if>
+        <if test="createTime != null" >
+            #{createTime,jdbcType=TIMESTAMP},
+        </if>
+        <if test="moderSn != null" >
+            #{moderSn,jdbcType=VARCHAR},
+        </if>
+        <if test="modTime != null" >
+            #{modTime,jdbcType=TIMESTAMP}
+        </if>
+        )
 	</insert>
 
     <update id="update" parameterType="com.kmall.admin.entity.ProductStoreRelaEntity">
@@ -183,6 +234,25 @@
             <if test="marketPrice != null">`market_price` = #{marketPrice},</if>
             <if test="stockPrice != null">`stock_price` = #{stockPrice},</if>
             <if test="sellVolume != null">`sell_volume` = #{sellVolume},</if>
+
+            <if test="sku != null" >
+                sku = #{sku,jdbcType=VARCHAR},
+            </if>
+            <if test="goodsBizType != null" >
+                goods_biz_type = #{goodsBizType,jdbcType=CHAR},
+            </if>
+            <if test="createrSn != null" >
+                creater_sn = #{createrSn,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null" >
+                create_time = #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="moderSn != null" >
+                moder_sn = #{moderSn,jdbcType=VARCHAR},
+            </if>
+            <if test="modTime != null" >
+                mod_time = #{modTime,jdbcType=TIMESTAMP},
+            </if>
         </set>
         where id = #{id}
     </update>

+ 77 - 6
kmall-admin/src/main/resources/mybatis/mapper/StoreDao.xml

@@ -15,6 +15,13 @@
         <result property="longitude" column="longitude"/>
         <result property="coverRadius" column="cover_radius"/>
         <result property="remark" column="remark"/>
+		<result column="merch_sn" property="merchSn" jdbcType="VARCHAR" />
+		<result column="merch_name" property="merchName" jdbcType="VARCHAR" />
+		<result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
+		<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+		<result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+		<result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+		<result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
     </resultMap>
 
 	<select id="queryObject" resultType="com.kmall.admin.entity.StoreEntity">
@@ -29,7 +36,8 @@
 			`latitude`,
 			`longitude`,
 			`cover_radius`,
-			`remark`
+			`remark`,merch_sn, merch_name, creater_sn, create_time,
+		moder_sn, mod_time, tstm
 		from mall_store
 		where id = #{id}
 	</select>
@@ -46,7 +54,8 @@
 		`latitude`,
 		`longitude`,
 		`cover_radius`,
-		`remark`
+		`remark`,merch_sn, merch_name, creater_sn, create_time,
+    moder_sn, mod_time, tstm
 		from mall_store
 		where store_name = #{storeName}
 	</select>
@@ -63,7 +72,8 @@
     		`latitude`,
     		`longitude`,
     		`cover_radius`,
-    		`remark`
+    		`remark`,merch_sn, merch_name, creater_sn, create_time,
+		moder_sn, mod_time, tstm
 		from mall_store
 		WHERE 1=1
 		<if test="storeName != null and storeName.trim() != ''">
@@ -107,7 +117,26 @@
 			`latitude`,
 			`longitude`,
 			`cover_radius`,
-			`remark`)
+			`remark`,
+		<if test="merchSn != null" >
+			merch_sn,
+		</if>
+		<if test="merchName != null" >
+			merch_name,
+		</if>
+		<if test="createrSn != null" >
+			creater_sn,
+		</if>
+		<if test="createTime != null" >
+			create_time,
+		</if>
+		<if test="moderSn != null" >
+			moder_sn,
+		</if>
+		<if test="modTime != null" >
+			mod_time
+		</if>
+		)
 		values(
 			#{storeName},
 			#{storeNumber},
@@ -118,7 +147,27 @@
 			#{latitude},
 			#{longitude},
 			#{coverRadius},
-			#{remark})
+			#{remark},
+
+		<if test="merchSn != null" >
+			#{merchSn,jdbcType=VARCHAR},
+		</if>
+		<if test="merchName != null" >
+			#{merchName,jdbcType=VARCHAR},
+		</if>
+		<if test="createrSn != null" >
+			#{createrSn,jdbcType=VARCHAR},
+		</if>
+		<if test="createTime != null" >
+			#{createTime,jdbcType=TIMESTAMP},
+		</if>
+		<if test="moderSn != null" >
+			#{moderSn,jdbcType=VARCHAR},
+		</if>
+		<if test="modTime != null" >
+			#{modTime,jdbcType=TIMESTAMP}
+		</if>
+		)
 	</insert>
 	 
 	<update id="update" parameterType="com.kmall.admin.entity.StoreEntity">
@@ -133,7 +182,29 @@
 			<if test="latitude != null">`latitude` = #{latitude}, </if>
 			<if test="longitude != null">`longitude` = #{longitude}, </if>
 			<if test="coverRadius != null">`cover_radius` = #{coverRadius}, </if>
-			<if test="remark != null">`remark` = #{remark}</if>
+			<if test="remark != null">`remark` = #{remark},</if>
+
+			<if test="merchSn != null" >
+				merch_sn = #{merchSn,jdbcType=VARCHAR},
+			</if>
+			<if test="merchName != null" >
+				merch_name = #{merchName,jdbcType=VARCHAR},
+			</if>
+			<if test="createrSn != null" >
+				creater_sn = #{createrSn,jdbcType=VARCHAR},
+			</if>
+			<if test="createTime != null" >
+				create_time = #{createTime,jdbcType=TIMESTAMP},
+			</if>
+			<if test="moderSn != null" >
+				moder_sn = #{moderSn,jdbcType=VARCHAR},
+			</if>
+			<if test="modTime != null" >
+				mod_time = #{modTime,jdbcType=TIMESTAMP},
+			</if>
+			<if test="tstm != null" >
+				tstm = #{tstm,jdbcType=TIMESTAMP},
+			</if>
 		</set>
 		where id = #{id}
 	</update>

+ 20 - 6
kmall-api/src/main/java/com/kmall/api/api/ApiAuthController.java

@@ -77,9 +77,9 @@ public class ApiAuthController extends ApiBaseAction {
         }
         Date nowTime = new Date();
         UserVo userVo = userService.queryByOpenId(sessionData.getString("openid"));
+        userInfo.setNickName(filterEmoji(userInfo.getNickName()));;
         if (null == userVo) {
             userVo = new UserVo();
-            userVo.setUsername(userInfo.getNickName());
             userVo.setPassword(sessionData.getString("openid"));
             userVo.setRegister_time(nowTime);
             userVo.setRegister_ip(this.getClientIp());
@@ -100,7 +100,7 @@ public class ApiAuthController extends ApiBaseAction {
             userService.update(userVo);
         }
 
-        Map<String, Object> tokenMap = tokenService.createAndUpdateToken(userVo.getId(), storeId);
+        Map<String, Object> tokenMap = tokenService.createAndUpdateToken(userVo.getWeixin_openid(), storeId,userVo.getId());
         String token = MapUtils.getString(tokenMap, "token");
 
         if (null == userInfo || StringUtils.isNullOrEmpty(token)) {
@@ -112,6 +112,20 @@ public class ApiAuthController extends ApiBaseAction {
         resultObj.put("userId", userVo.getId());
         return toResponsSuccess(resultObj);
     }
+    /**
+     * 将emoji表情替换成空串
+     * @param source
+     * @return 过滤后的字符串
+     **/
+    public static String filterEmoji(String source) {
+        if (source != null && source.length() > 0) {
+            return source.replaceAll("[\ud800\udc00-\udbff\udfff\ud800-\udfff]", "");
+        } else {
+            return source;
+        }
+    }
+
+
 
     /**
      * 根据经纬度选择门店
@@ -123,8 +137,8 @@ public class ApiAuthController extends ApiBaseAction {
         param.put("latitude", latitude);
         param.put("longitude", longitude);
         List<StoreVo> storeVoList = apiStoreService.queryNearbyList(param);
-        if (null != storeVoList && storeVoList.size() > 0 && null != getUserId()) {
-            tokenService.createAndUpdateToken(getUserId(), storeVoList.get(0).getId());
+        if (null != storeVoList && storeVoList.size() > 0 && null != getOpenId()) {
+            tokenService.createAndUpdateToken(getOpenId(), storeVoList.get(0).getId(),getUserId());
         }
         return toResponsSuccess(storeVoList);
     }
@@ -150,11 +164,11 @@ public class ApiAuthController extends ApiBaseAction {
     @PostMapping("chooseStoreId")
     public Object chooseStoreId() {
         JSONObject jsonParam = this.getJsonRequest();
-        Long userId = getUserId();
+        String openId = getOpenId();
         Long storeId = jsonParam.getLong("storeId");
         //
         Map<String, Object> resultObj = new HashMap();
-        Map<String, Object> tokenMap = tokenService.createAndUpdateToken(userId, storeId);
+        Map<String, Object> tokenMap = tokenService.createAndUpdateToken(openId, storeId,getUserId());
         String token = MapUtils.getString(tokenMap, "token");
         resultObj.put("token", token);
         return toResponsSuccess(resultObj);

+ 108 - 14
kmall-api/src/main/java/com/kmall/api/api/ApiCartController.java

@@ -2,11 +2,13 @@ package com.kmall.api.api;
 
 import com.alibaba.fastjson.JSONObject;
 import com.kmall.api.annotation.LoginUser;
+import com.kmall.api.contants.Dict;
 import com.kmall.api.entity.*;
 import com.kmall.api.service.*;
 import com.kmall.api.util.ApiBaseAction;
 import com.kmall.common.utils.MapUtils;
 import com.qiniu.util.StringUtils;
+import com.sun.org.apache.xpath.internal.operations.Bool;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -41,6 +43,8 @@ public class ApiCartController extends ApiBaseAction {
     private ApiUserCouponService apiUserCouponService;
     @Autowired
     private ApiOrderGoodsService apiOrderGoodsService;
+    @Autowired
+    private ApiUserService apiUserService;
 
     /**
      * 获取购物车中的数据
@@ -84,7 +88,9 @@ public class ApiCartController extends ApiBaseAction {
      * 获取购物车中的数据
      */
     @GetMapping("getCart")
-    public Object getCart(@LoginUser UserVo loginUser) {
+    public Object getCart() {
+        UserVo loginUser = new UserVo();
+        loginUser.setId(getUserId());
         Map<String, Object> resultObj = new HashMap();
         //查询列表数据
         Map param = new HashMap();
@@ -97,6 +103,10 @@ public class ApiCartController extends ApiBaseAction {
         BigDecimal goodsAmount = new BigDecimal(0.00);
         Integer checkedGoodsCount = 0;
         BigDecimal checkedGoodsAmount = new BigDecimal(0.00);
+        List<CartVo> cart00List = new ArrayList<>();
+        List<CartVo> cart02List = new ArrayList<>();
+        List<CartVo> cart10List = new ArrayList<>();
+        List<CartVo> cart11List = new ArrayList<>();
         for (CartVo cartItem : cartList) {
             goodsCount += cartItem.getNumber();
             goodsAmount = goodsAmount.add(cartItem.getRetail_price().multiply(new BigDecimal(cartItem.getNumber())));
@@ -104,6 +114,29 @@ public class ApiCartController extends ApiBaseAction {
                 checkedGoodsCount += cartItem.getNumber();
                 checkedGoodsAmount = checkedGoodsAmount.add(cartItem.getRetail_price().multiply(new BigDecimal(cartItem.getNumber())));
             }
+            if(org.apache.commons.lang.StringUtils.isNotEmpty(cartItem.getGoodsBizType())){
+                cartItem.setGoodsBizTypeName(Dict.orderBizType.valueOf("item_"+ cartItem.getGoodsBizType()).getItemName());
+            }else{
+                cartItem.setGoodsBizTypeName("");
+            }
+
+            if(Dict.orderBizType.item_00.getItem().equalsIgnoreCase(cartItem.getGoodsBizType())){
+                CartVo cartVo00= cartItem;
+                cart00List.add(cartVo00);
+            }
+            if(Dict.orderBizType.item_02.getItem().equalsIgnoreCase(cartItem.getGoodsBizType())){
+                CartVo cartVo02= cartItem;
+                cart02List.add(cartVo02);
+            }
+            if(Dict.orderBizType.item_10.getItem().equalsIgnoreCase(cartItem.getGoodsBizType())){
+                CartVo cartVo10= cartItem;
+                cart10List.add(cartVo10);
+            }
+            if(Dict.orderBizType.item_11.getItem().equalsIgnoreCase(cartItem.getGoodsBizType())){
+                CartVo cartVo11= cartItem;
+                cart11List.add(cartVo11);
+            }
+
         }
         // 获取优惠信息提示 邮费
         CouponVo shippingCoupon = apiCouponService.matchShippingSign(loginUser.getId(), checkedGoodsAmount);
@@ -120,6 +153,11 @@ public class ApiCartController extends ApiBaseAction {
         }
 
         resultObj.put("couponInfoList", couponInfoList);
+
+        resultObj.put("cart00List", cart00List);//{'cartList':{'type': '保税备货','data':{}}}
+        resultObj.put("cart02List", cart02List);
+        resultObj.put("cart10List", cart10List);
+        resultObj.put("cart11List", cart11List);
         resultObj.put("cartList", cartList);
         //
         Map<String, Object> cartTotal = new HashMap();
@@ -171,8 +209,8 @@ public class ApiCartController extends ApiBaseAction {
      * 获取购物车信息,所有对购物车的增删改操作,都要重新返回购物车的信息
      */
     @GetMapping("index")
-    public Object index(@LoginUser UserVo loginUser) {
-        return toResponsSuccess(getCart(loginUser));
+    public Object index() {
+        return toResponsSuccess(getCart());
     }
 
     /**
@@ -224,12 +262,14 @@ public class ApiCartController extends ApiBaseAction {
             cartInfo.setGoods_specification_name_value(productInfo.getGoods_specification_name_value());
             cartInfo.setGoods_specification_ids(productInfo.getGoods_specification_ids());
             cartInfo.setChecked(1);
+            cartInfo.setGoodsBizType(goodsInfo.getGoodsBizType());//业务类型
             cartService.save(cartInfo);
         } else {
             cartInfo.setNumber(cartInfo.getNumber() + number);
+            cartInfo.setGoodsBizType(goodsInfo.getGoodsBizType());//业务类型
             cartService.update(cartInfo);
         }
-        return toResponsSuccess(getCart(loginUser));
+        return toResponsSuccess(getCart());
     }
 
     /**
@@ -249,7 +289,7 @@ public class ApiCartController extends ApiBaseAction {
         if (0 != MapUtils.getInteger("errno", resultObj)) {
             return toResponsObject(MapUtils.getInteger("errno", resultObj), MapUtils.getString("errmsg", resultObj), "");
         }
-        return toResponsSuccess(getCart(loginUser));
+        return toResponsSuccess(getCart());
     }
 
     /**
@@ -285,7 +325,23 @@ public class ApiCartController extends ApiBaseAction {
             cartInfo.setGoods_specification_name_value(goodsVo.getGoods_specification_name_value());
             cartInfo.setGoods_specification_ids(goodsVo.getGoods_specification_ids());
             cartInfo.setChecked(1);
-            cartService.save(cartInfo);
+            cartInfo.setGoodsBizType(goodsVo.getOrderBizType());
+
+            Map map = new HashMap();
+            map.put("user_id",loginUser.getId());
+            map.put("goods_id",goodsVo.getGoods_id());
+            map.put("product_id",goodsVo.getProduct_id());
+            map.put("number",goodsVo.getNumber());
+            List<CartVo> list= cartService.queryList(map);
+            if(list != null && list.size() > 0){
+                for (CartVo vo:list) {
+                    cartInfo.setId(vo.getId());
+                    cartService.update(cartInfo);
+                }
+            }else{
+                cartService.save(cartInfo);
+            }
+
         }
         return toResponsSuccess("添加成功");
     }
@@ -354,7 +410,7 @@ public class ApiCartController extends ApiBaseAction {
         if (cartInfo.getProduct_id().equals(productId)) {
             cartInfo.setNumber(number);
             cartService.update(cartInfo);
-            return toResponsObject(0, msg, getCart(loginUser));
+            return toResponsObject(0, msg, getCart());
         }
 
         Map cartParam = new HashMap();
@@ -383,7 +439,7 @@ public class ApiCartController extends ApiBaseAction {
             cartInfo.setGoods_specification_ids(productInfo.getGoods_specification_ids());
             cartService.update(cartInfo);
         }
-        return toResponsObject(0, msg, getCart(loginUser));
+        return toResponsObject(0, msg, getCart());
     }
 
     /**
@@ -394,12 +450,23 @@ public class ApiCartController extends ApiBaseAction {
         JSONObject jsonParam = getJsonRequest();
         String productIds = jsonParam.getString("productIds");
         Integer isChecked = jsonParam.getInteger("isChecked");
-        if (StringUtils.isNullOrEmpty(productIds)) {
-            return this.toResponsFail("删除出错");
+        String goodsBizType = jsonParam.getString("goodsBizType");
+        String[] productIdArray = null;
+        if(StringUtils.isNullOrEmpty(goodsBizType)) {
+            if (StringUtils.isNullOrEmpty(productIds)) {//点击全选时
+                return this.toResponsFail("删除出错");
+            }
+            productIdArray = productIds.split(",");
+        }else{
+            //根据业务类型查询购物车
+            List<CartVo> cartVoList = cartService.queryCartByGoodsBizType(goodsBizType);
+            productIdArray = new String[cartVoList.size()];
+            for (int i = 0;i< cartVoList.size();i++){
+                productIdArray[i] =cartVoList.get(i).getProduct_id()+"";
+            }
         }
-        String[] productIdArray = productIds.split(",");
         cartService.updateCheck(productIdArray, isChecked, loginUser.getId(), getStoreId());
-        return toResponsSuccess(getCart(loginUser));
+        return toResponsSuccess(getCart());
     }
 
     //删除选中的购物车商品,批量删除
@@ -411,7 +478,7 @@ public class ApiCartController extends ApiBaseAction {
             return toResponsFail("删除出错");
         }
         cartService.delete(cartId);
-        return toResponsSuccess(getCart(loginUser));
+        return toResponsSuccess(getCart());
     }
 
     //  获取购物车商品的总件件数
@@ -480,7 +547,8 @@ public class ApiCartController extends ApiBaseAction {
             }
         }
         // 根据收货地址计算运费
-        BigDecimal freightPrice = apiCouponService.matchShipping(loginUser.getId(), goodsTotalPrice);
+//        BigDecimal freightPrice = apiCouponService.matchShipping(loginUser.getId(), goodsTotalPrice);
+        BigDecimal freightPrice = new BigDecimal("00");
         // 单独计算满减券
         BigDecimal fullCutCouponDec = new BigDecimal(0);
         Long fullCutCouponId = 0L;
@@ -517,6 +585,11 @@ public class ApiCartController extends ApiBaseAction {
                 resultObj.put("addressVo", addressEntityList.get(0));
             }
         }
+        UserVo userVo = apiUserService.queryObject(loginUser.getId());
+        if(userVo != null){
+            resultObj.put("idNo", userVo.getIdNo());
+            resultObj.put("userName", userVo.getUsername());
+        }
         return toResponsSuccess(resultObj);
     }
 
@@ -542,4 +615,25 @@ public class ApiCartController extends ApiBaseAction {
         List<UserCouponVo> couponVos = apiUserCouponService.signUserCouponList(loginUser.getId(), checkedGoodsAmount);
         return toResponsSuccess(couponVos);
     }
+
+//    select checked from mall_cart where goods_biz_type ='00'
+
+    @PostMapping("getCheckedDataByType")
+    public Object getCheckedDataByType() {
+
+        JSONObject jsonParam = getJsonRequest();
+        String goodsBizType = jsonParam.getString("goodsBizType");
+        List<CartVo> cartVoList = cartService.queryCartByGoodsBizType(goodsBizType);
+        for (int i=0;i<cartVoList.size();i++){
+            if(cartVoList.get(i).getChecked()==0){//未选中
+                Map map=new HashMap();
+                map.put("isChecked",false);
+                return toResponsSuccess(map);
+            }
+        }
+        Map map=new HashMap();
+        map.put("isChecked",true);
+        return toResponsSuccess(map);
+    }
+
 }

+ 31 - 9
kmall-api/src/main/java/com/kmall/api/api/ApiCouponController.java

@@ -10,6 +10,8 @@ import com.kmall.api.service.ApiCouponService;
 import com.kmall.api.service.ApiUserCouponService;
 import com.kmall.api.service.ApiUserService;
 import com.kmall.api.util.ApiBaseAction;
+import com.kmall.common.entity.SysSmsLogEntity;
+import com.kmall.common.service.SysSmsLogService;
 import com.kmall.common.utils.enums.CouponTypeEnum;
 import com.qiniu.util.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -36,18 +38,19 @@ public class ApiCouponController extends ApiBaseAction {
     private ApiCouponService apiCouponService;
     @Autowired
     private ApiUserCouponService apiUserCouponService;
+    @Autowired
+    private SysSmsLogService sysSmsLogService;
 
     /**
      * 是否有可以参加的活动
      *
-     * @param loginUser
      * @return
      */
     @GetMapping("enableActivity")
-    public Object enableActivity(@LoginUser UserVo loginUser) {
+    public Object enableActivity() {
         Map resultObj = new HashMap();
         Map param = new HashMap();
-        param.put("user_id", loginUser.getId());
+        param.put("user_id", getUserId());
         // 需要点击领取的优惠券
         Integer[] send_types = new Integer[]{CouponTypeEnum.COUPONTYPE1.getIndex()};
         param.put("send_types", send_types);
@@ -55,7 +58,7 @@ public class ApiCouponController extends ApiBaseAction {
         resultObj.put("takeCoupon", "");
         List<CouponVo> couponVos = apiCouponService.queryUserCoupons(param);
         if (null != couponVos && couponVos.size() > 0) {
-            apiCouponService.takeCoupon(couponVos.get(0), loginUser.getId(), "", 0L, 1);
+            apiCouponService.takeCoupon(couponVos.get(0), getUserId(), "", 0L, 1);
             resultObj.put("takeCoupon", couponVos.get(0));
             return toResponsSuccess(resultObj);
         }
@@ -138,7 +141,7 @@ public class ApiCouponController extends ApiBaseAction {
     }
 
     /**
-     *   填写手机号码,领券
+     *   手机号绑定
      */
     @PostMapping("newuser")
     public Object newuser(@LoginUser UserVo loginUser) {
@@ -147,10 +150,13 @@ public class ApiCouponController extends ApiBaseAction {
         String phone = jsonParam.getString("phone");
         String smscode = jsonParam.getString("smscode");
         // 校验短信码
-        SmsLogVo smsLogVo = apiUserService.querySmsCodeByUserId(loginUser.getId());
-        if (null != smsLogVo && !smsLogVo.getSms_code().equals(smscode)) {
+        SysSmsLogEntity smsLogVo = sysSmsLogService.querySmsCodeByUserId(loginUser.getId());
+        if (null != smsLogVo && !smsLogVo.getSmsCode().equals(smscode)) {
             return toResponsFail("短信校验失败");
         }
+//        if(org.apache.commons.lang.StringUtils.isNotEmpty(smsLogVo.getReturnMsg())){
+//            return toResponsFail("短信校验失败:"+smsLogVo.getReturnMsg());
+//        }
         // 更新手机号码
         if (!StringUtils.isNullOrEmpty(phone)) {
             if (!phone.equals(loginUser.getMobile())) {
@@ -158,13 +164,13 @@ public class ApiCouponController extends ApiBaseAction {
                 apiUserService.update(loginUser);
             }
         }
-        // 判断是否是新用户
+        /*// 判断是否是新用户
         if (!StringUtils.isNullOrEmpty(loginUser.getMobile())) {
             return toResponsFail("当前优惠券只能新用户领取");
         } else {
             loginUser.setMobile(phone);
             apiUserService.update(loginUser);
-        }
+        }*/
         // 是否领取过了
         Map params = new HashMap();
         params.put("user_id", loginUser.getId());
@@ -184,6 +190,22 @@ public class ApiCouponController extends ApiBaseAction {
             return toResponsFail("领取失败");
         }
     }
+    /**
+     *  校验是否领取
+     */
+    @GetMapping("checkActivit")
+    public Object checkActivit(@LoginUser UserVo loginUser) {
+        // 是否领取过了
+        Map params = new HashMap();
+        params.put("user_id", loginUser.getId());
+        params.put("send_type", 4);
+        List<CouponVo> couponVos = apiCouponService.queryUserCoupons(params);
+        if (null != couponVos && couponVos.size() > 0) {
+            return toResponsObject(2, "已经领取过,不能重复领取", couponVos);
+        }
+
+        return toResponsSuccess(couponVos);
+    }
 
     /**
      *   转发领取红包

+ 6 - 4
kmall-api/src/main/java/com/kmall/api/api/ApiGoodsController.java

@@ -117,7 +117,7 @@ public class ApiGoodsController extends ApiBaseAction {
 
     /**
      * 商品详情页数据
-     */
+     * */
     @GetMapping("detail")
     public Object detail(Long id, Long referrer) {
         Map<String, Object> resultObj = new HashMap();
@@ -273,7 +273,7 @@ public class ApiGoodsController extends ApiBaseAction {
      */
     @GetMapping("list")
     public Object list(@LoginUser UserVo loginUser, Integer categoryId,
-                       Integer brandId, String keyword, Integer isNew, Integer isHot,
+                       Integer brandId, String keyword, Integer isNew, Integer isHot,String goodsBizType,
                        @RequestParam(value = "page", defaultValue = "1") Integer
                                page, @RequestParam(value = "size", defaultValue = "10") Integer size,
                        String sort, String order) {
@@ -286,6 +286,7 @@ public class ApiGoodsController extends ApiBaseAction {
         params.put("limit", size);
         params.put("order", sort);
         params.put("sidx", order);
+        params.put("goodsBizType", goodsBizType);
         params.put("store_id", getStoreId());
         //
         if (null != sort && sort.equals("price")) {
@@ -468,7 +469,7 @@ public class ApiGoodsController extends ApiBaseAction {
             Map bannerInfo = new HashMap();
             bannerInfo.put("url", "");
             bannerInfo.put("name", adVoList.get(0).getName());
-            bannerInfo.put("img_url", adVoList.get(0).getImage_url());
+            bannerInfo.put("img_url", adVoList.get(0).getImageUrl());
             resultObj.put("bannerInfo", bannerInfo);
         } else {
             Map bannerInfo = new HashMap();
@@ -537,7 +538,7 @@ public class ApiGoodsController extends ApiBaseAction {
     @IgnoreAuth
     @GetMapping("productlist")
     public Object productlist(@LoginUser UserVo loginUser, Integer categoryId,
-                              Integer isNew, Integer discount,
+                              Integer isNew, Integer discount,String goodsBizType,
                               @RequestParam(value = "page", defaultValue = "1") Integer
                                       page, @RequestParam(value = "size", defaultValue = "10") Integer size,
                               String sort, String order) {
@@ -565,6 +566,7 @@ public class ApiGoodsController extends ApiBaseAction {
         } else if (null != discount && discount == 2) {
             params.put("is_group", true);
         }
+        params.put("goodsBizType", goodsBizType);
         params.put("category_parent_id", categoryId);
         //查询列表数据
         Query query = new Query(params);

+ 3 - 0
kmall-api/src/main/java/com/kmall/api/api/ApiGoodsGroupController.java

@@ -2,12 +2,14 @@ package com.kmall.api.api;
 
 import com.kmall.api.annotation.IgnoreAuth;
 import com.kmall.api.annotation.LoginUser;
+import com.kmall.api.contants.Dict;
 import com.kmall.api.entity.*;
 import com.kmall.api.service.*;
 import com.kmall.api.util.ApiBaseAction;
 import com.kmall.api.util.ApiPageUtils;
 import com.kmall.common.utils.DateUtils;
 import com.kmall.common.utils.Query;
+import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -156,6 +158,7 @@ public class ApiGoodsGroupController extends ApiBaseAction {
         }
         footprintService.save(footprintEntity);
         //
+        info.setGoodsBizType(StringUtils.isEmpty(info.getGoodsBizType())?"": Dict.orderBizType.valueOf("item_"+ info.getGoodsBizType()).getItemName());
         resultObj.put("groupVo", groupVo);
         resultObj.put("info", info);
         resultObj.put("gallery", gallery);

+ 32 - 6
kmall-api/src/main/java/com/kmall/api/api/ApiIndexController.java

@@ -1,14 +1,15 @@
 package com.kmall.api.api;
 
+import com.alibaba.fastjson.JSONObject;
 import com.kmall.api.annotation.IgnoreAuth;
-import com.kmall.api.entity.AdVo;
-import com.kmall.api.entity.CartVo;
-import com.kmall.api.entity.ChannelVo;
-import com.kmall.api.entity.GoodsVo;
+import com.kmall.api.annotation.LoginUser;
+import com.kmall.api.entity.*;
 import com.kmall.api.service.*;
 import com.kmall.api.util.ApiBaseAction;
+import org.apache.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -25,6 +26,7 @@ import java.util.Map;
 @RestController
 @RequestMapping("/api/index")
 public class ApiIndexController extends ApiBaseAction {
+    protected Logger log = Logger.getLogger(ApiIndexController.class);
     @Autowired
     private ApiAdService apiAdService;
     @Autowired
@@ -35,6 +37,8 @@ public class ApiIndexController extends ApiBaseAction {
     private ApiCartService cartService;
     @Autowired
     private ApiOrderService apiOrderService;
+    @Autowired
+    private ApiUserService apiUserService;
 
     /**
      * app首页
@@ -54,9 +58,9 @@ public class ApiIndexController extends ApiBaseAction {
         List<AdVo> banner = new ArrayList();
         if (null != adVos && adVos.size() > 0) {
             for (AdVo adVo : adVos) {
-                if (adVo.getAd_position_id() == 1) {
+                if (adVo.getAdPositionId() == 1) {
                     banner.add(adVo);
-                } else if (adVo.getAd_position_id() == 2) {
+                } else if (adVo.getAdPositionId() == 2) {
                     resultObj.put("groupBanner", adVo);
                 }
             }
@@ -113,4 +117,26 @@ public class ApiIndexController extends ApiBaseAction {
         resultObj.put("countMap", countMap);
         return toResponsSuccess(resultObj);
     }
+
+    @PostMapping("idCardRealName")
+    public Object idCardRealName(@LoginUser UserVo loginUser) {
+        JSONObject jsonParam = getJsonRequest();
+
+        Long userId = getUserId();
+        String idNo = jsonParam.getString("idNo");
+        String username = jsonParam.getString("userName");
+        // TODO: 2018/10/18 实名验证
+
+        UserVo userVo = new UserVo();
+        userVo.setUsername(username);
+        userVo.setIdNo(idNo);
+        userVo.setId(userId);
+        try {
+            apiUserService.update(userVo);
+        }catch (Exception e){
+            log.error("系统异常",e);
+            return toResponsFail("系统异常");
+        }
+        return toResponsMsgSuccess("实名绑定成功");
+    }
 }

+ 22 - 16
kmall-api/src/main/java/com/kmall/api/api/ApiPayController.java

@@ -23,10 +23,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
+import java.util.*;
 
 /**
  * 作者: @author Scott <br>
@@ -57,18 +54,28 @@ public class ApiPayController extends ApiBaseAction {
      * 获取支付的请求参数
      */
     @GetMapping("pay_prepay")
-    public Object payPrepay(@LoginUser UserVo loginUser, Long orderId) {
+    public Object payPrepay(@LoginUser UserVo loginUser, Long[] orderIds) {
         //
-        OrderVo orderInfo = orderService.queryObject(orderId);
-
-        if (null == orderInfo) {
-            return toResponsObject(400, "订单已取消", "");
+        List<Long> orderIdList=new ArrayList<>();
+        String merchOrderSn = "";
+        for(int i=0;i<orderIds.length;i++){
+            orderIdList.add(orderIds[i]);
         }
+        List<OrderVo> orderVoList = orderService.queryObjectByIdList(orderIdList);
+
+        for (OrderVo orderInfo:orderVoList) {
+            if (null == orderInfo) {
+                return toResponsObject(400, "订单号为"+orderInfo.getOrder_sn()+"的订单已取消", "");
+            }
 
-        if (orderInfo.getPay_status() != 0 && orderInfo.getPay_status() != 1) {
-            return toResponsObject(400, "订单已支付,请不要重复操作", "");
+            if (orderInfo.getPay_status() != 0 && orderInfo.getPay_status() != 1) {
+                return toResponsObject(400, "订单号为"+orderInfo.getOrder_sn()+"的订单已支付,请不要重复操作", "");
+            }
+            merchOrderSn = orderInfo.getMerchOrderSn();
         }
 
+
+
         String nonceStr = CharUtil.getRandomString(32);
 
         //https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=7_7&index=3
@@ -82,12 +89,11 @@ public class ApiPayController extends ApiBaseAction {
             parame.put("mch_id", WxPayPropertiesBuilder.instance().getMchId());// 商家账号。
             String randomStr = CharUtil.getRandomNum(18).toUpperCase();
             parame.put("nonce_str", randomStr);// 随机字符串
-            parame.put("out_trade_no", orderInfo.getOrder_sn());// 商户订单编号
-            Map orderGoodsParam = new HashMap();
-            orderGoodsParam.put("order_id", orderId);
+            parame.put("out_trade_no", merchOrderSn);// 商户订单编号
             parame.put("body", "商城-支付");// 商品描述
+
             //订单的商品
-            List<OrderGoodsVo> orderGoods = orderGoodsService.queryList(orderGoodsParam);
+            List<OrderGoodsVo> orderGoods = orderGoodsService.queryListByIds(orderIdList);
             if (null != orderGoods) {
                 String body = "商城-";
                 for (OrderGoodsVo goodsVo : orderGoods) {
@@ -131,7 +137,7 @@ public class ApiPayController extends ApiBaseAction {
                 if (result_code.equalsIgnoreCase("FAIL")) {
                     return toResponsFail("支付失败," + err_code_des);
                 } else if (result_code.equalsIgnoreCase("SUCCESS")) {
-                    apiPayService.payPrepay(resultObj, resultUn, nonceStr, orderInfo);
+                    apiPayService.payPrepay(resultObj, resultUn, nonceStr, orderVoList);
                     return toResponsObject(0, "微信统一订单下单成功", resultObj);
                 }
             }

+ 34 - 9
kmall-api/src/main/java/com/kmall/api/api/ApiUserController.java

@@ -1,14 +1,19 @@
 package com.kmall.api.api;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import com.google.gson.JsonObject;
 import com.kmall.api.annotation.IgnoreAuth;
 import com.kmall.api.annotation.LoginUser;
+import com.kmall.api.dto.SendMsgVo;
+import com.kmall.api.util.SendMsgUtil;
 import com.kmall.common.entity.SysSmsLogEntity;
 import com.kmall.api.entity.UserVo;
 import com.kmall.api.service.ApiUserService;
 import com.kmall.common.service.SysSmsLogService;
 import com.kmall.api.util.ApiBaseAction;
 import com.kmall.common.utils.CharUtil;
+import org.apache.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -26,6 +31,7 @@ import java.util.Map;
 @RestController
 @RequestMapping("/api/user")
 public class ApiUserController extends ApiBaseAction {
+    protected Logger log = Logger.getLogger(ApiUserController.class);
     @Autowired
     private ApiUserService userService;
     @Autowired
@@ -35,7 +41,7 @@ public class ApiUserController extends ApiBaseAction {
      */
     @IgnoreAuth
     @GetMapping("info")
-    public Object info(@LoginUser UserVo loginUser, String mobile) {
+    public Object info(String mobile) {
         Map param = new HashMap();
         param.put("mobile", mobile);
         UserVo user = userService.queryByMobile(mobile);
@@ -49,20 +55,38 @@ public class ApiUserController extends ApiBaseAction {
     @PostMapping("smscode")
     public Object smscode(@LoginUser UserVo loginUser) {
         JSONObject jsonParams = getJsonRequest();
-        String sms_code = CharUtil.getRandomNum(4);
+        String sms_code = SendMsgUtil.createRandomVcode();
         String phone = jsonParams.getString("phone");
-        String msgContent = "验证码:" + sms_code + ",您正在进行身份验证。";
+        String msgContent = "您正在进行微信小程序手机号绑定操作,验证码"+sms_code+",请在10分钟内输入。请勿告诉其他人。";
 
+        System.out.println("msgContent:"+msgContent);
         // 一分钟之内不能重复发送短信
         SysSmsLogEntity smsLogVo = smsLogService.querySmsCodeByUserId(loginUser.getId());
         if (null != smsLogVo && (System.currentTimeMillis() - smsLogVo.getStime().getTime()) / 1000 < 1 * 60) {
             return toResponsFail("短信已发送");
         }
 
+//        try{
+//            //发送验证码到手机
+//            String result = SendMsgUtil.sendMsg(phone,msgContent);
+//            SendMsgVo vo = JSON.parseObject(result,SendMsgVo.class);
+//            System.out.println(result);
+////            if(vo.getCode().equalsIgnoreCase("1")){
+////                return toResponsSuccess("短信发送成功");
+////            }else{
+////                return toResponsFail(vo.getMsg());
+////            }
+//            return toResponsSuccess("短信发送成功");
+//        }catch (Exception e){
+//            e.printStackTrace();
+//            return toResponsFail("短信发送失败");
+//        }
+
         SysSmsLogEntity smsLog = new SysSmsLogEntity();
         smsLog.setUserId(loginUser.getId());
         smsLog.setMobile(phone);
         smsLog.setContent(msgContent);
+        smsLog.setSmsCode(sms_code);
         SysSmsLogEntity result = smsLogService.sendSms(smsLog);
 
         if (null == result || result.getSendStatus() != 0) {
@@ -75,13 +99,14 @@ public class ApiUserController extends ApiBaseAction {
     /**
      * 获取当前会员等级
      *
-     * @param loginUser
      * @return
      */
-    @GetMapping("getCurUser")
-    public Object getUserLevel(@LoginUser UserVo loginUser) {
-        String userLevel = userService.getUserLevel(userService.queryObject(loginUser.getId()));
-        loginUser.setUserLevel(userLevel);
-        return toResponsSuccess(loginUser);
+    @PostMapping("getCurUser")
+    public Object getUserLevel() {
+        Long userId = getUserId();
+        UserVo userInfo = userService.queryObject(userId);
+        String userLevel = userService.getUserLevel(userInfo);
+        userInfo.setUserLevel(userLevel);
+        return toResponsSuccess(userInfo);
     }
 }

+ 8 - 1
kmall-api/src/main/java/com/kmall/api/cache/UserTokenCache.java

@@ -53,7 +53,14 @@ public class UserTokenCache {
         if (StringUtils.isNullOrEmpty(temp)) {
             return null;
         }
-        return getUserTokenByUserId(Long.valueOf(temp));
+        String userID = toUserTokenKey(Long.valueOf(temp));
+        String tokenEntityJson = JedisUtil.get(userID);
+        if (!org.springframework.util.StringUtils.isEmpty(tokenEntityJson)) {
+            TokenEntity d = JSON.parseObject(tokenEntityJson, TokenEntity.class);
+            return d;
+        } else {
+            return null;
+        }
     }
 
     public static void del(Long userId) {

+ 237 - 0
kmall-api/src/main/java/com/kmall/api/contants/Dict.java

@@ -0,0 +1,237 @@
+package com.kmall.api.contants;
+
+/**
+ * @author huangyq
+ * @version 1.0
+ * 2018-10-11 09:38:30
+ */
+public class Dict {
+
+    /**
+     * 支付方式,weixin:微信;alipay:支付宝;tenpay:QQ财付通
+     */
+    public enum payFlag {
+        item_weixin("weixin", "微信"),
+        item_tenpay("tenpay", "财付通"),
+        item_alipay("alipay", "支付宝");
+
+        private String item;
+        private String itemName;
+
+        payFlag(String item, String itemName) {
+            this.item = item;
+            this.itemName = itemName;
+        }
+
+        public String getItem() {
+            return item;
+        }
+
+        public void setItem(String item) {
+            this.item = item;
+        }
+
+        public String getItemName() {
+            return itemName;
+        }
+
+        public void setItemName(String itemName) {
+            this.itemName = itemName;
+        }
+    }
+
+    /**
+     * 订单业务类型:00:保税备货, 02:保税展示补货,10:保税展示跨境,11:普通商品
+     */
+    public enum orderBizType {
+        item_00("00", "保税备货"),
+        item_02("02", "保税展示补货"),
+        item_10("10", "保税展示跨境"),
+        item_11("11", "普通商品");
+
+        private String item;
+        private String itemName;
+
+        orderBizType(String item, String itemName) {
+            this.item = item;
+            this.itemName = itemName;
+        }
+
+        public String getItem() {
+            return item;
+        }
+
+        public void setItem(String item) {
+            this.item = item;
+        }
+
+        public String getItemName() {
+            return itemName;
+        }
+
+        public void setItemName(String itemName) {
+            this.itemName = itemName;
+        }
+    }
+
+    /**
+     * 商户返回核验结果,0:未知,1:一致,2:不一致
+     */
+    public enum merchReturnSubjectChecked {
+        item_0("0", "未知"),
+        item_1("1", "一致"),
+        item_2("2", "不一致");
+
+        private String item;
+        private String itemName;
+
+        merchReturnSubjectChecked(String item, String itemName) {
+            this.item = item;
+            this.itemName = itemName;
+        }
+
+        public String getItem() {
+            return item;
+        }
+
+        public void setItem(String item) {
+            this.item = item;
+        }
+
+        public String getItemName() {
+            return itemName;
+        }
+
+        public void setItemName(String itemName) {
+            this.itemName = itemName;
+        }
+    }
+    /**
+     * 平安返回核验结果,0:未知,1:一致,2:不一致
+     */
+    public enum pinganReturnSubjectChecked {
+        item_0("0", "未知"),
+        item_1("1", "一致"),
+        item_2("2", "不一致");
+
+        private String item;
+        private String itemName;
+
+        pinganReturnSubjectChecked(String item, String itemName) {
+            this.item = item;
+            this.itemName = itemName;
+        }
+
+        public String getItem() {
+            return item;
+        }
+
+        public void setItem(String item) {
+            this.item = item;
+        }
+
+        public String getItemName() {
+            return itemName;
+        }
+
+        public void setItemName(String itemName) {
+            this.itemName = itemName;
+        }
+    }
+
+    /**
+     * 校验结果状态 1:通过,2:不通过
+     */
+    public enum subjectChecked {
+        item_1("1", "通过"),
+        item_2("2", "不通过");
+
+        private String item;
+        private String itemName;
+
+        subjectChecked(String item, String itemName) {
+            this.item = item;
+            this.itemName = itemName;
+        }
+
+        public String getItem() {
+            return item;
+        }
+
+        public void setItem(String item) {
+            this.item = item;
+        }
+
+        public String getItemName() {
+            return itemName;
+        }
+
+        public void setItemName(String itemName) {
+            this.itemName = itemName;
+        }
+    }
+    /**
+     * 通知状态,0:待发送,1:发送中,2:成功,3:失败
+     */
+    public enum notiStatus {
+        item_0("0", "待发送"),
+        item_1("1", "发送中"),
+        item_2("2", "成功"),
+        item_3("3", "失败");
+
+        private String item;
+        private String itemName;
+
+        notiStatus(String item, String itemName) {
+            this.item = item;
+            this.itemName = itemName;
+        }
+
+        public String getItem() {
+            return item;
+        }
+
+        public void setItem(String item) {
+            this.item = item;
+        }
+
+        public String getItemName() {
+            return itemName;
+        }
+
+        public void setItemName(String itemName) {
+            this.itemName = itemName;
+        }
+    }
+    /**
+     * 是否停止通知,0:否,1:是
+     */
+    public enum isStop {
+        item_0("0", "否"),
+        item_1("1", "是");
+
+        private String item;
+        private String itemName;
+
+        isStop(String item, String itemName) {
+            this.item = item;
+            this.itemName = itemName;
+        }
+
+        public String getItem() {
+            return item;
+        }
+
+        public void setItem(String item) {
+            this.item = item;
+        }
+
+        public String getItemName() {
+            return itemName;
+        }
+
+        public void setItemName(String itemName) {
+            this.itemName = itemName;
+        }
+    }
+}

+ 7 - 1
kmall-api/src/main/java/com/kmall/api/dao/ApiCartMapper.java

@@ -3,17 +3,23 @@ package com.kmall.api.dao;
 import com.kmall.api.entity.CartVo;
 import org.apache.ibatis.annotations.Param;
 import com.kmall.common.dao.BaseDao;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
 
 /**
  * @author Scott
  * @email
  * @date 2017-08-11 09:14:25
  */
+@Component
 public interface ApiCartMapper extends BaseDao<CartVo> {
     void updateCheck(@Param("productIds") String[] productIds,
-                     @Param("isChecked") Integer isChecked, @Param("userId") Long userId, @Param("store_id") Long store_id);
+                     @Param("isChecked") Integer isChecked, @Param("user_id") Long userId, @Param("store_id") Long store_id);
 
     void deleteByProductIds(@Param("productIds") String[] productIds, @Param("store_id") Long store_id);
 
     void deleteByCart(@Param("user_id") Long user_id, @Param("store_id") Long store_id, @Param("checked") Integer checked);
+
+    List<CartVo> queryCartByGoodsBizType(@Param("goodsBizType") String goodsBizType);
 }

+ 2 - 0
kmall-api/src/main/java/com/kmall/api/dao/ApiCommentMapper.java

@@ -2,6 +2,7 @@ package com.kmall.api.dao;
 
 import com.kmall.api.entity.CommentVo;
 import com.kmall.common.dao.BaseDao;
+import org.springframework.stereotype.Component;
 
 import java.util.List;
 import java.util.Map;
@@ -11,6 +12,7 @@ import java.util.Map;
  * @email
  * @date 2017-08-11 09:14:26
  */
+@Component
 public interface ApiCommentMapper extends BaseDao<CommentVo> {
     int queryhasPicTotal(Map<String, Object> map);
 

+ 2 - 0
kmall-api/src/main/java/com/kmall/api/dao/ApiCommentPictureMapper.java

@@ -2,6 +2,7 @@ package com.kmall.api.dao;
 
 import com.kmall.api.entity.CommentPictureVo;
 import com.kmall.common.dao.BaseDao;
+import org.springframework.stereotype.Component;
 
 /**
  * 
@@ -10,6 +11,7 @@ import com.kmall.common.dao.BaseDao;
  * @email
  * @date 2017-08-11 09:14:26
  */
+@Component
 public interface ApiCommentPictureMapper extends BaseDao<CommentPictureVo> {
 	
 }

+ 2 - 0
kmall-api/src/main/java/com/kmall/api/dao/ApiCouponMapper.java

@@ -2,6 +2,7 @@ package com.kmall.api.dao;
 
 import com.kmall.api.entity.CouponVo;
 import com.kmall.common.dao.BaseDao;
+import org.springframework.stereotype.Component;
 
 import java.util.List;
 import java.util.Map;
@@ -11,6 +12,7 @@ import java.util.Map;
  * @email
  * @date 2017-08-11 09:16:46
  */
+@Component
 public interface ApiCouponMapper extends BaseDao<CouponVo> {
     /**
      * 按条件查询用户优惠券

+ 2 - 0
kmall-api/src/main/java/com/kmall/api/dao/ApiGoodsGroupOpenDetailMapper.java

@@ -2,6 +2,7 @@ package com.kmall.api.dao;
 
 import com.kmall.api.entity.GoodsGroupOpenDetailVo;
 import com.kmall.common.dao.BaseDao;
+import org.springframework.stereotype.Component;
 
 import java.util.Map;
 
@@ -12,6 +13,7 @@ import java.util.Map;
  * @email
  * @date 2017-10-18 16:00:50
  */
+@Component
 public interface ApiGoodsGroupOpenDetailMapper extends BaseDao<GoodsGroupOpenDetailVo> {
     int updateComplete(Map<String, Object> params);
 }

+ 2 - 0
kmall-api/src/main/java/com/kmall/api/dao/ApiGoodsGroupOpenMapper.java

@@ -2,6 +2,7 @@ package com.kmall.api.dao;
 
 import com.kmall.api.entity.GoodsGroupOpenVo;
 import com.kmall.common.dao.BaseDao;
+import org.springframework.stereotype.Component;
 
 /**
  * Dao
@@ -10,6 +11,7 @@ import com.kmall.common.dao.BaseDao;
  * @email
  * @date 2017-10-18 16:00:50
  */
+@Component
 public interface ApiGoodsGroupOpenMapper extends BaseDao<GoodsGroupOpenVo> {
 
 }

+ 2 - 0
kmall-api/src/main/java/com/kmall/api/dao/ApiGoodsMapper.java

@@ -3,6 +3,7 @@ package com.kmall.api.dao;
 import com.kmall.api.entity.GoodsVo;
 import com.kmall.common.dao.BaseDao;
 import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Component;
 
 import java.util.List;
 import java.util.Map;
@@ -12,6 +13,7 @@ import java.util.Map;
  * @email
  * @date 2017-08-11 09:16:45
  */
+@Component
 public interface ApiGoodsMapper extends BaseDao<GoodsVo> {
 
     List<GoodsVo> queryHotGoodsList(Map<String, Object> params);

+ 6 - 0
kmall-api/src/main/java/com/kmall/api/dao/ApiOrderGoodsMapper.java

@@ -2,6 +2,10 @@ package com.kmall.api.dao;
 
 import com.kmall.api.entity.OrderGoodsVo;
 import com.kmall.common.dao.BaseDao;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
 
 /**
  * 
@@ -10,6 +14,8 @@ import com.kmall.common.dao.BaseDao;
  * @email
  * @date 2017-08-11 09:16:46
  */
+@Component
 public interface ApiOrderGoodsMapper extends BaseDao<OrderGoodsVo> {
+    List<OrderGoodsVo> queryListByIds(@Param("orderIdList")List<Long> orderIdList);
 	
 }

+ 5 - 0
kmall-api/src/main/java/com/kmall/api/dao/ApiOrderMapper.java

@@ -3,7 +3,9 @@ package com.kmall.api.dao;
 import com.kmall.api.entity.OrderVo;
 import com.kmall.common.dao.BaseDao;
 import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Component;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -11,6 +13,7 @@ import java.util.Map;
  * @email
  * @date 2017-08-11 09:16:46
  */
+@Component
 public interface ApiOrderMapper extends BaseDao<OrderVo> {
     void riderOrderUpdate(OrderVo orderVo);
 
@@ -29,4 +32,6 @@ public interface ApiOrderMapper extends BaseDao<OrderVo> {
      * @return
      */
     Map queryUcenterMap(Map<String, Object> map);
+
+    List<OrderVo> queryObjectByIdList(@Param("orderIdList")List<Long> orderIdList);
 }

+ 2 - 0
kmall-api/src/main/java/com/kmall/api/dao/ApiProductMapper.java

@@ -3,12 +3,14 @@ package com.kmall.api.dao;
 import com.kmall.api.entity.ProductVo;
 import org.apache.ibatis.annotations.Param;
 import com.kmall.common.dao.BaseDao;
+import org.springframework.stereotype.Component;
 
 /**
  * @author Scott
  * @email
  * @date 2017-08-11 09:16:46
  */
+@Component
 public interface ApiProductMapper extends BaseDao<ProductVo> {
     ProductVo queryObjectByStoreId(@Param("id") Long id, @Param("store_id") Long store_id);
 

+ 2 - 0
kmall-api/src/main/java/com/kmall/api/dao/ApiSysPrinterMapper.java

@@ -2,6 +2,7 @@ package com.kmall.api.dao;
 
 import com.kmall.api.entity.SysPrinterVo;
 import com.kmall.common.dao.BaseDao;
+import org.springframework.stereotype.Component;
 
 /**
  * 打印机
@@ -10,5 +11,6 @@ import com.kmall.common.dao.BaseDao;
  * @email
  * @date 2017-03-23 15:22:06
  */
+@Component
 public interface ApiSysPrinterMapper extends BaseDao<SysPrinterVo> {
 }

+ 2 - 0
kmall-api/src/main/java/com/kmall/api/dao/ApiUserCouponMapper.java

@@ -3,12 +3,14 @@ package com.kmall.api.dao;
 import com.kmall.api.entity.UserCouponVo;
 import org.apache.ibatis.annotations.Param;
 import com.kmall.common.dao.BaseDao;
+import org.springframework.stereotype.Component;
 
 /**
  * @author Scott
  * @email
  * @date 2017-08-11 09:16:47
  */
+@Component
 public interface ApiUserCouponMapper extends BaseDao<UserCouponVo> {
     UserCouponVo queryByCouponNumber(@Param("coupon_number") String coupon_number);
 

+ 2 - 0
kmall-api/src/main/java/com/kmall/api/dao/ApiUserLevelMapper.java

@@ -2,6 +2,7 @@ package com.kmall.api.dao;
 
 import com.kmall.api.entity.UserLevelVo;
 import com.kmall.common.dao.BaseDao;
+import org.springframework.stereotype.Component;
 
 /**
  * 商城_用户级别
@@ -10,6 +11,7 @@ import com.kmall.common.dao.BaseDao;
  * @email
  * @date 2017-08-11 09:16:47
  */
+@Component
 public interface ApiUserLevelMapper extends BaseDao<UserLevelVo> {
 	
 }

+ 4 - 0
kmall-api/src/main/java/com/kmall/api/dao/ApiUserMapper.java

@@ -4,6 +4,7 @@ import com.kmall.api.entity.SmsLogVo;
 import com.kmall.api.entity.UserVo;
 import org.apache.ibatis.annotations.Param;
 import com.kmall.common.dao.BaseDao;
+import org.springframework.stereotype.Component;
 
 /**
  * 用户
@@ -12,6 +13,7 @@ import com.kmall.common.dao.BaseDao;
  * @email
  * @date 2017-03-23 15:22:06
  */
+@Component
 public interface ApiUserMapper extends BaseDao<UserVo> {
 
     UserVo queryByMobile(String mobile);
@@ -33,4 +35,6 @@ public interface ApiUserMapper extends BaseDao<UserVo> {
      * @return
      */
     int saveSmsCodeLog(SmsLogVo smsLogVo);
+
+    UserVo queryObject(Integer id);
 }

+ 13 - 0
kmall-api/src/main/java/com/kmall/api/dao/MallMngChangeMapper.java

@@ -0,0 +1,13 @@
+package com.kmall.api.dao;
+
+import com.kmall.api.entity.AddressVo;
+import com.kmall.api.entity.MallMngChange;
+import com.kmall.common.dao.BaseDao;
+
+import java.util.List;
+
+public interface MallMngChangeMapper extends BaseDao<AddressVo> {
+
+    MallMngChange selectByPrimaryKey(Integer id);
+
+}

+ 12 - 0
kmall-api/src/main/java/com/kmall/api/dao/MallOrderExceptionRecordMapper.java

@@ -0,0 +1,12 @@
+package com.kmall.api.dao;
+
+import com.kmall.api.entity.AddressVo;
+import com.kmall.api.entity.MallOrderExceptionRecord;
+import com.kmall.common.dao.BaseDao;
+
+import java.util.List;
+
+public interface MallOrderExceptionRecordMapper  extends BaseDao<AddressVo> {
+
+    MallOrderExceptionRecord selectByPrimaryKey(Integer id);
+}

+ 10 - 0
kmall-api/src/main/java/com/kmall/api/dao/MallOrderProcessRecordMapper.java

@@ -0,0 +1,10 @@
+package com.kmall.api.dao;
+
+import com.kmall.api.entity.AddressVo;
+import com.kmall.api.entity.MallOrderProcessRecord;
+import com.kmall.common.dao.BaseDao;
+
+public interface MallOrderProcessRecordMapper  extends BaseDao<AddressVo> {
+
+    MallOrderProcessRecord selectByPrimaryKey(Integer id);
+}

+ 9 - 0
kmall-api/src/main/java/com/kmall/api/dao/MallOrderRefundMapper.java

@@ -0,0 +1,9 @@
+package com.kmall.api.dao;
+
+import com.kmall.api.entity.AddressVo;
+import com.kmall.api.entity.MallOrderRefund;
+import com.kmall.common.dao.BaseDao;
+
+public interface MallOrderRefundMapper  extends BaseDao<AddressVo> {
+    MallOrderRefund selectByPrimaryKey(Integer id);
+}

+ 10 - 0
kmall-api/src/main/java/com/kmall/api/dao/MallStoreGoodsGalleryMapper.java

@@ -0,0 +1,10 @@
+package com.kmall.api.dao;
+
+import com.kmall.api.entity.AddressVo;
+import com.kmall.api.entity.MallStoreGoodsGallery;
+import com.kmall.common.dao.BaseDao;
+
+public interface MallStoreGoodsGalleryMapper  extends BaseDao<AddressVo> {
+
+    MallStoreGoodsGallery selectByPrimaryKey(Integer id);
+}

+ 10 - 0
kmall-api/src/main/java/com/kmall/api/dao/MallStoreMngChangeMapper.java

@@ -0,0 +1,10 @@
+package com.kmall.api.dao;
+
+import com.kmall.api.entity.AddressVo;
+import com.kmall.api.entity.MallStoreMngChange;
+import com.kmall.common.dao.BaseDao;
+
+public interface MallStoreMngChangeMapper extends BaseDao<AddressVo> {
+
+    MallStoreMngChange selectByPrimaryKey(Integer id);
+}

+ 9 - 0
kmall-api/src/main/java/com/kmall/api/dao/MallStoreMngMapper.java

@@ -0,0 +1,9 @@
+package com.kmall.api.dao;
+
+import com.kmall.api.entity.AddressVo;
+import com.kmall.api.entity.MallStoreMng;
+import com.kmall.common.dao.BaseDao;
+
+public interface MallStoreMngMapper extends BaseDao<AddressVo> {
+    MallStoreMng selectByPrimaryKey(Integer id);
+}

+ 10 - 0
kmall-api/src/main/java/com/kmall/api/dao/MallUserCollectionMapper.java

@@ -0,0 +1,10 @@
+package com.kmall.api.dao;
+
+import com.kmall.api.entity.AddressVo;
+import com.kmall.api.entity.MallUserCollection;
+import com.kmall.common.dao.BaseDao;
+
+public interface MallUserCollectionMapper extends BaseDao<AddressVo> {
+    MallUserCollection selectByPrimaryKey(Integer id);
+
+}

+ 15 - 0
kmall-api/src/main/java/com/kmall/api/dao/PayerChildOrderRealMapper.java

@@ -0,0 +1,15 @@
+package com.kmall.api.dao;
+
+import com.kmall.api.entity.PayerChildOrderRealEntity;
+import com.kmall.common.dao.BaseDao;
+
+/**
+ * 支付单子订单关联记录表Dao
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2018-10-11 14:38:15
+ */
+public interface PayerChildOrderRealMapper extends BaseDao<PayerChildOrderRealEntity> {
+
+}

+ 9 - 0
kmall-api/src/main/java/com/kmall/api/dao/SysExceptionRecordMapper.java

@@ -0,0 +1,9 @@
+package com.kmall.api.dao;
+
+import com.kmall.api.entity.AddressVo;
+import com.kmall.api.entity.SysExceptionRecord;
+import com.kmall.common.dao.BaseDao;
+
+public interface SysExceptionRecordMapper extends BaseDao<AddressVo> {
+    SysExceptionRecord selectByPrimaryKey(Integer id);
+}

+ 10 - 0
kmall-api/src/main/java/com/kmall/api/dao/SysParamMapper.java

@@ -0,0 +1,10 @@
+package com.kmall.api.dao;
+
+import com.kmall.api.entity.AddressVo;
+import com.kmall.api.entity.SysParam;
+import com.kmall.common.dao.BaseDao;
+
+public interface SysParamMapper extends BaseDao<AddressVo> {
+
+    SysParam selectByPrimaryKey(Integer paramId);
+}

+ 38 - 0
kmall-api/src/main/java/com/kmall/api/dto/SendMsgVo.java

@@ -0,0 +1,38 @@
+package com.kmall.api.dto;
+
+/**
+ * @author huangyaqin
+ * @version 1.0
+ * 2018-10-16 14:23
+ */
+public class SendMsgVo {
+    private String code;
+
+    private String msg;
+
+    private String result;
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public String getResult() {
+        return result;
+    }
+
+    public void setResult(String result) {
+        this.result = result;
+    }
+}

+ 37 - 36
kmall-api/src/main/java/com/kmall/api/entity/AdVo.java

@@ -1,6 +1,7 @@
 package com.kmall.api.entity;
 
 import java.io.Serializable;
+import java.util.Date;
 
 
 /**
@@ -14,19 +15,19 @@ public class AdVo implements Serializable {
     //主键
     private Integer id;
     //广告位置Id
-    private Integer ad_position_id;
+    private Integer adPositionId;
     //形式 0 普通 1活动广告 2新用户注册
-    private Integer media_type;
+    private Integer mediaType;
     //广告名称
     private String name;
     //链接
     private String link;
     //图片
-    private String image_url;
+    private String imageUrl;
     //内容
     private String content;
     //结束时间
-    private Integer end_time;
+    private Date endTime;
     //状态
     private Integer enabled;
 
@@ -38,22 +39,6 @@ public class AdVo implements Serializable {
         this.id = id;
     }
 
-    public Integer getAd_position_id() {
-        return ad_position_id;
-    }
-
-    public void setAd_position_id(Integer ad_position_id) {
-        this.ad_position_id = ad_position_id;
-    }
-
-    public Integer getMedia_type() {
-        return media_type;
-    }
-
-    public void setMedia_type(Integer media_type) {
-        this.media_type = media_type;
-    }
-
     public String getName() {
         return name;
     }
@@ -70,14 +55,6 @@ public class AdVo implements Serializable {
         this.link = link;
     }
 
-    public String getImage_url() {
-        return image_url;
-    }
-
-    public void setImage_url(String image_url) {
-        this.image_url = image_url;
-    }
-
     public String getContent() {
         return content;
     }
@@ -86,14 +63,6 @@ public class AdVo implements Serializable {
         this.content = content;
     }
 
-    public Integer getEnd_time() {
-        return end_time;
-    }
-
-    public void setEnd_time(Integer end_time) {
-        this.end_time = end_time;
-    }
-
     public Integer getEnabled() {
         return enabled;
     }
@@ -101,4 +70,36 @@ public class AdVo implements Serializable {
     public void setEnabled(Integer enabled) {
         this.enabled = enabled;
     }
+
+    public Integer getAdPositionId() {
+        return adPositionId;
+    }
+
+    public void setAdPositionId(Integer adPositionId) {
+        this.adPositionId = adPositionId;
+    }
+
+    public Integer getMediaType() {
+        return mediaType;
+    }
+
+    public void setMediaType(Integer mediaType) {
+        this.mediaType = mediaType;
+    }
+
+    public String getImageUrl() {
+        return imageUrl;
+    }
+
+    public void setImageUrl(String imageUrl) {
+        this.imageUrl = imageUrl;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
 }

+ 82 - 0
kmall-api/src/main/java/com/kmall/api/entity/CartVo.java

@@ -2,6 +2,7 @@ package com.kmall.api.entity;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.util.Date;
 
 
 /**
@@ -46,6 +47,87 @@ public class CartVo implements Serializable {
     //商品图片
     private String list_pic_url;
 
+
+    private String sku;
+
+    private String goodsBizType;
+
+    private String goodsBizTypeName;
+
+    private String createrSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
+    private Date tstm;
+
+    public String getGoodsBizTypeName() {
+        return goodsBizTypeName;
+    }
+
+    public void setGoodsBizTypeName(String goodsBizTypeName) {
+        this.goodsBizTypeName = goodsBizTypeName;
+    }
+
+    public String getSku() {
+        return sku;
+    }
+
+    public void setSku(String sku) {
+        this.sku = sku;
+    }
+
+    public String getGoodsBizType() {
+        return goodsBizType;
+    }
+
+    public void setGoodsBizType(String goodsBizType) {
+        this.goodsBizType = goodsBizType;
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn;
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+
     public Long getId() {
         return id;
     }

+ 84 - 3
kmall-api/src/main/java/com/kmall/api/entity/GoodsVo.java

@@ -2,6 +2,7 @@ package com.kmall.api.entity;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.util.Date;
 
 
 /**
@@ -33,7 +34,7 @@ public class GoodsVo implements Serializable {
     //上架
     private Integer is_on_sale;
     //添加时间
-    private Integer add_time;
+    private Date add_time;
     //排序
     private Integer sort_order;
     //删除状态
@@ -84,6 +85,86 @@ public class GoodsVo implements Serializable {
     // 团购Id
     private Long group_id;
 
+    private String sku;
+
+    private String goodsBizType;
+
+    private String createrSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
+    private Date tstm;
+
+    private BigDecimal goodsRate;
+
+    public BigDecimal getGoodsRate() {
+        return goodsRate;
+    }
+
+    public void setGoodsRate(BigDecimal goodsRate) {
+        this.goodsRate = goodsRate;
+    }
+
+    public String getSku() {
+        return sku;
+    }
+
+    public void setSku(String sku) {
+        this.sku = sku;
+    }
+
+    public String getGoodsBizType() {
+        return goodsBizType;
+    }
+
+    public void setGoodsBizType(String goodsBizType) {
+        this.goodsBizType = goodsBizType;
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn;
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+
     public Long getId() {
         return id;
     }
@@ -164,11 +245,11 @@ public class GoodsVo implements Serializable {
         this.is_on_sale = is_on_sale;
     }
 
-    public Integer getAdd_time() {
+    public Date getAdd_time() {
         return add_time;
     }
 
-    public void setAdd_time(Integer add_time) {
+    public void setAdd_time(Date add_time) {
         this.add_time = add_time;
     }
 

+ 132 - 0
kmall-api/src/main/java/com/kmall/api/entity/MallMngChange.java

@@ -0,0 +1,132 @@
+package com.kmall.api.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class MallMngChange implements Serializable {
+    private Integer id;
+
+    private Integer changeNum;
+
+    private Integer originalNum;
+
+    private Integer validNum;
+
+    private String merchSn;
+
+    private String sku;
+
+    private Integer isValid;
+
+    private String createrSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
+    private Date tstm;
+
+    private static final long serialVersionUID = 1L;
+
+    public MallMngChange() {
+        super();
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getChangeNum() {
+        return changeNum;
+    }
+
+    public void setChangeNum(Integer changeNum) {
+        this.changeNum = changeNum;
+    }
+
+    public Integer getOriginalNum() {
+        return originalNum;
+    }
+
+    public void setOriginalNum(Integer originalNum) {
+        this.originalNum = originalNum;
+    }
+
+    public Integer getValidNum() {
+        return validNum;
+    }
+
+    public void setValidNum(Integer validNum) {
+        this.validNum = validNum;
+    }
+
+    public String getMerchSn() {
+        return merchSn;
+    }
+
+    public void setMerchSn(String merchSn) {
+        this.merchSn = merchSn == null ? null : merchSn.trim();
+    }
+
+    public String getSku() {
+        return sku;
+    }
+
+    public void setSku(String sku) {
+        this.sku = sku == null ? null : sku.trim();
+    }
+
+    public Integer getIsValid() {
+        return isValid;
+    }
+
+    public void setIsValid(Integer isValid) {
+        this.isValid = isValid;
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn == null ? null : createrSn.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn == null ? null : moderSn.trim();
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+}

+ 112 - 0
kmall-api/src/main/java/com/kmall/api/entity/MallOrderExceptionRecord.java

@@ -0,0 +1,112 @@
+package com.kmall.api.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class MallOrderExceptionRecord implements Serializable {
+    private Integer id;
+
+    private String orderSn;
+
+    private Integer userId;
+
+    private String exceptionContent;
+
+    private String exceptionStatus;
+
+    private String createrSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
+    private Date tstm;
+
+    private static final long serialVersionUID = 1L;
+
+    public MallOrderExceptionRecord() {
+        super();
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getOrderSn() {
+        return orderSn;
+    }
+
+    public void setOrderSn(String orderSn) {
+        this.orderSn = orderSn == null ? null : orderSn.trim();
+    }
+
+    public Integer getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
+    public String getExceptionContent() {
+        return exceptionContent;
+    }
+
+    public void setExceptionContent(String exceptionContent) {
+        this.exceptionContent = exceptionContent == null ? null : exceptionContent.trim();
+    }
+
+    public String getExceptionStatus() {
+        return exceptionStatus;
+    }
+
+    public void setExceptionStatus(String exceptionStatus) {
+        this.exceptionStatus = exceptionStatus == null ? null : exceptionStatus.trim();
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn == null ? null : createrSn.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn == null ? null : moderSn.trim();
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+}

+ 112 - 0
kmall-api/src/main/java/com/kmall/api/entity/MallOrderProcessRecord.java

@@ -0,0 +1,112 @@
+package com.kmall.api.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class MallOrderProcessRecord implements Serializable {
+    private Integer id;
+
+    private String orderSn;
+
+    private Integer userId;
+
+    private String processStatus;
+
+    private String processContent;
+
+    private String createrSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
+    private Date tstm;
+
+    private static final long serialVersionUID = 1L;
+
+    public MallOrderProcessRecord() {
+        super();
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getOrderSn() {
+        return orderSn;
+    }
+
+    public void setOrderSn(String orderSn) {
+        this.orderSn = orderSn == null ? null : orderSn.trim();
+    }
+
+    public Integer getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
+    public String getProcessStatus() {
+        return processStatus;
+    }
+
+    public void setProcessStatus(String processStatus) {
+        this.processStatus = processStatus == null ? null : processStatus.trim();
+    }
+
+    public String getProcessContent() {
+        return processContent;
+    }
+
+    public void setProcessContent(String processContent) {
+        this.processContent = processContent == null ? null : processContent.trim();
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn == null ? null : createrSn.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn == null ? null : moderSn.trim();
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+}

+ 183 - 0
kmall-api/src/main/java/com/kmall/api/entity/MallOrderRefund.java

@@ -0,0 +1,183 @@
+package com.kmall.api.entity;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class MallOrderRefund implements Serializable {
+    private Integer id;
+
+    private Integer orderId;
+
+    private Integer userId;
+
+    private Byte refundType;
+
+    private Date refundTime;
+
+    private String creator;
+
+    private BigDecimal refundMoney;
+
+    private Byte refundStatus;
+
+    private String refundReason;
+
+    private String approver;
+
+    private Date approvalTime;
+
+    private String approvalRemark;
+
+    private String createSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
+    private Date tstm;
+
+    private static final long serialVersionUID = 1L;
+
+    public MallOrderRefund() {
+        super();
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getOrderId() {
+        return orderId;
+    }
+
+    public void setOrderId(Integer orderId) {
+        this.orderId = orderId;
+    }
+
+    public Integer getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
+    public Byte getRefundType() {
+        return refundType;
+    }
+
+    public void setRefundType(Byte refundType) {
+        this.refundType = refundType;
+    }
+
+    public Date getRefundTime() {
+        return refundTime;
+    }
+
+    public void setRefundTime(Date refundTime) {
+        this.refundTime = refundTime;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator == null ? null : creator.trim();
+    }
+
+    public BigDecimal getRefundMoney() {
+        return refundMoney;
+    }
+
+    public void setRefundMoney(BigDecimal refundMoney) {
+        this.refundMoney = refundMoney;
+    }
+
+    public Byte getRefundStatus() {
+        return refundStatus;
+    }
+
+    public void setRefundStatus(Byte refundStatus) {
+        this.refundStatus = refundStatus;
+    }
+
+    public String getRefundReason() {
+        return refundReason;
+    }
+
+    public void setRefundReason(String refundReason) {
+        this.refundReason = refundReason == null ? null : refundReason.trim();
+    }
+
+    public String getApprover() {
+        return approver;
+    }
+
+    public void setApprover(String approver) {
+        this.approver = approver == null ? null : approver.trim();
+    }
+
+    public Date getApprovalTime() {
+        return approvalTime;
+    }
+
+    public void setApprovalTime(Date approvalTime) {
+        this.approvalTime = approvalTime;
+    }
+
+    public String getApprovalRemark() {
+        return approvalRemark;
+    }
+
+    public void setApprovalRemark(String approvalRemark) {
+        this.approvalRemark = approvalRemark == null ? null : approvalRemark.trim();
+    }
+
+    public String getCreateSn() {
+        return createSn;
+    }
+
+    public void setCreateSn(String createSn) {
+        this.createSn = createSn == null ? null : createSn.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn == null ? null : moderSn.trim();
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+}

+ 132 - 0
kmall-api/src/main/java/com/kmall/api/entity/MallStoreGoodsGallery.java

@@ -0,0 +1,132 @@
+package com.kmall.api.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class MallStoreGoodsGallery implements Serializable {
+    private Integer id;
+
+    private Integer goodsId;
+
+    private Integer productStoreId;
+
+    private String imgDesc;
+
+    private Integer sortOrder;
+
+    private String imgUrl;
+
+    private String goodsBizType;
+
+    private String createrSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
+    private Date tstm;
+
+    private static final long serialVersionUID = 1L;
+
+    public MallStoreGoodsGallery() {
+        super();
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getGoodsId() {
+        return goodsId;
+    }
+
+    public void setGoodsId(Integer goodsId) {
+        this.goodsId = goodsId;
+    }
+
+    public Integer getProductStoreId() {
+        return productStoreId;
+    }
+
+    public void setProductStoreId(Integer productStoreId) {
+        this.productStoreId = productStoreId;
+    }
+
+    public String getImgDesc() {
+        return imgDesc;
+    }
+
+    public void setImgDesc(String imgDesc) {
+        this.imgDesc = imgDesc == null ? null : imgDesc.trim();
+    }
+
+    public Integer getSortOrder() {
+        return sortOrder;
+    }
+
+    public void setSortOrder(Integer sortOrder) {
+        this.sortOrder = sortOrder;
+    }
+
+    public String getImgUrl() {
+        return imgUrl;
+    }
+
+    public void setImgUrl(String imgUrl) {
+        this.imgUrl = imgUrl == null ? null : imgUrl.trim();
+    }
+
+    public String getGoodsBizType() {
+        return goodsBizType;
+    }
+
+    public void setGoodsBizType(String goodsBizType) {
+        this.goodsBizType = goodsBizType == null ? null : goodsBizType.trim();
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn == null ? null : createrSn.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn == null ? null : moderSn.trim();
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+}

+ 142 - 0
kmall-api/src/main/java/com/kmall/api/entity/MallStoreMng.java

@@ -0,0 +1,142 @@
+package com.kmall.api.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class MallStoreMng implements Serializable {
+    private Integer id;
+
+    private Integer mallStoreId;
+
+    private String sku;
+
+    private String goodsBizType;
+
+    private Integer storeNum;
+
+    private Integer storeValidNum;
+
+    private Integer storeFreezeNum;
+
+    private Integer isValid;
+
+    private String createrSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
+    private Date tstm;
+
+    private static final long serialVersionUID = 1L;
+
+    public MallStoreMng() {
+        super();
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getMallStoreId() {
+        return mallStoreId;
+    }
+
+    public void setMallStoreId(Integer mallStoreId) {
+        this.mallStoreId = mallStoreId;
+    }
+
+    public String getSku() {
+        return sku;
+    }
+
+    public void setSku(String sku) {
+        this.sku = sku == null ? null : sku.trim();
+    }
+
+    public String getGoodsBizType() {
+        return goodsBizType;
+    }
+
+    public void setGoodsBizType(String goodsBizType) {
+        this.goodsBizType = goodsBizType == null ? null : goodsBizType.trim();
+    }
+
+    public Integer getStoreNum() {
+        return storeNum;
+    }
+
+    public void setStoreNum(Integer storeNum) {
+        this.storeNum = storeNum;
+    }
+
+    public Integer getStoreValidNum() {
+        return storeValidNum;
+    }
+
+    public void setStoreValidNum(Integer storeValidNum) {
+        this.storeValidNum = storeValidNum;
+    }
+
+    public Integer getStoreFreezeNum() {
+        return storeFreezeNum;
+    }
+
+    public void setStoreFreezeNum(Integer storeFreezeNum) {
+        this.storeFreezeNum = storeFreezeNum;
+    }
+
+    public Integer getIsValid() {
+        return isValid;
+    }
+
+    public void setIsValid(Integer isValid) {
+        this.isValid = isValid;
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn == null ? null : createrSn.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn == null ? null : moderSn.trim();
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+}

+ 142 - 0
kmall-api/src/main/java/com/kmall/api/entity/MallStoreMngChange.java

@@ -0,0 +1,142 @@
+package com.kmall.api.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class MallStoreMngChange implements Serializable {
+    private Integer id;
+
+    private Integer storeChangeNum;
+
+    private Integer storeOriginalNum;
+
+    private Integer storeValidNum;
+
+    private String merchSn;
+
+    private Integer storeId;
+
+    private String sku;
+
+    private Integer isValid;
+
+    private String createrSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
+    private Date tstm;
+
+    private static final long serialVersionUID = 1L;
+
+    public MallStoreMngChange() {
+        super();
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getStoreChangeNum() {
+        return storeChangeNum;
+    }
+
+    public void setStoreChangeNum(Integer storeChangeNum) {
+        this.storeChangeNum = storeChangeNum;
+    }
+
+    public Integer getStoreOriginalNum() {
+        return storeOriginalNum;
+    }
+
+    public void setStoreOriginalNum(Integer storeOriginalNum) {
+        this.storeOriginalNum = storeOriginalNum;
+    }
+
+    public Integer getStoreValidNum() {
+        return storeValidNum;
+    }
+
+    public void setStoreValidNum(Integer storeValidNum) {
+        this.storeValidNum = storeValidNum;
+    }
+
+    public String getMerchSn() {
+        return merchSn;
+    }
+
+    public void setMerchSn(String merchSn) {
+        this.merchSn = merchSn == null ? null : merchSn.trim();
+    }
+
+    public Integer getStoreId() {
+        return storeId;
+    }
+
+    public void setStoreId(Integer storeId) {
+        this.storeId = storeId;
+    }
+
+    public String getSku() {
+        return sku;
+    }
+
+    public void setSku(String sku) {
+        this.sku = sku == null ? null : sku.trim();
+    }
+
+    public Integer getIsValid() {
+        return isValid;
+    }
+
+    public void setIsValid(Integer isValid) {
+        this.isValid = isValid;
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn == null ? null : createrSn.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn == null ? null : moderSn.trim();
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+}

+ 92 - 0
kmall-api/src/main/java/com/kmall/api/entity/MallUserCollection.java

@@ -0,0 +1,92 @@
+package com.kmall.api.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class MallUserCollection implements Serializable {
+    private Integer id;
+
+    private Integer userId;
+
+    private Integer goodId;
+
+    private String createrSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
+    private Date tstm;
+
+    private static final long serialVersionUID = 1L;
+
+    public MallUserCollection() {
+        super();
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
+    public Integer getGoodId() {
+        return goodId;
+    }
+
+    public void setGoodId(Integer goodId) {
+        this.goodId = goodId;
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn == null ? null : createrSn.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn == null ? null : moderSn.trim();
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+}

+ 93 - 0
kmall-api/src/main/java/com/kmall/api/entity/OrderGoodsVo.java

@@ -2,6 +2,7 @@ package com.kmall.api.entity;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.util.Date;
 
 
 /**
@@ -39,6 +40,98 @@ public class OrderGoodsVo implements Serializable {
     //图片链接
     private String list_pic_url;
 
+
+
+    private String sku;
+
+    private String orderBizType;
+
+    private String createrSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
+    private Date tstm;
+
+    private BigDecimal goodsRate;
+
+    private BigDecimal settlePrice;
+
+    public BigDecimal getGoodsRate() {
+        return goodsRate;
+    }
+
+    public void setGoodsRate(BigDecimal goodsRate) {
+        this.goodsRate = goodsRate;
+    }
+
+    public BigDecimal getSettlePrice() {
+        return settlePrice;
+    }
+
+    public void setSettlePrice(BigDecimal settlePrice) {
+        this.settlePrice = settlePrice;
+    }
+
+    public String getSku() {
+        return sku;
+    }
+
+    public void setSku(String sku) {
+        this.sku = sku;
+    }
+
+    public String getOrderBizType() {
+        return orderBizType;
+    }
+
+    public void setOrderBizType(String orderBizType) {
+        this.orderBizType = orderBizType;
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn;
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+
     public Long getId() {
         return id;
     }

+ 142 - 1
kmall-api/src/main/java/com/kmall/api/entity/OrderVo.java

@@ -19,7 +19,7 @@ public class OrderVo implements Serializable {
 
     //主键
     private Long id;
-    //订单序列号
+    //订单序列号:商户(拼音首字母)+业务类型+编号
     private String order_sn;
     //会员Id
     private Long user_id;
@@ -130,6 +130,147 @@ public class OrderVo implements Serializable {
     // 配送中的骑手位置
     private List<GeometryMarker> markers;
 
+    private String payTransactionId;
+
+    private String payMobile;
+
+
+    private String merchSn;
+
+    private String sku;
+
+    private String orderBizType;
+
+    private String buyerPayCheck;
+
+    private String payFlag;
+
+    private String createrSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
+    private Date tstm;
+
+    private String merchOrderSn;
+
+    private String isScan;
+
+    public String getIsScan() {
+        return isScan;
+    }
+
+    public void setIsScan(String isScan) {
+        this.isScan = isScan;
+    }
+
+    public String getMerchOrderSn() {
+        return merchOrderSn;
+    }
+
+    public void setMerchOrderSn(String merchOrderSn) {
+        this.merchOrderSn = merchOrderSn;
+    }
+
+    public String getSku() {
+        return sku;
+    }
+
+    public void setSku(String sku) {
+        this.sku = sku;
+    }
+
+    public String getPayTransactionId() {
+        return payTransactionId;
+    }
+
+    public void setPayTransactionId(String payTransactionId) {
+        this.payTransactionId = payTransactionId;
+    }
+
+    public String getPayMobile() {
+        return payMobile;
+    }
+
+    public void setPayMobile(String payMobile) {
+        this.payMobile = payMobile;
+    }
+
+    public String getMerchSn() {
+        return merchSn;
+    }
+
+    public void setMerchSn(String merchSn) {
+        this.merchSn = merchSn;
+    }
+
+    public String getOrderBizType() {
+        return orderBizType;
+    }
+
+    public void setOrderBizType(String orderBizType) {
+        this.orderBizType = orderBizType;
+    }
+
+    public String getBuyerPayCheck() {
+        return buyerPayCheck;
+    }
+
+    public void setBuyerPayCheck(String buyerPayCheck) {
+        this.buyerPayCheck = buyerPayCheck;
+    }
+
+    public String getPayFlag() {
+        return payFlag;
+    }
+
+    public void setPayFlag(String payFlag) {
+        this.payFlag = payFlag;
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn;
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+
     public Long getId() {
         return id;
     }

+ 239 - 0
kmall-api/src/main/java/com/kmall/api/entity/PayerChildOrderRealEntity.java

@@ -0,0 +1,239 @@
+package com.kmall.api.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 支付单子订单关联记录表实体
+ * 表名 mall_payer_child_order_real
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2018-10-19 16:14:30
+ */
+public class PayerChildOrderRealEntity implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编号
+     */
+    private Integer id;
+    /**
+     * 订单编号
+     */
+    private String orderSn;
+    /**
+     * 用户编号
+     */
+    private Integer userId;
+    /**
+     * 商户订单号
+     */
+    private String merchOrderSn;
+    /**
+     * 支付单编号
+     */
+    private String payNo;
+    /**
+     * 商户编号
+     */
+    private String merchSn;
+    /**
+     * 子订单实付金额
+     */
+    private Integer payPrice;
+    /**
+     * 货品业务类型, 01:保税展示店提,02:一般贸易,10:保税展示补货
+     */
+    private String goodsBizType;
+    /**
+     * 创建人编号
+     */
+    private String createrSn;
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+    /**
+     * 修改人编号
+     */
+    private String moderSn;
+    /**
+     * 修改时间
+     */
+    private Date modTime;
+    /**
+     * 时间戳
+     */
+    private Date tstm;
+
+    /**
+     * 设置:编号
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 获取:编号
+     */
+    public Integer getId() {
+        return id;
+    }
+    /**
+     * 设置:订单编号
+     */
+    public void setOrderSn(String orderSn) {
+        this.orderSn = orderSn;
+    }
+
+    /**
+     * 获取:订单编号
+     */
+    public String getOrderSn() {
+        return orderSn;
+    }
+    /**
+     * 设置:用户编号
+     */
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
+    /**
+     * 获取:用户编号
+     */
+    public Integer getUserId() {
+        return userId;
+    }
+    /**
+     * 设置:商户订单号
+     */
+    public void setMerchOrderSn(String merchOrderSn) {
+        this.merchOrderSn = merchOrderSn;
+    }
+
+    /**
+     * 获取:商户订单号
+     */
+    public String getMerchOrderSn() {
+        return merchOrderSn;
+    }
+    /**
+     * 设置:支付单编号
+     */
+    public void setPayNo(String payNo) {
+        this.payNo = payNo;
+    }
+
+    /**
+     * 获取:支付单编号
+     */
+    public String getPayNo() {
+        return payNo;
+    }
+    /**
+     * 设置:商户编号
+     */
+    public void setMerchSn(String merchSn) {
+        this.merchSn = merchSn;
+    }
+
+    /**
+     * 获取:商户编号
+     */
+    public String getMerchSn() {
+        return merchSn;
+    }
+    /**
+     * 设置:子订单实付金额
+     */
+    public void setPayPrice(Integer payPrice) {
+        this.payPrice = payPrice;
+    }
+
+    /**
+     * 获取:子订单实付金额
+     */
+    public Integer getPayPrice() {
+        return payPrice;
+    }
+    /**
+     * 设置:货品业务类型, 01:保税展示店提,02:一般贸易,10:保税展示补货
+     */
+    public void setGoodsBizType(String goodsBizType) {
+        this.goodsBizType = goodsBizType;
+    }
+
+    /**
+     * 获取:货品业务类型, 01:保税展示店提,02:一般贸易,10:保税展示补货
+     */
+    public String getGoodsBizType() {
+        return goodsBizType;
+    }
+    /**
+     * 设置:创建人编号
+     */
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn;
+    }
+
+    /**
+     * 获取:创建人编号
+     */
+    public String getCreaterSn() {
+        return createrSn;
+    }
+    /**
+     * 设置:创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 获取:创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+    /**
+     * 设置:修改人编号
+     */
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn;
+    }
+
+    /**
+     * 获取:修改人编号
+     */
+    public String getModerSn() {
+        return moderSn;
+    }
+    /**
+     * 设置:修改时间
+     */
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    /**
+     * 获取:修改时间
+     */
+    public Date getModTime() {
+        return modTime;
+    }
+    /**
+     * 设置:时间戳
+     */
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+
+    /**
+     * 获取:时间戳
+     */
+    public Date getTstm() {
+        return tstm;
+    }
+}

+ 35 - 23
kmall-api/src/main/java/com/kmall/api/entity/SmsLogVo.java

@@ -1,10 +1,11 @@
 package com.kmall.api.entity;
 
 import java.io.Serializable;
+import java.util.Date;
 
 
 /**
- * 实体表名 mall_sms_log
+ * 实体表名 sys_sms_log
  *
  * @author Scott
  * @email
@@ -18,15 +19,25 @@ public class SmsLogVo implements Serializable {
     //
     private Long user_id;
     //
-    private String phone;
+    private String mobile;
     //
-    private Long log_date;
+    private Date stime;
     // 发送模板
     private String sms_code;
     // 1成功 0失败
     private Integer send_status;
     //
-    private String sms_text;
+    private String content;
+
+    private String smsCode;
+
+    public String getSmsCode() {
+        return smsCode;
+    }
+
+    public void setSmsCode(String smsCode) {
+        this.smsCode = smsCode;
+    }
 
     public Long getId() {
         return id;
@@ -44,21 +55,6 @@ public class SmsLogVo implements Serializable {
         this.user_id = user_id;
     }
 
-    public String getPhone() {
-        return phone;
-    }
-
-    public void setPhone(String phone) {
-        this.phone = phone;
-    }
-
-    public Long getLog_date() {
-        return log_date;
-    }
-
-    public void setLog_date(Long log_date) {
-        this.log_date = log_date;
-    }
 
     public String getSms_code() {
         return sms_code;
@@ -76,11 +72,27 @@ public class SmsLogVo implements Serializable {
         this.send_status = send_status;
     }
 
-    public String getSms_text() {
-        return sms_text;
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+
+    public Date getStime() {
+        return stime;
+    }
+
+    public void setStime(Date stime) {
+        this.stime = stime;
+    }
+
+    public String getContent() {
+        return content;
     }
 
-    public void setSms_text(String sms_text) {
-        this.sms_text = sms_text;
+    public void setContent(String content) {
+        this.content = content;
     }
 }

+ 82 - 0
kmall-api/src/main/java/com/kmall/api/entity/SysExceptionRecord.java

@@ -0,0 +1,82 @@
+package com.kmall.api.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class SysExceptionRecord implements Serializable {
+    private Integer id;
+
+    private String exceptionInfo;
+
+    private String createrSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
+    private Date tstm;
+
+    private static final long serialVersionUID = 1L;
+
+    public SysExceptionRecord() {
+        super();
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getExceptionInfo() {
+        return exceptionInfo;
+    }
+
+    public void setExceptionInfo(String exceptionInfo) {
+        this.exceptionInfo = exceptionInfo == null ? null : exceptionInfo.trim();
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn == null ? null : createrSn.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn == null ? null : moderSn.trim();
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+}

+ 82 - 0
kmall-api/src/main/java/com/kmall/api/entity/SysParam.java

@@ -0,0 +1,82 @@
+package com.kmall.api.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class SysParam implements Serializable {
+    private Integer paramId;
+
+    private String paramName;
+
+    private String createrSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
+    private Date tstm;
+
+    private static final long serialVersionUID = 1L;
+
+    public SysParam() {
+        super();
+    }
+
+    public Integer getParamId() {
+        return paramId;
+    }
+
+    public void setParamId(Integer paramId) {
+        this.paramId = paramId;
+    }
+
+    public String getParamName() {
+        return paramName;
+    }
+
+    public void setParamName(String paramName) {
+        this.paramName = paramName == null ? null : paramName.trim();
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn == null ? null : createrSn.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn == null ? null : moderSn.trim();
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+}

+ 16 - 0
kmall-api/src/main/java/com/kmall/api/entity/TokenEntity.java

@@ -16,6 +16,8 @@ public class TokenEntity implements Serializable {
 
     //用户ID
     private Long userId;
+
+    private String openId;
     //token
     private String token;
     //过期时间
@@ -40,6 +42,20 @@ public class TokenEntity implements Serializable {
     }
 
     /**
+     * 设置:
+     */
+    public void setOpenId(String openId) {
+        this.openId = openId;
+    }
+
+    /**
+     * 获取:
+     */
+    public String getOpenId() {
+        return openId;
+    }
+
+    /**
      * 设置:token
      */
     public void setToken(String token) {

+ 60 - 0
kmall-api/src/main/java/com/kmall/api/entity/UserVo.java

@@ -43,6 +43,66 @@ public class UserVo implements Serializable {
 
     private String userLevel;
 
+    private String idNo;
+
+    private String createrSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
+    private Date tstm;
+
+    public String getIdNo() {
+        return idNo;
+    }
+
+    public void setIdNo(String idNo) {
+        this.idNo = idNo;
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn;
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+
     public String getUserLevel() {
         return userLevel;
     }

+ 5 - 0
kmall-api/src/main/java/com/kmall/api/service/ApiCartService.java

@@ -159,7 +159,12 @@ public class ApiCartService {
         cartInfo.setGoods_specification_name_value(productVo.getGoods_specification_name_value());
         cartInfo.setGoods_specification_ids(productVo.getGoods_specification_ids());
         cartInfo.setChecked(1);
+        cartInfo.setGoodsBizType(goodsVo.getGoodsBizType());
         save(cartInfo);
         return resultObj;
     }
+
+    public List<CartVo> queryCartByGoodsBizType(String goodsBizType) {
+        return cartDao.queryCartByGoodsBizType(goodsBizType);
+    }
 }

+ 5 - 0
kmall-api/src/main/java/com/kmall/api/service/ApiOrderGoodsService.java

@@ -49,4 +49,9 @@ public class ApiOrderGoodsService {
         orderGoodsDao.deleteBatch(ids);
     }
 
+
+    public List<OrderGoodsVo> queryListByIds(List<Long> orderIdList){
+        return orderGoodsDao.queryListByIds(orderIdList);
+    }
+
 }

+ 208 - 85
kmall-api/src/main/java/com/kmall/api/service/ApiOrderService.java

@@ -1,6 +1,7 @@
 package com.kmall.api.service;
 
 import com.alibaba.fastjson.JSONObject;
+import com.kmall.api.contants.Dict;
 import com.kmall.api.dao.*;
 import com.kmall.api.entity.*;
 import com.kmall.api.util.CommonUtil;
@@ -20,6 +21,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
 import java.util.*;
 
 
@@ -49,6 +51,8 @@ public class ApiOrderService {
     private ApiGoodsGroupOpenDetailMapper apiGoodsGroupOpenDetailMapper;
     @Autowired
     private FormIdsService formIdsService;
+    @Autowired
+    private ApiGoodsMapper apiGoodsMapper;
 
     public OrderVo queryObject(Long id) {
         return apiOrderMapper.queryObject(id);
@@ -72,7 +76,6 @@ public class ApiOrderService {
         return apiOrderMapper.queryTotal(map);
     }
 
-
     public void save(OrderVo order) {
         apiOrderMapper.save(order);
     }
@@ -98,6 +101,7 @@ public class ApiOrderService {
     }
 
     public void update(OrderVo order) {
+        order.setIsScan("0");
         apiOrderMapper.update(order);
     }
 
@@ -117,19 +121,22 @@ public class ApiOrderService {
         Map resultObj = new HashMap();
 
         Integer userCouponId = jsonParam.getInteger("userCouponId");
-        String postscript = jsonParam.getString("postscript");
-        Long fullCutCouponId = jsonParam.getLong("fullCutCouponId");
-        AddressVo addressVo = jsonParam.getObject("checkedAddress", AddressVo.class);
         String formId = jsonParam.getString("formId");
-        Date delivery_date = jsonParam.getDate("delivery_date");
-        if (null == delivery_date) {
-            delivery_date = new Date();
-        }
-        String delivery_remark = jsonParam.getString("delivery_remark");
-        if (StringUtils.isNullOrEmpty(delivery_remark)) {
-            delivery_remark = "尽快送达";
-        }
-        BigDecimal freightPrice = new BigDecimal(10.00);
+        String idNo = jsonParam.getString("idNo");
+        String userName = jsonParam.getString("userName");
+        String postscript00 = jsonParam.getString("postscript00");
+        String postscript02 = jsonParam.getString("postscript02");
+        String postscript10 = jsonParam.getString("postscript10");
+        String postscript11 = jsonParam.getString("postscript11");
+
+
+        // TODO: 2018/10/18 实名认证身份证信息,认证成功更新到用户表
+        UserVo userVo = new UserVo();
+        userVo.setId(loginUser.getId());
+        userVo.setIdNo(idNo);
+        userVo.setUsername(userName);
+        apiUserMapper.update(userVo);
+
         //获取要购买的商品
         Map param = new HashMap();
         param.put("user_id", loginUser.getId());
@@ -156,10 +163,149 @@ public class ApiOrderService {
             productInfo.addSellVolume();
             productVos.add(productInfo);
         }
+        List<OrderVo> orderInfoList = new ArrayList();
+        OrderVo order00 = null;
+        OrderVo order02 = null;
+        OrderVo order10 = null;
+        OrderVo order11 = null;
+        String merchOrderSn = "EMATO"+new SimpleDateFormat("yyyyMMddhhmmss").format(new Date());
+        //订单按业务类型进行分单
+        for (CartVo goodsItem : checkedGoodsList) {
+            //订单业务类型:00:保税备货, 02:保税展示补货,10:保税展示跨境,11:普通商品
+            if(Dict.orderBizType.item_00.getItem().equalsIgnoreCase(goodsItem.getGoodsBizType())){
+                order00 = setOrderVo(loginUser,jsonParam,storeId,checkedGoodsList,goodsItem.getGoodsBizType());
+                order00.setOrderBizType(goodsItem.getGoodsBizType());
+                order00.setMerchOrderSn(merchOrderSn);
+                if(org.apache.commons.lang.StringUtils.isNotEmpty(postscript00)) {
+                    order00.setPostscript(postscript00);
+                }
+            }
+            if(Dict.orderBizType.item_02.getItem().equalsIgnoreCase(goodsItem.getGoodsBizType())){
+                order02 = setOrderVo(loginUser,jsonParam,storeId,checkedGoodsList,goodsItem.getGoodsBizType());
+                order02.setOrderBizType(goodsItem.getGoodsBizType());
+                order02.setMerchOrderSn(merchOrderSn);
+                if(org.apache.commons.lang.StringUtils.isNotEmpty(postscript02)) {
+                    order02.setPostscript(postscript02);
+                }
+            }
+            if(Dict.orderBizType.item_10.getItem().equalsIgnoreCase(goodsItem.getGoodsBizType())){
+                order10 = setOrderVo(loginUser,jsonParam,storeId,checkedGoodsList,goodsItem.getGoodsBizType());
+                order10.setOrderBizType(goodsItem.getGoodsBizType());
+                order10.setMerchOrderSn(merchOrderSn);
+                if(org.apache.commons.lang.StringUtils.isNotEmpty(postscript10)) {
+                    order10.setPostscript(postscript10);
+                }
+            }
+            if(Dict.orderBizType.item_11.getItem().equalsIgnoreCase(goodsItem.getGoodsBizType())){
+                order11 = setOrderVo(loginUser,jsonParam,storeId,checkedGoodsList,goodsItem.getGoodsBizType());
+                order11.setOrderBizType(goodsItem.getGoodsBizType());
+                order11.setMerchOrderSn(merchOrderSn);
+                if(org.apache.commons.lang.StringUtils.isNotEmpty(postscript11)) {
+                    order11.setPostscript(postscript11);
+                }
+            }
+        }
+        if(order00!=null){
+            orderInfoList.add(order00);
+        }
+        if(order02!=null){
+            orderInfoList.add(order02);
+        }
+        if(order10!=null){
+            orderInfoList.add(order10);
+        }
+        if(order11!=null){
+            orderInfoList.add(order11);
+        }
+
+        //开启事务,插入订单信息和订单商品
+        if(orderInfoList != null && orderInfoList.size() > 0) {
+            apiOrderMapper.saveBatch(orderInfoList);
+
+            for (OrderVo orderInfo : orderInfoList) {
+                if (null == orderInfo.getId()) {
+                    throw new RRException("订单提交失败");
+                //            resultObj.put("errno", 1);
+                //            resultObj.put("errmsg", "订单提交失败");
+                //            return resultObj;
+                }
+                //新增订单详情
+                for (CartVo goodsItem : checkedGoodsList) {
+                    //统计商品总价
+                    List<OrderGoodsVo> orderGoodsData = new ArrayList();
+                    if (orderInfo.getOrderBizType().equalsIgnoreCase(goodsItem.getGoodsBizType())) {
+                        GoodsVo goodsVo = apiGoodsMapper.queryObject(goodsItem.getGoods_id());
+                        if(goodsVo==null){
+                            throw new RRException("订单提交失败:商品不存在");
+                        }
+                        OrderGoodsVo orderGoodsVo = setOrderGoodsVo(orderInfo, goodsItem,goodsVo);
+                        apiOrderGoodsMapper.save(orderGoodsVo);
+                    }
+                }
+
+            }
+
+            for (ProductVo productVo : productVos) {
+                apiProductMapper.updateStockNum(productVo);
+            }
+            // formIds保存
+            formIdsService.save(loginUser.getId(), formId, 1);
+
+            //清空已购买的商品
+            apiCartMapper.deleteByCart(loginUser.getId(), storeId, 1);
+            resultObj.put("errno", 0);
+            resultObj.put("errmsg", "订单提交成功");
+            //
+            Map orderInfoMap = new HashMap();
+            orderInfoMap.put("orderInfo", orderInfoList);
+            resultObj.put("data", orderInfoMap);
+
+            // 优惠券标记已用
+            for (OrderVo orderInfo : orderInfoList) {
+                if (null != userCouponId && 0 != userCouponId) {
+                    UserCouponVo userCouponVo = apiUserCouponMapper.queryObject(userCouponId);
+                    if (null != userCouponVo && (null == userCouponVo.getOrder_id() || 0 == userCouponVo.getOrder_id())) {
+                        userCouponVo.setUsed_time(new Date());
+                        userCouponVo.setOrder_id(orderInfo.getId());
+                        apiUserCouponMapper.update(userCouponVo);
+                    }
+                }
+            }
+        }
+
+        return resultObj;
+    }
+
+    /**
+     * 设置订单数据
+     * @param loginUser
+     * @param jsonParam
+     * @param storeId
+     * @param checkedGoodsList
+     * @return
+     */
+    public OrderVo setOrderVo(UserVo loginUser,JSONObject jsonParam,Long storeId,List<CartVo> checkedGoodsList,String orderBizType){
+        Integer userCouponId = jsonParam.getInteger("userCouponId");
+        String postscript = jsonParam.getString("postscript");
+        Long fullCutCouponId = jsonParam.getLong("fullCutCouponId");
+//        BigDecimal freightPrice = new BigDecimal(10.00);
+        BigDecimal freightPrice = new BigDecimal(0.00);
+        AddressVo addressVo = jsonParam.getObject("checkedAddress", AddressVo.class);
+        Date delivery_date = jsonParam.getDate("delivery_date");
+        if (null == delivery_date) {
+            delivery_date = new Date();
+        }
+        String delivery_remark = jsonParam.getString("delivery_remark");
+        if (StringUtils.isNullOrEmpty(delivery_remark)) {
+            delivery_remark = "尽快送达";
+        }
+
         //统计商品总价
         BigDecimal goodsTotalPrice = new BigDecimal(0.00);
         for (CartVo cartItem : checkedGoodsList) {
-            goodsTotalPrice = goodsTotalPrice.add(cartItem.getRetail_price().multiply(new BigDecimal(cartItem.getNumber())));
+            if(orderBizType.equalsIgnoreCase(cartItem.getGoodsBizType())){
+                goodsTotalPrice = goodsTotalPrice.add(cartItem.getRetail_price().multiply(new BigDecimal(cartItem.getNumber())));
+            }
         }
 
         //获取订单使用的优惠券
@@ -173,19 +319,19 @@ public class ApiOrderService {
             }
         }
         // 获取优惠信息提示
-        Map couponParam = new HashMap();
-        couponParam.put("enabled", true);
-        Integer[] send_types = new Integer[]{7};
-        couponParam.put("send_types", send_types);
-        List<CouponVo> couponVos = apiCouponMapper.queryList(couponParam);
-        if (null != couponVos && couponVos.size() > 0) {
-            for (CouponVo couponVo : couponVos) {
-                // 是否免运费
-                if (couponVo.getSend_type() == 7 && couponVo.getMin_goods_amount().compareTo(goodsTotalPrice) <= 0) {
-                    freightPrice = couponVo.getType_money();
-                }
-            }
-        }
+//        Map couponParam = new HashMap();
+//        couponParam.put("enabled", true);
+//        Integer[] send_types = new Integer[]{7};
+//        couponParam.put("send_types", send_types);
+//        List<CouponVo> couponVos = apiCouponMapper.queryList(couponParam);
+//        if (null != couponVos && couponVos.size() > 0) {
+//            for (CouponVo couponVo : couponVos) {
+//                // 是否免运费
+//                if (couponVo.getSend_type() == 7 && couponVo.getMin_goods_amount().compareTo(goodsTotalPrice) <= 0) {
+//                    freightPrice = couponVo.getType_money();
+//                }
+//            }
+//        }
         // 获取优惠信息 满减
         BigDecimal fullCutCouponDec = new BigDecimal(0);
         CouponVo fullCutCoupon = apiCouponMapper.queryObject(fullCutCouponId);
@@ -194,10 +340,10 @@ public class ApiOrderService {
         }
 
         //订单价格计算
-        BigDecimal orderTotalPrice = goodsTotalPrice.add(freightPrice); //订单的总价
+        BigDecimal orderTotalPrice = goodsTotalPrice.add(freightPrice); //订单的总价+运费
 
         BigDecimal actualPrice = orderTotalPrice.subtract(fullCutCouponDec).subtract(couponPrice);  //减去其它支付的金额后,要实际支付的金额
-        //
+
         OrderVo orderInfo = new OrderVo();
         orderInfo.setOrder_sn(CommonUtil.generateOrderNumber());
         orderInfo.setUser_id(loginUser.getId());
@@ -231,67 +377,40 @@ public class ApiOrderService {
         orderInfo.setShipping_status(0);
         orderInfo.setPay_status(0);
         orderInfo.setShipping_id(0L);
-        orderInfo.setShipping_fee(new
-
-                BigDecimal(0));
+        orderInfo.setShipping_fee(new BigDecimal(0));
         orderInfo.setIntegral(0);
         orderInfo.setCoupon_name(couponName);
-        orderInfo.setIntegral_money(new
+        orderInfo.setIntegral_money(new BigDecimal(0));
+        orderInfo.setCreateTime(new Date());
+        orderInfo.setModTime(new Date());
+        orderInfo.setPayMobile(loginUser.getMobile());
+        orderInfo.setPayTransactionId("");
+        orderInfo.setIsScan("0");//默认未扫描
+        return orderInfo;
+    }
 
-                BigDecimal(0));
-        //开启事务,插入订单信息和订单商品
-        apiOrderMapper.save(orderInfo);
-        if (null == orderInfo.getId()) {
-            throw new RRException("订单提交失败");
-//            resultObj.put("errno", 1);
-//            resultObj.put("errmsg", "订单提交失败");
-//            return resultObj;
-        }
-        for (ProductVo productVo : productVos) {
-            apiProductMapper.updateStockNum(productVo);
-        }
-        // formIds保存
-        formIdsService.save(orderInfo.getUser_id(), formId, 1);
-        //统计商品总价
-        List<OrderGoodsVo> orderGoodsData = new ArrayList();
-        for (CartVo goodsItem : checkedGoodsList) {
-            OrderGoodsVo orderGoodsVo = new OrderGoodsVo();
-            orderGoodsVo.setOrder_id(orderInfo.getId());
-            orderGoodsVo.setGoods_id(goodsItem.getGoods_id());
-            orderGoodsVo.setGoods_sn(goodsItem.getGoods_sn());
-            orderGoodsVo.setProduct_id(goodsItem.getProduct_id());
-            orderGoodsVo.setGoods_name(goodsItem.getGoods_name());
-            orderGoodsVo.setList_pic_url(goodsItem.getList_pic_url());
-            orderGoodsVo.setMarket_price(goodsItem.getMarket_price());
-            orderGoodsVo.setRetail_price(goodsItem.getRetail_price());
-            orderGoodsVo.setNumber(goodsItem.getNumber());
-            orderGoodsVo.setGoods_specification_name_value(goodsItem.getGoods_specification_name_value());
-            orderGoodsVo.setGoods_specification_ids(goodsItem.getGoods_specification_ids());
-            orderGoodsData.add(orderGoodsVo);
-            apiOrderGoodsMapper.save(orderGoodsVo);
-        }
 
-        //清空已购买的商品
-        apiCartMapper.deleteByCart(loginUser.getId(), storeId, 1);
-        resultObj.put("errno", 0);
-        resultObj.put("errmsg", "订单提交成功");
-        //
-        Map orderInfoMap = new HashMap();
-        orderInfoMap.put("orderInfo", orderInfo);
-        //
-        resultObj.put("data", orderInfoMap);
-        // 优惠券标记已用
-        if (null != userCouponId && 0 != userCouponId) {
-            UserCouponVo userCouponVo = apiUserCouponMapper.queryObject(userCouponId);
-            if (null != userCouponVo && (null == userCouponVo.getOrder_id() || 0 == userCouponVo.getOrder_id())) {
-                userCouponVo.setUsed_time(new Date());
-                userCouponVo.setOrder_id(orderInfo.getId());
-                apiUserCouponMapper.update(userCouponVo);
-            }
-        }
-        return resultObj;
+    public OrderGoodsVo setOrderGoodsVo(OrderVo orderInfo,CartVo goodsItem,GoodsVo goodsVo){
+        OrderGoodsVo orderGoodsVo = new OrderGoodsVo();
+        orderGoodsVo.setOrder_id(orderInfo.getId());
+        orderGoodsVo.setGoods_id(goodsItem.getGoods_id());
+        orderGoodsVo.setGoods_sn(goodsItem.getGoods_sn());
+        orderGoodsVo.setProduct_id(goodsItem.getProduct_id());
+        orderGoodsVo.setGoods_name(goodsItem.getGoods_name());
+        orderGoodsVo.setList_pic_url(goodsItem.getList_pic_url());
+        orderGoodsVo.setMarket_price(goodsItem.getMarket_price());
+        orderGoodsVo.setRetail_price(goodsItem.getRetail_price());
+        orderGoodsVo.setNumber(goodsItem.getNumber());
+        orderGoodsVo.setGoods_specification_name_value(goodsItem.getGoods_specification_name_value());
+        orderGoodsVo.setGoods_specification_ids(goodsItem.getGoods_specification_ids());
+        orderGoodsVo.setOrderBizType(goodsItem.getGoodsBizType());
+        orderGoodsVo.setCreateTime(new Date());
+        orderGoodsVo.setModTime(new Date());
+
+        orderGoodsVo.setGoodsRate(goodsVo.getGoodsRate());
+        orderGoodsVo.setSettlePrice(new BigDecimal("0"));//商品结算平摊价格=(零售价格*数量)/订单结算总金额
+        return orderGoodsVo;
     }
-
     /**
      * 支付成功通知
      */
@@ -460,4 +579,8 @@ public class ApiOrderService {
         }
         return FeiGeUtils.printMsg(sn, content, "1");
     }
+
+    public List<OrderVo> queryObjectByIdList(List<Long> orderIdList){
+        return apiOrderMapper.queryObjectByIdList(orderIdList);
+    }
 }

+ 26 - 7
kmall-api/src/main/java/com/kmall/api/service/ApiPayService.java

@@ -3,6 +3,7 @@ package com.kmall.api.service;
 import com.kmall.api.entity.GoodsGroupOpenDetailVo;
 import com.kmall.api.entity.GoodsGroupOpenVo;
 import com.kmall.api.entity.OrderVo;
+import com.kmall.api.entity.PayerChildOrderRealEntity;
 import com.kmall.api.service.pay.wxpay.WxPayPropertiesBuilder;
 import com.kmall.common.service.FormIdsService;
 import com.kmall.common.utils.DateUtils;
@@ -15,6 +16,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Date;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -36,9 +38,11 @@ public class ApiPayService {
     @Autowired
     private ApiGoodsGroupOpenService apiGoodsGroupOpenService;
 
+    @Autowired
+    private PayerChildOrderRealService payerChildOrderRealService;
 
     @Transactional
-    public void payPrepay(Map<Object, Object> resultObj, Map<String, Object> resultUn, String nonceStr, OrderVo orderInfo) {
+    public void payPrepay(Map<Object, Object> resultObj, Map<String, Object> resultUn, String nonceStr, List<OrderVo> orderVoList) {
         String prepay_id = MapUtils.getString("prepay_id", resultUn);
         // 先生成paySign 参考https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=7_7&index=5
         //resultObj.put("appId", ResourceUtil.getConfigByName("wx.appId"));
@@ -50,12 +54,27 @@ public class ApiPayService {
         //String paySign = WechatUtil.arraySign(resultObj, ResourceUtil.getConfigByName("wx.paySignKey"));
         String paySign = WechatUtil.arraySign(resultObj, WxPayPropertiesBuilder.instance().getPaySignKey());
         resultObj.put("paySign", paySign);
-        // 业务处理
-        orderInfo.setPay_id(prepay_id);
-        orderInfo.setPay_status(1); // 付款中
-        orderService.update(orderInfo);
-        // 保存form_id
-        formIdsService.save(orderInfo.getUser_id(), prepay_id, 1);
+        for (OrderVo orderInfo: orderVoList) {
+            // 业务处理
+            orderInfo.setPay_id(prepay_id);
+            orderInfo.setPay_status(1); // 付款中
+            orderService.update(orderInfo);
+
+            PayerChildOrderRealEntity entity = new PayerChildOrderRealEntity();
+            entity.setGoodsBizType(orderInfo.getOrderBizType());
+            entity.setOrderSn(orderInfo.getOrder_sn());
+            entity.setMerchSn(orderInfo.getMerchSn());
+            entity.setMerchOrderSn(orderInfo.getMerchOrderSn());
+            entity.setPayNo(orderInfo.getPay_id());
+            entity.setPayPrice(Integer.parseInt(orderInfo.getActual_price()+""));
+            entity.setCreateTime(new Date());
+            entity.setModTime(new Date());
+            entity.setUserId(Integer.parseInt(orderInfo.getUser_id()+""));
+            payerChildOrderRealService.save(entity);//记录微信返回的支付单与子订单信息
+
+            // 保存form_id
+            formIdsService.save(orderInfo.getUser_id(), prepay_id, 1);
+        }
     }
 
     @Transactional

+ 3 - 3
kmall-api/src/main/java/com/kmall/api/service/ApiUserService.java

@@ -86,9 +86,9 @@ public class ApiUserService {
     }
 
 
-    public int saveSmsCodeLog(SmsLogVo smsLogVo) {
-        return userDao.saveSmsCodeLog(smsLogVo);
-    }
+//    public int saveSmsCodeLog(SmsLogVo smsLogVo) {
+//        return userDao.saveSmsCodeLog(smsLogVo);
+//    }
 
     public String getUserLevel(UserVo loginUser) {
         String result = "普通用户";

+ 51 - 0
kmall-api/src/main/java/com/kmall/api/service/PayerChildOrderRealService.java

@@ -0,0 +1,51 @@
+package com.kmall.api.service;
+
+import com.kmall.api.dao.PayerChildOrderRealMapper;
+import com.kmall.api.entity.PayerChildOrderRealEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 支付单子订单关联记录表Service实现类
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2018-10-11 14:38:15
+ */
+@Service()
+public class PayerChildOrderRealService {
+    @Autowired
+    private PayerChildOrderRealMapper payerChildOrderRealDao;
+
+    
+    public PayerChildOrderRealEntity queryObject(Integer id) {
+        return payerChildOrderRealDao.queryObject(id);
+    }
+
+    public List<PayerChildOrderRealEntity> queryList(Map<String, Object> map) {
+        return payerChildOrderRealDao.queryList(map);
+    }
+
+    public int queryTotal(Map<String, Object> map) {
+        return payerChildOrderRealDao.queryTotal(map);
+    }
+
+    public int save(PayerChildOrderRealEntity payerChildOrderReal) {
+        return payerChildOrderRealDao.save(payerChildOrderReal);
+    }
+
+    public int update(PayerChildOrderRealEntity payerChildOrderReal) {
+        return payerChildOrderRealDao.update(payerChildOrderReal);
+    }
+
+    public int delete(Integer id) {
+        return payerChildOrderRealDao.delete(id);
+    }
+
+    public int deleteBatch(Integer[]ids) {
+        return payerChildOrderRealDao.deleteBatch(ids);
+    }
+}

+ 2 - 1
kmall-api/src/main/java/com/kmall/api/service/TokenService.java

@@ -15,7 +15,7 @@ public class TokenService {
     //12小时后过期
     private final static int EXPIRE = 3600 * 12;
 
-    public Map<String, Object> createAndUpdateToken(long userId, Long storeId) {
+    public Map<String, Object> createAndUpdateToken(String openId, Long storeId, Long userId) {
         //生成一个token
         String token = CharUtil.getRandomString(32);
         //当前时间
@@ -30,6 +30,7 @@ public class TokenService {
         if (tokenEntity == null) {
             tokenEntity = new TokenEntity();
             tokenEntity.setUserId(userId);
+            tokenEntity.setOpenId(openId);
             tokenEntity.setToken(token);
             tokenEntity.setUpdateTime(now);
             tokenEntity.setExpireTime(expireTime);

+ 11 - 1
kmall-api/src/main/java/com/kmall/api/util/ApiBaseAction.java

@@ -161,10 +161,20 @@ public class ApiBaseAction {
     }
 
     /**
-     * 获取请求的用户Id
+     * 获取请求的openId
      *
      * @return 客户端Ip
      */
+    public String getOpenId() {
+        String token = request.getHeader(AuthorizationInterceptor.LOGIN_TOKEN_KEY);
+        //查询token信息
+        TokenEntity tokenEntity = UserTokenCache.getUserInfoByToken(token);
+        if (tokenEntity == null || tokenEntity.getExpireTime().getTime() < System.currentTimeMillis()) {
+            return null;
+        }
+        return tokenEntity.getOpenId();
+    }
+
     public Long getUserId() {
         String token = request.getHeader(AuthorizationInterceptor.LOGIN_TOKEN_KEY);
         //查询token信息

+ 135 - 0
kmall-api/src/main/java/com/kmall/api/util/HttpRequestUtil.java

@@ -0,0 +1,135 @@
+package com.kmall.api.util;
+
+import java.io.IOException;
+import java.util.Map;
+
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.SimpleHttpConnectionManager;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.commons.httpclient.methods.PostMethod;
+
+/**
+ * @author huangyaqin
+ * @version 1.0
+ * 2018-10-16 11:28
+ */
+public class HttpRequestUtil {
+    /**
+     * HttpClient 模拟POST请求
+     * @param url
+     * @param params
+     * @return
+     */
+    public static String postRequest(String url, Map<String, String> params) {
+        //构造HttpClient的实例
+        HttpClient httpClient = new HttpClient();
+
+
+        //创建POST方法的实例
+        PostMethod postMethod = new PostMethod(url);
+
+
+        //设置请求头信息
+        postMethod.setRequestHeader("Connection", "close");
+
+
+        //添加参数
+        for (Map.Entry<String, String> entry : params.entrySet()) {
+            postMethod.addParameter(entry.getKey(), entry.getValue());
+        }
+
+
+        //使用系统提供的默认的恢复策略,设置请求重试处理,用的是默认的重试处理:请求三次
+        httpClient.getParams().setBooleanParameter("http.protocol.expect-continue", false);
+
+
+        //接收处理结果
+        String result = null;
+        try {
+            //执行Http Post请求
+            httpClient.executeMethod(postMethod);
+
+
+            //返回处理结果
+            result = postMethod.getResponseBodyAsString();
+        } catch (HttpException e) {
+            // 发生致命的异常,可能是协议不对或者返回的内容有问题
+            System.out.println("请检查输入的URL!");
+            e.printStackTrace();
+        } catch (IOException e) {
+            // 发生网络异常
+            System.out.println("发生网络异常!");
+            e.printStackTrace();
+        } finally {
+            //释放链接
+            postMethod.releaseConnection();
+
+
+            //关闭HttpClient实例
+            if (httpClient != null) {
+                ((SimpleHttpConnectionManager) httpClient.getHttpConnectionManager()).shutdown();
+                httpClient = null;
+            }
+        }
+        return result;
+    }
+
+
+    /**
+     *  HttpClient 模拟GET请求
+     * 方法说明
+     * @Discription:扩展说明
+     * @param url
+     * @param params
+     * @return String
+     */
+    public static String getRequest(String url, Map<String, String> params) {
+        //构造HttpClient实例
+        HttpClient client = new HttpClient();
+
+
+        //拼接参数
+        String paramStr = "";
+        for (String key : params.keySet()) {
+            paramStr = paramStr + "&" + key + "=" + params.get(key);
+        }
+        paramStr = paramStr.substring(1);
+
+
+        //创建GET方法的实例
+        GetMethod method = new GetMethod(url + "?" + paramStr);
+
+
+        //接收返回结果
+        String result = null;
+        try {
+            //执行HTTP GET方法请求
+            client.executeMethod(method);
+
+
+            //返回处理结果
+            result = method.getResponseBodyAsString();
+        } catch (HttpException e) {
+            // 发生致命的异常,可能是协议不对或者返回的内容有问题
+            System.out.println("请检查输入的URL!");
+            e.printStackTrace();
+        } catch (IOException e) {
+            // 发生网络异常
+            System.out.println("发生网络异常!");
+            e.printStackTrace();
+        } finally {
+            //释放链接
+            method.releaseConnection();
+
+
+            //关闭HttpClient实例
+            if (client != null) {
+                ((SimpleHttpConnectionManager) client.getHttpConnectionManager()).shutdown();
+                client = null;
+            }
+        }
+        return result;
+    }
+}

+ 79 - 0
kmall-api/src/main/java/com/kmall/api/util/SendMsgUtil.java

@@ -0,0 +1,79 @@
+package com.kmall.api.util;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author huangyaqin
+ * @version 1.0
+ * 2018-10-16 11:27
+ */
+public class SendMsgUtil {
+    /**
+     * 发送短信消息
+     * 方法说明
+     * @Discription:扩展说明
+     * @param phones
+     * @param content
+     * @return
+     * @return String
+     */
+    @SuppressWarnings("deprecation")
+    public static String sendMsg(String phones,String content) {
+        try {
+            content = java.net.URLEncoder.encode(content,"utf-8");
+            System.out.println(content);
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+        String sendMsgapiKey = "d6d33c8e7ad847cc3f3d7e9f75d0abb1";
+        //短信接口URL提交地址
+        String url = "https://api.dingdongcloud.com/v1/sms/sendyzm";
+
+        Map<String, String> params = new HashMap<String, String>();
+
+        params.put("name", "13530612313");
+        params.put("pwd", "nm81875o");
+//        params.put("dxlbid", "短信类别编号");
+//        params.put("extno", "扩展编号");
+        params.put("apikey", sendMsgapiKey);
+
+        //手机号码,多个号码使用英文逗号进行分割
+        params.put("mobile", phones);
+        //将短信内容进行URLEncoder编码
+        params.put("content", URLEncoder.encode(content));
+        params.put("sendTs", "");
+
+        return HttpRequestUtil.postRequest(url, params);
+    }
+
+    /**
+     * 随机生成6位随机验证码
+     * 方法说明
+     * @Discription:扩展说明
+     * @return
+     * @return String
+     */
+    public static String createRandomVcode(){
+        //验证码
+        String vcode = "";
+        for (int i = 0; i < 6; i++) {
+            vcode = vcode + (int)(Math.random() * 9);
+        }
+        return vcode;
+    }
+    /**
+     * 测试
+     * 方法说明
+     * @Discription:扩展说明
+     * @param args
+     * @return void
+     */
+    public static void main(String[] args) {
+//      System.out.println(SendMsgUtil.createRandomVcode());
+//      System.out.println("&ecb=12".substring(1));
+        System.out.println(sendMsg("18201150549", "【签名】尊敬的用户,您的验证码为" + SendMsgUtil.createRandomVcode() + ",请在10分钟内输入。请勿告诉其他人!"));
+    }
+}

+ 4 - 4
kmall-api/src/main/resources/mybatis/mapper/ApiAdMapper.xml

@@ -6,13 +6,13 @@
     <!-- 可根据自己的需求,是否要使用 -->
     <resultMap type="com.kmall.api.entity.AdVo" id="adMap">
         <result property="id" column="id"/>
-        <result property="ad_position_id" column="ad_position_id"/>
-        <result property="media_type" column="media_type"/>
+        <result property="ad_position_id" column="adPositionId"/>
+        <result property="media_type" column="mediaType"/>
         <result property="name" column="name"/>
         <result property="link" column="link"/>
-        <result property="image_url" column="image_url"/>
+        <result property="image_url" column="imageUrl"/>
         <result property="content" column="content"/>
-        <result property="end_time" column="end_time"/>
+        <result property="end_time" column="endTime"/>
         <result property="enabled" column="enabled"/>
     </resultMap>
 

+ 205 - 52
kmall-api/src/main/resources/mybatis/mapper/ApiCartMapper.xml

@@ -14,18 +14,33 @@
         <result property="goods_name" column="goods_name"/>
         <result property="market_price" column="market_price"/>
         <result property="retail_price" column="retail_price"/>
-        <result property="retail_product_price" column="retail_product_price"/>
         <result property="number" column="number"/>
         <result property="goods_specification_name_value" column="goods_specification_name_value"/>
         <result property="goods_specification_ids" column="goods_specification_ids"/>
         <result property="checked" column="checked"/>
         <result property="list_pic_url" column="list_pic_url"/>
+        <result column="sku" property="sku" jdbcType="VARCHAR" />
+        <result column="goods_biz_type" property="goodsBizType" jdbcType="CHAR" />
+        <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+        <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+        <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+        <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
     </resultMap>
 
+    <sql id="Base_Column_List" >
+        id, user_id, goods_id, sku, goods_sn, product_id, goods_name, market_price, retail_price,
+        number, goods_specification_ids, checked, list_pic_url, store_id, goods_biz_type,
+        creater_sn, create_time, moder_sn, mod_time, tstm,goods_specification_name_value
+    </sql>
     <select id="queryObject" resultMap="cartMap">
-		select * from mall_cart where id = #{value}
+		select
+        <include refid="Base_Column_List" /> from mall_cart where id = #{value}
 	</select>
-
+    <select id="queryCartByGoodsBizType" resultMap="cartMap">
+        select
+        <include refid="Base_Column_List" /> from mall_cart where goods_biz_type = #{goodsBizType}
+    </select>
     <select id="queryList" resultMap="cartMap">
         select a.*,
         b.list_pic_url as list_pic_url,
@@ -81,58 +96,196 @@
     </select>
 
     <insert id="save" parameterType="com.kmall.api.entity.CartVo" useGeneratedKeys="true" keyProperty="id">
-		insert into mall_cart
-		(
-			`user_id`, 
-			`store_id`,
-			`goods_id`,
-			`goods_sn`, 
-			`product_id`, 
-			`goods_name`, 
-			`market_price`, 
-			`retail_price`, 
-			`number`, 
-			`goods_specification_name_value`,
-			`goods_specification_ids`,
-			`checked`, 
-			`list_pic_url`
-		)
-		values
-		(
-			#{user_id}, 
-			#{store_id}, 
-			#{goods_id}, 
-			#{goods_sn}, 
-			#{product_id}, 
-			#{goods_name}, 
-			#{market_price}, 
-			#{retail_price}, 
-			#{number}, 
-			#{goods_specification_name_value},
-			#{goods_specification_ids},
-			#{checked}, 
-			#{list_pic_url}
-		)
+        INSERT INTO mall_cart
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="user_id != null" >
+                user_id,
+            </if>
+            <if test="goods_id != null" >
+                goods_id,
+            </if>
+            <if test="sku != null" >
+                sku,
+            </if>
+            <if test="goods_sn != null" >
+                goods_sn,
+            </if>
+            <if test="product_id != null" >
+                product_id,
+            </if>
+            <if test="goods_name != null" >
+                goods_name,
+            </if>
+            <if test="market_price != null" >
+                market_price,
+            </if>
+            <if test="retail_price != null" >
+                retail_price,
+            </if>
+            <if test="number != null" >
+                number,
+            </if>
+            <if test="goods_specification_ids != null" >
+                goods_specification_ids,
+            </if>
+            <if test="checked != null" >
+                checked,
+            </if>
+            <if test="list_pic_url != null" >
+                list_pic_url,
+            </if>
+            <if test="store_id != null" >
+                store_id,
+            </if>
+            <if test="goodsBizType != null" >
+                goods_biz_type,
+            </if>
+            <if test="createrSn != null" >
+                creater_sn,
+            </if>
+            <if test="createTime != null" >
+                create_time,
+            </if>
+            <if test="moderSn != null" >
+                moder_sn,
+            </if>
+            <if test="modTime != null" >
+                mod_time,
+            </if>
+            <if test="tstm != null" >
+                tstm,
+            </if>
+            <if test="goods_specification_name_value != null" >
+                goods_specification_name_value,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="user_id != null" >
+                #{user_id},
+            </if>
+            <if test="goods_id != null" >
+                #{goods_id,jdbcType=INTEGER},
+            </if>
+            <if test="sku != null" >
+                #{sku,jdbcType=VARCHAR},
+            </if>
+            <if test="goods_sn != null" >
+                #{goods_sn,jdbcType=VARCHAR},
+            </if>
+            <if test="product_id != null" >
+                #{product_id,jdbcType=INTEGER},
+            </if>
+            <if test="goods_name != null" >
+                #{goods_name,jdbcType=VARCHAR},
+            </if>
+            <if test="market_price != null" >
+                #{market_price,jdbcType=DECIMAL},
+            </if>
+            <if test="retail_price != null" >
+                #{retail_price,jdbcType=DECIMAL},
+            </if>
+            <if test="number != null" >
+                #{number,jdbcType=SMALLINT},
+            </if>
+            <if test="goods_specification_ids != null" >
+                #{goods_specification_ids,jdbcType=VARCHAR},
+            </if>
+            <if test="checked != null" >
+                #{checked,jdbcType=BIT},
+            </if>
+            <if test="list_pic_url != null" >
+                #{list_pic_url,jdbcType=VARCHAR},
+            </if>
+            <if test="store_id != null" >
+                #{store_id,jdbcType=INTEGER},
+            </if>
+            <if test="goodsBizType != null" >
+                #{goodsBizType,jdbcType=CHAR},
+            </if>
+            <if test="createrSn != null" >
+                #{createrSn,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null" >
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="moderSn != null" >
+                #{moderSn,jdbcType=VARCHAR},
+            </if>
+            <if test="modTime != null" >
+                #{modTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="tstm != null" >
+                #{tstm,jdbcType=TIMESTAMP},
+            </if>
+            <if test="goods_specification_name_value != null" >
+                #{goods_specification_name_value,jdbcType=LONGVARCHAR},
+            </if>
+        </trim>
 	</insert>
 
     <update id="update" parameterType="com.kmall.api.entity.CartVo">
         update mall_cart
-        <set>
-            <if test="user_id != null">`user_id` = #{user_id},</if>
-            <if test="store_id != null">`store_id` = #{store_id},</if>
-            <if test="goods_id != null">`goods_id` = #{goods_id},</if>
-            <if test="goods_sn != null">`goods_sn` = #{goods_sn},</if>
-            <if test="product_id != null">`product_id` = #{product_id},</if>
-            <if test="goods_name != null">`goods_name` = #{goods_name},</if>
-            <if test="market_price != null">`market_price` = #{market_price},</if>
-            <if test="retail_price != null">`retail_price` = #{retail_price},</if>
-            <if test="number != null">`number` = #{number},</if>
-            <if test="goods_specification_name_value != null">`goods_specification_name_value` =
-                #{goods_specification_name_value},
-            </if>
-            <if test="goods_specification_ids != null">`goods_specification_ids` = #{goods_specification_ids},</if>
-            <if test="checked != null">`checked` = #{checked},</if>
-            <if test="list_pic_url != null">`list_pic_url` = #{list_pic_url}</if>
+        <set >
+            <if test="user_id != null" >
+                user_id = #{user_id},
+            </if>
+            <if test="goods_id != null" >
+                goods_id = #{goods_id,jdbcType=INTEGER},
+            </if>
+            <if test="sku != null" >
+                sku = #{sku,jdbcType=VARCHAR},
+            </if>
+            <if test="goods_sn != null" >
+                goods_sn = #{goods_sn,jdbcType=VARCHAR},
+            </if>
+            <if test="product_id != null" >
+                product_id = #{product_id,jdbcType=INTEGER},
+            </if>
+            <if test="goods_name != null" >
+                goods_name = #{goods_name,jdbcType=VARCHAR},
+            </if>
+            <if test="market_price != null" >
+                market_price = #{market_price,jdbcType=DECIMAL},
+            </if>
+            <if test="retail_price != null" >
+                retail_price = #{retail_price,jdbcType=DECIMAL},
+            </if>
+            <if test="number != null" >
+                number = #{number,jdbcType=SMALLINT},
+            </if>
+            <if test="goods_specification_ids != null" >
+                goods_specification_ids = #{goods_specification_ids,jdbcType=VARCHAR},
+            </if>
+            <if test="checked != null" >
+                checked = #{checked,jdbcType=BIT},
+            </if>
+            <if test="list_pic_url != null" >
+                list_pic_url = #{list_pic_url,jdbcType=VARCHAR},
+            </if>
+            <if test="store_id != null" >
+                store_id = #{store_id,jdbcType=INTEGER},
+            </if>
+            <if test="goodsBizType != null" >
+                goods_biz_type = #{goodsBizType,jdbcType=CHAR},
+            </if>
+            <if test="createrSn != null" >
+                creater_sn = #{createrSn,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null" >
+                create_time = #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="moderSn != null" >
+                moder_sn = #{moderSn,jdbcType=VARCHAR},
+            </if>
+            <if test="modTime != null" >
+                mod_time = #{modTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="tstm != null" >
+                tstm = #{tstm,jdbcType=TIMESTAMP},
+            </if>
+            <if test="goods_specification_name_value != null" >
+                goods_specification_name_value = #{goods_specification_name_value,jdbcType=LONGVARCHAR},
+            </if>
         </set>
         where id = #{id}
     </update>
@@ -144,7 +297,7 @@
         <foreach item="product_id" collection="productIds" open="(" separator="," close=")">
             #{product_id}
         </foreach>
-        and user_id = #{userId} and store_id = #{store_id}
+        and user_id = #{user_id} and store_id = #{store_id}
     </update>
 
     <delete id="delete">

+ 31 - 8
kmall-api/src/main/resources/mybatis/mapper/ApiGoodsMapper.xml

@@ -37,12 +37,28 @@
         <result property="is_limited" column="is_limited"/>
         <result property="is_hot" column="is_hot"/>
         <result property="product_id" column="product_id"/>
-        <result property="stock_num" column="stock_num"/>
-        <result property="group_id" column="group_id"/>
+        <result property="sku" column="sku"/>
+        <result property="goodsBizType" column="goods_biz_type"/>
+        <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+        <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+        <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+        <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
+        <result property="goodsRate" column="goods_rate"/>
     </resultMap>
 
+    <sql id="Base_Column_List" >
+        id, category_id, goods_sn, sku, goods_biz_type, name, brand_id, goods_number, keywords,
+        goods_brief, is_on_sale, add_time, sort_order, is_delete, attribute_category, counter_price,
+        extra_price, is_new, goods_unit, primary_pic_url, list_pic_url, retail_price, sell_volume,
+        primary_product_id, unit_price, promotion_desc, promotion_tag, app_exclusive_price,
+        is_app_exclusive, is_limited, is_hot, market_price, creater_sn, create_time, moder_sn,
+        mod_time, tstm,goods_desc,goods_rate
+    </sql>
+
     <select id="queryObject" resultMap="goodsMap">
-		select * from mall_goods
+		select <include refid="Base_Column_List" />
+        from mall_goods
 		where id = #{value}
 	</select>
 
@@ -58,7 +74,6 @@
         a.goods_brief,
         a.is_on_sale,
         a.add_time,
-        a.update_time,
         a.sort_order,
         a.is_delete,
         a.attribute_category,
@@ -80,10 +95,7 @@
         a.is_hot,
         psr1.market_price,
         psr1.stock_num,
-        a.create_user_id,
-        a.create_user_dept_id,
-        a.update_user_id,
-        a.goods_desc
+        a.goods_desc,a.goods_biz_type,a.goods_rate
         from mall_goods a
         LEFT JOIN mall_product_store_rela psr1 ON a.id = psr1.goods_id AND a.primary_product_id = psr1.product_id
         where a.id = #{id} and psr1.store_id = #{storeId}
@@ -119,6 +131,9 @@
         <if test="is_delete != null">
             and a.is_delete = #{is_delete}
         </if>
+        <if test="goodsBizType != null">
+            and a.goods_biz_type = #{goodsBizType}
+        </if>
         <if test="categoryIds != null">
             and a.category_id in
             <foreach item="item" collection="categoryIds" open="(" separator="," close=")">
@@ -261,6 +276,11 @@
         <if test="store_id != null and store_id != ''">
             and psr1.store_id = #{store_id}
         </if>
+
+        <if test="goodsBizType != null and goodsBizType != ''">
+            and a.goods_biz_type = #{goodsBizType}
+        </if>
+
         group by a.id, a.name, a.list_pic_url, psr1.market_price, psr1.retail_price, a.goods_brief, b.id
         <choose>
             <when test="sidx != null and sidx.trim() != ''">
@@ -316,5 +336,8 @@
         <if test="store_id != null and store_id != ''">
             and s.store_id = #{store_id}
         </if>
+        <if test="goodsBizType != null and goodsBizType != ''">
+            and a.goods_biz_type = #{goodsBizType}
+        </if>
     </select>
 </mapper>

+ 93 - 3
kmall-api/src/main/resources/mybatis/mapper/ApiOrderGoodsMapper.xml

@@ -18,6 +18,15 @@
         <result property="is_real" column="is_real"/>
         <result property="goods_specification_ids" column="goods_specification_ids"/>
         <result property="list_pic_url" column="list_pic_url"/>
+        <result column="sku" property="sku" jdbcType="VARCHAR" />
+        <result column="order_biz_type" property="orderBizType" jdbcType="CHAR" />
+        <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+        <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+        <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+        <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
+        <result property="goodsRate" column="goods_rate"/>
+        <result property="settlePrice" column="settle_price"/>
     </resultMap>
 
     <select id="queryObject" resultMap="orderGoodsMap">
@@ -62,7 +71,32 @@
 			`goods_specification_name_value`,
 			`is_real`, 
 			`goods_specification_ids`,
-			`list_pic_url`
+			`list_pic_url`,
+            <if test="goodsRate != null" >
+                goods_rate,
+            </if>
+            <if test="settlePrice != null" >
+                settle_price,
+            </if>
+
+            <if test="sku != null" >
+                sku,
+            </if>
+            <if test="orderBizType != null" >
+                order_biz_type,
+            </if>
+            <if test="createrSn != null" >
+                creater_sn,
+            </if>
+            <if test="createTime != null" >
+                create_time,
+            </if>
+            <if test="moderSn != null" >
+                moder_sn,
+            </if>
+            <if test="modTime != null" >
+                mod_time
+            </if>
 		)
 		values
 		(
@@ -77,7 +111,32 @@
 			#{goods_specification_name_value},
 			#{is_real},
 			#{goods_specification_ids},
-			#{list_pic_url}
+			#{list_pic_url},
+        <if test="goodsRate != null" >
+            #{goodsRate},
+        </if>
+        <if test="settlePrice != null" >
+            #{settlePrice},
+        </if>
+
+        <if test="sku != null" >
+            #{sku,jdbcType=VARCHAR},
+        </if>
+        <if test="orderBizType != null" >
+            #{orderBizType,jdbcType=VARCHAR},
+        </if>
+        <if test="createrSn != null" >
+            #{createrSn,jdbcType=VARCHAR},
+        </if>
+        <if test="createTime != null" >
+            #{createTime,jdbcType=TIMESTAMP},
+        </if>
+        <if test="moderSn != null" >
+            #{moderSn,jdbcType=VARCHAR},
+        </if>
+        <if test="modTime != null" >
+            #{modTime,jdbcType=TIMESTAMP}
+        </if>
 		)
 	</insert>
 
@@ -97,7 +156,29 @@
             </if>
             <if test="is_real != null">`is_real` = #{is_real},</if>
             <if test="goods_specification_ids != null">`goods_specification_ids` = #{goods_specification_ids},</if>
-            <if test="list_pic_url != null">`list_pic_url` = #{list_pic_url}</if>
+            <if test="list_pic_url != null">`list_pic_url` = #{list_pic_url},</if>
+
+            <if test="goodsRate != null">`goods_rate` = #{goodsRate},</if>
+            <if test="settlePrice != null">`settle_price` = #{settlePrice},</if>
+
+            <if test="sku != null" >
+                sku = #{sku,jdbcType=VARCHAR},
+            </if>
+            <if test="orderBizType != null" >
+                order_biz_type = #{orderBizType,jdbcType=CHAR},
+            </if>
+            <if test="createrSn != null" >
+                creater_sn = #{createrSn,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null" >
+                create_time = #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="moderSn != null" >
+                moder_sn = #{moderSn,jdbcType=VARCHAR},
+            </if>
+            <if test="modTime != null" >
+                mod_time = #{modTime,jdbcType=TIMESTAMP}
+            </if>
         </set>
         where id = #{id}
     </update>
@@ -113,4 +194,13 @@
         </foreach>
     </delete>
 
+
+    <select id="queryListByIds" resultMap="orderGoodsMap">
+        select a.*
+        from mall_order_goods a
+        where a.order_id in
+        <foreach collection="orderIdList" item="orderId" open="(" close=")" separator=",">
+            #{orderId}
+        </foreach>
+    </select>
 </mapper>

+ 238 - 6
kmall-api/src/main/resources/mybatis/mapper/ApiOrderMapper.xml

@@ -39,7 +39,6 @@
         <result property="freight_price" column="freight_price"/>
         <result property="coupon_id" column="coupon_id"/>
         <result property="coupon_name" column="coupon_name"/>
-        <result property="parent_id" column="parent_id"/>
         <result property="coupon_price" column="coupon_price"/>
         <result property="full_cut_price" column="full_cut_price"/>
         <result property="order_type" column="order_type"/>
@@ -51,6 +50,21 @@
         <result property="latitude" column="latitude"/>
         <result property="longitude" column="longitude"/>
         <result property="comment_count" column="comment_count"/>
+
+        <result column="merch_sn" property="merchSn" jdbcType="VARCHAR" />
+        <result column="order_biz_type" property="orderBizType" jdbcType="CHAR" />
+        <result column="pay_transaction_id" property="payTransactionId" jdbcType="VARCHAR" />
+        <result column="pay_mobile" property="payMobile" jdbcType="VARCHAR" />
+        <result column="buyer_pay_check" property="buyerPayCheck" jdbcType="VARCHAR" />
+        <result column="pay_flag" property="payFlag" jdbcType="VARCHAR" />
+        <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+        <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+        <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+        <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
+        <result column="merch_order_sn" property="merchOrderSn" jdbcType="VARCHAR" />
+        <result column="is_scan" property="isScan" jdbcType="VARCHAR" />
+
     </resultMap>
 
     <select id="queryObject" resultMap="orderMap">
@@ -174,7 +188,6 @@
 			`pay_time`,
 			`freight_price`,
 			`coupon_id`,
-			`parent_id`,
 			`coupon_price`,
 			`full_cut_price`,
 			`order_type`,
@@ -184,7 +197,44 @@
 			`delivery_remark`,
 			`predict_time`,
 			`coupon_name`,
-			`comment_count`
+			`comment_count`,
+
+        <if test="merchSn != null" >
+            merch_sn,
+        </if>
+        <if test="merchOrderSn != null" >
+            merch_order_sn,
+        </if>
+        <if test="isScan != null" >
+            is_scan,
+        </if>
+        <if test="orderBizType != null" >
+            order_biz_type,
+        </if>
+        <if test="payTransactionId != null" >
+            pay_transaction_id,
+        </if>
+        <if test="payMobile != null" >
+            pay_mobile,
+        </if>
+        <if test="buyerPayCheck != null" >
+            buyer_pay_check,
+        </if>
+        <if test="payFlag != null" >
+            pay_flag,
+        </if>
+        <if test="createrSn != null" >
+            creater_sn,
+        </if>
+        <if test="createTime != null" >
+            create_time,
+        </if>
+        <if test="moderSn != null" >
+            moder_sn,
+        </if>
+        <if test="modTime != null" >
+            mod_time
+        </if>
 		)
 		values
 		(
@@ -216,7 +266,6 @@
 			#{pay_time},
 			#{freight_price},
 			#{coupon_id},
-			#{parent_id},
 			#{coupon_price},
 			#{full_cut_price},
 			#{order_type},
@@ -226,10 +275,157 @@
 			#{delivery_remark},
 			#{predict_time},
 			#{coupon_name},
-			#{comment_count}
+			#{comment_count},
+        <if test="merchSn != null" >
+            #{merchSn,jdbcType=VARCHAR},
+        </if>
+        <if test="merchOrderSn != null" >
+            #{merchOrderSn,jdbcType=VARCHAR},
+        </if>
+        <if test="isScan != null" >
+            #{isScan,jdbcType=VARCHAR},
+        </if>
+        <if test="orderBizType != null" >
+            #{orderBizType,jdbcType=CHAR},
+        </if>
+        <if test="payTransactionId != null" >
+            #{payTransactionId,jdbcType=VARCHAR},
+        </if>
+        <if test="payMobile != null" >
+            #{payMobile,jdbcType=VARCHAR},
+        </if>
+        <if test="buyerPayCheck != null" >
+            #{buyerPayCheck,jdbcType=VARCHAR},
+        </if>
+        <if test="payFlag != null" >
+            #{payFlag,jdbcType=VARCHAR},
+        </if>
+        <if test="createrSn != null" >
+            #{createrSn,jdbcType=VARCHAR},
+        </if>
+        <if test="createTime != null" >
+            #{createTime,jdbcType=TIMESTAMP},
+        </if>
+        <if test="moderSn != null" >
+            #{moderSn,jdbcType=VARCHAR},
+        </if>
+        <if test="modTime != null" >
+            #{modTime,jdbcType=TIMESTAMP}
+        </if>
 		)
 	</insert>
 
+    <select id="queryObjectByIdList" resultMap="orderMap">
+        select a.*
+        from mall_order a
+        where a.id in
+        <foreach collection="orderIdList" item="orderId" open="(" close=")" separator=",">
+            #{orderId}
+        </foreach>
+    </select>
+
+    <insert id="saveBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
+        insert into mall_order
+        (
+        `order_sn`,
+        `user_id`,
+        `order_status`,
+        `shipping_status`,
+        `shipping_code`,
+        `pay_status`,
+        `consignee`,
+        `country`,
+        `province`,
+        `city`,
+        `district`,
+        `address`,
+        `address_id`,
+        `mobile`,
+        `postscript`,
+        `pay_id`,
+        `pay_name`,
+        `shipping_fee`,
+        `actual_price`,
+        `integral`,
+        `integral_money`,
+        `order_price`,
+        `goods_price`,
+        `add_time`,
+        `confirm_time`,
+        `pay_time`,
+        `freight_price`,
+        `coupon_id`,
+        `coupon_price`,
+        `full_cut_price`,
+        `order_type`,
+        `activity_id`,
+        `store_id`,
+        `delivery_date`,
+        `delivery_remark`,
+        `predict_time`,
+        `coupon_name`,
+        `comment_count`,
+         merch_sn,
+        merch_order_sn,
+        is_scan,
+         order_biz_type,
+         pay_transaction_id,
+         pay_mobile,
+         create_time,
+         mod_time
+        )
+        values
+        <foreach collection="list" index="index" item="orderInfo" separator=",">
+            (
+            #{orderInfo.order_sn},
+            #{orderInfo.user_id},
+            #{orderInfo.order_status},
+            #{orderInfo.shipping_status},
+            #{orderInfo.shipping_code},
+            #{orderInfo.pay_status},
+            #{orderInfo.consignee},
+            #{orderInfo.country},
+            #{orderInfo.province},
+            #{orderInfo.city},
+            #{orderInfo.district},
+            #{orderInfo.address},
+            #{orderInfo.address_id},
+            #{orderInfo.mobile},
+            #{orderInfo.postscript},
+            #{orderInfo.pay_id},
+            #{orderInfo.pay_name},
+            #{orderInfo.shipping_fee},
+            #{orderInfo.actual_price},
+            #{orderInfo.integral},
+            #{orderInfo.integral_money},
+            #{orderInfo.order_price},
+            #{orderInfo.goods_price},
+            now(),
+            #{orderInfo.confirm_time},
+            #{orderInfo.pay_time},
+            #{orderInfo.freight_price},
+            #{orderInfo.coupon_id},
+            #{orderInfo.coupon_price},
+            #{orderInfo.full_cut_price},
+            #{orderInfo.order_type},
+            #{orderInfo.activity_id},
+            #{orderInfo.store_id},
+            #{orderInfo.delivery_date},
+            #{orderInfo.delivery_remark},
+            #{orderInfo.predict_time},
+            #{orderInfo.coupon_name},
+            #{orderInfo.comment_count},
+            #{orderInfo.merchSn,jdbcType=VARCHAR},
+            #{orderInfo.merchOrderSn,jdbcType=VARCHAR},
+            #{orderInfo.isScan,jdbcType=VARCHAR},
+            #{orderInfo.orderBizType,jdbcType=CHAR},
+            #{orderInfo.payTransactionId,jdbcType=VARCHAR},
+            #{orderInfo.payMobile,jdbcType=VARCHAR},
+            #{orderInfo.createTime,jdbcType=TIMESTAMP},
+            #{orderInfo.modTime,jdbcType=TIMESTAMP}
+            )
+        </foreach>
+    </insert>
     <update id="update" parameterType="com.kmall.api.entity.OrderVo">
         update mall_order
         <set>
@@ -263,7 +459,6 @@
             <if test="confirm_time != null">`confirm_time` = #{confirm_time},</if>
             <if test="freight_price != null">`freight_price` = #{freight_price},</if>
             <if test="coupon_id != null">`coupon_id` = #{coupon_id},</if>
-            <if test="parent_id != null">`parent_id` = #{parent_id},</if>
             <if test="coupon_price != null">`coupon_price` = #{coupon_price},</if>
             <if test="full_cut_price != null">`full_cut_price` = #{full_cut_price},</if>
             <if test="order_type != null">`order_type` = #{order_type},</if>
@@ -275,6 +470,43 @@
             <if test="predict_time != null">`predict_time` = #{predict_time},</if>
             <if test="coupon_name != null">`coupon_name` = #{coupon_name},</if>
             <if test="comment_count != null">`comment_count` = #{comment_count},</if>
+
+            <if test="merchSn != null" >
+                merch_sn = #{merchSn,jdbcType=VARCHAR},
+            </if>
+            <if test="merchOrderSn != null" >
+                merch_order_sn = #{merchOrderSn,jdbcType=VARCHAR},
+            </if>
+            <if test="isScan != null" >
+                is_scan = #{isScan,jdbcType=VARCHAR},
+            </if>
+            <if test="orderBizType != null" >
+                order_biz_type = #{orderBizType,jdbcType=CHAR},
+            </if>
+            <if test="payTransactionId != null" >
+                pay_transaction_id = #{payTransactionId,jdbcType=VARCHAR},
+            </if>
+            <if test="payMobile != null" >
+                pay_mobile = #{payMobile,jdbcType=VARCHAR},
+            </if>
+            <if test="buyerPayCheck != null" >
+                buyer_pay_check = #{buyerPayCheck,jdbcType=VARCHAR},
+            </if>
+            <if test="payFlag != null" >
+                pay_flag = #{payFlag,jdbcType=VARCHAR},
+            </if>
+            <if test="createrSn != null" >
+                creater_sn = #{createrSn,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null" >
+                create_time = #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="moderSn != null" >
+                moder_sn = #{moderSn,jdbcType=VARCHAR},
+            </if>
+            <if test="modTime != null" >
+                mod_time = #{modTime,jdbcType=TIMESTAMP},
+            </if>
         </set>
         where id = #{id}
     </update>

+ 61 - 36
kmall-api/src/main/resources/mybatis/mapper/ApiStoreMapper.xml

@@ -16,6 +16,13 @@
         <result property="coverRadius" column="cover_radius"/>
         <result property="remark" column="remark"/>
         <result property="distance" column="distance"/>
+        <result column="merch_sn" property="merchSn" jdbcType="VARCHAR" />
+        <result column="merch_name" property="merchName" jdbcType="VARCHAR" />
+        <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+        <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+        <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+        <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
     </resultMap>
 
     <select id="queryObject" resultType="com.kmall.api.entity.StoreVo">
@@ -30,7 +37,8 @@
 			`latitude`,
 			`longitude`,
 			`cover_radius`,
-			`remark`
+			`remark`,merch_sn, merch_name, creater_sn, create_time,
+    moder_sn, mod_time, tstm
 		from mall_store
 		where id = #{id}
 	</select>
@@ -47,7 +55,8 @@
         `latitude`,
         `longitude`,
         `cover_radius`,
-        `remark`
+        `remark`,merch_sn, merch_name, creater_sn, create_time,
+        moder_sn, mod_time, tstm
         from mall_store
         WHERE 1=1
         <if test="province_name != null and province_name.trim() != ''">
@@ -86,38 +95,46 @@
     </select>
 
 
-    <!--<select id="queryNearbyList" resultMap="storeMap">-->
-        <!--select * from-->
-        <!--( select-->
-        <!--`id`,-->
-        <!--`store_name`,-->
-        <!--`store_number`,-->
-        <!--`store_address`,-->
-        <!--`province_name`,-->
-        <!--`city_name`,-->
-        <!--`county_name`,-->
-        <!--`latitude`,-->
-        <!--`longitude`,-->
-        <!--`cover_radius`,-->
-        <!--`remark`,-->
-        <!--round(6378.138*2*asin(sqrt(pow(sin( (a.latitude*pi()/180-#{latitude}*pi()/180)/2),2)-->
-        <!--+cos(a.latitude*pi()/180)*cos(#{latitude}*pi()/180)* pow(sin(-->
-        <!--(a.longitude*pi()/180-#{longitude}*pi()/180)/2),2)))*1000) as distance-->
-        <!--from mall_store a-->
-        <!--WHERE 1=1-->
-        <!--<if test="province_name != null and province_name.trim() != ''">-->
-            <!--AND province_name = #{province_name}-->
-        <!--</if>-->
-        <!--<if test="city_name != null and city_name.trim() != ''">-->
-            <!--AND city_name = #{city_name}-->
-        <!--</if>-->
-        <!--<if test="county_name != null and county_name.trim() != ''">-->
-            <!--AND county_name = #{county_name}-->
-        <!--</if>-->
-        <!--) tmp-->
-        <!--where cover_radius * 1000 > distance-->
-        <!--order by distance asc-->
-    <!--</select>-->
+    <!-- 在配送范围之内查找店铺 -->
+    <!--<select id="queryNearbyList" resultMap="storeMap">
+        select * from
+        ( select
+        `id`,
+        `store_name`,
+        `store_number`,
+        `store_address`,
+        `province_name`,
+        `city_name`,
+        `county_name`,
+        `latitude`,
+        `longitude`,
+        `cover_radius`,
+        `remark`,
+        round(6378.138*2*asin(sqrt(pow(sin((a.latitude*pi()/180-#{latitude}*pi()/180)/2),2)
+          +cos(a.latitude*pi()/180)*cos(#{latitude}*pi()/180)
+          *pow(sin((a.longitude*pi()/180-#{longitude}*pi()/180)/2),2)))*1000) as distance,
+        merch_sn,
+        merch_name,
+        creater_sn,
+        create_time,
+        moder_sn,
+        mod_time,
+        tstm
+        from mall_store a
+        WHERE 1=1
+        <if test="province_name != null and province_name.trim() != ''">
+            AND province_name = #{province_name}
+        </if>
+        <if test="city_name != null and city_name.trim() != ''">
+            AND city_name = #{city_name}
+        </if>
+        <if test="county_name != null and county_name.trim() != ''">
+            AND county_name = #{county_name}
+        </if>
+        ) tmp
+        where cover_radius * 1000 > distance
+        order by distance asc
+    </select>-->
 
     <!--删除距离限制-->
     <select id="queryNearbyList" resultMap="storeMap">
@@ -135,8 +152,15 @@
         `cover_radius`,
         `remark`,
         round(6378.138*2*asin(sqrt(pow(sin( (a.latitude*pi()/180-#{latitude}*pi()/180)/2),2)
-        +cos(a.latitude*pi()/180)*cos(#{latitude}*pi()/180)* pow(sin(
-        (a.longitude*pi()/180-#{longitude}*pi()/180)/2),2)))*1000) as distance
+            +cos(a.latitude*pi()/180)*cos(#{latitude}*pi()/180)
+            *pow(sin((a.longitude*pi()/180-#{longitude}*pi()/180)/2),2)))*1000) as distance,
+        merch_sn,
+        merch_name,
+        creater_sn,
+        create_time,
+        moder_sn,
+        mod_time,
+        tstm
         from mall_store a
         WHERE 1=1
         <if test="province_name != null and province_name.trim() != ''">
@@ -150,5 +174,6 @@
         </if>
         ) tmp
         order by distance asc
+        limit 0, 10
     </select>
 </mapper>

+ 126 - 54
kmall-api/src/main/resources/mybatis/mapper/ApiUserMapper.xml

@@ -4,7 +4,7 @@
 <mapper namespace="com.kmall.api.dao.ApiUserMapper">
 
     <!-- 可根据自己的需求,是否要使用 -->
-    <resultMap type="com.kmall.api.entity.UserVo" id="userMap">
+    <resultMap id="BaseResultMap" type="com.kmall.api.entity.UserVo" >
         <result property="id" column="id"/>
         <result property="username" column="username"/>
         <result property="password" column="password"/>
@@ -19,22 +19,40 @@
         <result property="register_ip" column="register_ip"/>
         <result property="avatar" column="avatar"/>
         <result property="weixin_openid" column="weixin_openid"/>
+        <result column="id_no" property="idNo" jdbcType="VARCHAR" />
+        <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+        <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+        <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+        <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
     </resultMap>
 
-    <select id="queryObject" resultMap="userMap">
-		select * from mall_user where id = #{value}
-	</select>
+    <sql id="Base_Column_List" >
+        id, username, password, gender, birthday, register_time, last_login_time, last_login_ip,
+        user_level_id, nickname, mobile, register_ip, avatar, weixin_openid, id_no, creater_sn,
+        create_time, moder_sn, mod_time, tstm
+    </sql>
+    <select id="queryObject" resultMap="BaseResultMap" >
+        select
+        <include refid="Base_Column_List" />
+        from mall_user
+        where id = #{id}
+    </select>
 
-    <select id="queryByOpenId" resultMap="userMap">
-        select * from mall_user
+    <select id="queryByOpenId" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List" />
+         from mall_user
         where 1 = 1
         <if test="openId != null">
             and `weixin_openid` = #{openId}
         </if>
     </select>
 
-    <select id="queryList" resultMap="userMap">
-        select * from mall_user
+    <select id="queryList" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List" />
+         from mall_user
         <choose>
             <when test="sidx != null and sidx.trim() != ''">
                 order by ${sidx} ${order}
@@ -52,44 +70,80 @@
 		select count(*) from mall_user
 	</select>
 
-    <insert id="save" parameterType="com.kmall.api.entity.UserVo" useGeneratedKeys="true" keyProperty="userId">
+    <insert id="save" parameterType="com.kmall.api.entity.UserVo" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
 		insert into mall_user
-		(
-			`username`, 
-			`password`, 
-			`gender`, 
-			`birthday`, 
-			`register_time`, 
-			`last_login_time`, 
-			`last_login_ip`, 
-			`user_level_id`, 
-			`nickname`, 
-			`mobile`, 
-			`register_ip`, 
-			`avatar`, 
-			`weixin_openid`
-		)
-		values
-		(
-			#{username}, 
-			#{password}, 
-			#{gender}, 
-			#{birthday}, 
-			#{register_time},
-			#{last_login_time},
-			#{last_login_ip},
-			#{user_level_id},
-			#{nickname},
-			#{mobile},
-			#{register_ip},
-			#{avatar},
-			#{weixin_openid}
-		)
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+
+            `username`,
+            `password`,
+            `gender`,
+            `birthday`,
+            `register_time`,
+            `last_login_time`,
+            `last_login_ip`,
+            `user_level_id`,
+            `nickname`,
+            `mobile`,
+            `register_ip`,
+            `avatar`,
+            `weixin_openid`,
+            <if test="idNo != null" >
+                id_no,
+            </if>
+            <if test="createrSn != null" >
+                creater_sn,
+            </if>
+            <if test="createTime != null" >
+                create_time,
+            </if>
+            <if test="moderSn != null" >
+                moder_sn,
+            </if>
+            <if test="modTime != null" >
+                mod_time,
+            </if>
+            <if test="tstm != null" >
+                tstm,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            #{username},
+            #{password},
+            #{gender},
+            #{birthday},
+            #{register_time},
+            #{last_login_time},
+            #{last_login_ip},
+            #{user_level_id},
+            #{nickname},
+            #{mobile},
+            #{register_ip},
+            #{avatar},
+            #{weixin_openid},
+            <if test="idNo != null" >
+                #{idNo,jdbcType=VARCHAR},
+            </if>
+            <if test="createrSn != null" >
+                #{createrSn,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null" >
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="moderSn != null" >
+                #{moderSn,jdbcType=VARCHAR},
+            </if>
+            <if test="modTime != null" >
+                #{modTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="tstm != null" >
+                #{tstm,jdbcType=TIMESTAMP},
+            </if>
+        </trim>
 	</insert>
 
     <update id="update" parameterType="com.kmall.api.entity.UserVo">
         update mall_user
-        <set>
+        <set >
             <if test="username != null">`username` = #{username},</if>
             <if test="password != null">`password` = #{password},</if>
             <if test="gender != null">`gender` = #{gender},</if>
@@ -102,34 +156,52 @@
             <if test="mobile != null">`mobile` = #{mobile},</if>
             <if test="register_ip != null">`register_ip` = #{register_ip},</if>
             <if test="avatar != null">`avatar` = #{avatar},</if>
-            <if test="weixin_openid != null">`weixin_openid` = #{weixin_openid}</if>
+            <if test="weixin_openid != null">`weixin_openid` = #{weixin_openid},</if>
+            <if test="idNo != null" >
+                id_no = #{idNo,jdbcType=VARCHAR},
+            </if>
+            <if test="createrSn != null" >
+                creater_sn = #{createrSn,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null" >
+                create_time = #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="moderSn != null" >
+                moder_sn = #{moderSn,jdbcType=VARCHAR},
+            </if>
+            <if test="modTime != null" >
+                mod_time = #{modTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="tstm != null" >
+                tstm = #{tstm,jdbcType=TIMESTAMP},
+            </if>
         </set>
-        where id = #{id}
+        where id = #{id,jdbcType=INTEGER}
     </update>
 
     <!-- 可根据自己的需求,是否要使用 -->
     <resultMap type="com.kmall.api.entity.SmsLogVo" id="smslogMap">
         <result property="id" column="id"/>
         <result property="user_id" column="user_id"/>
-        <result property="phone" column="phone"/>
-        <result property="log_date" column="log_date"/>
+        <result property="mobile" column="mobile"/>
+        <result property="stime" column="stime"/>
         <result property="sms_code" column="sms_code"/>
         <result property="send_status" column="send_status"/>
-        <result property="sms_text" column="sms_text"/>
+        <result property="content" column="content"/>
+        <result property="smsode" column="sms_code"/>
     </resultMap>
 
     <select id="querySmsCodeByUserId" resultMap="smslogMap">
-        select
-        a.id,
+         a.id,
         a.user_id,
-        a.phone,
-        a.log_date,
+        a.mobile,
+        a.stime,
         a.sms_code,
         a.send_status,
-        a.sms_text
-        from mall_sms_log a
-        left join mall_sms_log b on a.user_id = b.user_id and b.log_date > a.log_date
-        where a.user_id = #{id} and b.id is null
+        a.content
+        from sys_sms_log a
+        left join sys_user b on a.user_id = b.user_id
+        where a.user_id = #{id}  ORDER BY stime desc limit 1
     </select>
 
     <insert id="saveSmsCodeLog" parameterType="com.kmall.api.entity.SmsLogVo">

+ 151 - 0
kmall-api/src/main/resources/mybatis/mapper/MallMngChangeMapper.xml

@@ -0,0 +1,151 @@
+<?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.kmall.api.dao.MallMngChangeMapper" >
+  <resultMap id="BaseResultMap" type="com.kmall.api.entity.MallMngChange" >
+    <id column="id" property="id" jdbcType="INTEGER" />
+    <result column="change_num" property="changeNum" jdbcType="INTEGER" />
+    <result column="original_num" property="originalNum" jdbcType="INTEGER" />
+    <result column="valid_num" property="validNum" jdbcType="INTEGER" />
+    <result column="merch_sn" property="merchSn" jdbcType="VARCHAR" />
+    <result column="sku" property="sku" jdbcType="VARCHAR" />
+    <result column="is_valid" property="isValid" jdbcType="INTEGER" />
+    <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+    <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+    <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
+  </resultMap>
+
+  <sql id="Base_Column_List" >
+    id, change_num, original_num, valid_num, merch_sn, sku, is_valid, creater_sn, create_time, 
+    moder_sn, mod_time, tstm
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from mall_mng_change
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="delete" parameterType="java.lang.Integer" >
+    delete from mall_mng_change
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="save" parameterType="com.kmall.api.entity.MallMngChange"  useGeneratedKeys="true" keyProperty="id">
+    insert into mall_mng_change
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="changeNum != null" >
+        change_num,
+      </if>
+      <if test="originalNum != null" >
+        original_num,
+      </if>
+      <if test="validNum != null" >
+        valid_num,
+      </if>
+      <if test="merchSn != null" >
+        merch_sn,
+      </if>
+      <if test="sku != null" >
+        sku,
+      </if>
+      <if test="isValid != null" >
+        is_valid,
+      </if>
+      <if test="createrSn != null" >
+        creater_sn,
+      </if>
+      <if test="createTime != null" >
+        create_time,
+      </if>
+      <if test="moderSn != null" >
+        moder_sn,
+      </if>
+      <if test="modTime != null" >
+        mod_time,
+      </if>
+      <if test="tstm != null" >
+        tstm,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="changeNum != null" >
+        #{changeNum,jdbcType=INTEGER},
+      </if>
+      <if test="originalNum != null" >
+        #{originalNum,jdbcType=INTEGER},
+      </if>
+      <if test="validNum != null" >
+        #{validNum,jdbcType=INTEGER},
+      </if>
+      <if test="merchSn != null" >
+        #{merchSn,jdbcType=VARCHAR},
+      </if>
+      <if test="sku != null" >
+        #{sku,jdbcType=VARCHAR},
+      </if>
+      <if test="isValid != null" >
+        #{isValid,jdbcType=INTEGER},
+      </if>
+      <if test="createrSn != null" >
+        #{createrSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="update" parameterType="com.kmall.api.entity.MallMngChange" >
+    update mall_mng_change
+    <set >
+      <if test="changeNum != null" >
+        change_num = #{changeNum,jdbcType=INTEGER},
+      </if>
+      <if test="originalNum != null" >
+        original_num = #{originalNum,jdbcType=INTEGER},
+      </if>
+      <if test="validNum != null" >
+        valid_num = #{validNum,jdbcType=INTEGER},
+      </if>
+      <if test="merchSn != null" >
+        merch_sn = #{merchSn,jdbcType=VARCHAR},
+      </if>
+      <if test="sku != null" >
+        sku = #{sku,jdbcType=VARCHAR},
+      </if>
+      <if test="isValid != null" >
+        is_valid = #{isValid,jdbcType=INTEGER},
+      </if>
+      <if test="createrSn != null" >
+        creater_sn = #{createrSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        moder_sn = #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        mod_time = #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        tstm = #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 130 - 0
kmall-api/src/main/resources/mybatis/mapper/MallOrderExceptionRecordMapper.xml

@@ -0,0 +1,130 @@
+<?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.kmall.api.dao.MallOrderExceptionRecordMapper" >
+  <resultMap id="BaseResultMap" type="com.kmall.api.entity.MallOrderExceptionRecord" >
+    <id column="id" property="id" jdbcType="INTEGER" />
+    <result column="order_sn" property="orderSn" jdbcType="VARCHAR" />
+    <result column="user_id" property="userId" jdbcType="INTEGER" />
+    <result column="exception_content" property="exceptionContent" jdbcType="VARCHAR" />
+    <result column="exception_status" property="exceptionStatus" jdbcType="CHAR" />
+    <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+    <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+    <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, order_sn, user_id, exception_content, exception_status, creater_sn, create_time, 
+    moder_sn, mod_time, tstm
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from mall_order_exception_record
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="delete" parameterType="java.lang.Integer" >
+    delete from mall_order_exception_record
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="save" parameterType="com.kmall.api.entity.MallOrderExceptionRecord"  useGeneratedKeys="true" keyProperty="id">
+    insert into mall_order_exception_record
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="orderSn != null" >
+        order_sn,
+      </if>
+      <if test="userId != null" >
+        user_id,
+      </if>
+      <if test="exceptionContent != null" >
+        exception_content,
+      </if>
+      <if test="exceptionStatus != null" >
+        exception_status,
+      </if>
+      <if test="createrSn != null" >
+        creater_sn,
+      </if>
+      <if test="createTime != null" >
+        create_time,
+      </if>
+      <if test="moderSn != null" >
+        moder_sn,
+      </if>
+      <if test="modTime != null" >
+        mod_time,
+      </if>
+      <if test="tstm != null" >
+        tstm,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="orderSn != null" >
+        #{orderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="userId != null" >
+        #{userId,jdbcType=INTEGER},
+      </if>
+      <if test="exceptionContent != null" >
+        #{exceptionContent,jdbcType=VARCHAR},
+      </if>
+      <if test="exceptionStatus != null" >
+        #{exceptionStatus,jdbcType=CHAR},
+      </if>
+      <if test="createrSn != null" >
+        #{createrSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="update" parameterType="com.kmall.api.entity.MallOrderExceptionRecord" >
+    update mall_order_exception_record
+    <set >
+      <if test="orderSn != null" >
+        order_sn = #{orderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="userId != null" >
+        user_id = #{userId,jdbcType=INTEGER},
+      </if>
+      <if test="exceptionContent != null" >
+        exception_content = #{exceptionContent,jdbcType=VARCHAR},
+      </if>
+      <if test="exceptionStatus != null" >
+        exception_status = #{exceptionStatus,jdbcType=CHAR},
+      </if>
+      <if test="createrSn != null" >
+        creater_sn = #{createrSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        moder_sn = #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        mod_time = #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        tstm = #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 130 - 0
kmall-api/src/main/resources/mybatis/mapper/MallOrderProcessRecordMapper.xml

@@ -0,0 +1,130 @@
+<?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.kmall.api.dao.MallOrderProcessRecordMapper" >
+  <resultMap id="BaseResultMap" type="com.kmall.api.entity.MallOrderProcessRecord" >
+    <id column="id" property="id" jdbcType="INTEGER" />
+    <result column="order_sn" property="orderSn" jdbcType="VARCHAR" />
+    <result column="user_id" property="userId" jdbcType="INTEGER" />
+    <result column="process_status" property="processStatus" jdbcType="CHAR" />
+    <result column="process_content" property="processContent" jdbcType="VARCHAR" />
+    <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+    <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+    <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, order_sn, user_id, process_status, process_content, creater_sn, create_time, 
+    moder_sn, mod_time, tstm
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from mall_order_process_record
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="delete" parameterType="java.lang.Integer" >
+    delete from mall_order_process_record
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="save" parameterType="com.kmall.api.entity.MallOrderProcessRecord"  useGeneratedKeys="true" keyProperty="id">
+    insert into mall_order_process_record
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="orderSn != null" >
+        order_sn,
+      </if>
+      <if test="userId != null" >
+        user_id,
+      </if>
+      <if test="processStatus != null" >
+        process_status,
+      </if>
+      <if test="processContent != null" >
+        process_content,
+      </if>
+      <if test="createrSn != null" >
+        creater_sn,
+      </if>
+      <if test="createTime != null" >
+        create_time,
+      </if>
+      <if test="moderSn != null" >
+        moder_sn,
+      </if>
+      <if test="modTime != null" >
+        mod_time,
+      </if>
+      <if test="tstm != null" >
+        tstm,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="orderSn != null" >
+        #{orderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="userId != null" >
+        #{userId,jdbcType=INTEGER},
+      </if>
+      <if test="processStatus != null" >
+        #{processStatus,jdbcType=CHAR},
+      </if>
+      <if test="processContent != null" >
+        #{processContent,jdbcType=VARCHAR},
+      </if>
+      <if test="createrSn != null" >
+        #{createrSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="update" parameterType="com.kmall.api.entity.MallOrderProcessRecord" >
+    update mall_order_process_record
+    <set >
+      <if test="orderSn != null" >
+        order_sn = #{orderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="userId != null" >
+        user_id = #{userId,jdbcType=INTEGER},
+      </if>
+      <if test="processStatus != null" >
+        process_status = #{processStatus,jdbcType=CHAR},
+      </if>
+      <if test="processContent != null" >
+        process_content = #{processContent,jdbcType=VARCHAR},
+      </if>
+      <if test="createrSn != null" >
+        creater_sn = #{createrSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        moder_sn = #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        mod_time = #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        tstm = #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 201 - 0
kmall-api/src/main/resources/mybatis/mapper/MallOrderRefundMapper.xml

@@ -0,0 +1,201 @@
+<?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.kmall.api.dao.MallOrderRefundMapper" >
+  <resultMap id="BaseResultMap" type="com.kmall.api.entity.MallOrderRefund" >
+    <id column="id" property="id" jdbcType="INTEGER" />
+    <result column="order_id" property="orderId" jdbcType="INTEGER" />
+    <result column="user_id" property="userId" jdbcType="INTEGER" />
+    <result column="refund_type" property="refundType" jdbcType="TINYINT" />
+    <result column="refund_time" property="refundTime" jdbcType="TIMESTAMP" />
+    <result column="creator" property="creator" jdbcType="VARCHAR" />
+    <result column="refund_money" property="refundMoney" jdbcType="DECIMAL" />
+    <result column="refund_status" property="refundStatus" jdbcType="TINYINT" />
+    <result column="refund_reason" property="refundReason" jdbcType="VARCHAR" />
+    <result column="approver" property="approver" jdbcType="VARCHAR" />
+    <result column="approval_time" property="approvalTime" jdbcType="TIMESTAMP" />
+    <result column="approval_remark" property="approvalRemark" jdbcType="VARCHAR" />
+    <result column="create_sn" property="createSn" jdbcType="VARCHAR" />
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+    <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+    <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, order_id, user_id, refund_type, refund_time, creator, refund_money, refund_status, 
+    refund_reason, approver, approval_time, approval_remark, create_sn, create_time, 
+    moder_sn, mod_time, tstm
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from mall_order_refund
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="delete" parameterType="java.lang.Integer" >
+    delete from mall_order_refund
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="save" parameterType="com.kmall.api.entity.MallOrderRefund"  useGeneratedKeys="true" keyProperty="id">
+    insert into mall_order_refund
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="orderId != null" >
+        order_id,
+      </if>
+      <if test="userId != null" >
+        user_id,
+      </if>
+      <if test="refundType != null" >
+        refund_type,
+      </if>
+      <if test="refundTime != null" >
+        refund_time,
+      </if>
+      <if test="creator != null" >
+        creator,
+      </if>
+      <if test="refundMoney != null" >
+        refund_money,
+      </if>
+      <if test="refundStatus != null" >
+        refund_status,
+      </if>
+      <if test="refundReason != null" >
+        refund_reason,
+      </if>
+      <if test="approver != null" >
+        approver,
+      </if>
+      <if test="approvalTime != null" >
+        approval_time,
+      </if>
+      <if test="approvalRemark != null" >
+        approval_remark,
+      </if>
+      <if test="createSn != null" >
+        create_sn,
+      </if>
+      <if test="createTime != null" >
+        create_time,
+      </if>
+      <if test="moderSn != null" >
+        moder_sn,
+      </if>
+      <if test="modTime != null" >
+        mod_time,
+      </if>
+      <if test="tstm != null" >
+        tstm,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="orderId != null" >
+        #{orderId,jdbcType=INTEGER},
+      </if>
+      <if test="userId != null" >
+        #{userId,jdbcType=INTEGER},
+      </if>
+      <if test="refundType != null" >
+        #{refundType,jdbcType=TINYINT},
+      </if>
+      <if test="refundTime != null" >
+        #{refundTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="creator != null" >
+        #{creator,jdbcType=VARCHAR},
+      </if>
+      <if test="refundMoney != null" >
+        #{refundMoney,jdbcType=DECIMAL},
+      </if>
+      <if test="refundStatus != null" >
+        #{refundStatus,jdbcType=TINYINT},
+      </if>
+      <if test="refundReason != null" >
+        #{refundReason,jdbcType=VARCHAR},
+      </if>
+      <if test="approver != null" >
+        #{approver,jdbcType=VARCHAR},
+      </if>
+      <if test="approvalTime != null" >
+        #{approvalTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="approvalRemark != null" >
+        #{approvalRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="createSn != null" >
+        #{createSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="update" parameterType="com.kmall.api.entity.MallOrderRefund" >
+    update mall_order_refund
+    <set >
+      <if test="orderId != null" >
+        order_id = #{orderId,jdbcType=INTEGER},
+      </if>
+      <if test="userId != null" >
+        user_id = #{userId,jdbcType=INTEGER},
+      </if>
+      <if test="refundType != null" >
+        refund_type = #{refundType,jdbcType=TINYINT},
+      </if>
+      <if test="refundTime != null" >
+        refund_time = #{refundTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="creator != null" >
+        creator = #{creator,jdbcType=VARCHAR},
+      </if>
+      <if test="refundMoney != null" >
+        refund_money = #{refundMoney,jdbcType=DECIMAL},
+      </if>
+      <if test="refundStatus != null" >
+        refund_status = #{refundStatus,jdbcType=TINYINT},
+      </if>
+      <if test="refundReason != null" >
+        refund_reason = #{refundReason,jdbcType=VARCHAR},
+      </if>
+      <if test="approver != null" >
+        approver = #{approver,jdbcType=VARCHAR},
+      </if>
+      <if test="approvalTime != null" >
+        approval_time = #{approvalTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="approvalRemark != null" >
+        approval_remark = #{approvalRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="createSn != null" >
+        create_sn = #{createSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        moder_sn = #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        mod_time = #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        tstm = #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 151 - 0
kmall-api/src/main/resources/mybatis/mapper/MallStoreGoodsGalleryMapper.xml

@@ -0,0 +1,151 @@
+<?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.kmall.api.dao.MallStoreGoodsGalleryMapper" >
+  <resultMap id="BaseResultMap" type="com.kmall.api.entity.MallStoreGoodsGallery" >
+    <id column="id" property="id" jdbcType="INTEGER" />
+    <result column="goods_id" property="goodsId" jdbcType="INTEGER" />
+    <result column="product_store_id" property="productStoreId" jdbcType="INTEGER" />
+    <result column="img_desc" property="imgDesc" jdbcType="VARCHAR" />
+    <result column="sort_order" property="sortOrder" jdbcType="INTEGER" />
+    <result column="img_url" property="imgUrl" jdbcType="VARCHAR" />
+    <result column="goods_biz_type" property="goodsBizType" jdbcType="CHAR" />
+    <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+    <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+    <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, goods_id, product_store_id, img_desc, sort_order, img_url, goods_biz_type, creater_sn, 
+    create_time, moder_sn, mod_time, tstm
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from mall_store_goods_gallery
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="delete" parameterType="java.lang.Integer" >
+    delete from mall_store_goods_gallery
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="save" parameterType="com.kmall.api.entity.MallStoreGoodsGallery"  useGeneratedKeys="true" keyProperty="id">
+    insert into mall_store_goods_gallery
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="goodsId != null" >
+        goods_id,
+      </if>
+      <if test="productStoreId != null" >
+        product_store_id,
+      </if>
+      <if test="imgDesc != null" >
+        img_desc,
+      </if>
+      <if test="sortOrder != null" >
+        sort_order,
+      </if>
+      <if test="imgUrl != null" >
+        img_url,
+      </if>
+      <if test="goodsBizType != null" >
+        goods_biz_type,
+      </if>
+      <if test="createrSn != null" >
+        creater_sn,
+      </if>
+      <if test="createTime != null" >
+        create_time,
+      </if>
+      <if test="moderSn != null" >
+        moder_sn,
+      </if>
+      <if test="modTime != null" >
+        mod_time,
+      </if>
+      <if test="tstm != null" >
+        tstm,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="goodsId != null" >
+        #{goodsId,jdbcType=INTEGER},
+      </if>
+      <if test="productStoreId != null" >
+        #{productStoreId,jdbcType=INTEGER},
+      </if>
+      <if test="imgDesc != null" >
+        #{imgDesc,jdbcType=VARCHAR},
+      </if>
+      <if test="sortOrder != null" >
+        #{sortOrder,jdbcType=INTEGER},
+      </if>
+      <if test="imgUrl != null" >
+        #{imgUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="goodsBizType != null" >
+        #{goodsBizType,jdbcType=CHAR},
+      </if>
+      <if test="createrSn != null" >
+        #{createrSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+
+  <update id="update" parameterType="com.kmall.api.entity.MallStoreGoodsGallery" >
+    update mall_store_goods_gallery
+    <set >
+      <if test="goodsId != null" >
+        goods_id = #{goodsId,jdbcType=INTEGER},
+      </if>
+      <if test="productStoreId != null" >
+        product_store_id = #{productStoreId,jdbcType=INTEGER},
+      </if>
+      <if test="imgDesc != null" >
+        img_desc = #{imgDesc,jdbcType=VARCHAR},
+      </if>
+      <if test="sortOrder != null" >
+        sort_order = #{sortOrder,jdbcType=INTEGER},
+      </if>
+      <if test="imgUrl != null" >
+        img_url = #{imgUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="goodsBizType != null" >
+        goods_biz_type = #{goodsBizType,jdbcType=CHAR},
+      </if>
+      <if test="createrSn != null" >
+        creater_sn = #{createrSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        moder_sn = #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        mod_time = #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        tstm = #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 161 - 0
kmall-api/src/main/resources/mybatis/mapper/MallStoreMngChangeMapper.xml

@@ -0,0 +1,161 @@
+<?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.kmall.api.dao.MallStoreMngChangeMapper" >
+  <resultMap id="BaseResultMap" type="com.kmall.api.entity.MallStoreMngChange" >
+    <id column="id" property="id" jdbcType="INTEGER" />
+    <result column="store_change_num" property="storeChangeNum" jdbcType="INTEGER" />
+    <result column="store_original_num" property="storeOriginalNum" jdbcType="INTEGER" />
+    <result column="store_valid_num" property="storeValidNum" jdbcType="INTEGER" />
+    <result column="merch_sn" property="merchSn" jdbcType="VARCHAR" />
+    <result column="store_id" property="storeId" jdbcType="INTEGER" />
+    <result column="sku" property="sku" jdbcType="VARCHAR" />
+    <result column="is_valid" property="isValid" jdbcType="INTEGER" />
+    <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+    <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+    <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, store_change_num, store_original_num, store_valid_num, merch_sn, store_id, sku, 
+    is_valid, creater_sn, create_time, moder_sn, mod_time, tstm
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from mall_store_mng_change
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="delete" parameterType="java.lang.Integer" >
+    delete from mall_store_mng_change
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="save" parameterType="com.kmall.api.entity.MallStoreMngChange"  useGeneratedKeys="true" keyProperty="id">
+    insert into mall_store_mng_change
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="storeChangeNum != null" >
+        store_change_num,
+      </if>
+      <if test="storeOriginalNum != null" >
+        store_original_num,
+      </if>
+      <if test="storeValidNum != null" >
+        store_valid_num,
+      </if>
+      <if test="merchSn != null" >
+        merch_sn,
+      </if>
+      <if test="storeId != null" >
+        store_id,
+      </if>
+      <if test="sku != null" >
+        sku,
+      </if>
+      <if test="isValid != null" >
+        is_valid,
+      </if>
+      <if test="createrSn != null" >
+        creater_sn,
+      </if>
+      <if test="createTime != null" >
+        create_time,
+      </if>
+      <if test="moderSn != null" >
+        moder_sn,
+      </if>
+      <if test="modTime != null" >
+        mod_time,
+      </if>
+      <if test="tstm != null" >
+        tstm,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="storeChangeNum != null" >
+        #{storeChangeNum,jdbcType=INTEGER},
+      </if>
+      <if test="storeOriginalNum != null" >
+        #{storeOriginalNum,jdbcType=INTEGER},
+      </if>
+      <if test="storeValidNum != null" >
+        #{storeValidNum,jdbcType=INTEGER},
+      </if>
+      <if test="merchSn != null" >
+        #{merchSn,jdbcType=VARCHAR},
+      </if>
+      <if test="storeId != null" >
+        #{storeId,jdbcType=INTEGER},
+      </if>
+      <if test="sku != null" >
+        #{sku,jdbcType=VARCHAR},
+      </if>
+      <if test="isValid != null" >
+        #{isValid,jdbcType=INTEGER},
+      </if>
+      <if test="createrSn != null" >
+        #{createrSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+
+  <update id="update" parameterType="com.kmall.api.entity.MallStoreMngChange" >
+    update mall_store_mng_change
+    <set >
+      <if test="storeChangeNum != null" >
+        store_change_num = #{storeChangeNum,jdbcType=INTEGER},
+      </if>
+      <if test="storeOriginalNum != null" >
+        store_original_num = #{storeOriginalNum,jdbcType=INTEGER},
+      </if>
+      <if test="storeValidNum != null" >
+        store_valid_num = #{storeValidNum,jdbcType=INTEGER},
+      </if>
+      <if test="merchSn != null" >
+        merch_sn = #{merchSn,jdbcType=VARCHAR},
+      </if>
+      <if test="storeId != null" >
+        store_id = #{storeId,jdbcType=INTEGER},
+      </if>
+      <if test="sku != null" >
+        sku = #{sku,jdbcType=VARCHAR},
+      </if>
+      <if test="isValid != null" >
+        is_valid = #{isValid,jdbcType=INTEGER},
+      </if>
+      <if test="createrSn != null" >
+        creater_sn = #{createrSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        moder_sn = #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        mod_time = #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        tstm = #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 161 - 0
kmall-api/src/main/resources/mybatis/mapper/MallStoreMngMapper.xml

@@ -0,0 +1,161 @@
+<?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.kmall.api.dao.MallStoreMngMapper" >
+  <resultMap id="BaseResultMap" type="com.kmall.api.entity.MallStoreMng" >
+    <id column="id" property="id" jdbcType="INTEGER" />
+    <result column="mall_store_id" property="mallStoreId" jdbcType="INTEGER" />
+    <result column="sku" property="sku" jdbcType="VARCHAR" />
+    <result column="goods_biz_type" property="goodsBizType" jdbcType="CHAR" />
+    <result column="store_num" property="storeNum" jdbcType="INTEGER" />
+    <result column="store_valid_num" property="storeValidNum" jdbcType="INTEGER" />
+    <result column="store_freeze_num" property="storeFreezeNum" jdbcType="INTEGER" />
+    <result column="is_valid" property="isValid" jdbcType="INTEGER" />
+    <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+    <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+    <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, mall_store_id, sku, goods_biz_type, store_num, store_valid_num, store_freeze_num, 
+    is_valid, creater_sn, create_time, moder_sn, mod_time, tstm
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from mall_store_mng
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="delete" parameterType="java.lang.Integer" >
+    delete from mall_store_mng
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="save" parameterType="com.kmall.api.entity.MallStoreMng"  useGeneratedKeys="true" keyProperty="id">
+    insert into mall_store_mng
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="mallStoreId != null" >
+        mall_store_id,
+      </if>
+      <if test="sku != null" >
+        sku,
+      </if>
+      <if test="goodsBizType != null" >
+        goods_biz_type,
+      </if>
+      <if test="storeNum != null" >
+        store_num,
+      </if>
+      <if test="storeValidNum != null" >
+        store_valid_num,
+      </if>
+      <if test="storeFreezeNum != null" >
+        store_freeze_num,
+      </if>
+      <if test="isValid != null" >
+        is_valid,
+      </if>
+      <if test="createrSn != null" >
+        creater_sn,
+      </if>
+      <if test="createTime != null" >
+        create_time,
+      </if>
+      <if test="moderSn != null" >
+        moder_sn,
+      </if>
+      <if test="modTime != null" >
+        mod_time,
+      </if>
+      <if test="tstm != null" >
+        tstm,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="mallStoreId != null" >
+        #{mallStoreId,jdbcType=INTEGER},
+      </if>
+      <if test="sku != null" >
+        #{sku,jdbcType=VARCHAR},
+      </if>
+      <if test="goodsBizType != null" >
+        #{goodsBizType,jdbcType=CHAR},
+      </if>
+      <if test="storeNum != null" >
+        #{storeNum,jdbcType=INTEGER},
+      </if>
+      <if test="storeValidNum != null" >
+        #{storeValidNum,jdbcType=INTEGER},
+      </if>
+      <if test="storeFreezeNum != null" >
+        #{storeFreezeNum,jdbcType=INTEGER},
+      </if>
+      <if test="isValid != null" >
+        #{isValid,jdbcType=INTEGER},
+      </if>
+      <if test="createrSn != null" >
+        #{createrSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+
+  <update id="update" parameterType="com.kmall.api.entity.MallStoreMng" >
+    update mall_store_mng
+    <set >
+      <if test="mallStoreId != null" >
+        mall_store_id = #{mallStoreId,jdbcType=INTEGER},
+      </if>
+      <if test="sku != null" >
+        sku = #{sku,jdbcType=VARCHAR},
+      </if>
+      <if test="goodsBizType != null" >
+        goods_biz_type = #{goodsBizType,jdbcType=CHAR},
+      </if>
+      <if test="storeNum != null" >
+        store_num = #{storeNum,jdbcType=INTEGER},
+      </if>
+      <if test="storeValidNum != null" >
+        store_valid_num = #{storeValidNum,jdbcType=INTEGER},
+      </if>
+      <if test="storeFreezeNum != null" >
+        store_freeze_num = #{storeFreezeNum,jdbcType=INTEGER},
+      </if>
+      <if test="isValid != null" >
+        is_valid = #{isValid,jdbcType=INTEGER},
+      </if>
+      <if test="createrSn != null" >
+        creater_sn = #{createrSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        moder_sn = #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        mod_time = #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        tstm = #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 110 - 0
kmall-api/src/main/resources/mybatis/mapper/MallUserCollectionMapper.xml

@@ -0,0 +1,110 @@
+<?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.kmall.api.dao.MallUserCollectionMapper" >
+  <resultMap id="BaseResultMap" type="com.kmall.api.entity.MallUserCollection" >
+    <id column="id" property="id" jdbcType="INTEGER" />
+    <result column="user_id" property="userId" jdbcType="INTEGER" />
+    <result column="good_id" property="goodId" jdbcType="INTEGER" />
+    <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+    <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+    <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, user_id, good_id, creater_sn, create_time, moder_sn, mod_time, tstm
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from mall_user_collection
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="delete" parameterType="java.lang.Integer" >
+    delete from mall_user_collection
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="save" parameterType="com.kmall.api.entity.MallUserCollection"  useGeneratedKeys="true" keyProperty="id">
+    insert into mall_user_collection
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="userId != null" >
+        user_id,
+      </if>
+      <if test="goodId != null" >
+        good_id,
+      </if>
+      <if test="createrSn != null" >
+        creater_sn,
+      </if>
+      <if test="createTime != null" >
+        create_time,
+      </if>
+      <if test="moderSn != null" >
+        moder_sn,
+      </if>
+      <if test="modTime != null" >
+        mod_time,
+      </if>
+      <if test="tstm != null" >
+        tstm,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="userId != null" >
+        #{userId,jdbcType=INTEGER},
+      </if>
+      <if test="goodId != null" >
+        #{goodId,jdbcType=INTEGER},
+      </if>
+      <if test="createrSn != null" >
+        #{createrSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+
+  <update id="update" parameterType="com.kmall.api.entity.MallUserCollection" >
+    update mall_user_collection
+    <set >
+      <if test="userId != null" >
+        user_id = #{userId,jdbcType=INTEGER},
+      </if>
+      <if test="goodId != null" >
+        good_id = #{goodId,jdbcType=INTEGER},
+      </if>
+      <if test="createrSn != null" >
+        creater_sn = #{createrSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        moder_sn = #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        mod_time = #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        tstm = #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 143 - 0
kmall-api/src/main/resources/mybatis/mapper/PayerChildOrderRealMapper.xml

@@ -0,0 +1,143 @@
+<?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.kmall.dao.PayerChildOrderRealDao">
+
+    <resultMap type="com.kmall.api.entity.PayerChildOrderRealEntity" id="payerChildOrderRealMap">
+        <result property="id" column="id"/>
+        <result property="orderSn" column="order_sn"/>
+        <result property="userId" column="user_id"/>
+        <result property="payNo" column="pay_no"/>
+        <result property="merchSn" column="merch_sn"/>
+		<result property="merchOrderSn" column="merch_order_sn"/>
+        <result property="payPrice" column="pay_price"/>
+        <result property="goodsBizType" column="goods_biz_type"/>
+        <result property="createrSn" column="creater_sn"/>
+        <result property="createTime" column="create_time"/>
+        <result property="moderSn" column="moder_sn"/>
+        <result property="modTime" column="mod_time"/>
+        <result property="tstm" column="tstm"/>
+    </resultMap>
+
+	<select id="queryObject" resultType="com.kmall.api.entity.PayerChildOrderRealEntity">
+		select
+			`id`,
+			`order_sn`,
+			`user_id`,
+			`merch_order_sn`,
+			`pay_no`,
+			`merch_sn`,
+			`pay_price`,
+			`goods_biz_type`,
+			`creater_sn`,
+			`create_time`,
+			`moder_sn`,
+			`mod_time`,
+			`tstm`
+		from mall_payer_child_order_real
+		where id = #{id}
+	</select>
+
+	<select id="queryList" resultType="com.kmall.api.entity.PayerChildOrderRealEntity">
+		select
+    		`id`,
+    		`order_sn`,
+    		`user_id`,
+			`merch_order_sn`,
+    		`pay_no`,
+    		`merch_sn`,
+    		`pay_price`,
+    		`goods_biz_type`,
+    		`creater_sn`,
+    		`create_time`,
+    		`moder_sn`,
+    		`mod_time`,
+    		`tstm`
+		from mall_payer_child_order_real
+		WHERE 1=1
+		<if test="name != null and name.trim() != ''">
+			AND name LIKE concat('%',#{name},'%')
+		</if>
+        <choose>
+            <when test="sidx != null and sidx.trim() != ''">
+                order by ${sidx} ${order}
+            </when>
+			<otherwise>
+                order by id desc
+			</otherwise>
+        </choose>
+		<if test="offset != null and limit != null">
+			limit #{offset}, #{limit}
+		</if>
+	</select>
+	
+ 	<select id="queryTotal" resultType="int">
+		select count(*) from mall_payer_child_order_real
+		WHERE 1=1
+        <if test="name != null and name.trim() != ''">
+            AND name LIKE concat('%',#{name},'%')
+        </if>
+	</select>
+	 
+	<insert id="save" parameterType="com.kmall.api.entity.PayerChildOrderRealEntity">
+		insert into mall_payer_child_order_real(
+			`id`,
+			`order_sn`,
+			`user_id`,
+			`merch_order_sn`,
+			`pay_no`,
+			`merch_sn`,
+			`pay_price`,
+			`goods_biz_type`,
+			`creater_sn`,
+			`create_time`,
+			`moder_sn`,
+			`mod_time`,
+			`tstm`)
+		values(
+			#{id},
+			#{orderSn},
+			#{userId},
+			#{merchOrderSn},
+			#{payNo},
+			#{merchSn},
+			#{payPrice},
+			#{goodsBizType},
+			#{createrSn},
+			#{createTime},
+			#{moderSn},
+			#{modTime},
+			#{tstm})
+	</insert>
+	 
+	<update id="update" parameterType="com.kmall.api.entity.PayerChildOrderRealEntity">
+		update mall_payer_child_order_real 
+		<set>
+			<if test="orderSn != null">`order_sn` = #{orderSn}, </if>
+			<if test="userId != null">`user_id` = #{userId}, </if>
+			<if test="merchOrderSn != null">`merch_order_sn` = #{merchOrderSn}, </if>
+			<if test="payNo != null">`pay_no` = #{payNo}, </if>
+			<if test="merchSn != null">`merch_sn` = #{merchSn}, </if>
+			<if test="payPrice != null">`pay_price` = #{payPrice}, </if>
+			<if test="goodsBizType != null">`goods_biz_type` = #{goodsBizType}, </if>
+			<if test="createrSn != null">`creater_sn` = #{createrSn}, </if>
+			<if test="createTime != null">`create_time` = #{createTime}, </if>
+			<if test="moderSn != null">`moder_sn` = #{moderSn}, </if>
+			<if test="modTime != null">`mod_time` = #{modTime}, </if>
+			<if test="tstm != null">`tstm` = #{tstm}</if>
+		</set>
+		where id = #{id}
+	</update>
+	
+	<delete id="delete">
+		delete from mall_payer_child_order_real where id = #{value}
+	</delete>
+	
+	<delete id="deleteBatch">
+		delete from mall_payer_child_order_real where id in 
+		<foreach item="id" collection="array" open="(" separator="," close=")">
+			#{id}
+		</foreach>
+	</delete>
+
+</mapper>

+ 100 - 0
kmall-api/src/main/resources/mybatis/mapper/SysExceptionRecordMapper.xml

@@ -0,0 +1,100 @@
+<?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.kmall.api.dao.SysExceptionRecordMapper" >
+  <resultMap id="BaseResultMap" type="com.kmall.api.entity.SysExceptionRecord" >
+    <id column="id" property="id" jdbcType="INTEGER" />
+    <result column="exception_info" property="exceptionInfo" jdbcType="VARCHAR" />
+    <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+    <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+    <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, exception_info, creater_sn, create_time, moder_sn, mod_time, tstm
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from sys_exception_record
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="delete" parameterType="java.lang.Integer" >
+    delete from sys_exception_record
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="save" parameterType="com.kmall.api.entity.SysExceptionRecord"  useGeneratedKeys="true" keyProperty="id">
+    insert into sys_exception_record
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="exceptionInfo != null" >
+        exception_info,
+      </if>
+      <if test="createrSn != null" >
+        creater_sn,
+      </if>
+      <if test="createTime != null" >
+        create_time,
+      </if>
+      <if test="moderSn != null" >
+        moder_sn,
+      </if>
+      <if test="modTime != null" >
+        mod_time,
+      </if>
+      <if test="tstm != null" >
+        tstm,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="exceptionInfo != null" >
+        #{exceptionInfo,jdbcType=VARCHAR},
+      </if>
+      <if test="createrSn != null" >
+        #{createrSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+
+  <update id="update" parameterType="com.kmall.api.entity.SysExceptionRecord" >
+    update sys_exception_record
+    <set >
+      <if test="exceptionInfo != null" >
+        exception_info = #{exceptionInfo,jdbcType=VARCHAR},
+      </if>
+      <if test="createrSn != null" >
+        creater_sn = #{createrSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        moder_sn = #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        mod_time = #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        tstm = #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 100 - 0
kmall-api/src/main/resources/mybatis/mapper/SysParamMapper.xml

@@ -0,0 +1,100 @@
+<?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.kmall.api.dao.SysParamMapper" >
+  <resultMap id="BaseResultMap" type="com.kmall.api.entity.SysParam" >
+    <id column="param_id" property="paramId" jdbcType="INTEGER" />
+    <result column="param_name" property="paramName" jdbcType="VARCHAR" />
+    <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
+    <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
+    <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    param_id, param_name, creater_sn, create_time, moder_sn, mod_time, tstm
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from sys_param
+    where param_id = #{paramId,jdbcType=INTEGER}
+  </select>
+  <delete id="delete" parameterType="java.lang.Integer" >
+    delete from sys_param
+    where param_id = #{paramId,jdbcType=INTEGER}
+  </delete>
+  <insert id="save" parameterType="com.kmall.api.entity.SysParam"  useGeneratedKeys="true" keyProperty="id">
+    insert into sys_param
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="paramId != null" >
+        param_id,
+      </if>
+      <if test="paramName != null" >
+        param_name,
+      </if>
+      <if test="createrSn != null" >
+        creater_sn,
+      </if>
+      <if test="createTime != null" >
+        create_time,
+      </if>
+      <if test="moderSn != null" >
+        moder_sn,
+      </if>
+      <if test="modTime != null" >
+        mod_time,
+      </if>
+      <if test="tstm != null" >
+        tstm,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="paramId != null" >
+        #{paramId,jdbcType=INTEGER},
+      </if>
+      <if test="paramName != null" >
+        #{paramName,jdbcType=VARCHAR},
+      </if>
+      <if test="createrSn != null" >
+        #{createrSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+
+  <update id="update" parameterType="com.kmall.api.entity.SysParam" >
+    update sys_param
+    <set >
+      <if test="paramName != null" >
+        param_name = #{paramName,jdbcType=VARCHAR},
+      </if>
+      <if test="createrSn != null" >
+        creater_sn = #{createrSn,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="moderSn != null" >
+        moder_sn = #{moderSn,jdbcType=VARCHAR},
+      </if>
+      <if test="modTime != null" >
+        mod_time = #{modTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="tstm != null" >
+        tstm = #{tstm,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where param_id = #{paramId,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 2 - 0
kmall-common/src/main/java/com/kmall/common/dao/SysSmsLogDao.java

@@ -1,6 +1,7 @@
 package com.kmall.common.dao;
 
 import com.kmall.common.entity.SysSmsLogEntity;
+import org.springframework.stereotype.Component;
 
 /**
  * Dao
@@ -8,6 +9,7 @@ import com.kmall.common.entity.SysSmsLogEntity;
  * @author Scott
  * @date 2017-12-16 23:38:05
  */
+@Component
 public interface SysSmsLogDao extends BaseDao<SysSmsLogEntity> {
 
     SysSmsLogEntity querySmsCodeByUserId(Long userId);

+ 2 - 0
kmall-common/src/main/java/com/kmall/common/dao/TemplateConfDao.java

@@ -1,6 +1,7 @@
 package com.kmall.common.dao;
 
 import com.kmall.common.entity.TemplateConfVo;
+import org.springframework.stereotype.Component;
 
 /**
  * 微信模板消息日志Dao
@@ -9,6 +10,7 @@ import com.kmall.common.entity.TemplateConfVo;
  * @email
  * @date 2017-12-02 16:49:29
  */
+@Component
 public interface TemplateConfDao extends BaseDao<TemplateConfVo> {
 
     TemplateConfVo queryByTypeId(Integer templateType);

+ 11 - 0
kmall-common/src/main/java/com/kmall/common/entity/SysSmsLogEntity.java

@@ -76,6 +76,17 @@ public class SysSmsLogEntity implements Serializable {
      */
     private String userName;
 
+
+    private String smsCode;
+
+    public String getSmsCode() {
+        return smsCode;
+    }
+
+    public void setSmsCode(String smsCode) {
+        this.smsCode = smsCode;
+    }
+
     /**
      * 设置:主键
      */

+ 2 - 0
kmall-common/src/main/java/com/kmall/common/service/impl/SysSmsLogServiceImpl.java

@@ -111,6 +111,8 @@ public class SysSmsLogServiceImpl implements SysSmsLogService {
         if (null == smsLog.getStime()) {
             smsLog.setStime(new Date());
         }
+        smsLog.setMobile(smsLog.getMobile());
+        smsLog.setSmsCode(smsLog.getSmsCode());
         //保存发送记录
         save(smsLog);
         return smsLog;

+ 4 - 4
kmall-common/src/main/java/com/kmall/common/utils/redis/JedisUtil.java

@@ -1,7 +1,6 @@
 package com.kmall.common.utils.redis;
 
 import com.google.common.collect.Sets;
-import com.mysql.jdbc.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
@@ -599,7 +598,7 @@ public class JedisUtil {
                 value = new HashMap<String, Object>();
                 Map<byte[], byte[]> map = jedis.hgetAll(getBytesKey(key));
                 for (Map.Entry<byte[], byte[]> e : map.entrySet()) {
-                    value.put(StringUtils.toString(e.getKey()),
+                    value.put(String.valueOf(e.getKey()),
                             toObject(e.getValue()));
                 }
                 logger.debug("getObjectMap {} ", key, value);
@@ -955,7 +954,8 @@ public class JedisUtil {
      */
     public static byte[] getBytesKey(Object object) {
         if (object instanceof String) {
-            return StringUtils.getBytes((String) object);
+            String ob =(String) object;
+            return ob.getBytes();
         } else {
             return ObjectUtils.serialize(object);
         }
@@ -969,7 +969,7 @@ public class JedisUtil {
      */
     public static Object getObjectKey(byte[] key) {
         try {
-            return StringUtils.toString(key);
+            return String.valueOf(key);
         } catch (UnsupportedOperationException uoe) {
             try {
                 return JedisUtil.toObject(key);

+ 1 - 1
kmall-common/src/main/java/com/kmall/common/utils/wechat/WechatUtil.java

@@ -275,7 +275,7 @@ public class WechatUtil {
 
         StringEntity postEntity = new StringEntity(data, "UTF-8");
         httpPost.addHeader("Content-Type", "text/xml");
-        httpPost.addHeader("User-Agent", "wxpay sdk java v1.0 " + ResourceUtil.getConfigByName("\\conf\\wx-mp", "wx.mchId"));
+        httpPost.addHeader("User-Agent", "wxpay sdk java v1.0 " + ResourceUtil.getConfigByName("\\conf\\wx-mp", "wx.dev.mchId"));
         httpPost.setEntity(postEntity);
 
         try {

+ 9 - 2
kmall-common/src/main/resources/mybatis/mapper/SysSmsLogDao.xml

@@ -18,6 +18,7 @@
         <result property="successNum" column="success_num"/>
         <result property="blackNum" column="black_num"/>
         <result property="returnMsg" column="return_msg"/>
+        <result property="smsode" column="sms_code"/>
     </resultMap>
 
     <select id="queryObject" resultType="com.kmall.common.entity.SysSmsLogEntity">
@@ -35,7 +36,8 @@
 			`invalid_num`,
 			`success_num`,
 			`black_num`,
-			`return_msg`
+			`return_msg`,
+			sms_code
 		from sys_sms_log
 		where id = #{id}
 	</select>
@@ -56,6 +58,7 @@
         sys_sms_log.success_num,
         sys_sms_log.black_num,
         sys_sms_log.return_msg,
+        sys_sms_log.sms_code,
         sys_user.username user_name
         from sys_sms_log
         LEFT JOIN sys_user ON sys_user.user_id = sys_sms_log.user_id
@@ -99,6 +102,7 @@
 			`invalid_num`,
 			`success_num`,
 			`black_num`,
+			 sms_code,
 			`return_msg`)
 		values(
 			#{id},
@@ -114,6 +118,7 @@
 			#{invalidNum},
 			#{successNum},
 			#{blackNum},
+			#{smsCode},
 			#{returnMsg})
 	</insert>
 
@@ -132,6 +137,7 @@
             <if test="invalidNum != null">`invalid_num` = #{invalidNum},</if>
             <if test="successNum != null">`success_num` = #{successNum},</if>
             <if test="blackNum != null">`black_num` = #{blackNum},</if>
+            <if test="smsCode != null">`sms_code` = #{smsCode},</if>
             <if test="returnMsg != null">`return_msg` = #{returnMsg}</if>
         </set>
         where id = #{id}
@@ -163,7 +169,8 @@
         a.invalid_num,
         a.success_num,
         a.black_num,
-        a.return_msg
+        a.return_msg,
+        a.sms_code
 		from sys_sms_log a
 		left join sys_sms_log b on a.user_id = b.user_id and b.stime > a.stime
 		where a.user_id = #{user_id} and b.id is null

+ 2 - 1
wx-mall/app.js

@@ -24,6 +24,7 @@ App({
       nickName: '点击头像登录',
       avatarUrl: 'https://www.meiping123.com/upload/20171125/1721207662403.png'
     },
-    token: ''
+    token: '',
+    appGoodsBizType: '00'
   }
 })

+ 2 - 1
wx-mall/app.json

@@ -48,7 +48,8 @@
     "pages/map/map",
     "pages/auth/btnAuth/btnAuth",
     "pages/ucenter/wuliu/wuliu",
-    "pages/ucenter/wuliuwebview/wuliuwebview"
+    "pages/ucenter/wuliuwebview/wuliuwebview",
+    "pages/ucenter/idCard/idCard"
   ],
   "window": {
     "backgroundTextStyle": "dark",

+ 5 - 2
wx-mall/app.wxss

@@ -110,11 +110,11 @@ view, text {
 }
 
 .list-cell-bd .list-label {
-  font-size: 1em;
+  font-size: 24rpx;
 }
 
 .list-cell-bd .list-label-desc {
-  font-size: 0.9em;
+  font-size: 24rpx;
   color: #9b9b9b;
   padding-top: 5px;
 }
@@ -125,6 +125,9 @@ view, text {
   text-align: right;
   color: #999;
 }
+.list-cell-ft .txt {
+  font-size: 24rpx;
+}
 
 .list-cell-ft.router::after {
   content: " ";

Some files were not shown because too many files changed in this diff