2 Angajamente 811fe050a2 ... 2c995b7c47

Autor SHA1 Permisiunea de a trimite mesaje. Dacă este dezactivată, utilizatorul nu va putea trimite nici un fel de mesaj Data
  BKGin 2c995b7c47 Merge remote-tracking branch 'origin/master' 5 luni în urmă
  BKGin c15f6afc20 [add] 上门取衣 5 luni în urmă

+ 2 - 1
yiqi-admin/src/main/java/com/yiqi/admin/controller/order/OrderClothController.java

@@ -851,8 +851,9 @@ public class OrderClothController extends BaseController {
         orderCloth.setTakeClothAppUserId(Long.parseLong(deliveryId));
         orderCloth.setOrderStatus(ClothOrderStatusType.WAITING_TO_DOOR.getCode());
         // 更新配送员id
-        OrderDelivery orderDelivery = orderDeliveryService.selectOrderDeliveryByOrderId(orderCloth.getOrderNo(), "0");
+        OrderDelivery orderDelivery = orderDeliveryService.selectOrderDeliveryByOrderId(orderCloth.getOrderNo(), ClothOrderDeliveryType.collectCloth.getCode());
         orderDelivery.setDeliveryManId(Long.valueOf(deliveryId));
+        orderDelivery.setDeliveryStatus(OrderDeliveryStatusEnum.CREATE_ORDER_SUCCESS.getCode());
         orderDeliveryService.updateById(orderDelivery);
         return success(orderClothService.updateById(orderCloth));
     }

+ 2 - 2
yiqi-admin/src/main/resources/application.yml

@@ -137,10 +137,10 @@ wx:
     token: token
     encodingAESKey: encodingAESKey
     apiAesSn: XX
-    apiAesKey: XX
+    apiAesKey: +goeHSHQ4oVafMbCC5wDrv5mDvKIVWSU7Lh0lPoq974=
     apiRsaSn: XX
     apiRsaKeyPath: XX
-    apiRsaKey: XX
+    apiRsaKey: MIIEpQIBAAKCAQEAzz+6y/ZH3ZTfpeUmFU5LHrNhdW8WtHWRcTr6mu10Cts++lu3b24wxRJHMdfilqHIGEoSB23Hj2T42exhdZXd1Ye00ibUXDQNCqhcjU4rq41XZh2k1jmtFtnV2SfQvsgjZxIEdtf5iefterbHZCNsNOh+Mb4E/cGyRUtyKtCbbcybSSk3gcYlsDfUjk5R6Vk0lrtDUcMKqVyADOCJ2GWf876VXvn6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VOilWjG1NKfjRGlzQIAmxmCNlO/nH2nLhwaLKCSiUh9rXf9duUqRVk6nQp/flooLY+YH6moC/17/LrT6RMFBFXDC/xu3hMQUCgYEAmtHGZX6PR/nLtmrMBzEkY2d8aDXYhrACzQVA5HrPnd8i64G+Q4lP05jzfFpDgcOaJA7eV2Z8fckNdpECRNRl29w29GvN921g+QHKUdJAi5TktnCPbqjw7z5j28CiWPHg6ksR2lr2iXuJLnidun2zZDn/jzGiNo8tTOYqkDTCeA8=
 
 oss:
   config:

+ 5 - 5
yiqi-api/src/main/java/com/yiqi/api/controller/order/WeAppOrderClothDeliveryManController.java

@@ -146,7 +146,7 @@ public class WeAppOrderClothDeliveryManController {
     }
 
     @Transactional(rollbackFor = Exception.class)
-    @ApiOperation("上门衣")
+    @ApiOperation("上门衣")
     @PostMapping(value = "toDoor")
     public R toDoor(@RequestBody @Valid AppOrderClothDeliveryChangeStatusDTO appOrderClothDeliveryChangeStatusDTO) throws Exception {
         OrderCloth orderCloth = orderClothService.getOne(new QueryWrapper<OrderCloth>().lambda()
@@ -164,7 +164,7 @@ public class WeAppOrderClothDeliveryManController {
                 .set(OrderCloth::getOrderStatus, ClothOrderStatusType.HAS_TO_DOOR.getCode())
                 .eq(OrderCloth::getId, appOrderClothDeliveryChangeStatusDTO.getOrderId()));
         //更新配送订单
-        OrderDelivery orderDelivery = orderDeliveryService.selectOrderDeliveryByOrderId(orderCloth.getOrderNo(), "1");
+        OrderDelivery orderDelivery = orderDeliveryService.selectOrderDeliveryByOrderId(orderCloth.getOrderNo(), ClothOrderDeliveryType.collectCloth.getCode());
         orderDelivery.setDeliveryStatus(OrderDeliveryStatusEnum.HAS_TO_DOOR.getCode());
         orderDelivery.setFetchTime(DateUtils.getNowDate());
         orderDeliveryService.updateById(orderDelivery);
@@ -192,7 +192,7 @@ public class WeAppOrderClothDeliveryManController {
                 .eq(OrderCloth::getId, appOrderClothDeliveryChangeStatusDTO.getOrderId()));
 
         //更新配送订单
-        OrderDelivery orderDelivery = orderDeliveryService.selectOrderDeliveryByOrderId(orderCloth.getOrderNo(), "1");
+        OrderDelivery orderDelivery = orderDeliveryService.selectOrderDeliveryByOrderId(orderCloth.getOrderNo(), ClothOrderDeliveryType.collectCloth.getCode());
         orderDelivery.setDeliveryStatus(OrderDeliveryStatusEnum.SEND_FINISH.getCode());
         orderDelivery.setFinishTime(DateUtils.getNowDate());
         orderDeliveryService.updateById(orderDelivery);
@@ -221,7 +221,7 @@ public class WeAppOrderClothDeliveryManController {
                 .eq(OrderCloth::getId, appOrderClothDeliveryChangeStatusDTO.getOrderId()));
 
         //更新配送订单
-        OrderDelivery orderDelivery = orderDeliveryService.selectOrderDeliveryByOrderId(orderCloth.getOrderNo(), "2");
+        OrderDelivery orderDelivery = orderDeliveryService.selectOrderDeliveryByOrderId(orderCloth.getOrderNo(), ClothOrderDeliveryType.takeCloth.getCode());
         orderDelivery.setDeliveryStatus(OrderDeliveryStatusEnum.SENDING.getCode());
         orderDelivery.setFetchTime(DateUtils.getNowDate());
         orderDeliveryService.updateById(orderDelivery);
@@ -250,7 +250,7 @@ public class WeAppOrderClothDeliveryManController {
                 .eq(OrderCloth::getId, appOrderClothDeliveryChangeStatusDTO.getOrderId()));
 
         //更新配送订单
-        OrderDelivery orderDelivery = orderDeliveryService.selectOrderDeliveryByOrderId(orderCloth.getOrderNo(), "2");
+        OrderDelivery orderDelivery = orderDeliveryService.selectOrderDeliveryByOrderId(orderCloth.getOrderNo(), ClothOrderDeliveryType.takeCloth.getCode());
         orderDelivery.setDeliveryStatus(OrderDeliveryStatusEnum.SEND_FINISH.getCode());
         orderDelivery.setFinishTime(DateUtils.getNowDate());
         orderDeliveryService.updateById(orderDelivery);

+ 6 - 1
yiqi-core/src/main/java/com/yiqi/core/service/impl/SysStoreIntracityExpressServiceImpl.java

@@ -14,6 +14,7 @@ import com.yiqi.core.service.ISysStoreIntracityExpressService;
 import com.yiqi.order.domain.OrderClothDeliveryAddress;
 import com.yiqi.system.domain.SysStore;
 import com.yiqi.system.service.ISysStoreService;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -23,6 +24,7 @@ import java.util.logging.Logger;
  * @author xiaohei
  * @date 2024/1/31
  */
+@Slf4j
 @Service
 public class SysStoreIntracityExpressServiceImpl implements ISysStoreIntracityExpressService {
 
@@ -167,7 +169,9 @@ public class SysStoreIntracityExpressServiceImpl implements ISysStoreIntracityEx
     private String httpPost(String url, String body) throws Exception {
         JsonObject reqforsign = AES_Enc.getReqForSign(WxAppApiAESSecretDTO.build(url, wxMaProperties)
                 , JSONObject.parseObject(body));
-        HttpResponse response = HttpRequest.post(url + "?access_token=" + compositeWxMaService.getWxapp().getAccessToken())
+        String accessToken = compositeWxMaService.get().getAccessToken();
+        log.info("WX请求: {}, {}", accessToken, body);
+        HttpResponse response = HttpRequest.post(url + "?access_token=" + accessToken)
                 .header("Wechatmp-Appid", wxMaProperties.getAppid())
                 .header("Wechatmp-TimeStamp", reqforsign.get("req_ts").getAsString())
                 .header("Wechatmp-Signature", RSA_Sign.getSignature(WxAppApiRSASecretDTO.build(url, wxMaProperties), reqforsign))
@@ -176,6 +180,7 @@ public class SysStoreIntracityExpressServiceImpl implements ISysStoreIntracityEx
                 .execute();
         String respData = AES_Dec.getRealResp(WxAppApiAESSecretDTO.build(url, wxMaProperties)
                 , Integer.parseInt(response.header("Wechatmp-TimeStamp")), response.body());
+        log.info("WX请求返回: {}, {}", response.body(), respData);
         return respData;
     }