已重命名4个文件
已添加10个文件
已修改2个文件
已删除1个文件
文件名从 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") |
| | |
| | | package com.lf.server.controller.data; |
| | | |
| | | import com.lf.server.entity.data.DirEntity; |
| | | import com.lf.server.service.data.DirService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 鐩綍绠$悊 |
| | | * @author sws |
| | | * @date 2022-09-22 |
| | | */ |
| | | |
| | | @RestController |
| | | @RequestMapping("/dir") |
| | | public class DirController { |
| | | @Autowired |
| | | DirService dirService; |
| | | |
| | | @RequestMapping(value = "/insertDir", method = RequestMethod.POST, produces = "application/json; charset=UTF-8") |
| | | public Integer insertDir(DirEntity dirEntity) { |
| | | |
| | | return dirService.insertDir(dirEntity); |
| | | } |
| | | |
| | | @RequestMapping(value = "/insertDirs", method = RequestMethod.POST, produces = "application/json; charset=UTF-8") |
| | | public Integer insertDirs(@RequestBody List<DirEntity> dirEntity) { |
| | | |
| | | return dirService.insertDirs(dirEntity); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/deleteDir", method = RequestMethod.POST, produces = "application/json; charset=UTF-8") |
| | | public Integer deleteDir(int id) { |
| | | |
| | | return dirService.deleteDir(id); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/deleteDirs", method = RequestMethod.POST, produces = "application/json; charset=UTF-8") |
| | | public Integer deleteDirs(@RequestBody List<Integer> ids) { |
| | | |
| | | if (!ids.isEmpty()) { |
| | | |
| | | return dirService.deleteDirs(ids); |
| | | |
| | | } else { |
| | | |
| | | return -1; |
| | | } |
| | | } |
| | | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/updateDir", method = RequestMethod.POST, produces = "application/json; charset=UTF-8") |
| | | public Integer updateDir(DirEntity dirEntity) { |
| | | |
| | | return dirService.updateDir(dirEntity); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/selectDir", method = RequestMethod.POST, produces = "application/json; charset=UTF-8") |
| | | public DirEntity selectDir(int id) { |
| | | return dirService.selectDir(id); |
| | | } |
| | | |
| | | @GetMapping(value = "/selectDirAll") |
| | | public List<DirEntity> selectDirAll() { |
| | | |
| | | return dirService.selectDirAll(); |
| | | } |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.lf.server.controller.data; |
| | | |
| | | import com.lf.server.entity.data.MenusEntity; |
| | | import com.lf.server.service.data.MenusService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 鑿滃崟 |
| | | * @author sws |
| | | * @date 2022-09-23 |
| | | */ |
| | | |
| | | @RestController |
| | | @RequestMapping("/Menu") |
| | | public class MenusController { |
| | | @Autowired |
| | | MenusService menuService; |
| | | |
| | | @RequestMapping(value = "/insertMenu", method = RequestMethod.POST, produces = "application/json; charset=UTF-8") |
| | | public Integer insertMenu(MenusEntity menusEntity) { |
| | | |
| | | return menuService.insertMenu(menusEntity); |
| | | } |
| | | |
| | | @RequestMapping(value = "/insertMenus", method = RequestMethod.POST, produces = "application/json; charset=UTF-8") |
| | | public Integer insertMenus(@RequestBody List<MenusEntity> menusEntity) { |
| | | |
| | | return menuService.insertMenus(menusEntity); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/deleteMenu", method = RequestMethod.POST, produces = "application/json; charset=UTF-8") |
| | | public Integer deleteMenu(int id) { |
| | | return menuService.deleteMenu(id); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/deleteMenus", method = RequestMethod.POST, produces = "application/json; charset=UTF-8") |
| | | public Integer deleteMenus(@RequestBody List<Integer> ids) { |
| | | if (!ids.isEmpty()) { |
| | | return menuService.deleteMenus(ids); |
| | | } else { |
| | | return -1; |
| | | } |
| | | } |
| | | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/updateMenu", method = RequestMethod.POST, produces = "application/json; charset=UTF-8") |
| | | public Integer updateMenu(MenusEntity menusEntity) { |
| | | return menuService.updateMenu(menusEntity); |
| | | } |
| | | |
| | | @GetMapping(value = "/selectMenu") |
| | | public MenusEntity selectMenu(int id) { |
| | | return menuService.selectMenu(id); |
| | | } |
| | | |
| | | @GetMapping(value = "/selectMenuAll") |
| | | public List<MenusEntity> selectMenuAll() { |
| | | return menuService.selectMenuAll(); |
| | | } |
| | | |
| | | } |
文件名从 src/main/java/com/lf/server/entity/organization/DepEntity.java 修改 |
| | |
| | | package com.lf.server.entity.organization; |
| | | package com.lf.server.entity.data; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * sys_dep |
| | | * @author www |
| | | * @author sws |
| | | * @date 2022-09-23 |
| | | */ |
| | | |
对比新文件 |
| | |
| | | package com.lf.server.entity.data; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | |
| | | /** |
| | | * sys_dir |
| | | * @author sws |
| | | * @date 2022-09-24 |
| | | */ |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class DirEntity implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -2184993363389504088L; |
| | | |
| | | private int id; |
| | | |
| | | private int pid; |
| | | |
| | | private String name; |
| | | |
| | | private String code; |
| | | |
| | | private String descr; |
| | | |
| | | private int level; |
| | | |
| | | private int orderNum; |
| | | |
| | | private int createUser; |
| | | |
| | | private Timestamp createTime; |
| | | |
| | | private int updateUser; |
| | | |
| | | private Timestamp updateTime; |
| | | |
| | | private String bak; |
| | | |
| | | public int getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(int id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public int getPid() { |
| | | return pid; |
| | | } |
| | | |
| | | public void setPid(int pid) { |
| | | this.pid = pid; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getDescr() { |
| | | return descr; |
| | | } |
| | | |
| | | public void setDescr(String descr) { |
| | | this.descr = descr; |
| | | } |
| | | |
| | | public int getLevel() { |
| | | return level; |
| | | } |
| | | |
| | | public void setLevel(int level) { |
| | | this.level = level; |
| | | } |
| | | |
| | | public int getOrderNum() { |
| | | return orderNum; |
| | | } |
| | | |
| | | public void setOrderNum(int orderNum) { |
| | | this.orderNum = orderNum; |
| | | } |
| | | |
| | | public int getCreateUser() { |
| | | return createUser; |
| | | } |
| | | |
| | | public void setCreateUser(int createUser) { |
| | | this.createUser = createUser; |
| | | } |
| | | |
| | | public Timestamp getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Timestamp createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public int getUpdateUser() { |
| | | return updateUser; |
| | | } |
| | | |
| | | public void setUpdateUser(int updateUser) { |
| | | this.updateUser = updateUser; |
| | | } |
| | | |
| | | public Timestamp getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Timestamp updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public String getBak() { |
| | | return bak; |
| | | } |
| | | |
| | | public void setBak(String bak) { |
| | | this.bak = bak; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.lf.server.entity.data; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | |
| | | /** |
| | | * 鑿滃崟 |
| | | * @author sws |
| | | * @date 2022-09-24 |
| | | */ |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class MenusEntity implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -4174396918804003518L; |
| | | |
| | | private int id; |
| | | |
| | | private int pid; |
| | | |
| | | private String cnName; |
| | | |
| | | private String enName; |
| | | |
| | | private String url; |
| | | |
| | | private String perms; |
| | | |
| | | private int type; |
| | | |
| | | private String icon; |
| | | |
| | | private int level; |
| | | |
| | | private int orderNum; |
| | | |
| | | private int isShow; |
| | | |
| | | private int createUser; |
| | | |
| | | private Timestamp createTime; |
| | | |
| | | private int updateUser; |
| | | |
| | | private Timestamp updateTime; |
| | | |
| | | private String bak; |
| | | |
| | | |
| | | public int getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(int id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public int getPid() { |
| | | return pid; |
| | | } |
| | | |
| | | public void setPid(int pid) { |
| | | this.pid = pid; |
| | | } |
| | | |
| | | public String getCnName() { |
| | | return cnName; |
| | | } |
| | | |
| | | public void setCnName(String cnName) { |
| | | this.cnName = cnName; |
| | | } |
| | | |
| | | public String getEnName() { |
| | | return enName; |
| | | } |
| | | |
| | | public void setEnName(String enName) { |
| | | this.enName = enName; |
| | | } |
| | | |
| | | public String getUrl() { |
| | | return url; |
| | | } |
| | | |
| | | public void setUrl(String url) { |
| | | this.url = url; |
| | | } |
| | | |
| | | public String getPerms() { |
| | | return perms; |
| | | } |
| | | |
| | | public void setPerms(String perms) { |
| | | this.perms = perms; |
| | | } |
| | | |
| | | public int getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(int type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getIcon() { |
| | | return icon; |
| | | } |
| | | |
| | | public void setIcon(String icon) { |
| | | this.icon = icon; |
| | | } |
| | | |
| | | public int getLevel() { |
| | | return level; |
| | | } |
| | | |
| | | public void setLevel(int level) { |
| | | this.level = level; |
| | | } |
| | | |
| | | public int getOrderNum() { |
| | | return orderNum; |
| | | } |
| | | |
| | | public void setOrderNum(int orderNum) { |
| | | this.orderNum = orderNum; |
| | | } |
| | | |
| | | public int getIsShow() { |
| | | return isShow; |
| | | } |
| | | |
| | | public void setIsShow(int isShow) { |
| | | this.isShow = isShow; |
| | | } |
| | | |
| | | public int getCreateUser() { |
| | | return createUser; |
| | | } |
| | | |
| | | public void setCreateUser(int createUser) { |
| | | this.createUser = createUser; |
| | | } |
| | | |
| | | public Timestamp getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Timestamp createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public int getUpdateUser() { |
| | | return updateUser; |
| | | } |
| | | |
| | | public void setUpdateUser(int updateUser) { |
| | | this.updateUser = updateUser; |
| | | } |
| | | |
| | | public Timestamp getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Timestamp updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public String getBak() { |
| | | return bak; |
| | | } |
| | | |
| | | public void setBak(String bak) { |
| | | this.bak = bak; |
| | | } |
| | | } |
文件名从 src/main/java/com/lf/server/mapper/oraganization/DepMapper.java 修改 |
| | |
| | | package com.lf.server.mapper.oraganization; |
| | | package com.lf.server.mapper.data; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | import com.lf.server.entity.organization.DepEntity; |
| | | import com.lf.server.entity.data.DepEntity; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @author sws |
| | | * @date 2022-09-23 |
| | | */ |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface DepMapper { |
| | |
| | | public Integer insertDep(DepEntity depEntity); |
| | | |
| | | /** |
| | | * 鎵归噺娣诲姞 |
| | | * @param depEntity |
| | | * @return |
| | | */ |
| | | public Integer insertDeps(List<DepEntity> depEntity); |
| | | /** |
| | | * 鍒櫎鏁版嵁 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public Integer deleteDep(int id); |
| | | |
| | | public Integer deleteDeps(String ids); |
| | | /** |
| | | * 鎵归噺鍒犻櫎 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | public Integer deleteDeps(List<Integer> ids); |
| | | |
| | | /** |
| | | * 淇敼鏁版嵁 |
| | |
| | | |
| | | /** |
| | | * 鏌ヨ鍗曟潯鏁版嵁 |
| | | * @param depEntity |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public DepEntity selectDep(DepEntity depEntity); |
| | | public DepEntity selectDep(int id); |
| | | |
| | | /** |
| | | * 鏌ヨ鍏ㄩ儴鏁版嵁 |
对比新文件 |
| | |
| | | package com.lf.server.mapper.data; |
| | | |
| | | import com.lf.server.entity.data.DirEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Dir |
| | | * @author sws |
| | | * @date 2022-09-24 |
| | | */ |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface DirMapper { |
| | | /** |
| | | * 娣诲姞鍗曟潯鏁版嵁 |
| | | * @param dirEntity |
| | | * @return |
| | | */ |
| | | public Integer insertDir(DirEntity dirEntity); |
| | | |
| | | /** |
| | | * 鎵归噺娣诲姞 |
| | | * @param dirEntity |
| | | * @return |
| | | */ |
| | | public Integer insertDirs(List<DirEntity> dirEntity); |
| | | |
| | | /** |
| | | * 鍒犻櫎鍗曟潯鏁版嵁 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public Integer deleteDir(int id); |
| | | |
| | | /** |
| | | * 鎵归噺鍒犻櫎 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | public Integer deleteDirs(List<Integer> ids); |
| | | |
| | | /** |
| | | * 淇敼鏁版嵁 |
| | | * @param dirEntity |
| | | * @return |
| | | */ |
| | | public Integer updateDir(DirEntity dirEntity); |
| | | |
| | | /** |
| | | * 鏌ヨ鍗曟潯鏁版嵁 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public DirEntity selectDir(int id); |
| | | |
| | | /** |
| | | * 鏌ヨ澶氭潯鏁版嵁 |
| | | * @return |
| | | */ |
| | | public List<DirEntity> selectDirAll(); |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.lf.server.mapper.data; |
| | | |
| | | import com.lf.server.entity.data.MenusEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 鑿滃崟 |
| | | * @author sws |
| | | * @date 2022.09.24 |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface MenusMapper { |
| | | /** |
| | | * 娣诲姞鏁版嵁 |
| | | * @param menusEntity |
| | | * @return |
| | | */ |
| | | public Integer insertMenu(MenusEntity menusEntity); |
| | | |
| | | /** |
| | | * 鎵归噺娣诲姞 |
| | | * @param menusEntity |
| | | * @return |
| | | */ |
| | | public Integer insertMenus(List<MenusEntity> menusEntity); |
| | | /** |
| | | * 鍒櫎鏁版嵁 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public Integer deleteMenu(int id); |
| | | |
| | | /** |
| | | * 鎵归噺鍒犻櫎 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | public Integer deleteMenus(List<Integer> ids); |
| | | |
| | | /** |
| | | * 淇敼鏁版嵁 |
| | | * @param menusEntity |
| | | * @return |
| | | */ |
| | | public Integer updateMenu(MenusEntity menusEntity); |
| | | |
| | | /** |
| | | * 鏌ヨ鍗曟潯鏁版嵁 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public MenusEntity selectMenu(int id); |
| | | |
| | | /** |
| | | * 鏌ヨ鍏ㄩ儴鏁版嵁 |
| | | * @return |
| | | */ |
| | | public List<MenusEntity> selectMenuAll(); |
| | | } |
文件名从 src/main/java/com/lf/server/service/oraganization/DepService.java 修改 |
| | |
| | | package com.lf.server.service.oraganization; |
| | | package com.lf.server.service.data; |
| | | |
| | | |
| | | import com.lf.server.entity.organization.DepEntity; |
| | | import com.lf.server.mapper.oraganization.DepMapper; |
| | | import com.lf.server.entity.data.DepEntity; |
| | | import com.lf.server.mapper.data.DepMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Integer insertDeps(List<DepEntity> depEntity) { |
| | | return depMapper.insertDeps(depEntity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer deleteDep(int id) { |
| | | return depMapper.deleteDep(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer deleteDeps(String ids) { |
| | | public Integer deleteDeps(List<Integer> ids) { |
| | | return depMapper.deleteDeps(ids); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | @Override |
| | | public DepEntity selectDep(DepEntity depEntity) { |
| | | return depMapper.selectDep(depEntity); |
| | | public DepEntity selectDep(int id) { |
| | | return depMapper.selectDep(id); |
| | | } |
| | | |
| | | @Override |
对比新文件 |
| | |
| | | package com.lf.server.service.data; |
| | | |
| | | import com.lf.server.entity.data.DirEntity; |
| | | import com.lf.server.mapper.data.DirMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * dir |
| | | * @author sws |
| | | * @date 2022-09-24 |
| | | */ |
| | | |
| | | @Service |
| | | public class DirService implements DirMapper { |
| | | @Autowired |
| | | DirMapper dirMapper; |
| | | |
| | | @Override |
| | | public Integer insertDir(DirEntity dirEntity) { |
| | | return dirMapper.insertDir(dirEntity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insertDirs(List<DirEntity> dirEntity) { |
| | | return dirMapper.insertDirs(dirEntity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer deleteDir(int id) { |
| | | return dirMapper.deleteDir(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer deleteDirs(List<Integer> ids) { |
| | | return dirMapper.deleteDirs(ids); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updateDir(DirEntity dirEntity) { |
| | | return dirMapper.updateDir(dirEntity); |
| | | } |
| | | |
| | | @Override |
| | | public DirEntity selectDir(int id) { |
| | | return dirMapper.selectDir(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<DirEntity> selectDirAll() { |
| | | return dirMapper.selectDirAll(); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.lf.server.service.data; |
| | | |
| | | import com.lf.server.entity.data.MenusEntity; |
| | | import com.lf.server.mapper.data.MenusMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 鑿滃崟 |
| | | * @author sws |
| | | * @date 2022-09-24 |
| | | */ |
| | | @Service |
| | | public class MenusService implements MenusMapper { |
| | | @Autowired |
| | | MenusMapper menusMapper; |
| | | |
| | | @Override |
| | | public Integer insertMenu(MenusEntity menusEntity) { |
| | | return menusMapper.insertMenu(menusEntity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insertMenus(List<MenusEntity> menusEntity) { |
| | | return menusMapper.insertMenus(menusEntity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer deleteMenu(int id) { |
| | | return menusMapper.deleteMenu(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer deleteMenus(List<Integer> ids) { |
| | | return menusMapper.deleteMenus(ids); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updateMenu(MenusEntity menusEntity) { |
| | | return menusMapper.updateMenu(menusEntity); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public MenusEntity selectMenu(int id) { |
| | | return menusMapper.selectMenu(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<MenusEntity> selectMenuAll() { |
| | | return menusMapper.selectMenuAll(); |
| | | } |
| | | } |
| | |
| | | username : postgres |
| | | password: postgres |
| | | url : jdbc:postgresql://192.168.20.39:5433/langfang |
| | | #url : jdbc:postgresql://127.0.0.1:5433/postgres |
| | | driver-class-name: org.postgresql.Driver |
| | | type: com.alibaba.druid.pool.DruidDataSource # 鑷畾涔夋暟鎹簮 |
| | | |
对比新文件 |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.lf.server.mapper.data.DepMapper"> |
| | | <resultMap id="resultMap" type="com.lf.server.entity.data.DepEntity"> |
| | | <id property="id" column="id"></id> |
| | | <result property="orderNum" column="order_num"></result> |
| | | <result property="createUser" column="create_user"></result> |
| | | <result property="createTime" column="create_time"></result> |
| | | <result property="updateUser" column="update_user"></result> |
| | | <result property="updateTime" column="update_time"></result> |
| | | </resultMap> |
| | | <select id="selectDepAll" resultMap="resultMap" resultType="com.lf.server.entity.data.DepEntity"> |
| | | select * from lf.sys_dep |
| | | </select> |
| | | |
| | | <select id="selectDep" resultMap="resultMap" resultType="com.lf.server.entity.data.DepEntity"> |
| | | select * from lf.sys_dep where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertDep" parameterType="com.lf.server.entity.data.DepEntity"> |
| | | insert into lf.sys_dep |
| | | (pid,name,sname,code,uncode,addr,contact,fax,email,post,website,level,order_num,create_user,create_time,bak) |
| | | values |
| | | (#{pid},#{name},#{sname},#{code},#{uncode},#{addr},#{contact},#{fax},#{email},#{post},#{website}, |
| | | #{level},#{orderNum},#{createUser},now(),#{bak}); |
| | | </insert> |
| | | |
| | | <insert id="insertDeps" > |
| | | insert into lf.sys_dep |
| | | (pid,name,sname,code,uncode,addr,contact,fax,email,post,website,level,order_num,create_user,create_time,bak) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | (#{item.pid},#{item.name},#{item.sname},#{item.code},#{item.uncode},#{item.addr},#{item.contact},#{item.fax}, |
| | | #{item.email},#{item.post},#{item.website},#{item.level},#{item.orderNum},#{item.createUser},now(),#{item.bak}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="deleteDep" > |
| | | delete from lf.sys_dep where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteDeps" > |
| | | delete from lf.sys_dep where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" |
| | | separator="," close=")"> |
| | | #{ids} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="updateDep"> |
| | | update lf.sys_dep set pid=#{pid},name=#{name},sname=#{sname},code=#{code},uncode=#{uncode},addr=#{addr},contact=#{contact},fax=#{fax}, |
| | | email=#{email},post=#{post},website=#{website},level=#{level},order_num =#{orderNum},update_user=#{updateUser},update_time=now(),bak=#{bak} where id=#{id} |
| | | </update> |
| | | </mapper> |
对比新文件 |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.lf.server.mapper.data.DirMapper"> |
| | | <resultMap id="resultMap" type="com.lf.server.entity.data.DirEntity"> |
| | | <id property="id" column="id"></id> |
| | | <result property="orderNum" column="order_num"></result> |
| | | <result property="createUser" column="create_user"></result> |
| | | <result property="createTime" column="create_time"></result> |
| | | <result property="updateUser" column="update_user"></result> |
| | | <result property="updateTime" column="update_time"></result> |
| | | </resultMap> |
| | | |
| | | <select id="selectDir" resultMap="resultMap" resultType="com.lf.server.entity.data.DirEntity"> |
| | | select * from lf.sys_dir where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectDirAll" resultMap="resultMap" resultType="com.lf.server.entity.data.DirEntity"> |
| | | select * from lf.sys_dir |
| | | </select> |
| | | |
| | | <insert id="insertDir" parameterType="com.lf.server.entity.data.DirEntity"> |
| | | insert into lf.sys_dir |
| | | (pid,name,code,descr,level,order_num,create_user,create_time,bak) |
| | | values |
| | | (#{pid},#{name},#{code},#{descr},#{level} ,#{orderNum},#{createUser},now(),#{bak}); |
| | | </insert> |
| | | |
| | | <insert id="insertDirs"> |
| | | insert into lf.sys_dir |
| | | (pid,name,code,descr,level,order_num,create_user,create_time,bak) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | (#{item.pid},#{item.name},#{item.code},#{item.descr},#{item.level} |
| | | ,#{item.orderNum},#{item.createUser},now(),#{item.bak}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="deleteDir" > |
| | | delete from lf.sys_dir where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteDirs" > |
| | | delete from lf.sys_dir where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" |
| | | separator="," close=")"> |
| | | #{ids} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="updateDir"> |
| | | update lf.sys_dir set pid=#{pid},name=#{name},code=#{code},descr=#{descr},level=#{level},order_num=#{orderNum}, |
| | | update_user=#{updateUser}, update_time=now(),bak=#{bak} where id=#{id} |
| | | </update> |
| | | </mapper> |
对比新文件 |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.lf.server.mapper.data.MenusMapper"> |
| | | <resultMap id="resultMap" type="com.lf.server.entity.data.MenusEntity"> |
| | | <id property="id" column="id"></id> |
| | | <result property="cnName" column="cn_name"></result> |
| | | <result property="enName" column="en_name"></result> |
| | | <result property="orderNum" column="order_num"></result> |
| | | <result property="isShow" column="is_show"></result> |
| | | <result property="createUser" column="create_user"></result> |
| | | <result property="createTime" column="create_time"></result> |
| | | <result property="updateUser" column="update_user"></result> |
| | | <result property="updateTime" column="update_time"></result> |
| | | </resultMap> |
| | | <select id="selectMenuAll" resultMap="resultMap" resultType="com.lf.server.entity.data.MenusEntity"> |
| | | select * from lf.sys_menu |
| | | </select> |
| | | |
| | | <select id="selectMenu" resultMap="resultMap" resultType="com.lf.server.entity.data.MenusEntity"> |
| | | select * from lf.sys_menu where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertMenu" parameterType="com.lf.server.entity.data.MenusEntity"> |
| | | insert into lf.sys_menu |
| | | (pid,cn_name,en_name,url,perms,type,icon,level,order_num,is_show, create_user,create_time,bak) |
| | | values |
| | | (#{pid},#{cnName},#{enName},#{url},#{perms},#{type},#{icon},#{level},#{orderNum},#{isShow},#{createUser},now(),#{bak}); |
| | | </insert> |
| | | |
| | | <insert id="insertMenus" > |
| | | insert into lf.sys_menu |
| | | (pid,cn_name,en_name,url,perms,type,icon,level,order_num,is_show, |
| | | create_user,create_time,bak) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | (#{item.pid},#{item.cnName},#{item.enName},#{item.url},#{item.perms},#{item.type},#{item.icon},#{item.level}, |
| | | #{item.orderNum},#{item.isShow},#{item.createUser},now(),#{item.bak}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="deleteMenu" > |
| | | delete from lf.sys_menu where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteMenus" > |
| | | delete from lf.sys_menu where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" |
| | | separator="," close=")"> |
| | | #{ids} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="updateMenu"> |
| | | update lf.sys_menu set pid=#{pid},cn_name=#{cnName},en_name=#{enName},url=#{url},perms=#{perms},type=#{type},icon=#{icon},level=#{level}, |
| | | order_num=#{orderNum},is_show=#{isShow},update_user=#{updateUser},update_time=#{updateTime},bak=#{bak} where id=#{id} |
| | | </update> |
| | | </mapper> |