|
|
@ -1,48 +1,27 @@ |
|
|
|
package com.bweb.controller; |
|
|
|
package com.bweb.controller; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.aliyun.dysmsapi20170525.Client; |
|
|
|
|
|
|
|
import com.aliyun.dysmsapi20170525.models.SendSmsRequest; |
|
|
|
|
|
|
|
import com.hfkj.common.exception.ErrorCode; |
|
|
|
import com.hfkj.common.exception.ErrorCode; |
|
|
|
import com.hfkj.common.exception.ErrorHelp; |
|
|
|
import com.hfkj.common.exception.ErrorHelp; |
|
|
|
import com.hfkj.common.exception.SysCode; |
|
|
|
import com.hfkj.common.exception.SysCode; |
|
|
|
import com.hfkj.common.utils.*; |
|
|
|
import com.hfkj.common.utils.*; |
|
|
|
import com.hfkj.config.AliMessageConfig; |
|
|
|
import com.hfkj.config.AliMessageConfig; |
|
|
|
import com.hfkj.config.CommonSysConst; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.hfkj.config.ShanGaoConfig; |
|
|
|
import com.hfkj.config.ShanGaoConfig; |
|
|
|
import com.hfkj.entity.*; |
|
|
|
import com.hfkj.entity.*; |
|
|
|
import com.hfkj.haioil.HaiOilService; |
|
|
|
|
|
|
|
import com.hfkj.jd.JdPostService; |
|
|
|
import com.hfkj.jd.JdPostService; |
|
|
|
import com.hfkj.jd.JdService; |
|
|
|
import com.hfkj.jd.JdService; |
|
|
|
import com.hfkj.mer.BsMerPayConfigService; |
|
|
|
|
|
|
|
import com.hfkj.model.OpenAccountRequestDto; |
|
|
|
import com.hfkj.model.OpenAccountRequestDto; |
|
|
|
import com.hfkj.model.ResponseData; |
|
|
|
import com.hfkj.model.ResponseData; |
|
|
|
|
|
|
|
|
|
|
|
import com.hfkj.model.goods.JdGoodsModel; |
|
|
|
import com.hfkj.model.goods.JdGoodsModel; |
|
|
|
import com.hfkj.qianzhu.StarbucksService; |
|
|
|
|
|
|
|
import com.hfkj.service.card.BsUserCardService; |
|
|
|
|
|
|
|
import com.hfkj.service.cms.CmsContentService; |
|
|
|
import com.hfkj.service.cms.CmsContentService; |
|
|
|
import com.hfkj.service.coupon.channel.YouTuCouponService; |
|
|
|
|
|
|
|
import com.hfkj.service.goods.*; |
|
|
|
import com.hfkj.service.goods.*; |
|
|
|
import com.hfkj.service.goods.impl.BsOrderStarbucksServiceImpl; |
|
|
|
|
|
|
|
import com.hfkj.service.hlt.HuiLianTongUnionCardService; |
|
|
|
import com.hfkj.service.hlt.HuiLianTongUnionCardService; |
|
|
|
import com.hfkj.service.order.BsOrderChildService; |
|
|
|
|
|
|
|
import com.hfkj.service.order.BsOrderRefundService; |
|
|
|
|
|
|
|
import com.hfkj.service.order.BsOrderService; |
|
|
|
|
|
|
|
import com.hfkj.service.order.OrderPayService; |
|
|
|
|
|
|
|
import com.hfkj.service.pay.huift.TradeService; |
|
|
|
|
|
|
|
import com.hfkj.sysenum.order.OrderCouponNoStatusEnum; |
|
|
|
|
|
|
|
import com.hfkj.sysenum.order.OrderLogisticsStatusEnum; |
|
|
|
import com.hfkj.sysenum.order.OrderLogisticsStatusEnum; |
|
|
|
import com.jd.open.api.sdk.domain.vopsp.CategoryInfoGoodsProvider.response.getCategoryInfoList.GetCategoryInfoGoodsResp; |
|
|
|
|
|
|
|
import com.jd.open.api.sdk.domain.vopsp.SkuInfoGoodsProvider.response.getSkuDetailInfo.GetSkuPoolInfoGoodsResp; |
|
|
|
|
|
|
|
import com.jd.open.api.sdk.domain.vopxx.MsgRecordProvider.response.queryTransByVopNormal.VopBizTransMessage; |
|
|
|
|
|
|
|
import com.jd.open.api.sdk.response.vopdd.VopOrderQueryDeliveryInfoResponse; |
|
|
|
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.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.vopsh.VopAfsGetAfsOutlineResponse; |
|
|
|
import com.jd.open.api.sdk.response.vopxx.VopMessageQueryTransByVopNormalResponse; |
|
|
|
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
@ -183,10 +162,11 @@ public class TestController { |
|
|
|
@RequestMapping(value="/getAfsOutline",method = RequestMethod.GET) |
|
|
|
@RequestMapping(value="/getAfsOutline",method = RequestMethod.GET) |
|
|
|
@ResponseBody |
|
|
|
@ResponseBody |
|
|
|
@ApiOperation(value = "查询售后概要") |
|
|
|
@ApiOperation(value = "查询售后概要") |
|
|
|
public ResponseData getAfsOutline(@RequestParam(value = "thirdOrderNo" , required = true) Long thirdOrderNo) { |
|
|
|
public ResponseData getAfsOutline(@RequestParam(value = "thirdOrderNo" , required = true) Long thirdOrderNo, |
|
|
|
|
|
|
|
@RequestParam(value = "ApplyNo" , required = true) String ApplyNo) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
VopAfsGetAfsOutlineResponse orderDetailResponse = JdPostService.getAfsOutline(jdService.getToken(),thirdOrderNo); |
|
|
|
VopAfsGetAfsOutlineResponse orderDetailResponse = JdPostService.getAfsOutline(jdService.getToken(),thirdOrderNo , ApplyNo); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(orderDetailResponse); |
|
|
|
return ResponseMsgUtil.success(orderDetailResponse); |
|
|
|
|
|
|
|
|
|
|
@ -363,6 +343,75 @@ public class TestController { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/orderGoodsConfirmReceipt",method = RequestMethod.GET) |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
|
|
@ApiOperation(value = "orderGoodsConfirmReceipt") |
|
|
|
|
|
|
|
public ResponseData orderGoodsConfirmReceipt() { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
Map<String , Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
map.put("logisticsStatus" , "SIGN"); |
|
|
|
|
|
|
|
map.put("status" , 2); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<BsOrderGoods> orderGoodsList = orderGoodsService.getList(map); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (BsOrderGoods goods : orderGoodsList) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 判断时间是否是十天前
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (DateUtil.differentDays(goods.getCreateTime() , new Date()) > 10) { |
|
|
|
|
|
|
|
orderGoodsService.confirmReceipt(goods.getId()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return ResponseMsgUtil.success("url"); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
log.error("error!",e); |
|
|
|
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/deleteMsg",method = RequestMethod.GET) |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
|
|
@ApiOperation(value = "deleteMsg") |
|
|
|
|
|
|
|
public ResponseData deleteMsg() { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
jdService.deleteMsg(); |
|
|
|
|
|
|
|
return ResponseMsgUtil.success("url"); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
log.error("error!",e); |
|
|
|
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/portionRefund",method = RequestMethod.GET) |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
|
|
@ApiOperation(value = "portionRefund") |
|
|
|
|
|
|
|
public ResponseData portionRefund() { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
// 订单退款
|
|
|
|
|
|
|
|
JSONObject refundObj = HuiLianTongUnionCardService.portionRefund("R"+DateUtil.date2String(new Date(), "yyMMddHHmmss") + RandomUtils.number(3, false), " " , new BigDecimal("39.66")); |
|
|
|
|
|
|
|
return ResponseMsgUtil.success(HuiLianTongUnionCardService.resolveResponse(refundObj.getString("data"))); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
log.error("error!",e); |
|
|
|
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/resolveResponse",method = RequestMethod.GET) |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
|
|
@ApiOperation(value = "resolveResponse") |
|
|
|
|
|
|
|
public ResponseData resolveResponse(@RequestParam(value = "data", required = false) String data) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
// 订单退款
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(HuiLianTongUnionCardService.resolveResponse(data)); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
log.error("error!",e); |
|
|
|
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|