| | |
| | | import com.oying.modules.pc.product.events.ProductAuditVerdictEvent; |
| | | import com.oying.modules.pc.product.mapper.ProductAuditMapper; |
| | | import com.oying.modules.pc.product.service.ProductAuditService; |
| | | import com.oying.modules.pc.product.view.ProductAuditView; |
| | | import com.oying.modules.pc.store.domain.StoreAudit; |
| | | import com.oying.utils.FileUtil; |
| | | import com.oying.utils.PageResult; |
| | | import com.oying.utils.PageUtil; |
| | |
| | | private final ProductAuditMapper productAuditMapper; |
| | | |
| | | @Override |
| | | public PageResult<ProductAudit> queryAll(ProductAuditQueryCriteria criteria, Page<Object> page) { |
| | | public PageResult<ProductAuditView> queryAll(ProductAuditQueryCriteria criteria, Page<Object> page) { |
| | | return PageUtil.toPage(productAuditMapper.findAll(criteria, page)); |
| | | } |
| | | |
| | | @Override |
| | | public List<ProductAudit> queryAll(ProductAuditQueryCriteria criteria) { |
| | | public List<ProductAuditView> queryAll(ProductAuditQueryCriteria criteria) { |
| | | return productAuditMapper.findAll(criteria); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean hasPendingByStoreId(Long productId) { |
| | | LambdaQueryWrapper<ProductAudit> wrapper = new LambdaQueryWrapper<ProductAudit>() |
| | | .eq(ProductAudit::getProductId, productId) |
| | | .eq(ProductAudit::getStatus, AuditStatusEnum.PENDING.getValue()); |
| | | return productAuditMapper.selectCount(wrapper) > 0; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void create(ProductAudit resources) { |
| | | productAuditMapper.insert(resources); |