测试问题提交
This commit is contained in:
parent
50de01d74d
commit
503d34ef03
|
|
@ -69,14 +69,14 @@ public class MaTypeServiceImpl implements ITypeService {
|
||||||
String level = maType1.getLevel();
|
String level = maType1.getLevel();
|
||||||
maType.setLevel(String.valueOf(Integer.parseInt(level) + 1));
|
maType.setLevel(String.valueOf(Integer.parseInt(level) + 1));
|
||||||
maType.setCreateTime(DateUtils.getNowDate());
|
maType.setCreateTime(DateUtils.getNowDate());
|
||||||
|
int i = maTypeMapper.insertType(maType);
|
||||||
//根据类型名称判重
|
//根据类型名称判重
|
||||||
if (maType.getTypeName() != null && maType.getParentId() != null) {
|
if (maType.getTypeName() != null && maType.getParentId() != null) {
|
||||||
int num = maTypeMapper.getMaType(maType);
|
int num = maTypeMapper.getMaType(maType);
|
||||||
if (num > 1) {
|
if (num > 1) {
|
||||||
throw new ServiceException("机具类型名称与库中重复,请修改后重新提交!");
|
throw new RuntimeException("机具类型名称与库中重复,请修改后重新提交!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int i = maTypeMapper.insertType(maType);
|
|
||||||
Long typeId = maType.getTypeId();
|
Long typeId = maType.getTypeId();
|
||||||
// 图片路径保存
|
// 图片路径保存
|
||||||
if (StringUtils.isNotEmpty(maType.getPhotoName()) && StringUtils.isNotEmpty(maType.getPhotoUrl())) {
|
if (StringUtils.isNotEmpty(maType.getPhotoName()) && StringUtils.isNotEmpty(maType.getPhotoUrl())) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue