记得上下班打卡 | git大法好,push需谨慎

Commit 9d64947e authored by 胡佳晨's avatar 胡佳晨

提交 添加活动增加演出id

parent 59b9283a
...@@ -12,6 +12,9 @@ public class GoblinStoreZhengzaiParam { ...@@ -12,6 +12,9 @@ public class GoblinStoreZhengzaiParam {
@ApiModelProperty(required = false, value = "活动id[添加操作不需要]", example = "1") @ApiModelProperty(required = false, value = "活动id[添加操作不需要]", example = "1")
private String marketId; private String marketId;
@ApiModelProperty(required = true, value = "演出id", example = "1")
private String performanceId;
@ApiModelProperty(required = true, value = "商铺id", example = "活动名称") @ApiModelProperty(required = true, value = "商铺id", example = "活动名称")
private String storeId; private String storeId;
......
...@@ -24,6 +24,8 @@ public class GoblinSelfMarketingVo implements Serializable, Cloneable { ...@@ -24,6 +24,8 @@ public class GoblinSelfMarketingVo implements Serializable, Cloneable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "官方营销表id") @ApiModelProperty(value = "官方营销表id")
private String selfMarketId; private String selfMarketId;
@ApiModelProperty(value = "演出id")
private String performanceId;
@ApiModelProperty(value = "营销名称") @ApiModelProperty(value = "营销名称")
private String name; private String name;
@ApiModelProperty(value = "营销类型[1-正在下单]") @ApiModelProperty(value = "营销类型[1-正在下单]")
......
...@@ -97,6 +97,8 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable { ...@@ -97,6 +97,8 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable {
private String logisticsCode; private String logisticsCode;
@ApiModelProperty(value = " ip") @ApiModelProperty(value = " ip")
private String ipAddress; private String ipAddress;
@ApiModelProperty(value = " paymentId")
private String paymentId;
@ApiModelProperty(value = " 创建时间") @ApiModelProperty(value = " 创建时间")
private String createdAt; private String createdAt;
......
...@@ -28,4 +28,9 @@ public interface IGoblinStoreOrderService { ...@@ -28,4 +28,9 @@ public interface IGoblinStoreOrderService {
ResponseDto<Boolean> changeAddress(String orderId, String expressContacts, String expressPhone, String expressAddressDetail); ResponseDto<Boolean> changeAddress(String orderId, String expressContacts, String expressPhone, String expressAddressDetail);
ResponseDto<Boolean> changeSkuPrice(String orderId, String orderSkuId, BigDecimal price); ResponseDto<Boolean> changeSkuPrice(String orderId, String orderSkuId, BigDecimal price);
ResponseDto<Boolean> refundOrderSku(String orderId, String orderSkuId, BigDecimal price);
ResponseDto<Boolean> refundOrder(String orderId, BigDecimal orderPrice, BigDecimal expressPrice);
} }
...@@ -83,7 +83,7 @@ public class GoblinSelfZhengzaiController extends BaseController { ...@@ -83,7 +83,7 @@ public class GoblinSelfZhengzaiController extends BaseController {
@ApiResponse(code = 200, message = "接口返回对象参数") @ApiResponse(code = 200, message = "接口返回对象参数")
@ResponseBody @ResponseBody
public ResponseDto<Boolean> purchasingInsert(GoblinStoreZhengzaiParam goblinStoreZhengzaiParam) { public ResponseDto<Boolean> purchasingInsert(GoblinStoreZhengzaiParam goblinStoreZhengzaiParam) {
return goblinZhengzaiMarketService.zhengzaiInsert(goblinStoreZhengzaiParam.getName(), goblinStoreZhengzaiParam.getStartTime(), goblinStoreZhengzaiParam.getEndTime()); return goblinZhengzaiMarketService.zhengzaiInsert(goblinStoreZhengzaiParam.getName(), goblinStoreZhengzaiParam.getPerformanceId(), goblinStoreZhengzaiParam.getStartTime(), goblinStoreZhengzaiParam.getEndTime());
} }
@PostMapping("zhengzai/change") @PostMapping("zhengzai/change")
......
...@@ -40,12 +40,12 @@ public interface IGoblinZhengzaiMarketService { ...@@ -40,12 +40,12 @@ public interface IGoblinZhengzaiMarketService {
/** /**
* 添加 正在下单活动 * 添加 正在下单活动
* *
* @param purchaseName 秒杀活动名称 * @param purchaseName 活动名称
* @param st 开始时间 * @param st 开始时间
* @param et 结束时间 * @param et 结束时间
* @return * @return
*/ */
ResponseDto<Boolean> zhengzaiInsert(String purchaseName, String st, String et); ResponseDto<Boolean> zhengzaiInsert(String purchaseName, String performancesId, String st, String et);
/** /**
* @param marketId 活动id * @param marketId 活动id
...@@ -89,7 +89,7 @@ public interface IGoblinZhengzaiMarketService { ...@@ -89,7 +89,7 @@ public interface IGoblinZhengzaiMarketService {
* @param spuId spuId * @param spuId spuId
* @return * @return
*/ */
ResponseDto<Boolean> zhengzaiSkuDel(String marketId,String storeId, String spuId); ResponseDto<Boolean> zhengzaiSkuDel(String marketId, String storeId, String spuId);
/** /**
...@@ -106,7 +106,7 @@ public interface IGoblinZhengzaiMarketService { ...@@ -106,7 +106,7 @@ public interface IGoblinZhengzaiMarketService {
* @param storeId * @param storeId
* @return * @return
*/ */
ResponseDto<Boolean> zhengzaiStore(String marketId, String storeId, String showTime,Integer delTag); ResponseDto<Boolean> zhengzaiStore(String marketId, String storeId, String showTime, Integer delTag);
/** /**
* 查看详情(参加活动的商品列表) * 查看详情(参加活动的商品列表)
......
...@@ -113,11 +113,12 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer ...@@ -113,11 +113,12 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
} }
@Override @Override
public ResponseDto<Boolean> zhengzaiInsert(String purchaseName, String st, String et) { public ResponseDto<Boolean> zhengzaiInsert(String purchaseName,String performanceId, String st, String et) {
GoblinSelfMarketing selfMarketing = GoblinSelfMarketing.getNew(); GoblinSelfMarketing selfMarketing = GoblinSelfMarketing.getNew();
String SelfMarketId = IDGenerator.nextTimeId2(); String SelfMarketId = IDGenerator.nextTimeId2();
selfMarketing.setSelfMarketId(SelfMarketId); selfMarketing.setSelfMarketId(SelfMarketId);
selfMarketing.setName(purchaseName); selfMarketing.setName(purchaseName);
selfMarketing.setPerformanceId(performanceId);
selfMarketing.setType(GoblinStatusConst.MarketingStatus.SELF_TYPE_ZHENGZAI.getValue()); selfMarketing.setType(GoblinStatusConst.MarketingStatus.SELF_TYPE_ZHENGZAI.getValue());
selfMarketing.setStartTime(LocalDateTime.parse(st, DTF_YMD_HMS)); selfMarketing.setStartTime(LocalDateTime.parse(st, DTF_YMD_HMS));
selfMarketing.setEndTime(LocalDateTime.parse(et, DTF_YMD_HMS)); selfMarketing.setEndTime(LocalDateTime.parse(et, DTF_YMD_HMS));
......
...@@ -96,7 +96,8 @@ liquidnet: ...@@ -96,7 +96,8 @@ liquidnet:
pay: http://devdragon.zhengzai.tv/dragon/pay/dragonPay pay: http://devdragon.zhengzai.tv/dragon/pay/dragonPay
check: http://devdragon.zhengzai.tv/dragon/pay/checkOrder check: http://devdragon.zhengzai.tv/dragon/pay/checkOrder
localUrl: http://devorder.zhengzai.tv/order/order/syncOrder localUrl: http://devorder.zhengzai.tv/order/order/syncOrder
goblinUrl: http://devorder.zhengzai.tv/order/goblin/syncOrder goblinUrl: http://devgoblin.zhengzai.tv/goblin/order/pay/syncOrder
goblinRefundUrl: http://devgoblin.zhengzai.tv/goblin/store/order/refundSyncOrder
candy: candy:
url: http://devcandy.zhengzai.tv/candy url: http://devcandy.zhengzai.tv/candy
goblin: goblin:
......
...@@ -31,6 +31,11 @@ public class GoblinSelfMarketing implements Serializable, Cloneable { ...@@ -31,6 +31,11 @@ public class GoblinSelfMarketing implements Serializable, Cloneable {
*/ */
private String selfMarketId; private String selfMarketId;
/**
* 演出id
*/
private String performanceId;
/** /**
* 营销名称 * 营销名称
*/ */
......
...@@ -127,14 +127,28 @@ public class GoblinStoreOrderController { ...@@ -127,14 +127,28 @@ public class GoblinStoreOrderController {
@ApiOperation(value = "整单退款") @ApiOperation(value = "整单退款")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", required = false, dataType = "String", name = "orderId", value = "订单id"), @ApiImplicitParam(type = "form", required = false, dataType = "String", name = "orderId", value = "订单id"),
@ApiImplicitParam(type = "form", required = false, dataType = "BigDecimal", name = "price", value = "退款金额"), @ApiImplicitParam(type = "form", required = false, dataType = "BigDecimal", name = "orderPrice", value = "退款订单金额"),
@ApiImplicitParam(type = "form", required = false, dataType = "BigDecimal", name = "expressPrice", value = "退款快递金额"),
}) })
@GetMapping(value = "refund") @GetMapping(value = "refund")
public ResponseDto<Boolean> refundOrder(@RequestParam(value = "orderId", required = true) @Valid String orderId, public ResponseDto<Boolean> refundOrder(@RequestParam(value = "orderId", required = true) @Valid String orderId,
@RequestParam(value = "price", required = true) @Valid BigDecimal price) { @RequestParam(value = "orderPrice", required = true) @Valid BigDecimal orderPrice,
@RequestParam(value = "expressPrice", required = true) @Valid BigDecimal expressPrice) {
return ResponseDto.success(); return ResponseDto.success();
} }
@ApiOperation(value = "退款回调")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = false, dataType = "String", name = "orderId", value = "订单id"),
@ApiImplicitParam(type = "form", required = false, dataType = "BigDecimal", name = "orderPrice", value = "退款订单金额"),
@ApiImplicitParam(type = "form", required = false, dataType = "BigDecimal", name = "expressPrice", value = "退款快递金额"),
})
@GetMapping(value = "refundSyncOrder")
public ResponseDto<Boolean> refundSyncOrder(@RequestParam(value = "orderId", required = true) @Valid String orderId,
@RequestParam(value = "orderPrice", required = true) @Valid BigDecimal orderPrice,
@RequestParam(value = "expressPrice", required = true) @Valid BigDecimal expressPrice) {
return ResponseDto.success();
}
// @ApiOperation(value = "发货") // @ApiOperation(value = "发货")
// @ApiImplicitParams({ // @ApiImplicitParams({
// @ApiImplicitParam(type = "form", required = false, dataType = "String", name = "orderId", value = "订单id"), // @ApiImplicitParam(type = "form", required = false, dataType = "String", name = "orderId", value = "订单id"),
......
...@@ -615,6 +615,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -615,6 +615,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
orderVo.setPayTime(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").format(storeOrder.getPayTime())); orderVo.setPayTime(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").format(storeOrder.getPayTime()));
orderVo.setWriteOffCode(storeOrder.getWriteOffCode()); orderVo.setWriteOffCode(storeOrder.getWriteOffCode());
orderVo.setStatus(storeOrder.getStatus()); orderVo.setStatus(storeOrder.getStatus());
orderVo.setPaymentId(syncOrderParam.getPaymentId());
orderVo.setOrderSkuVoIds(skuList); orderVo.setOrderSkuVoIds(skuList);
redisUtils.setGoblinOrder(orderId, orderVo); redisUtils.setGoblinOrder(orderId, orderVo);
//删除未支付订单 //删除未支付订单
......
...@@ -302,6 +302,48 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -302,6 +302,48 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
return ResponseDto.success(); return ResponseDto.success();
} }
@Override
public ResponseDto<Boolean> refundOrderSku(String orderId, String orderSkuId, BigDecimal price) {
String uid = CurrentUtil.getCurrentUid();
LocalDateTime now = LocalDateTime.now();
GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid);
if (storeInfoVo == null) {
return ResponseDto.failure("无法查看");
}
GoblinStoreOrderVo orderVo = redisUtils.getGoblinOrder(orderId);
if (orderVo == null || !orderVo.getStoreId().equals(storeInfoVo.getStoreId())) {
return ResponseDto.failure("无法查看");
}
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId);
if (orderSkuVo == null) {
return ResponseDto.failure("不存在");
}
orderSkuVo.setPriceRefund(orderSkuVo.getPriceRefund().add(price));
orderVo.setPriceRefund(orderVo.getPriceRefund().add(price));
if (orderSkuVo.getPriceRefund().compareTo(orderSkuVo.getSkuPriceActual()) == 0) {
orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_6.getValue());
}
if (orderVo.getPriceRefund().compareTo(orderVo.getPriceActual()) == 0) {
orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_6.getValue());
}
return null;
}
@Override
public ResponseDto<Boolean> refundOrder(String orderId, BigDecimal orderPrice, BigDecimal expressPrice) {
String uid = CurrentUtil.getCurrentUid();
LocalDateTime now = LocalDateTime.now();
GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid);
if (storeInfoVo == null) {
return ResponseDto.failure("无法查看");
}
GoblinStoreOrderVo orderVo = redisUtils.getGoblinOrder(orderId);
if (orderVo == null || !orderVo.getStoreId().equals(storeInfoVo.getStoreId())) {
return ResponseDto.failure("无法查看");
}
return null;
}
private GoblinOrderOperationLog initLog(String orderId, String uid, LocalDateTime now) { private GoblinOrderOperationLog initLog(String orderId, String uid, LocalDateTime now) {
GoblinOrderOperationLog log = GoblinOrderOperationLog.getNew(); GoblinOrderOperationLog log = GoblinOrderOperationLog.getNew();
log.setOrderId(orderId); log.setOrderId(orderId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment