|
|
|
@ -6,19 +6,21 @@ import com.hfkj.common.exception.SysCode; |
|
|
|
|
import com.hfkj.common.utils.*; |
|
|
|
|
import com.hfkj.config.CommonSysConst; |
|
|
|
|
|
|
|
|
|
import com.hfkj.entity.BsOrder; |
|
|
|
|
import com.hfkj.entity.BsOrderGoods; |
|
|
|
|
import com.hfkj.entity.GoodsUserAddress; |
|
|
|
|
import com.hfkj.entity.*; |
|
|
|
|
import com.hfkj.jd.JdPostService; |
|
|
|
|
import com.hfkj.jd.JdService; |
|
|
|
|
import com.hfkj.mer.BsMerPayConfigService; |
|
|
|
|
import com.hfkj.model.ResponseData; |
|
|
|
|
|
|
|
|
|
import com.hfkj.qianzhu.StarbucksService; |
|
|
|
|
import com.hfkj.service.card.BsUserCardService; |
|
|
|
|
import com.hfkj.service.coupon.channel.YouTuCouponService; |
|
|
|
|
import com.hfkj.service.goods.BsOrderGoodsService; |
|
|
|
|
import com.hfkj.service.goods.BsOrderStarbucksService; |
|
|
|
|
import com.hfkj.service.goods.GoodsUserAddressService; |
|
|
|
|
import com.hfkj.service.goods.impl.BsOrderStarbucksServiceImpl; |
|
|
|
|
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; |
|
|
|
@ -70,6 +72,16 @@ public class TestController { |
|
|
|
|
@Resource |
|
|
|
|
private BsOrderService orderService; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private BsOrderStarbucksService orderStarbucksService; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private BsOrderChildService orderChildService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private BsOrderStarbucksServiceImpl bsOrderStarbucksService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/thirdPayResult",method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
@ -161,7 +173,7 @@ public class TestController { |
|
|
|
|
public ResponseData getSkuDetailInfo() { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
GetSkuPoolInfoGoodsResp detail = JdPostService.getSkuDetailInfo(jdService.getToken() , 1235014L).getOpenRpcResult().getResult(); |
|
|
|
|
GetSkuPoolInfoGoodsResp detail = JdPostService.getSkuDetailInfo(jdService.getToken() , 100017491914L).getOpenRpcResult().getResult(); |
|
|
|
|
return ResponseMsgUtil.success(detail); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
@ -176,7 +188,7 @@ public class TestController { |
|
|
|
|
public ResponseData getSkuImageList() { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(JdPostService.getSkuImageList(jdService.getToken() , "1235014")); |
|
|
|
|
return ResponseMsgUtil.success(JdPostService.getSkuImageList(jdService.getToken() , "100017491914")); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("error!",e); |
|
|
|
@ -190,7 +202,7 @@ public class TestController { |
|
|
|
|
public ResponseData getSellPrice() { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(JdPostService.getSellPrice(jdService.getToken() , "1235014")); |
|
|
|
|
return ResponseMsgUtil.success(JdPostService.getSellPrice(jdService.getToken() , "100017491914")); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("error!",e); |
|
|
|
@ -226,6 +238,20 @@ public class TestController { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/skuList",method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "skuList") |
|
|
|
|
public ResponseData skuList() { |
|
|
|
|
try { |
|
|
|
|
return ResponseMsgUtil.success(jdService.skuList()); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("error!",e); |
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/queryTransByVopNormal",method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "消息消费") |
|
|
|
@ -504,14 +530,33 @@ public class TestController { |
|
|
|
|
public ResponseData phgSignLogin() { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
Map<String , Object> map = new HashMap<>(); |
|
|
|
|
map.put("appid" , "20241266600"); |
|
|
|
|
map.put("phone" , "18390580471"); |
|
|
|
|
map.put("sign" , SignatureUtil.createSign(map , "BCB83776BDA7F609FBE99BBB8AC33840")); |
|
|
|
|
map.put("platform" , "HIGH"); |
|
|
|
|
map.put("type" , "HIGH_SIGN"); |
|
|
|
|
return ResponseMsgUtil.success( HttpsUtils.doPost("http://localhost:9704/user/client/phgSignLogin" , map , new HashMap<>())); |
|
|
|
|
Map<String , Object> objectMap = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
objectMap.put("status" , 10); |
|
|
|
|
|
|
|
|
|
List<BsOrderStarbucks> orderStarbucks = orderStarbucksService.getList(objectMap); |
|
|
|
|
|
|
|
|
|
for (BsOrderStarbucks starbucks : orderStarbucks) { |
|
|
|
|
|
|
|
|
|
if (starbucks != null) { |
|
|
|
|
// 查询星巴克订单详情
|
|
|
|
|
BsOrderChild child = orderChildService.getDetail(starbucks.getChildOrderNo()); |
|
|
|
|
|
|
|
|
|
// 查询星巴克订单详情
|
|
|
|
|
Map<String , Object> orderMap = new HashMap<>(); |
|
|
|
|
orderMap.put("orderNo" , child.getChannelOrderNo()); |
|
|
|
|
JSONObject objectOrder = StarbucksService.starbucksOrder(orderMap); |
|
|
|
|
if (objectOrder != null) { |
|
|
|
|
// 订单数据
|
|
|
|
|
JSONObject order = objectOrder.getJSONObject("data"); |
|
|
|
|
// 修改订单数据
|
|
|
|
|
bsOrderStarbucksService.updateOrderStatus(child.getOrderNo() , order.getInteger("status")); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
return ResponseMsgUtil.success(""); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("error!",e); |
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|