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

Commit 24fd3a5c authored by zhengfuxin's avatar zhengfuxin

修改bug

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