Merge branch 'feature/mall_product' of http://117.33.142.185:3000/zenghuapei/cyywl_server into feature/mall_product
commit
9ccba3d554
|
@ -60,4 +60,10 @@ public class OrderInfoResponse implements Serializable {
|
||||||
|
|
||||||
@Schema(description = "规格属性值")
|
@Schema(description = "规格属性值")
|
||||||
private String sku;
|
private String sku;
|
||||||
|
|
||||||
|
@Schema(description = "购买东西的详细信息")
|
||||||
|
private String info;
|
||||||
|
private String productName;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class StoreOrderDetailInfoResponse implements Serializable {
|
||||||
private BigDecimal deductionPrice;
|
private BigDecimal deductionPrice;
|
||||||
|
|
||||||
@Schema(description = "优惠券id")
|
@Schema(description = "优惠券id")
|
||||||
private Integer couponId;
|
private Long couponId;
|
||||||
|
|
||||||
@Schema(description = "优惠券金额")
|
@Schema(description = "优惠券金额")
|
||||||
private BigDecimal couponPrice;
|
private BigDecimal couponPrice;
|
||||||
|
|
|
@ -63,14 +63,13 @@ public class AppPhoneRecordController {
|
||||||
return success(null);
|
return success(null);
|
||||||
}
|
}
|
||||||
@PostMapping("delete")
|
@PostMapping("delete")
|
||||||
public CommonResult<Boolean> delete(@RequestBody List<PhoneRecordAdd> data){
|
public CommonResult<Boolean> delete(@RequestBody String data){
|
||||||
String result = HttpRequest.post(phoneUrl+"query/deleteReport")
|
String result = HttpRequest.post(phoneUrl+"query/deleteReport?orderNo="+data)
|
||||||
.header("token",token)
|
.header("token",token)
|
||||||
.body(JSONObject.toJSONString(data))
|
|
||||||
.execute()
|
.execute()
|
||||||
.body();
|
.body();
|
||||||
JSONObject resultJson = JSONObject.parseObject(result);
|
JSONObject resultJson = JSONObject.parseObject(result);
|
||||||
log.info("提报新增返回结果{}",JSONObject.toJSONString(resultJson));
|
log.info("删除返回结果{}",JSONObject.toJSONString(resultJson));
|
||||||
if("0000".equals(resultJson.get("code"))){
|
if("0000".equals(resultJson.get("code"))){
|
||||||
return success(null);
|
return success(null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,6 +63,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.support.TransactionTemplate;
|
import org.springframework.transaction.support.TransactionTemplate;
|
||||||
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
@ -140,6 +141,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private StoreProductAttrValueService storeProductAttrValueService;
|
private StoreProductAttrValueService storeProductAttrValueService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单列表
|
* 订单列表
|
||||||
*
|
*
|
||||||
|
@ -156,7 +158,22 @@ public class OrderServiceImpl implements OrderService {
|
||||||
}
|
}
|
||||||
lambdaQueryWrapper.orderByDesc(StoreOrder::getId);
|
lambdaQueryWrapper.orderByDesc(StoreOrder::getId);
|
||||||
List<StoreOrder> storeOrders = dao.selectList(lambdaQueryWrapper);
|
List<StoreOrder> storeOrders = dao.selectList(lambdaQueryWrapper);
|
||||||
return new PageInfo<>(StoreOrderConvert.INSTANCE.convert(storeOrders));
|
PageInfo<OrderDetailResponse> orderDetailResponsePageInfo = new PageInfo<>(StoreOrderConvert.INSTANCE.convert(storeOrders));
|
||||||
|
if (!CollectionUtils.isEmpty(orderDetailResponsePageInfo.getList())) {
|
||||||
|
orderDetailResponsePageInfo.getList().forEach(e -> {
|
||||||
|
List<StoreOrderInfo> list = storeOrderInfoService.list(Wrappers.<StoreOrderInfo>lambdaQuery().eq(StoreOrderInfo::getOrderId, e.getId()));
|
||||||
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
|
List<OrderInfoResponse> orderInfoList = new ArrayList<>();
|
||||||
|
list.forEach(x -> {
|
||||||
|
OrderInfoResponse response = new OrderInfoResponse();
|
||||||
|
BeanUtils.copyProperties(x, response);
|
||||||
|
orderInfoList.add(response);
|
||||||
|
});
|
||||||
|
e.setOrderInfoList(orderInfoList);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return orderDetailResponsePageInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -167,11 +184,24 @@ public class OrderServiceImpl implements OrderService {
|
||||||
@Override
|
@Override
|
||||||
public StoreOrderDetailInfoResponse detailOrder(String orderId) {
|
public StoreOrderDetailInfoResponse detailOrder(String orderId) {
|
||||||
StoreOrder storeOrder = storeOrderService.getByOderId(orderId);
|
StoreOrder storeOrder = storeOrderService.getByOderId(orderId);
|
||||||
return StoreOrderOneConvert.INSTANCE.convert(storeOrder);
|
List<StoreOrderInfo> list = storeOrderInfoService.list(Wrappers.<StoreOrderInfo>lambdaQuery().eq(StoreOrderInfo::getOrderId, storeOrder.getId()));
|
||||||
|
StoreOrderDetailInfoResponse convert = StoreOrderOneConvert.INSTANCE.convert(storeOrder);
|
||||||
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
|
List<OrderInfoResponse> orderInfoList = new ArrayList<>();
|
||||||
|
list.forEach(e -> {
|
||||||
|
OrderInfoResponse response = new OrderInfoResponse();
|
||||||
|
BeanUtils.copyProperties(e, response);
|
||||||
|
orderInfoList.add(response);
|
||||||
|
});
|
||||||
|
convert.setOrderInfoList(orderInfoList);
|
||||||
|
}
|
||||||
|
|
||||||
|
return convert;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取订单总数
|
* 获取订单总数
|
||||||
|
*
|
||||||
* @param dateLimit 时间端
|
* @param dateLimit 时间端
|
||||||
* @param status String 状态
|
* @param status String 状态
|
||||||
* @return Integer
|
* @return Integer
|
||||||
|
@ -192,6 +222,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取订单金额
|
* 获取订单金额
|
||||||
|
*
|
||||||
* @param dateLimit 时间端
|
* @param dateLimit 时间端
|
||||||
* @param type 支付类型
|
* @param type 支付类型
|
||||||
* @return BigDecimal
|
* @return BigDecimal
|
||||||
|
@ -217,6 +248,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据订单状态获取where条件
|
* 根据订单状态获取where条件
|
||||||
|
*
|
||||||
* @param queryWrapper QueryWrapper<StoreOrder> 表达式
|
* @param queryWrapper QueryWrapper<StoreOrder> 表达式
|
||||||
* @param status String 类型
|
* @param status String 类型
|
||||||
*/
|
*/
|
||||||
|
@ -330,6 +362,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询单条订单
|
* 查询单条订单
|
||||||
|
*
|
||||||
* @param orderNo 订单编号
|
* @param orderNo 订单编号
|
||||||
* @return 退款理由集合
|
* @return 退款理由集合
|
||||||
*/
|
*/
|
||||||
|
@ -342,6 +375,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
}
|
}
|
||||||
return storeOrder;
|
return storeOrder;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单删除
|
* 订单删除
|
||||||
*
|
*
|
||||||
|
@ -779,6 +813,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验预下单商品信息
|
* 校验预下单商品信息
|
||||||
|
*
|
||||||
* @param request 预下单请求参数
|
* @param request 预下单请求参数
|
||||||
* @return OrderInfoVo
|
* @return OrderInfoVo
|
||||||
*/
|
*/
|
||||||
|
@ -866,6 +901,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 再次下单预下单校验
|
* 再次下单预下单校验
|
||||||
|
*
|
||||||
* @param detailRequest 请求参数
|
* @param detailRequest 请求参数
|
||||||
* @return List<OrderInfoDetailVo>
|
* @return List<OrderInfoDetailVo>
|
||||||
*/
|
*/
|
||||||
|
@ -935,6 +971,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 购物车预下单校验
|
* 购物车预下单校验
|
||||||
|
*
|
||||||
* @param request 请求参数
|
* @param request 请求参数
|
||||||
* @param user 用户
|
* @param user 用户
|
||||||
* @return List<OrderInfoDetailVo>
|
* @return List<OrderInfoDetailVo>
|
||||||
|
@ -991,6 +1028,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
});
|
});
|
||||||
return detailVoList;
|
return detailVoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载预下单信息
|
* 加载预下单信息
|
||||||
*
|
*
|
||||||
|
@ -1031,6 +1069,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算订单价格
|
* 计算订单价格
|
||||||
|
*
|
||||||
* @param request 计算订单价格请求对象
|
* @param request 计算订单价格请求对象
|
||||||
* @return ComputedOrderPriceResponse
|
* @return ComputedOrderPriceResponse
|
||||||
*/
|
*/
|
||||||
|
@ -1346,6 +1385,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验商品库存(生成订单)
|
* 校验商品库存(生成订单)
|
||||||
|
*
|
||||||
* @param orderInfoVo 订单详情Vo
|
* @param orderInfoVo 订单详情Vo
|
||||||
* @return List<MyRecord>
|
* @return List<MyRecord>
|
||||||
* skuRecord 扣减库存对象
|
* skuRecord 扣减库存对象
|
||||||
|
@ -1392,6 +1432,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
}
|
}
|
||||||
return recordList;
|
return recordList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取支付配置
|
* 获取支付配置
|
||||||
*
|
*
|
||||||
|
|
|
@ -141,9 +141,8 @@ public class PhoneRecordServiceImpl implements PhoneRecordService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean deletePhoneGear(String orderId) {
|
public Boolean deletePhoneGear(String orderId) {
|
||||||
String result = HttpRequest.post(phoneUrl+"query/deleteReport")
|
String result = HttpRequest.post(phoneUrl+"query/deleteReport?orderNo="+orderId)
|
||||||
.header("token",token)
|
.header("token",token)
|
||||||
.body(JSONObject.toJSONString(orderId))
|
|
||||||
.execute()
|
.execute()
|
||||||
.body();
|
.body();
|
||||||
JSONObject resultJson = JSONObject.parseObject(result);
|
JSONObject resultJson = JSONObject.parseObject(result);
|
||||||
|
|
Loading…
Reference in New Issue