店铺
This commit is contained in:
@@ -7,6 +7,7 @@ import jakarta.validation.constraints.NotNull;
|
|||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -14,7 +15,7 @@ import java.math.BigDecimal;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
public class ShopUserMoneyEditDTO implements java.io.Serializable{
|
public class ShopUserMoneyEditDTO implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 对应shopUserid
|
* 对应shopUserid
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -19,9 +19,10 @@ public interface CashierCartService extends IService<CashierCart> {
|
|||||||
/**
|
/**
|
||||||
* 获取到的结果 是针对tb_order_detail的
|
* 获取到的结果 是针对tb_order_detail的
|
||||||
*
|
*
|
||||||
|
* @param shopId 桌码
|
||||||
* @param tableCode 桌码
|
* @param tableCode 桌码
|
||||||
* @param isUseVip 是否使用会员价
|
* @param isUseVip 是否使用会员价
|
||||||
* @param placeNum 第几次下单
|
* @param placeNum 第几次下单
|
||||||
*/
|
*/
|
||||||
List<OrderDetail> getCartByTableCode(@NotBlank String tableCode, @NotNull Integer isUseVip,@NotNull Integer placeNum);
|
List<OrderDetail> getCartByTableCode(@NotBlank Long shopId,@NotBlank String tableCode, @NotNull Integer isUseVip,@NotNull Integer placeNum);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,5 +21,5 @@ public interface CashierCartMapper extends BaseMapper<CashierCart> {
|
|||||||
* @param isUseVip 是否使用会员价
|
* @param isUseVip 是否使用会员价
|
||||||
* @param placeNum 第几次下单
|
* @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.entity.CashierCart;
|
||||||
import com.czg.order.service.CashierCartService;
|
import com.czg.order.service.CashierCartService;
|
||||||
import com.czg.service.order.mapper.CashierCartMapper;
|
import com.czg.service.order.mapper.CashierCartMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -19,7 +20,7 @@ import java.util.List;
|
|||||||
public class CashierCartServiceImpl extends ServiceImpl<CashierCartMapper, CashierCart> implements CashierCartService {
|
public class CashierCartServiceImpl extends ServiceImpl<CashierCartMapper, CashierCart> implements CashierCartService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<OrderDetail> getCartByTableCode(String tableCode, Integer isUseVip, Integer placeNum) {
|
public List<OrderDetail> getCartByTableCode(Long shopId, String tableCode, Integer isUseVip, Integer placeNum) {
|
||||||
return getMapper().getCartByTableCode(tableCode, isUseVip, 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));
|
log.info("下单1 {}", JSONObject.toJSONString(orderDetails));
|
||||||
//总打包费
|
//总打包费
|
||||||
BigDecimalDTO packAmount = new BigDecimalDTO(BigDecimal.ZERO);
|
BigDecimalDTO packAmount = new BigDecimalDTO(BigDecimal.ZERO);
|
||||||
|
|||||||
@@ -46,5 +46,6 @@
|
|||||||
left join tb_product pros on cart.product_id = pros.id
|
left join tb_product pros on cart.product_id = pros.id
|
||||||
left join tb_prod_sku skus on cart.sku_id = skus.id
|
left join tb_prod_sku skus on cart.sku_id = skus.id
|
||||||
where table_code = #{tableCode}
|
where table_code = #{tableCode}
|
||||||
|
and cart.shop_id = #{shopId}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user