新增类型去除收尾空格
This commit is contained in:
parent
83f0d8f432
commit
7fdd39a617
|
|
@ -64,6 +64,7 @@ public class MaTypeServiceImpl implements ITypeService {
|
|||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int insertMaType(MaType maType) {
|
||||
maType.setTypeName(maType.getTypeName().trim());
|
||||
Long parentId = maType.getParentId();
|
||||
MaType maType1 = maTypeMapper.selectMaTypeByTypeId(parentId);
|
||||
String level = maType1.getLevel();
|
||||
|
|
@ -71,7 +72,6 @@ public class MaTypeServiceImpl implements ITypeService {
|
|||
maType.setCreateTime(DateUtils.getNowDate());
|
||||
int i = maTypeMapper.insertType(maType);
|
||||
//根据类型名称判重
|
||||
maType.setTypeName(maType.getTypeName().trim());
|
||||
if (maType.getTypeName() != null && maType.getParentId() != null) {
|
||||
int num = maTypeMapper.getMaType(maType);
|
||||
if (num > 1) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue