Commit 33ab5cea by whl

Merge remote-tracking branch 'origin/future-page-ywd' into dev

# Conflicts:
#	bsoft-api/src/main/java/com/bsoft/api/mapper/DicDimMapper.java
#	bsoft-api/src/main/java/com/bsoft/api/mapper/DicIndMapper.java
#	bsoft-api/src/main/java/com/bsoft/api/mapper/DicOrgMapper.java
#	bsoft-api/src/main/java/com/bsoft/api/mapper/SerBlockMapper.java
#	bsoft-api/src/main/java/com/bsoft/api/mapper/SerPageBlockRsMapper.java
#	bsoft-api/src/main/java/com/bsoft/api/mapper/SerPageDimRsMapper.java
#	bsoft-api/src/main/java/com/bsoft/api/mapper/SerPageMapper.java
#	bsoft-api/src/main/java/com/bsoft/api/mapper/SysMenuMapper.java
#	bsoft-api/src/main/java/com/bsoft/api/mapper/SysOrgMapper.java
#	bsoft-api/src/main/java/com/bsoft/api/mapper/SysProjectMapper.java
#	bsoft-api/src/main/java/com/bsoft/api/mapper/SysRoleMapper.java
#	bsoft-api/src/main/java/com/bsoft/api/mapper/SysRoleMenuRsMapper.java
#	bsoft-api/src/main/java/com/bsoft/api/mapper/SysUserMapper.java
#	bsoft-api/src/main/java/com/bsoft/api/mapper/SysUserMenuRsMapper.java
#	bsoft-api/src/main/java/com/bsoft/api/mapper/SysUserOrgRsMapper.java
#	bsoft-api/src/main/java/com/bsoft/api/mapper/SysUserRoleRsMapper.java
#	bsoft-api/src/main/java/com/bsoft/api/model/SysUser.java
parents 5043c4bc 90b112f1
...@@ -37,7 +37,7 @@ public class DicDimController { ...@@ -37,7 +37,7 @@ public class DicDimController {
} }
@GetMapping("info") @GetMapping("info")
public Object info(Integer id){ public Object info(Long id){
dicDimService.find(id); dicDimService.find(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null); return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
} }
...@@ -55,7 +55,7 @@ public class DicDimController { ...@@ -55,7 +55,7 @@ public class DicDimController {
} }
@PostMapping("delete") @PostMapping("delete")
public Object delete(Integer id){ public Object delete(Long id){
dicDimService.delete(id); dicDimService.delete(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null); return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
} }
......
package com.bsoft.api.controller;
import com.bsoft.api.common.base.RequestResult;
import com.bsoft.api.common.enums.RequestResultType;
import com.bsoft.api.model.DicDim;
import com.bsoft.api.model.DicInd;
import com.bsoft.api.model.respmodel.ListPage;
import com.bsoft.api.service.DicIndService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Api(tags = {"指标库"})
@RequestMapping("ind")
@RestController
public class DicIndController {
@Autowired
private DicIndService dicIndService;
@GetMapping("list")
public Object list(){
List<DicInd> list = dicIndService.findAll();
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("listpage")
public Object listpage(Integer pageSize, Integer pageIndex){
List<DicInd> list = dicIndService.findAll();
ListPage<DicDim> listPage = new ListPage(list, pageSize, pageIndex, 0);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("info")
public Object info(Long id){
dicIndService.find(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("add")
public Object add(DicInd dicInd){
dicIndService.add(dicInd);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("update")
public Object update(DicInd dicInd){
dicIndService.update(dicInd);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("delete")
public Object delete(Long id){
dicIndService.delete(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
}
...@@ -37,7 +37,7 @@ public class DicOrgController { ...@@ -37,7 +37,7 @@ public class DicOrgController {
} }
@GetMapping("info") @GetMapping("info")
public Object info(Integer id){ public Object info(Long id){
dicOrgService.find(id); dicOrgService.find(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null); return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
} }
...@@ -55,7 +55,7 @@ public class DicOrgController { ...@@ -55,7 +55,7 @@ public class DicOrgController {
} }
@PostMapping("delete") @PostMapping("delete")
public Object delete(Integer id){ public Object delete(Long id){
dicOrgService.delete(id); dicOrgService.delete(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null); return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
} }
......
...@@ -37,7 +37,7 @@ public class SysMenuController { ...@@ -37,7 +37,7 @@ public class SysMenuController {
} }
@GetMapping("info") @GetMapping("info")
public Object info(Integer id){ public Object info(Long id){
sysMenuService.find(id); sysMenuService.find(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null); return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
} }
...@@ -55,7 +55,7 @@ public class SysMenuController { ...@@ -55,7 +55,7 @@ public class SysMenuController {
} }
@PostMapping("delete") @PostMapping("delete")
public Object delete(Integer id){ public Object delete(Long id){
sysMenuService.delete(id); sysMenuService.delete(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null); return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
} }
......
...@@ -37,7 +37,7 @@ public class SysRoleController { ...@@ -37,7 +37,7 @@ public class SysRoleController {
} }
@GetMapping("info") @GetMapping("info")
public Object info(Integer id){ public Object info(Long id){
sysRoleService.find(id); sysRoleService.find(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null); return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
} }
...@@ -55,7 +55,7 @@ public class SysRoleController { ...@@ -55,7 +55,7 @@ public class SysRoleController {
} }
@PostMapping("delete") @PostMapping("delete")
public Object delete(Integer id){ public Object delete(Long id){
sysRoleService.delete(id); sysRoleService.delete(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null); return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
} }
......
...@@ -38,7 +38,7 @@ public class SysRoleMenuRsController { ...@@ -38,7 +38,7 @@ public class SysRoleMenuRsController {
} }
@GetMapping("info") @GetMapping("info")
public Object info(Integer id){ public Object info(Long id){
sysRoleMenuRsService.find(id); sysRoleMenuRsService.find(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null); return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
} }
...@@ -56,7 +56,7 @@ public class SysRoleMenuRsController { ...@@ -56,7 +56,7 @@ public class SysRoleMenuRsController {
} }
@PostMapping("delete") @PostMapping("delete")
public Object delete(Integer id){ public Object delete(Long id){
sysRoleMenuRsService.delete(id); sysRoleMenuRsService.delete(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null); return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
} }
......
...@@ -38,7 +38,7 @@ public class SysUserMenuRsController { ...@@ -38,7 +38,7 @@ public class SysUserMenuRsController {
} }
@GetMapping("info") @GetMapping("info")
public Object info(Integer id){ public Object info(Long id){
sysUserMenuRsService.find(id); sysUserMenuRsService.find(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null); return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
} }
...@@ -56,7 +56,7 @@ public class SysUserMenuRsController { ...@@ -56,7 +56,7 @@ public class SysUserMenuRsController {
} }
@PostMapping("delete") @PostMapping("delete")
public Object delete(Integer id){ public Object delete(Long id){
sysUserMenuRsService.delete(id); sysUserMenuRsService.delete(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null); return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
} }
......
...@@ -37,7 +37,7 @@ public class SysUserOrgController { ...@@ -37,7 +37,7 @@ public class SysUserOrgController {
} }
@GetMapping("info") @GetMapping("info")
public Object info(Integer id){ public Object info(Long id){
sysUserOrgRsService.find(id); sysUserOrgRsService.find(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null); return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
} }
...@@ -55,7 +55,7 @@ public class SysUserOrgController { ...@@ -55,7 +55,7 @@ public class SysUserOrgController {
} }
@PostMapping("delete") @PostMapping("delete")
public Object delete(Integer id){ public Object delete(Long id){
sysUserOrgRsService.delete(id); sysUserOrgRsService.delete(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null); return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
} }
......
...@@ -37,7 +37,7 @@ public class SysUserRoleRsController { ...@@ -37,7 +37,7 @@ public class SysUserRoleRsController {
} }
@GetMapping("info") @GetMapping("info")
public Object info(Integer id){ public Object info(Long id){
sysUserRoleRsService.find(id); sysUserRoleRsService.find(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null); return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
} }
...@@ -55,7 +55,7 @@ public class SysUserRoleRsController { ...@@ -55,7 +55,7 @@ public class SysUserRoleRsController {
} }
@PostMapping("delete") @PostMapping("delete")
public Object delete(Integer id){ public Object delete(Long id){
sysUserRoleRsService.delete(id); sysUserRoleRsService.delete(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null); return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
} }
......
...@@ -2,10 +2,15 @@ package com.bsoft.api.controller; ...@@ -2,10 +2,15 @@ package com.bsoft.api.controller;
import com.bsoft.api.common.Result; import com.bsoft.api.common.Result;
import com.bsoft.api.common.annotations.CurrentUser; import com.bsoft.api.common.annotations.CurrentUser;
import com.bsoft.api.common.annotations.Token;
import com.bsoft.api.model.SysUser; import com.bsoft.api.model.SysUser;
import com.bsoft.api.service.SysMenuService;
import com.bsoft.api.service.SysUserRoleRsService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;
...@@ -14,9 +19,37 @@ import springfox.documentation.annotations.ApiIgnore; ...@@ -14,9 +19,37 @@ import springfox.documentation.annotations.ApiIgnore;
@RequestMapping("/user") @RequestMapping("/user")
@RestController @RestController
public class UserController { public class UserController {
@Autowired
private SysUserRoleRsService sysUserRoleRsService;
@Autowired
private SysMenuService sysMenuService;
@GetMapping() @GetMapping()
public Object user(@CurrentUser@ApiIgnore SysUser user){ public Object user(@CurrentUser@ApiIgnore SysUser user){
return Result.success(user); return Result.success(user);
} }
/**
* 根据用户id查询用户角色
* @param userId 用户id
* @return
*/
@GetMapping("getRole")
@Token
public Object getRoleListByUser(@ApiIgnore Long userId)throws Exception{
return Result.success(sysUserRoleRsService.getRoleListByUser(userId));
}
/**
* 根据用户id查询用户角色
* @param userId 用户id
* @return
*/
@GetMapping("getMenu")
// @Token
public Object getMenuByUser(Long userId)throws Exception{
return Result.success(sysMenuService.getMenu(userId));
}
} }
...@@ -3,103 +3,498 @@ package com.bsoft.api.model; ...@@ -3,103 +3,498 @@ package com.bsoft.api.model;
import java.util.Date; import java.util.Date;
public class SysUser { public class SysUser {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.ID
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
private Long id; private Long id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.CREATE_DATE
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
private Date createDate; private Date createDate;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.CREATE_USERID
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
private Long createUserid; private Long createUserid;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.STATE
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
private Short state; private Short state;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.USER_CODE
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
private String userCode; private String userCode;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.USER_NAME
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
private String userName; private String userName;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.PASSWORD
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
private String password; private String password;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.IDCARD
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
private String idcard; private String idcard;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.SEX
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
private String sex; private String sex;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.MOBILE
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
private String mobile; private String mobile;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.PAGE_COUNT
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
private Long pageCount;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.ERROR_COUNT
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
private Long errorCount;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.ERROR_TIME
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
private Date errorTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.LAST_TIME
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
private Date lastTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.LAST_IP
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
private String lastIp;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.ID
*
* @return the value of LL.SYS_USER.ID
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public Long getId() { public Long getId() {
return id; return id;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.ID
*
* @param id the value for LL.SYS_USER.ID
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.CREATE_DATE
*
* @return the value of LL.SYS_USER.CREATE_DATE
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.CREATE_DATE
*
* @param createDate the value for LL.SYS_USER.CREATE_DATE
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public void setCreateDate(Date createDate) { public void setCreateDate(Date createDate) {
this.createDate = createDate; this.createDate = createDate;
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.CREATE_USERID
*
* @return the value of LL.SYS_USER.CREATE_USERID
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public Long getCreateUserid() { public Long getCreateUserid() {
return createUserid; return createUserid;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.CREATE_USERID
*
* @param createUserid the value for LL.SYS_USER.CREATE_USERID
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public void setCreateUserid(Long createUserid) { public void setCreateUserid(Long createUserid) {
this.createUserid = createUserid; this.createUserid = createUserid;
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.STATE
*
* @return the value of LL.SYS_USER.STATE
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public Short getState() { public Short getState() {
return state; return state;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.STATE
*
* @param state the value for LL.SYS_USER.STATE
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public void setState(Short state) { public void setState(Short state) {
this.state = state; this.state = state;
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.USER_CODE
*
* @return the value of LL.SYS_USER.USER_CODE
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public String getUserCode() { public String getUserCode() {
return userCode; return userCode;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.USER_CODE
*
* @param userCode the value for LL.SYS_USER.USER_CODE
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public void setUserCode(String userCode) { public void setUserCode(String userCode) {
this.userCode = userCode; this.userCode = userCode;
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.USER_NAME
*
* @return the value of LL.SYS_USER.USER_NAME
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public String getUserName() { public String getUserName() {
return userName; return userName;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.USER_NAME
*
* @param userName the value for LL.SYS_USER.USER_NAME
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public void setUserName(String userName) { public void setUserName(String userName) {
this.userName = userName; this.userName = userName;
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.PASSWORD
*
* @return the value of LL.SYS_USER.PASSWORD
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public String getPassword() { public String getPassword() {
return password; return password;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.PASSWORD
*
* @param password the value for LL.SYS_USER.PASSWORD
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public void setPassword(String password) { public void setPassword(String password) {
this.password = password; this.password = password;
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.IDCARD
*
* @return the value of LL.SYS_USER.IDCARD
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public String getIdcard() { public String getIdcard() {
return idcard; return idcard;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.IDCARD
*
* @param idcard the value for LL.SYS_USER.IDCARD
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public void setIdcard(String idcard) { public void setIdcard(String idcard) {
this.idcard = idcard; this.idcard = idcard;
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.SEX
*
* @return the value of LL.SYS_USER.SEX
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public String getSex() { public String getSex() {
return sex; return sex;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.SEX
*
* @param sex the value for LL.SYS_USER.SEX
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public void setSex(String sex) { public void setSex(String sex) {
this.sex = sex; this.sex = sex;
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.MOBILE
*
* @return the value of LL.SYS_USER.MOBILE
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public String getMobile() { public String getMobile() {
return mobile; return mobile;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.MOBILE
*
* @param mobile the value for LL.SYS_USER.MOBILE
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public void setMobile(String mobile) { public void setMobile(String mobile) {
this.mobile = mobile; this.mobile = mobile;
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.PAGE_COUNT
*
* @return the value of LL.SYS_USER.PAGE_COUNT
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public Long getPageCount() {
return pageCount;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.PAGE_COUNT
*
* @param pageCount the value for LL.SYS_USER.PAGE_COUNT
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public void setPageCount(Long pageCount) {
this.pageCount = pageCount;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.ERROR_COUNT
*
* @return the value of LL.SYS_USER.ERROR_COUNT
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public Long getErrorCount() {
return errorCount;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.ERROR_COUNT
*
* @param errorCount the value for LL.SYS_USER.ERROR_COUNT
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public void setErrorCount(Long errorCount) {
this.errorCount = errorCount;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.ERROR_TIME
*
* @return the value of LL.SYS_USER.ERROR_TIME
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public Date getErrorTime() {
return errorTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.ERROR_TIME
*
* @param errorTime the value for LL.SYS_USER.ERROR_TIME
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public void setErrorTime(Date errorTime) {
this.errorTime = errorTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.LAST_TIME
*
* @return the value of LL.SYS_USER.LAST_TIME
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public Date getLastTime() {
return lastTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.LAST_TIME
*
* @param lastTime the value for LL.SYS_USER.LAST_TIME
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public void setLastTime(Date lastTime) {
this.lastTime = lastTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.LAST_IP
*
* @return the value of LL.SYS_USER.LAST_IP
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public String getLastIp() {
return lastIp;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.LAST_IP
*
* @param lastIp the value for LL.SYS_USER.LAST_IP
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public void setLastIp(String lastIp) {
this.lastIp = lastIp;
}
} }
\ No newline at end of file
package com.bsoft.api.model.respmodel;
import com.bsoft.api.model.SysMenu;
import java.util.List;
public class SysMenuList extends SysMenu {
private List<SysMenuList> sysMenuList;
public void setSysMenuList(List<SysMenuList> sysMenuList) {
this.sysMenuList = sysMenuList;
}
public List<SysMenuList> getSysMenuList() {
return this.sysMenuList;
}
}
package com.bsoft.api.service;
import com.bsoft.api.model.DicInd;
public interface DicIndService extends ServiceBase<DicInd>{
}
...@@ -3,7 +3,6 @@ package com.bsoft.api.service.Impl; ...@@ -3,7 +3,6 @@ package com.bsoft.api.service.Impl;
import com.bsoft.api.mapper.DicDimMapper; import com.bsoft.api.mapper.DicDimMapper;
import com.bsoft.api.model.DicDim; import com.bsoft.api.model.DicDim;
import com.bsoft.api.service.DicDimService; import com.bsoft.api.service.DicDimService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
...@@ -12,6 +11,7 @@ import java.util.List; ...@@ -12,6 +11,7 @@ import java.util.List;
@Service @Service
public class DicDimServiceImpl implements DicDimService { public class DicDimServiceImpl implements DicDimService {
@Resource @Resource
private DicDimMapper dicDimMapper; private DicDimMapper dicDimMapper;
...@@ -26,17 +26,17 @@ public class DicDimServiceImpl implements DicDimService { ...@@ -26,17 +26,17 @@ public class DicDimServiceImpl implements DicDimService {
} }
@Override @Override
public DicDim find(int id) { public DicDim find(Long id) {
return dicDimMapper.selectByPrimaryKey(BigDecimal.valueOf(id)); return dicDimMapper.selectByPrimaryKey(id);
} }
@Override @Override
public int delete(int id) { public int delete(Long id) {
return dicDimMapper.deleteByPrimaryKey(BigDecimal.valueOf(id)); return dicDimMapper.deleteByPrimaryKey(id);
} }
@Override @Override
public int logicDelete(int id) { public int logicDelete(Long id) {
return 0; return 0;
} }
......
package com.bsoft.api.service.Impl;
import com.bsoft.api.mapper.DicIndMapper;
import com.bsoft.api.model.DicInd;
import com.bsoft.api.service.DicIndService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
public class DicIndServiceImpl implements DicIndService {
@Resource
private DicIndMapper dicIndMapper;
@Override
public int add(DicInd dicInd) {
return dicIndMapper.insert(dicInd);
}
@Override
public List<DicInd> findAll() {
return dicIndMapper.selectAll();
}
@Override
public DicInd find(Long id) {
return dicIndMapper.selectByPrimaryKey(id);
}
@Override
public int delete(Long id) {
return dicIndMapper.deleteByPrimaryKey(id);
}
@Override
public int logicDelete(Long id) {
return 0;
}
@Override
public int update(DicInd dicInd) {
return dicIndMapper.updateByPrimaryKey(dicInd);
}
}
...@@ -9,7 +9,7 @@ import java.math.BigDecimal; ...@@ -9,7 +9,7 @@ import java.math.BigDecimal;
import java.util.List; import java.util.List;
@Service @Service
public class dicOrgServiceImpl implements DicOrgService { public class DicOrgServiceImpl implements DicOrgService {
@Resource @Resource
private DicOrgMapper dicOrgMapper; private DicOrgMapper dicOrgMapper;
...@@ -24,17 +24,17 @@ public class dicOrgServiceImpl implements DicOrgService { ...@@ -24,17 +24,17 @@ public class dicOrgServiceImpl implements DicOrgService {
} }
@Override @Override
public DicOrg find(int id) { public DicOrg find(Long id) {
return dicOrgMapper.selectByPrimaryKey(BigDecimal.valueOf(id)); return dicOrgMapper.selectByPrimaryKey(id);
} }
@Override @Override
public int delete(int id) { public int delete(Long id) {
return dicOrgMapper.deleteByPrimaryKey(BigDecimal.valueOf(id)); return dicOrgMapper.deleteByPrimaryKey(id);
} }
@Override @Override
public int logicDelete(int id) { public int logicDelete(Long id) {
return 0; return 0;
} }
......
...@@ -2,19 +2,45 @@ package com.bsoft.api.service.Impl; ...@@ -2,19 +2,45 @@ package com.bsoft.api.service.Impl;
import com.bsoft.api.mapper.SysMenuMapper; import com.bsoft.api.mapper.SysMenuMapper;
import com.bsoft.api.model.SysMenu; import com.bsoft.api.model.SysMenu;
import com.bsoft.api.model.respmodel.SysMenuList;
import com.bsoft.api.service.SysMenuService; import com.bsoft.api.service.SysMenuService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.awt.*;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
@Service @Service
public class SysMenuServiceImpl implements SysMenuService { public class SysMenuServiceImpl implements SysMenuService {
@Resource @Resource
private SysMenuMapper sysMenuMapper; private SysMenuMapper sysMenuMapper;
@Override @Override
public List<SysMenuList> getMenu(Long userId) throws Exception {
SysMenuList sysMenuList = new SysMenuList();
SysMenu sysMenu = new SysMenu();
List<SysMenuList> list = sysMenuMapper.selectMenuByUser(userId);
List<SysMenuList> resultList = getLevelData(list, Long.valueOf(0));
return resultList;
}
private List<SysMenuList> getLevelData(List<SysMenuList> list, Long parentcode) {
List<SysMenuList> resultList = new ArrayList<>();
for (SysMenuList data : list) {
if (data.getParentId() == parentcode){
List<SysMenuList> childList = getLevelData(list,data.getId());
data.setSysMenuList(childList);
resultList.add(data);
}
}
return resultList;
}
@Override
public int add(SysMenu sysMenu) { public int add(SysMenu sysMenu) {
return sysMenuMapper.insert(sysMenu); return sysMenuMapper.insert(sysMenu);
} }
...@@ -25,17 +51,17 @@ public class SysMenuServiceImpl implements SysMenuService { ...@@ -25,17 +51,17 @@ public class SysMenuServiceImpl implements SysMenuService {
} }
@Override @Override
public SysMenu find(int id) { public SysMenu find(Long id) {
return sysMenuMapper.selectByPrimaryKey(BigDecimal.valueOf(id)); return sysMenuMapper.selectByPrimaryKey(id);
} }
@Override @Override
public int delete(int id) { public int delete(Long id) {
return sysMenuMapper.deleteByPrimaryKey(BigDecimal.valueOf(id)); return sysMenuMapper.deleteByPrimaryKey(id);
} }
@Override @Override
public int logicDelete(int id) { public int logicDelete(Long id) {
return 0; return 0;
} }
......
...@@ -25,17 +25,17 @@ public class SysRoleMenuRsServiceImpl implements SysRoleMenuRsService { ...@@ -25,17 +25,17 @@ public class SysRoleMenuRsServiceImpl implements SysRoleMenuRsService {
} }
@Override @Override
public SysRoleMenuRs find(int id) { public SysRoleMenuRs find(Long id) {
return sysRoleMenuRsMapper.selectByPrimaryKey(BigDecimal.valueOf(id)); return sysRoleMenuRsMapper.selectByPrimaryKey(id);
} }
@Override @Override
public int delete(int id) { public int delete(Long id) {
return sysRoleMenuRsMapper.deleteByPrimaryKey(BigDecimal.valueOf(id)); return sysRoleMenuRsMapper.deleteByPrimaryKey(id);
} }
@Override @Override
public int logicDelete(int id) { public int logicDelete(Long id) {
return 0; return 0;
} }
......
package com.bsoft.api.service.Impl; package com.bsoft.api.service.Impl;
import com.bsoft.api.mapper.SysRoleMapper; import com.bsoft.api.mapper.SysRoleMapper;
import com.bsoft.api.model.DicOrg;
import com.bsoft.api.model.SysRole; import com.bsoft.api.model.SysRole;
import com.bsoft.api.service.SysRoleService; import com.bsoft.api.service.SysRoleService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -26,17 +25,17 @@ public class SysRoleServiceImpl implements SysRoleService { ...@@ -26,17 +25,17 @@ public class SysRoleServiceImpl implements SysRoleService {
} }
@Override @Override
public SysRole find(int id) { public SysRole find(Long id) {
return sysRoleMapper.selectByPrimaryKey(BigDecimal.valueOf(id)); return sysRoleMapper.selectByPrimaryKey(id);
} }
@Override @Override
public int delete(int id) { public int delete(Long id) {
return sysRoleMapper.deleteByPrimaryKey(BigDecimal.valueOf(id)); return sysRoleMapper.deleteByPrimaryKey(id);
} }
@Override @Override
public int logicDelete(int id) { public int logicDelete(Long id) {
return 0; return 0;
} }
......
...@@ -25,17 +25,17 @@ public class SysUserMenuRsServiceImpl implements SysUserMenuRsService { ...@@ -25,17 +25,17 @@ public class SysUserMenuRsServiceImpl implements SysUserMenuRsService {
} }
@Override @Override
public SysUserMenuRs find(int id) { public SysUserMenuRs find(Long id) {
return sysUserMenuRsMapper.selectByPrimaryKey(BigDecimal.valueOf(id)); return sysUserMenuRsMapper.selectByPrimaryKey(id);
} }
@Override @Override
public int delete(int id) { public int delete(Long id) {
return sysUserMenuRsMapper.deleteByPrimaryKey(BigDecimal.valueOf(id)); return sysUserMenuRsMapper.deleteByPrimaryKey(id);
} }
@Override @Override
public int logicDelete(int id) { public int logicDelete(Long id) {
return 0; return 0;
} }
......
...@@ -25,17 +25,17 @@ public class SysUserOrgRsServiceImpl implements SysUserOrgRsService { ...@@ -25,17 +25,17 @@ public class SysUserOrgRsServiceImpl implements SysUserOrgRsService {
} }
@Override @Override
public SysUserOrgRs find(int id) { public SysUserOrgRs find(Long id) {
return sysUserOrgRsMapper.selectByPrimaryKey(BigDecimal.valueOf(id)); return sysUserOrgRsMapper.selectByPrimaryKey(id);
} }
@Override @Override
public int delete(int id) { public int delete(Long id) {
return sysUserOrgRsMapper.deleteByPrimaryKey(BigDecimal.valueOf(id)); return sysUserOrgRsMapper.deleteByPrimaryKey(id);
} }
@Override @Override
public int logicDelete(int id) { public int logicDelete(Long id) {
return 0; return 0;
} }
......
package com.bsoft.api.service.Impl; package com.bsoft.api.service.Impl;
import com.bsoft.api.mapper.SysUserRoleRsMapper; import com.bsoft.api.mapper.SysUserRoleRsMapper;
import com.bsoft.api.model.SysMenu; import com.bsoft.api.model.SysRole;
import com.bsoft.api.model.SysUserRoleRs; import com.bsoft.api.model.SysUserRoleRs;
import com.bsoft.api.service.SysUserRoleRsService; import com.bsoft.api.service.SysUserRoleRsService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -12,9 +12,16 @@ import java.util.List; ...@@ -12,9 +12,16 @@ import java.util.List;
@Service @Service
public class SysUserRoleServiceImpl implements SysUserRoleRsService { public class SysUserRoleServiceImpl implements SysUserRoleRsService {
@Resource @Resource
private SysUserRoleRsMapper sysUserRoleRsMapper; private SysUserRoleRsMapper sysUserRoleRsMapper;
@Override
public List<SysRole> getRoleListByUser(Long userId) throws Exception {
return sysUserRoleRsMapper.selectRoleByUser(userId);
}
@Override @Override
public int add(SysUserRoleRs sysUserRoleRs) { public int add(SysUserRoleRs sysUserRoleRs) {
return sysUserRoleRsMapper.insert(sysUserRoleRs); return sysUserRoleRsMapper.insert(sysUserRoleRs);
...@@ -26,17 +33,17 @@ public class SysUserRoleServiceImpl implements SysUserRoleRsService { ...@@ -26,17 +33,17 @@ public class SysUserRoleServiceImpl implements SysUserRoleRsService {
} }
@Override @Override
public SysUserRoleRs find(int id) { public SysUserRoleRs find(Long id) {
return sysUserRoleRsMapper.selectByPrimaryKey(BigDecimal.valueOf(id)); return sysUserRoleRsMapper.selectByPrimaryKey(id);
} }
@Override @Override
public int delete(int id) { public int delete(Long id) {
return sysUserRoleRsMapper.deleteByPrimaryKey(BigDecimal.valueOf(id)); return sysUserRoleRsMapper.deleteByPrimaryKey(id);
} }
@Override @Override
public int logicDelete(int id) { public int logicDelete(Long id) {
return 0; return 0;
} }
......
...@@ -21,21 +21,21 @@ public interface ServiceBase<T> { ...@@ -21,21 +21,21 @@ public interface ServiceBase<T> {
* @param id * @param id
* @return * @return
*/ */
T find(int id); T find(Long id);
/** /**
* 物理删除 * 物理删除
* @param id * @param id
* @return * @return
*/ */
int delete(int id); int delete(Long id);
/** /**
* 逻辑删除 * 逻辑删除
* @param id * @param id
* @return * @return
*/ */
int logicDelete(int id); int logicDelete(Long id);
/** /**
* 更新 * 更新
......
package com.bsoft.api.service; package com.bsoft.api.service;
import com.bsoft.api.model.SysMenu; import com.bsoft.api.model.SysMenu;
import com.bsoft.api.model.respmodel.SysMenuList;
import java.util.List;
public interface SysMenuService extends ServiceBase<SysMenu> { public interface SysMenuService extends ServiceBase<SysMenu> {
List<SysMenuList> getMenu(Long userId) throws Exception;
} }
package com.bsoft.api.service; package com.bsoft.api.service;
import com.bsoft.api.model.SysRole;
import com.bsoft.api.model.SysUserRoleRs; import com.bsoft.api.model.SysUserRoleRs;
import java.util.List;
public interface SysUserRoleRsService extends ServiceBase<SysUserRoleRs> { public interface SysUserRoleRsService extends ServiceBase<SysUserRoleRs> {
List<SysRole> getRoleListByUser(Long userId) throws Exception;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment