Files
baiyue-firstleg/warehouse-overseas-service/src/main/java/com/baiyue/warehouse/mapper/WarehousePalletBindingMapper.java
T

24 lines
1.4 KiB
Java

package com.baiyue.warehouse.mapper;
import org.apache.ibatis.annotations.Mapper;
import com.baiyue.warehouse.entity.WarehousePalletBindingEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface WarehousePalletBindingMapper extends BaseMapper<WarehousePalletBindingEntity> {
@Select("SELECT * FROM wh_pallet_business_binding WHERE customer_id=#{customerId} AND warehouse_id=#{warehouseId} " +
"AND business_type=#{businessType} AND business_id=#{businessId} LIMIT 1")
WarehousePalletBindingEntity find(@Param("customerId") long customerId, @Param("warehouseId") long warehouseId,
@Param("businessType") String businessType, @Param("businessId") String businessId);
@Select("SELECT * FROM wh_pallet_business_binding WHERE customer_id=#{customerId} AND warehouse_id=#{warehouseId} " +
"AND business_type=#{businessType} AND business_id=#{businessId} LIMIT 1 FOR UPDATE")
WarehousePalletBindingEntity lockByBusiness(@Param("customerId") long customerId,
@Param("warehouseId") long warehouseId,
@Param("businessType") String businessType,
@Param("businessId") String businessId);
}