fix: 增加购物车商品类型,单位展示
This commit is contained in:
@@ -183,6 +183,8 @@ public class TbCashierCart implements Serializable {
|
||||
private Integer isWaitCall;
|
||||
// 套餐商品,选择的商品信息
|
||||
private String proGroupInfo;
|
||||
// 商品类型
|
||||
private String typeEnum;
|
||||
|
||||
public void copy(TbCashierCart source) {
|
||||
BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
|
||||
@@ -610,7 +610,11 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||
if (tbCashierCart == null) {
|
||||
tbCashierCart = new TbCashierCart();
|
||||
resetGroupProductCart(addCartDTO.getGroupProductIdList(), product, tbCashierCart);
|
||||
|
||||
TbShopUnit tbShopUnit = mpShopUnitMapper.selectById(product.getId());
|
||||
if (tbShopUnit != null) {
|
||||
tbCashierCart.setUnit(tbShopUnit.getName());
|
||||
}
|
||||
tbCashierCart.setTypeEnum(product.getTypeEnum());
|
||||
tbCashierCart.setUseType(shopEatTypeInfoDTO.getUseType());
|
||||
tbCashierCart.setCoverImg(product.getCoverImg());
|
||||
tbCashierCart.setCreatedAt(System.currentTimeMillis());
|
||||
|
||||
Reference in New Issue
Block a user