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

Commit c8da9f79 authored by zhengfuxin's avatar zhengfuxin

修改bug

parent e33e076c
......@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import com.liquidnet.client.admin.common.core.controller.BaseController;
import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import com.liquidnet.client.admin.zhengzai.goblin.service.impl.GoblinFrontCubeServiceImpl;
import com.liquidnet.commons.lang.util.StringUtil;
import com.liquidnet.service.goblin.entity.GoblinFrontCube;
import com.liquidnet.service.goblin.param.GoblinFrontCubeParam;
import io.swagger.annotations.Api;
......@@ -52,6 +53,9 @@ public class GoblinFrontCubeController extends BaseController {
public AjaxResult updateOrCreate(@RequestBody List<GoblinFrontCubeParam> list) {
List<GoblinFrontCube> list1=new ArrayList<>();
for(GoblinFrontCubeParam goblinFrontCubeParam:list){
if(StringUtil.isBlank(goblinFrontCubeParam.getSpuId())||goblinFrontCubeParam.getSpuId().equals("undefined")){
return error("spuId必传,请填写");
}
GoblinFrontCube goblinFrontCube=new GoblinFrontCube();
BeanUtils.copyProperties(goblinFrontCubeParam,goblinFrontCube);
list1.add(goblinFrontCube);
......
......@@ -71,7 +71,7 @@ public class GoblinFrontCubeServiceImpl extends ServiceImpl<GoblinFrontCubeMappe
} else {
goblinFrontCube.setUpdateTime(LocalDateTime.now());
//数据库修改
String spuIds="";
/*String spuIds="";
for(String spuId:goblinFrontCube.getSpuId().split(",")){
if(spuId.equals("")||spuId.equals("undefined")){
......@@ -79,7 +79,7 @@ public class GoblinFrontCubeServiceImpl extends ServiceImpl<GoblinFrontCubeMappe
spuIds=spuIds.concat(spuId).concat(",");
}
}
goblinFrontCube.setSpuId(spuIds);
goblinFrontCube.setSpuId(spuIds);*/
goblinFrontCubeMapper.updateById(goblinFrontCube);
}
}
......@@ -107,7 +107,9 @@ public class GoblinFrontCubeServiceImpl extends ServiceImpl<GoblinFrontCubeMappe
List<GoblinGoods> goodsList= goblinGoodsMapper.selectList(queryWrappers);
GoblinFrontCubeParam goblinFrontCubeParam=new GoblinFrontCubeParam();
BeanUtils.copyProperties(goblinFrontCube,goblinFrontCubeParam);
goblinFrontCubeParam.setGoblinGoods(goodsList.get(0));
if(null!=goodsList&&goodsList.size()>0){
goblinFrontCubeParam.setGoblinGoods(goodsList.get(0));
}
list1.add(goblinFrontCubeParam);
}
}
......
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