1
0
Quellcode durchsuchen

小程序api服务端修改

hyq vor 6 Jahren
Ursprung
Commit
6f9c13b8b4
74 geänderte Dateien mit 4641 neuen und 262 gelöschten Zeilen
  1. 20 6
      kmall-api/src/main/java/com/kmall/api/api/ApiAuthController.java
  2. 20 9
      kmall-api/src/main/java/com/kmall/api/api/ApiCartController.java
  3. 3 4
      kmall-api/src/main/java/com/kmall/api/api/ApiCouponController.java
  4. 1 1
      kmall-api/src/main/java/com/kmall/api/api/ApiGoodsController.java
  5. 3 0
      kmall-api/src/main/java/com/kmall/api/api/ApiGoodsGroupController.java
  6. 2 2
      kmall-api/src/main/java/com/kmall/api/api/ApiIndexController.java
  7. 8 7
      kmall-api/src/main/java/com/kmall/api/api/ApiUserController.java
  8. 8 1
      kmall-api/src/main/java/com/kmall/api/cache/UserTokenCache.java
  9. 237 0
      kmall-api/src/main/java/com/kmall/api/contants/Dict.java
  10. 3 1
      kmall-api/src/main/java/com/kmall/api/dao/ApiCartMapper.java
  11. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiCommentMapper.java
  12. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiCommentPictureMapper.java
  13. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiCouponMapper.java
  14. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiGoodsGroupOpenDetailMapper.java
  15. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiGoodsGroupOpenMapper.java
  16. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiOrderGoodsMapper.java
  17. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiOrderMapper.java
  18. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiProductMapper.java
  19. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiSysPrinterMapper.java
  20. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiUserCouponMapper.java
  21. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiUserLevelMapper.java
  22. 4 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiUserMapper.java
  23. 13 0
      kmall-api/src/main/java/com/kmall/api/dao/MallMngChangeMapper.java
  24. 12 0
      kmall-api/src/main/java/com/kmall/api/dao/MallOrderExceptionRecordMapper.java
  25. 10 0
      kmall-api/src/main/java/com/kmall/api/dao/MallOrderProcessRecordMapper.java
  26. 9 0
      kmall-api/src/main/java/com/kmall/api/dao/MallOrderRefundMapper.java
  27. 10 0
      kmall-api/src/main/java/com/kmall/api/dao/MallStoreGoodsGalleryMapper.java
  28. 10 0
      kmall-api/src/main/java/com/kmall/api/dao/MallStoreMngChangeMapper.java
  29. 9 0
      kmall-api/src/main/java/com/kmall/api/dao/MallStoreMngMapper.java
  30. 10 0
      kmall-api/src/main/java/com/kmall/api/dao/MallUserCollectionMapper.java
  31. 15 0
      kmall-api/src/main/java/com/kmall/api/dao/PayerChildOrderRealMapper.java
  32. 9 0
      kmall-api/src/main/java/com/kmall/api/dao/SysExceptionRecordMapper.java
  33. 10 0
      kmall-api/src/main/java/com/kmall/api/dao/SysParamMapper.java
  34. 37 36
      kmall-api/src/main/java/com/kmall/api/entity/AdVo.java
  35. 71 0
      kmall-api/src/main/java/com/kmall/api/entity/CartVo.java
  36. 74 3
      kmall-api/src/main/java/com/kmall/api/entity/GoodsVo.java
  37. 132 0
      kmall-api/src/main/java/com/kmall/api/entity/MallMngChange.java
  38. 112 0
      kmall-api/src/main/java/com/kmall/api/entity/MallOrderExceptionRecord.java
  39. 112 0
      kmall-api/src/main/java/com/kmall/api/entity/MallOrderProcessRecord.java
  40. 183 0
      kmall-api/src/main/java/com/kmall/api/entity/MallOrderRefund.java
  41. 132 0
      kmall-api/src/main/java/com/kmall/api/entity/MallStoreGoodsGallery.java
  42. 142 0
      kmall-api/src/main/java/com/kmall/api/entity/MallStoreMng.java
  43. 142 0
      kmall-api/src/main/java/com/kmall/api/entity/MallStoreMngChange.java
  44. 92 0
      kmall-api/src/main/java/com/kmall/api/entity/MallUserCollection.java
  45. 73 0
      kmall-api/src/main/java/com/kmall/api/entity/OrderGoodsVo.java
  46. 122 1
      kmall-api/src/main/java/com/kmall/api/entity/OrderVo.java
  47. 222 0
      kmall-api/src/main/java/com/kmall/api/entity/PayerChildOrderRealEntity.java
  48. 82 0
      kmall-api/src/main/java/com/kmall/api/entity/SysExceptionRecord.java
  49. 82 0
      kmall-api/src/main/java/com/kmall/api/entity/SysParam.java
  50. 16 0
      kmall-api/src/main/java/com/kmall/api/entity/TokenEntity.java
  51. 12 0
      kmall-api/src/main/java/com/kmall/api/entity/UserVo.java
  52. 1 0
      kmall-api/src/main/java/com/kmall/api/service/ApiCartService.java
  53. 135 70
      kmall-api/src/main/java/com/kmall/api/service/ApiOrderService.java
  54. 51 0
      kmall-api/src/main/java/com/kmall/api/service/PayerChildOrderRealService.java
  55. 2 1
      kmall-api/src/main/java/com/kmall/api/service/TokenService.java
  56. 11 1
      kmall-api/src/main/java/com/kmall/api/util/ApiBaseAction.java
  57. 4 4
      kmall-api/src/main/resources/mybatis/mapper/ApiAdMapper.xml
  58. 201 51
      kmall-api/src/main/resources/mybatis/mapper/ApiCartMapper.xml
  59. 19 9
      kmall-api/src/main/resources/mybatis/mapper/ApiGoodsMapper.xml
  60. 67 3
      kmall-api/src/main/resources/mybatis/mapper/ApiOrderGoodsMapper.xml
  61. 204 6
      kmall-api/src/main/resources/mybatis/mapper/ApiOrderMapper.xml
  62. 13 3
      kmall-api/src/main/resources/mybatis/mapper/ApiStoreMapper.xml
  63. 115 43
      kmall-api/src/main/resources/mybatis/mapper/ApiUserMapper.xml
  64. 151 0
      kmall-api/src/main/resources/mybatis/mapper/MallMngChangeMapper.xml
  65. 130 0
      kmall-api/src/main/resources/mybatis/mapper/MallOrderExceptionRecordMapper.xml
  66. 130 0
      kmall-api/src/main/resources/mybatis/mapper/MallOrderProcessRecordMapper.xml
  67. 201 0
      kmall-api/src/main/resources/mybatis/mapper/MallOrderRefundMapper.xml
  68. 151 0
      kmall-api/src/main/resources/mybatis/mapper/MallStoreGoodsGalleryMapper.xml
  69. 161 0
      kmall-api/src/main/resources/mybatis/mapper/MallStoreMngChangeMapper.xml
  70. 161 0
      kmall-api/src/main/resources/mybatis/mapper/MallStoreMngMapper.xml
  71. 110 0
      kmall-api/src/main/resources/mybatis/mapper/MallUserCollectionMapper.xml
  72. 137 0
      kmall-api/src/main/resources/mybatis/mapper/PayerChildOrderRealMapper.xml
  73. 100 0
      kmall-api/src/main/resources/mybatis/mapper/SysExceptionRecordMapper.xml
  74. 100 0
      kmall-api/src/main/resources/mybatis/mapper/SysParamMapper.xml

+ 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);

+ 20 - 9
kmall-api/src/main/java/com/kmall/api/api/ApiCartController.java

@@ -2,6 +2,7 @@ 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;
@@ -84,7 +85,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();
@@ -104,6 +107,11 @@ 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.setGoodsBizType(Dict.orderBizType.valueOf("item_"+ cartItem.getGoodsBizType()).getItemName());
+            }else{
+                cartItem.setGoodsBizType("");
+            }
         }
         // 获取优惠信息提示 邮费
         CouponVo shippingCoupon = apiCouponService.matchShippingSign(loginUser.getId(), checkedGoodsAmount);
@@ -171,8 +179,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 +232,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 +259,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,6 +295,7 @@ 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);
+            cartInfo.setGoodsBizType(goodsVo.getOrderBizType());
             cartService.save(cartInfo);
         }
         return toResponsSuccess("添加成功");
@@ -354,7 +365,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 +394,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());
     }
 
     /**
@@ -399,7 +410,7 @@ public class ApiCartController extends ApiBaseAction {
         }
         String[] productIdArray = productIds.split(",");
         cartService.updateCheck(productIdArray, isChecked, loginUser.getId(), getStoreId());
-        return toResponsSuccess(getCart(loginUser));
+        return toResponsSuccess(getCart());
     }
 
     //删除选中的购物车商品,批量删除
@@ -411,7 +422,7 @@ public class ApiCartController extends ApiBaseAction {
             return toResponsFail("删除出错");
         }
         cartService.delete(cartId);
-        return toResponsSuccess(getCart(loginUser));
+        return toResponsSuccess(getCart());
     }
 
     //  获取购物车商品的总件件数

+ 3 - 4
kmall-api/src/main/java/com/kmall/api/api/ApiCouponController.java

@@ -40,14 +40,13 @@ public class ApiCouponController extends ApiBaseAction {
     /**
      * 是否有可以参加的活动
      *
-     * @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 +54,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);
         }

+ 1 - 1
kmall-api/src/main/java/com/kmall/api/api/ApiGoodsController.java

@@ -468,7 +468,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();

+ 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);

+ 2 - 2
kmall-api/src/main/java/com/kmall/api/api/ApiIndexController.java

@@ -54,9 +54,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);
                 }
             }

+ 8 - 7
kmall-api/src/main/java/com/kmall/api/api/ApiUserController.java

@@ -35,7 +35,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);
@@ -75,13 +75,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() {
+        UserVo userInfo =new UserVo();
+        Long userId = getUserId();
+        String userLevel = userService.getUserLevel(userService.queryObject(userId));
+        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;
+        }
+    }
+}

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

@@ -3,15 +3,17 @@ 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;
 
 /**
  * @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);
 

+ 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/ApiOrderGoodsMapper.java

@@ -2,6 +2,7 @@ package com.kmall.api.dao;
 
 import com.kmall.api.entity.OrderGoodsVo;
 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:46
  */
+@Component
 public interface ApiOrderGoodsMapper extends BaseDao<OrderGoodsVo> {
 	
 }

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

@@ -3,6 +3,7 @@ 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.Map;
 
@@ -11,6 +12,7 @@ import java.util.Map;
  * @email
  * @date 2017-08-11 09:16:46
  */
+@Component
 public interface ApiOrderMapper extends BaseDao<OrderVo> {
     void riderOrderUpdate(OrderVo orderVo);
 

+ 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);
+}

+ 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;
+    }
 }

+ 71 - 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,76 @@ public class CartVo implements Serializable {
     //商品图片
     private String list_pic_url;
 
+
+    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 getId() {
         return id;
     }

+ 74 - 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,76 @@ 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;
+
+    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 +235,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;
+    }
+}

+ 73 - 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,78 @@ 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;
+
+    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;
     }

+ 122 - 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,127 @@ 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;
+
+    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;
     }

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

@@ -0,0 +1,222 @@
+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-11 14:38:15
+ */
+public class PayerChildOrderRealEntity implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编号
+     */
+    private Integer id;
+    /**
+     * 订单编号
+     */
+    private String orderSn;
+    /**
+     * 用户编号
+     */
+    private Integer userId;
+    /**
+     * 支付单编号
+     */
+    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 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;
+    }
+}

+ 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) {

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

@@ -43,6 +43,18 @@ 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 getUserLevel() {
         return userLevel;
     }

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

@@ -159,6 +159,7 @@ 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;
     }

+ 135 - 70
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;
@@ -117,19 +118,7 @@ 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);
         //获取要购买的商品
         Map param = new HashMap();
         param.put("user_id", loginUser.getId());
@@ -156,10 +145,117 @@ public class ApiOrderService {
             productInfo.addSellVolume();
             productVos.add(productInfo);
         }
+        List<OrderVo> orderInfoList = new ArrayList();
+        //订单按业务类型进行分单
+        for (CartVo goodsItem : checkedGoodsList) {
+            OrderVo order00 = new OrderVo();
+            OrderVo order02 = new OrderVo();
+            OrderVo order10 = new OrderVo();
+            OrderVo order11 = new OrderVo();
+            if(Dict.orderBizType.item_00.getItem().equalsIgnoreCase(goodsItem.getGoodsBizType())){
+                order00 = setOrderVo(loginUser,jsonParam,storeId,checkedGoodsList,goodsItem.getGoodsBizType());
+                order00.setOrderBizType(goodsItem.getGoodsBizType());//订单业务类型:00:保税备货, 02:保税展示补货,10:保税展示跨境,11:普通商品
+                orderInfoList.add(order00);
+            }
+            if(Dict.orderBizType.item_02.getItem().equalsIgnoreCase(goodsItem.getGoodsBizType())){
+                order02 = setOrderVo(loginUser,jsonParam,storeId,checkedGoodsList,goodsItem.getGoodsBizType());
+                order02.setOrderBizType(goodsItem.getGoodsBizType());
+                orderInfoList.add(order02);
+            }
+            if(Dict.orderBizType.item_10.getItem().equalsIgnoreCase(goodsItem.getGoodsBizType())){
+                order10 = setOrderVo(loginUser,jsonParam,storeId,checkedGoodsList,goodsItem.getGoodsBizType());
+                order10.setOrderBizType(goodsItem.getGoodsBizType());
+                orderInfoList.add(order10);
+            }
+            if(Dict.orderBizType.item_11.getItem().equalsIgnoreCase(goodsItem.getGoodsBizType())){
+                order11 = setOrderVo(loginUser,jsonParam,storeId,checkedGoodsList,goodsItem.getGoodsBizType());
+                order11.setOrderBizType(goodsItem.getGoodsBizType());
+                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())) {
+                        OrderGoodsVo orderGoodsVo = setOrderGoodsVo(orderInfo, goodsItem);
+                        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);
+        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())));
+            }
         }
 
         //获取订单使用的优惠券
@@ -197,7 +293,7 @@ public class ApiOrderService {
         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 +327,36 @@ 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("");
+        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){
+        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());
+        return orderGoodsVo;
     }
-
     /**
      * 支付成功通知
      */

+ 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信息

+ 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>
 

+ 201 - 51
kmall-api/src/main/resources/mybatis/mapper/ApiCartMapper.xml

@@ -14,16 +14,28 @@
         <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="queryList" resultMap="cartMap">
@@ -81,58 +93,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 +294,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">

+ 19 - 9
kmall-api/src/main/resources/mybatis/mapper/ApiGoodsMapper.xml

@@ -36,13 +36,27 @@
         <result property="is_app_exclusive" column="is_app_exclusive"/>
         <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" />
     </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
+    </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 +72,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 +93,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
         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}

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

@@ -18,6 +18,13 @@
         <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" />
     </resultMap>
 
     <select id="queryObject" resultMap="orderGoodsMap">
@@ -62,7 +69,26 @@
 			`goods_specification_name_value`,
 			`is_real`, 
 			`goods_specification_ids`,
-			`list_pic_url`
+			`list_pic_url`,
+
+            <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 +103,26 @@
 			#{goods_specification_name_value},
 			#{is_real},
 			#{goods_specification_ids},
-			#{list_pic_url}
+			#{list_pic_url},
+
+        <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 +142,26 @@
             </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="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>

+ 204 - 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,18 @@
         <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" />
     </resultMap>
 
     <select id="queryObject" resultMap="orderMap">
@@ -174,7 +185,6 @@
 			`pay_time`,
 			`freight_price`,
 			`coupon_id`,
-			`parent_id`,
 			`coupon_price`,
 			`full_cut_price`,
 			`order_type`,
@@ -184,7 +194,38 @@
 			`delivery_remark`,
 			`predict_time`,
 			`coupon_name`,
-			`comment_count`
+			`comment_count`,
+
+        <if test="merchSn != null" >
+            merch_sn,
+        </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 +257,6 @@
 			#{pay_time},
 			#{freight_price},
 			#{coupon_id},
-			#{parent_id},
 			#{coupon_price},
 			#{full_cut_price},
 			#{order_type},
@@ -226,10 +266,138 @@
 			#{delivery_remark},
 			#{predict_time},
 			#{coupon_name},
-			#{comment_count}
+			#{comment_count},
+        <if test="merchSn != null" >
+            #{merchSn,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>
 
+    <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,
+         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.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 +431,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 +442,37 @@
             <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="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>

+ 13 - 3
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() != ''">
@@ -136,7 +145,8 @@
         `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
+        (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() != ''">

+ 115 - 43
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,9 +156,27 @@
             <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>
 
     <!-- 可根据自己的需求,是否要使用 -->

+ 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>

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

@@ -0,0 +1,137 @@
+<?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="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`,
+			`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`,
+    		`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`,
+			`pay_no`,
+			`merch_sn`,
+			`pay_price`,
+			`goods_biz_type`,
+			`creater_sn`,
+			`create_time`,
+			`moder_sn`,
+			`mod_time`,
+			`tstm`)
+		values(
+			#{id},
+			#{orderSn},
+			#{userId},
+			#{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="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>