Browse Source

菜鸟代码提交

master
HY 1 month ago
parent
commit
6d1561d9fc
9 changed files with 86 additions and 2 deletions
  1. +1
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
  2. +6
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/controller/OrderController.java
  3. +13
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/req/QueryLogisticsReq.java
  4. +7
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/service/IOrderService.java
  5. +39
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/service/impl/OrderServiceImpl.java
  6. BIN
      jeecg-boot-module-system/src/main/resources/appkey-251828_EXTERNAL_18806.jar
  7. +8
    -1
      jeecg-boot-module-system/src/main/resources/application-dev.yml
  8. +7
    -1
      jeecg-boot-module-system/src/main/resources/application-prod.yml
  9. +5
    -0
      pom.xml

+ 1
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java View File

@ -72,6 +72,7 @@ public class ShiroConfig {
}
}
filterChainDefinitionMap.put("/order/query/logistics", "anon");//分类接口
filterChainDefinitionMap.put("/conf/one", "anon");//分类接口
filterChainDefinitionMap.put("/category/list", "anon");//分类接口
filterChainDefinitionMap.put("/goods/page", "anon");//商品分页接口


+ 6
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/controller/OrderController.java View File

@ -160,4 +160,10 @@ public class OrderController {
}
@ApiOperation(value = "查询物流")
@PostMapping("/query/logistics")
public Result<?> queryLogistics(QueryLogisticsReq queryLogisticsReq){
return orderService.queryLogistics(queryLogisticsReq);
}
}

+ 13
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/req/QueryLogisticsReq.java View File

@ -0,0 +1,13 @@
package org.jeecg.modules.xcx.order.req;
import lombok.Data;
@Data
public class QueryLogisticsReq {
private String token;
private String id;
}

+ 7
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/service/IOrderService.java View File

@ -204,4 +204,11 @@ public interface IOrderService {
* @return
*/
Result<?> editLeaseNum(EditLeaseNumReq editLeaseNumReq);
/**
* 查询物流
* @param queryLogisticsReq
* @return
*/
Result<?> queryLogistics(QueryLogisticsReq queryLogisticsReq);
}

+ 39
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/service/impl/OrderServiceImpl.java View File

@ -8,8 +8,18 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.conditions.query.QueryChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cainiao.link.consumer.LinkClient;
import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult;
import com.github.binarywang.wxpay.constant.WxPayErrorCode;
import com.taobao.pac.sdk.cp.dataobject.request.GUOGUO_QUERY_LOGISTICS_DETAIL.GuoguoQueryLogisticsDetailRequest;
import com.taobao.pac.sdk.cp.dataobject.request.GUOGUO_QUERY_LOGISTICS_DETAIL.LogisticsDetailOption;
import com.taobao.pac.sdk.cp.dataobject.request.GUOGUO_QUERY_LOGISTICS_DETAIL.LogisticsDetailRequest;
import com.taobao.pac.sdk.cp.dataobject.request.GUOGUO_QUERY_SEND_ORDER_FULL_DETAIL.AccessOption;
import com.taobao.pac.sdk.cp.dataobject.request.GUOGUO_QUERY_SEND_ORDER_FULL_DETAIL.GuoguoCancelSendOrderRequest;
import com.taobao.pac.sdk.cp.dataobject.request.GUOGUO_QUERY_SEND_ORDER_FULL_DETAIL.QueryOrderConditionDTO;
import com.taobao.pac.sdk.cp.dataobject.response.GUOGUO_QUERY_LOGISTICS_DETAIL.GuoguoQueryLogisticsDetailResponse;
import com.taobao.pac.sdk.cp.dataobject.response.GUOGUO_QUERY_SEND_ORDER_FULL_DETAIL.GuoguoCreateSendOrderResponse;
import com.taobao.pac.sdk.cp.dataobject.response.GUOGUO_QUERY_SEND_ORDER_FULL_DETAIL.LogisticsDetailDTO;
import com.wechat.pay.contrib.apache.httpclient.auth.AutoUpdateCertificatesVerifier;
import com.wechat.pay.contrib.apache.httpclient.auth.PrivateKeySigner;
import com.wechat.pay.contrib.apache.httpclient.auth.WechatPay2Credentials;
@ -128,6 +138,14 @@ public class OrderServiceImpl implements IOrderService {
private String serialNo;
@Value("${weixin.apiV3Key}")
private String apiV3Key;
@Value("${cainiao.appKey}")
private String appKey;
@Value("${cainiao.appSecret}")
private String appSecret;
@Value("${cainiao.accountId}")
private String accountId;
@Value("${cainiao.accessCode}")
private String accessCode;
@Resource
private IHotelOrderLogService hotelOrderLogService;
@Resource
@ -3771,6 +3789,27 @@ public class OrderServiceImpl implements IOrderService {
return Result.OK();
}
@Override
public Result<?> queryLogistics(QueryLogisticsReq queryLogisticsReq) {
//通过 LinkClient Builder 构造一个 LinkClient
com.cainiao.link.consumer.LinkClient linkClient = LinkClient.builder(appKey, appSecret).build();
GuoguoQueryLogisticsDetailRequest request = new GuoguoQueryLogisticsDetailRequest();
LogisticsDetailRequest logisticsDetailRequest = new LogisticsDetailRequest();
logisticsDetailRequest.setTdOrderId(15592780860652417L);
LogisticsDetailOption logisticsDetailOption = new LogisticsDetailOption();
logisticsDetailOption.setAccessCode(accessCode);
logisticsDetailOption.setAccessMethod("LINK");
request.setRequest(logisticsDetailRequest);
request.setOption(logisticsDetailOption);
GuoguoQueryLogisticsDetailResponse response = linkClient.execute(request, accountId, accessCode);
log.info("包裹返回信息:"+response.toString());
return null;
}
public Object testPay(String id){
HotelOrder hotelOrder = hotelOrderService.lambdaQuery()
.eq(HotelOrder::getDelFlag, 0)


BIN
jeecg-boot-module-system/src/main/resources/appkey-251828_EXTERNAL_18806.jar View File


+ 8
- 1
jeecg-boot-module-system/src/main/resources/application-dev.yml View File

@ -339,4 +339,11 @@ weixin:
mchKey: 0fdb77429ffdf206c151af76a663041c
serialNo: 617767B5F6790AA85EEDED28F82599AAF4830FB9
apiV3Key: 0fdb77429ffdf206c151af76a663041c
keyPemPath: apiclient_key.pem
keyPemPath: apiclient_key.pem
cainiao:
appKey: 251828
appSecret: 62Fyi41Yx047wbg7M2sL0SltPM25fsq8
accountId: 2218798171581
accessCode: d53a04398f95bf6ed4984bc444caf696

+ 7
- 1
jeecg-boot-module-system/src/main/resources/application-prod.yml View File

@ -334,4 +334,10 @@ weixin:
mpAppId: wxad5b3d20a75974c0
mpAppSecret: 3b60a80c8e673986dd42f3cd6f2cf6b1
orderNotifyUrl: https://admin.buzhoudao.com/hotel/order/notify
replaceOrderNotifyUrl: https://admin.buzhoudao.com/hotel/order/replace/notify
replaceOrderNotifyUrl: https://admin.buzhoudao.com/hotel/order/replace/notify
cainiao:
appKey: 251828
appSecret: 62Fyi41Yx047wbg7M2sL0SltPM25fsq8
accountId: 2218798171581
accessCode:

+ 5
- 0
pom.xml View File

@ -338,6 +338,11 @@
<artifactId>wechatpay-apache-httpclient</artifactId>
<version>${wechatpay-apache-httpclientd.version}</version>
</dependency>
<dependency>
<groupId>pac.sdk</groupId>
<artifactId>pac-sdk-cp</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</dependencyManagement>


Loading…
Cancel
Save