优化多属性模块
This commit is contained in:
@@ -74,6 +74,7 @@ public class MaterialAttributeService {
|
|||||||
materialAttribute.setAttributeName(map.get(field));
|
materialAttribute.setAttributeName(map.get(field));
|
||||||
for(MaterialAttribute ma: maList) {
|
for(MaterialAttribute ma: maList) {
|
||||||
if(field.equals(ma.getAttributeField())){
|
if(field.equals(ma.getAttributeField())){
|
||||||
|
materialAttribute.setId(ma.getId());
|
||||||
materialAttribute.setAttributeName(ma.getAttributeName());
|
materialAttribute.setAttributeName(ma.getAttributeName());
|
||||||
materialAttribute.setAttributeValue(ma.getAttributeValue());
|
materialAttribute.setAttributeValue(ma.getAttributeValue());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -222,7 +222,15 @@ public class MaterialCategoryService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int checkIsNameExist(Long id, String name)throws Exception {
|
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 {
|
public List<MaterialCategory> findById(Long id)throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user