| | |
| | | import com.whyc.pojo.ProductLockLog; |
| | | import com.whyc.util.ActionUtil; |
| | | import com.whyc.util.DateUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public boolean checkExists(String parentCode, String customCode) { |
| | | QueryWrapper<ProductHistory> query = Wrappers.query(); |
| | | query.eq("parent_code",parentCode); |
| | | if(!StringUtils.isBlank(customCode)){ //标准产品 |
| | | query.eq("custom_code",customCode); |
| | | } |
| | | query.last(" limit 1"); |
| | | ProductHistory productHistory = mapper.selectOne(query); |
| | | return productHistory!=null; |
| | | } |
| | | } |