//修改
AddrGroup addrGroup = this.findById(id);
addrGroup.setName(txt_name); addrGroup.setSort(txt_sort); addrGroup.setSyncType(1); addrGroupService.update(addrGroup);//添加
AddrGroup addrGroup = new AddrGroup();
addrGroup.setName(txt_name); addrGroup.setPid(0); //穿过来的pid 也就是addrGroup中数据的id addrGroup.setSyncType(0); addrGroup.setSort(txt_sort); addrGroup.setType(type); addrGroup.setUserid(spubuser.getUser_id()); //添加 创建 用户id addrGroupService.save(addrGroup);
//删除 批量删除
String[] ids = deleteIds.split(",");
for (int i = 0; i < ids.length; i++) { if(ids[i].equals("")) continue; shopSettingService.delete(Integer.parseInt(ids[i])); }