Ver código fonte

支付修改

hyq 6 anos atrás
pai
commit
9f9688e243

+ 1 - 0
kmall-admin/src/main/java/com/kmall/admin/service/impl/CategoryServiceImpl.java

@@ -103,6 +103,7 @@ public class CategoryServiceImpl implements CategoryService {
                     for (CategoryEntity categoryEntity : categoryEntityList) {
                         map.clear();
                         map.put("categoryId", categoryEntity.getId());
+                        map.put("isDelete", Dict.isDelete.item_1.getItem());
                         List<GoodsEntity> goodsEntityList = goodsDao.queryList(map);
                         if (goodsEntityList != null) {
                             goodsTotal += goodsEntityList.size();

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

@@ -156,7 +156,7 @@ public class GoodsServiceImpl implements GoodsService {
         map.put("goodsBizType", goods.getGoodsBizType());
         List<GoodsEntity> list = querySame(map);
         if (list != null && list.size() != 0) {
-            throw new RRException("已存在该商品编码或该货品业务类型下已存在此SKU!");
+            throw new RRException("已存在该商品编码或该货品业务类型下已存在此SKU!");
         }
 
         // 添加商品
@@ -298,7 +298,7 @@ public class GoodsServiceImpl implements GoodsService {
         map.put("id", goods.getId());
         List<GoodsEntity> list = querySame(map);
         if (list != null && list.size() != 0) {
-            throw new RRException("已存在该商品编码或该货品业务类型下已存在此SKU!");
+            throw new RRException("已存在该商品编码或该货品业务类型下已存在此SKU!");
         }
 
         // 修改商品

+ 5 - 6
kmall-admin/src/main/resources/conf/wx-global.properties

@@ -6,9 +6,9 @@ pay.wx.global.env = dev
 
 #========== 开发环境 ==========
 #小程序ID
-wx.global.dev.appId=wxb6b30b1b14ee502a
+wx.global.dev.appId=wx59c05dcbb3ef2f36
 #小程序密钥
-wx.global.dev.secret=be0234dbbbde4ce68df43dd2b5e4c7b1
+wx.global.dev.secret=bb4029cd5149cbe5975bc14a99feaa9d
 #商户号
 wx.global.dev.mchId=103106626
 #支付签名
@@ -44,11 +44,10 @@ wx.global.dev.spbillCreateIp=127.0.0.1
 
 
 #========== 生产环境 ==========
-
 #小程序ID
-wx.global.prod.appId=wxb6b30b1b14ee502a
+wx.global.prod.appId=wx59c05dcbb3ef2f36
 #小程序密钥
-wx.global.prod.secret=be0234dbbbde4ce68df43dd2b5e4c7b1
+wx.global.prod.secret=bb4029cd5149cbe5975bc14a99feaa9d
 #商户号
 wx.global.prod.mchId=103106626
 #支付签名
@@ -58,7 +57,7 @@ wx.global.prod.tradeType=JSAPI
 #商户币种
 wx.global.prod.feeType=CNY
 #证书名称,对应不同的商户号
-wx.global.prod.certName=/cert/apiclient_cert.p12
+wx.global.prod.certName=/app/project/kmall_pt_global/cert/apiclient_cert.p12
 #支付回调地址
 wx.global.prod.notifyUrl=https://mp.k1net.cn/api/global/pay/notify
 #获取code的请求地址

+ 1 - 1
kmall-admin/src/main/resources/conf/wx-mp.properties

@@ -57,7 +57,7 @@ wx.prod.paySignKey=Zx1245uytDLliom12345622222222222
 #交易类型
 wx.prod.tradeType=JSAPI
 #证书名称,对应不同的商户号
-wx.prod.certName=/cert/apiclient_cert.p12
+wx.prod.certName=/app/project/kmall_pt/cert/apiclient_cert.p12
 #支付回调地址
 wx.prod.notifyUrl=https://mp.k1net.cn/api/pay/notify
 #获取code的请求地址

+ 2 - 2
kmall-admin/src/main/webapp/WEB-INF/page/shop/category.html

@@ -33,12 +33,12 @@
         <p slot="title">{{title}}</p>
         <i-form ref="formValidate" :model="category" :rules="ruleValidate" :label-width="100">
             <Form-item label="商户" prop="merchSn">
-                <i-select v-model="category.merchSn" filterable placeholder="商户" @on-change="getStoresByMerch" label-in-value>
+                <i-select v-model="category.merchSn" placeholder="商户" @on-change="getStoresByMerch" label-in-value>
                     <i-option v-for="merch in merchList" :value="merch.merchSn" :key="merch.merchSn">{{merch.merchName}}</i-option>
                 </i-select>
             </Form-item>
             <Form-item label="门店" prop="storeId">
-                <i-select v-model="category.storeId" filterable placeholder="门店" label-in-value>
+                <i-select v-model="category.storeId" placeholder="门店" label-in-value>
                     <i-option v-for="store in storeList" :value="store.id" :key="store.id">{{store.storeName}}</i-option>
                 </i-select>
             </Form-item>

+ 5 - 0
kmall-admin/src/main/webapp/js/shop/attribute.js

@@ -77,6 +77,11 @@ var vm = new Vue({
             }
             vm.showList = false;
             vm.title = "修改";
+            vm.attribute = {};
+            vm.attribute = { sortOrder: '' };
+            vm.categories = [];
+            vm.storeList = [];
+            vm.merchList = [];
 
             vm.getInfo(id);
             vm.getMerchList();

+ 1 - 0
kmall-admin/src/main/webapp/js/shop/attributecategory.js

@@ -73,6 +73,7 @@ var vm = new Vue({
             }
             vm.showList = false;
             vm.title = "修改";
+            vm.attributeCategory = {enabled: '1'};
 
             vm.getInfo(id)
         },

+ 3 - 0
kmall-admin/src/main/webapp/js/shop/brand.js

@@ -122,6 +122,9 @@ var vm = new Vue({
             }
             vm.showList = false;
             vm.title = "修改";
+            vm.brand = {listPicUrl: '', picUrl: '', appListPicUrl: '', newPicUrl: '', isShow: 1, isNew: 0};
+            vm.storeList = [];
+            vm.merchList = [];
 
             vm.getInfo(id);
             vm.getMerchList();

+ 3 - 0
kmall-admin/src/main/webapp/js/shop/category.js

@@ -118,6 +118,9 @@ var vm = new Vue({
             }
             vm.showList = false;
             vm.title = "修改";
+            vm.category = {isShow: 1, type: 0, level: 'L1', bannerUrl: '', iconUrl: '', imgUrl: '', wapBannerUrl: ''};
+            vm.storeList = [];
+            vm.merchList = [];
             vm.getInfo(id[0].id);
             vm.getMerchList();
             vm.getStoresByMerch();

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

@@ -166,6 +166,24 @@ let vm = new Vue({
             }
             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
+            }];
+            vm.storeList = [];
+            vm.merchList = [];
             vm.getInfo(id)
             vm.getMerchList();
             vm.getStoresByMerch();

+ 12 - 12
kmall-api/src/main/java/com/kmall/api/api/ApiPayController.java

@@ -117,20 +117,20 @@ public class ApiPayController extends ApiBaseAction {
             String randomStr = CharUtil.getRandomNum(18).toUpperCase();
             parame.put("nonce_str", randomStr);// 随机字符串
             parame.put("out_trade_no", merchOrderSn);// 商户订单编号
-            parame.put("body", "商城-支付");// 商品描述
+            parame.put("body", "中网跨境商城-支付");// 商品描述
 
             //订单的商品
-            List<OrderGoodsVo> orderGoods = orderGoodsService.queryListByIds(orderIdList);
-            if (null != orderGoods) {
-                String body = "商城-";
-                for (OrderGoodsVo goodsVo : orderGoods) {
-                    body = body + goodsVo.getGoods_name() + "、";
-                }
-                if (body.length() > 0) {
-                    body = body.substring(0, body.length() - 1);
-                }
-                parame.put("body", body);// 商品描述
-            }
+//            List<OrderGoodsVo> orderGoods = orderGoodsService.queryListByIds(orderIdList);
+//            if (null != orderGoods) {
+//                String body = "商城-";
+//                for (OrderGoodsVo goodsVo : orderGoods) {
+//                    body = body + goodsVo.getGoods_name() + "、";
+//                }
+//                if (body.length() > 0) {
+//                    body = body.substring(0, body.length() - 1);
+//                }
+//                parame.put("body", body);// 商品描述
+//            }
             //支付金额
 //            parame.put("total_fee", orderInfo.getActual_price().multiply(Constant.ONE_HUNDRED).intValue()));//todo 消费金额
             parame.put("total_fee", actual_price.multiply(Constant.ONE_HUNDRED).intValue());// 消费金额

+ 2 - 1
kmall-api/src/main/java/com/kmall/api/util/CommonUtil.java

@@ -92,7 +92,8 @@ public class CommonUtil {
         Calendar cal = Calendar.getInstance();
         cal.setTime(new Date());
         String timeStr = DateUtils.format(cal.getTime(), DateUtils.DATE_TIME_PATTERN_YYYY_MM_DD);
-        return timeStr + CharUtil.getRandomNum(4);
+//        return timeStr + CharUtil.getRandomNum(6);
+        return CharUtil.getRandomNum(8);
     }
 
     public static String getSha1(String str) {

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

@@ -112,7 +112,7 @@ public class WechatGlobalUtil {
         if(StringUtils.isNotEmpty(body)) {
             param.put("body", body);// 商品描述
         }else{
-            param.put("body", "商城-支付");// 商品描述
+            param.put("body", "中网跨境商城-支付");// 商品描述
         }
         param.put("out_trade_no", out_trade_no);// 商户订单编号
         //支付金额

+ 2 - 2
kmall-schedule/src/main/resources/mybatis/mapper/QzOrderMapper.xml

@@ -133,9 +133,9 @@
         and shipping_status ='1' and a.order_biz_type in(10,02) AND r.customs_succ_time <![CDATA[ <  ]]>  DATE_ADD(now(),INTERVAL -7 DAY)  AND a.is_onffline_order = 0
     </select>
     <select id="queryShipmentBondedOrderList" resultType="map">
-        SELECT a.order_sn,a.order_status,a.pay_status,a.id 'orderId',a.merch_order_sn,date_format(r.shipment_succ_time,'%Y-%m-%d %H:%i:%s') as shipment_succ_time
+        SELECT a.order_sn,a.order_status,a.pay_status,a.id 'orderId',a.merch_order_sn,date_format(r.shipment_start_time,'%Y-%m-%d %H:%i:%s') as shipment_start_time
         FROM `mall_order` a inner join mall_order_process_record r on a.order_sn=r.order_sn where order_status='300' and shipping_status ='1'
-        and a.order_biz_type in(00,11) AND r.shipment_succ_time <![CDATA[ <  ]]>  DATE_ADD(now(),INTERVAL -7 DAY)  AND a.is_onffline_order = 0
+        and a.order_biz_type in(00,11) AND r.shipment_start_time <![CDATA[ <  ]]>  DATE_ADD(now(),INTERVAL -7 DAY)  AND a.is_onffline_order = 0
     </select>
 
     <update id="updateShipmentOrder" parameterType="map">

+ 16 - 6
wx-mall/pages/catalog/catalog.js

@@ -60,16 +60,25 @@ Page({
   getCatalog: function () {
     //CatalogList
     let that = this;
-    util.request(api.CatalogList).then(function (res) {
-      if (that.data.currentCategory && that.data.currentCategory.id > 0) {
-        that.setData({
-          navList: res.data.categoryList,
-        });
-      } else {
+    
+    util.request(api.CatalogList).then(function (res) { 
+      if (!wx.getStorageSync('currentCategory')) {
         that.setData({
           navList: res.data.categoryList,
           currentCategory: res.data.currentCategory
         });
+        wx.setStorageSync('currentCategory', res.data.currentCategory);
+      } else {
+        if (that.data.currentCategory && that.data.currentCategory.id > 0) {
+          that.setData({
+            navList: res.data.categoryList
+          });
+        } else {
+          that.setData({
+            navList: res.data.categoryList,
+            currentCategory: res.data.currentCategory
+          });
+        }
       }
       that.getCategoryData();
     });
@@ -86,6 +95,7 @@ Page({
         that.setData({
           currentCategory: res.data.currentCategory
         });
+        console.log(that.data.currentCategory);
         that.getGoodsList();
       });
   },

+ 2 - 2
wx-mall/pages/goods/goods.js

@@ -76,7 +76,6 @@ Page({
           defaultFreight: res.data.defaultFreight,
           checkedSpecText: res.data.specificationList[0].valueList[0].value
         });
-        wx.hideLoading();
 
         if (res.data.userHasCollect == 1) {
           that.setData({
@@ -105,7 +104,8 @@ Page({
         that.setData({
           'specificationList': _specificationList
         });
-      }
+        }
+        wx.hideLoading();
     });
     if (null != that.data.referrer && that.data.referrer > 0) {
       util.request(api.GoodsTransferCoupon, {

+ 15 - 8
wx-mall/pages/map/map.js

@@ -112,7 +112,11 @@ Page({
     let that = this;
     util.request(api.ChooseStoreId, { storeId: storeId, merchSn: merchSn }, 'POST').then(function (res) {
       if (res.errno === 0) {
+        wx.removeStorageSync('nearStoreList');
+        wx.removeStorageSync('storeId');
+        wx.removeStorageSync('storeVo');
         wx.setStorageSync('storeId', storeId);
+        wx.removeStorageSync('currentCategory');
         var item = "";
         for (var i = 0; i < that.data.nearStoreList.length; i++) {
           if (storeId == that.data.nearStoreList[i].id) {
@@ -122,9 +126,9 @@ Page({
           }
         }
 
-        var pages = getCurrentPages();
-        var currPage = pages[pages.length - 1];  //当前页面
-        var prevPage = pages[pages.length - 2]; //上一个页面
+        // var pages = getCurrentPages();
+        // var currPage = pages[pages.length - 1];  //当前页面
+        // var prevPage = pages[pages.length - 2]; //上一个页面
         if (item == "") {
           wx.removeStorageSync('nearStoreList');
           wx.removeStorageSync('storeId');
@@ -134,15 +138,18 @@ Page({
           })
         } else {
           //直接调用上一个页面的setData()方法,把数据存到上一个页面中去
-          prevPage.setData({
+          that.setData({
             storeName: item.storeName
           })
         }
+        wx.switchTab({
+          url: '/pages/index/index'
+        });
 
-        prevPage.getIndexData();
-        prevPage.enableActivity();
-        prevPage.getGroupData();
-        wx.navigateBack()
+        // prevPage.getIndexData();
+        // prevPage.enableActivity();
+        // prevPage.getGroupData();
+        // wx.navigateBack()
       }
     })
   }

+ 4 - 4
wx-mall/pages/shopping/checkout/checkout.js

@@ -164,10 +164,10 @@ Page({
           goodsTotalByType02: num02,
           goodsTotalByType10: num10,
           goodsTotalByType11: num11,
-          goodsTotalPrice00: goodsTotalPrice00 + that.data.freightPrice00,
-          goodsTotalPrice02: goodsTotalPrice02 + that.data.freightPrice02,
-          goodsTotalPrice10: goodsTotalPrice10 + that.data.freightPrice10,
-          goodsTotalPrice11: goodsTotalPrice11 + that.data.freightPrice11
+          goodsTotalPrice00: (goodsTotalPrice00 + that.data.freightPrice00).toFixed(2),
+          goodsTotalPrice02: (goodsTotalPrice02 + that.data.freightPrice02).toFixed(2),
+          goodsTotalPrice10: (goodsTotalPrice10 + that.data.freightPrice10).toFixed(2),
+          goodsTotalPrice11: (goodsTotalPrice11 + that.data.freightPrice11).toFixed(2)
         });
         // console.log(that.data.goodsTotalByType00);
         // console.log(that.data.goodsTotalByType02);