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

Commit 24fd3a5c authored by zhengfuxin's avatar zhengfuxin

修改bug

parent 53308504
......@@ -67,11 +67,20 @@ public class GoblinFrontCubeServiceImpl extends ServiceImpl<GoblinFrontCubeMappe
public boolean updateOrCreate(List<GoblinFrontCube> list) {
for(GoblinFrontCube goblinFrontCube:list){
if (goblinFrontCube.getMid() == 0) {
String spuIds="";
for(String spuId:goblinFrontCube.getSpuId().split(",")){
if(spuId.equals("")||spuId.equals("undefined")){
}else{
spuIds=spuIds.concat(spuId).concat(",");
}
}
goblinFrontCube.setSpuId(spuIds.substring(0,spuIds.length()-1));
this.create(goblinFrontCube);
} else {
goblinFrontCube.setUpdateTime(LocalDateTime.now());
//数据库修改
/*String spuIds="";
String spuIds="";
for(String spuId:goblinFrontCube.getSpuId().split(",")){
if(spuId.equals("")||spuId.equals("undefined")){
......@@ -79,7 +88,7 @@ public class GoblinFrontCubeServiceImpl extends ServiceImpl<GoblinFrontCubeMappe
spuIds=spuIds.concat(spuId).concat(",");
}
}
goblinFrontCube.setSpuId(spuIds);*/
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