| | |
| | | |
| | | import com.dy.pmsGlobal.pojoPr.PrBillOfMaterial; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | int updateByPrimaryKey(PrBillOfMaterial record); |
| | | |
| | | int insertMany(List<PrBillOfMaterial> records); |
| | | |
| | | void deleteByNodeId(@Param("nodeIds")List<Long> nodeIds); |
| | | } |
| | |
| | | file_id = #{fileId,jdbcType=BIGINT} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <delete id="deleteByNodeId" > |
| | | delete from pr_bill_of_material where node_id in |
| | | <foreach collection="nodeIds" item="item" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | |
| | | return null; |
| | | }).filter(bill -> bill != null).toList(); |
| | | if (CollectionUtils.isNotEmpty(billList)) { |
| | | billDao.deleteByNodeId(billList.stream().map(PrBillOfMaterial::getNodeId).toList()); |
| | | billDao.insertMany(billList); |
| | | } |
| | | } |