管道基础大数据平台系统开发-【后端】-Server
Surpriseplus
2022-09-23 58e3f4d84622151b80090f113b6cdd93b3a41e5e
src/main/java/com/lf/server/controller/organization/DepController.java
@@ -3,6 +3,8 @@
import com.lf.server.entity.Result;
import com.lf.server.entity.organization.DepEntity;
import com.lf.server.service.oraganization.DepService;
import io.netty.util.internal.StringUtil;
import org.apache.tomcat.util.buf.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -21,23 +23,34 @@
    DepService depService;
    @RequestMapping(value ="/insertDep", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
    public Boolean insertDep(DepEntity depEntity){
    public Integer insertDep(DepEntity depEntity){
        return depService.insertDep(depEntity);
    }
    @ResponseBody
    @RequestMapping(value ="/delecteDep", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
    public Boolean delecteDep(int id){
        return depService.delecteDep(id);
    @RequestMapping(value ="/deleteDep", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
    public Integer deleteDep(int id){
        return depService.deleteDep(id);
    }
    @ResponseBody
    @RequestMapping(value ="/deleteDeps", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
    public Integer deleteDeps(Integer[] ids){
        if(null == ids || ids.length ==0 ){
            return  -1;
        //}else{
        //    return depService.deleteDep(StringUtils.join(ids,","));
        }
        return 0;
    }
    @ResponseBody
    @RequestMapping(value ="/updateDep", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
    public Boolean updateDep(DepEntity depEntity){
    public Integer updateDep(DepEntity depEntity){
        return depService.updateDep(depEntity);
    }
    @GetMapping(value ="/selectDep")
    public DepEntity selectDep(DepEntity depEntity){