commit e2693dbfdc32886ea628d98cf6221ed79873a265 Author: ljl Date: Fri Oct 27 18:30:09 2023 +0800 yh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..46c144a --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +/target/ +/classes +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/build/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +.DS_Store + +*.log +logs + +*.rdb + +target/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..586c365 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# SPI测试 +curl --location --request POST 'localhost:8080/base/cloud/spi' \ +--header 'x-tt-logid: 123456789' \ +--header 'Content-Type: application/json' \ +--data-raw '{ +"appId":"7264840234423027259", +"authId":"4463798", +"method":"getProductInfo", +"data":"{\"sourceItemUrls\":[\"http://detail.1688.com/offer/1000090775.html?amug_web_biz=fwmkt&amug_web_fl_src=cy&entranceCode=entrance_pft\"]}" +}' + + +注意:data中得json要反斜杠 diff --git a/lib/doudian-sdk-java-1.1.0-20230914091533.jar b/lib/doudian-sdk-java-1.1.0-20230914091533.jar new file mode 100644 index 0000000..216e59a Binary files /dev/null and b/lib/doudian-sdk-java-1.1.0-20230914091533.jar differ diff --git a/lib/doudian-sdk-java-1.1.0-20231027170318.jar b/lib/doudian-sdk-java-1.1.0-20231027170318.jar new file mode 100644 index 0000000..dcc6471 Binary files /dev/null and b/lib/doudian-sdk-java-1.1.0-20231027170318.jar differ diff --git a/ms-api/pom.xml b/ms-api/pom.xml new file mode 100644 index 0000000..9a3d017 --- /dev/null +++ b/ms-api/pom.xml @@ -0,0 +1,33 @@ + + + + com.jinritemai.cloud + ms-parent + 1.0.0-SNAPSHOT + + 4.0.0 + + ms-api + ms-api + + + + org.slf4j + slf4j-api + + + org.projectlombok + lombok + + + org.elasticsearch + elasticsearch-core + 7.10.2 + compile + + + + + \ No newline at end of file diff --git a/ms-api/src/main/java/com/ms/api/dto/ItemDTO.java b/ms-api/src/main/java/com/ms/api/dto/ItemDTO.java new file mode 100644 index 0000000..95ae9f0 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/ItemDTO.java @@ -0,0 +1,16 @@ +package com.ms.api.dto; + +import lombok.Data; + +/** + * author hahafeng + * created_at 2022/7/10 1:01 上午 + */ +@Data +public class ItemDTO { + private String title; + private Integer price; + private Integer start; + private Integer end; + private Integer length; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/auth/CheckDsAppAuthExpireRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/auth/CheckDsAppAuthExpireRequestDTO.java new file mode 100644 index 0000000..14508ce --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/auth/CheckDsAppAuthExpireRequestDTO.java @@ -0,0 +1,27 @@ +package com.ms.api.dto.auth; + +import lombok.Data; + +import java.util.List; + +/* + * 检查店铺授权1688分销采购账户授权是否过期 请求参数 + */ +@Data +public class CheckDsAppAuthExpireRequestDTO { + + /* + * 抖店店铺id + */ + private List userIds; + + /** + * 1688账户id + */ + private String memberId; + + /** + * 授权码 + */ + private String authCode; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/auth/GetAuthInfosRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/auth/GetAuthInfosRequestDTO.java new file mode 100644 index 0000000..0866617 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/auth/GetAuthInfosRequestDTO.java @@ -0,0 +1,8 @@ +package com.ms.api.dto.auth; + +public class GetAuthInfosRequestDTO { + /* + * 抖店店铺id + */ + private String shopId; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/auth/GetAuthShopMemberInfosRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/auth/GetAuthShopMemberInfosRequestDTO.java new file mode 100644 index 0000000..bb683f7 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/auth/GetAuthShopMemberInfosRequestDTO.java @@ -0,0 +1,18 @@ +package com.ms.api.dto.auth; + +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/* + * 获取抖店店铺绑定的1688账户 请求参数 + */ +@Data +public class GetAuthShopMemberInfosRequestDTO { + + /* + * 抖店店铺id + */ + private String shopId; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/auth/GetPlatformAuthUrlRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/auth/GetPlatformAuthUrlRequestDTO.java new file mode 100644 index 0000000..ba3d518 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/auth/GetPlatformAuthUrlRequestDTO.java @@ -0,0 +1,18 @@ +package com.ms.api.dto.auth; + +import lombok.Data; + +import java.util.List; + +/* + * 获取授权1688地址 请求参数 + */ +@Data +public class GetPlatformAuthUrlRequestDTO { + + /** + * 抖店店铺id + */ + private String userId; + +} diff --git a/ms-api/src/main/java/com/ms/api/dto/auth/MemberAuthCallBackRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/auth/MemberAuthCallBackRequestDTO.java new file mode 100644 index 0000000..6300fef --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/auth/MemberAuthCallBackRequestDTO.java @@ -0,0 +1,30 @@ +package com.ms.api.dto.auth; + +import lombok.Data; + +/* + * 获取授权1688授权回调地址 请求参数 + */ +@Data +public class MemberAuthCallBackRequestDTO { + /** + * 店铺ID + */ + private String userId; + + /** + * 1688会员ID + */ + private String cnaliMemberId; + + private String authCode; + + /** + * 过期时间 + */ + private String gmtMemberExpireTime; + + private String url; + + private String body; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/auth/PlatformAuthCallBackRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/auth/PlatformAuthCallBackRequestDTO.java new file mode 100644 index 0000000..e04eb90 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/auth/PlatformAuthCallBackRequestDTO.java @@ -0,0 +1,24 @@ +package com.ms.api.dto.auth; + +import lombok.Data; + +/* + * 获取授权1688授权回调地址 请求参数 + */ +@Data +public class PlatformAuthCallBackRequestDTO { + /** + * 店铺ID + */ + private String userId; + + /** + * 1688会员ID + */ + private String cnaliMemberId; + + /** + * 过期时间 + */ + private String gmtMemberExpireTime; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/request/BatchAddPurchaseConfirmLogRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/BatchAddPurchaseConfirmLogRequestDTO.java new file mode 100644 index 0000000..68fc7ec --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/BatchAddPurchaseConfirmLogRequestDTO.java @@ -0,0 +1,14 @@ +package com.ms.api.dto.dsapi.request; + +import lombok.Data; + +import java.util.List; + +@Data +public class BatchAddPurchaseConfirmLogRequestDTO { + private String userId; + private String purchaseSource; + private String platform; + private OperateInfoDTO operateInfo; + private List platformOrders; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/request/BatchCreateDistributionOrdersRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/BatchCreateDistributionOrdersRequestDTO.java new file mode 100644 index 0000000..69ce308 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/BatchCreateDistributionOrdersRequestDTO.java @@ -0,0 +1,35 @@ +package com.ms.api.dto.dsapi.request; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +@Data +public class BatchCreateDistributionOrdersRequestDTO { + private List platformOrders; + private boolean isRepurchase; + private String actionSource; + private String purchaseSource; + private HashMap platformOrderIdAndPurchaseConfirmLogIdMap; + private Integer isAutoPay; + private String platform; + private OperateInfoDTO operateInfo; + + public List getOrderIds() { + List orderIds = new ArrayList<>(); + for (PlatformOrderDTO platformOrder: getPlatformOrders()) { + orderIds.add(platformOrder.getPlatformOrderId()); + } + return orderIds; + } + + public List getAllItems() { + List items = new ArrayList<>(); + for (PlatformOrderDTO platformOrder: getPlatformOrders()) { + items.addAll(platformOrder.getItems()); + } + return items; + } +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/request/CanclePurchaseOrderRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/CanclePurchaseOrderRequestDTO.java new file mode 100644 index 0000000..dcea3e5 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/CanclePurchaseOrderRequestDTO.java @@ -0,0 +1,14 @@ +package com.ms.api.dto.dsapi.request; + +import lombok.Data; + +import java.util.List; + +@Data +public class CanclePurchaseOrderRequestDTO { + private String orderId; + private String purchaseOrderSn; + private String purchasePlatform; + private List skuIds; + private String actionSource; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/request/ClosePurchaseOrderRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/ClosePurchaseOrderRequestDTO.java new file mode 100644 index 0000000..8054d1d --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/ClosePurchaseOrderRequestDTO.java @@ -0,0 +1,9 @@ +package com.ms.api.dto.dsapi.request; + +import lombok.Data; + +@Data +public class ClosePurchaseOrderRequestDTO { + private String orderId; + private String purchaseOrderSn; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/request/ConsigneeInfoDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/ConsigneeInfoDTO.java new file mode 100644 index 0000000..852c525 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/ConsigneeInfoDTO.java @@ -0,0 +1,26 @@ +package com.ms.api.dto.dsapi.request; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class ConsigneeInfoDTO { + private String fullname; + private String telephone; + private String mobile; + private Integer provinceAreaId; + private String province; + private Integer cityAreaId; + private String city; + private Integer countyAreaId; + private String county; + private Integer townAreaId; + private String town; + private String address; + private String fullAddress; + private Boolean hasHide = true; + private List hasDecryptFields = new ArrayList<>(); + private Boolean isManualInput = false; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/request/EncryptOutOrderInfoDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/EncryptOutOrderInfoDTO.java new file mode 100644 index 0000000..151cbb5 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/EncryptOutOrderInfoDTO.java @@ -0,0 +1,14 @@ +package com.ms.api.dto.dsapi.request; + +import lombok.Data; + +@Data +public class EncryptOutOrderInfoDTO { + private Boolean encryptOrder; + private String outPlatformCode; + private String outPlatformOrderNo; + private String outPlatformAppkey; + private String encryptReceiverName; + private String encryptReceiverMobile; + private String encryptReceiverAddress; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/request/GetPurchaseOrderItemsAndSourceItemsRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/GetPurchaseOrderItemsAndSourceItemsRequestDTO.java new file mode 100644 index 0000000..5ac3938 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/GetPurchaseOrderItemsAndSourceItemsRequestDTO.java @@ -0,0 +1,13 @@ +package com.ms.api.dto.dsapi.request; + +import lombok.Data; + +import java.util.List; + +@Data +public class GetPurchaseOrderItemsAndSourceItemsRequestDTO { + private List shopIds; + private String platform; + private List platformItemIds; + private List platformOrderIds; +} \ No newline at end of file diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/request/OperateInfoDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/OperateInfoDTO.java new file mode 100644 index 0000000..1e202db --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/OperateInfoDTO.java @@ -0,0 +1,13 @@ +package com.ms.api.dto.dsapi.request; + +import lombok.Data; + +@Data +public class OperateInfoDTO { + private String userId; + private String ip; + + public OperateInfoDTO(String userId) { + this.userId = userId; + } +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/request/PlatformOrderDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/PlatformOrderDTO.java new file mode 100644 index 0000000..3e318a2 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/PlatformOrderDTO.java @@ -0,0 +1,18 @@ +package com.ms.api.dto.dsapi.request; + +import lombok.Data; + +import java.util.List; + +@Data +public class PlatformOrderDTO { + private String userId; + private String platformOrderId; + private String shopId; + private ConsigneeInfoDTO consigneeInfo; + private String buyerRemark; + private EncryptOutOrderInfoDTO encryptOutOrderInfo; + private List items; + private String sourceOrderBuyerRemark; + private String sourceOrderSellerMemo; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/request/PlatformOrderItemDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/PlatformOrderItemDTO.java new file mode 100644 index 0000000..0acc132 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/PlatformOrderItemDTO.java @@ -0,0 +1,23 @@ +package com.ms.api.dto.dsapi.request; + +import com.alibaba.fastjson.annotation.JSONField; +import com.ms.api.util.DoubleValueSerializer; +import lombok.Data; + +@Data +public class PlatformOrderItemDTO { + private String sourceItemId; + private String specId; + private Long sourceSkuId; + private String platformItemId; + private String platformOrderId; + private Integer itemTotal; + + @JSONField(serializeUsing = DoubleValueSerializer.class) + private Double jxhyPrice; + + private Boolean isJxhyOffer; + private String instanceCode; + private String platformSkuSubName; + private Long platformSkuId; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/request/SavePlatformManualSelectedSkuRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/SavePlatformManualSelectedSkuRequestDTO.java new file mode 100644 index 0000000..c966a9c --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/request/SavePlatformManualSelectedSkuRequestDTO.java @@ -0,0 +1,14 @@ +package com.ms.api.dto.dsapi.request; + +import lombok.Data; + +@Data +public class SavePlatformManualSelectedSkuRequestDTO { + private String userId; + private String platform; + private String platformItemId; + private String platformSkuId; + private String sourceSkuId; + private String sourceItemId; + private OperateInfoDTO operateInfo; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/response/BatchAddDsPurchaseConfirmLogResponseDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/BatchAddDsPurchaseConfirmLogResponseDTO.java new file mode 100644 index 0000000..b3fa254 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/BatchAddDsPurchaseConfirmLogResponseDTO.java @@ -0,0 +1,10 @@ +package com.ms.api.dto.dsapi.response; + +import lombok.Data; + +import java.util.HashMap; + +@Data +public class BatchAddDsPurchaseConfirmLogResponseDTO extends CommonResponseDTO { + HashMap platformOrderIdAndPurchaseConfirmLogIdMap; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/response/BatchCreateDistributionOrdersResponseDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/BatchCreateDistributionOrdersResponseDTO.java new file mode 100644 index 0000000..8d93dc7 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/BatchCreateDistributionOrdersResponseDTO.java @@ -0,0 +1,13 @@ +package com.ms.api.dto.dsapi.response; + +import lombok.Data; + +import java.util.List; + +@Data +public class BatchCreateDistributionOrdersResponseDTO extends CommonResponseDTO { + private Integer successCount; + private Integer failCount; + private List successList; + private List errorList; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/response/CommonResponseDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/CommonResponseDTO.java new file mode 100644 index 0000000..aa8d88c --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/CommonResponseDTO.java @@ -0,0 +1,23 @@ +package com.ms.api.dto.dsapi.response; + +import com.alibaba.fastjson.annotation.JSONField; +import lombok.Data; + +@Data +public class CommonResponseDTO { + @JSONField(name = "code") + protected String code; + + @JSONField(name = "message") + protected String message; + + @JSONField(name = "result") + protected String result; + + @JSONField(name = "reason") + protected String reason; + + public boolean isSuccess() { + return "success".equals(result); + } +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/response/DsErrorRetDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/DsErrorRetDTO.java new file mode 100644 index 0000000..5765806 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/DsErrorRetDTO.java @@ -0,0 +1,15 @@ +package com.ms.api.dto.dsapi.response; + +import lombok.Data; + +@Data +public class DsErrorRetDTO { + private Integer isEncryptOrder; + private Integer isSupportEncryptOrder; + private String platformOrderId; + private String[] platformSkuIds; + private String result; + private String code; + private String reason; + private String message; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/response/DsPayRetDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/DsPayRetDTO.java new file mode 100644 index 0000000..b042b00 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/DsPayRetDTO.java @@ -0,0 +1,11 @@ +package com.ms.api.dto.dsapi.response; + +import lombok.Data; + +@Data +public class DsPayRetDTO { + private String result; + private String code; + private String reason; + private String message; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/response/DsSuccessRetDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/DsSuccessRetDTO.java new file mode 100644 index 0000000..29258b0 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/DsSuccessRetDTO.java @@ -0,0 +1,25 @@ +package com.ms.api.dto.dsapi.response; + +import com.ms.api.dto.dsorder.PurchaseOrderDTO; +import lombok.Data; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Data +public class DsSuccessRetDTO { + private String platformOrderId; + private String result; + private String reason; + private String code; + private String message; + private Integer createAlibabaOrderLogId; + private Integer isEncryptOrder; + private Integer isUseManualConsignee; + private String flow; + private Boolean includeSplitJxhy; + private Map memoRet; + private HashMap payRet; + private List relatePurchaseOrderInfos; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/response/GetPlatformAuthUrlResponseDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/GetPlatformAuthUrlResponseDTO.java new file mode 100644 index 0000000..3c831a5 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/GetPlatformAuthUrlResponseDTO.java @@ -0,0 +1,10 @@ +package com.ms.api.dto.dsapi.response; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +@EqualsAndHashCode(callSuper = true) +@Data +public class GetPlatformAuthUrlResponseDTO extends CommonResponseDTO{ + private String redirectUrl; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/response/GetPlatformShopPurchaseSettingResponseDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/GetPlatformShopPurchaseSettingResponseDTO.java new file mode 100644 index 0000000..3f7b3ec --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/GetPlatformShopPurchaseSettingResponseDTO.java @@ -0,0 +1,8 @@ +package com.ms.api.dto.dsapi.response; + +import lombok.Data; + +@Data +public class GetPlatformShopPurchaseSettingResponseDTO extends CommonResponseDTO { + private PlatformShopPurchaseSettingDTO purchaseSetting; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/response/GetPurchaseOrderItemsAndSourceItemsResponseDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/GetPurchaseOrderItemsAndSourceItemsResponseDTO.java new file mode 100644 index 0000000..680bdf6 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/GetPurchaseOrderItemsAndSourceItemsResponseDTO.java @@ -0,0 +1,176 @@ +package com.ms.api.dto.dsapi.response; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +@Data +public class GetPurchaseOrderItemsAndSourceItemsResponseDTO extends CommonResponseDTO { + private Map sourceItemIdAndProductInfoMap; + private Map sourceItemIdAndProductApiRetMap; + private Map>> platformItemIdAndSourceItemSkuRelationMap; + private Map> platformOrderIdAndPurchaseOrderItemsMap; + private Map> platformOrderIdAndPurchaseOrdersMap; + private Map platformItemIdAndSourceItemInfoMap; + + + @Data + public static class ProductInfo implements Serializable { + private Long sourceItemId; + private String productType; + private String categoryName; + private String status; + private String title; + private String productUrl; + private List images; + private String instanceCode; + private Integer isJxhyOffer; + private String sellerLoginId; + private Long sellerId; + private String resourceOwner; + private List skus; + private EncryptLogisticsOrderSupportChannel encryptLogisticsOrderSupportChannel; + private Map platformSkuIdAndSourceSkuInfoMap; + private Map platformSkuIdAndSourceSkuIdMap; + } + + @Data + public static class Sku implements Serializable { + private Long sourceSkuId; + private String specId; + private Double retailPrice; + private Double price; + private Double consignPrice; + private String img; + private String skuSubName; + private Long sourceItemId; + private Integer stock; + private String instanceCode; + private Integer isJxhyOffer; + private Double jxhyPrice; + } + + @Data + public static class SourceItemSkuRelation implements Serializable { + private Integer moveProductManualSourceSkuRelationId; + private Integer moveProductManualSourceId; + private Long platformSkuId; + private Long sourceSkuId; + private Integer sourceNum; + private String confirmNumRatio; + private String gmtCreate; + private String gmtModified; + private Long platformItemId; + private Long sourceItemId; + } + + @Data + public static class PurchaseOrderItem implements Serializable { + private Long purchaseOrderItemId; + private Long purchaseOrderId; + private Long sourceOrderId; + private Long productId; + private Long skuId; + private String memberId; + private String productImgUrl; + private String statusStr; + private String refundStatus; + private String productSnapshotUrl; + private Double itemAmount; + private Double price; + private Long subItemId; + private String specId; + private String weight; + private String quantity; + private String subItemIdString; + private String unit; + private Integer quantityFactor; + private String name; + private Integer logisticsStatus; + private Double refund; + private String status; + private String weightUnit; + private String skuSubName; + private String gmtCreate; + private String gmtModified; + private String platformOrderId; + private Long platformItemId; + private Long platformSkuId; + private String flow; + private String refundStatusText; + private String statusText; + } + + @Data + public static class PurchaseOrder implements Serializable { + private Long purchaseOrderId; + private String sourceOrderId; + private String memberId; + private String payTime; + private Double discount; + private String buyerLevel; + private Double sumProductPayment; + private String buyerFeedback; + private Integer sellerOrder; + private String buyerLoginId; + private String modifyTime; + private String subBuyerLoginId; + private String completeTime; + private String sellerLoginId; + private String buyerId; + private String closeOperateType; + private Double totalAmount; + private Double shippingFee; + private String sellerId; + private String buyerUserId; + private Double refund; + private String status; + private Double refundPayment; + private Double couponFee; + private String refundStatus; + private String remark; + private String confirmedTime; + private String tradeType; + private String receivingTime; + private String idOfStr; + private String refundStatusForAs; + private String sellerUserId; + private String createTime; + private String refundId; + private String tradeTypeDesc; + private String tradeTypeCode; + private String waybill; + private Long logisticsId; + private String logisticsName; + private String alibabaLogisticsIds; + private String toFullNameMd5; + private String toMobileMd5; + private String toFullNameS; + private String toMobileS; + private String filterIsTown; + private String filterItemCount; + private String filterItemTotal; + private String sellerNote; + private String platformPushStatus; + private String purchaseSource; + private String exceptionType; + private String oldExceptionType; + private String gmtCreate; + private String gmtModified; + private String duplicateSmd5; + } + + @Data + public static class SourceItemInfo implements Serializable { + private ProductInfo productInfo; + private Long sourceItemId; + private CommonResponseDTO productApiRet; + } + + @Data + public static class EncryptLogisticsOrderSupportChannel implements Serializable { + private List supportChannels; + } +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/response/GetPurchaseOrderPayUrlResponseDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/GetPurchaseOrderPayUrlResponseDTO.java new file mode 100644 index 0000000..923745d --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/GetPurchaseOrderPayUrlResponseDTO.java @@ -0,0 +1,8 @@ +package com.ms.api.dto.dsapi.response; + +import lombok.Data; + +@Data +public class GetPurchaseOrderPayUrlResponseDTO extends CommonResponseDTO{ + private String payUrl; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/response/PlatformShopPurchaseSettingDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/PlatformShopPurchaseSettingDTO.java new file mode 100644 index 0000000..ed45709 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/PlatformShopPurchaseSettingDTO.java @@ -0,0 +1,21 @@ +package com.ms.api.dto.dsapi.response; + +import lombok.Data; + +import java.util.HashMap; + +@Data +public class PlatformShopPurchaseSettingDTO { + private Integer platformShopId; + private Integer isEncryptDsOrder; + private String encryptDsOrderType; + private Integer isEncryptDsOrderIfSellerSupport; + private HashMap allowDsEncryptOrderSourceSellers; + private String operateMemberId; + private String operateIp; + private String operateSource; + private String operateRequestId; + private String operateUserId; + private String gmtCreate; + private String gmtModified; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsapi/response/SellerInfoDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/SellerInfoDTO.java new file mode 100644 index 0000000..e7a4d14 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsapi/response/SellerInfoDTO.java @@ -0,0 +1,9 @@ +package com.ms.api.dto.dsapi.response; + +import lombok.Data; + +@Data +public class SellerInfoDTO { + private String sellerIdMd5; + private String sellerName; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsorder/AllowDsEncryptOrderSourceSellerDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsorder/AllowDsEncryptOrderSourceSellerDTO.java new file mode 100644 index 0000000..d04648f --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsorder/AllowDsEncryptOrderSourceSellerDTO.java @@ -0,0 +1,9 @@ +package com.ms.api.dto.dsorder; + +import lombok.Data; + +@Data +public class AllowDsEncryptOrderSourceSellerDTO { + private String sellerName; + private String sellerIdMd5; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsorder/AppendVenderRemarkTplItemDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsorder/AppendVenderRemarkTplItemDTO.java new file mode 100644 index 0000000..e06c9c4 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsorder/AppendVenderRemarkTplItemDTO.java @@ -0,0 +1,16 @@ +package com.ms.api.dto.dsorder; + +import lombok.Data; + +@Data +public class AppendVenderRemarkTplItemDTO { + private String type; + private String name; + private String content; + + public AppendVenderRemarkTplItemDTO(String type, String name, String content) { + this.type = type; + this.name = name; + this.content = content; + } +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsorder/DeliverInfoDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsorder/DeliverInfoDTO.java new file mode 100644 index 0000000..a8be9ab --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsorder/DeliverInfoDTO.java @@ -0,0 +1,11 @@ +package com.ms.api.dto.dsorder; + +import lombok.Data; + +@Data +public class DeliverInfoDTO { + private String logisticsName; + private Integer logisticsId; + private String companyCode; + private String waybillCode; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsorder/DsMessageCallbackDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsorder/DsMessageCallbackDTO.java new file mode 100644 index 0000000..4e18f3d --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsorder/DsMessageCallbackDTO.java @@ -0,0 +1,12 @@ +package com.ms.api.dto.dsorder; + +import lombok.Data; + +@Data +public class DsMessageCallbackDTO { + private Long shopId; + private String bizType; + private String bizId; + private String data; + private Long platformPushMsgId; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsorder/DsMessageCallbackRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsorder/DsMessageCallbackRequestDTO.java new file mode 100644 index 0000000..fce36ca --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsorder/DsMessageCallbackRequestDTO.java @@ -0,0 +1,9 @@ +package com.ms.api.dto.dsorder; + +import lombok.Data; + +@Data +public class DsMessageCallbackRequestDTO { + private String url; + private String body; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsorder/DsMessageDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsorder/DsMessageDTO.java new file mode 100644 index 0000000..81f1d3c --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsorder/DsMessageDTO.java @@ -0,0 +1,9 @@ +package com.ms.api.dto.dsorder; + +import lombok.Data; + +@Data +public class DsMessageDTO { + private String bizType; + private String gmtMessageCreate; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsorder/GetDsPurchaseOrderPayUrlRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsorder/GetDsPurchaseOrderPayUrlRequestDTO.java new file mode 100644 index 0000000..d07005d --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsorder/GetDsPurchaseOrderPayUrlRequestDTO.java @@ -0,0 +1,11 @@ +package com.ms.api.dto.dsorder; + +import lombok.Data; + +import java.util.List; + +@Data +public class GetDsPurchaseOrderPayUrlRequestDTO { + private List orderIds; + private List sourceOrderIds; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsorder/GetSourceSkuInfosRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsorder/GetSourceSkuInfosRequestDTO.java new file mode 100644 index 0000000..c4cfe95 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsorder/GetSourceSkuInfosRequestDTO.java @@ -0,0 +1,10 @@ +package com.ms.api.dto.dsorder; + +import lombok.Data; + +import java.util.List; + +@Data +public class GetSourceSkuInfosRequestDTO { + private List orderItems; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsorder/OrderItemDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsorder/OrderItemDTO.java new file mode 100644 index 0000000..547ce5a --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsorder/OrderItemDTO.java @@ -0,0 +1,11 @@ +package com.ms.api.dto.dsorder; + +import lombok.Data; + +@Data +public class OrderItemDTO { + private String orderId; + private String wareId; + private String skuId; + private String isPurchase; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsorder/OrderPackageInfoDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsorder/OrderPackageInfoDTO.java new file mode 100644 index 0000000..0ae09a1 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsorder/OrderPackageInfoDTO.java @@ -0,0 +1,14 @@ +package com.ms.api.dto.dsorder; + +import com.ms.api.dto.order.OrderMultiPackageOutstorageDTO; +import lombok.Data; + +import java.util.List; + +@Data +public class OrderPackageInfoDTO { + private DeliverInfoDTO deliveryInfo; + private List packageList; + private boolean hasMultiPackageOutstorage; + private boolean hasAfterSaleChildOrder; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsorder/PurchaseOrderCancelMessageDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsorder/PurchaseOrderCancelMessageDTO.java new file mode 100644 index 0000000..fa5252e --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsorder/PurchaseOrderCancelMessageDTO.java @@ -0,0 +1,32 @@ +package com.ms.api.dto.dsorder; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +@Data +public class PurchaseOrderCancelMessageDTO extends DsMessageDTO { + private String skuId; + private List items; + + @Data + public static class Item implements Serializable { + private Long purchaseOrderItemToPlatformOrderItemId; + private String memberId; + private Long platformShopId; + private String platformOrderId; + private Long platformItemId; + private Long platformSkuId; + private String sourceOrderId; + private Long sourceSkuId; + private Long sourceItemId; + private String actionSource; + private Integer isJxhyOffer; + private Long createPurchaseOrderLogId; + private String purchaseSource; + private String flow; + private String gmtCreate; + private String gmtModified; + } +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsorder/PurchaseOrderChangeMessageDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsorder/PurchaseOrderChangeMessageDTO.java new file mode 100644 index 0000000..ca66e4b --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsorder/PurchaseOrderChangeMessageDTO.java @@ -0,0 +1,8 @@ +package com.ms.api.dto.dsorder; + +import lombok.Data; + +@Data +public class PurchaseOrderChangeMessageDTO extends DsMessageDTO { + private PurchaseOrderDTO purchaseOrderInfo; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsorder/PurchaseOrderDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsorder/PurchaseOrderDTO.java new file mode 100644 index 0000000..30f9e30 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsorder/PurchaseOrderDTO.java @@ -0,0 +1,57 @@ +package com.ms.api.dto.dsorder; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Data +public class PurchaseOrderDTO { + private Long purchaseOrderId; + private String platformOrderId; + private String purchasePlatform; + private String purchaseOrderSn; + private String purchaseOrderBuyer; + private String purchaseOrderSeller; + private String purchaseOrderPayment; + private String purchaseOrderFullname; + private String purchaseOrderMobile; + private String purchaseOrderFullAddress; + private String purchaseOrderStartTime; + private String platformPushStatus; + private String purchaseOrderLogisticsName; + private String purchaseOrderWaybillCode; + private String purchaseOrderStatus; + private String purchaseOrderFlow; + private String alibabaOrderStatus; + private Boolean isUseManualConsignee; + private List items; + private String checkReason; + private String checkStatus; + private Integer logisticsIsAccept; + private String purchaseOrderSendTime; + private Boolean isFirstPurchase = false; + private String purchaseAlipayMerchantNo; + private Integer isDsEncryptOrder; + private Integer isSupportEncryptOrder; + private List mergePurchasePlatformOrderIds; + private String notFirst1688OrderType; + + public List getSkuIds() { + List skuIds = new ArrayList<>(); + for (PurchaseOrderItemDTO item: this.items) { + skuIds.add(item.getSkuId()); + } + return skuIds; + } + + public Map getSkuIdAndItemMap() { + Map skuIdAndItemMap = new HashMap<>(); + for (PurchaseOrderItemDTO item: this.items) { + skuIdAndItemMap.put(item.getSkuId(), item); + } + return skuIdAndItemMap; + } +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsorder/PurchaseOrderItemDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsorder/PurchaseOrderItemDTO.java new file mode 100644 index 0000000..c536c71 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsorder/PurchaseOrderItemDTO.java @@ -0,0 +1,14 @@ +package com.ms.api.dto.dsorder; + +import lombok.Data; + +@Data +public class PurchaseOrderItemDTO { + private Long skuId; + private Long wareId; + private Integer purchaseNum; + private Double purchasePrice; + private String purchaseUrl; + private String realPurchaseUrl; + private Long sourceItemId; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsorder/PurchaseOrderRelateMessageDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsorder/PurchaseOrderRelateMessageDTO.java new file mode 100644 index 0000000..94d2757 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsorder/PurchaseOrderRelateMessageDTO.java @@ -0,0 +1,8 @@ +package com.ms.api.dto.dsorder; + +import lombok.Data; + +@Data +public class PurchaseOrderRelateMessageDTO extends DsMessageDTO { + private PurchaseOrderDTO purchaseOrderInfo; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsorder/RemarkTplTagDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsorder/RemarkTplTagDTO.java new file mode 100644 index 0000000..1952fd5 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsorder/RemarkTplTagDTO.java @@ -0,0 +1,10 @@ +package com.ms.api.dto.dsorder; + +import lombok.Data; + +@Data +public class RemarkTplTagDTO { + private String name; + private String content; + private String type; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/dsorder/ResultDTO.java b/ms-api/src/main/java/com/ms/api/dto/dsorder/ResultDTO.java new file mode 100644 index 0000000..fa3f4e1 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/dsorder/ResultDTO.java @@ -0,0 +1,69 @@ +package com.ms.api.dto.dsorder; + +import lombok.Data; + +import java.util.HashMap; +import java.util.Map; + +@Data +public class ResultDTO { + public final static String SUCCESS = "success"; + public final static String FAIL = "fail"; + + private String result; + private String reason; + private String code; + private String message; + + private Map data = new HashMap<>(); + + public boolean isSuccess() { + return "success".equals(result); + } + + public static ResultDTO success() { + ResultDTO result = new ResultDTO(); + result.setResult(SUCCESS); + result.setReason("成功"); + result.setCode(SUCCESS); + result.setMessage("成功"); + return result; + } + + public static ResultDTO success(Map data) { + ResultDTO result = new ResultDTO(); + result.setResult(SUCCESS); + result.setReason("成功"); + result.setCode(SUCCESS); + result.setMessage("成功"); + result.setData(data); + return result; + } + + public static ResultDTO fail() { + ResultDTO result = new ResultDTO(); + result.setResult(FAIL); + result.setReason("失败"); + result.setCode(FAIL); + result.setMessage("失败"); + return result; + } + + public static ResultDTO fail(String message) { + ResultDTO result = new ResultDTO(); + result.setResult(FAIL); + result.setReason(message); + result.setCode(FAIL); + result.setMessage(message); + return result; + } + + public static ResultDTO fail(String code, String message) { + ResultDTO result = new ResultDTO(); + result.setResult(FAIL); + result.setReason(message); + result.setCode(code); + result.setMessage(message); + return result; + } +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/AllowAutoPurchaseProductDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/AllowAutoPurchaseProductDTO.java new file mode 100644 index 0000000..8d9d299 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/AllowAutoPurchaseProductDTO.java @@ -0,0 +1,31 @@ +package com.ms.api.dto.order; + +import com.alibaba.fastjson.annotation.JSONField; +import com.alibaba.fastjson.serializer.ToStringSerializer; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class AllowAutoPurchaseProductDTO { + /** + * 商品id + */ + @JSONField(serializeUsing = ToStringSerializer.class) + private Long productId; + + /** + * 商品名称 + */ + private String name; + + /** + * 商品价格 + */ + private BigDecimal price; + + /** + * 商品图片 + */ + private String img; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/BatchSetIsolationDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/BatchSetIsolationDTO.java new file mode 100644 index 0000000..e0b1d78 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/BatchSetIsolationDTO.java @@ -0,0 +1,19 @@ +package com.ms.api.dto.order; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author: laixw + * @Date: 2023/9/3 + */ +@Data +public class BatchSetIsolationDTO implements Serializable { + + /** + * 订单号 + */ + private List orderIds; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/DsPurchaseSettingDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/DsPurchaseSettingDTO.java new file mode 100644 index 0000000..60dfdc0 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/DsPurchaseSettingDTO.java @@ -0,0 +1,102 @@ +package com.ms.api.dto.order; + +import com.alibaba.fastjson.annotation.JSONField; +import com.alibaba.fastjson.serializer.SerializerFeature; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.Map; + +@Data +public class DsPurchaseSettingDTO { + + /** + * 当检测到采购单修改物流单号后,尝试自动替换对应订单的物流单号 + */ + private int isPurchaseLogisticsUpdateToPlatform; + + /** + * right_now|logistics_accept|disabled + */ + private String deliveryTimeType; + + /** + * 是否开启自动付款 + */ + private int isAutoPay; + + /** + * 是否开启自动采购 + */ + private int isAutoPurchase; + + /** + * 延迟自动采购时间【单位分钟】 + */ + private Integer delayPurchaseMinute; + + /** + * 是否开启利润少于多少禁止自动采购 + */ + private int isUseForbiddenPurchaseProfit; + + /** + * 当利润低于多少,禁止自动采购 + */ + private BigDecimal forbiddenPurchaseProfit; + + /** + * 是否使用关键词禁止采购 + */ + private int isUseForbiddenKeywords; + + /** + * 禁止采购的关键词 + */ + private String forbiddenKeywords; + + /** + * 是否所有商品支持自动采购 + */ + private int isUseAllProduct; + + /** + * 指定商品自动采购 + */ + private int isUsePartProduct; + + /** + * 隔离订单是否禁止采购 + */ + private int isForbidIsolationPurchase; + + /** + * 数据创建时间 + */ + private Date gmtCreate; + + /** + * 数据修改时间 + */ + private Date gmtModified; + + /** + * 自动采购首次开启时间 + */ + @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue) + private Date gmtIsAutoPurchase; + + /** + * 要过滤自动采购的商品 + */ + @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue) + private Map filterAutoPurchaseProducts; + + /** + * 允许自动采购的商品 + */ + @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue) + private Map allowAutoPurchaseProducts; + +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/DsSettingDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/DsSettingDTO.java new file mode 100644 index 0000000..7024e77 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/DsSettingDTO.java @@ -0,0 +1,23 @@ +package com.ms.api.dto.order; + +import com.alibaba.fastjson.annotation.JSONField; +import com.alibaba.fastjson.serializer.SerializerFeature; +import lombok.Data; + +@Data +public class DsSettingDTO { + @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue) + private Integer isApplyRefundOnPlatformRefundingAndSourceWaitSend; + @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue) + private Integer isCancelOrderOnPlatformRefundingAndSourceWaitPay; + @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue) + private Integer isApplyRefundOnPlatformRefundEndAndSourceWaitSend; + @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue) + private Integer isCancelOrderOnPlatformRefundEndAndSourceWaitPay; + @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue) + private String refundReason; + @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue) + private Integer isSaveManualSelectedSku; + @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue) + private String operateSource; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/FilterAutoPurchaseProductDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/FilterAutoPurchaseProductDTO.java new file mode 100644 index 0000000..5099043 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/FilterAutoPurchaseProductDTO.java @@ -0,0 +1,31 @@ +package com.ms.api.dto.order; + +import com.alibaba.fastjson.annotation.JSONField; +import com.alibaba.fastjson.serializer.ToStringSerializer; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class FilterAutoPurchaseProductDTO { + /** + * 商品id + */ + @JSONField(serializeUsing = ToStringSerializer.class) + private Long productId; + + /** + * 商品名称 + */ + private String name; + + /** + * 商品价格 + */ + private BigDecimal price; + + /** + * 商品图片 + */ + private String img; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/GetPurchaseSettingResponseDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/GetPurchaseSettingResponseDTO.java new file mode 100644 index 0000000..149fc04 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/GetPurchaseSettingResponseDTO.java @@ -0,0 +1,17 @@ +package com.ms.api.dto.order; + +import lombok.Data; + +@Data +public class GetPurchaseSettingResponseDTO { + + /** + * 采购配置,下游存储 + */ + private PurchaseSettingDTO purchaseSetting; + + /** + * 分销采购配置,下游存储 + */ + private DsPurchaseSettingDTO dsPurchaseSetting; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/ManualRsyncDdOrdersDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/ManualRsyncDdOrdersDTO.java new file mode 100644 index 0000000..9923643 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/ManualRsyncDdOrdersDTO.java @@ -0,0 +1,11 @@ +package com.ms.api.dto.order; + +import java.util.List; + +import lombok.Data; + +@Data +public class ManualRsyncDdOrdersDTO { + + private List orderIds; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/OrderMultiPackageOutstorageDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/OrderMultiPackageOutstorageDTO.java new file mode 100644 index 0000000..6592f65 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/OrderMultiPackageOutstorageDTO.java @@ -0,0 +1,82 @@ +package com.ms.api.dto.order; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author: laixw + * @Date: 2023/9/1 + */ +@Data +public class OrderMultiPackageOutstorageDTO implements Serializable { + + /** + * 订单号 + */ + private String orderId; + + /** + * 包裹信息 + */ + private List packageList; + + /** + * 出库操作来源 + */ + private String deliverySource; + + @Data + public static class PackageInfoDTO implements Serializable { + /** + * 物流id + */ + private String logisticsId; + + /** + * 运单号 + */ + private String waybillCode; + + /** + * 商品id + */ + private String productId; + + /** + * 订单规格SkuId + */ + private Long skuId; + + /** + * 当前包裹商品数量 + */ + private Integer shippedNum; + + /** + * 订单信息 + */ + private List shippedOrderInfo; + + // =========== 内部使用 + private String companyCode; + private String company; + private String logisticsName; + private String logisticsCode; + } + + @Data + public static class ShippedOrderInfo implements Serializable { + + /** + * 订单id + */ + private String shippedOrderId; + + /** + * 当前包裹商品数量 + */ + private Integer shippedNum; + } +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/OrderSearchListRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/OrderSearchListRequestDTO.java new file mode 100644 index 0000000..e0eb105 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/OrderSearchListRequestDTO.java @@ -0,0 +1,41 @@ +package com.ms.api.dto.order; + +import lombok.Data; + +@Data +public class OrderSearchListRequestDTO { + + private String product; + + private Long bType; + + private String afterSaleStatusDesc; + + private String trackingNo; + + private Long presellType; + + private Long orderType; + + private Long createTimeStart; + + private Long createTimeEnd; + private Long abnormalOrder; + + private Long tradeType; + + private Long updateTimeStart; + + private Long updateTimeEnd; + + private Long size; + + private Long page; + + private String orderBy; + + private Boolean orderAsc; + + private String fulfilStatus; + private Boolean isSearchable; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/OriginalAndCustomConsigneeInfoRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/OriginalAndCustomConsigneeInfoRequestDTO.java new file mode 100644 index 0000000..e33339e --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/OriginalAndCustomConsigneeInfoRequestDTO.java @@ -0,0 +1,20 @@ +package com.ms.api.dto.order; + +import lombok.Data; + + +@Data +public class OriginalAndCustomConsigneeInfoRequestDTO { + /* + * 订单号 + */ + private String orderId; + /* + * 解密字段[post_receiver:收件人姓名,post_tel:电话,detail:地址详情] + */ + private String[] decryptFields; + /* + * 解密来源[dsBatchPurchase:分销批量采购,pluginPurchase:插件采购,dsOrderList:分销页面] + */ + private String decryptSource; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/OriginalAndCustomConsigneeInfoResponseDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/OriginalAndCustomConsigneeInfoResponseDTO.java new file mode 100644 index 0000000..df70ebb --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/OriginalAndCustomConsigneeInfoResponseDTO.java @@ -0,0 +1,65 @@ + +package com.ms.api.dto.order; + +import lombok.Data; + +@Data +public class OriginalAndCustomConsigneeInfoResponseDTO { + /* + * 收件人 + */ + private String fullname; + /* + * 固话 + */ + private String telephone; + /* + * 手机 + */ + private String mobile; + /* + * 省份Id + */ + private String provinceAreaId; + /* + * 省份 + */ + private String province; + /* + * 市Id + */ + private String cityAreaId; + /* + * 市 + */ + private String city; + /* + * 区县ID + */ + private String countyAreaId; + /* + * 区县 + */ + private String county; + /* + * 镇街道ID + */ + private String townAreaId; + /* + * 镇街道 + */ + private String town; + /* + * 地址详情 + */ + private String address; + /* + * 不包含姓名和电话的 全地址 + */ + private String fullAddress; + /* + * 是否脱敏 + */ + private boolean hasHide; + +} \ No newline at end of file diff --git a/ms-api/src/main/java/com/ms/api/dto/order/PlatformShopSettingDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/PlatformShopSettingDTO.java new file mode 100644 index 0000000..eba49c0 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/PlatformShopSettingDTO.java @@ -0,0 +1,20 @@ +package com.ms.api.dto.order; + +import com.alibaba.fastjson.annotation.JSONField; +import com.alibaba.fastjson.serializer.SerializerFeature; +import com.ms.api.dto.dsorder.AllowDsEncryptOrderSourceSellerDTO; +import lombok.Data; + +import java.util.Map; + +@Data +public class PlatformShopSettingDTO { + @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue) + private Integer isEncryptDsOrder; + @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue) + private Integer isEncryptDsOrderIfSellerSupport; + @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue) + private String encryptDsOrderType; + @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue) + private Map allowDsEncryptOrderSourceSellers; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/PurchaseSettingDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/PurchaseSettingDTO.java new file mode 100644 index 0000000..4008ca2 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/PurchaseSettingDTO.java @@ -0,0 +1,82 @@ +package com.ms.api.dto.order; + +import com.alibaba.fastjson.annotation.JSONField; +import com.alibaba.fastjson.serializer.SerializerFeature; +import com.ms.api.dto.dsorder.AppendVenderRemarkTplItemDTO; +import lombok.Data; + +import java.util.List; + +@Data +public class PurchaseSettingDTO { + /** + * 是否自动同步采购信息到商家备注 + */ + private int isAppendShopRemark; + +// /** +// * 商家备注模板 +// */ +// private String appendShopRemarkTpl; + + /** + * 是否自动同步采购信息到本地备注 + */ + private int isAppendShopNote; + +// /** +// * 本地备注模板 +// */ +// private String appendShopNoteTpl; + + /** + * 商家备注旗帜 + */ + private int shopRemarkFlag; + + /** + * 是否开启下单自动填写买家留言 + */ + private int isAutoFillRemark; + +// /** +// * 自动添加下单买家留言模板 +// */ +// private String autoFillRemarkTpl; + + /** + * 是否开启下单自动填写备忘 + */ + private int isAutoFillOrderMemo; + +// /** +// * 下单自动填写备忘模板 +// */ +// private String autoFillOrderMemoTpl; + + /** + * 商家备注模板 + */ + @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue) + private List appendShopRemarkTpl; + + /** + * 本地备注模板 + */ + @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue) + private List appendShopNoteTpl; + + /** + * 自动添加下单买家留言模板 + */ + @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue) + private List autoFillRemarkTpl; + + /** + * 下单自动填写备忘模板 + */ + @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue) + private List autoFillOrderMemoTpl; + + +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/RsyncAfterSaleRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/RsyncAfterSaleRequestDTO.java new file mode 100644 index 0000000..4238f7f --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/RsyncAfterSaleRequestDTO.java @@ -0,0 +1,14 @@ +package com.ms.api.dto.order; + +import lombok.Data; + +/* + * 获取分销订单列表 请求参数 + */ +@Data +public class RsyncAfterSaleRequestDTO { + + + private String aftersaleIds; + +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/RsyncDdOrdersAndPurchaseOrdersRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/RsyncDdOrdersAndPurchaseOrdersRequestDTO.java new file mode 100644 index 0000000..1a8fa09 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/RsyncDdOrdersAndPurchaseOrdersRequestDTO.java @@ -0,0 +1,9 @@ +package com.ms.api.dto.order; + +import lombok.Data; + +@Data +public class RsyncDdOrdersAndPurchaseOrdersRequestDTO { + private String orderIds; + private String sourceOrderIds; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/RsyncFullOrderRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/RsyncFullOrderRequestDTO.java new file mode 100644 index 0000000..53d0af3 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/RsyncFullOrderRequestDTO.java @@ -0,0 +1,16 @@ +package com.ms.api.dto.order; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; +import org.springframework.util.StringUtils; + +/* + * 获取分销订单列表 请求参数 + */ +@Data +public class RsyncFullOrderRequestDTO { + + + private String rsyncOrderDate; + +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/RsyncOpOrderByOrderIdsResultDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/RsyncOpOrderByOrderIdsResultDTO.java new file mode 100644 index 0000000..73141d5 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/RsyncOpOrderByOrderIdsResultDTO.java @@ -0,0 +1,12 @@ +package com.ms.api.dto.order; + +import lombok.Data; + +import java.util.HashMap; +import java.util.Map; + +@Data +public class RsyncOpOrderByOrderIdsResultDTO { + private Map orderIdAndFailReasonMap; + private Map orderIdAndErrorMap; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/SaveBatchSellerRemarkDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/SaveBatchSellerRemarkDTO.java new file mode 100644 index 0000000..b239997 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/SaveBatchSellerRemarkDTO.java @@ -0,0 +1,30 @@ +package com.ms.api.dto.order; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 批量修改备注 + * @Author: laixw + * @Date: 2023/8/31 + */ +@Data +public class SaveBatchSellerRemarkDTO implements Serializable { + + /** + * 订单号 + */ + private List orderIds; + + /** + * flag + */ + private int flag; + + /** + * 备注 + */ + private String remark; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/SaveDsAutoPurchaseAgreementRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/SaveDsAutoPurchaseAgreementRequestDTO.java new file mode 100644 index 0000000..ff71e25 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/SaveDsAutoPurchaseAgreementRequestDTO.java @@ -0,0 +1,8 @@ +package com.ms.api.dto.order; + +import lombok.Data; + +@Data +public class SaveDsAutoPurchaseAgreementRequestDTO { + private Integer isCheckedAgreement; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/SaveOrderSellerRemarkDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/SaveOrderSellerRemarkDTO.java new file mode 100644 index 0000000..e67c169 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/SaveOrderSellerRemarkDTO.java @@ -0,0 +1,29 @@ +package com.ms.api.dto.order; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 修改商家备注 + * @Author: laixw + * @Date: 2023/8/30 + */ +@Data +public class SaveOrderSellerRemarkDTO implements Serializable { + + /** + * 订单号 + */ + private String orderId; + + /** + * flag + */ + private int flag; + + /** + * 备注 + */ + private String remark; +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/SavePurchaseSettingRequestDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/SavePurchaseSettingRequestDTO.java new file mode 100644 index 0000000..15c5697 --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/SavePurchaseSettingRequestDTO.java @@ -0,0 +1,16 @@ +package com.ms.api.dto.order; + +import lombok.Data; + +@Data +public class SavePurchaseSettingRequestDTO { + + private PurchaseSettingDTO purchaseSetting; + + private DsPurchaseSettingDTO dsPurchaseSetting; + + private PlatformShopSettingDTO platformShopSetting; + + private DsSettingDTO dsSetting; + +} diff --git a/ms-api/src/main/java/com/ms/api/dto/order/SearchDsOrderFilterDTO.java b/ms-api/src/main/java/com/ms/api/dto/order/SearchDsOrderFilterDTO.java new file mode 100644 index 0000000..29ef5ac --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/order/SearchDsOrderFilterDTO.java @@ -0,0 +1,96 @@ +package com.ms.api.dto.order; + +import java.util.Date; +import java.util.List; + +import lombok.Data; + +/* + * 获取分销订单列表 请求参数 业务调整 + */ +@Data +public class SearchDsOrderFilterDTO { + + private String authShopIds; + /* + * 订单起始时间 + */ + private Date orderStartTime; + + private Date orderEndTime; + + private String hasAfterSale; + /* + * 订单号 + */ + private List orderIds; + /* + * 采购单号 + */ + private List purchaseOrderSn; + + private Integer isIsolation; + + private List orderStatus; + + private List dsPurchaseStatus; + + private List dsWaitPayStatus; + + private List afterSaleStatus; + + private String orderTags; + + private String purchaseOrderSeller; + + private Integer isPriorirtyDelivery; + + private Integer skipSearchWithEs; + + private Integer delaySendStatus; + + private String skuName; + + private String productId; + + private String buyerRemark; + + private String sellerRemark; + + private String sellerNote; + + /** + * 需要分割一下 + **/ + private String sellerRemarkStars; + + + private String logisticsCode; + + private String fullname; + + private String mobile; + + private String skuSubName; + + private String purchaseOrderStatus; + + private String dsSourcePlatform; + + private String dsOrderRelateState; + + private Date purchaseStartTime; + + private Date purchaseEndTime; + + private String hasBuyerRemark; + + private String hasSellerRemark; + + private String hasSellerNote; + + private String hasNoRemarks; + + private Boolean isShowSameReceiverOrder; + +} diff --git a/ms-api/src/main/java/com/ms/api/util/DoubleValueSerializer.java b/ms-api/src/main/java/com/ms/api/util/DoubleValueSerializer.java new file mode 100644 index 0000000..f51530c --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/util/DoubleValueSerializer.java @@ -0,0 +1,43 @@ +package com.ms.api.util; + +import com.alibaba.fastjson.serializer.JSONSerializer; +import com.alibaba.fastjson.serializer.ObjectSerializer; +import com.alibaba.fastjson.serializer.SerializeWriter; + +import java.io.IOException; +import java.lang.reflect.Type; +import java.math.BigDecimal; +import java.text.DecimalFormat; + +public class DoubleValueSerializer implements ObjectSerializer { + + @Override + public void write(JSONSerializer jsonSerializer, Object o, Object fieldName, Type type, int i) throws IOException { + SerializeWriter out = jsonSerializer.out; + Double value = (Double) o; + String text = doubleTrans(noZeros(value)); + if (text.contains(".")) { + out.writeDouble(Double.parseDouble(text), true); + } else { + out.writeInt(Integer.parseInt(text)); + } + } + + private Double noZeros(Double num) { + BigDecimal value = new BigDecimal(num); + //去除多余0 + BigDecimal noZeros = value.stripTrailingZeros(); + //BigDecimal => double + return noZeros.doubleValue(); + } + + private String doubleTrans(double d){ + double eps = 1e-10; + //判断是否为整数 + if(d-Math.floor(d) < eps){ + return String.valueOf((long)d); + } + DecimalFormat df = new DecimalFormat("#.#####"); + return df.format(d); + } +} diff --git a/ms-biz/pom.xml b/ms-biz/pom.xml new file mode 100644 index 0000000..61ee712 --- /dev/null +++ b/ms-biz/pom.xml @@ -0,0 +1,112 @@ + + + + 4.0.0 + + com.jinritemai.cloud + ms-parent + 1.0.0-SNAPSHOT + + ms-biz + ms-biz + + + 1.2.83 + 4.8.0 + 2.2.0 + 3.14.9 + 3.4.2 + 4.6.8 + + + + + + org.springframework.boot + spring-boot-starter-data-redis + + + + + org.elasticsearch.client + elasticsearch-rest-high-level-client + + + org.elasticsearch.client + elasticsearch-rest-client + + + org.elasticsearch + elasticsearch + + + + + com.volcengine + ve-tos-java-sdk + ${tos.version} + + + com.squareup.okhttp3 + okhttp + ${okhttp.version} + + + + + org.apache.rocketmq + rocketmq-client + ${rocketmq.version} + + + org.apache.rocketmq + rocketmq-acl + ${rocketmq.version} + + + + org.springframework.boot + spring-boot-starter-test + test + + + com.jinritemai.cloud + ms-api + ${project.version} + + + com.jinritemai.cloud + ms-dal + ${project.version} + + + org.springframework + spring-web + + + org.springframework + spring-context + + + cn.hutool + hutool-all + ${hutool.version} + + + + org.sction + phprpc + 3.0.2 + + + com.jinritemai + sdk-java + 1.0-SNAPSHOT + system + ${project.basedir}/../lib/doudian-sdk-java-1.1.0-20231027170318.jar + + + + \ No newline at end of file diff --git a/ms-biz/src/main/java/com/ms/biz/HttpDemoService.java b/ms-biz/src/main/java/com/ms/biz/HttpDemoService.java new file mode 100644 index 0000000..627dac3 --- /dev/null +++ b/ms-biz/src/main/java/com/ms/biz/HttpDemoService.java @@ -0,0 +1,36 @@ +package com.ms.biz; + +import com.jinritemai.cloud.base.api.BaseRequest; +import com.jinritemai.cloud.base.api.BaseResponse; +import com.jinritemai.cloud.base.api.ExtensionService; +import com.jinritemai.cloud.base.api.ExtensionServiceHandler; +import com.ms.api.dto.ItemDTO; +import com.ms.biz.tool.CloudRequestTemplate; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; + +@ExtensionService("httpDemo") +@Slf4j +public class HttpDemoService implements ExtensionServiceHandler { + + @Autowired + private CloudRequestTemplate cloudRequestTemplate; + + @Override + public BaseResponse handle(BaseRequest req) { + log.info("HttpDemoService"); + try { + String resp = cloudRequestTemplate.executePost("http://cp.nbmsm.top/apps/app/getList", null); + log.info(resp); + } catch (Exception e) { + log.error(e.getMessage()); + } + + return BaseResponse.builder() + .success(true) + .message("success") + .data(123) + .code("10000") + .build(); + } +} diff --git a/ms-biz/src/main/java/com/ms/biz/TestSignService.java b/ms-biz/src/main/java/com/ms/biz/TestSignService.java new file mode 100644 index 0000000..2afe221 --- /dev/null +++ b/ms-biz/src/main/java/com/ms/biz/TestSignService.java @@ -0,0 +1,74 @@ +package com.ms.biz; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.jinritemai.cloud.base.api.BaseRequest; +import com.jinritemai.cloud.base.api.BaseResponse; +import com.jinritemai.cloud.base.api.ExtensionService; +import com.jinritemai.cloud.base.api.ExtensionServiceHandler; +import com.ms.biz.common.R; +import com.ms.api.dto.ItemDTO; +import com.ms.biz.tool.DsJsonRequestTemplate; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.*; + +@ExtensionService("testSign") +@Slf4j +public class TestSignService implements ExtensionServiceHandler { + + @Autowired + private DsJsonRequestTemplate dsJsonRequestTemplate; + + @Override + public BaseResponse handle(BaseRequest req) { + HashMap params = new HashMap<>(); + + List arrayString = new ArrayList<>(); + arrayString.add("arrayString1"); + arrayString.add("arrayString2"); + params.put("arrayString", arrayString); + HashMap mapStringString = new HashMap<>(); + mapStringString.put("A","mapStringString1"); + mapStringString.put("B","mapStringString2"); + params.put("mapStringString", mapStringString); + + List arrayInt64 = new ArrayList<>(); + arrayInt64.add(10000); + arrayInt64.add(10000); + params.put("arrayInt64", arrayInt64); + + params.put("int16", 10000); + params.put("int32", 10000); + params.put("int64", 10000); + params.put("double", 10.1); + params.put("string", "test"); + +// params.put("struct1", new GetCurrentShopMoveSettingRequestDTO()); +// params.put("struct2", new GetMoveHistoryProductListRequestDTO()); +// params.put("struct3", new SaveBatchMoveTaskRequestDTO()); + +// List arrayStruct = new LinkedList<>(); +// arrayStruct.add(new GetCurrentShopMoveSettingRequestDTO()); +// arrayStruct.add(new GetMoveHistoryProductListRequestDTO()); +// arrayStruct.add(new SaveBatchMoveTaskRequestDTO()); +// params.put("arrayStruct", arrayStruct); +// +// Map mapStringStruct = new HashMap<>(); +// mapStringStruct.put("mapstruct1", new GetCurrentShopMoveSettingRequestDTO()); +// mapStringStruct.put("mapstruct2", new GetMoveHistoryProductListRequestDTO()); +// mapStringStruct.put("mapstruct3", new SaveBatchMoveTaskRequestDTO()); +// params.put("mapStringStruct", mapStringStruct); + + String res = null; + try { + res = dsJsonRequestTemplate.execute("/order/testJava", params); + log.info(res); + } catch (Exception e) { + e.printStackTrace(); + log.error(e.getMessage()); + } + return R.ok(JSON.parseObject(res)); + } +} diff --git a/ms-biz/src/main/java/com/ms/biz/TestTimeService.java b/ms-biz/src/main/java/com/ms/biz/TestTimeService.java new file mode 100644 index 0000000..2ba7e57 --- /dev/null +++ b/ms-biz/src/main/java/com/ms/biz/TestTimeService.java @@ -0,0 +1,32 @@ +package com.ms.biz; + +import com.jinritemai.cloud.base.api.BaseRequest; +import com.jinritemai.cloud.base.api.BaseResponse; +import com.jinritemai.cloud.base.api.ExtensionService; +import com.jinritemai.cloud.base.api.ExtensionServiceHandler; +import com.ms.biz.common.R; +import com.ms.biz.common.SPIBaseService; +import com.ms.api.dto.ItemDTO; +import com.ms.biz.tool.TimeTool; +import lombok.extern.slf4j.Slf4j; + + +@ExtensionService("testTime") +@Slf4j +public class TestTimeService extends SPIBaseService implements ExtensionServiceHandler { + @Override + public BaseResponse handle(BaseRequest req) { +// String currentTime = DateUtil.now(); +// +// // 将当前时间转换为Date类型 +// java.util.Date date = DateUtil.parseDateTime(currentTime); +// +// // 将当前时间减去5秒 +// java.util.Date newDate = DateUtil.offsetSecond(date, -3600); +// +// String newTime = DateUtil.formatDateTime(newDate); +// System.out.println("当前时间:" + currentTime); + System.out.println("减去5秒后的时间:" + TimeTool.getDateTimeBySeconds(-3600)); + return R.ok(""); + } +} diff --git a/ms-biz/src/main/java/com/ms/biz/TestTosService.java b/ms-biz/src/main/java/com/ms/biz/TestTosService.java new file mode 100644 index 0000000..7785708 --- /dev/null +++ b/ms-biz/src/main/java/com/ms/biz/TestTosService.java @@ -0,0 +1,40 @@ +package com.ms.biz; + +import com.jinritemai.cloud.base.api.BaseRequest; +import com.jinritemai.cloud.base.api.BaseResponse; +import com.jinritemai.cloud.base.api.ExtensionService; +import com.jinritemai.cloud.base.api.ExtensionServiceHandler; +import com.ms.biz.common.R; +import com.ms.biz.common.Ret; +import com.ms.biz.common.SPIBaseService; +import com.ms.api.dto.ItemDTO; +import com.ms.biz.paas.StorageService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; + + +@ExtensionService("testTos") +@Slf4j +public class TestTosService extends SPIBaseService implements ExtensionServiceHandler { + + @Autowired + StorageService storageService; + + @Override + public BaseResponse handle(BaseRequest req) { + try{ + initHandle(req); + + Ret ret = storageService.uploadContent("test","这是测试数据"); + String url = (String)ret.getData().get("url"); + ret = storageService.getContent("test"); + String content = (String)ret.getData().get("data"); + String publicUrl = storageService.getPubOssUrlByOssPath("test"); + + return R.ok("地址:" + url + "内容:" + content + "公网地址: " + publicUrl); + }catch (Throwable e){ + e.printStackTrace(); + return R.ok(e.getMessage()); + } + } +} diff --git a/ms-biz/src/main/java/com/ms/biz/bo/AttributeBO.java b/ms-biz/src/main/java/com/ms/biz/bo/AttributeBO.java new file mode 100644 index 0000000..9d6376c --- /dev/null +++ b/ms-biz/src/main/java/com/ms/biz/bo/AttributeBO.java @@ -0,0 +1,19 @@ +package com.ms.biz.bo; + +import lombok.Data; + +import java.util.List; + +@Data +public class AttributeBO { + private String propertyName; + private int propertyId; + private int required; + private List