优化商品模块

This commit is contained in:
季圣华
2019-11-28 23:10:12 +08:00
parent cc5617ad9c
commit 05858c6f71
20 changed files with 1939 additions and 97 deletions

View File

@@ -292,4 +292,19 @@ public class DepotService {
}
return result;
}
/**
* 根据名称获取id
* @param name
*/
public Long getIdByName(String name){
Long id = 0L;
DepotExample example = new DepotExample();
example.createCriteria().andNameEqualTo(name).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
List<Depot> list = depotMapper.selectByExample(example);
if(list!=null && list.size()>0) {
id = list.get(0).getId();
}
return id;
}
}