文件名从 src/main/java/com/lf/server/controller/organization/DepController.java 修改 |
| | |
| | | package com.lf.server.controller.organization; |
| | | package com.lf.server.controller.data; |
| | | |
| | | 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 com.lf.server.entity.data.DepEntity; |
| | | import com.lf.server.service.data.DepService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | return depService.insertDep(depEntity); |
| | | } |
| | | |
| | | @RequestMapping(value ="/insertDes", method = RequestMethod.POST, produces = "application/json; charset=UTF-8") |
| | | public Integer insertDes(@RequestBody List<DepEntity> depEntity){ |
| | | |
| | | return depService.insertDeps(depEntity); |
| | | } |
| | | @ResponseBody |
| | | @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; |
| | | @RequestMapping(value ="/deleteDeps", method = RequestMethod.POST, produces = "application/json; charset=UTF-8") |
| | | public Integer deleteDeps(@RequestBody List<Integer> ids){ |
| | | if(!ids.isEmpty()){ |
| | | return depService.deleteDeps(ids); |
| | | }else { |
| | | return -1; |
| | | } |
| | | } |
| | | |
| | | @ResponseBody |
| | |
| | | } |
| | | |
| | | @GetMapping(value ="/selectDep") |
| | | public DepEntity selectDep(DepEntity depEntity){ |
| | | return depService.selectDep(depEntity); |
| | | public DepEntity selectDep(int id){ |
| | | return depService.selectDep(id); |
| | | } |
| | | |
| | | @GetMapping(value ="/selectDepAll") |