新购接口优化
This commit is contained in:
parent
75f8e59e86
commit
a503514fc5
|
|
@ -88,6 +88,8 @@ public interface PurchaseCheckDetailsMapper {
|
|||
*/
|
||||
int deletePurchaseCheckDetailsById(Long id);
|
||||
|
||||
int deletePurchaseCheckDetailsByParentIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除新购验收任务详细
|
||||
*
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ import com.bonus.material.purchase.domain.PurchaseCheckInfo;
|
|||
import com.bonus.material.purchase.service.IPurchaseCheckInfoService;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.TransactionStatus;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.transaction.support.DefaultTransactionDefinition;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
|
|
@ -330,7 +331,9 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int deletePurchaseCheckInfoByIds(Long[] ids) {
|
||||
purchaseCheckDetailsMapper.deletePurchaseCheckDetailsByParentIds(ids);
|
||||
return purchaseCheckInfoMapper.deletePurchaseCheckInfoByIds(ids);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -201,6 +201,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
delete from purchase_check_details where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePurchaseCheckDetailsByParentIds" parameterType="Long">
|
||||
delete from purchase_check_details where task_id in (
|
||||
select task_id
|
||||
from purchase_check_info
|
||||
where
|
||||
id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
)
|
||||
</delete>
|
||||
|
||||
<delete id="deletePurchaseCheckDetailsByIds" parameterType="String">
|
||||
delete from purchase_check_details where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
|
|
|
|||
Loading…
Reference in New Issue