1
0
فهرست منبع

Merge branch 'master' of dq/kmall-pt into master

黄亚琴 6 سال پیش
والد
کامیت
73377a0c14
72فایلهای تغییر یافته به همراه4319 افزوده شده و 730 حذف شده
  1. 9 7
      kmall-admin/src/main/java/com/kmall/admin/controller/CategoryController.java
  2. 99 0
      kmall-admin/src/main/java/com/kmall/admin/controller/FreightController.java
  3. 106 0
      kmall-admin/src/main/java/com/kmall/admin/controller/FreightItemController.java
  4. 33 5
      kmall-admin/src/main/java/com/kmall/admin/controller/OrderController.java
  5. 106 0
      kmall-admin/src/main/java/com/kmall/admin/controller/OrderProcessRecordController.java
  6. 2 1
      kmall-admin/src/main/java/com/kmall/admin/controller/SysOssController.java
  7. 21 0
      kmall-admin/src/main/java/com/kmall/admin/dao/FreightDao.java
  8. 15 0
      kmall-admin/src/main/java/com/kmall/admin/dao/FreightItemDao.java
  9. 16 0
      kmall-admin/src/main/java/com/kmall/admin/dao/OrderProcessRecordDao.java
  10. 10 0
      kmall-admin/src/main/java/com/kmall/admin/entity/CouponEntity.java
  11. 135 0
      kmall-admin/src/main/java/com/kmall/admin/entity/FreightEntity.java
  12. 148 0
      kmall-admin/src/main/java/com/kmall/admin/entity/FreightItemEntity.java
  13. 115 0
      kmall-admin/src/main/java/com/kmall/admin/entity/GoodsEntity.java
  14. 3 3
      kmall-admin/src/main/java/com/kmall/admin/entity/OrderEntity.java
  15. 460 0
      kmall-admin/src/main/java/com/kmall/admin/entity/OrderProcessRecordEntity.java
  16. 61 0
      kmall-admin/src/main/java/com/kmall/admin/entity/StoreEntity.java
  17. 9 0
      kmall-admin/src/main/java/com/kmall/admin/entity/UserCouponEntity.java
  18. 32 0
      kmall-admin/src/main/java/com/kmall/admin/entity/WuliuEntity.java
  19. 74 0
      kmall-admin/src/main/java/com/kmall/admin/service/FreightItemService.java
  20. 80 0
      kmall-admin/src/main/java/com/kmall/admin/service/FreightService.java
  21. 75 0
      kmall-admin/src/main/java/com/kmall/admin/service/OrderProcessRecordService.java
  22. 2 0
      kmall-admin/src/main/java/com/kmall/admin/service/OrderService.java
  23. 64 0
      kmall-admin/src/main/java/com/kmall/admin/service/impl/FreightItemServiceImpl.java
  24. 166 0
      kmall-admin/src/main/java/com/kmall/admin/service/impl/FreightServiceImpl.java
  25. 2 4
      kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsServiceImpl.java
  26. 64 0
      kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderProcessRecordServiceImpl.java
  27. 65 4
      kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java
  28. 3 0
      kmall-admin/src/main/java/com/kmall/admin/service/impl/StoreServiceImpl.java
  29. 3 3
      kmall-admin/src/main/resources/conf/oms-merch.properties
  30. 10 4
      kmall-admin/src/main/resources/mybatis/mapper/CouponDao.xml
  31. 134 0
      kmall-admin/src/main/resources/mybatis/mapper/FreightDao.xml
  32. 111 0
      kmall-admin/src/main/resources/mybatis/mapper/FreightItemDao.xml
  33. 171 168
      kmall-admin/src/main/resources/mybatis/mapper/GoodsDao.xml
  34. 225 0
      kmall-admin/src/main/resources/mybatis/mapper/OrderProcessRecordDao.xml
  35. 27 62
      kmall-admin/src/main/resources/mybatis/mapper/StoreDao.xml
  36. 11 4
      kmall-admin/src/main/resources/mybatis/mapper/UserCouponDao.xml
  37. 2 2
      kmall-admin/src/main/resources/spring/spring-express-kdn.xml
  38. 12 3
      kmall-admin/src/main/webapp/WEB-INF/page/shop/coupon.html
  39. 7 4
      kmall-admin/src/main/webapp/WEB-INF/page/shop/coupongrads.html
  40. 117 0
      kmall-admin/src/main/webapp/WEB-INF/page/shop/freight.html
  41. 109 43
      kmall-admin/src/main/webapp/WEB-INF/page/shop/goods.html
  42. 129 12
      kmall-admin/src/main/webapp/WEB-INF/page/shop/order.html
  43. 1 1
      kmall-admin/src/main/webapp/WEB-INF/page/shop/orderPrint.html
  44. 1 0
      kmall-admin/src/main/webapp/WEB-INF/page/shop/store.html
  45. 3 0
      kmall-admin/src/main/webapp/WEB-INF/page/sys/header.html
  46. 2 3
      kmall-admin/src/main/webapp/WEB-INF/page/sys/smslog.html
  47. 1 1
      kmall-admin/src/main/webapp/js/common.js
  48. 17 1
      kmall-admin/src/main/webapp/js/shop/coupon.js
  49. 250 0
      kmall-admin/src/main/webapp/js/shop/freight.js
  50. 133 82
      kmall-admin/src/main/webapp/js/shop/goods.js
  51. 59 39
      kmall-admin/src/main/webapp/js/shop/order.js
  52. 1 1
      kmall-admin/src/main/webapp/js/sys/role.js
  53. 12 12
      kmall-admin/src/main/webapp/js/sys/smslog.js
  54. 1 1
      kmall-admin/src/main/webapp/statics/plugins/treegrid/jquery.treegrid.extension.js
  55. 456 0
      kmall-admin/src/main/webapp/statics/qrcode/jquery.qrcode.js
  56. 0 0
      kmall-admin/src/main/webapp/statics/qrcode/jquery.qrcode.min.js
  57. 68 0
      kmall-admin/src/main/webapp/statics/qrcode/utf.js
  58. 5 6
      kmall-api/src/main/java/com/kmall/api/api/ApiCartController.java
  59. 2 3
      kmall-api/src/main/java/com/kmall/api/api/ApiGoodsController.java
  60. 1 1
      kmall-api/src/main/java/com/kmall/api/service/ApiFreightService.java
  61. 5 7
      kmall-api/src/main/java/com/kmall/api/service/ApiOrderService.java
  62. 2 233
      kmall-api/src/main/java/com/kmall/api/service/express/kdn/ApiKdniaoService.java
  63. 1 1
      kmall-common/src/main/java/com/kmall/common/Global.java
  64. 1 1
      kmall-common/src/main/java/com/kmall/common/utils/express/kdn/KdnDevProperties.java
  65. 1 1
      kmall-common/src/main/java/com/kmall/common/utils/express/kdn/KdnProdProperties.java
  66. 1 1
      kmall-common/src/main/java/com/kmall/common/utils/express/kdn/KdnProperties.java
  67. 1 1
      kmall-common/src/main/java/com/kmall/common/utils/express/kdn/KdnPropertiesBuilder.java
  68. 1 1
      kmall-common/src/main/java/com/kmall/common/utils/express/kdn/KdnPropertiesConfiguration.java
  69. 246 0
      kmall-common/src/main/java/com/kmall/common/utils/express/kdn/KdniaoUtil.java
  70. 1 1
      kmall-common/src/main/resources/mybatis/mapper/SysMenuDao.xml
  71. 2 2
      kmall-common/src/main/resources/mybatis/mapper/SysSmsLogDao.xml
  72. 1 1
      sql/kmall_pt.sql

+ 9 - 7
kmall-admin/src/main/java/com/kmall/admin/controller/CategoryController.java

@@ -2,14 +2,12 @@ package com.kmall.admin.controller;
 
 import com.kmall.admin.entity.CategoryEntity;
 import com.kmall.admin.service.CategoryService;
-import com.kmall.common.utils.PageUtils;
-import com.kmall.common.utils.Query;
-import com.kmall.common.utils.R;
-import com.kmall.common.utils.TreeUtils;
+import com.kmall.common.utils.*;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -140,9 +138,13 @@ public class CategoryController {
      */
     @RequestMapping("/getCategorySelectByParent")
     public R getCategorySelectByParent(@RequestParam String parentId) {
-        Map<String, Object> map = new HashMap<>();
-        map.put("parentId", parentId);
-        List<CategoryEntity> list = categoryService.queryList(map);
+        List<CategoryEntity> list = new ArrayList<>();
+        if (StringUtils.isNotEmpty(parentId)) {
+            Map<String, Object> map = new HashMap<>();
+            map.put("parentId", parentId);
+            list = categoryService.queryList(map);
+        }
+
         return R.ok().put("list", list);
     }
 }

+ 99 - 0
kmall-admin/src/main/java/com/kmall/admin/controller/FreightController.java

@@ -0,0 +1,99 @@
+package com.kmall.admin.controller;
+
+import java.util.List;
+import java.util.Map;
+
+import com.kmall.admin.entity.FreightEntity;
+import com.kmall.admin.service.FreightService;
+import com.kmall.common.utils.PageUtils;
+import com.kmall.common.utils.Query;
+import com.kmall.common.utils.R;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * Controller
+ *
+ * @author Scott
+ * @email
+ * @date 2017-08-21 21:19:49
+ */
+@RestController
+@RequestMapping("freight")
+public class FreightController {
+    @Autowired
+    private FreightService freightService;
+
+    /**
+     * 查看列表
+     */
+    @RequestMapping("/list")
+    @RequiresPermissions("freight:list")
+    public R list(@RequestParam Map<String, Object> params) {
+        //查询列表数据
+        Query query = new Query(params);
+
+        List<FreightEntity> freightList = freightService.queryList(query);
+        int total = freightService.queryTotal(query);
+
+        PageUtils pageUtil = new PageUtils(freightList, total, query.getLimit(), query.getPage());
+
+        return R.ok().put("page", pageUtil);
+    }
+
+    /**
+     * 查看信息
+     */
+    @RequestMapping("/info/{id}")
+    @RequiresPermissions("freight:info")
+    public R info(@PathVariable("id") Integer id) {
+        FreightEntity freight = freightService.queryObject(id);
+
+        return R.ok().put("freight", freight);
+    }
+
+    /**
+     * 保存
+     */
+    @RequestMapping("/save")
+    @RequiresPermissions("freight:save")
+    public R save(@RequestBody FreightEntity freight) {
+        freightService.save(freight);
+
+        return R.ok();
+    }
+
+    /**
+     * 修改
+     */
+    @RequestMapping("/update")
+    @RequiresPermissions("freight:update")
+    public R update(@RequestBody FreightEntity freight) {
+        freightService.update(freight);
+
+        return R.ok();
+    }
+
+    /**
+     * 删除
+     */
+    @RequestMapping("/delete")
+    @RequiresPermissions("freight:delete")
+    public R delete(@RequestBody Integer[]ids) {
+        freightService.deleteBatch(ids);
+
+        return R.ok();
+    }
+
+    /**
+     * 查看所有列表
+     */
+    @RequestMapping("/queryAll")
+    public R queryAll(@RequestParam Map<String, Object> params) {
+
+        List<FreightEntity> list = freightService.queryList(params);
+
+        return R.ok().put("list", list);
+    }
+}

+ 106 - 0
kmall-admin/src/main/java/com/kmall/admin/controller/FreightItemController.java

@@ -0,0 +1,106 @@
+package com.kmall.admin.controller;
+
+import java.util.List;
+import java.util.Map;
+
+import com.kmall.admin.entity.FreightItemEntity;
+import com.kmall.admin.service.FreightItemService;
+import com.kmall.common.utils.PageUtils;
+import com.kmall.common.utils.Query;
+import com.kmall.common.utils.R;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * Controller
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2018-10-22 15:18:16
+ */
+@Controller
+@RequestMapping("freightitem")
+public class FreightItemController {
+    @Autowired
+    private FreightItemService freightItemService;
+
+    /**
+     * 查看列表
+     */
+    @RequestMapping("/list")
+    @RequiresPermissions("freightitem:list")
+    @ResponseBody
+    public R list(@RequestParam Map<String, Object> params) {
+        //查询列表数据
+        Query query = new Query(params);
+
+        List<FreightItemEntity> freightItemList = freightItemService.queryList(query);
+        int total = freightItemService.queryTotal(query);
+
+        PageUtils pageUtil = new PageUtils(freightItemList, total, query.getLimit(), query.getPage());
+
+        return R.ok().put("page", pageUtil);
+    }
+
+    /**
+     * 查看信息
+     */
+    @RequestMapping("/info/{id}")
+    @RequiresPermissions("freightitem:info")
+    @ResponseBody
+    public R info(@PathVariable("id") Integer id) {
+        FreightItemEntity freightItem = freightItemService.queryObject(id);
+
+        return R.ok().put("freightItem", freightItem);
+    }
+
+    /**
+     * 保存
+     */
+    @RequestMapping("/save")
+    @RequiresPermissions("freightitem:save")
+    @ResponseBody
+    public R save(@RequestBody FreightItemEntity freightItem) {
+        freightItemService.save(freightItem);
+
+        return R.ok();
+    }
+
+    /**
+     * 修改
+     */
+    @RequestMapping("/update")
+    @RequiresPermissions("freightitem:update")
+    @ResponseBody
+    public R update(@RequestBody FreightItemEntity freightItem) {
+        freightItemService.update(freightItem);
+
+        return R.ok();
+    }
+
+    /**
+     * 删除
+     */
+    @RequestMapping("/delete")
+    @RequiresPermissions("freightitem:delete")
+    @ResponseBody
+    public R delete(@RequestBody Integer[]ids) {
+        freightItemService.deleteBatch(ids);
+
+        return R.ok();
+    }
+
+    /**
+     * 查看所有列表
+     */
+    @RequestMapping("/queryAll")
+    @ResponseBody
+    public R queryAll(@RequestParam Map<String, Object> params) {
+
+        List<FreightItemEntity> list = freightItemService.queryList(params);
+
+        return R.ok().put("list", list);
+    }
+}

+ 33 - 5
kmall-admin/src/main/java/com/kmall/admin/controller/OrderController.java

@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONObject;
 import com.kmall.admin.entity.MallOrderRefundEntity;
 import com.kmall.admin.entity.OrderEntity;
 import com.kmall.admin.service.MallOrderRefundService;
+import com.kmall.admin.entity.OrderProcessRecordEntity;
+import com.kmall.admin.service.OrderProcessRecordService;
 import com.kmall.admin.service.OrderService;
 import com.kmall.api.contants.Dict;
 import com.kmall.api.entity.MallOrderRefund;
@@ -32,6 +34,8 @@ import java.util.Map;
 public class OrderController {
     @Autowired
     private OrderService orderService;
+    @Autowired
+    private OrderProcessRecordService orderProcessRecordService;
 
     @Autowired
     private MallOrderRefundService mallOrderRefundService;
@@ -148,6 +152,30 @@ public class OrderController {
     }
 
     /**
+     * 跟踪快递轨迹
+     * @param id
+     * @return
+     */
+    @RequestMapping("/getLogistics/{id}")
+    @RequiresPermissions("order:getLogistics")
+    public R getLogistics(@PathVariable("id") Long id) {
+        Map result = orderService.getLogistics(id);
+        return R.ok().put("result", result);
+    }
+
+    /**
+     * 获取订单清关信息
+     * @param orderSn
+     * @return
+     */
+    @RequestMapping("/getProcess/{orderSn}")
+    @RequiresPermissions("order:getProcess")
+    public R getProcess(@PathVariable("orderSn") String orderSn) {
+        OrderProcessRecordEntity orderProcessRecordEntity = orderProcessRecordService.queryObjectByOrderSn(orderSn);
+        return R.ok().put("orderProcessRecordEntity", orderProcessRecordEntity);
+    }
+
+    /**
      * 确定收货
      *
      * @param id
@@ -176,9 +204,9 @@ public class OrderController {
 
         if (orderInfo.getOrderStatus() != 0) {
             // todo
-//                    WechatRefundApiResult result = WechatUtil.wxRefund(orderInfo.getOrderSn().toString(),
-//                orderInfo.getActualPrice().doubleValue(), refundMoney.doubleValue());
-            WechatRefundApiResult result = WechatUtil.wxRefund(orderInfo.getMerchOrderSn().toString(),
+//          WechatRefundApiResult result = WechatUtil.wxRefund(orderInfo.getOrderSn().toString(),
+//          orderInfo.getActualPrice().doubleValue(), refundMoney.doubleValue());
+            WechatRefundApiResult result = WechatUtil.wxRefund(orderInfo.getOrderSn().toString(),
                     0.01, 0.01);
             if (!result.getResult_code().equals("SUCCESS")) {
                 MallOrderRefundEntity orderRefund = new MallOrderRefundEntity();
@@ -232,8 +260,8 @@ public class OrderController {
             return R.error("订单未付款,不能退款");
         }
 
-//        WechatRefundApiResult result = WechatUtil.wxRefund(orderInfo.getOrderSn().toString(),
-//                orderInfo.getActualPrice().doubleValue(), refundMoney.doubleValue());
+//      WechatRefundApiResult result = WechatUtil.wxRefund(orderInfo.getOrderSn().toString(),
+//      orderInfo.getActualPrice().doubleValue(), refundMoney.doubleValue());
         WechatRefundApiResult result = WechatUtil.wxRefund(orderInfo.getOrderSn().toString(),
                 0.01, 0.01);
         if (result.getResult_code().equals("SUCCESS")) {

+ 106 - 0
kmall-admin/src/main/java/com/kmall/admin/controller/OrderProcessRecordController.java

@@ -0,0 +1,106 @@
+package com.kmall.admin.controller;
+
+import java.util.List;
+import java.util.Map;
+
+import com.kmall.admin.entity.OrderProcessRecordEntity;
+import com.kmall.admin.service.OrderProcessRecordService;
+import com.kmall.common.utils.PageUtils;
+import com.kmall.common.utils.Query;
+import com.kmall.common.utils.R;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * 订单流转过程记录表Controller
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2018-10-27 16:38:50
+ */
+@RestController
+@RequestMapping("orderprocessrecord")
+public class OrderProcessRecordController {
+    @Autowired
+    private OrderProcessRecordService orderProcessRecordService;
+
+    /**
+     * 查看列表
+     */
+    @RequestMapping("/list")
+    @RequiresPermissions("orderprocessrecord:list")
+    @ResponseBody
+    public R list(@RequestParam Map<String, Object> params) {
+        //查询列表数据
+        Query query = new Query(params);
+
+        List<OrderProcessRecordEntity> orderProcessRecordList = orderProcessRecordService.queryList(query);
+        int total = orderProcessRecordService.queryTotal(query);
+
+        PageUtils pageUtil = new PageUtils(orderProcessRecordList, total, query.getLimit(), query.getPage());
+
+        return R.ok().put("page", pageUtil);
+    }
+
+    /**
+     * 查看信息
+     */
+    @RequestMapping("/info/{id}")
+    @RequiresPermissions("orderprocessrecord:info")
+    @ResponseBody
+    public R info(@PathVariable("id") Integer id) {
+        OrderProcessRecordEntity orderProcessRecord = orderProcessRecordService.queryObject(id);
+
+        return R.ok().put("orderProcessRecord", orderProcessRecord);
+    }
+
+    /**
+     * 保存
+     */
+    @RequestMapping("/save")
+    @RequiresPermissions("orderprocessrecord:save")
+    @ResponseBody
+    public R save(@RequestBody OrderProcessRecordEntity orderProcessRecord) {
+        orderProcessRecordService.save(orderProcessRecord);
+
+        return R.ok();
+    }
+
+    /**
+     * 修改
+     */
+    @RequestMapping("/update")
+    @RequiresPermissions("orderprocessrecord:update")
+    @ResponseBody
+    public R update(@RequestBody OrderProcessRecordEntity orderProcessRecord) {
+        orderProcessRecordService.update(orderProcessRecord);
+
+        return R.ok();
+    }
+
+    /**
+     * 删除
+     */
+    @RequestMapping("/delete")
+    @RequiresPermissions("orderprocessrecord:delete")
+    @ResponseBody
+    public R delete(@RequestBody Integer[]ids) {
+        orderProcessRecordService.deleteBatch(ids);
+
+        return R.ok();
+    }
+
+    /**
+     * 查看所有列表
+     */
+    @RequestMapping("/queryAll")
+    @ResponseBody
+    public R queryAll(@RequestParam Map<String, Object> params) {
+
+        List<OrderProcessRecordEntity> list = orderProcessRecordService.queryList(params);
+
+        return R.ok().put("list", list);
+    }
+}

+ 2 - 1
kmall-admin/src/main/java/com/kmall/admin/controller/SysOssController.java

@@ -2,6 +2,7 @@ package com.kmall.admin.controller;
 
 import com.alibaba.fastjson.JSON;
 import com.kmall.admin.entity.SysOssEntity;
+import com.kmall.common.fileserver.util.FileManager;
 import com.kmall.common.oss.CloudStorageConfig;
 import com.kmall.common.oss.OSSFactory;
 import com.kmall.common.service.SysConfigService;
@@ -108,7 +109,7 @@ public class SysOssController {
             throw new RRException("上传文件不能为空");
         }
         //上传文件
-        String url = OSSFactory.build().upload(file);
+        String url = FileManager.upload(file);;
 
         //保存文件信息
         SysOssEntity ossEntity = new SysOssEntity();

+ 21 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/FreightDao.java

@@ -0,0 +1,21 @@
+package com.kmall.admin.dao;
+
+
+import com.kmall.admin.entity.FreightEntity;
+import com.kmall.common.dao.BaseDao;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Dao
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2018-10-22 15:18:16
+ */
+public interface FreightDao extends BaseDao<FreightEntity> {
+    Integer queryMaxId();
+
+    List<FreightEntity> queryEntity(Map<String, Object> map);
+}

+ 15 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/FreightItemDao.java

@@ -0,0 +1,15 @@
+package com.kmall.admin.dao;
+
+import com.kmall.admin.entity.FreightItemEntity;
+import com.kmall.common.dao.BaseDao;
+
+/**
+ * Dao
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2018-10-22 15:18:16
+ */
+public interface FreightItemDao extends BaseDao<FreightItemEntity> {
+    int deleteByFreId(Integer freId);
+}

+ 16 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/OrderProcessRecordDao.java

@@ -0,0 +1,16 @@
+package com.kmall.admin.dao;
+
+import com.kmall.admin.entity.OrderProcessRecordEntity;
+import com.kmall.common.dao.BaseDao;
+
+/**
+ * 订单流转过程记录表Dao
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2018-10-27 16:38:50
+ */
+public interface OrderProcessRecordDao extends BaseDao<OrderProcessRecordEntity> {
+
+    OrderProcessRecordEntity queryObjectByOrderSn(String orderSn);
+}

+ 10 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/CouponEntity.java

@@ -39,6 +39,8 @@ public class CouponEntity implements Serializable {
     //最小商品金额
     private BigDecimal minGoodsAmount;
 
+    private String isAll;
+
     /**
      * 设置:主键
      */
@@ -192,4 +194,12 @@ public class CouponEntity implements Serializable {
     public BigDecimal getMinGoodsAmount() {
         return minGoodsAmount;
     }
+
+    public String getIsAll() {
+        return isAll;
+    }
+
+    public void setIsAll(String isAll) {
+        this.isAll = isAll;
+    }
 }

+ 135 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/FreightEntity.java

@@ -0,0 +1,135 @@
+package com.kmall.admin.entity;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 实体
+ * 表名 mall_freight
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2018-10-22 15:18:16
+ */
+public class FreightEntity implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private Integer id;
+    /**
+     * 模版名称
+     */
+    private String name;
+    /**
+     * 模版类型:0,买家承担运费;1,卖家包邮
+     */
+    private String templateType;
+    /**
+     * 计价方式:0,按件数;1,按重量;2,按体积
+     */
+    private String pricingManner;
+    /**
+     * 默认模版:0,否;1,是
+     */
+    private String isDefault;
+
+    private BigDecimal defaultFreight;
+
+    private Integer isDelete = 0;
+
+    private List<FreightItemEntity> freightItemEntityList;
+
+    /**
+     * 设置:主键
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 获取:主键
+     */
+    public Integer getId() {
+        return id;
+    }
+    /**
+     * 设置:模版名称
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * 获取:模版名称
+     */
+    public String getName() {
+        return name;
+    }
+    /**
+     * 设置:模版类型:0,买家承担运费;1,卖家包邮
+     */
+    public void setTemplateType(String templateType) {
+        this.templateType = templateType;
+    }
+
+    /**
+     * 获取:模版类型:0,买家承担运费;1,卖家包邮
+     */
+    public String getTemplateType() {
+        return templateType;
+    }
+    /**
+     * 设置:计价方式:0,按件数;1,按重量;2,按体积
+     */
+    public void setPricingManner(String pricingManner) {
+        this.pricingManner = pricingManner;
+    }
+
+    /**
+     * 获取:计价方式:0,按件数;1,按重量;2,按体积
+     */
+    public String getPricingManner() {
+        return pricingManner;
+    }
+    /**
+     * 设置:默认模版:0,否;1,是
+     */
+    public void setIsDefault(String isDefault) {
+        this.isDefault = isDefault;
+    }
+
+    /**
+     * 获取:默认模版:0,否;1,是
+     */
+    public String getIsDefault() {
+        return isDefault;
+    }
+
+    public Integer getIsDelete() {
+        return isDelete;
+    }
+
+    public void setIsDelete(Integer isDelete) {
+        this.isDelete = isDelete;
+    }
+
+    public BigDecimal getDefaultFreight() {
+        return defaultFreight;
+    }
+
+    public void setDefaultFreight(BigDecimal defaultFreight) {
+        this.defaultFreight = defaultFreight;
+    }
+
+    public List<FreightItemEntity> getFreightItemEntityList() {
+        return freightItemEntityList;
+    }
+
+    public void setFreightItemEntityList(List<FreightItemEntity> freightItemEntityList) {
+        this.freightItemEntityList = freightItemEntityList;
+    }
+}

+ 148 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/FreightItemEntity.java

@@ -0,0 +1,148 @@
+package com.kmall.admin.entity;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 实体
+ * 表名 mall_freight_item
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2018-10-22 15:18:16
+ */
+public class FreightItemEntity implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private Integer id;
+    /**
+     * 运费模版id
+     */
+    private Integer freId;
+    /**
+     * 配送范围
+     */
+    private String deliveryArea;
+    /**
+     * 首件(个,kg,m³)
+     */
+    private String firstPiece;
+    /**
+     * 运费
+     */
+    private BigDecimal freight;
+    /**
+     * 续件(个,kg,m³)
+     */
+    private String continuePiece;
+    /**
+     * 续费
+     */
+    private BigDecimal renew;
+
+    private Integer isDelete = 0;
+
+    /**
+     * 设置:主键
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 获取:主键
+     */
+    public Integer getId() {
+        return id;
+    }
+    /**
+     * 设置:运费模版id
+     */
+    public void setFreId(Integer freId) {
+        this.freId = freId;
+    }
+
+    /**
+     * 获取:运费模版id
+     */
+    public Integer getFreId() {
+        return freId;
+    }
+    /**
+     * 设置:配送范围
+     */
+    public void setDeliveryArea(String deliveryArea) {
+        this.deliveryArea = deliveryArea;
+    }
+
+    /**
+     * 获取:配送范围
+     */
+    public String getDeliveryArea() {
+        return deliveryArea;
+    }
+    /**
+     * 设置:首件(个,kg,m³)
+     */
+    public void setFirstPiece(String firstPiece) {
+        this.firstPiece = firstPiece;
+    }
+
+    /**
+     * 获取:首件(个,kg,m³)
+     */
+    public String getFirstPiece() {
+        return firstPiece;
+    }
+    /**
+     * 设置:运费
+     */
+    public void setFreight(BigDecimal freight) {
+        this.freight = freight;
+    }
+
+    /**
+     * 获取:运费
+     */
+    public BigDecimal getFreight() {
+        return freight;
+    }
+    /**
+     * 设置:续件(个,kg,m³)
+     */
+    public void setContinuePiece(String continuePiece) {
+        this.continuePiece = continuePiece;
+    }
+
+    /**
+     * 获取:续件(个,kg,m³)
+     */
+    public String getContinuePiece() {
+        return continuePiece;
+    }
+    /**
+     * 设置:续费
+     */
+    public void setRenew(BigDecimal renew) {
+        this.renew = renew;
+    }
+
+    /**
+     * 获取:续费
+     */
+    public BigDecimal getRenew() {
+        return renew;
+    }
+
+    public Integer getIsDelete() {
+        return isDelete;
+    }
+
+    public void setIsDelete(Integer isDelete) {
+        this.isDelete = isDelete;
+    }
+}

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

@@ -25,6 +25,10 @@ public class GoodsEntity implements Serializable {
     private String name;
     //品牌Id
     private Integer brandId;
+    //运费id
+    private Integer freightId;
+    //品牌
+    private String brand;
     //商品库存
     private Integer goodsNumber;
     //关键字
@@ -57,6 +61,8 @@ public class GoodsEntity implements Serializable {
     private String primaryPicUrl;
     //商品列表图
     private String listPicUrl;
+    //商品税率
+    private BigDecimal goodsRate;
     //零售价格
     private BigDecimal retailPrice;
     //销售量
@@ -276,6 +282,14 @@ public class GoodsEntity implements Serializable {
         return name;
     }
 
+    public Integer getFreightId() {
+        return freightId;
+    }
+
+    public void setFreightId(Integer freightId) {
+        this.freightId = freightId;
+    }
+
     /**
      * 设置:品牌Id
      */
@@ -290,6 +304,14 @@ public class GoodsEntity implements Serializable {
         return brandId;
     }
 
+    public String getBrand() {
+        return brand;
+    }
+
+    public void setBrand(String brand) {
+        this.brand = brand;
+    }
+
     /**
      * 设置:商品序列号
      */
@@ -500,6 +522,14 @@ public class GoodsEntity implements Serializable {
         return listPicUrl;
     }
 
+    public BigDecimal getGoodsRate() {
+        return goodsRate;
+    }
+
+    public void setGoodsRate(BigDecimal goodsRate) {
+        this.goodsRate = goodsRate;
+    }
+
     /**
      * 设置:零售价格
      */
@@ -695,4 +725,89 @@ public class GoodsEntity implements Serializable {
     public void setGoodsType(Integer goodsType) {
         this.goodsType = goodsType;
     }
+
+    /**
+     * 产品条码
+     */
+    private String prodBarcode;
+    /**
+     * 计量单位代码,参见海关编码
+     */
+    private String unitCode;
+    /**
+     * 海关商品编码
+     */
+    private String cusGoodsCode;
+    /**
+     * 国检规格型号
+     */
+    private String ciqProdModel;
+    /**
+     * 原产国代码,海关编码
+     */
+    private String oriCntCode;
+    /**
+     * 海关申报要素,报统一版
+     */
+    private String cusDeclEle;
+    /**
+     * 海关备案编号,企业自编,用于报园区
+     */
+    private String cusRecCode;
+
+    public String getProdBarcode() {
+        return prodBarcode;
+    }
+
+    public void setProdBarcode(String prodBarcode) {
+        this.prodBarcode = prodBarcode;
+    }
+
+    public String getUnitCode() {
+        return unitCode;
+    }
+
+    public void setUnitCode(String unitCode) {
+        this.unitCode = unitCode;
+    }
+
+    public String getCusGoodsCode() {
+        return cusGoodsCode;
+    }
+
+    public void setCusGoodsCode(String cusGoodsCode) {
+        this.cusGoodsCode = cusGoodsCode;
+    }
+
+    public String getCiqProdModel() {
+        return ciqProdModel;
+    }
+
+    public void setCiqProdModel(String ciqProdModel) {
+        this.ciqProdModel = ciqProdModel;
+    }
+
+    public String getOriCntCode() {
+        return oriCntCode;
+    }
+
+    public void setOriCntCode(String oriCntCode) {
+        this.oriCntCode = oriCntCode;
+    }
+
+    public String getCusDeclEle() {
+        return cusDeclEle;
+    }
+
+    public void setCusDeclEle(String cusDeclEle) {
+        this.cusDeclEle = cusDeclEle;
+    }
+
+    public String getCusRecCode() {
+        return cusRecCode;
+    }
+
+    public void setCusRecCode(String cusRecCode) {
+        this.cusRecCode = cusRecCode;
+    }
 }

+ 3 - 3
kmall-admin/src/main/java/com/kmall/admin/entity/OrderEntity.java

@@ -55,7 +55,7 @@ public class OrderEntity implements Serializable {
     //快递公司名称
     private String shippingName;
     //快递单号
-    private Long shippingNo;
+    private String shippingNo;
     // 配送员手机
     private String shippingMobile;
     //付款
@@ -287,11 +287,11 @@ public class OrderEntity implements Serializable {
         return district;
     }
 
-    public Long getShippingNo() {
+    public String getShippingNo() {
         return shippingNo;
     }
 
-    public void setShippingNo(Long shippingNo) {
+    public void setShippingNo(String shippingNo) {
         this.shippingNo = shippingNo;
     }
 

+ 460 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/OrderProcessRecordEntity.java

@@ -0,0 +1,460 @@
+package com.kmall.admin.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 订单流转过程记录表实体
+ * 表名 mall_order_process_record
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2018-10-30 17:05:03
+ */
+public class OrderProcessRecordEntity implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     */
+    private Integer id;
+    /**
+     * 订单编号
+     */
+    private String orderSn;
+    /**
+     * 用户编号
+     */
+    private Integer userId;
+    /**
+     * 订单业务类型:00:保税备货, 02:保税展示补货,10:保税展示跨境,11:普通商品
+     */
+    private String orderBizType;
+    /**
+     * 下单开始时间
+     */
+    private Date addOrderStartTime;
+    /**
+     * 下单成功时间
+     */
+    private Date addOrderSuccTime;
+    /**
+     * 下单发送状态 0:失败;1:成功
+     */
+    private String isAddOrderSend;
+    /**
+     * 支付开始时间
+     */
+    private Date payStartTime;
+    /**
+     * 支付成功时间
+     */
+    private Date paySuccTime;
+    /**
+     * 支付单开始时间
+     */
+    private Date paymentStartTime;
+    /**
+     * 支付单成功时间
+     */
+    private Date paymentSuccTime;
+    /**
+     * 支付单状态 0:失败;1:成功;2:支付单单申报中
+     */
+    private String isPaymentSend;
+    /**
+     * 电子订单开始时间
+     */
+    private Date eleOrderStartTime;
+    /**
+     * 电子订单成功时间
+     */
+    private Date eleOrderSuccTime;
+    /**
+     * 电子订单状态 0:失败;1:成功;2:电子订单申报中
+     */
+    private String isEleOrderSend;
+    /**
+     * 运单开始时间
+     */
+    private Date waybillStartTime;
+    /**
+     * 运单成功时间
+     */
+    private Date waybillSuccTime;
+    /**
+     * 运单编号
+     */
+    private String logisticsNo;
+    /**
+     * 清单开始时间
+     */
+    private Date customsStartTime;
+    /**
+     * 清单成功时间
+     */
+    private Date customsSuccTime;
+    /**
+     * 清单编号
+     */
+    private String invtNo;
+    /**
+     * 清关状态 0:失败;1:成功;2:清关中
+     */
+    private String isCustomsSend;
+    /**
+     * 出货开始时间
+     */
+    private Date shipmentStartTime;
+    /**
+     * 出货成功时间
+     */
+    private Date shipmentSuccTime;
+    /**
+     * 订单流转信息
+     */
+    private String processContent;
+    /**
+     * 时间戳
+     */
+    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;
+    }
+    /**
+     * 设置:订单业务类型:00:保税备货, 02:保税展示补货,10:保税展示跨境,11:普通商品
+     */
+    public void setOrderBizType(String orderBizType) {
+        this.orderBizType = orderBizType;
+    }
+
+    /**
+     * 获取:订单业务类型:00:保税备货, 02:保税展示补货,10:保税展示跨境,11:普通商品
+     */
+    public String getOrderBizType() {
+        return orderBizType;
+    }
+    /**
+     * 设置:下单开始时间
+     */
+    public void setAddOrderStartTime(Date addOrderStartTime) {
+        this.addOrderStartTime = addOrderStartTime;
+    }
+
+    /**
+     * 获取:下单开始时间
+     */
+    public Date getAddOrderStartTime() {
+        return addOrderStartTime;
+    }
+    /**
+     * 设置:下单成功时间
+     */
+    public void setAddOrderSuccTime(Date addOrderSuccTime) {
+        this.addOrderSuccTime = addOrderSuccTime;
+    }
+
+    /**
+     * 获取:下单成功时间
+     */
+    public Date getAddOrderSuccTime() {
+        return addOrderSuccTime;
+    }
+    /**
+     * 设置:下单发送状态 0:失败;1:成功
+     */
+    public void setIsAddOrderSend(String isAddOrderSend) {
+        this.isAddOrderSend = isAddOrderSend;
+    }
+
+    /**
+     * 获取:下单发送状态 0:失败;1:成功
+     */
+    public String getIsAddOrderSend() {
+        return isAddOrderSend;
+    }
+    /**
+     * 设置:支付开始时间
+     */
+    public void setPayStartTime(Date payStartTime) {
+        this.payStartTime = payStartTime;
+    }
+
+    /**
+     * 获取:支付开始时间
+     */
+    public Date getPayStartTime() {
+        return payStartTime;
+    }
+    /**
+     * 设置:支付成功时间
+     */
+    public void setPaySuccTime(Date paySuccTime) {
+        this.paySuccTime = paySuccTime;
+    }
+
+    /**
+     * 获取:支付成功时间
+     */
+    public Date getPaySuccTime() {
+        return paySuccTime;
+    }
+    /**
+     * 设置:支付单开始时间
+     */
+    public void setPaymentStartTime(Date paymentStartTime) {
+        this.paymentStartTime = paymentStartTime;
+    }
+
+    /**
+     * 获取:支付单开始时间
+     */
+    public Date getPaymentStartTime() {
+        return paymentStartTime;
+    }
+    /**
+     * 设置:支付单成功时间
+     */
+    public void setPaymentSuccTime(Date paymentSuccTime) {
+        this.paymentSuccTime = paymentSuccTime;
+    }
+
+    /**
+     * 获取:支付单成功时间
+     */
+    public Date getPaymentSuccTime() {
+        return paymentSuccTime;
+    }
+    /**
+     * 设置:支付单状态 0:失败;1:成功;2:支付单单申报中
+     */
+    public void setIsPaymentSend(String isPaymentSend) {
+        this.isPaymentSend = isPaymentSend;
+    }
+
+    /**
+     * 获取:支付单状态 0:失败;1:成功;2:支付单单申报中
+     */
+    public String getIsPaymentSend() {
+        return isPaymentSend;
+    }
+    /**
+     * 设置:电子订单开始时间
+     */
+    public void setEleOrderStartTime(Date eleOrderStartTime) {
+        this.eleOrderStartTime = eleOrderStartTime;
+    }
+
+    /**
+     * 获取:电子订单开始时间
+     */
+    public Date getEleOrderStartTime() {
+        return eleOrderStartTime;
+    }
+    /**
+     * 设置:电子订单成功时间
+     */
+    public void setEleOrderSuccTime(Date eleOrderSuccTime) {
+        this.eleOrderSuccTime = eleOrderSuccTime;
+    }
+
+    /**
+     * 获取:电子订单成功时间
+     */
+    public Date getEleOrderSuccTime() {
+        return eleOrderSuccTime;
+    }
+    /**
+     * 设置:电子订单状态 0:失败;1:成功;2:电子订单申报中
+     */
+    public void setIsEleOrderSend(String isEleOrderSend) {
+        this.isEleOrderSend = isEleOrderSend;
+    }
+
+    /**
+     * 获取:电子订单状态 0:失败;1:成功;2:电子订单申报中
+     */
+    public String getIsEleOrderSend() {
+        return isEleOrderSend;
+    }
+    /**
+     * 设置:运单开始时间
+     */
+    public void setWaybillStartTime(Date waybillStartTime) {
+        this.waybillStartTime = waybillStartTime;
+    }
+
+    /**
+     * 获取:运单开始时间
+     */
+    public Date getWaybillStartTime() {
+        return waybillStartTime;
+    }
+    /**
+     * 设置:运单成功时间
+     */
+    public void setWaybillSuccTime(Date waybillSuccTime) {
+        this.waybillSuccTime = waybillSuccTime;
+    }
+
+    /**
+     * 获取:运单成功时间
+     */
+    public Date getWaybillSuccTime() {
+        return waybillSuccTime;
+    }
+    /**
+     * 设置:运单编号
+     */
+    public void setLogisticsNo(String logisticsNo) {
+        this.logisticsNo = logisticsNo;
+    }
+
+    /**
+     * 获取:运单编号
+     */
+    public String getLogisticsNo() {
+        return logisticsNo;
+    }
+    /**
+     * 设置:清单开始时间
+     */
+    public void setCustomsStartTime(Date customsStartTime) {
+        this.customsStartTime = customsStartTime;
+    }
+
+    /**
+     * 获取:清单开始时间
+     */
+    public Date getCustomsStartTime() {
+        return customsStartTime;
+    }
+    /**
+     * 设置:清单成功时间
+     */
+    public void setCustomsSuccTime(Date customsSuccTime) {
+        this.customsSuccTime = customsSuccTime;
+    }
+
+    /**
+     * 获取:清单成功时间
+     */
+    public Date getCustomsSuccTime() {
+        return customsSuccTime;
+    }
+    /**
+     * 设置:清单编号
+     */
+    public void setInvtNo(String invtNo) {
+        this.invtNo = invtNo;
+    }
+
+    /**
+     * 获取:清单编号
+     */
+    public String getInvtNo() {
+        return invtNo;
+    }
+    /**
+     * 设置:清关状态 0:失败;1:成功;2:清关中
+     */
+    public void setIsCustomsSend(String isCustomsSend) {
+        this.isCustomsSend = isCustomsSend;
+    }
+
+    /**
+     * 获取:清关状态 0:失败;1:成功;2:清关中
+     */
+    public String getIsCustomsSend() {
+        return isCustomsSend;
+    }
+    /**
+     * 设置:出货开始时间
+     */
+    public void setShipmentStartTime(Date shipmentStartTime) {
+        this.shipmentStartTime = shipmentStartTime;
+    }
+
+    /**
+     * 获取:出货开始时间
+     */
+    public Date getShipmentStartTime() {
+        return shipmentStartTime;
+    }
+    /**
+     * 设置:出货成功时间
+     */
+    public void setShipmentSuccTime(Date shipmentSuccTime) {
+        this.shipmentSuccTime = shipmentSuccTime;
+    }
+
+    /**
+     * 获取:出货成功时间
+     */
+    public Date getShipmentSuccTime() {
+        return shipmentSuccTime;
+    }
+    /**
+     * 设置:订单流转信息
+     */
+    public void setProcessContent(String processContent) {
+        this.processContent = processContent;
+    }
+
+    /**
+     * 获取:订单流转信息
+     */
+    public String getProcessContent() {
+        return processContent;
+    }
+    /**
+     * 设置:时间戳
+     */
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+
+    /**
+     * 获取:时间戳
+     */
+    public Date getTstm() {
+        return tstm;
+    }
+}

+ 61 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/StoreEntity.java

@@ -2,6 +2,7 @@ package com.kmall.admin.entity;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.util.Date;
 
 /**
  * 实体
@@ -18,6 +19,10 @@ public class StoreEntity implements Serializable {
      * 主键
      */
     private Long id;
+
+    private String merchSn;
+
+    private String merchName;
     /**
      * 门店名称
      */
@@ -59,6 +64,14 @@ public class StoreEntity implements Serializable {
      */
     private String remark;
 
+    private String createrSn;
+
+    private Date createTime;
+
+    private String moderSn;
+
+    private Date modTime;
+
     /**
      * 设置:主键
      */
@@ -73,6 +86,22 @@ public class StoreEntity implements Serializable {
         return id;
     }
 
+    public String getMerchSn() {
+        return merchSn;
+    }
+
+    public void setMerchSn(String merchSn) {
+        this.merchSn = merchSn;
+    }
+
+    public String getMerchName() {
+        return merchName;
+    }
+
+    public void setMerchName(String merchName) {
+        this.merchName = merchName;
+    }
+
     /**
      * 设置:门店名称
      */
@@ -212,4 +241,36 @@ public class StoreEntity implements Serializable {
     public String getRemark() {
         return remark;
     }
+
+    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;
+    }
 }

+ 9 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/UserCouponEntity.java

@@ -39,6 +39,7 @@ public class UserCouponEntity implements Serializable {
     //优惠劵名称
     private String couponName;
 
+    private String isUsed;
 
     /**
      * 设置:主键
@@ -147,4 +148,12 @@ public class UserCouponEntity implements Serializable {
     public void setAddTime(Date addTime) {
         this.addTime = addTime;
     }
+
+    public String getIsUsed() {
+        return isUsed;
+    }
+
+    public void setIsUsed(String isUsed) {
+        this.isUsed = isUsed;
+    }
 }

+ 32 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/WuliuEntity.java

@@ -0,0 +1,32 @@
+package com.kmall.admin.entity;
+
+import java.io.Serializable;
+
+/**
+ * @author zengjunlin
+ * @version 1.0
+ * 2018-10-26 14:46
+ */
+public class WuliuEntity implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    private String AcceptStation;
+
+    private String AcceptTime;
+
+    public String getAcceptStation() {
+        return AcceptStation;
+    }
+
+    public void setAcceptStation(String acceptStation) {
+        AcceptStation = acceptStation;
+    }
+
+    public String getAcceptTime() {
+        return AcceptTime;
+    }
+
+    public void setAcceptTime(String acceptTime) {
+        AcceptTime = acceptTime;
+    }
+}

+ 74 - 0
kmall-admin/src/main/java/com/kmall/admin/service/FreightItemService.java

@@ -0,0 +1,74 @@
+package com.kmall.admin.service;
+
+import com.kmall.admin.entity.FreightItemEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Service接口
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2018-10-22 15:18:16
+ */
+public interface FreightItemService {
+
+    /**
+     * 根据主键查询实体
+     *
+     * @param id 主键
+     * @return 实体
+     */
+    FreightItemEntity queryObject(Integer id);
+
+    /**
+     * 分页查询
+     *
+     * @param map 参数
+     * @return list
+     */
+    List<FreightItemEntity> queryList(Map<String, Object> map);
+
+    /**
+     * 分页统计总数
+     *
+     * @param map 参数
+     * @return 总数
+     */
+    int queryTotal(Map<String, Object> map);
+
+    /**
+     * 保存实体
+     *
+     * @param freightItem 实体
+     * @return 保存条数
+     */
+    int save(FreightItemEntity freightItem);
+
+    /**
+     * 根据主键更新实体
+     *
+     * @param freightItem 实体
+     * @return 更新条数
+     */
+    int update(FreightItemEntity freightItem);
+
+    /**
+     * 根据主键删除
+     *
+     * @param id
+     * @return 删除条数
+     */
+    int delete(Integer id);
+
+    /**
+     * 根据主键批量删除
+     *
+     * @param ids
+     * @return 删除条数
+     */
+    int deleteBatch(Integer[] ids);
+
+    int deleteByFreId(Integer freId);
+}

+ 80 - 0
kmall-admin/src/main/java/com/kmall/admin/service/FreightService.java

@@ -0,0 +1,80 @@
+package com.kmall.admin.service;
+
+import com.kmall.admin.entity.FreightEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Service接口
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2018-10-22 15:18:16
+ */
+public interface FreightService {
+
+    /**
+     * 根据主键查询实体
+     *
+     * @param id 主键
+     * @return 实体
+     */
+    FreightEntity queryObject(Integer id);
+
+    /**
+     * 分页查询
+     *
+     * @param map 参数
+     * @return list
+     */
+    List<FreightEntity> queryList(Map<String, Object> map);
+
+    /**
+     * 名称相同的模版
+     *
+     * @param map 参数
+     * @return list
+     */
+    List<FreightEntity> queryEntity(Map<String, Object> map);
+
+    /**
+     * 分页统计总数
+     *
+     * @param map 参数
+     * @return 总数
+     */
+    int queryTotal(Map<String, Object> map);
+
+    /**
+     * 保存实体
+     *
+     * @param freight 实体
+     * @return 保存条数
+     */
+    int save(FreightEntity freight);
+
+    /**
+     * 根据主键更新实体
+     *
+     * @param freight 实体
+     * @return 更新条数
+     */
+    int update(FreightEntity freight);
+
+    /**
+     * 根据主键删除
+     *
+     * @param id
+     * @return 删除条数
+     */
+    int delete(Integer id);
+
+    /**
+     * 根据主键批量删除
+     *
+     * @param ids
+     * @return 删除条数
+     */
+    int deleteBatch(Integer[] ids);
+}

+ 75 - 0
kmall-admin/src/main/java/com/kmall/admin/service/OrderProcessRecordService.java

@@ -0,0 +1,75 @@
+package com.kmall.admin.service;
+
+
+import com.kmall.admin.entity.OrderProcessRecordEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 订单流转过程记录表Service接口
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2018-10-27 16:38:50
+ */
+public interface OrderProcessRecordService {
+
+    /**
+     * 根据主键查询实体
+     *
+     * @param id 主键
+     * @return 实体
+     */
+    OrderProcessRecordEntity queryObject(Integer id);
+
+    /**
+     * 分页查询
+     *
+     * @param map 参数
+     * @return list
+     */
+    List<OrderProcessRecordEntity> queryList(Map<String, Object> map);
+
+    /**
+     * 分页统计总数
+     *
+     * @param map 参数
+     * @return 总数
+     */
+    int queryTotal(Map<String, Object> map);
+
+    /**
+     * 保存实体
+     *
+     * @param orderProcessRecord 实体
+     * @return 保存条数
+     */
+    int save(OrderProcessRecordEntity orderProcessRecord);
+
+    /**
+     * 根据主键更新实体
+     *
+     * @param orderProcessRecord 实体
+     * @return 更新条数
+     */
+    int update(OrderProcessRecordEntity orderProcessRecord);
+
+    /**
+     * 根据主键删除
+     *
+     * @param id
+     * @return 删除条数
+     */
+    int delete(Integer id);
+
+    /**
+     * 根据主键批量删除
+     *
+     * @param ids
+     * @return 删除条数
+     */
+    int deleteBatch(Integer[] ids);
+
+    OrderProcessRecordEntity queryObjectByOrderSn(String orderSn);
+}

+ 2 - 0
kmall-admin/src/main/java/com/kmall/admin/service/OrderService.java

@@ -72,4 +72,6 @@ public interface OrderService {
      * @return
      */
     int getUserOrderInfo(Map<String, Object> params);
+
+    Map getLogistics(Long id);
 }

+ 64 - 0
kmall-admin/src/main/java/com/kmall/admin/service/impl/FreightItemServiceImpl.java

@@ -0,0 +1,64 @@
+package com.kmall.admin.service.impl;
+
+import com.kmall.admin.dao.FreightItemDao;
+import com.kmall.admin.entity.FreightItemEntity;
+import com.kmall.admin.service.FreightItemService;
+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-22 15:18:16
+ */
+@Service("freightItemService")
+public class FreightItemServiceImpl implements FreightItemService {
+    @Autowired
+    private FreightItemDao freightItemDao;
+
+    @Override
+    public FreightItemEntity queryObject(Integer id) {
+        return freightItemDao.queryObject(id);
+    }
+
+    @Override
+    public List<FreightItemEntity> queryList(Map<String, Object> map) {
+        return freightItemDao.queryList(map);
+    }
+
+    @Override
+    public int queryTotal(Map<String, Object> map) {
+        return freightItemDao.queryTotal(map);
+    }
+
+    @Override
+    public int save(FreightItemEntity freightItem) {
+        return freightItemDao.save(freightItem);
+    }
+
+    @Override
+    public int update(FreightItemEntity freightItem) {
+        return freightItemDao.update(freightItem);
+    }
+
+    @Override
+    public int delete(Integer id) {
+        return freightItemDao.delete(id);
+    }
+
+    @Override
+    public int deleteBatch(Integer[]ids) {
+        return freightItemDao.deleteBatch(ids);
+    }
+
+    @Override
+    public int deleteByFreId(Integer freId) {
+        return freightItemDao.deleteByFreId(freId);
+    }
+}

+ 166 - 0
kmall-admin/src/main/java/com/kmall/admin/service/impl/FreightServiceImpl.java

@@ -0,0 +1,166 @@
+package com.kmall.admin.service.impl;
+
+import com.kmall.admin.dao.FreightDao;
+import com.kmall.admin.dao.FreightItemDao;
+import com.kmall.admin.dao.GoodsDao;
+import com.kmall.admin.entity.FreightEntity;
+import com.kmall.admin.entity.FreightItemEntity;
+import com.kmall.admin.entity.GoodsEntity;
+import com.kmall.admin.service.FreightService;
+import com.kmall.common.utils.RRException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Service实现类
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2018-10-22 15:18:16
+ */
+@Service("freightService")
+public class FreightServiceImpl implements FreightService {
+    @Autowired
+    private FreightDao freightDao;
+    @Autowired
+    private FreightItemDao freightItemDao;
+    @Autowired
+    private GoodsDao goodsDao;
+
+    @Override
+    public FreightEntity queryObject(Integer id) {
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("freId", id);
+        List<FreightItemEntity> freightItemEntityList = freightItemDao.queryList(map);
+        FreightEntity freightEntity = freightDao.queryObject(id);
+        freightEntity.setFreightItemEntityList(freightItemEntityList);
+        return freightEntity;
+    }
+
+    @Override
+    public List<FreightEntity> queryList(Map<String, Object> map) {
+        return freightDao.queryList(map);
+    }
+
+    @Override
+    public List<FreightEntity> queryEntity(Map<String, Object> map) {
+        return freightDao.queryEntity(map);
+    }
+
+    @Override
+    public int queryTotal(Map<String, Object> map) {
+        return freightDao.queryTotal(map);
+    }
+
+    @Override
+    @Transactional
+    public int save(FreightEntity freight) {
+        Map<String, Object> map = new HashMap<>();
+        map.put("name", freight.getName());
+        List<FreightEntity> list = queryList(map);
+        if (list != null && list.size() != 0) {
+            throw new RRException("运费模版名称已存在!");
+        }
+
+        Integer id = freightDao.queryMaxId() + 1;
+        freight.setId(id);
+
+        if (Boolean.valueOf(freight.getIsDefault())) {
+            freight.setIsDefault("1");
+        } else {
+            freight.setIsDefault("0");
+        }
+
+        // 运费详情
+        List<FreightItemEntity> freightItemEntityList = freight.getFreightItemEntityList();
+        if (null != freightItemEntityList && freightItemEntityList.size() > 0) {
+            freight.setDefaultFreight(freightItemEntityList.get(0).getFreight());
+            for (FreightItemEntity item : freightItemEntityList) {
+                if (Boolean.valueOf(item.getDeliveryArea())) {
+                    item.setDeliveryArea("ALL");
+                }
+                if (item.getFreId() == null) {
+                    item.setFreId(id);
+                    freightItemDao.save(item);
+                }
+            }
+        }
+
+        return freightDao.save(freight);
+    }
+
+    @Override
+    @Transactional
+    public int update(FreightEntity freight) {
+        Map<String, Object> map = new HashMap<>();
+        map.put("id", freight.getId());
+        map.put("name", freight.getName());
+        List<FreightEntity> list = queryEntity(map);
+        if (list != null && list.size() != 0) {
+            throw new RRException("运费模版名称已存在!");
+        }
+
+        if (Boolean.valueOf(freight.getIsDefault())) {
+            freight.setIsDefault("1");
+        } else {
+            freight.setIsDefault("0");
+        }
+
+        // 运费详情
+        if (freightItemDao.deleteByFreId(freight.getId()) <= 0) {
+            throw new RRException("删除原运费模版详情失败!");
+        }
+        List<FreightItemEntity> freightItemEntityList = freight.getFreightItemEntityList();
+        if (null != freightItemEntityList && freightItemEntityList.size() > 0) {
+            freight.setDefaultFreight(freightItemEntityList.get(0).getFreight());
+            for (FreightItemEntity item : freightItemEntityList) {
+                if (Boolean.valueOf(item.getDeliveryArea())) {
+                    item.setDeliveryArea("ALL");
+                }
+                if (item.getFreId() != null) {
+                    freightItemDao.save(item);
+                }
+            }
+        }
+        return freightDao.update(freight);
+    }
+
+    @Override
+    public int delete(Integer id) {
+        Map<String, Object> map = new HashMap<>();
+        map.put("freightId", id);
+        List<GoodsEntity> list = goodsDao.queryList(map);
+
+        if (list != null && list.size() > 0) {
+            throw new RRException("此运费模版还有【" + list.size() + "】商品正在使用,不能删除!");
+        }
+        if (freightItemDao.deleteByFreId(id) <= 0) {
+            throw new RRException("删除此运费模版详情失败!");
+        }
+
+        return freightDao.delete(id);
+    }
+
+    @Override
+    public int deleteBatch(Integer[]ids) {
+        for (int id : ids) {
+            Map<String, Object> map = new HashMap<>();
+            map.put("freightId", id);
+            map.put("isDelete", 0);
+            List<GoodsEntity> list = goodsDao.queryList(map);
+
+            if (list != null && list.size() > 0) {
+                throw new RRException("【" + id + "】运费模版还有【" + list.size() + "】个商品正在使用,不能删除!");
+            }
+            if (freightItemDao.deleteByFreId(id) <= 0) {
+                throw new RRException("删除【" + id + "】运费模版详情失败!");
+            }
+        }
+        return freightDao.deleteBatch(ids);
+    }
+}

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

@@ -87,7 +87,7 @@ public class GoodsServiceImpl implements GoodsService {
         List<GoodsAttributeEntity> attributeEntityList = goods.getAttributeEntityList();
         if (null != attributeEntityList && attributeEntityList.size() > 0) {
             for (GoodsAttributeEntity item : attributeEntityList) {
-                if (null != item.getGoodsId()) {
+                if (item.getGoodsId() == null) {
                     item.setGoodsId(id);
                     goodsAttributeDao.save(item);
                 }
@@ -269,9 +269,7 @@ public class GoodsServiceImpl implements GoodsService {
             }
         }
         goods.setUpdateUserId(user.getUserId());
-        goods.setUpdateTime(new
-
-                Date());
+        goods.setUpdateTime(new Date());
         return goodsDao.update(goods);
     }
 

+ 64 - 0
kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderProcessRecordServiceImpl.java

@@ -0,0 +1,64 @@
+package com.kmall.admin.service.impl;
+
+import com.kmall.admin.dao.OrderProcessRecordDao;
+import com.kmall.admin.entity.OrderProcessRecordEntity;
+import com.kmall.admin.service.OrderProcessRecordService;
+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-27 16:38:50
+ */
+@Service("orderProcessRecordService")
+public class OrderProcessRecordServiceImpl implements OrderProcessRecordService {
+    @Autowired
+    private OrderProcessRecordDao orderProcessRecordDao;
+
+    @Override
+    public OrderProcessRecordEntity queryObject(Integer id) {
+        return orderProcessRecordDao.queryObject(id);
+    }
+
+    @Override
+    public List<OrderProcessRecordEntity> queryList(Map<String, Object> map) {
+        return orderProcessRecordDao.queryList(map);
+    }
+
+    @Override
+    public int queryTotal(Map<String, Object> map) {
+        return orderProcessRecordDao.queryTotal(map);
+    }
+
+    @Override
+    public int save(OrderProcessRecordEntity orderProcessRecord) {
+        return orderProcessRecordDao.save(orderProcessRecord);
+    }
+
+    @Override
+    public int update(OrderProcessRecordEntity orderProcessRecord) {
+        return orderProcessRecordDao.update(orderProcessRecord);
+    }
+
+    @Override
+    public int delete(Integer id) {
+        return orderProcessRecordDao.delete(id);
+    }
+
+    @Override
+    public int deleteBatch(Integer[]ids) {
+        return orderProcessRecordDao.deleteBatch(ids);
+    }
+
+    @Override
+    public OrderProcessRecordEntity queryObjectByOrderSn(String orderSn) {
+        return orderProcessRecordDao.queryObjectByOrderSn(orderSn);
+    }
+}

+ 65 - 4
kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java

@@ -1,5 +1,6 @@
 package com.kmall.admin.service.impl;
 
+import com.alibaba.fastjson.JSONObject;
 import com.kmall.admin.dao.*;
 import com.kmall.admin.entity.*;
 import com.kmall.admin.service.OrderService;
@@ -8,6 +9,8 @@ import com.kmall.api.entity.MallOrderRefund;
 import com.kmall.common.utils.DateUtils;
 import com.kmall.common.utils.RRException;
 import com.kmall.common.utils.ShiroUtils;
+import com.kmall.common.utils.StringUtils;
+import com.kmall.common.utils.express.kdn.KdniaoUtil;
 import com.kmall.common.utils.printer.FeiGeUtils;
 import com.kmall.common.utils.wechat.WechatRefundApiResult;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -15,10 +18,8 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 
 @Service("orderService")
@@ -39,6 +40,8 @@ public class OrderServiceImpl implements OrderService {
     private UserCouponDao userCouponDao;
     @Autowired
     private ProductStoreRelaDao productStoreRelaDao;
+    @Autowired
+    private OrderProcessRecordDao orderProcessRecordDao;
 
     @Autowired
     private MallOrderRefundDao mallOrderRefundDao;
@@ -314,4 +317,62 @@ public class OrderServiceImpl implements OrderService {
         }
         return result;
     }
+
+    @Override
+    public Map getLogistics(Long id) {
+        OrderEntity orderEntity = queryObject(id);
+        if (orderEntity == null) {
+            throw new RRException("此订单不存在!");
+        } else if (orderEntity.getShippingStatus() == 0 || StringUtils.isNullOrEmpty(orderEntity.getShippingNo())) {
+            throw new RRException("此订单还未发货!");
+        }
+
+        Map logisticsInfo = new HashMap();
+        List<WuliuEntity> wuliuEntityList = new ArrayList<>();
+        if (StringUtils.isNotEmpty(orderEntity.getShippingCode())
+                && StringUtils.isNotEmpty(orderEntity.getShippingNo())) {
+            JSONObject traces = KdniaoUtil.getOrderTracesByJson(orderEntity.getShippingCode(), orderEntity.getShippingNo());
+            List<Map> mapList = (List<Map>) traces.get("Traces");
+            for (Map map : mapList) {
+                WuliuEntity wuliuEntity = new WuliuEntity();
+                wuliuEntity.setAcceptTime(map.get("AcceptTime").toString());
+                wuliuEntity.setAcceptStation(map.get("AcceptStation").toString());
+                wuliuEntityList.add(wuliuEntity);
+            }
+
+            String state = traces.get("State").toString();
+            if (Dict.logisticsStatus.item_0.getItem().equals(state) && traces.getBoolean("Success")) {
+                String reason = traces.get("Reason").toString();
+                WuliuEntity wuliuEntity = new WuliuEntity();
+                wuliuEntity.setAcceptStation(reason);
+                wuliuEntityList.add(wuliuEntity);
+            }
+        }
+
+        OrderProcessRecordEntity orderProcessRecordEntity = orderProcessRecordDao.queryObjectByOrderSn(orderEntity.getOrderSn());
+        if (orderProcessRecordEntity != null) {
+            if (Dict.isSend.item_1.getItem().equals(orderProcessRecordEntity.getIsCustomsSend())) {
+                WuliuEntity wuliuEntity = new WuliuEntity();
+                wuliuEntity.setAcceptStation("订单清关完成,等待仓库发货");
+                wuliuEntity.setAcceptTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(orderProcessRecordEntity.getCustomsSuccTime()));
+                wuliuEntityList.add(wuliuEntity);
+            }
+            if(Dict.isSend.item_1.getItem().equals(orderProcessRecordEntity.getIsPaymentSend())){
+                WuliuEntity wuliuEntity = new WuliuEntity();
+                wuliuEntity.setAcceptStation("订单支付成功,等待海关清关");
+                wuliuEntity.setAcceptTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(orderProcessRecordEntity.getPaySuccTime()));
+                wuliuEntityList.add(wuliuEntity);
+            }
+            if(Dict.isSend.item_1.getItem().equalsIgnoreCase(orderProcessRecordEntity.getIsAddOrderSend())){
+                WuliuEntity wuliuEntity = new WuliuEntity();
+                wuliuEntity.setAcceptStation("订单提交成功");
+                wuliuEntity.setAcceptTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(orderProcessRecordEntity.getAddOrderSuccTime()));
+                wuliuEntityList.add(wuliuEntity);
+            }
+        }
+        logisticsInfo.put("tracesList", wuliuEntityList);
+        logisticsInfo.put("logisticCode", orderEntity.getShippingNo());
+        logisticsInfo.put("shipperCode", orderEntity.getShippingCode());
+        return logisticsInfo;
+    }
 }

+ 3 - 0
kmall-admin/src/main/java/com/kmall/admin/service/impl/StoreServiceImpl.java

@@ -3,6 +3,7 @@ package com.kmall.admin.service.impl;
 import com.kmall.admin.dao.StoreDao;
 import com.kmall.admin.entity.StoreEntity;
 import com.kmall.admin.service.StoreService;
+import com.kmall.api.service.merch.OmsMerchPropertiesBuilder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -38,6 +39,8 @@ public class StoreServiceImpl implements StoreService {
 
     @Override
     public int save(StoreEntity store) {
+        store.setMerchSn(OmsMerchPropertiesBuilder.instance().getMerchSn());
+        store.setMerchName(OmsMerchPropertiesBuilder.instance().getMerchName());
         return storeDao.save(store);
     }
 

+ 3 - 3
kmall-admin/src/main/resources/conf/oms-merch.properties

@@ -1,11 +1,11 @@
 ########## oms商户配置 ##########
 
 #oms商户ID
-merch.merchSn=mhbs455771563389755392
+merch.merchSn=mhbs990053989883052032
 #oms商户名称
-merch.merchName=VVO
+merch.merchName=中网科技
 #oms商户简称
-merch.merchShortName=VVO
+merch.merchShortName=ZW
 
 
 

+ 10 - 4
kmall-admin/src/main/resources/mybatis/mapper/CouponDao.xml

@@ -15,6 +15,7 @@
         <result property="useStartDate" column="use_start_date"/>
         <result property="useEndDate" column="use_end_date"/>
         <result property="minGoodsAmount" column="min_goods_amount"/>
+        <result property="isAll" column="is_all"/>
     </resultMap>
 
     <sql id="conditions">
@@ -38,7 +39,8 @@
 			`send_end_date`,
 			`use_start_date`,
 			`use_end_date`,
-			`min_goods_amount`
+			`min_goods_amount`,
+			`is_all`
 		from mall_coupon
 		where id = #{id}
 	</select>
@@ -55,7 +57,8 @@
         `send_end_date`,
         `use_start_date`,
         `use_end_date`,
-        `min_goods_amount`
+        `min_goods_amount`,
+        `is_all`
         from mall_coupon a
         <include refid="conditions"/>
         <choose>
@@ -87,7 +90,8 @@
 			`send_end_date`,
 			`use_start_date`,
 			`use_end_date`,
-			`min_goods_amount`)
+			`min_goods_amount`,
+			`is_all`)
 		values(
 			#{name},
 			#{typeMoney},
@@ -98,7 +102,8 @@
 			#{sendEndDate},
 			#{useStartDate},
 			#{useEndDate},
-			#{minGoodsAmount})
+			#{minGoodsAmount},
+			#{isAll})
 	</insert>
 
     <update id="update" parameterType="com.kmall.admin.entity.CouponEntity">
@@ -114,6 +119,7 @@
             <if test="useStartDate != null">`use_start_date` = #{useStartDate},</if>
             <if test="useEndDate != null">`use_end_date` = #{useEndDate},</if>
             <if test="minGoodsAmount != null">`min_goods_amount` = #{minGoodsAmount}</if>
+            <if test="isAll != null">`is_all` = #{isAll}</if>
         </set>
         where id = #{id}
     </update>

+ 134 - 0
kmall-admin/src/main/resources/mybatis/mapper/FreightDao.xml

@@ -0,0 +1,134 @@
+<?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.admin.dao.FreightDao">
+
+    <resultMap type="com.kmall.admin.entity.FreightEntity" id="freightMap">
+        <result property="id" column="id"/>
+        <result property="name" column="name"/>
+        <result property="templateType" column="template_type"/>
+        <result property="pricingManner" column="pricing_manner"/>
+		<result property="defaultFreight" column="default_freight"/>
+        <result property="isDefault" column="is_default"/>
+    </resultMap>
+
+	<select id="queryObject" resultType="com.kmall.admin.entity.FreightEntity">
+		select
+			`id`,
+			`name`,
+			`template_type`,
+			`pricing_manner`,
+			`default_freight`,
+			`is_default`
+		from mall_freight
+		where id = #{id}
+	</select>
+
+	<select id="queryList" resultType="com.kmall.admin.entity.FreightEntity">
+		select
+    		`id`,
+    		`name`,
+    		`template_type`,
+    		`pricing_manner`,
+			`default_freight`,
+    		`is_default`
+		from mall_freight
+		WHERE 1=1
+		<if test="name != null and name.trim() != ''">
+			AND name LIKE concat('%',#{name},'%')
+		</if>
+		<if test="id != null and id != ''">
+			AND id LIKE concat('%',#{id},'%')
+		</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="queryEntity" resultType="com.kmall.admin.entity.FreightEntity">
+		select
+		`id`,
+		`name`,
+		`template_type`,
+		`pricing_manner`,
+		`default_freight`,
+		`is_default`
+		from mall_freight
+		WHERE 1=1
+		<if test="name != null and name != ''">
+			AND name LIKE concat('%',#{name},'%')
+		</if>
+		<if test="id != null and id != ''">
+			AND id NOT LIKE concat('%',#{id},'%')
+		</if>
+		<choose>
+			<when test="sidx != null and sidx != ''">
+				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_freight
+		WHERE 1=1
+        <if test="name != null and name.trim() != ''">
+            AND name LIKE concat('%',#{name},'%')
+        </if>
+	</select>
+	 
+	<insert id="save" parameterType="com.kmall.admin.entity.FreightEntity" useGeneratedKeys="true" keyProperty="id">
+		insert into mall_freight(
+			`name`,
+			`template_type`,
+			`pricing_manner`,
+			`default_freight`,
+			`is_default`)
+		values(
+			#{name},
+			#{templateType},
+			#{pricingManner},
+			#{defaultFreight},
+			#{isDefault})
+	</insert>
+	 
+	<update id="update" parameterType="com.kmall.admin.entity.FreightEntity">
+		update mall_freight 
+		<set>
+			<if test="name != null">`name` = #{name}, </if>
+			<if test="templateType != null">`template_type` = #{templateType}, </if>
+			<if test="pricingManner != null">`pricing_manner` = #{pricingManner}, </if>
+			<if test="defaultFreight != null">`default_freight` = #{defaultFreight},</if>
+			<if test="isDefault != null">`is_default` = #{isDefault}</if>
+		</set>
+		where id = #{id}
+	</update>
+	
+	<delete id="delete">
+		delete from mall_freight where id = #{value}
+	</delete>
+	
+	<delete id="deleteBatch">
+		delete from mall_freight where id in 
+		<foreach item="id" collection="array" open="(" separator="," close=")">
+			#{id}
+		</foreach>
+	</delete>
+
+	<select id="queryMaxId" resultType="java.lang.Integer" parameterType="map">
+		SELECT MAX(id) FROM mall_freight
+	</select>
+</mapper>

+ 111 - 0
kmall-admin/src/main/resources/mybatis/mapper/FreightItemDao.xml

@@ -0,0 +1,111 @@
+<?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.admin.dao.FreightItemDao">
+
+    <resultMap type="com.kmall.admin.entity.FreightItemEntity" id="freightItemMap">
+        <result property="id" column="id"/>
+        <result property="freId" column="fre_id"/>
+        <result property="deliveryArea" column="delivery_area"/>
+        <result property="firstPiece" column="first_piece"/>
+        <result property="freight" column="freight"/>
+        <result property="continuePiece" column="continue_piece"/>
+        <result property="renew" column="renew"/>
+    </resultMap>
+
+	<select id="queryObject" resultType="com.kmall.admin.entity.FreightItemEntity">
+		select
+			`id`,
+			`fre_id`,
+			`delivery_area`,
+			`first_piece`,
+			`freight`,
+			`continue_piece`,
+			`renew`
+		from mall_freight_item
+		where id = #{id}
+	</select>
+
+	<select id="queryList" resultType="com.kmall.admin.entity.FreightItemEntity">
+		select
+    		`id`,
+    		`fre_id`,
+    		`delivery_area`,
+    		`first_piece`,
+    		`freight`,
+    		`continue_piece`,
+    		`renew`
+		from mall_freight_item
+		WHERE 1=1
+		<if test="name != null and name.trim() != ''">
+			AND name LIKE concat('%',#{name},'%')
+		</if>
+		<if test="freId != null and freId != ''">
+			AND fre_id = #{freId}
+		</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_freight_item
+		WHERE 1=1
+        <if test="name != null and name.trim() != ''">
+            AND name LIKE concat('%',#{name},'%')
+        </if>
+	</select>
+	 
+	<insert id="save" parameterType="com.kmall.admin.entity.FreightItemEntity" useGeneratedKeys="true" keyProperty="id">
+		insert into mall_freight_item(
+			`fre_id`,
+			`delivery_area`,
+			`first_piece`,
+			`freight`,
+			`continue_piece`,
+			`renew`)
+		values(
+			#{freId},
+			#{deliveryArea},
+			#{firstPiece},
+			#{freight},
+			#{continuePiece},
+			#{renew})
+	</insert>
+	 
+	<update id="update" parameterType="com.kmall.admin.entity.FreightItemEntity">
+		update mall_freight_item 
+		<set>
+			<if test="freId != null">`fre_id` = #{freId}, </if>
+			<if test="deliveryArea != null">`delivery_area` = #{deliveryArea}, </if>
+			<if test="firstPiece != null">`first_piece` = #{firstPiece}, </if>
+			<if test="freight != null">`freight` = #{freight}, </if>
+			<if test="continuePiece != null">`continue_piece` = #{continuePiece}, </if>
+			<if test="renew != null">`renew` = #{renew}</if>
+		</set>
+		where id = #{id}
+	</update>
+	
+	<delete id="delete">
+		delete from mall_freight_item where id = #{value}
+	</delete>
+	
+	<delete id="deleteBatch">
+		delete from mall_freight_item where id in 
+		<foreach item="id" collection="array" open="(" separator="," close=")">
+			#{id}
+		</foreach>
+	</delete>
+
+	<delete id="deleteByFreId">
+		delete from mall_freight_item where fre_id = #{freId}
+	</delete>
+</mapper>

+ 171 - 168
kmall-admin/src/main/resources/mybatis/mapper/GoodsDao.xml

@@ -9,6 +9,8 @@
         <result property="goodsSn" column="goods_sn"/>
         <result property="name" column="name"/>
         <result property="brandId" column="brand_id"/>
+        <result property="freightId" column="freight_id"/>
+        <result property="brand" column="brand"/>
         <result property="goodsNumber" column="goods_number"/>
         <result property="keywords" column="keywords"/>
         <result property="goodsBrief" column="goods_brief"/>
@@ -43,10 +45,18 @@
         <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
         <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
         <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
+        <result property="prodBarcode" column="prod_barcode"/>
+        <result property="unitCode" column="unit_code"/>
+        <result property="goodsDesc" column="goods_desc"/>
+        <result property="cusGoodsCode" column="cus_goods_code"/>
+        <result property="ciqProdModel" column="ciq_prod_model"/>
+        <result property="oriCntCode" column="ori_cnt_code"/>
+        <result property="cusDeclEle" column="cus_decl_ele"/>
+        <result property="cusRecCode" column="cus_rec_code"/>
     </resultMap>
 
     <select id="queryObject" resultType="com.kmall.admin.entity.GoodsEntity">
-      SELECT
+        SELECT
             a.*, CASE
         when g.id > 0 then 2 else 0 end as goodsType
         FROM
@@ -69,46 +79,18 @@
 
     <select id="queryList" resultType="com.kmall.admin.entity.GoodsEntity">
         select
-        mall_goods.id,
-        mall_goods.category_id,
-        mall_goods.goods_sn,
-        mall_goods.name,
-        mall_goods.brand_id,
-        mall_goods.goods_number,
-        mall_goods.keywords,
-        mall_goods.goods_brief,
-        mall_goods.is_on_sale,
-        mall_goods.add_time,
-        mall_goods.sort_order,
-        mall_goods.is_delete,
-        mall_goods.attribute_category,
-        mall_goods.counter_price,
-        mall_goods.extra_price,
-        mall_goods.is_new,
-        mall_goods.goods_unit,
-        mall_goods.primary_pic_url,
-        mall_goods.list_pic_url,
-        mall_goods.retail_price,
-        mall_goods.sell_volume,
-        mall_goods.primary_product_id,
-        mall_goods.unit_price,
-        mall_goods.promotion_desc,
-        mall_goods.promotion_tag,
-        mall_goods.app_exclusive_price,
-        mall_goods.is_app_exclusive,
-        mall_goods.is_limited,
-        mall_goods.is_hot,
-        mall_goods.market_price,
+        mall_goods.*,
         mall_category.name category_name,
         mall_attribute_category.name attribute_category_name,
         mall_brand.name brand_name,
+        mall_freight.name freight_name,
         case when mall_goods_group.id > 0 then 2 else 0 end as goodsType
         from mall_goods
-        LEFT JOIN mall_category
-        ON mall_goods.category_id = mall_category.id
+        LEFT JOIN mall_category ON mall_goods.category_id = mall_category.id
         LEFT JOIN mall_attribute_category ON mall_goods.attribute_category = mall_attribute_category.id
         LEFT JOIN mall_brand ON mall_brand.id = mall_goods.brand_id
         left join mall_goods_group on mall_goods_group.goods_id = mall_goods.id and mall_goods_group.open_status != 3
+        left join mall_freight on mall_goods.freight_id = mall_freight.id
         WHERE 1=1
         <!--  数据过滤  -->
         ${filterSql}
@@ -118,13 +100,21 @@
         <if test="name != null and name != ''">
             AND mall_goods.name LIKE concat('%',#{name},'%')
         </if>
+        <if test="freightId != null and freightId != ''">
+            AND mall_goods.freight_id = #{freightId}
+        </if>
+        <if test="sku != null and sku != ''">
+            AND mall_goods.sku LIKE concat('%',#{sku},'%')
+        </if>
         <if test="category != null and category != ''">
             AND mall_goods.category_id IN (select id from mall_category where parent_id = #{category})
         </if>
         <if test="categoryTwo != null and categoryTwo != ''">
             AND mall_goods.category_id = #{categoryTwo}
         </if>
-        AND mall_goods.is_Delete = #{isDelete}
+        <if test="isDelete != null and isDelete != ''">
+            AND mall_goods.is_Delete = #{isDelete}
+        </if>
         <choose>
             <when test="sidx != null and sidx.trim() != ''">
                 order by ${sidx} ${order}
@@ -146,150 +136,163 @@
             AND mall_goods.goods_sn like concat('%',#{goodsSn},'%')
         </if>
         <if test="name != null and name != ''">
-            AND name LIKE concat('%',#{name},'%')
+            AND mall_goods.name LIKE concat('%',#{name},'%')
+        </if>
+        <if test="sku != null and sku != ''">
+            AND mall_goods.sku LIKE concat('%',#{sku},'%')
         </if>
         AND mall_goods.is_Delete = #{isDelete}
     </select>
 
     <insert id="save" parameterType="com.kmall.admin.entity.GoodsEntity">
-        insert into mall_goods
-        (
-        `id`,
-        `category_id`,
-        `goods_sn`,
-        `name`,
-        `brand_id`,
-        `goods_number`,
-        `keywords`,
-        `goods_brief`,
-        `goods_desc`,
-        `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`,
-        `sku`,
-        `goods_biz_type`,
-        `create_sn`,
-        `create_time`,
-        `moder_sn`,
-        `mod_time`,
-        `tstm`
-        )
-        values
-        (
-        #{id},
-        #{categoryId},
-        #{goodsSn},
-        #{name},
-        #{brandId},
-        #{goodsNumber},
-        #{keywords},
-        #{goodsBrief},
-        #{goodsDesc},
-        #{isOnSale},
-        #{addTime},
-        #{sortOrder},
-        #{isDelete},
-        #{attributeCategory},
-        #{counterPrice},
-        #{extraPrice},
-        #{isNew},
-        #{goodsUnit},
-        #{primaryPicUrl},
-        #{listPicUrl},
-        #{retailPrice},
-        #{sellVolume},
-        #{primaryProductId},
-        #{unitPrice},
-        #{promotionDesc},
-        #{promotionTag},
-        #{appExclusivePrice},
-        #{isAppExclusive},
-        #{isLimited},
-        #{isHot},
-        #{marketPrice},
-        #{sku},
-        #{goodsBizType},
-        #{createrSn},
-        #{createTime},
-        #{moderSn},
-        #{modTime},
-        #{tstm}
-        )
+        insert into mall_goods(
+			`category_id`,
+			`goods_sn`,
+			`prod_barcode`,
+			`sku`,
+			`goods_biz_type`,
+			`name`,
+			`unit_code`,
+			`brand_id`,
+			`brand`,
+			`freight_id`,
+			`goods_number`,
+			`keywords`,
+			`goods_brief`,
+			`goods_desc`,
+			`cus_goods_code`,
+			`ciq_prod_model`,
+			`ori_cnt_code`,
+			`cus_decl_ele`,
+			`cus_rec_code`,
+			`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`,
+			`goods_rate`,
+			`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`)
+		values(
+			#{categoryId},
+			#{goodsSn},
+			#{prodBarcode},
+			#{sku},
+			#{goodsBizType},
+			#{name},
+			#{unitCode},
+			#{brandId},
+			#{brand},
+			#{freightId},
+			#{goodsNumber},
+			#{keywords},
+			#{goodsBrief},
+			#{goodsDesc},
+			#{cusGoodsCode},
+			#{ciqProdModel},
+			#{oriCntCode},
+			#{cusDeclEle},
+			#{cusRecCode},
+			#{isOnSale},
+			#{addTime},
+			#{sortOrder},
+			#{isDelete},
+			#{attributeCategory},
+			#{counterPrice},
+			#{extraPrice},
+			#{isNew},
+			#{goodsUnit},
+			#{primaryPicUrl},
+			#{listPicUrl},
+			#{goodsRate},
+			#{retailPrice},
+			#{sellVolume},
+			#{primaryProductId},
+			#{unitPrice},
+			#{promotionDesc},
+			#{promotionTag},
+			#{appExclusivePrice},
+			#{isAppExclusive},
+			#{isLimited},
+			#{isHot},
+			#{marketPrice},
+			#{createrSn},
+			#{createTime},
+			#{moderSn},
+			#{modTime},
+			#{tstm})
     </insert>
 
     <update id="update" parameterType="com.kmall.admin.entity.GoodsEntity">
         update mall_goods
         <set>
-            <if test="categoryId != null">`category_id` = #{categoryId},</if>
-            <if test="goodsSn != null">`goods_sn` = #{goodsSn},</if>
-            <if test="name != null">`name` = #{name},</if>
-            <if test="brandId != null">`brand_id` = #{brandId},</if>
-            <if test="goodsNumber != null">`goods_number` = #{goodsNumber},</if>
-            <if test="keywords != null">`keywords` = #{keywords},</if>
-            <if test="goodsBrief != null">`goods_brief` = #{goodsBrief},</if>
-            <if test="goodsDesc != null">`goods_desc` = #{goodsDesc},</if>
-            <if test="isOnSale != null">`is_on_sale` = #{isOnSale},</if>
-            <if test="addTime != null">`add_time` = #{addTime},</if>
-            <if test="sortOrder != null">`sort_order` = #{sortOrder},</if>
-            <if test="isDelete != null">`is_delete` = #{isDelete},</if>
-            <if test="attributeCategory != null">`attribute_category` = #{attributeCategory},</if>
-            <if test="counterPrice != null">`counter_price` = #{counterPrice},</if>
-            <if test="extraPrice != null">`extra_price` = #{extraPrice},</if>
-            <if test="isNew != null">`is_new` = #{isNew},</if>
-            <if test="goodsUnit != null">`goods_unit` = #{goodsUnit},</if>
-            <if test="primaryPicUrl != null">`primary_pic_url` = #{primaryPicUrl},</if>
-            <if test="listPicUrl != null">`list_pic_url` = #{listPicUrl},</if>
-            <if test="retailPrice != null">`retail_price` = #{retailPrice},</if>
-            <if test="sellVolume != null">`sell_volume` = #{sellVolume},</if>
-            <if test="primaryProductId != null">`primary_product_id` = #{primaryProductId},</if>
-            <if test="unitPrice != null">`unit_price` = #{unitPrice},</if>
-            <if test="promotionDesc != null">`promotion_desc` = #{promotionDesc},</if>
-            <if test="promotionTag != null">`promotion_tag` = #{promotionTag},</if>
-            <if test="appExclusivePrice != null">`app_exclusive_price` = #{appExclusivePrice},</if>
-            <if test="isAppExclusive != null">`is_app_exclusive` = #{isAppExclusive},</if>
-            <if test="isLimited != null">`is_limited` = #{isLimited},</if>
-            <if test="isHot != null">`is_hot` = #{isHot},</if>
-            <if test="marketPrice != null">`market_price` = #{marketPrice},</if>
-            <if test="sku != null" >
-                sku = #{sku,jdbcType=VARCHAR},
-            </if>
-            <if test="goodsBizType != null" >
-                goods_biz_type = #{goodsBizType,jdbcType=CHAR},
-            </if>
-            <if test="createrSn != null" >
-                creater_sn = #{createrSn,jdbcType=VARCHAR},
-            </if>
-            <if test="createTime != null" >
-                create_time = #{createTime,jdbcType=TIMESTAMP},
-            </if>
-            <if test="moderSn != null" >
-                moder_sn = #{moderSn,jdbcType=VARCHAR},
-            </if>
-            <if test="modTime != null" >
-                mod_time = #{modTime,jdbcType=TIMESTAMP},
-            </if>
-            <if test="tstm != null" >
-                tstm = #{tstm,jdbcType=TIMESTAMP},
-            </if>
+            <if test="categoryId != null">`category_id` = #{categoryId}, </if>
+            <if test="goodsSn != null">`goods_sn` = #{goodsSn}, </if>
+            <if test="prodBarcode != null">`prod_barcode` = #{prodBarcode}, </if>
+            <if test="sku != null">`sku` = #{sku}, </if>
+            <if test="goodsBizType != null">`goods_biz_type` = #{goodsBizType}, </if>
+            <if test="name != null">`name` = #{name}, </if>
+            <if test="unitCode != null">`unit_code` = #{unitCode}, </if>
+            <if test="brandId != null">`brand_id` = #{brandId}, </if>
+            <if test="brand != null">`brand` = #{brand}, </if>
+            <if test="freightId != null">`freight_id` = #{freightId}, </if>
+            <if test="goodsNumber != null">`goods_number` = #{goodsNumber}, </if>
+            <if test="keywords != null">`keywords` = #{keywords}, </if>
+            <if test="goodsBrief != null">`goods_brief` = #{goodsBrief}, </if>
+            <if test="goodsDesc != null">`goods_desc` = #{goodsDesc}, </if>
+            <if test="cusGoodsCode != null">`cus_goods_code` = #{cusGoodsCode}, </if>
+            <if test="ciqProdModel != null">`ciq_prod_model` = #{ciqProdModel}, </if>
+            <if test="oriCntCode != null">`ori_cnt_code` = #{oriCntCode}, </if>
+            <if test="cusDeclEle != null">`cus_decl_ele` = #{cusDeclEle}, </if>
+            <if test="cusRecCode != null">`cus_rec_code` = #{cusRecCode}, </if>
+            <if test="isOnSale != null">`is_on_sale` = #{isOnSale}, </if>
+            <if test="addTime != null">`add_time` = #{addTime}, </if>
+            <if test="sortOrder != null">`sort_order` = #{sortOrder}, </if>
+            <if test="isDelete != null">`is_delete` = #{isDelete}, </if>
+            <if test="attributeCategory != null">`attribute_category` = #{attributeCategory}, </if>
+            <if test="counterPrice != null">`counter_price` = #{counterPrice}, </if>
+            <if test="extraPrice != null">`extra_price` = #{extraPrice}, </if>
+            <if test="isNew != null">`is_new` = #{isNew}, </if>
+            <if test="goodsUnit != null">`goods_unit` = #{goodsUnit}, </if>
+            <if test="primaryPicUrl != null">`primary_pic_url` = #{primaryPicUrl}, </if>
+            <if test="listPicUrl != null">`list_pic_url` = #{listPicUrl}, </if>
+            <if test="goodsRate != null">`goods_rate` = #{goodsRate}, </if>
+            <if test="retailPrice != null">`retail_price` = #{retailPrice}, </if>
+            <if test="sellVolume != null">`sell_volume` = #{sellVolume}, </if>
+            <if test="primaryProductId != null">`primary_product_id` = #{primaryProductId}, </if>
+            <if test="unitPrice != null">`unit_price` = #{unitPrice}, </if>
+            <if test="promotionDesc != null">`promotion_desc` = #{promotionDesc}, </if>
+            <if test="promotionTag != null">`promotion_tag` = #{promotionTag}, </if>
+            <if test="appExclusivePrice != null">`app_exclusive_price` = #{appExclusivePrice}, </if>
+            <if test="isAppExclusive != null">`is_app_exclusive` = #{isAppExclusive}, </if>
+            <if test="isLimited != null">`is_limited` = #{isLimited}, </if>
+            <if test="isHot != null">`is_hot` = #{isHot}, </if>
+            <if test="marketPrice != null">`market_price` = #{marketPrice}, </if>
+            <if test="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>

+ 225 - 0
kmall-admin/src/main/resources/mybatis/mapper/OrderProcessRecordDao.xml

@@ -0,0 +1,225 @@
+<?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.admin.dao.OrderProcessRecordDao">
+
+    <resultMap type="com.kmall.admin.entity.OrderProcessRecordEntity" id="orderProcessRecordMap">
+        <result property="id" column="id"/>
+        <result property="orderSn" column="order_sn"/>
+        <result property="userId" column="user_id"/>
+        <result property="orderBizType" column="order_biz_type"/>
+        <result property="addOrderStartTime" column="add_order_start_time"/>
+        <result property="addOrderSuccTime" column="add_order_succ_time"/>
+        <result property="isAddOrderSend" column="is_add_order_send"/>
+        <result property="payStartTime" column="pay_start_time"/>
+        <result property="paySuccTime" column="pay_succ_time"/>
+        <result property="paymentStartTime" column="payment_start_time"/>
+        <result property="paymentSuccTime" column="payment_succ_time"/>
+        <result property="isPaymentSend" column="is_payment_send"/>
+        <result property="eleOrderStartTime" column="ele_order_start_time"/>
+        <result property="eleOrderSuccTime" column="ele_order_succ_time"/>
+        <result property="isEleOrderSend" column="is_ele_order_send"/>
+        <result property="waybillStartTime" column="waybill_start_time"/>
+        <result property="waybillSuccTime" column="waybill_succ_time"/>
+        <result property="logisticsNo" column="logistics_no"/>
+        <result property="customsStartTime" column="customs_start_time"/>
+        <result property="customsSuccTime" column="customs_succ_time"/>
+        <result property="invtNo" column="invt_no"/>
+        <result property="isCustomsSend" column="is_customs_send"/>
+        <result property="shipmentStartTime" column="shipment_start_time"/>
+        <result property="shipmentSuccTime" column="shipment_succ_time"/>
+        <result property="processContent" column="process_content"/>
+        <result property="tstm" column="tstm"/>
+    </resultMap>
+
+	<select id="queryObject" resultType="com.kmall.admin.entity.OrderProcessRecordEntity">
+		select
+			`id`,
+			`order_sn`,
+			`user_id`,
+			`order_biz_type`,
+			`add_order_start_time`,
+			`add_order_succ_time`,
+			`is_add_order_send`,
+			`pay_start_time`,
+			`pay_succ_time`,
+			`payment_start_time`,
+			`payment_succ_time`,
+			`is_payment_send`,
+			`ele_order_start_time`,
+			`ele_order_succ_time`,
+			`is_ele_order_send`,
+			`waybill_start_time`,
+			`waybill_succ_time`,
+			`logistics_no`,
+			`customs_start_time`,
+			`customs_succ_time`,
+			`invt_no`,
+			`is_customs_send`,
+			`shipment_start_time`,
+			`shipment_succ_time`,
+			`process_content`,
+			`tstm`
+		from mall_order_process_record
+		where id = #{id}
+	</select>
+
+	<select id="queryObjectByOrderSn" resultType="com.kmall.admin.entity.OrderProcessRecordEntity">
+		select *
+		from mall_order_process_record
+		where order_sn = #{orderSn}
+	</select>
+
+	<select id="queryList" resultType="com.kmall.admin.entity.OrderProcessRecordEntity">
+		select
+    		`id`,
+    		`order_sn`,
+    		`user_id`,
+    		`order_biz_type`,
+    		`add_order_start_time`,
+    		`add_order_succ_time`,
+    		`is_add_order_send`,
+    		`pay_start_time`,
+    		`pay_succ_time`,
+    		`payment_start_time`,
+    		`payment_succ_time`,
+    		`is_payment_send`,
+    		`ele_order_start_time`,
+    		`ele_order_succ_time`,
+    		`is_ele_order_send`,
+    		`waybill_start_time`,
+    		`waybill_succ_time`,
+    		`logistics_no`,
+    		`customs_start_time`,
+    		`customs_succ_time`,
+    		`invt_no`,
+    		`is_customs_send`,
+    		`shipment_start_time`,
+    		`shipment_succ_time`,
+    		`process_content`,
+    		`tstm`
+		from mall_order_process_record
+		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_order_process_record
+		WHERE 1=1
+        <if test="name != null and name.trim() != ''">
+            AND name LIKE concat('%',#{name},'%')
+        </if>
+	</select>
+	 
+	<insert id="save" parameterType="com.kmall.admin.entity.OrderProcessRecordEntity" useGeneratedKeys="true" keyProperty="id">
+		insert into mall_order_process_record(
+			`order_sn`,
+			`user_id`,
+			`order_biz_type`,
+			`add_order_start_time`,
+			`add_order_succ_time`,
+			`is_add_order_send`,
+			`pay_start_time`,
+			`pay_succ_time`,
+			`payment_start_time`,
+			`payment_succ_time`,
+			`is_payment_send`,
+			`ele_order_start_time`,
+			`ele_order_succ_time`,
+			`is_ele_order_send`,
+			`waybill_start_time`,
+			`waybill_succ_time`,
+			`logistics_no`,
+			`customs_start_time`,
+			`customs_succ_time`,
+			`invt_no`,
+			`is_customs_send`,
+			`shipment_start_time`,
+			`shipment_succ_time`,
+			`process_content`,
+			`tstm`)
+		values(
+			#{orderSn},
+			#{userId},
+			#{orderBizType},
+			#{addOrderStartTime},
+			#{addOrderSuccTime},
+			#{isAddOrderSend},
+			#{payStartTime},
+			#{paySuccTime},
+			#{paymentStartTime},
+			#{paymentSuccTime},
+			#{isPaymentSend},
+			#{eleOrderStartTime},
+			#{eleOrderSuccTime},
+			#{isEleOrderSend},
+			#{waybillStartTime},
+			#{waybillSuccTime},
+			#{logisticsNo},
+			#{customsStartTime},
+			#{customsSuccTime},
+			#{invtNo},
+			#{isCustomsSend},
+			#{shipmentStartTime},
+			#{shipmentSuccTime},
+			#{processContent},
+			#{tstm})
+	</insert>
+	 
+	<update id="update" parameterType="com.kmall.admin.entity.OrderProcessRecordEntity">
+		update mall_order_process_record 
+		<set>
+			<if test="orderSn != null">`order_sn` = #{orderSn}, </if>
+			<if test="userId != null">`user_id` = #{userId}, </if>
+			<if test="orderBizType != null">`order_biz_type` = #{orderBizType}, </if>
+			<if test="addOrderStartTime != null">`add_order_start_time` = #{addOrderStartTime}, </if>
+			<if test="addOrderSuccTime != null">`add_order_succ_time` = #{addOrderSuccTime}, </if>
+			<if test="isAddOrderSend != null">`is_add_order_send` = #{isAddOrderSend}, </if>
+			<if test="payStartTime != null">`pay_start_time` = #{payStartTime}, </if>
+			<if test="paySuccTime != null">`pay_succ_time` = #{paySuccTime}, </if>
+			<if test="paymentStartTime != null">`payment_start_time` = #{paymentStartTime}, </if>
+			<if test="paymentSuccTime != null">`payment_succ_time` = #{paymentSuccTime}, </if>
+			<if test="isPaymentSend != null">`is_payment_send` = #{isPaymentSend}, </if>
+			<if test="eleOrderStartTime != null">`ele_order_start_time` = #{eleOrderStartTime}, </if>
+			<if test="eleOrderSuccTime != null">`ele_order_succ_time` = #{eleOrderSuccTime}, </if>
+			<if test="isEleOrderSend != null">`is_ele_order_send` = #{isEleOrderSend}, </if>
+			<if test="waybillStartTime != null">`waybill_start_time` = #{waybillStartTime}, </if>
+			<if test="waybillSuccTime != null">`waybill_succ_time` = #{waybillSuccTime}, </if>
+			<if test="logisticsNo != null">`logistics_no` = #{logisticsNo}, </if>
+			<if test="customsStartTime != null">`customs_start_time` = #{customsStartTime}, </if>
+			<if test="customsSuccTime != null">`customs_succ_time` = #{customsSuccTime}, </if>
+			<if test="invtNo != null">`invt_no` = #{invtNo}, </if>
+			<if test="isCustomsSend != null">`is_customs_send` = #{isCustomsSend}, </if>
+			<if test="shipmentStartTime != null">`shipment_start_time` = #{shipmentStartTime}, </if>
+			<if test="shipmentSuccTime != null">`shipment_succ_time` = #{shipmentSuccTime}, </if>
+			<if test="processContent != null">`process_content` = #{processContent}, </if>
+			<if test="tstm != null">`tstm` = #{tstm}</if>
+		</set>
+		where id = #{id}
+	</update>
+	
+	<delete id="delete">
+		delete from mall_order_process_record where id = #{value}
+	</delete>
+	
+	<delete id="deleteBatch">
+		delete from mall_order_process_record where id in 
+		<foreach item="id" collection="array" open="(" separator="," close=")">
+			#{id}
+		</foreach>
+	</delete>
+
+</mapper>

+ 27 - 62
kmall-admin/src/main/resources/mybatis/mapper/StoreDao.xml

@@ -5,6 +5,8 @@
 
     <resultMap type="com.kmall.admin.entity.StoreEntity" id="storeMap">
         <result property="id" column="id"/>
+		<result property="merchSn" column="merch_sn"/>
+		<result property="merchName" column="merch_name"/>
         <result property="storeName" column="store_name"/>
         <result property="storeNumber" column="store_number"/>
         <result property="storeAddress" column="store_address"/>
@@ -15,18 +17,17 @@
         <result property="longitude" column="longitude"/>
         <result property="coverRadius" column="cover_radius"/>
         <result property="remark" column="remark"/>
-		<result column="merch_sn" property="merchSn" jdbcType="VARCHAR" />
-		<result column="merch_name" property="merchName" jdbcType="VARCHAR" />
-		<result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
-		<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
-		<result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
-		<result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
-		<result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
+		<result column="creater_sn" property="createrSn"/>
+		<result column="create_time" property="createTime"/>
+		<result column="moder_sn" property="moderSn"/>
+		<result column="mod_time" property="modTime"/>
     </resultMap>
 
 	<select id="queryObject" resultType="com.kmall.admin.entity.StoreEntity">
 		select
 			`id`,
+			`merch_sn`,
+			`merch_name`,
 			`store_name`,
 			`store_number`,
 			`store_address`,
@@ -45,6 +46,8 @@
 	<select id="queryObjectByName" resultType="com.kmall.admin.entity.StoreEntity">
 		select
 		`id`,
+		`merch_sn`,
+		`merch_name`,
 		`store_name`,
 		`store_number`,
 		`store_address`,
@@ -63,6 +66,8 @@
 	<select id="queryList" resultType="com.kmall.admin.entity.StoreEntity">
 		select
     		`id`,
+			`merch_sn`,
+			`merch_name`,
     		`store_name`,
     		`store_number`,
     		`store_address`,
@@ -108,6 +113,8 @@
 	 
 	<insert id="save" parameterType="com.kmall.admin.entity.StoreEntity" useGeneratedKeys="true" keyProperty="id">
 		insert into mall_store(
+			`merch_sn`,
+			`merch_name`,
 			`store_name`,
 			`store_number`,
 			`store_address`,
@@ -118,26 +125,14 @@
 			`longitude`,
 			`cover_radius`,
 			`remark`,
-		<if test="merchSn != null" >
-			merch_sn,
-		</if>
-		<if test="merchName != null" >
-			merch_name,
-		</if>
-		<if test="createrSn != null" >
 			creater_sn,
-		</if>
-		<if test="createTime != null" >
 			create_time,
-		</if>
-		<if test="moderSn != null" >
 			moder_sn,
-		</if>
-		<if test="modTime != null" >
 			mod_time
-		</if>
 		)
 		values(
+			#{merchSn},
+			#{merchName},
 			#{storeName},
 			#{storeNumber},
 			#{storeAddress},
@@ -148,31 +143,18 @@
 			#{longitude},
 			#{coverRadius},
 			#{remark},
-
-		<if test="merchSn != null" >
-			#{merchSn,jdbcType=VARCHAR},
-		</if>
-		<if test="merchName != null" >
-			#{merchName,jdbcType=VARCHAR},
-		</if>
-		<if test="createrSn != null" >
-			#{createrSn,jdbcType=VARCHAR},
-		</if>
-		<if test="createTime != null" >
-			#{createTime,jdbcType=TIMESTAMP},
-		</if>
-		<if test="moderSn != null" >
-			#{moderSn,jdbcType=VARCHAR},
-		</if>
-		<if test="modTime != null" >
-			#{modTime,jdbcType=TIMESTAMP}
-		</if>
+			#{createrSn},
+			#{createTime},
+			#{moderSn},
+			#{modTime}
 		)
 	</insert>
 	 
 	<update id="update" parameterType="com.kmall.admin.entity.StoreEntity">
 		update mall_store
 		<set>
+			<if test="merchSn != null">`merch_sn` = #{merchSn}, </if>
+			<if test="merchName != null">`merch_name` = #{merchName}, </if>
 			<if test="storeName != null">`store_name` = #{storeName}, </if>
 			<if test="storeNumber != null">`store_number` = #{storeNumber}, </if>
 			<if test="storeAddress != null">`store_address` = #{storeAddress}, </if>
@@ -183,28 +165,11 @@
 			<if test="longitude != null">`longitude` = #{longitude}, </if>
 			<if test="coverRadius != null">`cover_radius` = #{coverRadius}, </if>
 			<if test="remark != null">`remark` = #{remark},</if>
-
-			<if test="merchSn != null" >
-				merch_sn = #{merchSn,jdbcType=VARCHAR},
-			</if>
-			<if test="merchName != null" >
-				merch_name = #{merchName,jdbcType=VARCHAR},
-			</if>
-			<if test="createrSn != null" >
-				creater_sn = #{createrSn,jdbcType=VARCHAR},
-			</if>
-			<if test="createTime != null" >
-				create_time = #{createTime,jdbcType=TIMESTAMP},
-			</if>
-			<if test="moderSn != null" >
-				moder_sn = #{moderSn,jdbcType=VARCHAR},
-			</if>
-			<if test="modTime != null" >
-				mod_time = #{modTime,jdbcType=TIMESTAMP},
-			</if>
-			<if test="tstm != null" >
-				tstm = #{tstm,jdbcType=TIMESTAMP},
-			</if>
+			<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>

+ 11 - 4
kmall-admin/src/main/resources/mybatis/mapper/UserCouponDao.xml

@@ -11,6 +11,7 @@
         <result property="usedTime" column="used_time"/>
         <result property="orderId" column="order_id"/>
         <result property="addTime" column="add_time"/>
+        <result property="isUsed" column="is_used"/>
     </resultMap>
 
     <select id="queryObject" resultType="com.kmall.admin.entity.UserCouponEntity">
@@ -21,7 +22,8 @@
 			`user_id`,
 			`used_time`,
 			`add_time`,
-			`order_id`
+			`order_id`,
+			`is_used`
 		from mall_user_coupon
 		where id = #{id}
 	</select>
@@ -34,7 +36,8 @@
         `user_id`,
         `used_time`,
         `add_time`,
-        `order_id`
+        `order_id`,
+        `is_used`
         from mall_user_coupon
         where order_id = #{orderId}
     </select>
@@ -48,6 +51,7 @@
         mall_user_coupon.used_time,
         mall_user_coupon.add_time,
         mall_user_coupon.order_id,
+        mall_user_coupon.is_used,
         mall_user.username user_name,
         mall_coupon.name coupon_name
         from mall_user_coupon
@@ -99,14 +103,16 @@
 			`user_id`,
 			`used_time`,
 			`add_time`,
-			`order_id`)
+			`order_id`,
+			`is_used`)
 		values(
 			#{couponId},
 			#{couponNumber},
 			#{userId},
 			#{usedTime},
 			#{addTime},
-			#{orderId})
+			#{orderId},
+			#{isUsed})
 	</insert>
 
     <update id="update" parameterType="com.kmall.admin.entity.UserCouponEntity">
@@ -118,6 +124,7 @@
             <if test="usedTime != null">`used_time` = #{usedTime},</if>
             <if test="addTime != null">`add_time` = #{addTime},</if>
             <if test="orderId != null">`order_id` = #{orderId}</if>
+            <if test="isUsed != null">`is_used` = #{isUsed}</if>
         </set>
         where id = #{id}
     </update>

+ 2 - 2
kmall-admin/src/main/resources/spring/spring-express-kdn.xml

@@ -15,13 +15,13 @@
      	http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd">
 
 
-    <bean id="kdnProdProperties" class="com.kmall.api.service.express.kdn.KdnProdProperties">
+    <bean id="kdnProdProperties" class="com.kmall.common.utils.express.kdn.KdnProdProperties">
         <property name="businessId" value="${kdn.prod.businessId}"/>
         <property name="appKey" value="${kdn.prod.appKey}"/>
         <property name="url" value="${kdn.prod.url}"/>
     </bean>
 
-    <bean id="kdnDevProperties" class="com.kmall.api.service.express.kdn.KdnDevProperties">
+    <bean id="kdnDevProperties" class="com.kmall.common.utils.express.kdn.KdnDevProperties">
         <property name="businessId" value="${kdn.dev.businessId}"/>
         <property name="appKey" value="${kdn.dev.appKey}"/>
         <property name="url" value="${kdn.dev.url}"/>

+ 12 - 3
kmall-admin/src/main/webapp/WEB-INF/page/shop/coupon.html

@@ -51,11 +51,20 @@
             <Form-item label="最大金额" prop="maxAmount">
                 <Input-number :min="0" v-model="coupon.maxAmount" placeholder="最大金额" style="width: 188px;"/>
             </Form-item>
+            <Form-item label="是否适用全场" prop="isAll">
+                <Radio-group v-model="coupon.isAll">
+                    <Radio label="0" checked>
+                        <span>否</span>
+                    </Radio>
+                    <Radio label="1">
+                        <span>是</span>
+                    </Radio>
+                </Radio-group>
+            </Form-item>
             <Form-item>
                 <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
-                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
-                返回</i-button>
-                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
+                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
+                <!--<i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>-->
             </Form-item>
         </i-form>
     </Card>

+ 7 - 4
kmall-admin/src/main/webapp/WEB-INF/page/shop/coupongrads.html

@@ -9,18 +9,21 @@
     <div v-show="showDiv == 1">
         <Row :gutter="16">
             <div class="search-group">
+                <i-col span="4">
+                    <i-input v-model="q.name" @on-enter="query" placeholder="优惠券名称"/>
+                </i-col>
                 <i-button @click="query">查询</i-button>
             </div>
             <div class="buttons-group">
-                #if($shiro.hasPermission("coupon:save"))
+                <!--#if($shiro.hasPermission("coupon:save"))
                 <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
-                #end
+                #end-->
                 #if($shiro.hasPermission("coupon:update"))
                 <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                 #end
-                #if($shiro.hasPermission("coupon:delete"))
+                <!--#if($shiro.hasPermission("coupon:delete"))
                 <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
-                #end
+                #end-->
                 <!--#if($shiro.hasPermission("coupon:publish"))-->
                 <!--<i-button type="primary" @click="publish">-->
                 <!--<Icon type="android-send"></Icon>-->

+ 117 - 0
kmall-admin/src/main/webapp/WEB-INF/page/shop/freight.html

@@ -0,0 +1,117 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title></title>
+    #parse("sys/header.html")
+</head>
+<body>
+<div id="rrapp" v-cloak>
+    <div v-show="showList">
+        <Row :gutter="16">
+            <div class="search-group">
+                <i-col span="4">
+                    <i-button type="ghost" @click="reload"><i class="fa fa-refresh"></i>&nbsp;刷新</i-button>
+                </i-col>
+            </div>
+            <div class="buttons-group">
+                #if($shiro.hasPermission("freight:save"))
+                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
+                #end
+                #if($shiro.hasPermission("freight:update"))
+                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
+                #end
+                #if($shiro.hasPermission("freight:delete"))
+                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
+                #end
+            </div>
+        </Row>
+        <table id="jqGrid"></table>
+        <div id="jqGridPager"></div>
+    </div>
+
+    <Card v-show="!showList">
+        <p slot="title">{{title}}</p>
+        <i-form ref="formValidate" :model="freight" :rules="ruleValidate" :label-width="140">
+            <Form-item label="模版名称" prop="name">
+                <i-input v-model="freight.name" placeholder="模版名称"/>
+            </Form-item>
+            <Form-item label="模版类型" prop="templateType">
+                <Radio-group v-model="freight.templateType">
+                    <Radio label="0">
+                        <span>买家承担运费</span>
+                    </Radio>
+                    <Radio label="1">
+                        <span>卖家包邮</span>
+                    </Radio>
+                </Radio-group>
+            </Form-item>
+            <Form-item label="计价方式" prop="pricingManner">
+                <Radio-group v-model="freight.pricingManner" @on-change="changeUnit">
+                    <Radio label="0">
+                        <span>按件数</span>
+                    </Radio>
+                    <Radio label="1">
+                        <span>按重量</span>
+                    </Radio>
+                    <Radio label="2">
+                        <span>按体积</span>
+                    </Radio>
+                </Radio-group>
+            </Form-item>
+            <Form-item label="配送区域及运费" prop="freightItem">
+                <table class="table table-bordered">
+                    <tr>
+                        <td style="text-align: center; width: 400px">可配送区域</td>
+                        <td id="first" style="text-align: center; width: 100px">首件(个)</td>
+                        <td style="text-align: center; width: 100px">运费</td>
+                        <td id="continue" style="text-align: center; width: 100px">续件(个)</td>
+                        <td style="text-align: center; width: 100px">续费</td>
+                        <!--<td style="text-align: center; width: 90px">操作</td>-->
+                    </tr>
+                    <tr v-for="(item,index) in freightItemEntityList" v-show="item.isDelete==0">
+                        <td>
+                            <Checkbox v-model="item.deliveryArea" disabled />所有地区默认配送
+                        </td>
+                        <td>
+                            <Input-number :min="0" :step="1" v-model="item.firstPiece" style="width: 260px;" />
+                        </td>
+                        <td>
+                            <Input-number :min="0" :step="1" v-model="item.freight" style="width: 260px;" />
+                        </td>
+                        <td>
+                            <Input-number :min="0" :step="1" v-model="item.continuePiece" style="width: 260px;" />
+                        </td>
+                        <td>
+                            <Input-number :min="0" :step="1" v-model="item.renew" style="width: 260px;" />
+                        </td>
+                        <!--<td align="center">
+                            <button v-if="index == 0" class="btn btn-primary btn-sm" type="button"
+                                    @click="addItemRow">
+                                <i class="fa fa-plus"></i>
+                            </button>
+                            <button class="btn red btn-sm" type="button" @click="delItemRow(index)">
+                                <i class="fa fa-trash-o"></i>
+                            </button>
+                        </td>-->
+                    </tr>
+                </table>
+            </Form-item>
+            <Form-item label="" prop="isDefault">
+                <Checkbox v-model="freight.isDefault"/>设为新商品默认模板
+            </Form-item>
+        </i-form>
+        <div style="padding-left: 20px">
+            <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
+            <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
+        </div>
+    </Card>
+</div>
+
+<!-- 选择类型 -->
+<div id="categoryLayer" style="display: none;padding:10px;">
+    <ul id="categoryTree" class="ztree"></ul>
+</div>
+
+<script src="${rc.contextPath}/js/shop/freight.js?_${date.systemTime}"></script>
+</body>
+</html>

+ 109 - 43
kmall-admin/src/main/webapp/WEB-INF/page/shop/goods.html

@@ -63,16 +63,16 @@
                     <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
                 </i-col>
                 <i-col span="4">
-                    <i-select v-model="q.category" placeholder="商品分类" filterable @on-change="changeCategories"
+                    <i-select v-model="q.category" placeholder="商品分类" filterable @on-change="changeQueryCategories"
                               label-in-value>
-                        <i-option v-for="category in categories" :value="category.id"
+                        <i-option v-for="category in queryCategories" :value="category.id"
                                   :key="category.id">{{category.name}}
                         </i-option>
                     </i-select>
                 </i-col>
                 <i-col span="4">
-                    <i-select v-model="q.categoryTwo" filterable @on-change="query" label-in-value>
-                        <i-option v-for="category in categoriesTwo" :value="category.id"
+                    <i-select v-model="q.categoryTwo" placeholder="商品二级分类" filterable label-in-value>
+                        <i-option v-for="category in queryCategoriesTwo" :value="category.id"
                                   :key="category.id">{{category.name}}
                         </i-option>
                     </i-select>
@@ -100,13 +100,24 @@
 
     <Card v-show="!showList">
         <p slot="title">{{title}}</p>
-
+        <i-form ref="formValidate" :model="goods" :rules="ruleValidate" :label-width="140">
         <Tabs value="name1">
             <Tab-Pane label="通用信息" name="name1">
-                <i-form ref="formValidate" :model="goods" :rules="ruleValidate" :label-width="80">
+                <!--<i-form ref="formValidate" :model="goods" :rules="ruleValidate" :label-width="80">-->
                     <Form-item label="商品类型" prop="categoryId">
-                        <i-input v-model="goods.categoryName" @on-click="categoryTree" icon="eye" readonly="readonly"
-                                 placeholder="商品类型"/>
+                        <!--<i-input v-model="goods.categoryName" @on-click="categoryTree" icon="eye" readonly="readonly" placeholder="商品类型"/>-->
+                        <i-select v-model="goods.category" placeholder="商品分类" filterable @on-change="changeCategories"
+                                  label-in-value style="width: 268px;">
+                            <i-option v-for="category in categories" :value="category.id"
+                                      :key="category.id">{{category.name}}
+                            </i-option>
+                        </i-select>
+                        <i-select v-model="goods.categoryId" placeholder="商品二级分类" filterable
+                                  label-in-value style="width: 268px;">
+                            <i-option v-for="category in categoriesTwo" :value="category.id"
+                                      :key="category.id">{{category.name}}
+                            </i-option>
+                        </i-select>
                     </Form-item>
                     <Form-item label="商品编码" prop="goodsSn">
                         <i-input v-model="goods.goodsSn" placeholder="商品编码"/>
@@ -114,21 +125,45 @@
                     <Form-item label="名称" prop="name">
                         <i-input v-model="goods.name" placeholder="名称"/>
                     </Form-item>
-                    <Form-item label="类别" prop="attributeCategory" style="width: 268px;">
+                    <!--<Form-item label="类别" prop="attributeCategory" style="width: 268px;">
                         <i-select v-model="goods.attributeCategory" filterable label-in-value>
-                            <i-option v-for="attributeCategory in attributeCategories" :value="attributeCategory.id"
-                                      :key="attributeCategory.id">{{attributeCategory.name}}
+                            <i-option v-for="attributeCategory in attributeCategories" :value="attributeCategory.id" :key="attributeCategory.id">{{attributeCategory.name}}
+                            </i-option>
+                        </i-select>
+                    </Form-item>-->
+                    <Form-item label="SKU" prop="sku">
+                        <i-input v-model="goods.sku" placeholder="SKU" style="width: 268px;"/>
+                    </Form-item>
+                    <Form-item label="货品业务类型" prop="goodsBizType" >
+                        <i-select v-model="goods.goodsBizType" filterable placeholder="货品业务类型"
+                                  label-in-value style="width: 268px;">
+                            <i-option v-for="macro in macros" :value="macro.value" :key="macro.id">{{macro.name}}
+                            </i-option>
+                        </i-select>
+                    </Form-item>
+                    <Form-item label="品牌" prop="brandId">
+                        <i-select v-model="goods.brandId" filterable placeholder="品牌"
+                                  label-in-value style="width: 268px;">
+                            <i-option v-for="brand in brands" :value="brand.id" :key="brand.id">{{brand.name}}
                             </i-option>
                         </i-select>
                     </Form-item>
-                    <!--<Form-item label="市场价" prop="marketPrice">-->
-                    <!--<Input-number :min="0" :step="1" v-model="goods.marketPrice" placeholder="市场价"-->
-                    <!--style="width: 188px;"/>-->
-                    <!--</Form-item>-->
-                    <!--<Form-item label="零售价格" prop="retailPrice">-->
-                    <!--<Input-number :min="0" :step="1" v-model="goods.retailPrice" placeholder="零售价格"-->
-                    <!--style="width: 188px;"/>-->
-                    <!--</Form-item>-->
+                    <Form-item label="运费模版" prop="freightId">
+                        <i-select v-model="goods.freightId" filterable placeholder="运费模版"
+                                  label-in-value style="width: 268px;">
+                            <i-option v-for="freight in freights" :value="freight.id" :key="freight.id">{{freight.name}}
+                            </i-option>
+                        </i-select>
+                    </Form-item>
+                    <Form-item label="市场价" prop="marketPrice">
+                        <Input-number :min="1" :step="1" v-model="goods.marketPrice" placeholder="市场价" style="width: 268px;"/>
+                    </Form-item>
+                    <Form-item label="零售价" prop="retailPrice">
+                        <Input-number :min="1" :step="1" v-model="goods.retailPrice" placeholder="零售价" style="width: 268px;"/>
+                    </Form-item>
+                    <Form-item label="商品税率(0.00)" prop="goodsRate">
+                        <Input-number :min="0" :step="0.01" v-model="goods.goodsRate" placeholder="商品税率" style="width: 268px;"/>
+                    </Form-item>
                     <Row>
                         <i-col span="16">
                             <Form-item label="商品主图" prop="primaryPicUrl">
@@ -175,10 +210,38 @@
                             </Form-item>
                         </i-col>
                     </Row>
-                </i-form>
+                <!--</i-form>-->
+            </Tab-Pane>
+            <Tab-Pane label="海关信息" name="name2">
+                <!--<i-form ref="formValidate" :model="goods" :rules="ruleValidate" :label-width="80">-->
+                    <Form-item label="产品品牌" prop="brand">
+                        <i-input v-model="goods.brand" placeholder="产品品牌"/>
+                    </Form-item>
+                    <Form-item label="产品条码" prop="prodBarcode">
+                        <i-input v-model="goods.prodBarcode" placeholder="产品条码"/>
+                    </Form-item>
+                    <Form-item label="海关备案编号" prop="cusRecCode">
+                        <i-input v-model="goods.cusRecCode" placeholder="海关备案编号"/>
+                    </Form-item>
+                    <Form-item label="计量单位代码" prop="unitCode">
+                        <i-input v-model="goods.unitCode" placeholder="计量单位代码"/>
+                    </Form-item>
+                    <Form-item label="海关商品编码" prop="cusGoodsCode">
+                        <i-input v-model="goods.cusGoodsCode" placeholder="海关商品编码"/>
+                    </Form-item>
+                    <Form-item label="国检规格型号" prop="ciqProdModel" >
+                        <i-input v-model="goods.ciqProdModel" placeholder="国检规格型号"/>
+                    </Form-item>
+                    <Form-item label="原产国代码" prop="oriCntCode">
+                        <i-input v-model="goods.oriCntCode" placeholder="原产国代码"/>
+                    </Form-item>
+                    <Form-item label="海关申报要素" prop="cusDeclEle">
+                        <i-input v-model="goods.cusDeclEle" placeholder="海关申报要素"/>
+                    </Form-item>
+                <!--</i-form>-->
             </Tab-Pane>
-            <Tab-Pane label="规格" name="name2">
-                <i-form ref="formValidate" :model="goods" :rules="ruleValidate" :label-width="80">
+            <Tab-Pane label="规格" name="name3">
+                <!--<i-form ref="formValidate" :model="goods" :rules="ruleValidate" :label-width="80">-->
                     <table class="table table-bordered">
                         <tr>
                             <td style="text-align: center; width: 200px">编码</td>
@@ -211,9 +274,9 @@
                             </td>
                         </tr>
                     </table>
-                </i-form>
+                <!--</i-form>-->
             </Tab-Pane>
-            <Tab-Pane label="详细描述" name="name3">
+            <Tab-Pane label="详细描述" name="name4">
                 <template>
                     <div class="upload-list" v-for="item in uploadList">
                         <template v-if="item.status === 'finished'">
@@ -251,9 +314,9 @@
                 </template>
                 <div id="goodsDesc"></div>
             </Tab-Pane>
-            <Tab-Pane label="参数" name="name4">
-                <i-form ref="formValidate" :model="goods" :rules="ruleValidate" :label-width="80">
-                    <div v-for="(item,index) in attributeEntityList">
+            <Tab-Pane label="参数" name="name5">
+                <!--<i-form ref="formValidate" :model="goods" :rules="ruleValidate" :label-width="80">-->
+                    <div v-for="(item,index) in attributeEntityList" v-show="item.isDelete==0">
                         <div class="row">
                             <div class="col-md-3">
                                 <label class="ivu-form-item-label">属性:</label>
@@ -279,32 +342,31 @@
                             </button>
                         </div>
                     </div>
-                </i-form>
+                <!--</i-form>-->
             </Tab-Pane>
-            <Tab-Pane label="其他信息" name="name5">
-                <i-form ref="formValidate" :model="goods" :rules="ruleValidate" :label-width="80">
+            <Tab-Pane label="其他信息" name="name6">
+                <!--<i-form ref="formValidate" :model="goods" :rules="ruleValidate" :label-width="80">-->
                     <Form-item label="排序" prop="sortOrder">
-                        <Input-number :min="0" :step="1" v-model="goods.sortOrder" placeholder="排序"
-                                      style="width: 188px;"/>
+                        <Input-number :min="0" :step="1" v-model="goods.sortOrder" placeholder="排序" style="width: 188px;"/>
                     </Form-item>
                     <Form-item label="上架" prop="isOnSale">
                         <Radio-group v-model="goods.isOnSale">
-                            <Radio label="1">
-                                <span>是</span>
-                            </Radio>
                             <Radio label="0">
                                 <span>否</span>
                             </Radio>
+                            <Radio label="1">
+                                <span>是</span>
+                            </Radio>
                         </Radio-group>
                     </Form-item>
                     <Form-item label="热销" prop="isHot">
                         <Radio-group v-model="goods.isHot">
-                            <Radio label="1">
-                                <span>是</span>
-                            </Radio>
                             <Radio label="0">
                                 <span>否</span>
                             </Radio>
+                            <Radio label="1">
+                                <span>是</span>
+                            </Radio>
                         </Radio-group>
                     </Form-item>
                     <Form-item label="推广描述" prop="promotionDesc">
@@ -313,23 +375,27 @@
                     <Form-item label="简明介绍" prop="goodsBrief">
                         <i-input v-model="goods.goodsBrief" placeholder="简明介绍"/>
                     </Form-item>
-                </i-form>
+                <!--</i-form>-->
             </Tab-Pane>
         </Tabs>
+        </i-form>
         <div style="padding-left: 20px">
             <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
-            <i-button type="warning" @click="reload" style="margin-left: 8px"/>
-            返回</i-button>
-            <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
+            <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
+            <!--<i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>-->
         </div>
     </Card>
 </div>
 
 <!-- 选择类型 -->
-<div id="categoryLayer" style="display: none;padding:10px;">
+<div id="categoryLayer" style="display: none;padding: 10px;">
     <ul id="categoryTree" class="ztree"></ul>
 </div>
 
+<div id="qrcode" style="display: none;padding: 10px;">
+    <div id="qrcodeCanvas" style="margin: 53px 0 0 93px"></div>
+</div>
+
 <script src="${rc.contextPath}/js/shop/goods.js?_${date.systemTime}"></script>
 </body>
 </html>

+ 129 - 12
kmall-admin/src/main/webapp/WEB-INF/page/shop/order.html

@@ -24,18 +24,21 @@
                         <i-option value="402">完成</i-option>
                     </i-select>
                 </i-col>
-                <i-col span="4">
+                <!--<i-col span="4">
                     <i-select v-model="q.orderType">
                         <i-option value="1">普通订单</i-option>
                         <i-option value="2">团购订单</i-option>
                     </i-select>
-                </i-col>
+                </i-col>-->
                 <i-button @click="query">查询</i-button>
                 <i-button @click="reloadSearch">重置</i-button>
             </div>
             <div class="buttons-group">
-                #if($shiro.hasPermission("order:sendGoods"))
-                <i-button type="warning" @click="sendGoods">发货</i-button>
+                #if($shiro.hasPermission("order:getProcess"))
+                <i-button type="success" @click="getProcess">查看清关信息</i-button>
+                #end
+                #if($shiro.hasPermission("order:getLogistics"))
+                <i-button type="warning" @click="getLogistics">查看快递信息</i-button>
                 #end
                 #if($shiro.hasPermission("order:confirm"))
                 <i-button type="error" @click="confirm">确认收货</i-button>
@@ -47,29 +50,143 @@
         <div id="jqGridPager"></div>
     </div>
 
+    <Card v-show="showDiv == 7">
+        <p slot="title">清关信息</p>
+        <i-form :label-width="150">
+            <Form-item label="下单开始时间" prop="addOrderStartTime">
+                <i-input v-model="orderProcessRecordEntity.addOrderStartTime" readonly placeholder="下单开始时间"/>
+            </Form-item>
+            <Form-item label="下单成功时间" prop="addOrderSuccTime">
+                <i-input v-model="orderProcessRecordEntity.addOrderSuccTime" placeholder="下单成功时间"/>
+            </Form-item>
+            <Form-item label="下单状态" prop="isAddOrderSend">
+                <Radio-group v-model="orderProcessRecordEntity.isAddOrderSend">
+                    <Radio label="0">
+                        <span>失败</span>
+                    </Radio>
+                    <Radio label="1">
+                        <span>成功</span>
+                    </Radio>
+                    <Radio label="2">
+                        <span>下单中</span>
+                    </Radio>
+                </Radio-group>
+            </Form-item>
+            <Form-item label="支付开始时间" prop="payStartTime">
+                <i-input v-model="orderProcessRecordEntity.payStartTime" placeholder="支付开始时间"/>
+            </Form-item>
+            <Form-item label="支付成功时间" prop="paySuccTime">
+                <i-input v-model="orderProcessRecordEntity.paySuccTime" placeholder="支付成功时间"/>
+            </Form-item>
+            <Form-item label="支付单开始时间" prop="paymentStartTime">
+                <i-input v-model="orderProcessRecordEntity.paymentStartTime" placeholder="支付单开始时间"/>
+            </Form-item>
+            <Form-item label="支付单成功时间" prop="paymentSuccTime">
+                <i-input v-model="orderProcessRecordEntity.paymentSuccTime" placeholder="支付单成功时间"/>
+            </Form-item>
+            <Form-item label="支付单状态" prop="isPaymentSend">
+                <Radio-group v-model="orderProcessRecordEntity.isPaymentSend">
+                    <Radio label="0">
+                        <span>失败</span>
+                    </Radio>
+                    <Radio label="1">
+                        <span>成功</span>
+                    </Radio>
+                    <Radio label="2">
+                        <span>支付单申报中</span>
+                    </Radio>
+                </Radio-group>
+            </Form-item>
+            <Form-item label="电子订单开始时间" prop="eleOrderStartTime">
+                <i-input v-model="orderProcessRecordEntity.eleOrderStartTime" placeholder="电子订单开始时间"/>
+            </Form-item>
+            <Form-item label="电子订单成功时间" prop="eleOrderSuccTime">
+                <i-input v-model="orderProcessRecordEntity.eleOrderSuccTime" placeholder="电子订单成功时间"/>
+            </Form-item>
+            <Form-item label="电子订单状态" prop="isEleOrderSend">
+                <Radio-group v-model="orderProcessRecordEntity.isPaymentSend">
+                    <Radio label="0">
+                        <span>失败</span>
+                    </Radio>
+                    <Radio label="1">
+                        <span>成功</span>
+                    </Radio>
+                    <Radio label="2">
+                        <span>电子订单申报中</span>
+                    </Radio>
+                </Radio-group>
+            </Form-item>
+            <Form-item label="运单开始时间" prop="waybillStartTime">
+                <i-input v-model="orderProcessRecordEntity.waybillStartTime" placeholder="运单开始时间"/>
+            </Form-item>
+            <Form-item label="运单成功时间" prop="waybillSuccTime">
+                <i-input v-model="orderProcessRecordEntity.waybillSuccTime" placeholder="运单成功时间"/>
+            </Form-item>
+            <Form-item label="运单编号" prop="logisticsNo">
+                <i-input v-model="orderProcessRecordEntity.logisticsNo" placeholder="运单编号"/>
+            </Form-item>
+            <Form-item label="清单开始时间" prop="customsStartTime">
+                <i-input v-model="orderProcessRecordEntity.customsStartTime" placeholder="清单开始时间"/>
+            </Form-item>
+            <Form-item label="清单成功时间" prop="customsSuccTime">
+                <i-input v-model="orderProcessRecordEntity.customsSuccTime" placeholder="清单成功时间"/>
+            </Form-item>
+            <Form-item label="清单编号" prop="invtNo">
+                <i-input v-model="orderProcessRecordEntity.invtNo" disabled placeholder="清单编号"/>
+            </Form-item>
+            <Form-item label="清关状态" prop="isCustomsSend">
+                <Radio-group v-model="orderProcessRecordEntity.isCustomsSend">
+                    <Radio label="0">
+                        <span>失败</span>
+                    </Radio>
+                    <Radio label="1">
+                        <span>成功</span>
+                    </Radio>
+                    <Radio label="2">
+                        <span>清关中</span>
+                    </Radio>
+                </Radio-group>
+            </Form-item>
+            <Form-item label="出货开始时间" prop="shipmentStartTime">
+                <i-input v-model="orderProcessRecordEntity.shipmentStartTime" placeholder="出货开始时间"/>
+            </Form-item>
+            <Form-item label="出货成功时间" prop="customsSuccTime">
+                <i-input v-model="orderProcessRecordEntity.shipmentSuccTime" placeholder="出货成功时间"/>
+            </Form-item>
+            <Form-item label="订单流转信息" prop="processContent">
+                <i-input type="textarea" v-model="orderProcessRecordEntity.processContent" placeholder="订单流转信息"/>
+            </Form-item>
+            <Form-item>
+                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
+            </Form-item>
+        </i-form>
+    </Card>
+
     <Card v-show="showDiv == 3">
         <p slot="title">{{title}}</p>
         <i-form :label-width="100">
             <Form-item label="快递公司" prop="name">
-                <i-select v-model="order.shippingCode" @on-change="shippingChange" label-in-value filterable>
+                <i-select v-model="logisticsInfo.shipperCode" disabled  @on-change="shippingChange" label-in-value filterable >
                     <i-option v-for="item in shippings" :value="item.code" :key="item.code">{{item.name}}</i-option>
                 </i-select>
             </Form-item>
             <Form-item label="配送单号" prop="name">
-                <i-input v-model="order.shippingNo" placeholder="快递单号"/>
+                <i-input v-model="logisticsInfo.logisticCode" placeholder="快递单号"/>
             </Form-item>
+            <Timeline style="margin-left: 100px;">
+                <Timeline-item v-for="item in logisticsInfo.tracesList">
+                    <p class="time">{{item.acceptTime}}</p>
+                    <p class="content">{{item.acceptStation}}</p>
+                </Timeline-item>
+            </Timeline>
             <Form-item>
-                <i-button type="primary" @click="saveOrUpdate">提交</i-button>
-                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
-                返回</i-button>
+                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
             </Form-item>
         </i-form>
     </Card>
 
     <Card v-show="showDiv == 2">
-        <p slot="title" style="height: auto">
-            {{title}}
-        </p>
+        <p slot="title" style="height: auto">{{title}}</p>
         <i-form ref="formValidate" :model="order" :label-width="80">
             <Form-item label="订单号" prop="orderSn">
                 <i-input v-model="order.orderSn" readonly/>

+ 1 - 1
kmall-admin/src/main/webapp/WEB-INF/page/shop/orderPrint.html

@@ -108,7 +108,7 @@
             });
             $.get("../ordergoods/queryAll?orderId=" + orderId, function (r) {
                 vm.orderGoods = r.list;
-                debugger;
+                // debugger;
                 for (let i = 0; i < r.list.length; i++) {
                     vm.sumRetailPrice += r.list[i].retailPrice * r.list[i].number
                 }

+ 1 - 0
kmall-admin/src/main/webapp/WEB-INF/page/shop/store.html

@@ -55,6 +55,7 @@
             <Form-item label="区" prop="countyName">
                 <i-input v-model="store.countyName" placeholder=""/>
             </Form-item>
+            <a href="https://lbs.qq.com/tool/getpoint/" target="_blank" style="margin-left: 82px; font-size: 12px;">坐标拾取器</a>
             <Form-item label="纬度" prop="latitude">
                 <i-input v-model="store.latitude" placeholder="纬度"/>
             </Form-item>

+ 3 - 0
kmall-admin/src/main/webapp/WEB-INF/page/sys/header.html

@@ -25,6 +25,9 @@
 <!--vue-->
 <script src="${rc.contextPath}/statics/libs/vue.min.js"></script>
 <script src="${rc.contextPath}/statics/libs/iview.min.js"></script>
+<!--qrcode-->
+<script src="${rc.contextPath}/statics/qrcode/jquery.qrcode.min.js"></script>
+<script src="${rc.contextPath}/statics/qrcode/utf.js"></script>
 <!--jqgrid-->
 <script src="${rc.contextPath}/statics/plugins/jqgrid/grid.locale-cn.js"></script>
 <script src="${rc.contextPath}/statics/plugins/jqgrid/jquery.jqGrid.min.js"></script>

+ 2 - 3
kmall-admin/src/main/webapp/WEB-INF/page/sys/smslog.html

@@ -16,9 +16,8 @@
                 <i-button @click="reloadSearch">重置</i-button>
             </div>
             <div class="buttons-group">
-                <i-button type="success" @click="addConfig"><i class="fa fa-sun-o"></i>&nbsp;短信配置</i-button>
-                <i-button type="info" @click="sendSms"><i class="ivu-icon ivu-icon-android-send"></i>&nbsp;发送短信
-                </i-button>
+                <!--<i-button type="success" @click="addConfig"><i class="fa fa-sun-o"></i>&nbsp;短信配置</i-button>
+                <i-button type="info" @click="sendSms"><i class="ivu-icon ivu-icon-android-send"></i>&nbsp;发送短信</i-button>-->
             </div>
         </Row>
         <table id="jqGrid"></table>

+ 1 - 1
kmall-admin/src/main/webapp/js/common.js

@@ -61,7 +61,7 @@ window.openWindow = function (options) {
         anim: -1,
         isOutAnim: false,
         shadeClose: false,
-        area: ['90%', '95%'],
+        area: ['90%', '90%'],
         content: '',
         btn: false, //按钮
         top: false //窗口弹出是否在iframe上层

+ 17 - 1
kmall-admin/src/main/webapp/js/shop/coupon.js

@@ -57,7 +57,9 @@ var vm = new Vue({
         user: [],
         users: [],
         selectData: {},
-        sendSms: ''//是否发送短信
+        sendSms: '',//是否发送短信
+        startTimeOption: {},
+        endTimeOption: {}
     },
     methods: {
         query: function () {
@@ -209,6 +211,20 @@ var vm = new Vue({
             $.get("../goods/queryAll/", function (r) {
                 vm.goodss = r.list;
             });
+        },
+        onStartTimeChange(startTime) {
+            vm.endTimeOption = {
+                disabledDate(endTime) {
+                    return endTime < new Date(startTime)
+                }
+            }
+        },
+        onEndTimeChange(endTime) {
+            vm.startTimeOption = {
+                disabledDate(startTime) {
+                    return startTime > new Date(endTime)
+                }
+            }
         }
     }
 });

+ 250 - 0
kmall-admin/src/main/webapp/js/shop/freight.js

@@ -0,0 +1,250 @@
+$(function () {
+    $("#jqGrid").jqGrid({
+        url: '../freight/list',
+        datatype: "json",
+        colModel: [
+            {label: 'ID', name: 'id', index: 'id', hidden: true, key: true},
+            {label: '模版名称', name: 'name', index: 'name'},
+            {
+                label: '模版类型', name: 'templateType', index: 'template_type', width: 100,
+                formatter: function (value) {
+                    return transTemplateType(value);
+                }
+            },
+            {
+                label: '计价方式', name: 'pricingManner', index: 'pricing_manner', width: 100,
+                formatter: function (value) {
+                    return transPricingManner(value);
+                }
+            }],
+        viewrecords: true,
+        height: 675,
+        rowNum: 10,
+        rowList: [10, 30, 50],
+        rownumbers: true,
+        rownumWidth: 25,
+        autowidth: true,
+        multiselect: true,
+        pager: "#jqGridPager",
+        jsonReader: {
+            root: "page.list",
+            page: "page.currPage",
+            total: "page.totalPage",
+            records: "page.totalCount"
+        },
+        prmNames: {
+            page: "page",
+            rows: "limit",
+            order: "order"
+        },
+        gridComplete: function () {
+            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"});
+        }
+    });
+});
+
+function transTemplateType(value) {
+    if (value == 1) {
+        return '卖家包邮';
+    }
+    return '买家承担运费';
+};
+
+function transPricingManner(value) {
+    if (value == 1) {
+        return '按重量';
+    } else if (value == 2) {
+        return '按体积';
+    }
+    return '按件数';
+};
+
+
+let vm = new Vue({
+    el: '#rrapp',
+    data: {
+        showList: true,
+        title: null,
+        freight: {},
+        ruleValidate: {
+            name: [
+                {required: true, message: '名称不能为空', trigger: 'blur'}
+            ]
+        },
+        q: {
+            name: ''
+        },
+        freightItemEntityList: [{
+            id: '',
+            freId: '',
+            deliveryArea: true,
+            firstPiece: '',
+            freight: '',
+            continuePiece: '',
+            renew: '',
+            isDelete: 0
+        }]
+    },
+    methods: {
+        changeUnit: function(value) {
+            if (value == '0') {
+                $('#first').html('首件(个)');
+                $('#continue').html('续件(个)');
+            } else if (value == '1') {
+                $('#first').html('首件(kg)');
+                $('#continue').html('续件(kg)');
+            } else if (value == '2') {
+                $('#first').html('首件(m³)');
+                $('#continue').html('续件(m³)');
+            }
+        },
+        delItemRow: function (index) {
+            //最后一行时禁止删除
+            if (vm.freightItemEntityList.length == 1) {
+                return;
+            }
+            vm.freightItemEntityList[index].isDelete = 1;
+        },
+        addItemRow: function () {
+            let id = '';
+            if (vm.freight) {
+                id = vm.freight.id;
+            }
+            vm.freightItemEntityList.push({
+                id: '',
+                freId: '',
+                firstPiece: '',
+                freight: '',
+                continuePiece: '',
+                renew: '',
+                isDelete: 0
+            })
+        },
+        query: function () {
+            vm.reload();
+        },
+        add: function () {
+            vm.showList = false;
+            vm.title = "新增";
+            vm.freight = {
+                name: '',
+                templateType: 0,
+                pricingManner: 0,
+                isDefault: false
+            };
+            vm.freightItemEntityList = [{
+                id: '',
+                freId: '',
+                deliveryArea: true,
+                firstPiece: '',
+                freight: '',
+                continuePiece: '',
+                renew: '',
+                isDelete: 0
+            }];
+        },
+        update: function (event) {
+            let id = getSelectedRow();
+            if (id == null) {
+                return;
+            }
+            vm.showList = false;
+            vm.title = "修改";
+
+            vm.getInfo(id)
+        },
+        saveOrUpdate: function (event) {
+            let url = vm.freight.id == null ? "../freight/save" : "../freight/update";
+            vm.freight.freightItemEntityList = vm.freightItemEntityList;
+            $.ajax({
+                type: "POST",
+                url: url,
+                contentType: "application/json",
+                data: JSON.stringify(vm.freight),
+                success: function (r) {
+                    if (r.code === 0) {
+                        alert('操作成功', function (index) {
+                            vm.reload();
+                        });
+                    } else {
+                        alert(r.msg);
+                    }
+                }
+            });
+        },
+        del: function (event) {
+            let ids = getSelectedRows();
+            if (ids == null){
+                return;
+            }
+
+            confirm('确定要删除选中的记录?', function () {
+                $.ajax({
+                    type: "POST",
+                    url: "../freight/delete",
+                    contentType: "application/json",
+                    data: JSON.stringify(ids),
+                    success: function (r) {
+                        if (r.code == 0) {
+                            alert('操作成功', function (index) {
+                                $("#jqGrid").trigger("reloadGrid");
+                            });
+                        } else {
+                            alert(r.msg);
+                        }
+                    }
+                });
+            });
+        },
+        getInfo: function(id){
+            $.get("../freight/info/"+id, function (r) {
+                vm.freight = r.freight;
+                if (vm.freight.isDefault == "1") {
+                    vm.freight.isDefault = true;
+                }
+                if (r.freight.freightItemEntityList.length > 0) {
+                    vm.freightItemEntityList = r.freight.freightItemEntityList;
+                    for (var item in vm.freightItemEntityList) {
+                        if (item.deliveryArea == "ALL") {
+                            item.deliveryArea = true;
+                        }
+                    }
+                } else {
+                    vm.freightItemEntityList = [{
+                        id: '',
+                        freId: '',
+                        deliveryArea: true,
+                        firstPiece: '',
+                        freight: '',
+                        continuePiece: '',
+                        renew: '',
+                        isDelete: 0
+                    }];
+                }
+            });
+        },
+        reloadSearch: function() {
+            vm.q = {
+                name: ''
+            }
+            vm.reload();
+        },
+        reload: function (event) {
+            vm.showList = true;
+            let page = $("#jqGrid").jqGrid('getGridParam', 'page');
+            $("#jqGrid").jqGrid('setGridParam', {
+                postData: {'name': vm.q.name},
+                page: page
+            }).trigger("reloadGrid");
+            vm.handleReset('formValidate');
+        },
+        handleSubmit: function (name) {
+            handleSubmitValidate(this, name, function () {
+                vm.saveOrUpdate()
+            });
+        },
+        handleReset: function (name) {
+            handleResetForm(this, name);
+        }
+    }
+});

+ 133 - 82
kmall-admin/src/main/webapp/js/shop/goods.js

@@ -4,24 +4,32 @@ $(function () {
         datatype: "json",
         colModel: [
             {label: 'ID', name: 'id', index: 'id', hidden: true, key: true},
-            {label: '商品编码', name: 'goodsSn', index: 'goods_Sn'},
-            {label: '商品类型', name: 'categoryName', index: 'category_id', width: 80},
+            {label: '商品编码', name: 'goodsSn', index: 'goods_Sn', width: 60},
+            {label: 'SKU', name: 'sku', index: 'sku', width: 80},
+            {label: '商品类型', name: 'categoryName', index: 'category_id', width: 40},
             {label: '名称', name: 'name', index: 'name', width: 160},
             {
-                label: '上架', name: 'isOnSale', index: 'is_on_sale', width: 50,
+                label: '货品业务类型', name: 'goodsBizType', index: 'goods_biz_type', width: 70,
                 formatter: function (value) {
-                    return transIsNot(value);
+                    if (value == '00') {
+                        return '保税备货';
+                    } else if (value == '02') {
+                        return '保税展示补货';
+                    } else if (value == '10') {
+                        return '保税展示跨境';
+                    }
+                    return '普通货物';
                 }
             },
+            {label: '零售价格', name: 'retailPrice', index: 'retail_price', width: 80},
+            {label: '市场价', name: 'marketPrice', index: 'market_price', width: 80},
             {
-                label: '录入日期', name: 'addTime', index: 'add_time', width: 80, formatter: function (value) {
-                return transDate(value, 'yyyy-MM-dd');
-            }
+                label: '上架', name: 'isOnSale', index: 'is_on_sale', width: 40, align: 'center',
+                formatter: function (value) {
+                    return transIsNot(value);
+                }
             },
-            {label: '属性类别', name: 'attributeCategoryName', index: 'attribute_category', width: 80},
-            // {label: '零售价格', name: 'retailPrice', index: 'retail_price', width: 80},
-            // {label: '市场价', name: 'marketPrice', index: 'market_price', width: 80},
-            {
+            /*{
                 label: '热销', name: 'isHot', index: 'is_hot', width: 80, formatter: function (value) {
                 return transIsNot(value);
             }
@@ -35,11 +43,27 @@ $(function () {
                         return '<span class="label label-success">无活动</span>';
                     }
                 }
-            },],
+            },*/
+            {
+                label: '录入日期', name: 'addTime', index: 'add_time', width: 80,
+                formatter: function (value) {
+                    return transDate(value, 'yyyy-MM-dd hh:mm:ss');
+                }
+            },
+            {
+                label: '操作', width: 60, align: 'center', sortable: false, formatter: function (value, col, row) {
+                    let htmlStr = '';
+                    if (row.goodsBizType == '02' || row.goodsBizType == '10') {
+                        htmlStr = '<button class="btn btn-outline btn-primary" onclick="vm.qrcodeCanvas(' + row.id + ')"><i class="fa fa-qrcode"></i>二维码</button>';
+                    }
+                    return htmlStr;
+                }
+            }
+        ],
         viewrecords: true,
-        height: 385,
-        rowNum: 10,
-        rowList: [10, 30, 50],
+        height: 675,
+        rowNum: 15,
+        rowList: [15, 30, 50],
         rownumbers: true,
         rownumWidth: 25,
         autowidth: true,
@@ -100,43 +124,55 @@ var vm = new Vue({
         uploadList: [],
         imgName: '',
         visible: false,
-        goods: {
-            primaryPicUrl: '',
-            listPicUrl: '',
-            categoryId: '',
-            isOnSale: 1,
-            isAppExclusive: 0,
-            isLimited: 0,
-            isHot: 0,
-            categoryName: ''
-        },
+        goods: {primaryPicUrl: '', listPicUrl: '', categoryId: '', isOnSale: 1, isAppExclusive: 0, isLimited: 0, isHot: 0, categoryName: ''},
         ruleValidate: {
             name: [
                 {required: true, message: '名称不能为空', trigger: 'blur'}
+            ],
+            sku: [
+                {required: true, message: 'SKU不能为空', trigger: 'blur'}
+            ],
+            goodsBizType: [
+                {required: true, message: '货品业务类型不能为空', trigger: 'blur'}
+            ],
+            brand: [
+                {required: true, message: '产品品牌不能为空', trigger: 'blur'}
+            ],
+            prodBarcode: [
+                {required: true, message: '产品条码不能为空', trigger: 'blur'}
+            ],
+            cusRecCode: [
+                {required: true, message: '海关备案编号不能为空', trigger: 'blur'}
+            ],
+            unitCode: [
+                {required: true, message: '计量单位代码不能为空', trigger: 'blur'}
+            ],
+            cusGoodsCode: [
+                {required: true, message: '海关商品编码不能为空', trigger: 'blur'}
+            ],
+            ciqProdMdel: [
+                {required: true, message: '国检规格型号不能为空', trigger: 'blur'}
+            ],
+            oriCntCode: [
+                {required: true, message: '原产国代码不能为空', trigger: 'blur'}
+            ],
+            cusDeclEle: [
+                {required: true, message: '海关申报要素不能为空', trigger: 'blur'}
             ]
         },
-        q: {
-            name: '',
-            goodsSn: '',
-            category: '',
-            categoryTwo: ''
-        },
+        q: {name: '', goodsSn: '', category: '', categoryTwo: ''},
         attributes: [],
-        attributeEntityList: [{'id': '', 'goodsId': '', 'attributeId': '', 'value': ''}],
-        productEntityList: [{
-            'id': '',
-            'goodsId': '',
-            'goodsSpecificationIds': '',
-            'goodsSpecificationNameValue': '',
-            'goodsSn': '',
-            'goodsNumber': '',
-            'isDelete': 0,
-            'goodsDefault': 0
-        }],
+        attributeEntityList: [{'id': '', 'goodsId': '', 'attributeId': '', 'value': '', 'isDelete': 0}],
+        productEntityList: [{'id': '', 'goodsId': '', 'goodsSpecificationIds': '', 'goodsSpecificationNameValue': '', 'goodsSn': '', 'goodsNumber': '', 'isDelete': 0, 'goodsDefault': 0}],
+        queryCategories: [],//一级分类
+        queryCategoriesTwo: [],
         categories: [],//一级分类
         categoriesTwo: [],
         macros: [],//商品单位
-        attributeCategories: []//属性类别
+        attributeCategories: [],//属性类别
+        specifications: [],
+        brands: [],
+        freights: []
     },
     methods: {
         delSpeRow: function (index) {
@@ -151,16 +187,7 @@ var vm = new Vue({
             if (vm.goods) {
                 goodsId = vm.goods.id;
             }
-            vm.productEntityList.push({
-                'id': '',
-                'goodsId': '',
-                'goodsSpecificationIds': '',
-                'goodsSpecificationNameValue': '',
-                'goodsSn': '',
-                'goodsNumber': '',
-                'isDelete': 0,
-                'goodsDefault': 0
-            })
+            vm.productEntityList.push({'id': '', 'goodsId': '', 'goodsSpecificationIds': '', 'goodsSpecificationNameValue': '', 'goodsSn': '', 'goodsNumber': '', 'isDelete': 0, 'goodsDefault': 0});
         },
         delAttrRow: function (index) {
             //最后一行时禁止删除
@@ -174,7 +201,7 @@ var vm = new Vue({
             if (vm.goods) {
                 goodsId = vm.goods.id;
             }
-            vm.attributeEntityList.push({'id': '', 'goodsId': goodsId, 'attributeId': '', 'value': '', 'isDelete': 0})
+            vm.attributeEntityList.push({'id': '', 'goodsId': goodsId, 'attributeId': '', 'value': '', 'isDelete': 0});
         },
         reloadSearch: function () {
             vm.q = {
@@ -183,7 +210,6 @@ var vm = new Vue({
                 category: '',
                 categoryTwo: ''
             }
-            vm.reload();
         },
         query: function () {
             vm.reload();
@@ -192,24 +218,18 @@ var vm = new Vue({
             vm.showList = false;
             vm.title = "新增";
             vm.uploadList = [];
-            vm.goods = {
-                primaryPicUrl: '',
-                listPicUrl: '',
-                categoryId: '',
-                isOnSale: 1,
-                isAppExclusive: 0,
-                isLimited: 0,
-                isHot: 0,
-                categoryName: ''
-            };
+            vm.goods = {primaryPicUrl: '', listPicUrl: '', categoryId: '', isOnSale: 0, isAppExclusive: 0, isLimited: 0, isHot: 0, categoryName: ''};
             $('#goodsDesc').editable('setHTML', '');
             vm.getCategory();
             vm.macros = [];
+            vm.brands = [];
+            vm.freights = [];
             vm.attributeCategories = [];
             vm.getMacro();
+            vm.getBrand();
+            vm.getFreights();
             vm.getAttributeCategories();
             vm.getAttributes();
-            vm.getSpecification();
         },
         update: function (event) {
             var id = getSelectedRow();
@@ -221,6 +241,8 @@ var vm = new Vue({
             vm.uploadList = [];
             vm.getInfo(id);
             vm.getMacro();
+            vm.getBrand();
+            vm.getFreights();
             vm.getAttributeCategories();
             vm.getGoodsGallery(id);
             vm.getAttributes();
@@ -230,14 +252,23 @@ var vm = new Vue({
                 vm.attributes = r.list;
             });
         },
-        /**
-         * 获取单位
-         */
         getMacro: function () {
-            $.get("../sys/macro/queryMacrosByValue?value=goodsUnit", function (r) {
+            // 获取货品业务类型
+            $.get("../sys/macro/queryMacrosByValue?value=goodsBizType", function (r) {
                 vm.macros = r.list;
             });
         },
+        getBrand: function () {
+            // 获取货品业务类型
+            $.get("../brand/queryAll", function (r) {
+                vm.brands = r.list;
+            });
+        },
+        getFreights: function() {
+            $.get("../freight/queryAll", function (r) {
+                vm.freights = r.list;
+            });
+        },
         getGoodsGallery: function (id) {//获取商品顶部轮播图
             $.get("../goodsgallery/queryAll?goodsId=" + id, function (r) {
                 vm.uploadList = r.list;
@@ -370,21 +401,12 @@ var vm = new Vue({
                 if (r.goods.attributeEntityList.length > 0) {
                     vm.attributeEntityList = r.goods.attributeEntityList;
                 } else {
-                    vm.attributeEntityList = [{'id': '', 'goodsId': '', 'attributeId': '', 'value': ''}];
+                    vm.attributeEntityList = [{'id': '', 'goodsId': '', 'attributeId': '', 'value': '', 'isDelete': 0}];
                 }
                 if (r.goods.productEntityList.length > 0) {
                     vm.productEntityList = r.goods.productEntityList;
                 } else {
-                    vm.productEntityList = [{
-                        'id': '',
-                        'goodsId': '',
-                        'goodsSpecificationIds': '',
-                        'goodsSpecificationNameValue': '',
-                        'goodsSn': '',
-                        'goodsNumber': '',
-                        'isDelete': 0,
-                        'goodsDefault': 0
-                    }]
+                    vm.productEntityList = [{'id': '', 'goodsId': '', 'goodsSpecificationIds': '', 'goodsSpecificationNameValue': '', 'goodsSn': '', 'goodsNumber': '', 'isDelete': 0, 'goodsDefault': 0}];
                 }
                 $('#goodsDesc').editable('setHTML', vm.goods.goodsDesc);
             });
@@ -438,11 +460,17 @@ var vm = new Vue({
             this.imgName = name;
             this.visible = true;
         },
+        changeQueryCategories: function (opt) {
+            var value = opt.value;
+            $.get("../category/getCategorySelectByParent?parentId=" + value, function (r) {
+                vm.queryCategoriesTwo = r.list;
+                // vm.reload();
+            });
+        },
         changeCategories: function (opt) {
             var value = opt.value;
             $.get("../category/getCategorySelectByParent?parentId=" + value, function (r) {
                 vm.categoriesTwo = r.list;
-                vm.reload();
             });
         },
         handleRemove(file) {
@@ -501,11 +529,34 @@ var vm = new Vue({
         },
         eyeImage: function (e) {
             eyeImage($(e.target).attr('src'));
+        },
+        qrcodeCanvas: function(id) {
+            $("#qrcodeCanvas").html("");
+            $("#qrcodeCanvas").qrcode({
+                render : "canvas",    //设置渲染方式,有table和canvas,使用canvas方式渲染性能相对来说比较好
+                text : "emato../goods/goods?id=" + id,    //扫描二维码后显示的内容,可以直接填一个网址,扫描二维码后自动跳向该链接
+                width : "200",               //二维码的宽度
+                height : "200",              //二维码的高度
+                background : "#ffffff",       //二维码的后景色
+                foreground : "#000000",        //二维码的前景色
+                src: ''             //二维码中间的图片
+            });
+
+            openWindow({
+                title: "二维码",
+                area: ['400px', '400px'],
+                content: jQuery("#qrcode"),
+                btn: ["打印"],
+                btn1: function (index) {
+                    layer.close(index);
+                }
+            });
         }
     },
     mounted() {
         this.uploadList = this.$refs.upload.fileList;
         $.get("../category/getCategorySelect", function (r) {
+            vm.queryCategories = r.list;
             vm.categories = r.list;
         })
     }

+ 59 - 39
kmall-admin/src/main/webapp/js/shop/order.js

@@ -23,8 +23,9 @@ $(function () {
             {label: 'id', name: 'id', index: 'id', key: true, hidden: true},
             {label: '订单号', name: 'orderSn', index: 'order_sn', width: 160},
             {label: '会员', name: 'userName', index: 'user_name', width: 80},
-            {
-                label: '订单类型', name: 'orderType', index: 'order_type', width: 80, formatter: function (value) {
+            /*{
+                label: '订单类型', name: 'orderType', index: 'order_type', width: 80,
+                formatter: function (value) {
                     if (value == '1') {
                         return '普通订单';
                     } else if (value == '2') {
@@ -32,9 +33,10 @@ $(function () {
                     }
                     return '-';
                 }
-            },
+            },*/
             {
-                label: '订单状态', name: 'orderStatus', index: 'order_status', width: 80, formatter: function (value) {
+                label: '订单状态', name: 'orderStatus', index: 'order_status', width: 80,
+                formatter: function (value) {
                     if (value == '0') {
                         return '待付款';
                     } else if (value == '101') {
@@ -56,24 +58,6 @@ $(function () {
                 }
             },
             {
-                label: '发货状态',
-                name: 'shippingStatus',
-                index: 'shipping_status',
-                width: 60,
-                formatter: function (value) {
-                    if (value == '0') {
-                        return '未发货';
-                    } else if (value == '1') {
-                        return '已发货';
-                    } else if (value == '2') {
-                        return '已收货';
-                    } else if (value == '4') {
-                        return '退货';
-                    }
-                    return value;
-                }
-            },
-            {
                 label: '付款状态', name: 'payStatus', index: 'pay_status', width: 80,
                 formatter: function (value) {
                     if (value == '0') {
@@ -94,18 +78,34 @@ $(function () {
             {
                 label: '下单时间', name: 'addTime', index: 'add_time', width: 120,
                 formatter: function (value) {
-                    return transDate(value);
+                    return transDate(value, 'yyyy-MM-dd hh:mm:ss');
                 }
             },
             {label: '快递公司', name: 'shippingName', index: 'shipping_name', width: 80},
             {label: '配送单号', name: 'shippingNo', index: 'shipping_No', width: 80},
             {label: '快递费用', name: 'shippingFee', index: 'shipping_fee', width: 80},
             {
-                label: '操作', width: 180, align: 'center', sortable: false, formatter: function (value, col, row) {
+                label: '发货状态', name: 'shippingStatus', index: 'shipping_status', width: 60,
+                formatter: function (value) {
+                    if (value == '0') {
+                        return '未发货';
+                    } else if (value == '1') {
+                        return '已发货';
+                    } else if (value == '2') {
+                        return '已收货';
+                    } else if (value == '4') {
+                        return '退货';
+                    }
+                    return value;
+                }
+            },
+            {
+                label: '操作', width: 210, align: 'center', sortable: false,
+                formatter: function (value, col, row) {
                     let htmlStr = '';
                     if (hasPermission('order:refund')) {
                         if (row.orderStatus == 201 || row.orderStatus == 301 || row.orderStatus == 300) {
-                            htmlStr = '<button class="btn btn-outline btn-danger ivu-btn-small" onclick="vm.refundUpdate(' + row.id + ')"><i class="fa fa-info-circle"></i>&nbsp;取消</button>&nbsp;';
+                            htmlStr = '<button class="btn btn-outline btn-danger" onclick="vm.refundUpdate(' + row.id + ')"><i class="fa fa-times-circle-o"></i>&nbsp;取消</button>&nbsp;';
                         }
                     }
                     htmlStr += '<button class="btn btn-outline btn-info" onclick="vm.lookDetail(' + row.id + ')"><i class="fa fa-info-circle"></i>详情</button>&nbsp;' +
@@ -115,7 +115,7 @@ $(function () {
             }
         ],
         viewrecords: true,
-        height: 385,
+        height: 675,
         rowNum: 10,
         rowList: [10, 30, 50],
         rownumbers: true,
@@ -154,31 +154,51 @@ let vm = new Vue({
             orderType: ''
         },
         refundMoney: 0,
-        shipping: {}
+        shipping: {},
+        logisticsInfo: {
+            tracesList: {},
+            logisticCode: '',
+            shipperCode: ''
+        },
+        orderProcessRecordEntity: ''
     },
     methods: {
         query: function () {
             vm.reload();
         },
-        sendGoods: function (event) {
+        getLogistics: function (event) {
             let id = getSelectedRow();
             if (id == null) {
                 return;
             }
-            $.get("../order/info/" + id, function (r) {
-                vm.order = r.order;
-                if (vm.order.payStatus != 2) {
-                    alert("该订单未付款!");
-                    return;
-                }
-                if (vm.order.orderStatus != 201) {
-                    alert("该订单状态非等待发货!");
+            $.get("../order/getLogistics/" + id, function (r) {
+                if (r.code != 0) {
+                    alert(r.msg);
                     return;
                 }
+                vm.logisticsInfo = r.result;
                 vm.showDiv = 3;
                 vm.title = "快递信息";
             });
         },
+        getProcess: function (event) {
+            let orderSn = getSelectedRowData().orderSn;
+            if (orderSn == null) {
+                return;
+            }
+            $.get("../order/getProcess/" + orderSn, function (r) {
+                if (r.code != 0) {
+                    alert(r.msg);
+                    return;
+                }
+                if (r.orderProcessRecordEntity != null) {
+                    vm.orderProcessRecordEntity = r.orderProcessRecordEntity;
+                    vm.showDiv = 7;
+                }
+
+                alert(orderSn + "暂无清关信息");
+            });
+        },
         confirm: function (event) {
             let id = getSelectedRow();
             if (id == null) {
@@ -238,7 +258,8 @@ let vm = new Vue({
         },
         reload: function (event) {
             vm.showDiv = 1;
-            let page = $("#jqGrid").jqGrid('getGridParam', 'page');
+            // let page = $("#jqGrid").jqGrid('getGridParam', 'page');
+            var page = 1;
             $("#jqGrid").jqGrid('setGridParam', {
                 postData: {
                     'orderSn': vm.q.orderSn,
@@ -329,9 +350,8 @@ let vm = new Vue({
         }
     },
     created: function () {
-        let vue = this;
         $.get("../shipping/queryAll", function (r) {
-            vue.shippings = r.list;
+            vm.shippings = r.list;
         });
     }
 });

+ 1 - 1
kmall-admin/src/main/webapp/js/sys/role.js

@@ -173,7 +173,7 @@ var vm = new Vue({
 
                 //勾选角色所拥有的部门数据权限
                 var deptIds = vm.role.deptIdList;
-                debugger;
+                // debugger;
                 for (var i = 0; i < deptIds.length; i++) {
                     var node = data_ztree.getNodeByParam("deptId", deptIds[i]);
                     data_ztree.checkNode(node, true, false);

+ 12 - 12
kmall-admin/src/main/webapp/js/sys/smslog.js

@@ -4,28 +4,28 @@ $(function () {
         datatype: "json",
         colModel: [
             {label: 'id', name: 'id', index: 'id', key: true, hidden: true},
-            {label: '操作人', name: 'userName', index: 'user_id', width: 80},
-            {label: '发送编号', name: 'sendId', index: 'send_id', width: 80},
-            {label: '发送内容', name: 'content', index: 'content', width: 80},
-            {label: '手机号', name: 'mobile', index: 'mobile', width: 80},
+            {label: '发送人', name: 'userName', index: 'user_name', width: 80},
+            {label: '发送编号', name: 'sendId', index: 'send_id', width: 60},
+            {label: '发送内容', name: 'content', index: 'content', width: 250},
+            {label: '手机号', name: 'mobile', index: 'mobile', width: 50},
             {
-                label: '发送时间', name: 'stime', index: 'stime', width: 100, formatter: function (value) {
+                label: '发送时间', name: 'stime', index: 'stime', width: 60, formatter: function (value) {
                 return transDate(value, 'yyyy-MM-dd hh:mm:ss');
             }
             },
-            {label: '用户签名', name: 'sign', index: 'sign', width: 80},
+            // {label: '用户签名', name: 'sign', index: 'sign', width: 80},
             {
-                label: '发送状态', name: 'sendStatus', index: 'send_status', width: 80, formatter: function (value) {
-                if (value === 0) {
+                label: '发送状态', name: 'sendStatus', index: 'send_status', width: 30, formatter: function (value) {
+                if (value === 1) {
                     return '<span class="label label-success">成功</span>';
                 }
                 return '<span class="label label-danger">失败</span>';
             }
             },
-            {label: '无效号码数', name: 'invalidNum', index: 'invalid_num', width: 80},
-            {label: '成功提交数', name: 'successNum', index: 'success_num', width: 80},
-            {label: '黑名单数', name: 'blackNum', index: 'black_num', width: 80},
-            {label: '返回消息', name: 'returnMsg', index: 'return_msg', width: 100}],
+            // {label: '无效号码数', name: 'invalidNum', index: 'invalid_num', width: 80},
+            // {label: '成功提交数', name: 'successNum', index: 'success_num', width: 80},
+            // {label: '黑名单数', name: 'blackNum', index: 'black_num', width: 80},
+            {label: '返回消息', name: 'returnMsg', index: 'return_msg', width: 60}],
         viewrecords: true,
         height: 385,
         rowNum: 10,

+ 1 - 1
kmall-admin/src/main/webapp/statics/plugins/treegrid/jquery.treegrid.extension.js

@@ -191,7 +191,7 @@
                 error: function (xhr, textStatus) {
                     var _errorMsg = '<tr><td colspan="' + options.columns.length + '"><div style="display: block;text-align: center;">' + xhr.responseText + '</div></td></tr>'
                     tbody.html(_errorMsg);
-                    debugger;
+                    // debugger;
                 },
             });
         }

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 456 - 0
kmall-admin/src/main/webapp/statics/qrcode/jquery.qrcode.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
kmall-admin/src/main/webapp/statics/qrcode/jquery.qrcode.min.js


+ 68 - 0
kmall-admin/src/main/webapp/statics/qrcode/utf.js

@@ -0,0 +1,68 @@
+/* utf.js - UTF-8 <=> UTF-16 convertion
+ *
+ * Copyright (C) 1999 Masanao Izumo <iz@onicos.co.jp>
+ * Version: 1.0
+ * LastModified: Dec 25 1999
+ * This library is free.  You can redistribute it and/or modify it.
+ */
+
+/*
+ * Interfaces:
+ * utf8 = utf16to8(utf16);
+ * utf16 = utf16to8(utf8);
+ */
+
+function utf16to8(str) {
+    var out, i, len, c;
+
+    out = "";
+    len = str.length;
+    for(i = 0; i < len; i++) {
+	c = str.charCodeAt(i);
+	if ((c >= 0x0001) && (c <= 0x007F)) {
+	    out += str.charAt(i);
+	} else if (c > 0x07FF) {
+	    out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
+	    out += String.fromCharCode(0x80 | ((c >>  6) & 0x3F));
+	    out += String.fromCharCode(0x80 | ((c >>  0) & 0x3F));
+	} else {
+	    out += String.fromCharCode(0xC0 | ((c >>  6) & 0x1F));
+	    out += String.fromCharCode(0x80 | ((c >>  0) & 0x3F));
+	}
+    }
+    return out;
+}
+
+function utf8to16(str) {
+    var out, i, len, c;
+    var char2, char3;
+
+    out = "";
+    len = str.length;
+    i = 0;
+    while(i < len) {
+	c = str.charCodeAt(i++);
+	switch(c >> 4)
+	{ 
+	  case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:
+	    // 0xxxxxxx
+	    out += str.charAt(i-1);
+	    break;
+	  case 12: case 13:
+	    // 110x xxxx   10xx xxxx
+	    char2 = str.charCodeAt(i++);
+	    out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));
+	    break;
+	  case 14:
+	    // 1110 xxxx  10xx xxxx  10xx xxxx
+	    char2 = str.charCodeAt(i++);
+	    char3 = str.charCodeAt(i++);
+	    out += String.fromCharCode(((c & 0x0F) << 12) |
+					   ((char2 & 0x3F) << 6) |
+					   ((char3 & 0x3F) << 0));
+	    break;
+	}
+    }
+
+    return out;
+}

+ 5 - 6
kmall-api/src/main/java/com/kmall/api/api/ApiCartController.java

@@ -8,7 +8,6 @@ import com.kmall.api.service.*;
 import com.kmall.api.util.ApiBaseAction;
 import com.kmall.common.utils.MapUtils;
 import com.qiniu.util.StringUtils;
-import com.sun.org.apache.xpath.internal.operations.Bool;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -47,7 +46,7 @@ public class ApiCartController extends ApiBaseAction {
     private ApiUserService apiUserService;
 
     @Autowired
-    private FreightService freightService;
+    private ApiFreightService apiFreightService;
 
     /**
      * 获取购物车中的数据
@@ -567,19 +566,19 @@ public class ApiCartController extends ApiBaseAction {
         //查询运费模板
         for (CartVo vo: checkedGoodsList) {
             if(vo.getGoodsBizType().equalsIgnoreCase(Dict.orderBizType.item_00.getItem())){
-                FreightEntity freightEntity = freightService.queryObjectByGoodsId(vo.getGoods_id());
+                FreightEntity freightEntity = apiFreightService.queryObjectByGoodsId(vo.getGoods_id());
                 freightPrice00 = freightEntity!=null ? freightEntity.getDefaultFreight() : freightPrice00;
             }
             if(vo.getGoodsBizType().equalsIgnoreCase(Dict.orderBizType.item_02.getItem())){
-                FreightEntity freightEntity = freightService.queryObjectByGoodsId(vo.getGoods_id());
+                FreightEntity freightEntity = apiFreightService.queryObjectByGoodsId(vo.getGoods_id());
                 freightPrice02 = freightEntity!=null ? freightEntity.getDefaultFreight() : freightPrice02;
             }
             if(vo.getGoodsBizType().equalsIgnoreCase(Dict.orderBizType.item_10.getItem())){
-                FreightEntity freightEntity = freightService.queryObjectByGoodsId(vo.getGoods_id());
+                FreightEntity freightEntity = apiFreightService.queryObjectByGoodsId(vo.getGoods_id());
                 freightPrice10 = freightEntity!=null ? freightEntity.getDefaultFreight() : freightPrice10;
             }
             if(vo.getGoodsBizType().equalsIgnoreCase(Dict.orderBizType.item_11.getItem())){
-                FreightEntity freightEntity = freightService.queryObjectByGoodsId(vo.getGoods_id());
+                FreightEntity freightEntity = apiFreightService.queryObjectByGoodsId(vo.getGoods_id());
                 freightPrice11 = freightEntity!=null ? freightEntity.getDefaultFreight() : freightPrice11;
             }
 

+ 2 - 3
kmall-api/src/main/java/com/kmall/api/api/ApiGoodsController.java

@@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.net.URLDecoder;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -70,7 +69,7 @@ public class ApiGoodsController extends ApiBaseAction {
     private ApiBrandService apiBrandService;
 
     @Autowired
-    private FreightService freightService;
+    private ApiFreightService apiFreightService;
 
     /**
      */
@@ -205,7 +204,7 @@ public class ApiGoodsController extends ApiBaseAction {
         cartMap.put("goods_id",info.getId());
         List<CartVo> cartVoList = cartService.queryList(cartMap);
 
-        FreightEntity freightEntity = freightService.queryObjectByGoodsId(info.getId());
+        FreightEntity freightEntity = apiFreightService.queryObjectByGoodsId(info.getId());
         //
         resultObj.put("info", info);
 

+ 1 - 1
kmall-api/src/main/java/com/kmall/api/service/FreightService.java → kmall-api/src/main/java/com/kmall/api/service/ApiFreightService.java

@@ -16,7 +16,7 @@ import java.util.Map;
  * @date 2018-10-22 17:20:31
  */
 @Service
-public class FreightService{
+public class ApiFreightService {
     @Autowired
     private FreightMapper freightDao;
 

+ 5 - 7
kmall-api/src/main/java/com/kmall/api/service/ApiOrderService.java

@@ -16,8 +16,6 @@ import com.kmall.common.utils.StringUtils;
 import com.kmall.common.utils.printer.FeiGeUtils;
 import com.kmall.common.utils.wxtemplate.TemplateData;
 import com.kmall.common.utils.wxtemplate.WxTemplate;
-import com.kmall.common.utils.wxtemplate.WxTemplateUtil;
-import io.swagger.models.auth.In;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -56,7 +54,7 @@ public class ApiOrderService {
     @Autowired
     private ApiGoodsMapper apiGoodsMapper;
     @Autowired
-    private FreightService freightService;
+    private ApiFreightService apiFreightService;
     @Autowired
     private OrderProcessRecordMapper orderProcessRecordMapper;
 
@@ -182,22 +180,22 @@ public class ApiOrderService {
         for (CartVo goodsItem : checkedGoodsList) {
             //订单业务类型:00:保税备货, 02:保税展示补货,10:保税展示跨境,11:普通商品
             if(Dict.orderBizType.item_00.getItem().equalsIgnoreCase(goodsItem.getGoodsBizType())){
-                FreightEntity freightEntity = freightService.queryObjectByGoodsId(goodsItem.getGoods_id());
+                FreightEntity freightEntity = apiFreightService.queryObjectByGoodsId(goodsItem.getGoods_id());
                 freightPrice00 =freightEntity!=null ? freightEntity.getDefaultFreight() : freightPrice00;//查询商品运费信息
                 isBizType00 =true;
             }
             if(Dict.orderBizType.item_02.getItem().equalsIgnoreCase(goodsItem.getGoodsBizType())){
-                FreightEntity freightEntity = freightService.queryObjectByGoodsId(goodsItem.getGoods_id());
+                FreightEntity freightEntity = apiFreightService.queryObjectByGoodsId(goodsItem.getGoods_id());
                 freightPrice02 =freightEntity!=null ? freightEntity.getDefaultFreight() : freightPrice02;//查询商品运费信息
                 isBizType02 =true;
             }
             if(Dict.orderBizType.item_10.getItem().equalsIgnoreCase(goodsItem.getGoodsBizType())){
-                FreightEntity freightEntity = freightService.queryObjectByGoodsId(goodsItem.getGoods_id());
+                FreightEntity freightEntity = apiFreightService.queryObjectByGoodsId(goodsItem.getGoods_id());
                 freightPrice10 =freightEntity!=null ? freightEntity.getDefaultFreight() : freightPrice10;//查询商品运费信息
                 isBizType10 =true;
             }
             if(Dict.orderBizType.item_11.getItem().equalsIgnoreCase(goodsItem.getGoodsBizType())){
-                FreightEntity freightEntity = freightService.queryObjectByGoodsId(goodsItem.getGoods_id());
+                FreightEntity freightEntity = apiFreightService.queryObjectByGoodsId(goodsItem.getGoods_id());
                 freightPrice11 =freightEntity!=null ? freightEntity.getDefaultFreight() : freightPrice11;//查询商品运费信息
                 isBizType11 =true;
             }

+ 2 - 233
kmall-api/src/main/java/com/kmall/api/service/express/kdn/ApiKdniaoService.java

@@ -1,250 +1,19 @@
 package com.kmall.api.service.express.kdn;
 
 import com.alibaba.fastjson.JSONObject;
-import com.kmall.common.utils.DateUtils;
+import com.kmall.common.utils.express.kdn.KdniaoUtil;
 import org.springframework.stereotype.Service;
 
-import java.io.*;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.net.URLEncoder;
-import java.security.MessageDigest;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 @Service
 public class ApiKdniaoService {
 
-    //DEMO
-    public static void main(String[] args) {
-        ApiKdniaoService api = new ApiKdniaoService();
-        try {
-            JSONObject result = api.getOrderTracesByJson("EMS", "1171986856515");
-            System.out.print(result);
-
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-
     /**
      * Json方式 查询订单物流轨迹
      *
      * @throws Exception
      */
     public JSONObject getOrderTracesByJson(String expCode, String expNo) {
-
-        JSONObject jsonObject = null;
-        try {
-
-            String requestData = "{'OrderCode':'','ShipperCode':'" + expCode + "','LogisticCode':'" + expNo + "'}";
-
-            Map<String, String> params = new HashMap<String, String>();
-            params.put("RequestData", urlEncoder(requestData, "UTF-8"));
-            //params.put("EBusinessID", ResourceUtil.getConfigByName("kdn.businessId"));
-            params.put("EBusinessID", KdnPropertiesBuilder.instance().getBusinessId());
-            params.put("RequestType", "1002");
-            //String dataSign = encrypt(requestData, ResourceUtil.getConfigByName("kdn.appKey"), "UTF-8");
-            String dataSign = encrypt(requestData, KdnPropertiesBuilder.instance().getAppKey(), "UTF-8");
-            params.put("DataSign", urlEncoder(dataSign, "UTF-8"));
-            params.put("DataType", "2");
-
-            //String result = sendPost(ResourceUtil.getConfigByName("kdn.url"), params);
-            String result = sendPost(KdnPropertiesBuilder.instance().getUrl(), params);
-
-            jsonObject = (JSONObject) JSONObject.parse(result);
-            if (null != jsonObject) {
-                List<Map<String, String>> mapList = (List<Map<String, String>>) jsonObject.get("Traces");
-                //根据轨迹里接收时间排序
-                mapList.sort(new Comparator<Map<String, String>>() {
-                    @Override
-                    public int compare(Map<String, String> o1, Map<String, String> o2) {
-                        if (DateUtils.strToDate(o1.get("AcceptTime")).after(DateUtils.strToDate(o2.get("AcceptTime")))) {
-                            return -1;
-                        }
-                        return 0;
-                    }
-                });
-                jsonObject.put("Traces", mapList);
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return jsonObject;
-    }
-
-    /**
-     * MD5加密
-     *
-     * @param str     内容
-     * @param charset 编码方式
-     * @throws Exception
-     */
-    @SuppressWarnings("unused")
-    private String MD5(String str, String charset) throws Exception {
-        MessageDigest md = MessageDigest.getInstance("MD5");
-        md.update(str.getBytes(charset));
-        byte[] result = md.digest();
-        StringBuffer sb = new StringBuffer(32);
-        for (int i = 0; i < result.length; i++) {
-            int val = result[i] & 0xff;
-            if (val <= 0xf) {
-                sb.append("0");
-            }
-            sb.append(Integer.toHexString(val));
-        }
-        return sb.toString().toLowerCase();
-    }
-
-    /**
-     * base64编码
-     *
-     * @param str     内容
-     * @param charset 编码方式
-     * @throws UnsupportedEncodingException
-     */
-    private String base64(String str, String charset) throws UnsupportedEncodingException {
-        String encoded = base64Encode(str.getBytes(charset));
-        return encoded;
-    }
-
-    @SuppressWarnings("unused")
-    private String urlEncoder(String str, String charset) throws UnsupportedEncodingException {
-        String result = URLEncoder.encode(str, charset);
-        return result;
-    }
-
-    /**
-     * 电商Sign签名生成
-     *
-     * @param content  内容
-     * @param keyValue Appkey
-     * @param charset  编码方式
-     * @return DataSign签名
-     * @throws UnsupportedEncodingException ,Exception
-     */
-    @SuppressWarnings("unused")
-    private String encrypt(String content, String keyValue, String charset) throws UnsupportedEncodingException, Exception {
-        if (keyValue != null) {
-            return base64(MD5(content + keyValue, charset), charset);
-        }
-        return base64(MD5(content, charset), charset);
-    }
-
-    /**
-     * 向指定 URL 发送POST方法的请求
-     *
-     * @param url    发送请求的 URL
-     * @param params 请求的参数集合
-     * @return 远程资源的响应结果
-     */
-    @SuppressWarnings("unused")
-    private String sendPost(String url, Map<String, String> params) {
-        OutputStreamWriter out = null;
-        BufferedReader in = null;
-        StringBuilder result = new StringBuilder();
-        try {
-            URL realUrl = new URL(url);
-            HttpURLConnection conn = (HttpURLConnection) realUrl.openConnection();
-            // 发送POST请求必须设置如下两行
-            conn.setDoOutput(true);
-            conn.setDoInput(true);
-            // POST方法
-            conn.setRequestMethod("POST");
-            // 设置通用的请求属性
-            conn.setRequestProperty("accept", "*/*");
-            conn.setRequestProperty("connection", "Keep-Alive");
-            conn.setRequestProperty("user-agent",
-                    "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
-            conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
-            conn.connect();
-            // 获取URLConnection对象对应的输出流
-            out = new OutputStreamWriter(conn.getOutputStream(), "UTF-8");
-            // 发送请求参数
-            if (params != null) {
-                StringBuilder param = new StringBuilder();
-                for (Map.Entry<String, String> entry : params.entrySet()) {
-                    if (param.length() > 0) {
-                        param.append("&");
-                    }
-                    param.append(entry.getKey());
-                    param.append("=");
-                    param.append(entry.getValue());
-                    //System.out.println(entry.getKey()+":"+entry.getValue());
-                }
-                //System.out.println("param:"+param.toString());
-                out.write(param.toString());
-            }
-            // flush输出流的缓冲
-            out.flush();
-            // 定义BufferedReader输入流来读取URL的响应
-            in = new BufferedReader(
-                    new InputStreamReader(conn.getInputStream(), "UTF-8"));
-            String line;
-            while ((line = in.readLine()) != null) {
-                result.append(line);
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        //使用finally块来关闭输出流、输入流
-        finally {
-            try {
-                if (out != null) {
-                    out.close();
-                }
-                if (in != null) {
-                    in.close();
-                }
-            } catch (IOException ex) {
-                ex.printStackTrace();
-            }
-        }
-        return result.toString();
-    }
-
-
-    private static char[] base64EncodeChars = new char[]{
-            'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
-            'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
-            'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
-            'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
-            'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
-            'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
-            'w', 'x', 'y', 'z', '0', '1', '2', '3',
-            '4', '5', '6', '7', '8', '9', '+', '/'};
-
-    public static String base64Encode(byte[] data) {
-        StringBuffer sb = new StringBuffer();
-        int len = data.length;
-        int i = 0;
-        int b1, b2, b3;
-        while (i < len) {
-            b1 = data[i++] & 0xff;
-            if (i == len) {
-                sb.append(base64EncodeChars[b1 >>> 2]);
-                sb.append(base64EncodeChars[(b1 & 0x3) << 4]);
-                sb.append("==");
-                break;
-            }
-            b2 = data[i++] & 0xff;
-            if (i == len) {
-                sb.append(base64EncodeChars[b1 >>> 2]);
-                sb.append(base64EncodeChars[((b1 & 0x03) << 4) | ((b2 & 0xf0) >>> 4)]);
-                sb.append(base64EncodeChars[(b2 & 0x0f) << 2]);
-                sb.append("=");
-                break;
-            }
-            b3 = data[i++] & 0xff;
-            sb.append(base64EncodeChars[b1 >>> 2]);
-            sb.append(base64EncodeChars[((b1 & 0x03) << 4) | ((b2 & 0xf0) >>> 4)]);
-            sb.append(base64EncodeChars[((b2 & 0x0f) << 2) | ((b3 & 0xc0) >>> 6)]);
-            sb.append(base64EncodeChars[b3 & 0x3f]);
-        }
-        return sb.toString();
+        return KdniaoUtil.getOrderTracesByJson(expCode, expNo);
     }
 
 }

+ 1 - 1
kmall-common/src/main/java/com/kmall/common/Global.java

@@ -26,7 +26,7 @@ public class Global {
     /**
      * 默认密码
      */
-    public static final String DEFAULT_PASS_WORD = "888888";
+    public static final String DEFAULT_PASS_WORD = "111111";
 
     /**
      * 是/否

+ 1 - 1
kmall-api/src/main/java/com/kmall/api/service/express/kdn/KdnDevProperties.java → kmall-common/src/main/java/com/kmall/common/utils/express/kdn/KdnDevProperties.java

@@ -1,4 +1,4 @@
-package com.kmall.api.service.express.kdn;
+package com.kmall.common.utils.express.kdn;
 
 import java.io.Serializable;
 

+ 1 - 1
kmall-api/src/main/java/com/kmall/api/service/express/kdn/KdnProdProperties.java → kmall-common/src/main/java/com/kmall/common/utils/express/kdn/KdnProdProperties.java

@@ -1,4 +1,4 @@
-package com.kmall.api.service.express.kdn;
+package com.kmall.common.utils.express.kdn;
 
 import java.io.Serializable;
 

+ 1 - 1
kmall-api/src/main/java/com/kmall/api/service/express/kdn/KdnProperties.java → kmall-common/src/main/java/com/kmall/common/utils/express/kdn/KdnProperties.java

@@ -1,4 +1,4 @@
-package com.kmall.api.service.express.kdn;
+package com.kmall.common.utils.express.kdn;
 
 import java.io.Serializable;
 

+ 1 - 1
kmall-api/src/main/java/com/kmall/api/service/express/kdn/KdnPropertiesBuilder.java → kmall-common/src/main/java/com/kmall/common/utils/express/kdn/KdnPropertiesBuilder.java

@@ -1,4 +1,4 @@
-package com.kmall.api.service.express.kdn;
+package com.kmall.common.utils.express.kdn;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

+ 1 - 1
kmall-api/src/main/java/com/kmall/api/service/express/kdn/KdnPropertiesConfiguration.java → kmall-common/src/main/java/com/kmall/common/utils/express/kdn/KdnPropertiesConfiguration.java

@@ -1,4 +1,4 @@
-package com.kmall.api.service.express.kdn;
+package com.kmall.common.utils.express.kdn;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;

+ 246 - 0
kmall-common/src/main/java/com/kmall/common/utils/express/kdn/KdniaoUtil.java

@@ -0,0 +1,246 @@
+package com.kmall.common.utils.express.kdn;
+
+import com.alibaba.fastjson.JSONObject;
+import com.kmall.common.utils.DateUtils;
+
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.security.MessageDigest;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class KdniaoUtil {
+
+    //DEMO
+    public static void main(String[] args) {
+        try {
+            JSONObject result = getOrderTracesByJson("EMS", "1171986856515");
+            System.out.print(result);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+
+    /**
+     * Json方式 查询订单物流轨迹
+     *
+     * @throws Exception
+     */
+    public static JSONObject getOrderTracesByJson(String expCode, String expNo) {
+        JSONObject jsonObject = null;
+        try {
+
+            String requestData = "{'OrderCode':'','ShipperCode':'" + expCode + "','LogisticCode':'" + expNo + "'}";
+
+            Map<String, String> params = new HashMap<String, String>();
+            params.put("RequestData", urlEncoder(requestData, "UTF-8"));
+            //params.put("EBusinessID", ResourceUtil.getConfigByName("kdn.businessId"));
+            params.put("EBusinessID", KdnPropertiesBuilder.instance().getBusinessId());
+            params.put("RequestType", "1002");
+            //String dataSign = encrypt(requestData, ResourceUtil.getConfigByName("kdn.appKey"), "UTF-8");
+            String dataSign = encrypt(requestData, KdnPropertiesBuilder.instance().getAppKey(), "UTF-8");
+            params.put("DataSign", urlEncoder(dataSign, "UTF-8"));
+            params.put("DataType", "2");
+
+            //String result = sendPost(ResourceUtil.getConfigByName("kdn.url"), params);
+            String result = sendPost(KdnPropertiesBuilder.instance().getUrl(), params);
+
+            jsonObject = (JSONObject) JSONObject.parse(result);
+            if (null != jsonObject) {
+                List<Map<String, String>> mapList = (List<Map<String, String>>) jsonObject.get("Traces");
+                //根据轨迹里接收时间排序
+                mapList.sort(new Comparator<Map<String, String>>() {
+                    @Override
+                    public int compare(Map<String, String> o1, Map<String, String> o2) {
+                        if (DateUtils.strToDate(o1.get("AcceptTime")).after(DateUtils.strToDate(o2.get("AcceptTime")))) {
+                            return -1;
+                        }
+                        return 0;
+                    }
+                });
+                jsonObject.put("Traces", mapList);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return jsonObject;
+    }
+
+    /**
+     * MD5加密
+     *
+     * @param str     内容
+     * @param charset 编码方式
+     * @throws Exception
+     */
+    @SuppressWarnings("unused")
+    private static String MD5(String str, String charset) throws Exception {
+        MessageDigest md = MessageDigest.getInstance("MD5");
+        md.update(str.getBytes(charset));
+        byte[] result = md.digest();
+        StringBuffer sb = new StringBuffer(32);
+        for (int i = 0; i < result.length; i++) {
+            int val = result[i] & 0xff;
+            if (val <= 0xf) {
+                sb.append("0");
+            }
+            sb.append(Integer.toHexString(val));
+        }
+        return sb.toString().toLowerCase();
+    }
+
+    /**
+     * base64编码
+     *
+     * @param str     内容
+     * @param charset 编码方式
+     * @throws UnsupportedEncodingException
+     */
+    private static String base64(String str, String charset) throws UnsupportedEncodingException {
+        String encoded = base64Encode(str.getBytes(charset));
+        return encoded;
+    }
+
+    @SuppressWarnings("unused")
+    private static String urlEncoder(String str, String charset) throws UnsupportedEncodingException {
+        String result = URLEncoder.encode(str, charset);
+        return result;
+    }
+
+    /**
+     * 电商Sign签名生成
+     *
+     * @param content  内容
+     * @param keyValue Appkey
+     * @param charset  编码方式
+     * @return DataSign签名
+     * @throws UnsupportedEncodingException ,Exception
+     */
+    @SuppressWarnings("unused")
+    private static String encrypt(String content, String keyValue, String charset) throws UnsupportedEncodingException, Exception {
+        if (keyValue != null) {
+            return base64(MD5(content + keyValue, charset), charset);
+        }
+        return base64(MD5(content, charset), charset);
+    }
+
+    /**
+     * 向指定 URL 发送POST方法的请求
+     *
+     * @param url    发送请求的 URL
+     * @param params 请求的参数集合
+     * @return 远程资源的响应结果
+     */
+    @SuppressWarnings("unused")
+    private static String sendPost(String url, Map<String, String> params) {
+        OutputStreamWriter out = null;
+        BufferedReader in = null;
+        StringBuilder result = new StringBuilder();
+        try {
+            URL realUrl = new URL(url);
+            HttpURLConnection conn = (HttpURLConnection) realUrl.openConnection();
+            // 发送POST请求必须设置如下两行
+            conn.setDoOutput(true);
+            conn.setDoInput(true);
+            // POST方法
+            conn.setRequestMethod("POST");
+            // 设置通用的请求属性
+            conn.setRequestProperty("accept", "*/*");
+            conn.setRequestProperty("connection", "Keep-Alive");
+            conn.setRequestProperty("user-agent",
+                    "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
+            conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
+            conn.connect();
+            // 获取URLConnection对象对应的输出流
+            out = new OutputStreamWriter(conn.getOutputStream(), "UTF-8");
+            // 发送请求参数
+            if (params != null) {
+                StringBuilder param = new StringBuilder();
+                for (Map.Entry<String, String> entry : params.entrySet()) {
+                    if (param.length() > 0) {
+                        param.append("&");
+                    }
+                    param.append(entry.getKey());
+                    param.append("=");
+                    param.append(entry.getValue());
+                    //System.out.println(entry.getKey()+":"+entry.getValue());
+                }
+                //System.out.println("param:"+param.toString());
+                out.write(param.toString());
+            }
+            // flush输出流的缓冲
+            out.flush();
+            // 定义BufferedReader输入流来读取URL的响应
+            in = new BufferedReader(
+                    new InputStreamReader(conn.getInputStream(), "UTF-8"));
+            String line;
+            while ((line = in.readLine()) != null) {
+                result.append(line);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        //使用finally块来关闭输出流、输入流
+        finally {
+            try {
+                if (out != null) {
+                    out.close();
+                }
+                if (in != null) {
+                    in.close();
+                }
+            } catch (IOException ex) {
+                ex.printStackTrace();
+            }
+        }
+        return result.toString();
+    }
+
+
+    private static char[] base64EncodeChars = new char[]{
+            'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
+            'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
+            'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
+            'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
+            'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
+            'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
+            'w', 'x', 'y', 'z', '0', '1', '2', '3',
+            '4', '5', '6', '7', '8', '9', '+', '/'};
+
+    public static String base64Encode(byte[] data) {
+        StringBuffer sb = new StringBuffer();
+        int len = data.length;
+        int i = 0;
+        int b1, b2, b3;
+        while (i < len) {
+            b1 = data[i++] & 0xff;
+            if (i == len) {
+                sb.append(base64EncodeChars[b1 >>> 2]);
+                sb.append(base64EncodeChars[(b1 & 0x3) << 4]);
+                sb.append("==");
+                break;
+            }
+            b2 = data[i++] & 0xff;
+            if (i == len) {
+                sb.append(base64EncodeChars[b1 >>> 2]);
+                sb.append(base64EncodeChars[((b1 & 0x03) << 4) | ((b2 & 0xf0) >>> 4)]);
+                sb.append(base64EncodeChars[(b2 & 0x0f) << 2]);
+                sb.append("=");
+                break;
+            }
+            b3 = data[i++] & 0xff;
+            sb.append(base64EncodeChars[b1 >>> 2]);
+            sb.append(base64EncodeChars[((b1 & 0x03) << 4) | ((b2 & 0xf0) >>> 4)]);
+            sb.append(base64EncodeChars[((b2 & 0x0f) << 2) | ((b3 & 0xc0) >>> 6)]);
+            sb.append(base64EncodeChars[b3 & 0x3f]);
+        }
+        return sb.toString();
+    }
+
+}

+ 1 - 1
kmall-common/src/main/resources/mybatis/mapper/SysMenuDao.xml

@@ -44,7 +44,7 @@
 
     <select id="queryList" resultType="com.kmall.common.entity.SysMenuEntity">
         select m.*,(select p.name from sys_menu p where p.menu_id = m.parent_id) as parentName
-        from sys_menu m WHERE 1=1
+        from sys_menu m WHERE 1=1 and m.status = 0
         <if test="menuName != null and menuName.trim() != ''">
             and m.name like concat('%',#{menuName},'%')
         </if>

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

@@ -59,9 +59,9 @@
         sys_sms_log.black_num,
         sys_sms_log.return_msg,
         sys_sms_log.sms_code,
-        sys_user.username user_name
+        mall_user.nickname user_name
         from sys_sms_log
-        LEFT JOIN sys_user ON sys_user.user_id = sys_sms_log.user_id
+        LEFT JOIN mall_user ON mall_user.id = sys_sms_log.user_id
         WHERE 1=1
         <if test="sendId != null and sendId != ''">
             AND sys_sms_log.send_id LIKE concat('%',#{sendId},'%')

+ 1 - 1
sql/kmall_pt.sql

@@ -8438,7 +8438,7 @@ INSERT INTO `sys_menu` VALUES ('209', '207', '新增', null, 'userlevel:save', '
 INSERT INTO `sys_menu` VALUES ('210', '207', '修改', null, 'userlevel:update', '2', null, '6', '0');
 INSERT INTO `sys_menu` VALUES ('211', '207', '删除', null, 'userlevel:delete', '2', null, '6', '0');
 INSERT INTO `sys_menu` VALUES ('222', '0', '商城配置', null, null, '0', 'fa fa-shopping-cart', '2', '0');
-INSERT INTO `sys_menu` VALUES ('223', '222', '商品属性种类', 'shop/attributecategory.html', null, '1', 'fa fa-sun-o', '0', '0');
+--INSERT INTO `sys_menu` VALUES ('223', '222', '商品属性种类', 'shop/attributecategory.html', null, '1', 'fa fa-sun-o', '0', '0');
 INSERT INTO `sys_menu` VALUES ('224', '223', '查看', null, 'attributecategory:list,attributecategory:info', '2', null, '6', '0');
 INSERT INTO `sys_menu` VALUES ('225', '223', '新增', null, 'attributecategory:save', '2', null, '6', '0');
 INSERT INTO `sys_menu` VALUES ('226', '223', '修改', null, 'attributecategory:update', '2', null, '6', '0');

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است