| | |
| | | import com.iailab.module.model.mcs.pre.dto.MmItemOutputDTO; |
| | | import com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity; |
| | | import com.iailab.module.model.mcs.pre.service.MmItemOutputService; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | |
| | | @Override |
| | | public void saveMmItemOutput(List<MmItemOutputEntity> mmItemOutput) { |
| | | mmItemOutput.forEach(e -> { |
| | | e.setId(e.getId().replace("+","").replace("-","")); |
| | | }); |
| | | mmItemOutputDao.insert(mmItemOutput); |
| | | // 清空缓存 |
| | | clearCache(); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public MmItemOutputEntity getByItemid(String itemid, String resultstr) { |
| | | public MmItemOutputEntity getByItemid(String itemid, String resultstr, String resultIndex) { |
| | | QueryWrapper<MmItemOutputEntity> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("itemid", itemid).eq("resultstr", resultstr); |
| | | queryWrapper.eq("itemid", itemid) |
| | | .eq("resultstr", resultstr) |
| | | .eq(StringUtils.isNotBlank(resultIndex), "result_index", resultIndex); |
| | | return mmItemOutputDao.selectOne(queryWrapper); |
| | | } |
| | | |