记得上下班打卡 | git大法好,push需谨慎

Commit 96fd912f authored by zhengfuxin's avatar zhengfuxin

修改bug

parent 24fd3a5c
......@@ -56,6 +56,9 @@ public class GoblinFrontCubeController extends BaseController {
if(StringUtil.isBlank(goblinFrontCubeParam.getSpuId())||goblinFrontCubeParam.getSpuId().equals("undefined")){
return error("spuId必传,请填写");
}
if(goblinFrontCubeParam.getSpuId().split(",").length==0){
return error("spuId必传,请填写");
}
GoblinFrontCube goblinFrontCube=new GoblinFrontCube();
BeanUtils.copyProperties(goblinFrontCubeParam,goblinFrontCube);
list1.add(goblinFrontCube);
......
......@@ -75,7 +75,9 @@ public class GoblinFrontCubeServiceImpl extends ServiceImpl<GoblinFrontCubeMappe
spuIds=spuIds.concat(spuId).concat(",");
}
}
if(spuIds.length()>0){
goblinFrontCube.setSpuId(spuIds.substring(0,spuIds.length()-1));
}
this.create(goblinFrontCube);
} else {
goblinFrontCube.setUpdateTime(LocalDateTime.now());
......@@ -88,7 +90,10 @@ public class GoblinFrontCubeServiceImpl extends ServiceImpl<GoblinFrontCubeMappe
spuIds=spuIds.concat(spuId).concat(",");
}
}
if(spuIds.length()>0){
goblinFrontCube.setSpuId(spuIds.substring(0,spuIds.length()-1));
}
goblinFrontCubeMapper.updateById(goblinFrontCube);
}
}
......
Markdown is supported
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