add edit delete

//Revise

AddrGroup addrGroup = this.findById(id);
            addrGroup.setName(txt_name);  
            addrGroup.setSort(txt_sort); 
            addrGroup.setSyncType(1); 
            addrGroupService.update(addrGroup);

//Add to

AddrGroup addrGroup = new AddrGroup();  
                addrGroup.setName(txt_name);
                addrGroup.setPid(0); //The pid passed through is the id of the data in     
                addrGroup addrGroup.setSyncType(0);                 
                addrGroup.setSort(txt_sort);
                addrGroup .setType(type); 
                addrGroup.setUserid(spubuser.getUser_id()); //Add create user id  
                addrGroupService.save(addrGroup);            

 

// delete batch delete

         String[] ids = deleteIds.split(","); 
        for (int i = 0; i < ids.length; i++) {             
            if(ids[i].equals(""))
                continue;              
            shopSettingService.delete(Integer.parseInt(ids[i]));    
        }

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326399062&siteId=291194637