Bladeren bron

bug修复

qng 3 jaren geleden
bovenliggende
commit
f949e406e9

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

@@ -1065,7 +1065,6 @@ public class OrderController {
             tax = tax.add(goodsTax).setScale(2,RoundingMode.HALF_UP);
 //            BigDecimal goodsTax = retailPrice.divide(new BigDecimal(1).add(goodsRate),2,RoundingMode.HALF_DOWN).multiply(goodsRate).multiply(new BigDecimal(number)).setScale(0,RoundingMode.HALF_DOWN);
         }*/
-        String response = null;
 
 //        try {
 //            // 查询失败原因
@@ -1081,7 +1080,7 @@ public class OrderController {
         result.put("orderEntity",orderEntity);
         result.put("goodsList",goodsList);
         result.put("tax",tax.setScale(2, RoundingMode.HALF_DOWN).toString());
-        result.put("response",response);
+        result.put("response",orderProcessRecordEntity.getClearMsg());
 
         return R.ok().put("resultObj", result);
     }

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

@@ -1163,7 +1163,7 @@ public class GoodsServiceImpl implements GoodsService {
             if (brandId == null) {
                 Map<String, String> brandCacheData = new HashMap<>();
                 // 数据库里面查询
-                BrandEntity queryBrand = brandService.queryByUniqueIdentifier(uniqueIdentifier);
+                BrandEntity queryBrand = brandService.queryByUniqueIdentifier(uniqueIdentifier.trim());
                 if (queryBrand == null) {
                     throw new RuntimeException("该品牌不存在,请检查品牌唯一标识符是否正确:"+uniqueIdentifier);
                 } else {
@@ -1178,18 +1178,9 @@ public class GoodsServiceImpl implements GoodsService {
         }else{
             Map<String, String> brandCacheData = new HashMap<>();
             // 数据库里面查询
-            BrandEntity queryBrand = brandService.queryByUniqueIdentifier(uniqueIdentifier);
+            BrandEntity queryBrand = brandService.queryByUniqueIdentifier(uniqueIdentifier.trim());
             if (queryBrand == null) {
-                BrandEntity brandEntity = new BrandEntity();
-                brandEntity.setName(brandName);
-                brandEntity.setUniqueIdentifier(uniqueIdentifier);
-                brandEntity.setSimpleDesc(brandName);
-                brandEntity.setIsShow(1);
-                brandEntity.setIsNew(0);
-                brandService.save(brandEntity);
-                brandCacheData.put("brandId", brandEntity.getId() + "");
-                brandCacheData.put("brandName", brandName);
-                goodsEntity.setBrandId(brandEntity.getId());
+                throw new RuntimeException("该品牌不存在,请检查品牌唯一标识符是否正确:"+uniqueIdentifier);
             } else {
                 brandCacheData.put("brandId", queryBrand.getId() + "");
                 brandCacheData.put("brandName", queryBrand.getName());

+ 3 - 4
kmall-admin/src/main/java/com/kmall/admin/service/impl/ProductStoreRelaServiceImpl.java

@@ -1,6 +1,5 @@
 package com.kmall.admin.service.impl;
 
-import com.alibaba.fastjson.JSON;
 import com.google.common.collect.ImmutableBiMap;
 import com.google.common.collect.Maps;
 import com.kmall.admin.dao.*;
@@ -923,7 +922,7 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
                 StoreEntity store = storeDao.queryObjectByName(storeGoodsDto.getStoreName().trim());
                 storeRelaEntity.setExitRegionNumber(storeGoodsDto.getExitRegionNumber());
                 storeRelaEntity.setStoreId(store.getId());
-                GoodsEntity goodsEntity = goodsDao.queryObjectBySnNew(storeGoodsDto.getGoodsSn());
+                GoodsEntity goodsEntity = goodsDao.queryObjectBySnNew(storeGoodsDto.getGoodsSn().trim());
                 if (goodsEntity != null) {
                     storeRelaEntity.setGoodsId(goodsEntity.getId());
                 }else{
@@ -1005,7 +1004,7 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
             if (brandId == null) {
                 Map<String, String> brandCacheData = new HashMap<>();
                 // 数据库里面查询
-                BrandEntity queryBrand = brandService.queryByUniqueIdentifier(uniqueIdentifier);
+                BrandEntity queryBrand = brandService.queryByUniqueIdentifier(uniqueIdentifier.trim());
                 if (queryBrand == null) {
                     throw new RuntimeException("该品牌不存在,请检查品牌唯一标识符是否正确:"+uniqueIdentifier);
                 } else {
@@ -1020,7 +1019,7 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
         }else{
             Map<String, String> brandCacheData = new HashMap<>();
             // 数据库里面查询
-            BrandEntity queryBrand = brandService.queryByUniqueIdentifier(uniqueIdentifier);
+            BrandEntity queryBrand = brandService.queryByUniqueIdentifier(uniqueIdentifier.trim());
             if (queryBrand == null) {
                 throw new RuntimeException("该品牌不存在,请检查品牌唯一标识符是否正确:"+uniqueIdentifier);
             } else {

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

@@ -95,6 +95,7 @@
 		`shipment_succ_time`,
 		`process_content`,
 		`customs_send_sms_status`,
+		customs_msg as clearMsg,
 		r.`tstm`,
 		o.ali_trade_no as pay_transaction_id
 		from mall_order_process_record r inner join mall_order o on r.order_sn = o.order_sn

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

@@ -426,7 +426,7 @@
                                 <div class="col-md-3" id="pickUpCodeSn">小票码: {{orderEntity.pickUpCodeSn}}</div>
                             </div>
                             <div class="row" style="border:0">
-                                <div class="col-md-12" id="invetoryReceipt">失败原因: {{response}}</div>
+                                <div class="col-md-12" id="invetoryReceipt">清关结果: {{response}}</div>
                             </div>
                             <table id="goodsDetailTable" class="table .table-striped" style="margin-top: 50px;">
                                 <tr style="border: white;background-color: orange">