购物车加入bug fix
This commit is contained in:
parent
1a968775ff
commit
1e66c99606
|
|
@ -30,7 +30,7 @@ public interface TbCashierCartMapper {
|
|||
List<TbCashierCart> selectALlByMasterId(@Param("masterId") String masterId,@Param("status") String status);
|
||||
|
||||
TbCashierCart selectByDetail(@Param("masterId") String masterId, @Param("productId") String productId,
|
||||
@Param("shopId") String shopId, @Param("skuId") String skuId, @Param("day") String day,@Param("uuid") String uuid);
|
||||
@Param("shopId") String shopId, @Param("skuId") String skuId, @Param("day") String day,@Param("uuid") String uuid, @Param("tableId") String tableId);
|
||||
|
||||
TbCashierCart selectDetailByQrcode(@Param("tableId") String tableId, @Param("productId") String productId,
|
||||
@Param("shopId") String shopId, @Param("skuId") String skuId, @Param("uuid") String uuid);
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ public class OrderService {
|
|||
|
||||
//查询现有规格商品
|
||||
if("edit".equals(type)&&!cart.getSkuId().equals(skuId.toString())){
|
||||
TbCashierCart cashierCart = cashierCartMapper.selectByDetail(masterId, productId, shopId, skuId.toString(), DateUtils.getDay(), uuid);
|
||||
TbCashierCart cashierCart = cashierCartMapper.selectByDetail(masterId, productId, shopId, skuId.toString(), DateUtils.getDay(), uuid, tableId);
|
||||
if(Objects.nonNull(cashierCart)){
|
||||
cashierCart.setNumber(cashierCart.getNumber()+number);
|
||||
cashierCart.setTotalNumber(cashierCart.getNumber()+number);
|
||||
|
|
@ -239,7 +239,7 @@ public class OrderService {
|
|||
}
|
||||
} else {
|
||||
List<TbCashierCart> list = cashierCartMapper.selectALlByMasterId(masterId, "create");
|
||||
TbCashierCart cashierCart = cashierCartMapper.selectByDetail(masterId, productId, shopId, skuId.toString(), DateUtils.getDay(), uuid);
|
||||
TbCashierCart cashierCart = cashierCartMapper.selectByDetail(masterId, productId, shopId, skuId.toString(), DateUtils.getDay(), uuid, tableId);
|
||||
if (number > 0) {
|
||||
if (Objects.isNull(cashierCart)) {
|
||||
cashierCart = new TbCashierCart();
|
||||
|
|
|
|||
|
|
@ -58,6 +58,9 @@
|
|||
<if test="uuid != null">
|
||||
and uuid = #{uuid}
|
||||
</if>
|
||||
<if test="tableId != null and tableId != ''">
|
||||
and table_id = #{tableId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectDetailByQrcode" resultType="com.chaozhanggui.system.cashierservice.entity.TbCashierCart">
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@
|
|||
<if test="spec != null and spec !=''">
|
||||
and spec_snap = #{spec}
|
||||
</if>
|
||||
|
||||
order by id desc limit 1
|
||||
</select>
|
||||
<select id="selectByProduct"
|
||||
resultType="com.chaozhanggui.system.cashierservice.entity.TbProductSkuWithBLOBs">
|
||||
|
|
|
|||
Loading…
Reference in New Issue