修改汇联通distributorId 原参数aNId4A3X修改为orjuOND7

dev
袁野 2 weeks ago
parent 2416ef9eb5
commit 8592835030
  1. 46
      bweb/src/main/java/com/bweb/controller/TestController.java
  2. 5
      cweb/src/main/java/com/cweb/controller/discount/DiscountController.java
  3. 6
      service/src/main/java/com/hfkj/jd/Impl/JdServiceImpl.java
  4. 43
      service/src/main/java/com/hfkj/jd/JdPostService.java
  5. 7
      service/src/main/java/com/hfkj/jd/JdService.java
  6. 4
      service/src/main/java/com/hfkj/model/order/orderExport/MerOrderSettlementDetailModel.java
  7. 2
      service/src/main/java/com/hfkj/service/discount/impl/CouponDiscountUserRelServiceImpl.java
  8. 3
      service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java
  9. 16
      service/src/main/java/com/hfkj/service/order/OrderRefundSuccessService.java
  10. 18
      service/src/main/java/com/hfkj/service/order/impl/BsOrderAfterSalesApplyServiceImpl.java
  11. 18
      service/src/main/java/com/hfkj/service/order/impl/OrderSettlementServiceImpl.java

@ -31,6 +31,7 @@ import com.jd.open.api.sdk.domain.vopxx.MsgRecordProvider.response.queryTransByV
import com.jd.open.api.sdk.response.vopdd.VopOrderQueryDeliveryInfoResponse;
import com.jd.open.api.sdk.response.vopdd.VopOrderQueryOrderDetailResponse;
import com.jd.open.api.sdk.response.vopdz.VopAddressConvertFourAreaByDetailStrResponse;
import com.jd.open.api.sdk.response.vopsh.VopAfsGetAfsOutlineResponse;
import com.jd.open.api.sdk.response.vopxx.VopMessageQueryTransByVopNormalResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -185,6 +186,22 @@ public class TestController {
}
}
@RequestMapping(value="/getAfsOutline",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询售后概要")
public ResponseData getAfsOutline(@RequestParam(value = "thirdOrderNo" , required = true) Long thirdOrderNo) {
try {
VopAfsGetAfsOutlineResponse orderDetailResponse = JdPostService.getAfsOutline(jdService.getToken(),thirdOrderNo);
return ResponseMsgUtil.success(orderDetailResponse);
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/sign",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "sign")
@ -226,21 +243,20 @@ public class TestController {
// }
// @RequestMapping(value="/confirmOrder",method = RequestMethod.GET)
// @ResponseBody
// @ApiOperation(value = "确认订单")
// public ResponseData confirmOrder(@RequestParam(value = "childNo", required = false) String childNo) {
// try {
//
// BsOrderGoods order = getOrderGoodsService.findGoodsOrderByChild(childNo);
// jdService.confirmOrder(order);
// return ResponseMsgUtil.success("");
//
// } catch (Exception e) {
// log.error("error!",e);
// return ResponseMsgUtil.exception(e);
// }
// }
@RequestMapping(value="/confirmOrder",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "确认订单")
public ResponseData confirmOrder() {
try {
JdPostService.confirmOrder(jdService.getToken() , 304301646288L, "945024316" , "确认订单");
return ResponseMsgUtil.success("");
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}

@ -69,6 +69,7 @@ public class DiscountController {
@ApiOperation(value = "获取用户优惠券列表")
public ResponseData getListUserDiscount(
@RequestParam(value = "status", required = true) Integer status,
@RequestParam(value = "platformCode" , required = false) String platformCode,
@RequestParam(value = "source", required = true) Integer source
) {
try {
@ -81,6 +82,7 @@ public class DiscountController {
map.put("userId", userSession.getUser().getId());
map.put("status", status);
map.put("platformCode", platformCode);
return ResponseMsgUtil.success(discountUserRelService.getList(map));
@ -142,7 +144,7 @@ public class DiscountController {
@RequestMapping(value = "/userDiscountNum", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "获取券数量")
public ResponseData userDiscountNum() {
public ResponseData userDiscountNum(@RequestParam(value = "platformCode" , required = false) String platformCode) {
try {
// 用户session
@ -167,6 +169,7 @@ public class DiscountController {
map.put("userId", userSession.getUser().getId());
map.put("status", 1);
map.put("platformCode", platformCode);
List<CouponDiscountUserRel> list = discountUserRelService.getList(map);

@ -696,8 +696,10 @@ public class JdServiceImpl implements JdService {
}
@Override
public VopAfsCreateAfsApplyResponse createAfsApply(String thirdApplyId, Integer customerExpect, Long wareId, String wareName, Integer wareNum, Long jdOrderId, String customerName, Integer pickWareProvince, Integer pickWareCounty, Integer pickWareCity, String pickWareAddress, Integer returnWareProvince, Integer returnWareCounty, Integer returnWareCity, String returnWareAddress) throws Exception {
return JdPostService.createAfsApply(getToken(), thirdApplyId, customerExpect, wareId, wareName, wareNum, jdOrderId, customerName, pickWareProvince, pickWareCounty, pickWareCity, pickWareAddress, returnWareProvince, returnWareCounty, returnWareCity, returnWareAddress);
public VopAfsCreateAfsApplyResponse createAfsApply(String questionPic,String packageDesc, String thirdApplyId, Integer customerExpect, Long wareId, String wareName, Integer wareNum, Long jdOrderId, String customerName, String customerMobilePhone , Integer pickWareProvince, Integer pickWareCounty, Integer pickWareCity, Integer pickWareVillage , String pickWareAddress, Integer returnWareProvince, Integer returnWareCounty, Integer returnWareCity, Integer returnWareVillage, String returnWareAddress) throws Exception {
return JdPostService.createAfsApply(
getToken(), questionPic, packageDesc ,
thirdApplyId, customerExpect, wareId, wareName, wareNum, jdOrderId, customerName, customerMobilePhone, pickWareProvince, pickWareCounty, pickWareCity , pickWareVillage, pickWareAddress, returnWareProvince, returnWareCounty, returnWareCity , returnWareVillage, returnWareAddress);
}
private JSONObject jdLogisticsStatus(BsOrderGoods orderGoods) throws Exception {

@ -20,6 +20,7 @@ import com.jd.open.api.sdk.request.vopdz.VopAddressQueryJdAreaIdListRequest;
import com.jd.open.api.sdk.request.vopdz.VopAddressVerifyAreaFourIdOpenReqRequest;
import com.jd.open.api.sdk.request.vopkc.VopGoodsGetNewStockByIdRequest;
import com.jd.open.api.sdk.request.vopsh.VopAfsCreateAfsApplyRequest;
import com.jd.open.api.sdk.request.vopsh.VopAfsGetAfsOutlineRequest;
import com.jd.open.api.sdk.request.vopsp.*;
import com.jd.open.api.sdk.request.vopxx.VopMessageDeleteClientMsgByIdListRequest;
import com.jd.open.api.sdk.request.vopxx.VopMessageQueryTransByVopNormalRequest;
@ -29,6 +30,7 @@ import com.jd.open.api.sdk.response.vopdz.VopAddressQueryJdAreaIdListResponse;
import com.jd.open.api.sdk.response.vopdz.VopAddressVerifyAreaFourIdOpenReqResponse;
import com.jd.open.api.sdk.response.vopkc.VopGoodsGetNewStockByIdResponse;
import com.jd.open.api.sdk.response.vopsh.VopAfsCreateAfsApplyResponse;
import com.jd.open.api.sdk.response.vopsh.VopAfsGetAfsOutlineResponse;
import com.jd.open.api.sdk.response.vopsp.*;
import com.jd.open.api.sdk.response.vopxx.VopMessageDeleteClientMsgByIdListResponse;
import com.jd.open.api.sdk.response.vopxx.VopMessageQueryTransByVopNormalResponse;
@ -208,6 +210,17 @@ public class JdPostService {
return client.execute(request);
}
// 查询售后概要
public static VopAfsGetAfsOutlineResponse getAfsOutline(String token , Long jdOrderId) throws Exception{
JdClient client=new DefaultJdClient(SERVER_URL,token,CommonSysConst.getSysConfig().getJDAppKey(),CommonSysConst.getSysConfig().getJDAppSecret());
VopAfsGetAfsOutlineRequest request=new VopAfsGetAfsOutlineRequest();
request.setThirdApplyId("95154185727487");
request.setPageSize(20);
request.setOrderId(jdOrderId);
request.setPageIndex(1);
return client.execute(request);
}
// 提交预占订单服务
public static VopOrderSubmitOrderResponse submitOrder(String token , GoodsUserAddress address , String orderNo , Integer skuNum , Long skuId) throws Exception {
// 创建京东客户端
@ -393,10 +406,12 @@ public class JdPostService {
// 申请售后
public static VopAfsCreateAfsApplyResponse createAfsApply(
String token , String thirdApplyId , Integer customerExpect , Long wareId ,
String wareName , Integer wareNum , Long jdOrderId , String customerName ,
Integer pickWareProvince , Integer pickWareCounty, Integer pickWareCity ,String pickWareAddress ,
Integer returnWareProvince , Integer returnWareCounty , Integer returnWareCity , String returnWareAddress
String token ,
String questionDesc, String questionPic,
String thirdApplyId , Integer customerExpect , Long wareId ,
String wareName , Integer wareNum , Long jdOrderId , String customerName , String customerMobilePhone,
Integer pickWareProvince , Integer pickWareCounty, Integer pickWareCity , Integer pickWareVillage,String pickWareAddress ,
Integer returnWareProvince , Integer returnWareCounty , Integer returnWareCity , Integer returnWareVillage , String returnWareAddress
) throws Exception {
JdClient client=new DefaultJdClient(SERVER_URL,token,CommonSysConst.getSysConfig().getJDAppKey(),CommonSysConst.getSysConfig().getJDAppSecret());
VopAfsCreateAfsApplyRequest request=new VopAfsCreateAfsApplyRequest();
@ -427,13 +442,27 @@ public class JdPostService {
wareDetailInfoOpenReq.setWareType(10);
// 插入
applyInfoItemOpenReq.setWareDetailInfoOpenReq(wareDetailInfoOpenReq);
// 商品描述信息
WareDescInfoOpenReq wareDescInfoOpenReq = new WareDescInfoOpenReq();
wareDescInfoOpenReq.setQuestionDesc(questionDesc);
wareDescInfoOpenReq.setIsNeedDetectionReport(false);
wareDescInfoOpenReq.setLossPreventionTagFlag(false);
wareDescInfoOpenReq.setIsHasPackage(true);
wareDescInfoOpenReq.setPackageDesc(1);
wareDescInfoOpenReq.setQuestionPic(questionPic);
applyInfoItemOpenReq.setWareDescInfoOpenReq(wareDescInfoOpenReq);
applyInfoItemOpenReqList.add(applyInfoItemOpenReq);
applyAfterSaleOpenReq.setApplyInfoItemOpenReqList(applyInfoItemOpenReqList);
// 用户信息
CustomerInfoOpenReq customerInfoOpenReq=new CustomerInfoOpenReq();
customerInfoOpenReq.setCustomerName(customerName);
customerInfoOpenReq.setCustomerContactName(customerName);
customerInfoOpenReq.setCustomerName(customerName + "同学");
customerInfoOpenReq.setCustomerMobilePhone(customerMobilePhone);
customerInfoOpenReq.setCustomerContactName(customerName + "同学");
// 插入
applyAfterSaleOpenReq.setCustomerInfoVo(customerInfoOpenReq);
// 取件信息
@ -442,6 +471,7 @@ public class JdPostService {
pickWareInfoOpenReq.setPickWareProvince(pickWareProvince);
pickWareInfoOpenReq.setPickWareCity(pickWareCity);
pickWareInfoOpenReq.setPickWareCounty(pickWareCounty);
pickWareInfoOpenReq.setPickWareVillage(pickWareVillage);
pickWareInfoOpenReq.setPickWareAddress(pickWareAddress);
applyAfterSaleOpenReq.setPickupWareInfoOpenReq(pickWareInfoOpenReq);
@ -451,6 +481,7 @@ public class JdPostService {
returnWareInfoOpenReq.setReturnWareProvince(returnWareProvince);
returnWareInfoOpenReq.setReturnWareCity(returnWareCity);
returnWareInfoOpenReq.setReturnWareCountry(returnWareCounty);
returnWareInfoOpenReq.setReturnWareVillage(returnWareVillage);
returnWareInfoOpenReq.setReturnWareAddress(returnWareAddress);
applyAfterSaleOpenReq.setReturnWareInfoOpenReq(returnWareInfoOpenReq);

@ -130,8 +130,9 @@ public interface JdService {
* @Author: Sum1Dream
* @Date: 2024/11/29 下午3:08
*/
VopAfsCreateAfsApplyResponse createAfsApply(String thirdApplyId , Integer customerExpect , Long wareId ,
VopAfsCreateAfsApplyResponse createAfsApply(String questionDesc,String packageDesc,String thirdApplyId , Integer customerExpect , Long wareId ,
String wareName , Integer wareNum , Long jdOrderId , String customerName ,
Integer pickWareProvince , Integer pickWareCounty, Integer pickWareCity , String pickWareAddress ,
Integer returnWareProvince , Integer returnWareCounty , Integer returnWareCity , String returnWareAddress) throws Exception;
String customerMobilePhone,
Integer pickWareProvince , Integer pickWareCounty, Integer pickWareCity , Integer pickWareVillage , String pickWareAddress ,
Integer returnWareProvince , Integer returnWareCounty , Integer returnWareCity , Integer returnWareVillage , String returnWareAddress) throws Exception;
}

@ -46,6 +46,10 @@ public class MerOrderSettlementDetailModel {
@ColumnWidth(20)
@ExcelProperty({"支付金额"})
public BigDecimal payPrice;
@ColumnWidth(20)
@ExcelProperty({"结算金额"})
public BigDecimal payRealPrice;
@ColumnWidth(20)

@ -45,7 +45,7 @@ public class CouponDiscountUserRelServiceImpl implements CouponDiscountUserRelSe
if (MapUtils.getLong(map, "discountId") != null) {
criteria.andDiscountIdEqualTo(MapUtils.getLong(map, "discountId"));
}
if (MapUtils.getInteger(map, "platformCode") != null) {
if (MapUtils.getString(map, "platformCode") != null) {
criteria.andPlatformCodeEqualTo(MapUtils.getString(map, "platformCode"));
}

@ -309,6 +309,9 @@ public class OrderPaySuccessService {
goodsOrder.setCouponDiscountPrice(childOrder.getCouponDiscountPrice());
goodsOrder.setIntegralDiscountPrice(childOrder.getIntegralDiscountPrice());
goodsOrder.setPayRealPrice(childOrder.getSurplusRefundPrice());
goodsOrder.setSurplusRefundCount(childOrder.getSurplusRefundCount());
goodsOrder.setSurplusRefundIntegral(childOrder.getSurplusRefundIntegral());
goodsOrder.setSurplusRefundPrice(childOrder.getSurplusRefundPrice());
goodsOrder.setPayChannel(order.getPayChannel());
goodsOrder.setPayType(order.getPayType());
goodsOrder.setPaySerialNo(order.getPaySerialNo());

@ -74,11 +74,17 @@ public class OrderRefundSuccessService {
try {
if (orderGoods != null) {
orderGoods.setStatus(OrderChildStatusEnum.status4.getCode());
orderGoods.setLogisticsStatusDesc(null);
orderGoods.setLogisticsNo(null);
orderGoods.setLogisticsStatus(null);
orderGoods.setExceptionStatus(false);
if (childOrder.getStatus().equals(OrderChildStatusEnum.status4.getCode())) {
orderGoods.setLogisticsStatusDesc(null);
orderGoods.setLogisticsNo(null);
orderGoods.setLogisticsStatus(null);
orderGoods.setExceptionStatus(false);
}
orderGoods.setSurplusRefundCount(childOrder.getSurplusRefundCount());
orderGoods.setSurplusRefundIntegral(childOrder.getSurplusRefundIntegral());
orderGoods.setSurplusRefundPrice(childOrder.getSurplusRefundPrice());
orderGoods.setStatus(childOrder.getStatus());
bsOrderGoodsService.update(orderGoods);
}
} catch (Exception e) {

@ -318,10 +318,20 @@ public class BsOrderAfterSalesApplyServiceImpl implements BsOrderAfterSalesApply
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "回寄地址错误!");
}
afterSalesAddressRecordService.insertRecord(applyNo , "2" , pickAddress);
VopAfsCreateAfsApplyResponse response = jdService.createAfsApply(applyNo , apply.getJdStatus() , Long.valueOf(goodsMsg.getThirdId()) , goodsMsg.getTitle() , apply.getProductCount() ,
Long.valueOf(bsOrderGoods.getThirdOrderNo()) , bsOrderGoods.getMerName() ,
pickAddress.getProvinceId().intValue() , pickAddress.getCountyId().intValue() , pickAddress.getCityId().intValue() , pickAddress.getAddress() ,
returnAddress.getProvinceId().intValue() , returnAddress.getCountyId().intValue() , returnAddress.getCityId().intValue() , returnAddress.getAddress());
String[] arr = apply.getPhoto().split(";");
StringBuilder phone = new StringBuilder();
for (String s : arr) {
phone.append("https://phg.obs.cn-southwest-2.myhuaweicloud.com/").append(s).append(",");
}
VopAfsCreateAfsApplyResponse response = jdService.createAfsApply(
apply.getRemarks(), phone.toString(),
applyNo , apply.getJdStatus() , Long.valueOf(goodsMsg.getThirdId()) , goodsMsg.getTitle() , apply.getProductCount() ,
Long.valueOf(bsOrderGoods.getThirdOrderNo()) , pickAddress.getCountyName() , pickAddress.getPhone() ,
pickAddress.getProvinceId().intValue() , pickAddress.getCountyId().intValue() , pickAddress.getCityId().intValue() , pickAddress.getTownId().intValue() , pickAddress.getAddress() ,
returnAddress.getProvinceId().intValue() , returnAddress.getCountyId().intValue() , returnAddress.getCityId().intValue() ,returnAddress.getTownId().intValue() , returnAddress.getAddress()
);
if (response.getOpenRpcResult().getSuccess()) {
apply.setStatus(OrderAfterSalesApplyStatusEnum.type4.getCode());

@ -146,11 +146,17 @@ public class OrderSettlementServiceImpl implements OrderSettlementService {
model.setChildOrderNo(orderGoods.getChildOrderNo());
model.setBusiness(orderGoods.getLogisticsNo());
if (orderGoods.getPayRealPrice() == null) {
model.setPayPrice(new BigDecimal(0));
} else {
model.setPayPrice(orderGoods.getPayRealPrice());
}
if (orderGoods.getSurplusRefundPrice() == null) {
model.setPayRealPrice(new BigDecimal(0));
} else {
model.setPayRealPrice(orderGoods.getPayRealPrice());
model.setPayRealPrice(orderGoods.getSurplusRefundPrice());
}
if (orderGoods.getPayType() != null) {
model.setPayType(OrderPayTypeEnum.getData(orderGoods.getPayType()).getName());
} else {
@ -192,8 +198,10 @@ public class OrderSettlementServiceImpl implements OrderSettlementService {
model.setBusiness(business);
if (orderCoupon.getPayRealPrice() == null) {
model.setPayRealPrice(new BigDecimal(0));
model.setPayPrice(new BigDecimal(0));
} else {
model.setPayRealPrice(orderCoupon.getPayRealPrice());
model.setPayPrice(orderCoupon.getPayRealPrice());
}
if (orderCoupon.getPayType() != null) {
model.setPayType(OrderPayTypeEnum.getData(orderCoupon.getPayType()).getName());
@ -225,8 +233,10 @@ public class OrderSettlementServiceImpl implements OrderSettlementService {
model.setChildOrderNo(orderCinema.getChildOrderNo());
if (orderCinema.getPayRealPrice() == null) {
model.setPayRealPrice(new BigDecimal(0));
model.setPayPrice(new BigDecimal(0));
} else {
model.setPayRealPrice(orderCinema.getPayRealPrice());
model.setPayPrice(orderCinema.getPayRealPrice());
}
if (orderCinema.getPayType() != null) {
model.setPayType(OrderPayTypeEnum.getData(orderCinema.getPayType()).getName());
@ -257,8 +267,10 @@ public class OrderSettlementServiceImpl implements OrderSettlementService {
model.setChildOrderNo(orderStarbucks.getChildOrderNo());
if (orderStarbucks.getPrice() == null) {
model.setPayRealPrice(new BigDecimal(0));
model.setPayPrice(new BigDecimal(0));
} else {
model.setPayRealPrice(orderStarbucks.getPrice());
model.setPayPrice(orderStarbucks.getPrice());
}
if (orderStarbucks.getPayType() != null) {
model.setPayType(OrderPayTypeEnum.getData(orderStarbucks.getPayType()).getName());
@ -288,8 +300,10 @@ public class OrderSettlementServiceImpl implements OrderSettlementService {
model.setChildOrderNo(orderMeiTuan.getChildOrderNo());
if (orderMeiTuan.getPayRealPrice() == null) {
model.setPayRealPrice(new BigDecimal(0));
model.setPayPrice(new BigDecimal(0));
} else {
model.setPayRealPrice(orderMeiTuan.getPayRealPrice());
model.setPayPrice(orderMeiTuan.getPayRealPrice());
}
if (orderMeiTuan.getPayType() != null) {
model.setPayType(OrderPayTypeEnum.getData(orderMeiTuan.getPayType()).getName());
@ -322,8 +336,10 @@ public class OrderSettlementServiceImpl implements OrderSettlementService {
model.setChildOrderNo(orderMember.getChildOrderNo());
if (orderMember.getPayRealPrice() == null) {
model.setPayRealPrice(new BigDecimal(0));
model.setPayPrice(new BigDecimal(0));
} else {
model.setPayRealPrice(orderMember.getPayRealPrice());
model.setPayPrice(orderMember.getPayRealPrice());
}
if (orderMember.getPayType() != null) {
model.setPayType(OrderPayTypeEnum.getData(orderMember.getPayType()).getName());

Loading…
Cancel
Save