feat: 订单详情增加是否会员价字段标识
This commit is contained in:
parent
b208a0ad92
commit
ca82c8a59f
|
|
@ -76,6 +76,12 @@ public class TbPlaceController {
|
||||||
return ResponseEntity.ok(tbShopTableService.addCartForUser(addCartDTO));
|
return ResponseEntity.ok(tbShopTableService.addCartForUser(addCartDTO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/temporaryDishes")
|
||||||
|
@ApiOperation("代客下单/shop/table")
|
||||||
|
public ResponseEntity<TbCashierCart> addTemporaryDishes(@Valid @RequestBody AddTemporaryDishesDTO temporaryDishesDTO) {
|
||||||
|
return ResponseEntity.ok(tbShopTableService.addTemporaryDishes(temporaryDishesDTO));
|
||||||
|
}
|
||||||
|
|
||||||
@PutMapping("/choseModel")
|
@PutMapping("/choseModel")
|
||||||
@ApiOperation("代客下单/shop/table")
|
@ApiOperation("代客下单/shop/table")
|
||||||
public ResponseEntity<?> choseModel(@Valid @RequestBody ChoseModelDTO choseModelDTO) {
|
public ResponseEntity<?> choseModel(@Valid @RequestBody ChoseModelDTO choseModelDTO) {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
package cn.ysk.cashier.dto.shoptable;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AddTemporaryDishesDTO {
|
||||||
|
@NotEmpty
|
||||||
|
private String masterId;
|
||||||
|
@NotNull
|
||||||
|
private Integer shopId;
|
||||||
|
private String tableId;
|
||||||
|
@NotNull
|
||||||
|
@Min(1)
|
||||||
|
private Integer num;
|
||||||
|
private boolean isPack;
|
||||||
|
private boolean isGift;
|
||||||
|
private String note;
|
||||||
|
// 用餐类型
|
||||||
|
@NotBlank
|
||||||
|
private String useType;
|
||||||
|
private Integer vipUserId;
|
||||||
|
}
|
||||||
|
|
@ -130,6 +130,7 @@ public class TbOrderDetail implements Serializable {
|
||||||
|
|
||||||
private BigDecimal memberPrice;
|
private BigDecimal memberPrice;
|
||||||
private Integer userCouponId;
|
private Integer userCouponId;
|
||||||
|
private Integer isMember;
|
||||||
|
|
||||||
public void copy(TbOrderDetail source){
|
public void copy(TbOrderDetail source){
|
||||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||||
|
|
|
||||||
|
|
@ -614,6 +614,12 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||||
return tbCashierCart;
|
return tbCashierCart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TbCashierCart addTemporaryDishes(AddTemporaryDishesDTO temporaryDishesDTO) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private void setRedisTableCartInfo(String tableId, String shopId, List<TbCashierCart> tbCashierCartList, boolean isAdd) {
|
private void setRedisTableCartInfo(String tableId, String shopId, List<TbCashierCart> tbCashierCartList, boolean isAdd) {
|
||||||
String tableCartKey = RedisConstant.getTableCartKey(tableId, shopId);
|
String tableCartKey = RedisConstant.getTableCartKey(tableId, shopId);
|
||||||
String tableCart = redisTemplate.opsForValue().get(tableCartKey);
|
String tableCart = redisTemplate.opsForValue().get(tableCartKey);
|
||||||
|
|
@ -1518,6 +1524,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||||
orderDetail.setUseType(cashierCart.getUseType());
|
orderDetail.setUseType(cashierCart.getUseType());
|
||||||
orderDetail.setProductImg(cashierCart.getCoverImg());
|
orderDetail.setProductImg(cashierCart.getCoverImg());
|
||||||
orderDetail.setCartId(cashierCart.getId());
|
orderDetail.setCartId(cashierCart.getId());
|
||||||
|
orderDetail.setIsMember(cashierCart.getIsMember());
|
||||||
orderDetail.setOrderId(orderInfo == null ? null : orderInfo.getId());
|
orderDetail.setOrderId(orderInfo == null ? null : orderInfo.getId());
|
||||||
priceDTO.getOrderDetailList().add(orderDetail);
|
priceDTO.getOrderDetailList().add(orderDetail);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,13 @@ public interface TbShopTableService {
|
||||||
|
|
||||||
TbCashierCart addCartForUser(AddCartDTO addCartDTO);
|
TbCashierCart addCartForUser(AddCartDTO addCartDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加临时菜
|
||||||
|
* @param temporaryDishesDTO 临时菜信息
|
||||||
|
*/
|
||||||
|
TbCashierCart addTemporaryDishes(AddTemporaryDishesDTO temporaryDishesDTO);
|
||||||
|
|
||||||
|
|
||||||
void removeCart(RemoveCartDTO removeCartDTO);
|
void removeCart(RemoveCartDTO removeCartDTO);
|
||||||
|
|
||||||
void returnCart(ReturnCartDTO returnCartDTO);
|
void returnCart(ReturnCartDTO returnCartDTO);
|
||||||
|
|
@ -149,4 +156,5 @@ public interface TbShopTableService {
|
||||||
Object getShopState(Integer shopId, String tableId);
|
Object getShopState(Integer shopId, String tableId);
|
||||||
|
|
||||||
Object bindQrcode(BindTableQrCodeDTO bindTableQrCodeDTO);
|
Object bindQrcode(BindTableQrCodeDTO bindTableQrCodeDTO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue