更新价格

dev
袁野 1 week ago
parent a1f0999368
commit bb6e786e12
  1. 95
      bweb/src/main/java/com/bweb/controller/TestController.java
  2. 1
      cweb/src/main/java/com/cweb/controller/CommonController.java
  3. 4
      cweb/src/main/java/com/cweb/controller/goods/GoodsController.java
  4. 20
      schedule/src/main/java/com/schedule/controller/JdGoodsSchedule.java
  5. 1
      schedule/src/main/java/com/schedule/controller/OrderGoodsSchedule.java
  6. 4
      service/src/main/java/com/hfkj/jd/JdPostService.java
  7. 6
      service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java
  8. 4
      user/src/main/java/com/user/controller/BsUserController.java

@ -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);
}
}

@ -25,7 +25,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;

@ -142,7 +142,9 @@ public class GoodsController {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("title", title); if (StringUtils.isNotBlank(title)) {
map.put("title", title);
}
map.put("goodsType", goodsType); map.put("goodsType", goodsType);
map.put("showType", showType); map.put("showType", showType);
map.put("price", price); map.put("price", price);

@ -38,16 +38,16 @@ public class JdGoodsSchedule {
private BsOrderGoodsService orderGoodsService; private BsOrderGoodsService orderGoodsService;
//每10分钟执行一次 //每10分钟执行一次
@Scheduled(cron = "0 0/10 * * * ?") // @Scheduled(cron = "0 0/50 * * * ?")
public void deleteMsg() { // public void deleteMsg() {
try { // try {
//
jdService.deleteMsg(); // jdService.deleteMsg();
//
} catch (Exception e) { // } catch (Exception e) {
log.error("HighUserController --> findByUserId() error!", e); // log.error("HighUserController --> findByUserId() error!", e);
} // }
} // }
//每日凌晨12点1秒执行一次 //每日凌晨12点1秒执行一次

@ -38,7 +38,6 @@ public class OrderGoodsSchedule {
@Resource @Resource
private BsOrderGoodsService orderGoodsService; private BsOrderGoodsService orderGoodsService;
@Resource @Resource
private BsOrderStarbucksServiceImpl bsOrderStarbucksService; private BsOrderStarbucksServiceImpl bsOrderStarbucksService;

@ -211,10 +211,10 @@ public class JdPostService {
} }
// 查询售后概要 // 查询售后概要
public static VopAfsGetAfsOutlineResponse getAfsOutline(String token , Long jdOrderId) throws Exception{ public static VopAfsGetAfsOutlineResponse getAfsOutline(String token , Long jdOrderId , String ApplyNo) throws Exception{
JdClient client=new DefaultJdClient(SERVER_URL,token,CommonSysConst.getSysConfig().getJDAppKey(),CommonSysConst.getSysConfig().getJDAppSecret()); JdClient client=new DefaultJdClient(SERVER_URL,token,CommonSysConst.getSysConfig().getJDAppKey(),CommonSysConst.getSysConfig().getJDAppSecret());
VopAfsGetAfsOutlineRequest request=new VopAfsGetAfsOutlineRequest(); VopAfsGetAfsOutlineRequest request=new VopAfsGetAfsOutlineRequest();
request.setThirdApplyId("95154185727487"); request.setThirdApplyId(ApplyNo);
request.setPageSize(20); request.setPageSize(20);
request.setOrderId(jdOrderId); request.setOrderId(jdOrderId);
request.setPageIndex(1); request.setPageIndex(1);

@ -152,6 +152,11 @@ public class BsOrderServiceImpl implements BsOrderService {
/************** 处理业务 ***************/ /************** 处理业务 ***************/
for (OrderChildModel child : order.getOrderChildList()) { for (OrderChildModel child : order.getOrderChildList()) {
if (child.getProductCount() < 1) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "商品数量不能小于1!");
}
// 查询规格 // 查询规格
GoodsSpecs specs = goodsSpecsService.queryDetail(child.getProductSpecId()); GoodsSpecs specs = goodsSpecsService.queryDetail(child.getProductSpecId());
@ -221,6 +226,7 @@ public class BsOrderServiceImpl implements BsOrderService {
deduction.setCouponDiscountPrice(new BigDecimal("0")); deduction.setCouponDiscountPrice(new BigDecimal("0"));
deduction.setCouponDiscountActualPrice(new BigDecimal("0")); deduction.setCouponDiscountActualPrice(new BigDecimal("0"));
} }
// 优惠券优惠金额 + 积分抵扣实际金额 // 优惠券优惠金额 + 积分抵扣实际金额
deduction.setTotalDeductionPrice(deduction.getCouponDiscountActualPrice() deduction.setTotalDeductionPrice(deduction.getCouponDiscountActualPrice()
.add(new BigDecimal(deduction.getIntegralDiscountPrice().toString()).divide(new BigDecimal("100")))); .add(new BigDecimal(deduction.getIntegralDiscountPrice().toString()).divide(new BigDecimal("100"))));

@ -205,7 +205,7 @@ public class BsUserController {
} }
Map<String , Object> map = new HashMap<>(); Map<String , Object> map = new HashMap<>();
map.put("appid" , body.getString("appid")); map.put("appid" , body.getString("appid"));
map.put("phone" , body.getString("phone")); map.put("phone" , body.getString("3674"));
String sign = SignatureUtil.createSign(map , apiMer.getAppSecret()); String sign = SignatureUtil.createSign(map , apiMer.getAppSecret());
if (!body.getString("sign").equals(sign)) { if (!body.getString("sign").equals(sign)) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "签名校验失败!"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "签名校验失败!");
@ -227,7 +227,7 @@ public class BsUserController {
try { try {
Map<String, Object> other = new HashMap<>(); Map<String, Object> other = new HashMap<>();
return ResponseMsgUtil.success(userService.login(UserLoginPlatform.H5, UserLoginType.SMS, "18090580471", "123456", other)); return ResponseMsgUtil.success(userService.login(UserLoginPlatform.H5, UserLoginType.SMS, "13985707609", "123456", other));
} catch (Exception e) { } catch (Exception e) {
log.error("LoginController --> phone() error!", e); log.error("LoginController --> phone() error!", e);

Loading…
Cancel
Save