店铺
This commit is contained in:
@@ -21,5 +21,5 @@ public interface CashierCartMapper extends BaseMapper<CashierCart> {
|
||||
* @param isUseVip 是否使用会员价
|
||||
* @param placeNum 第几次下单
|
||||
*/
|
||||
List<OrderDetail> getCartByTableCode(String tableCode,Integer isUseVip,Integer placeNum);
|
||||
List<OrderDetail> getCartByTableCode(Long shopId,String tableCode,Integer isUseVip,Integer placeNum);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.czg.order.entity.CashierCart;
|
||||
import com.czg.order.service.CashierCartService;
|
||||
import com.czg.service.order.mapper.CashierCartMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
@@ -19,7 +20,7 @@ import java.util.List;
|
||||
public class CashierCartServiceImpl extends ServiceImpl<CashierCartMapper, CashierCart> implements CashierCartService {
|
||||
|
||||
@Override
|
||||
public List<OrderDetail> getCartByTableCode(String tableCode, Integer isUseVip, Integer placeNum) {
|
||||
return getMapper().getCartByTableCode(tableCode, isUseVip, placeNum);
|
||||
public List<OrderDetail> getCartByTableCode(Long shopId, String tableCode, Integer isUseVip, Integer placeNum) {
|
||||
return getMapper().getCartByTableCode(shopId, tableCode, isUseVip, placeNum);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
||||
}
|
||||
}
|
||||
//获取商品信息 计算金额 需要传入优惠券 减去优惠券
|
||||
List<OrderDetail> orderDetails = cartService.getCartByTableCode(param.getTableCode(), param.isVipPrice() ? 1 : 0, param.getPlaceNum());
|
||||
List<OrderDetail> orderDetails = cartService.getCartByTableCode(shopInfo.getId(), param.getTableCode(), param.isVipPrice() ? 1 : 0, param.getPlaceNum());
|
||||
log.info("下单1 {}", JSONObject.toJSONString(orderDetails));
|
||||
//总打包费
|
||||
BigDecimalDTO packAmount = new BigDecimalDTO(BigDecimal.ZERO);
|
||||
|
||||
@@ -46,5 +46,6 @@
|
||||
left join tb_product pros on cart.product_id = pros.id
|
||||
left join tb_prod_sku skus on cart.sku_id = skus.id
|
||||
where table_code = #{tableCode}
|
||||
and cart.shop_id = #{shopId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user