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

Commit c81c09a0 authored by 胡佳晨's avatar 胡佳晨

pos机出货核销详情接口

parent aba34028
package com.liquidnet.service.goblin.service;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.GoblinSelfMarketingVo;
import com.liquidnet.service.goblin.dto.vo.GoblinShowStoreInfoVo;
import com.liquidnet.service.goblin.dto.vo.GoblinZhengzaiGoodVo;
import com.liquidnet.service.goblin.dto.vo.GoblinZhengzaiPushVo;
import com.liquidnet.service.goblin.dto.vo.*;
import java.util.List;
......@@ -49,6 +46,8 @@ public interface IGoblinAppZhengzaiService {
*/
ResponseDto<List<GoblinZhengzaiPushVo>> orderPushDetails(String offCode,String marketId);
ResponseDto<GoblinAppOrderDetailsVo> orderPushDetailsPos(String offCode, String marketId);
/**
* 订单绑定
* @param uid
......
......@@ -22,7 +22,7 @@ public class GoblinAppZhengzaiController {
@Autowired
IGoblinAppZhengzaiService goblinAppZhengzaiService;
// @Autowired
// @Autowired
// IGoblinOrderService goblinOrderService;
@Autowired
IGoblinOrderAppService goblinOrderAppService;
......@@ -81,7 +81,7 @@ public class GoblinAppZhengzaiController {
})
public ResponseDto<Boolean> orderPush(@RequestParam("offCode") @Valid String offCode,
@RequestParam("marketId") @Valid String marketId) {
return goblinAppZhengzaiService.orderPush(offCode, "ZZ" +marketId);
return goblinAppZhengzaiService.orderPush(offCode, "ZZ" + marketId);
}
@PostMapping("orderPushDetails")
......@@ -96,6 +96,18 @@ public class GoblinAppZhengzaiController {
return goblinAppZhengzaiService.orderPushDetails(offCode, "ZZ" + marketId);
}
@PostMapping("orderPushDetailsPos")
@ApiOperation("正在下单-出货详情-Pos")
@ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "offCode", value = "取货码", example = "1"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "marketId", value = "活动id", example = "1"),
})
public ResponseDto<GoblinAppOrderDetailsVo> orderPushDetailsPos(@RequestParam("offCode") @Valid String offCode,
@RequestParam("marketId") @Valid String marketId) {
return goblinAppZhengzaiService.orderPushDetailsPos(offCode, "ZZ" + marketId);
}
@PostMapping("orderBind")
@ApiOperation("正在下单-绑定订单号")
@ApiResponse(code = 200, message = "接口返回对象参数")
......
......@@ -8,6 +8,7 @@ import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.goblin.constant.GoblinStatusConst;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.service.IGoblinAppZhengzaiService;
import com.liquidnet.service.goblin.service.IGoblinOrderAppService;
import com.liquidnet.service.goblin.util.*;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -35,6 +36,8 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService {
QueueUtils queueUtils;
@Autowired
GoblinOrderUtils orderUtils;
@Autowired
IGoblinOrderAppService goblinOrderAppService;
@Override
......@@ -186,6 +189,38 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService {
return ResponseDto.success(listVo);
}
@Override
public ResponseDto<GoblinAppOrderDetailsVo> orderPushDetailsPos(String offCode, String marketId) {
String[] orderIds = redisUtils.getOffCode(offCode);
String uid = CurrentUtil.getCurrentUid();
GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid);
if (storeInfoVo == null) {
return ResponseDto.failure("参数错误");
}
if (orderIds == null) {
return ResponseDto.failure("订单不存在");
} else {
for (String orderId : orderIds) {
GoblinStoreOrderVo storeOrderVo = redisUtils.getGoblinOrder(orderId);
if (!storeInfoVo.getStoreId().equals(storeOrderVo.getStoreId()) || !(storeOrderVo.getWriteOffCode().equals(offCode))) {
continue;
}
if (storeOrderVo.getStatus().equals(GoblinStatusConst.Status.ORDER_STATUS_0.getValue())) {
return ResponseDto.failure("订单未支付");
}
// if (storeOrderVo.getStatus().equals(GoblinStatusConst.Status.ORDER_STATUS_4.getValue())) {
// return ResponseDto.failure("出货失败,订单已核销");
// }
if (!storeOrderVo.getMarketId().equals(marketId)) {
return ResponseDto.failure("活动不符");
}
ResponseDto<GoblinAppOrderDetailsVo> responseVo = goblinOrderAppService.orderDetails(storeOrderVo.getOrderId(), storeOrderVo.getUserId());
return ResponseDto.success(responseVo.getData());
}
}
return ResponseDto.failure("暂无数据");
}
@Override
public ResponseDto<Boolean> orderBind(String uid, String masterCode) {
String[] orderIds = redisUtils.getMasterCode(masterCode);
......
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