| | |
| | | package com.whyc.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.ComponentProductHistoryMapper; |
| | | import com.whyc.pojo.ComponentProductHistory; |
| | |
| | | int bl=mapper.insertBatchSomeColumn(list); |
| | | return new Response().setII(1,true,bl,bl>0?"添加关联成功":"添加关联失败"); |
| | | } |
| | | |
| | | public List<ComponentProductHistory> getListByParentModel(String parentModel, int currentVersion) { |
| | | QueryWrapper<ComponentProductHistory> query = Wrappers.query(); |
| | | query.eq("parent_model",parentModel).le("s_version",currentVersion).ge("e_version",currentVersion); |
| | | return mapper.selectList(query); |
| | | } |
| | | |
| | | public void updateVersionBatch(List<ComponentProductHistory> cphList) { |
| | | mapper.updateVersionBatch(cphList); |
| | | } |
| | | } |