Commit 3698c7af by huluobin

逗号分隔

parent 7b563b12
...@@ -2,8 +2,7 @@ package com.gogirl.application.order.serve; ...@@ -2,8 +2,7 @@ package com.gogirl.application.order.serve;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.gogirl.domain.order.serve.OwnProduce; import com.gogirl.domain.order.serve.OwnProduce;
import com.gogirl.shared.order.OrderServeOwnProduceCommand; import com.gogirl.shared.order.OwnProduceCommand;
import com.gogirl.shared.order.ScheduleServeOwnProduceCommand;
/** /**
* <p> * <p>
...@@ -20,12 +19,6 @@ public interface IOwnProduceService extends IService<OwnProduce> { ...@@ -20,12 +19,6 @@ public interface IOwnProduceService extends IService<OwnProduce> {
* *
* @param command * @param command
*/ */
void saveOrUpdateScheduleOwnProduce(ScheduleServeOwnProduceCommand command); OwnProduce saveOrUpdateOwnProduce(OwnProduceCommand command);
/**
* 新增或者更新订单自带款式技法
*
* @param command
*/
void saveOrUpdateOrderOwnProduce(OrderServeOwnProduceCommand command);
} }
...@@ -121,6 +121,8 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order ...@@ -121,6 +121,8 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order
private CouponService couponService; private CouponService couponService;
@Resource @Resource
private ScheduleServeMapper scheduleServeMapper; private ScheduleServeMapper scheduleServeMapper;
@Resource
OwnProduceMapper ownProduceMapper;
@Override @Override
public BigDecimal countSumPay(Integer customerId, Integer departmentId) { public BigDecimal countSumPay(Integer customerId, Integer departmentId) {
...@@ -424,6 +426,12 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order ...@@ -424,6 +426,12 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order
//in查询替换mybatis-resultMap-join查询分页的 服务详情 //in查询替换mybatis-resultMap-join查询分页的 服务详情
List<OrderServe> orderServeList = orderServeMapper.selectList(new LambdaQueryWrapper<OrderServe>().in(OrderServe::getOrderId, orderIdList)); List<OrderServe> orderServeList = orderServeMapper.selectList(new LambdaQueryWrapper<OrderServe>().in(OrderServe::getOrderId, orderIdList));
Map<Integer, OwnProduce> ownProduceMap = ownProduceMapper.selectBatchIds(orderServeList.stream().map(OrderServe::getOwnProduceId).collect(Collectors.toList())).stream().collect(Collectors.toMap(OwnProduce::getId, a -> a, (k1, k2) -> k1));
orderServeList.forEach(orderServe -> {
if (orderServe.getOwnProduceId() != null) {
orderServe.setOwnProduce(ownProduceMap.get(orderServe.getOwnProduceId()));
}
});
Map<Integer, List<OrderServe>> orderServeMap = orderServeList.stream().collect(Collectors.groupingBy(OrderServe::getOrderId)); Map<Integer, List<OrderServe>> orderServeMap = orderServeList.stream().collect(Collectors.groupingBy(OrderServe::getOrderId));
//预约详情 //预约详情
...@@ -1144,6 +1152,12 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order ...@@ -1144,6 +1152,12 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order
Integer id = orderManage.getId(); Integer id = orderManage.getId();
//1、订单详情 //1、订单详情
List<OrderServe> orderServeList = orderServeMapper.selectList(new LambdaQueryWrapper<OrderServe>().eq(OrderServe::getOrderId, id)); List<OrderServe> orderServeList = orderServeMapper.selectList(new LambdaQueryWrapper<OrderServe>().eq(OrderServe::getOrderId, id));
Map<Integer, OwnProduce> ownProduceMap = ownProduceMapper.selectBatchIds(orderServeList.stream().map(OrderServe::getOwnProduceId).collect(Collectors.toList())).stream().collect(Collectors.toMap(OwnProduce::getId, a -> a, (k1, k2) -> k1));
orderServeList.forEach(orderServe -> {
if (orderServe.getOwnProduceId() != null) {
orderServe.setOwnProduce(ownProduceMap.get(orderServe.getOwnProduceId()));
}
});
orderManage.setListOrderServer(orderServeList); orderManage.setListOrderServer(orderServeList);
//2、订单关联的卡券 //2、订单关联的卡券
......
...@@ -4,19 +4,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; ...@@ -4,19 +4,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gogirl.application.order.serve.IOwnProduceService; import com.gogirl.application.order.serve.IOwnProduceService;
import com.gogirl.application.order.serve.IOwnProduceTechniqueSkuService; import com.gogirl.application.order.serve.IOwnProduceTechniqueSkuService;
import com.gogirl.domain.order.serve.OrderServe;
import com.gogirl.domain.order.serve.OwnProduce; import com.gogirl.domain.order.serve.OwnProduce;
import com.gogirl.domain.order.serve.OwnProduceTechniqueSku; import com.gogirl.domain.order.serve.OwnProduceTechniqueSku;
import com.gogirl.domain.order.serve.ScheduleServe;
import com.gogirl.domain.product.serve.TechniqueSku; import com.gogirl.domain.product.serve.TechniqueSku;
import com.gogirl.infrastructure.common.exception.RRException;
import com.gogirl.infrastructure.mapper.order.serve.OrderServeMapper; import com.gogirl.infrastructure.mapper.order.serve.OrderServeMapper;
import com.gogirl.infrastructure.mapper.order.serve.OwnProduceMapper; import com.gogirl.infrastructure.mapper.order.serve.OwnProduceMapper;
import com.gogirl.infrastructure.mapper.order.serve.ScheduleServeMapper; import com.gogirl.infrastructure.mapper.order.serve.ScheduleServeMapper;
import com.gogirl.infrastructure.mapper.product.serve.TechniqueSkuMapper; import com.gogirl.infrastructure.mapper.product.serve.TechniqueSkuMapper;
import com.gogirl.shared.order.OrderServeOwnProduceCommand; import com.gogirl.shared.order.OwnProduceCommand;
import com.gogirl.shared.order.OwnProduceTechniqueSkuCommand;
import com.gogirl.shared.order.ScheduleServeOwnProduceCommand;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -48,46 +43,21 @@ public class OwnProduceServiceImpl extends ServiceImpl<OwnProduceMapper, OwnProd ...@@ -48,46 +43,21 @@ public class OwnProduceServiceImpl extends ServiceImpl<OwnProduceMapper, OwnProd
OrderServeMapper orderServeMapper; OrderServeMapper orderServeMapper;
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void saveOrUpdateScheduleOwnProduce(ScheduleServeOwnProduceCommand command) {
OwnProduce ownProduce = this.saveOrUpdateOwnProduce(command.getOwnProduceId(), command.getOwnProduceTechniqueSkuCommandList());
ScheduleServe scheduleServe = scheduleServeMapper.selectById(command.getScheduleServeId());
if (scheduleServe.getServeName().trim().equals(ScheduleServe.OWN_PRODUCE_KEY)) {
throw new RRException("非自带款式不需要选择款式技法");
}
scheduleServe.setOwnProduceId(ownProduce.getId());
scheduleServeMapper.updateById(scheduleServe);
}
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override public OwnProduce saveOrUpdateOwnProduce(OwnProduceCommand command) {
public void saveOrUpdateOrderOwnProduce(OrderServeOwnProduceCommand command) {
OwnProduce ownProduce = this.saveOrUpdateOwnProduce(command.getOwnProduceId(), command.getOwnProduceTechniqueSkuCommandList());
OrderServe orderServe = orderServeMapper.selectById(command.getOrderServeId());
if (orderServe.getServeName().trim().equals(ScheduleServe.OWN_PRODUCE_KEY)) {
throw new RRException("非自带款式不需要选择款式技法");
}
orderServe.setOwnProduceId(ownProduce.getId());
orderServeMapper.updateById(orderServe);
}
private OwnProduce saveOrUpdateOwnProduce(Integer ownProduceId, List<OwnProduceTechniqueSkuCommand> ownProduceTechniqueSkuCommandList) {
OwnProduce ownProduce; OwnProduce ownProduce;
if (ownProduceId == null) { if (command.getOwnProduceId() == null) {
ownProduce = new OwnProduce(); ownProduce = new OwnProduce();
this.save(ownProduce); this.save(ownProduce);
} else { } else {
ownProduce = this.getById(ownProduceId); ownProduce = this.getById(command.getOwnProduceId());
ownProduceTechniqueSkuService.remove(new LambdaQueryWrapper<OwnProduceTechniqueSku>().eq(OwnProduceTechniqueSku::getOwnProduceId, ownProduce.getId())); ownProduceTechniqueSkuService.remove(new LambdaQueryWrapper<OwnProduceTechniqueSku>().eq(OwnProduceTechniqueSku::getOwnProduceId, ownProduce.getId()));
} }
List<OwnProduceTechniqueSku> ownProduceTechniqueSkuList = ownProduceTechniqueSkuCommandList.stream() List<OwnProduceTechniqueSku> ownProduceTechniqueSkuList = command.getOwnProduceTechniqueSkuCommandList().stream()
.map(ownProduceTechniqueSkuCommand -> { .map(ownProduceTechniqueSkuCommand -> {
OwnProduceTechniqueSku ownProduceTechniqueSku = new OwnProduceTechniqueSku(); OwnProduceTechniqueSku ownProduceTechniqueSku = new OwnProduceTechniqueSku();
ownProduceTechniqueSku.setQuantity(ownProduceTechniqueSkuCommand.getQuantity()); ownProduceTechniqueSku.setQuantity(ownProduceTechniqueSkuCommand.getQuantity());
...@@ -121,6 +91,7 @@ public class OwnProduceServiceImpl extends ServiceImpl<OwnProduceMapper, OwnProd ...@@ -121,6 +91,7 @@ public class OwnProduceServiceImpl extends ServiceImpl<OwnProduceMapper, OwnProd
return techniqueSku.getName() + "x" + ownProduceTechniqueSku.getQuantity(); return techniqueSku.getName() + "x" + ownProduceTechniqueSku.getQuantity();
}) })
.collect(Collectors.joining(","))); .collect(Collectors.joining(",")));
return ownProduce; return ownProduce;
} }
} }
...@@ -30,6 +30,7 @@ import com.gogirl.infrastructure.common.util.StringUtils; ...@@ -30,6 +30,7 @@ import com.gogirl.infrastructure.common.util.StringUtils;
import com.gogirl.infrastructure.config.property.GogirlProperties; import com.gogirl.infrastructure.config.property.GogirlProperties;
import com.gogirl.infrastructure.mapper.market.discount.LeisureDiscountConfigMapper; import com.gogirl.infrastructure.mapper.market.discount.LeisureDiscountConfigMapper;
import com.gogirl.infrastructure.mapper.order.serve.OrderManageMapper; import com.gogirl.infrastructure.mapper.order.serve.OrderManageMapper;
import com.gogirl.infrastructure.mapper.order.serve.OwnProduceMapper;
import com.gogirl.infrastructure.mapper.order.serve.ScheduleManageMapper; import com.gogirl.infrastructure.mapper.order.serve.ScheduleManageMapper;
import com.gogirl.infrastructure.mapper.order.serve.ScheduleServeMapper; import com.gogirl.infrastructure.mapper.order.serve.ScheduleServeMapper;
import com.gogirl.infrastructure.mapper.product.purchase.PurchaseSkuMapper; import com.gogirl.infrastructure.mapper.product.purchase.PurchaseSkuMapper;
...@@ -81,6 +82,7 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper, ...@@ -81,6 +82,7 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
private final StoreTechnicianMapper storeTechnicianMapper; private final StoreTechnicianMapper storeTechnicianMapper;
private final OrderManageMapper orderManageMapper; private final OrderManageMapper orderManageMapper;
private final StoreManageMapper storeManageMapper; private final StoreManageMapper storeManageMapper;
private final OwnProduceMapper ownProduceMapper;
private final StoreClassesTechnicianService storeClassesTechnicianService; private final StoreClassesTechnicianService storeClassesTechnicianService;
...@@ -1032,6 +1034,13 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper, ...@@ -1032,6 +1034,13 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
List<ScheduleServe> scheduleServeList = scheduleServeMapper.selectList(new LambdaQueryWrapper<ScheduleServe>().eq(ScheduleServe::getSchId, id)); List<ScheduleServe> scheduleServeList = scheduleServeMapper.selectList(new LambdaQueryWrapper<ScheduleServe>().eq(ScheduleServe::getSchId, id));
Map<Integer, OwnProduce> ownProduceMap = ownProduceMapper.selectBatchIds(scheduleServeList.stream().map(ScheduleServe::getOwnProduceId).collect(Collectors.toList())).stream().collect(Collectors.toMap(OwnProduce::getId, a -> a, (k1, k2) -> k1));
scheduleServeList.forEach(scheduleServe -> {
if (scheduleServe.getOwnProduceId() != null) {
scheduleServe.setOwnProduce(ownProduceMap.get(scheduleServe.getOwnProduceId()));
}
});
Set<ScheduleServe> set = new TreeSet<>(Comparator.comparing(o -> o.getSchId() + ";" + o.getServeId())); Set<ScheduleServe> set = new TreeSet<>(Comparator.comparing(o -> o.getSchId() + ";" + o.getServeId()));
if (ListUtil.isNotEmpty(scheduleServeList)) { if (ListUtil.isNotEmpty(scheduleServeList)) {
set.addAll(scheduleServeList); set.addAll(scheduleServeList);
...@@ -1084,6 +1093,13 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper, ...@@ -1084,6 +1093,13 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
List<ScheduleServe> scheduleServeList = scheduleServeMapper.selectList(new LambdaQueryWrapper<ScheduleServe>().in(ScheduleServe::getSchId, page.getRecords().stream().map(ScheduleManage::getId).collect(Collectors.toList()))); List<ScheduleServe> scheduleServeList = scheduleServeMapper.selectList(new LambdaQueryWrapper<ScheduleServe>().in(ScheduleServe::getSchId, page.getRecords().stream().map(ScheduleManage::getId).collect(Collectors.toList())));
Map<Integer, List<ScheduleServe>> scheduleServeMap = scheduleServeList.stream().collect(Collectors.groupingBy(ScheduleServe::getSchId)); Map<Integer, List<ScheduleServe>> scheduleServeMap = scheduleServeList.stream().collect(Collectors.groupingBy(ScheduleServe::getSchId));
Map<Integer, OwnProduce> ownProduceMap = ownProduceMapper.selectBatchIds(scheduleServeList.stream().map(ScheduleServe::getOwnProduceId).collect(Collectors.toList())).stream().collect(Collectors.toMap(OwnProduce::getId, a -> a, (k1, k2) -> k1));
scheduleServeList.forEach(scheduleServe -> {
if (scheduleServe.getOwnProduceId() != null) {
scheduleServe.setOwnProduce(ownProduceMap.get(scheduleServe.getOwnProduceId()));
}
});
page.getRecords().forEach(scheduleManage -> { page.getRecords().forEach(scheduleManage -> {
Set<ScheduleServe> set = new TreeSet<>(Comparator.comparing(o -> o.getSchId() + ";" + o.getServeId())); Set<ScheduleServe> set = new TreeSet<>(Comparator.comparing(o -> o.getSchId() + ";" + o.getServeId()));
if (ListUtil.isNotEmpty(scheduleServeMap.get(scheduleManage.getId()))) { if (ListUtil.isNotEmpty(scheduleServeMap.get(scheduleManage.getId()))) {
...@@ -1304,6 +1320,7 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper, ...@@ -1304,6 +1320,7 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
scheduleServe.setServeNumber(1); scheduleServe.setServeNumber(1);
//如果是预约款式 //如果是预约款式
if (scheduleServe.getProduceId() != null) { if (scheduleServe.getProduceId() != null) {
BaseProduce baseProduce = baseProduceMapper.selectById(scheduleServe.getProduceId()); BaseProduce baseProduce = baseProduceMapper.selectById(scheduleServe.getProduceId());
//款式名称 //款式名称
scheduleServe.setProduceName(baseProduce.getName()); scheduleServe.setProduceName(baseProduce.getName());
...@@ -1349,6 +1366,7 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper, ...@@ -1349,6 +1366,7 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
if (scheduleServe.getServeName().trim().equals(ScheduleServe.OWN_PRODUCE_KEY)) { if (scheduleServe.getServeName().trim().equals(ScheduleServe.OWN_PRODUCE_KEY)) {
scheduleServe.setIsOwnProduce(1); scheduleServe.setIsOwnProduce(1);
scheduleServe.setOwnProduceId(scheduleServeCommand.getOwnProduceId()); scheduleServe.setOwnProduceId(scheduleServeCommand.getOwnProduceId());
scheduleServe.setOwnProduce(ownProduceMapper.selectById(scheduleServeCommand.getOwnProduceId()));
} else { } else {
scheduleServe.setIsOwnProduce(2); scheduleServe.setIsOwnProduce(2);
scheduleServe.setOwnProduceId(null); scheduleServe.setOwnProduceId(null);
......
...@@ -90,9 +90,13 @@ public class OrderManageDTOAssembler implements Function<OrderManage, OrderManag ...@@ -90,9 +90,13 @@ public class OrderManageDTOAssembler implements Function<OrderManage, OrderManag
.map(storeTechnicianDTOAssembler) .map(storeTechnicianDTOAssembler)
.collect(Collectors.toList())); .collect(Collectors.toList()));
} }
if (orderServe.getOwnProduce() != null) {
orderServeDTO.setOwnProduce(orderServe.getOwnProduce());
}
orderServeDTO.setTechnicianIds(orderServe.getTechnicianId()); orderServeDTO.setTechnicianIds(orderServe.getTechnicianId());
orderServeDTO.setTechnicianNames(orderServe.getTechnicianName()); orderServeDTO.setTechnicianNames(orderServe.getTechnicianName());
return orderServeDTO; return orderServeDTO;
} }
......
package com.gogirl.assembler;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/5/27 1:58 下午
*/
public class OwnProduceAssembler {
}
...@@ -37,8 +37,12 @@ public class ScheduleManageDTOAssembler implements Function<ScheduleManage, Sche ...@@ -37,8 +37,12 @@ public class ScheduleManageDTOAssembler implements Function<ScheduleManage, Sche
public ScheduleServeDTO apply(ScheduleServe scheduleServe) { public ScheduleServeDTO apply(ScheduleServe scheduleServe) {
ScheduleServeDTO scheduleServeDTO = new ScheduleServeDTO(); ScheduleServeDTO scheduleServeDTO = new ScheduleServeDTO();
BeanUtils.copyProperties(scheduleServe, scheduleServeDTO); BeanUtils.copyProperties(scheduleServe, scheduleServeDTO);
if (scheduleServe.getOwnProduce() != null) {
scheduleServeDTO.setOwnProduce(scheduleServe.getOwnProduce());
}
return scheduleServeDTO; return scheduleServeDTO;
} }
} }
} }
...@@ -57,14 +57,16 @@ public class OrderServe implements Serializable { ...@@ -57,14 +57,16 @@ public class OrderServe implements Serializable {
*/ */
@ApiModelProperty("服务改价(有正负)") @ApiModelProperty("服务改价(有正负)")
private BigDecimal serveChangePrice = BigDecimal.ZERO; private BigDecimal serveChangePrice = BigDecimal.ZERO;
@ApiModelProperty("价格") @ApiModelProperty("价格")
private BigDecimal price = BigDecimal.ZERO; private BigDecimal price = BigDecimal.ZERO;
@ApiModelProperty("优惠券折扣金额") @ApiModelProperty("优惠券折扣金额")
private BigDecimal discountPrice = BigDecimal.ZERO; private BigDecimal discountPrice = BigDecimal.ZERO;
@ApiModelProperty("支付金额") @ApiModelProperty("支付金额")
private BigDecimal payPrice = BigDecimal.ZERO; private BigDecimal payPrice = BigDecimal.ZERO;
// @ApiModelProperty("闲时折扣减免的金额")
// private BigDecimal leisureDiscountPrice = BigDecimal.ZERO;
/** /**
* 预约服务vo * 预约服务vo
*/ */
......
...@@ -244,4 +244,12 @@ public class ScheduleServe implements Serializable { ...@@ -244,4 +244,12 @@ public class ScheduleServe implements Serializable {
price.equals(promotionPrice) || price.equals(promotionPrice) ||
(price.equals(produceCurrentPrice) && produceCurrentPrice.compareTo(produceBargainPrice) < 0); (price.equals(produceCurrentPrice) && produceCurrentPrice.compareTo(produceBargainPrice) < 0);
} }
public Integer getOwnProduceId() {
return ownProduceId;
}
public void setOwnProduceId(Integer ownProduceId) {
this.ownProduceId = ownProduceId;
}
} }
...@@ -2,9 +2,9 @@ package com.gogirl.interfaces.order.serve; ...@@ -2,9 +2,9 @@ package com.gogirl.interfaces.order.serve;
import com.gogirl.application.order.serve.IOwnProduceService; import com.gogirl.application.order.serve.IOwnProduceService;
import com.gogirl.domain.order.serve.OwnProduce;
import com.gogirl.infrastructure.common.base.JsonResult; import com.gogirl.infrastructure.common.base.JsonResult;
import com.gogirl.shared.order.OrderServeOwnProduceCommand; import com.gogirl.shared.order.OwnProduceCommand;
import com.gogirl.shared.order.ScheduleServeOwnProduceCommand;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
...@@ -30,18 +30,11 @@ public class OwnProduceController { ...@@ -30,18 +30,11 @@ public class OwnProduceController {
@Resource @Resource
IOwnProduceService ownProduceService; IOwnProduceService ownProduceService;
@ApiOperation("新增或者更新预约自带款式技法") @ApiOperation("新增或者更新自带款式技法")
@PostMapping("/saveOrUpdateScheduleOwnProduce") @PostMapping("/saveOrUpdateOwnProduce")
public JsonResult<Void> saveOrUpdateScheduleOwnProduce(@RequestBody ScheduleServeOwnProduceCommand command) { public JsonResult<OwnProduce> saveOrUpdateOwnProduce(@RequestBody OwnProduceCommand command) {
ownProduceService.saveOrUpdateScheduleOwnProduce(command); OwnProduce ownProduce = ownProduceService.saveOrUpdateOwnProduce(command);
return JsonResult.success(); return JsonResult.success(ownProduce);
} }
@ApiOperation("新增或者更新订单自带款式技法")
@PostMapping("/saveOrUpdateOrderOwnProduce")
public JsonResult<Void> saveOrUpdateOrderOwnProduce(@RequestBody OrderServeOwnProduceCommand command) {
ownProduceService.saveOrUpdateOrderOwnProduce(command);
return JsonResult.success();
}
} }
package com.gogirl.shared.order; package com.gogirl.shared.order;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.gogirl.domain.order.serve.OwnProduce;
import com.gogirl.shared.store.StoreTechnicianDTO; import com.gogirl.shared.store.StoreTechnicianDTO;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -119,4 +120,6 @@ public class OrderServeDTO { ...@@ -119,4 +120,6 @@ public class OrderServeDTO {
private BigDecimal discountRate; private BigDecimal discountRate;
private BigDecimal leisurePrice; private BigDecimal leisurePrice;
private OwnProduce ownProduce;
} }
...@@ -14,13 +14,10 @@ import java.util.List; ...@@ -14,13 +14,10 @@ import java.util.List;
* @since 2020/5/27 11:59 上午 * @since 2020/5/27 11:59 上午
*/ */
@Data @Data
public class ScheduleServeOwnProduceCommand { public class OwnProduceCommand {
private Integer ownProduceId; private Integer ownProduceId;
@ApiModelProperty("预约详情id")
private Integer scheduleServeId;
@ApiModelProperty("款式") @ApiModelProperty("款式")
private List<OwnProduceTechniqueSkuCommand> ownProduceTechniqueSkuCommandList; private List<OwnProduceTechniqueSkuCommand> ownProduceTechniqueSkuCommandList;
......
package com.gogirl.shared.order; package com.gogirl.shared.order;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.gogirl.domain.order.serve.OwnProduce;
import com.gogirl.shared.product.PurchaseSkuDTO; import com.gogirl.shared.product.PurchaseSkuDTO;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -134,4 +135,6 @@ public class ScheduleServeDTO implements Serializable { ...@@ -134,4 +135,6 @@ public class ScheduleServeDTO implements Serializable {
private String producePractice; private String producePractice;
private OwnProduce ownProduce;
} }
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