Commit c7d1ea4e authored by 季圣华's avatar 季圣华
Browse files

优化多属性模块

parent 8ca5c9bf
......@@ -74,6 +74,7 @@ public class MaterialAttributeService {
materialAttribute.setAttributeName(map.get(field));
for(MaterialAttribute ma: maList) {
if(field.equals(ma.getAttributeField())){
materialAttribute.setId(ma.getId());
materialAttribute.setAttributeName(ma.getAttributeName());
materialAttribute.setAttributeValue(ma.getAttributeValue());
}
......
......@@ -222,7 +222,15 @@ public class MaterialCategoryService {
}
public int checkIsNameExist(Long id, String name)throws Exception {
return 0;
MaterialCategoryExample example = new MaterialCategoryExample();
example.createCriteria().andIdNotEqualTo(id).andNameEqualTo(name).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
List<MaterialCategory> list=null;
try{
list= materialCategoryMapper.selectByExample(example);
}catch(Exception e){
JshException.readFail(logger, e);
}
return list==null?0:list.size();
}
public List<MaterialCategory> findById(Long id)throws Exception {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment