Commit 74794a36 by 陶光胜

Merge branch 'developer' of…

Merge branch 'developer' of http://115.159.76.241/base_platform_enterprise/gic-platform-auth into developer
parents 27e37829 b2b2da04
package com.gic.auth.constant;
/**
* 权限管理:应用code
* @ClassName: AppMenuCodeConstants

* @Description: 

* @author guojuxing

* @date 2020/10/19 3:31 PM

*/
public class AppMenuCodeConstants {
/**
* 商品应用菜单code
*/
public static final String GOODS_APP = "goods_app";
/**
* gic权限页面code
*/
public static final String GOODS_GIC = "goods";
}
package com.gic.auth.constant;
/**
* 权限菜单平台类型
* @ClassName: MenuPlatformTypeEnum

* @Description: 

* @author guojuxing

* @date 2020/10/23 9:52 AM

*/
public enum MenuPlatformTypeEnum {
GIC(0, "gic"),
HAOBAN_PC(1, "好办后台"),
HAOBAN_APPLET(3, "好办小程序"),
HAOBAN_APP(2, "好办应用"),
HAOBAN_APPLET_APP(4, "好办小程序应用");
private Integer code;
private String message;
private MenuPlatformTypeEnum(Integer code, String message) {
this.code = code;
this.message = message;
}
public Integer getCode() {
return code;
}
public MenuPlatformTypeEnum setCode(Integer code) {
this.code = code;
return this;
}
public String getMessage() {
return message;
}
public MenuPlatformTypeEnum setMessage(String message) {
this.message = message;
return this;
}
}
...@@ -47,9 +47,9 @@ public class AccountGroupDTO implements Serializable{ ...@@ -47,9 +47,9 @@ public class AccountGroupDTO implements Serializable{
private Integer enterpriseId; private Integer enterpriseId;
/** /**
* 1:有效 0:无效 * 0:有效 1:无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* 排序 * 排序
...@@ -95,12 +95,13 @@ public class AccountGroupDTO implements Serializable{ ...@@ -95,12 +95,13 @@ public class AccountGroupDTO implements Serializable{
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public AccountGroupDTO setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Integer getSort() { public Integer getSort() {
...@@ -141,7 +142,7 @@ public class AccountGroupDTO implements Serializable{ ...@@ -141,7 +142,7 @@ public class AccountGroupDTO implements Serializable{
"accountGroupId=" + accountGroupId + "accountGroupId=" + accountGroupId +
", accountGroupName='" + accountGroupName + '\'' + ", accountGroupName='" + accountGroupName + '\'' +
", enterpriseId=" + enterpriseId + ", enterpriseId=" + enterpriseId +
", status=" + status + ", deleteFlag=" + deleteFlag +
", sort=" + sort + ", sort=" + sort +
", createTime=" + createTime + ", createTime=" + createTime +
", updateTime=" + updateTime + ", updateTime=" + updateTime +
......
...@@ -34,9 +34,9 @@ public class AccountGroupRelDTO implements Serializable{ ...@@ -34,9 +34,9 @@ public class AccountGroupRelDTO implements Serializable{
private Integer enterpriseId; private Integer enterpriseId;
/** /**
* 1:有效 0:无效 * 0:有效 1:无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* 1:管理员 2:协作人 * 1:管理员 2:协作人
...@@ -86,14 +86,6 @@ public class AccountGroupRelDTO implements Serializable{ ...@@ -86,14 +86,6 @@ public class AccountGroupRelDTO implements Serializable{
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getType() { public Integer getType() {
return type; return type;
} }
...@@ -118,6 +110,15 @@ public class AccountGroupRelDTO implements Serializable{ ...@@ -118,6 +110,15 @@ public class AccountGroupRelDTO implements Serializable{
this.updateTime = updateTime; this.updateTime = updateTime;
} }
public Integer getDeleteFlag() {
return deleteFlag;
}
public AccountGroupRelDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
@Override @Override
public String toString() { public String toString() {
return "AccountGroupRelDTO{" + return "AccountGroupRelDTO{" +
...@@ -125,7 +126,7 @@ public class AccountGroupRelDTO implements Serializable{ ...@@ -125,7 +126,7 @@ public class AccountGroupRelDTO implements Serializable{
", accountGroupId=" + accountGroupId + ", accountGroupId=" + accountGroupId +
", userId=" + userId + ", userId=" + userId +
", enterpriseId=" + enterpriseId + ", enterpriseId=" + enterpriseId +
", status=" + status + ", deleteFlag=" + deleteFlag +
", type=" + type + ", type=" + type +
", createTime=" + createTime + ", createTime=" + createTime +
", updateTime=" + updateTime + ", updateTime=" + updateTime +
......
...@@ -34,7 +34,7 @@ public class AuditedGroupUserRelDTO implements Serializable { ...@@ -34,7 +34,7 @@ public class AuditedGroupUserRelDTO implements Serializable {
/** /**
* *
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -79,12 +79,13 @@ public class AuditedGroupUserRelDTO implements Serializable { ...@@ -79,12 +79,13 @@ public class AuditedGroupUserRelDTO implements Serializable {
this.userId = userId; this.userId = userId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public AuditedGroupUserRelDTO setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
...@@ -118,7 +119,7 @@ public class AuditedGroupUserRelDTO implements Serializable { ...@@ -118,7 +119,7 @@ public class AuditedGroupUserRelDTO implements Serializable {
", enterpriseId=" + enterpriseId + ", enterpriseId=" + enterpriseId +
", auditedGroupId=" + auditedGroupId + ", auditedGroupId=" + auditedGroupId +
", userId=" + userId + ", userId=" + userId +
", status=" + status + ", status=" + deleteFlag +
", createTime=" + createTime + ", createTime=" + createTime +
", updateTime=" + updateTime + ", updateTime=" + updateTime +
", auditedGroupIdList=" + auditedGroupIdList + ", auditedGroupIdList=" + auditedGroupIdList +
......
...@@ -35,7 +35,7 @@ public class AuditorAuditedGroupRelDTO implements Serializable { ...@@ -35,7 +35,7 @@ public class AuditorAuditedGroupRelDTO implements Serializable {
/** /**
* *
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -80,12 +80,13 @@ public class AuditorAuditedGroupRelDTO implements Serializable { ...@@ -80,12 +80,13 @@ public class AuditorAuditedGroupRelDTO implements Serializable {
this.auditedGroupId = auditedGroupId; this.auditedGroupId = auditedGroupId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public AuditorAuditedGroupRelDTO setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
...@@ -119,7 +120,7 @@ public class AuditorAuditedGroupRelDTO implements Serializable { ...@@ -119,7 +120,7 @@ public class AuditorAuditedGroupRelDTO implements Serializable {
", enterpriseId=" + enterpriseId + ", enterpriseId=" + enterpriseId +
", auditorId=" + auditorId + ", auditorId=" + auditorId +
", auditedGroupId=" + auditedGroupId + ", auditedGroupId=" + auditedGroupId +
", status=" + status + ", status=" + deleteFlag +
", createTime=" + createTime + ", createTime=" + createTime +
", updateTime=" + updateTime + ", updateTime=" + updateTime +
", auditorIdList=" + auditorIdList + ", auditorIdList=" + auditorIdList +
......
...@@ -35,9 +35,9 @@ public class AuthCodeDTO implements Serializable { ...@@ -35,9 +35,9 @@ public class AuthCodeDTO implements Serializable {
private Integer relationId; private Integer relationId;
/** /**
* 1有效 0失效 * 0有效 1失效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -77,12 +77,13 @@ public class AuthCodeDTO implements Serializable { ...@@ -77,12 +77,13 @@ public class AuthCodeDTO implements Serializable {
this.relationId = relationId; this.relationId = relationId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public AuthCodeDTO setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getExpirationTime() { public Date getExpirationTime() {
...@@ -100,7 +101,7 @@ public class AuthCodeDTO implements Serializable { ...@@ -100,7 +101,7 @@ public class AuthCodeDTO implements Serializable {
", authCode='" + authCode + '\'' + ", authCode='" + authCode + '\'' +
", enterpriseId=" + enterpriseId + ", enterpriseId=" + enterpriseId +
", relationId=" + relationId + ", relationId=" + relationId +
", status=" + status + ", deleteFlag=" + deleteFlag +
", expirationTime=" + expirationTime + ", expirationTime=" + expirationTime +
'}'; '}';
} }
......
...@@ -49,9 +49,9 @@ public class BusinessFrontResDTO implements Serializable{ ...@@ -49,9 +49,9 @@ public class BusinessFrontResDTO implements Serializable{
private Integer enterpriseId; private Integer enterpriseId;
/** /**
* 状态1:有效 0:无效 * 状态0:有效 1:无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -119,12 +119,13 @@ public class BusinessFrontResDTO implements Serializable{ ...@@ -119,12 +119,13 @@ public class BusinessFrontResDTO implements Serializable{
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public BusinessFrontResDTO setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
...@@ -153,7 +154,7 @@ public class BusinessFrontResDTO implements Serializable{ ...@@ -153,7 +154,7 @@ public class BusinessFrontResDTO implements Serializable{
", pageName='" + pageName + '\'' + ", pageName='" + pageName + '\'' +
", resourceDetail='" + resourceDetail + '\'' + ", resourceDetail='" + resourceDetail + '\'' +
", enterpriseId=" + enterpriseId + ", enterpriseId=" + enterpriseId +
", status=" + status + ", deleteFlag=" + deleteFlag +
", createTime=" + createTime + ", createTime=" + createTime +
", updateTime=" + updateTime + ", updateTime=" + updateTime +
'}'; '}';
......
...@@ -83,9 +83,9 @@ public class CollaboratorDTO implements Serializable{ ...@@ -83,9 +83,9 @@ public class CollaboratorDTO implements Serializable{
private String subAppIds; private String subAppIds;
/** /**
* 状态: 0:无效 1:youxiao * 状态: 1:无效 0:youxiao
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* 创建时间 * 创建时间
...@@ -167,12 +167,13 @@ public class CollaboratorDTO implements Serializable{ ...@@ -167,12 +167,13 @@ public class CollaboratorDTO implements Serializable{
this.subAppIds = subAppIds; this.subAppIds = subAppIds;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public CollaboratorDTO setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
...@@ -253,7 +254,7 @@ public class CollaboratorDTO implements Serializable{ ...@@ -253,7 +254,7 @@ public class CollaboratorDTO implements Serializable{
", creator='" + creator + '\'' + ", creator='" + creator + '\'' +
", resourceIds='" + resourceIds + '\'' + ", resourceIds='" + resourceIds + '\'' +
", subAppIds='" + subAppIds + '\'' + ", subAppIds='" + subAppIds + '\'' +
", status=" + status + ", deleteFlag=" + deleteFlag +
", createTime=" + createTime + ", createTime=" + createTime +
", updateTime=" + updateTime + ", updateTime=" + updateTime +
", subAppIdList=" + subAppIdList + ", subAppIdList=" + subAppIdList +
......
...@@ -59,6 +59,8 @@ public class CollaboratorListDTO implements Serializable{ ...@@ -59,6 +59,8 @@ public class CollaboratorListDTO implements Serializable{
*/ */
private Integer status; private Integer status;
private Integer deleteFlag;
/** /**
* 创建时间 * 创建时间
*/ */
...@@ -137,6 +139,15 @@ public class CollaboratorListDTO implements Serializable{ ...@@ -137,6 +139,15 @@ public class CollaboratorListDTO implements Serializable{
} }
public Integer getStatus() { public Integer getStatus() {
if (deleteFlag == null) {
return 0;
}
if (deleteFlag == 1) {
return 0;
}
if (deleteFlag == 0) {
return 1;
}
return status; return status;
} }
...@@ -152,6 +163,15 @@ public class CollaboratorListDTO implements Serializable{ ...@@ -152,6 +163,15 @@ public class CollaboratorListDTO implements Serializable{
this.createTime = createTime; this.createTime = createTime;
} }
public Integer getDeleteFlag() {
return deleteFlag;
}
public CollaboratorListDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
@Override @Override
public String toString() { public String toString() {
return "CollaboratorListDTO{" + return "CollaboratorListDTO{" +
...@@ -165,6 +185,7 @@ public class CollaboratorListDTO implements Serializable{ ...@@ -165,6 +185,7 @@ public class CollaboratorListDTO implements Serializable{
", appName='" + appName + '\'' + ", appName='" + appName + '\'' +
", creator='" + creator + '\'' + ", creator='" + creator + '\'' +
", status=" + status + ", status=" + status +
", deleteFlag=" + deleteFlag +
", createTime=" + createTime + ", createTime=" + createTime +
'}'; '}';
} }
......
...@@ -43,9 +43,9 @@ public class MenuAuthDepartDTO implements Serializable{ ...@@ -43,9 +43,9 @@ public class MenuAuthDepartDTO implements Serializable{
private String positionName; private String positionName;
/** /**
* 1:有效 0:无效 * 0:有效 1:无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* 创建时间 * 创建时间
...@@ -112,12 +112,12 @@ public class MenuAuthDepartDTO implements Serializable{ ...@@ -112,12 +112,12 @@ public class MenuAuthDepartDTO implements Serializable{
return this; return this;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public MenuAuthDepartDTO setStatus(Integer status) { public MenuAuthDepartDTO setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this; return this;
} }
...@@ -148,7 +148,7 @@ public class MenuAuthDepartDTO implements Serializable{ ...@@ -148,7 +148,7 @@ public class MenuAuthDepartDTO implements Serializable{
", departName='" + departName + '\'' + ", departName='" + departName + '\'' +
", positionCode='" + positionCode + '\'' + ", positionCode='" + positionCode + '\'' +
", positionName='" + positionName + '\'' + ", positionName='" + positionName + '\'' +
", status=" + status + ", deleteFlag=" + deleteFlag +
", createTime=" + createTime + ", createTime=" + createTime +
", updateTime=" + updateTime + ", updateTime=" + updateTime +
'}'; '}';
......
...@@ -112,9 +112,9 @@ public class MenuDTO implements Serializable { ...@@ -112,9 +112,9 @@ public class MenuDTO implements Serializable {
private Integer sort; private Integer sort;
/** /**
* 0删除1有效 * 1删除0有效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -254,12 +254,13 @@ public class MenuDTO implements Serializable { ...@@ -254,12 +254,13 @@ public class MenuDTO implements Serializable {
this.sort = sort; this.sort = sort;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public MenuDTO setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Integer getLevel() { public Integer getLevel() {
...@@ -388,7 +389,7 @@ public class MenuDTO implements Serializable { ...@@ -388,7 +389,7 @@ public class MenuDTO implements Serializable {
", target=" + target + ", target=" + target +
", iconUrl='" + iconUrl + '\'' + ", iconUrl='" + iconUrl + '\'' +
", sort=" + sort + ", sort=" + sort +
", status=" + status + ", status=" + deleteFlag +
", level=" + level + ", level=" + level +
", isShow=" + isShow + ", isShow=" + isShow +
", menuCode='" + menuCode + '\'' + ", menuCode='" + menuCode + '\'' +
......
...@@ -29,9 +29,9 @@ public class MenuItemDTO implements Serializable{ ...@@ -29,9 +29,9 @@ public class MenuItemDTO implements Serializable{
private Integer itemId; private Integer itemId;
/** /**
* 1:有效 0:无效 * 0:有效 1:无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* 创建时间 * 创建时间
...@@ -67,12 +67,13 @@ public class MenuItemDTO implements Serializable{ ...@@ -67,12 +67,13 @@ public class MenuItemDTO implements Serializable{
this.itemId = itemId; this.itemId = itemId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public MenuItemDTO setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
...@@ -97,7 +98,7 @@ public class MenuItemDTO implements Serializable{ ...@@ -97,7 +98,7 @@ public class MenuItemDTO implements Serializable{
"menuItemId=" + menuItemId + "menuItemId=" + menuItemId +
", menuId=" + menuId + ", menuId=" + menuId +
", itemId=" + itemId + ", itemId=" + itemId +
", status=" + status + ", deleteFlag=" + deleteFlag +
", createTime=" + createTime + ", createTime=" + createTime +
", updateTime=" + updateTime + ", updateTime=" + updateTime +
'}'; '}';
......
...@@ -42,9 +42,9 @@ public class MenuRoleDTO implements Serializable{ ...@@ -42,9 +42,9 @@ public class MenuRoleDTO implements Serializable{
private Integer enterpriseId; private Integer enterpriseId;
/** /**
* 状态1:有效 0:无效 * 状态0:有效 1:无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -88,12 +88,13 @@ public class MenuRoleDTO implements Serializable{ ...@@ -88,12 +88,13 @@ public class MenuRoleDTO implements Serializable{
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public MenuRoleDTO setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
...@@ -119,7 +120,7 @@ public class MenuRoleDTO implements Serializable{ ...@@ -119,7 +120,7 @@ public class MenuRoleDTO implements Serializable{
", menuId=" + menuId + ", menuId=" + menuId +
", roleId=" + roleId + ", roleId=" + roleId +
", enterpriseId=" + enterpriseId + ", enterpriseId=" + enterpriseId +
", status=" + status + ", status=" + deleteFlag +
", createTime=" + createTime + ", createTime=" + createTime +
", updateTime=" + updateTime + ", updateTime=" + updateTime +
'}'; '}';
......
...@@ -29,9 +29,9 @@ public class OperationUserDTO implements Serializable{ ...@@ -29,9 +29,9 @@ public class OperationUserDTO implements Serializable{
private String phoneNumber; private String phoneNumber;
/** /**
* 状态,1有效,0无效 * 状态,0有效,1无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -77,12 +77,13 @@ public class OperationUserDTO implements Serializable{ ...@@ -77,12 +77,13 @@ public class OperationUserDTO implements Serializable{
this.phoneNumber = phoneNumber; this.phoneNumber = phoneNumber;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public OperationUserDTO setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
...@@ -123,7 +124,7 @@ public class OperationUserDTO implements Serializable{ ...@@ -123,7 +124,7 @@ public class OperationUserDTO implements Serializable{
"operationUserId=" + operationUserId + "operationUserId=" + operationUserId +
", operationUserName='" + operationUserName + '\'' + ", operationUserName='" + operationUserName + '\'' +
", phoneNumber='" + phoneNumber + '\'' + ", phoneNumber='" + phoneNumber + '\'' +
", status=" + status + ", status=" + deleteFlag +
", createTime=" + createTime + ", createTime=" + createTime +
", updateTime=" + updateTime + ", updateTime=" + updateTime +
", enterpriseId=" + enterpriseId + ", enterpriseId=" + enterpriseId +
......
...@@ -44,7 +44,7 @@ public class OrderAppResourceDTO implements Serializable { ...@@ -44,7 +44,7 @@ public class OrderAppResourceDTO implements Serializable {
/** /**
* *
*/ */
private Integer status; private Integer deleteFlag;
public Integer getOrderAppResourceId() { public Integer getOrderAppResourceId() {
return orderAppResourceId; return orderAppResourceId;
...@@ -94,12 +94,13 @@ public class OrderAppResourceDTO implements Serializable { ...@@ -94,12 +94,13 @@ public class OrderAppResourceDTO implements Serializable {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public OrderAppResourceDTO setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
@Override @Override
...@@ -111,7 +112,7 @@ public class OrderAppResourceDTO implements Serializable { ...@@ -111,7 +112,7 @@ public class OrderAppResourceDTO implements Serializable {
", content='" + content + '\'' + ", content='" + content + '\'' +
", createTime=" + createTime + ", createTime=" + createTime +
", updateTime=" + updateTime + ", updateTime=" + updateTime +
", status=" + status + ", status=" + deleteFlag +
'}'; '}';
} }
} }
...@@ -41,9 +41,9 @@ public class RoleDTO implements Serializable{ ...@@ -41,9 +41,9 @@ public class RoleDTO implements Serializable{
private Integer enterpriseId; private Integer enterpriseId;
/** /**
* 状态1:有效 0:无效 * 状态0:有效 1:无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -84,12 +84,13 @@ public class RoleDTO implements Serializable{ ...@@ -84,12 +84,13 @@ public class RoleDTO implements Serializable{
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public RoleDTO setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
...@@ -122,7 +123,7 @@ public class RoleDTO implements Serializable{ ...@@ -122,7 +123,7 @@ public class RoleDTO implements Serializable{
"roleId=" + roleId + "roleId=" + roleId +
", roleName='" + roleName + '\'' + ", roleName='" + roleName + '\'' +
", enterpriseId=" + enterpriseId + ", enterpriseId=" + enterpriseId +
", status=" + status + ", status=" + deleteFlag +
", createTime=" + createTime + ", createTime=" + createTime +
", updateTime=" + updateTime + ", updateTime=" + updateTime +
", menuIds='" + menuIds + '\'' + ", menuIds='" + menuIds + '\'' +
......
...@@ -36,7 +36,7 @@ public class UnionEnterpriseDTO implements Serializable { ...@@ -36,7 +36,7 @@ public class UnionEnterpriseDTO implements Serializable {
/** /**
* *
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* 授权状态,1授权中 2授权成功 3授权失败 * 授权状态,1授权中 2授权成功 3授权失败
...@@ -80,12 +80,13 @@ public class UnionEnterpriseDTO implements Serializable { ...@@ -80,12 +80,13 @@ public class UnionEnterpriseDTO implements Serializable {
this.unionEnterpriseName = unionEnterpriseName; this.unionEnterpriseName = unionEnterpriseName;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public UnionEnterpriseDTO setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Integer getAuthorizationStatus() { public Integer getAuthorizationStatus() {
...@@ -185,7 +186,7 @@ public class UnionEnterpriseDTO implements Serializable { ...@@ -185,7 +186,7 @@ public class UnionEnterpriseDTO implements Serializable {
", unionCompanyName='" + unionCompanyName + '\'' + ", unionCompanyName='" + unionCompanyName + '\'' +
", unionManagerName='" + unionManagerName + '\'' + ", unionManagerName='" + unionManagerName + '\'' +
", unionManagerPhone='" + unionManagerPhone + '\'' + ", unionManagerPhone='" + unionManagerPhone + '\'' +
", status=" + status + ", status=" + deleteFlag +
", authorizationStatus=" + authorizationStatus + ", authorizationStatus=" + authorizationStatus +
", authorizationTime=" + authorizationTime + ", authorizationTime=" + authorizationTime +
", enterpriseId=" + enterpriseId + ", enterpriseId=" + enterpriseId +
......
...@@ -68,9 +68,9 @@ public class UserDTO implements Serializable{ ...@@ -68,9 +68,9 @@ public class UserDTO implements Serializable{
private Integer superAdmin; private Integer superAdmin;
/** /**
* 状态,1有效,0无效 * 状态,0有效,1无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -180,12 +180,13 @@ public class UserDTO implements Serializable{ ...@@ -180,12 +180,13 @@ public class UserDTO implements Serializable{
this.superAdmin = superAdmin; this.superAdmin = superAdmin;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public UserDTO setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
...@@ -330,7 +331,7 @@ public class UserDTO implements Serializable{ ...@@ -330,7 +331,7 @@ public class UserDTO implements Serializable{
", passwordType=" + passwordType + ", passwordType=" + passwordType +
", confirmPassword='" + confirmPassword + '\'' + ", confirmPassword='" + confirmPassword + '\'' +
", superAdmin=" + superAdmin + ", superAdmin=" + superAdmin +
", status=" + status + ", status=" + deleteFlag +
", createTime=" + createTime + ", createTime=" + createTime +
", updateTime=" + updateTime + ", updateTime=" + updateTime +
", enterpriseId=" + enterpriseId + ", enterpriseId=" + enterpriseId +
......
...@@ -43,9 +43,9 @@ public class UserResourceDTO implements Serializable{ ...@@ -43,9 +43,9 @@ public class UserResourceDTO implements Serializable{
private Integer enterpriseId; private Integer enterpriseId;
/** /**
* 状态1:有效 0:无效 * 状态0:有效 1:无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -89,12 +89,13 @@ public class UserResourceDTO implements Serializable{ ...@@ -89,12 +89,13 @@ public class UserResourceDTO implements Serializable{
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public UserResourceDTO setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
...@@ -120,7 +121,7 @@ public class UserResourceDTO implements Serializable{ ...@@ -120,7 +121,7 @@ public class UserResourceDTO implements Serializable{
", resourceId=" + resourceId + ", resourceId=" + resourceId +
", userId=" + userId + ", userId=" + userId +
", enterpriseId=" + enterpriseId + ", enterpriseId=" + enterpriseId +
", status=" + status + ", status=" + deleteFlag +
", createTime=" + createTime + ", createTime=" + createTime +
", updateTime=" + updateTime + ", updateTime=" + updateTime +
'}'; '}';
......
...@@ -42,9 +42,9 @@ public class UserRoleDTO implements Serializable{ ...@@ -42,9 +42,9 @@ public class UserRoleDTO implements Serializable{
private Integer enterpriseId; private Integer enterpriseId;
/** /**
* 状态1:有效 0:无效 * 状态0:有效 1:无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -88,12 +88,13 @@ public class UserRoleDTO implements Serializable{ ...@@ -88,12 +88,13 @@ public class UserRoleDTO implements Serializable{
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public UserRoleDTO setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
...@@ -119,7 +120,7 @@ public class UserRoleDTO implements Serializable{ ...@@ -119,7 +120,7 @@ public class UserRoleDTO implements Serializable{
", roleId=" + roleId + ", roleId=" + roleId +
", userId=" + userId + ", userId=" + userId +
", enterpriseId=" + enterpriseId + ", enterpriseId=" + enterpriseId +
", status=" + status + ", status=" + deleteFlag +
", createTime=" + createTime + ", createTime=" + createTime +
", updateTime=" + updateTime + ", updateTime=" + updateTime +
'}'; '}';
......
...@@ -23,6 +23,8 @@ public class CollaboratorListQO extends PageQO{ ...@@ -23,6 +23,8 @@ public class CollaboratorListQO extends PageQO{
private Integer status; private Integer status;
private Integer deleteFlag;
private Integer enterpriseId; private Integer enterpriseId;
private Integer accountGroupId; private Integer accountGroupId;
...@@ -76,4 +78,19 @@ public class CollaboratorListQO extends PageQO{ ...@@ -76,4 +78,19 @@ public class CollaboratorListQO extends PageQO{
public void setCollaboratorIdList(List<Integer> collaboratorIdList) { public void setCollaboratorIdList(List<Integer> collaboratorIdList) {
this.collaboratorIdList = collaboratorIdList; this.collaboratorIdList = collaboratorIdList;
} }
public Integer getDeleteFlag() {
if (status != null) {
if (status == 1) {
return 0;
}
return 1;
}
return deleteFlag;
}
public CollaboratorListQO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
} }
...@@ -23,6 +23,7 @@ public class MenuListQO extends PageQO{ ...@@ -23,6 +23,7 @@ public class MenuListQO extends PageQO{
* 0:页面 1:权限项 2:操作项 * 0:页面 1:权限项 2:操作项
*/ */
private Integer menuType; private Integer menuType;
private List<Integer> menuTypeList;
/** /**
* 层级 * 层级
*/ */
...@@ -136,4 +137,13 @@ public class MenuListQO extends PageQO{ ...@@ -136,4 +137,13 @@ public class MenuListQO extends PageQO{
this.platformType = platformType; this.platformType = platformType;
return this; return this;
} }
public List<Integer> getMenuTypeList() {
return menuTypeList;
}
public MenuListQO setMenuTypeList(List<Integer> menuTypeList) {
this.menuTypeList = menuTypeList;
return this;
}
} }
...@@ -55,7 +55,7 @@ public interface MenuApiService { ...@@ -55,7 +55,7 @@ public interface MenuApiService {
ServiceResponse<Set<String>> getAppIdSetByUserId(Integer userId); ServiceResponse<Set<String>> getAppIdSetByUserId(Integer userId);
/** /**
* 查询用户拥有的所有菜单路由权限,用于登录用户session用 * 查询用户没有权限的操作项(接口),用于登录用户session用
* @Title: listUserMenu
 * @Title: listUserMenu

* @Description: * @Description:

 * @author guojuxing 
 * @author guojuxing
...@@ -194,6 +194,15 @@ public interface MenuApiService { ...@@ -194,6 +194,15 @@ public interface MenuApiService {
ServiceResponse<List<MenuDTO>> getAllMenuNotTree(String versionCode); ServiceResponse<List<MenuDTO>> getAllMenuNotTree(String versionCode);
/** /**
* 查询gic平台所有的菜单数据,menu_type = 0 gic平台的菜单数据塞本地缓存
* @Title: setAllMenuToLocaleCache

* @Description:

* @author guojuxing 

* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.auth.dto.MenuDTO>>


*/
ServiceResponse<List<MenuDTO>> getAllMenu();
/**
* 运维处使用 * 运维处使用
* @param enterpriseId * @param enterpriseId
* @return * @return
...@@ -473,6 +482,14 @@ public interface MenuApiService { ...@@ -473,6 +482,14 @@ public interface MenuApiService {
ServiceResponse<MenuDTO> getMenuByMenuCode(String menuCode); ServiceResponse<MenuDTO> getMenuByMenuCode(String menuCode);
/** /**
* 获取已经购买的应用
* @param menuCode 权限菜单code
* @param enterpriseId
* @return
*/
ServiceResponse<MenuDTO> getHasBuyAppByMenuCode(String menuCode, Integer enterpriseId);
/**
* 同步测试菜单数据到生产 * 同步测试菜单数据到生产
* @Title: syncProductMenu
 * @Title: syncProductMenu

* @Description: * @Description:
......
package com.gic.auth.config;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.context.annotation.Configuration;
/**
* 采集GIC系统操作日志
*
* @author leeon
* @date 2019年6月28日
*/
@Aspect
@Configuration
public class ParamAop {
private Logger logger = LogManager.getLogger(ParamAop.class);
/**
* 环绕通知
*
* @param joinPoint
* @return
* @throws Throwable
*/
@Around(value = "execution(* com.gic.*.service..*(..))")
public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
try {
// 当前方法
String currentMethodName = getMethodName(joinPoint);
// 当前方法参数列表
Object[] args = joinPoint.getArgs();
logger.info("请求方法:{}, 参数:{}", currentMethodName, args);
// 执行当前方法
return joinPoint.proceed();
} catch (Throwable throwable) {
logger.warn("拦截器错误", throwable);
throw throwable;
}
}
/**
* 获取当前方法
*
* @param joinPoint
* @return
* @throws
*/
private String getMethodName(ProceedingJoinPoint joinPoint) throws NoSuchMethodException {
Signature signature = joinPoint.getSignature();
MethodSignature methodSignature = (MethodSignature) signature;
Object target = joinPoint.getTarget();
return target.getClass().getName() + "." + methodSignature.getName();
}
}
\ No newline at end of file
package com.gic.auth.constant;
/**
* 数据删除标志
* @ClassName: DeleteFlagConstants

* @Description: 

* @author guojuxing

* @date 2020/10/13 4:43 PM

*/
public class DeleteFlagConstants {
/**
* 数据正常状态
*/
public static final int NORMAL_STATUS = 0;
/**
* 数据删除状态
*/
public static final int DELETE_STATUS = 1;
}
...@@ -16,13 +16,7 @@ import java.util.List; ...@@ -16,13 +16,7 @@ import java.util.List;
* @date 2020-09-10 9:38 * @date 2020-09-10 9:38
*/ */
public interface TabAuditedGroupMapper { public interface TabAuditedGroupMapper {
/**
* 根据主键删除
*
* @param auditedGroupId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer auditedGroupId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -16,13 +16,6 @@ import java.util.Map; ...@@ -16,13 +16,6 @@ import java.util.Map;
* @date 2020-09-10 9:38 * @date 2020-09-10 9:38
*/ */
public interface TabAuditedGroupUserRelMapper { public interface TabAuditedGroupUserRelMapper {
/**
* 根据主键删除
*
* @param auditedGroupUserRelId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer auditedGroupUserRelId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -15,13 +15,6 @@ import java.util.Map; ...@@ -15,13 +15,6 @@ import java.util.Map;
* @date 2020-09-10 9:39 * @date 2020-09-10 9:39
*/ */
public interface TabAuditorAuditedGroupRelMapper { public interface TabAuditorAuditedGroupRelMapper {
/**
* 根据主键删除
*
* @param auditorAuditedGroupRelId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer auditorAuditedGroupRelId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -14,13 +14,7 @@ import org.apache.ibatis.annotations.Param; ...@@ -14,13 +14,7 @@ import org.apache.ibatis.annotations.Param;
* @date 2020-09-10 9:39 * @date 2020-09-10 9:39
*/ */
public interface TabAuditorMapper { public interface TabAuditorMapper {
/**
* 根据主键删除
*
* @param auditorId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer auditorId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -15,13 +15,7 @@ import java.util.Map; ...@@ -15,13 +15,7 @@ import java.util.Map;
* @date 2020-09-10 9:39 * @date 2020-09-10 9:39
*/ */
public interface TabAuditorProjectItemRelMapper { public interface TabAuditorProjectItemRelMapper {
/**
* 根据主键删除
*
* @param auditorProjectItemRelId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer auditorProjectItemRelId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -13,13 +13,7 @@ import java.util.List; ...@@ -13,13 +13,7 @@ import java.util.List;
* @date 2020-09-10 9:39 * @date 2020-09-10 9:39
*/ */
public interface TabSysAccountGroupMapper { public interface TabSysAccountGroupMapper {
/**
* 根据主键删除
*
* @param accountGroupId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer accountGroupId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -15,13 +15,6 @@ import java.util.List; ...@@ -15,13 +15,6 @@ import java.util.List;
* @date 2020-09-10 9:39 * @date 2020-09-10 9:39
*/ */
public interface TabSysAccountGroupRelMapper { public interface TabSysAccountGroupRelMapper {
/**
* 根据主键删除
*
* @param accountGroupRelId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer accountGroupRelId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -14,14 +14,6 @@ import java.util.List; ...@@ -14,14 +14,6 @@ import java.util.List;
*/ */
public interface TabSysAuthCodeMapper { public interface TabSysAuthCodeMapper {
/** /**
* 根据主键删除
*
* @param authCodeId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer authCodeId);
/**
* 插入一条记录 * 插入一条记录
* *
* @param record 实体对象 * @param record 实体对象
......
...@@ -13,13 +13,7 @@ import java.util.List; ...@@ -13,13 +13,7 @@ import java.util.List;
* @date 2020-09-10 9:39 * @date 2020-09-10 9:39
*/ */
public interface TabSysBusinessFrontResMapper { public interface TabSysBusinessFrontResMapper {
/**
* 根据主键删除
*
* @param resourceId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer resourceId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -15,13 +15,6 @@ import java.util.List; ...@@ -15,13 +15,6 @@ import java.util.List;
* @date 2020-09-10 9:39 * @date 2020-09-10 9:39
*/ */
public interface TabSysCollaboratorMapper { public interface TabSysCollaboratorMapper {
/**
* 根据主键删除
*
* @param collaboratorId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer collaboratorId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -13,13 +13,7 @@ import java.util.List; ...@@ -13,13 +13,7 @@ import java.util.List;
* @date 2020-09-10 9:40 * @date 2020-09-10 9:40
*/ */
public interface TabSysCollaboratorRoleRelMapper { public interface TabSysCollaboratorRoleRelMapper {
/**
* 根据主键删除
*
* @param collaboratorRoleRelId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer collaboratorRoleRelId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -14,13 +14,7 @@ import java.util.List; ...@@ -14,13 +14,7 @@ import java.util.List;
* @date 2020-09-10 9:40 * @date 2020-09-10 9:40
*/ */
public interface TabSysMenuAuthDepartMapper { public interface TabSysMenuAuthDepartMapper {
/**
* 根据主键删除
*
* @param menuDepartId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer menuDepartId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -15,13 +15,7 @@ import java.util.List; ...@@ -15,13 +15,7 @@ import java.util.List;
* @date 2020-09-10 9:40 * @date 2020-09-10 9:40
*/ */
public interface TabSysMenuItemMapper { public interface TabSysMenuItemMapper {
/**
* 根据主键删除
*
* @param menuItemId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer menuItemId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -16,13 +16,7 @@ import java.util.List; ...@@ -16,13 +16,7 @@ import java.util.List;
* @date 2020-09-10 9:41 * @date 2020-09-10 9:41
*/ */
public interface TabSysMenuMapper { public interface TabSysMenuMapper {
/**
* 根据主键删除
*
* @param menuId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer menuId);
/** /**
* 插入一条记录 * 插入一条记录
...@@ -266,9 +260,10 @@ public interface TabSysMenuMapper { ...@@ -266,9 +260,10 @@ public interface TabSysMenuMapper {
* @Description: * @Description:

* @author guojuxing 
* @author guojuxing
* @param projectList
 * @param projectList

* @param platformTypeList
* @return void
 * @return void


*/ 
*/
void deleteNotInApp(@Param("list") List<String> projectList); void deleteNotInApp(@Param("list") List<String> projectList, @Param("platformTypeList") List<Integer> platformTypeList);
/** /**
......
...@@ -14,13 +14,7 @@ import java.util.List; ...@@ -14,13 +14,7 @@ import java.util.List;
* @date 2020-09-10 9:41 * @date 2020-09-10 9:41
*/ */
public interface TabSysMenuRoleMapper { public interface TabSysMenuRoleMapper {
/**
* 根据主键删除
*
* @param menuRoleId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer menuRoleId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -11,13 +11,7 @@ import org.apache.ibatis.annotations.Param; ...@@ -11,13 +11,7 @@ import org.apache.ibatis.annotations.Param;
* @date 2020-09-10 9:41 * @date 2020-09-10 9:41
*/ */
public interface TabSysOperationUserMapper { public interface TabSysOperationUserMapper {
/**
* 根据主键删除
*
* @param operationUserId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer operationUserId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -12,13 +12,7 @@ import java.util.List; ...@@ -12,13 +12,7 @@ import java.util.List;
* @date 2020-09-10 9:41 * @date 2020-09-10 9:41
*/ */
public interface TabSysOrderAppResourceMapper { public interface TabSysOrderAppResourceMapper {
/**
* 根据主键删除
*
* @param orderAppResourceId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer orderAppResourceId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -15,13 +15,6 @@ import java.util.List; ...@@ -15,13 +15,6 @@ import java.util.List;
* @date 2020-09-10 9:41 * @date 2020-09-10 9:41
*/ */
public interface TabSysResourceMapper { public interface TabSysResourceMapper {
/**
* 根据主键删除
*
* @param resourceId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer resourceId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -16,14 +16,6 @@ import java.util.List; ...@@ -16,14 +16,6 @@ import java.util.List;
*/ */
public interface TabSysRoleMapper { public interface TabSysRoleMapper {
/** /**
* 根据主键删除
*
* @param roleId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer roleId);
/**
* 插入一条记录 * 插入一条记录
* *
* @param record 实体对象 * @param record 实体对象
......
...@@ -14,13 +14,7 @@ import java.util.List; ...@@ -14,13 +14,7 @@ import java.util.List;
* @date 2020-09-10 9:42 * @date 2020-09-10 9:42
*/ */
public interface TabSysUnionEnterpriseMapper { public interface TabSysUnionEnterpriseMapper {
/**
* 根据主键删除
*
* @param unionId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer unionId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -14,13 +14,6 @@ import java.util.List; ...@@ -14,13 +14,6 @@ import java.util.List;
* @date 2020-09-10 9:42 * @date 2020-09-10 9:42
*/ */
public interface TabSysUnionEnterpriseResourceMapper { public interface TabSysUnionEnterpriseResourceMapper {
/**
* 根据主键删除
*
* @param unionResourceId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer unionResourceId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -15,13 +15,6 @@ import java.util.List; ...@@ -15,13 +15,6 @@ import java.util.List;
* @date 2020-09-10 9:42 * @date 2020-09-10 9:42
*/ */
public interface TabSysUserMapper { public interface TabSysUserMapper {
/**
* 根据主键删除
*
* @param userId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer userId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -15,13 +15,7 @@ import java.util.Map; ...@@ -15,13 +15,7 @@ import java.util.Map;
* @date 2020-09-10 9:44 * @date 2020-09-10 9:44
*/ */
public interface TabSysUserResourceMapper { public interface TabSysUserResourceMapper {
/**
* 根据主键删除
*
* @param userResourceId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer userResourceId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -12,13 +12,7 @@ import java.util.List; ...@@ -12,13 +12,7 @@ import java.util.List;
* @date 2020-09-10 9:45 * @date 2020-09-10 9:45
*/ */
public interface TabSysUserRoleMapper { public interface TabSysUserRoleMapper {
/**
* 根据主键删除
*
* @param userRoleId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer userRoleId);
/** /**
* 插入一条记录 * 插入一条记录
......
...@@ -36,7 +36,7 @@ public class TabAuditedGroup { ...@@ -36,7 +36,7 @@ public class TabAuditedGroup {
/** /**
* *
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -80,12 +80,13 @@ public class TabAuditedGroup { ...@@ -80,12 +80,13 @@ public class TabAuditedGroup {
this.allCheck = allCheck; this.allCheck = allCheck;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabAuditedGroup setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
......
...@@ -36,7 +36,7 @@ public class TabAuditedGroupUserRel { ...@@ -36,7 +36,7 @@ public class TabAuditedGroupUserRel {
/** /**
* *
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -80,12 +80,13 @@ public class TabAuditedGroupUserRel { ...@@ -80,12 +80,13 @@ public class TabAuditedGroupUserRel {
this.userId = userId; this.userId = userId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabAuditedGroupUserRel setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
......
...@@ -51,7 +51,7 @@ public class TabAuditor { ...@@ -51,7 +51,7 @@ public class TabAuditor {
/** /**
* *
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -119,12 +119,13 @@ public class TabAuditor { ...@@ -119,12 +119,13 @@ public class TabAuditor {
this.isUse = isUse; this.isUse = isUse;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabAuditor setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
......
...@@ -36,7 +36,7 @@ public class TabAuditorAuditedGroupRel { ...@@ -36,7 +36,7 @@ public class TabAuditorAuditedGroupRel {
/** /**
* *
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -80,12 +80,13 @@ public class TabAuditorAuditedGroupRel { ...@@ -80,12 +80,13 @@ public class TabAuditorAuditedGroupRel {
this.auditedGroupId = auditedGroupId; this.auditedGroupId = auditedGroupId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabAuditorAuditedGroupRel setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
......
...@@ -36,7 +36,7 @@ public class TabAuditorProjectItemRel { ...@@ -36,7 +36,7 @@ public class TabAuditorProjectItemRel {
/** /**
* *
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -80,12 +80,13 @@ public class TabAuditorProjectItemRel { ...@@ -80,12 +80,13 @@ public class TabAuditorProjectItemRel {
this.projectItemId = projectItemId; this.projectItemId = projectItemId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabAuditorProjectItemRel setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
......
...@@ -29,9 +29,9 @@ public class TabSysAccountGroup { ...@@ -29,9 +29,9 @@ public class TabSysAccountGroup {
private Integer enterpriseId; private Integer enterpriseId;
/** /**
* 1:有效 0:无效 * 0:有效 1:无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* 排序 * 排序
...@@ -72,12 +72,13 @@ public class TabSysAccountGroup { ...@@ -72,12 +72,13 @@ public class TabSysAccountGroup {
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabSysAccountGroup setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Integer getSort() { public Integer getSort() {
......
...@@ -34,9 +34,9 @@ public class TabSysAccountGroupRel { ...@@ -34,9 +34,9 @@ public class TabSysAccountGroupRel {
private Integer enterpriseId; private Integer enterpriseId;
/** /**
* 1:有效 0:无效 * 0:有效 1:无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* 1:管理员 2:协作人 * 1:管理员 2:协作人
...@@ -85,14 +85,6 @@ public class TabSysAccountGroupRel { ...@@ -85,14 +85,6 @@ public class TabSysAccountGroupRel {
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getType() { public Integer getType() {
return type; return type;
} }
......
...@@ -34,9 +34,9 @@ public class TabSysAuthCode { ...@@ -34,9 +34,9 @@ public class TabSysAuthCode {
private Integer relationId; private Integer relationId;
/** /**
* 1有效 0失效 * 0有效 1失效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -85,12 +85,13 @@ public class TabSysAuthCode { ...@@ -85,12 +85,13 @@ public class TabSysAuthCode {
this.relationId = relationId; this.relationId = relationId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabSysAuthCode setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
......
...@@ -49,9 +49,9 @@ public class TabSysBusinessFrontRes { ...@@ -49,9 +49,9 @@ public class TabSysBusinessFrontRes {
private Integer enterpriseId; private Integer enterpriseId;
/** /**
* 状态1:有效 0:无效 * 状态0:有效 1:无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -119,12 +119,13 @@ public class TabSysBusinessFrontRes { ...@@ -119,12 +119,13 @@ public class TabSysBusinessFrontRes {
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabSysBusinessFrontRes setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
......
...@@ -64,9 +64,9 @@ public class TabSysCollaborator { ...@@ -64,9 +64,9 @@ public class TabSysCollaborator {
private String subAppIds; private String subAppIds;
/** /**
* 状态: 0:无效 1:youxiao * 状态: 1:无效 0:youxiao
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* 创建时间 * 创建时间
...@@ -150,12 +150,13 @@ public class TabSysCollaborator { ...@@ -150,12 +150,13 @@ public class TabSysCollaborator {
this.subAppIds = subAppIds; this.subAppIds = subAppIds;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabSysCollaborator setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
......
...@@ -29,9 +29,9 @@ public class TabSysCollaboratorRoleRel { ...@@ -29,9 +29,9 @@ public class TabSysCollaboratorRoleRel {
private Integer menuId; private Integer menuId;
/** /**
* 0:无效2:有效 * 1:无效0:有效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* 创建时间 * 创建时间
...@@ -67,12 +67,13 @@ public class TabSysCollaboratorRoleRel { ...@@ -67,12 +67,13 @@ public class TabSysCollaboratorRoleRel {
this.menuId = menuId; this.menuId = menuId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabSysCollaboratorRoleRel setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
......
...@@ -54,9 +54,9 @@ public class TabSysMenu { ...@@ -54,9 +54,9 @@ public class TabSysMenu {
private Integer sort; private Integer sort;
/** /**
* 0删除1有效 * 1删除0有效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -187,12 +187,13 @@ public class TabSysMenu { ...@@ -187,12 +187,13 @@ public class TabSysMenu {
this.sort = sort; this.sort = sort;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabSysMenu setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
......
...@@ -44,9 +44,9 @@ public class TabSysMenuAuthDepart { ...@@ -44,9 +44,9 @@ public class TabSysMenuAuthDepart {
private String positionName; private String positionName;
/** /**
* 1:有效 0:无效 * 0:有效 1:无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* 创建时间 * 创建时间
...@@ -112,12 +112,12 @@ public class TabSysMenuAuthDepart { ...@@ -112,12 +112,12 @@ public class TabSysMenuAuthDepart {
return this; return this;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public TabSysMenuAuthDepart setStatus(Integer status) { public TabSysMenuAuthDepart setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this; return this;
} }
......
...@@ -29,9 +29,9 @@ public class TabSysMenuItem { ...@@ -29,9 +29,9 @@ public class TabSysMenuItem {
private Integer itemId; private Integer itemId;
/** /**
* 1:有效 0:无效 * 0:有效 1:无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* 创建时间 * 创建时间
...@@ -67,12 +67,13 @@ public class TabSysMenuItem { ...@@ -67,12 +67,13 @@ public class TabSysMenuItem {
this.itemId = itemId; this.itemId = itemId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabSysMenuItem setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
......
...@@ -34,9 +34,9 @@ public class TabSysMenuRole { ...@@ -34,9 +34,9 @@ public class TabSysMenuRole {
private Integer enterpriseId; private Integer enterpriseId;
/** /**
* 状态1:有效 0:无效 * 状态0:有效 1:无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -80,12 +80,13 @@ public class TabSysMenuRole { ...@@ -80,12 +80,13 @@ public class TabSysMenuRole {
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabSysMenuRole setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
......
...@@ -29,9 +29,9 @@ public class TabSysOperationUser { ...@@ -29,9 +29,9 @@ public class TabSysOperationUser {
private String phoneNumber; private String phoneNumber;
/** /**
* 状态,1有效,0无效 * 状态,0有效,1无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -77,12 +77,13 @@ public class TabSysOperationUser { ...@@ -77,12 +77,13 @@ public class TabSysOperationUser {
this.phoneNumber = phoneNumber; this.phoneNumber = phoneNumber;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabSysOperationUser setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
......
...@@ -46,7 +46,7 @@ public class TabSysOrderAppResource { ...@@ -46,7 +46,7 @@ public class TabSysOrderAppResource {
/** /**
* *
*/ */
private Integer status; private Integer deleteFlag;
public Integer getOrderAppResourceId() { public Integer getOrderAppResourceId() {
return orderAppResourceId; return orderAppResourceId;
...@@ -96,11 +96,12 @@ public class TabSysOrderAppResource { ...@@ -96,11 +96,12 @@ public class TabSysOrderAppResource {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabSysOrderAppResource setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
} }
\ No newline at end of file
...@@ -113,7 +113,7 @@ public class TabSysResource { ...@@ -113,7 +113,7 @@ public class TabSysResource {
/** /**
* *
*/ */
private Integer status; private Integer deleteFlag;
public Integer getResourceId() { public Integer getResourceId() {
return resourceId; return resourceId;
...@@ -235,11 +235,12 @@ public class TabSysResource { ...@@ -235,11 +235,12 @@ public class TabSysResource {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabSysResource setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
} }
\ No newline at end of file
...@@ -29,9 +29,9 @@ public class TabSysRole { ...@@ -29,9 +29,9 @@ public class TabSysRole {
private Integer enterpriseId; private Integer enterpriseId;
/** /**
* 状态1:有效 0:无效 * 状态0:有效 1:无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -67,12 +67,13 @@ public class TabSysRole { ...@@ -67,12 +67,13 @@ public class TabSysRole {
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabSysRole setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
......
...@@ -31,7 +31,7 @@ public class TabSysUnionEnterprise { ...@@ -31,7 +31,7 @@ public class TabSysUnionEnterprise {
/** /**
* *
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* 授权状态,1授权中 2授权成功 3授权失败 * 授权状态,1授权中 2授权成功 3授权失败
...@@ -82,12 +82,13 @@ public class TabSysUnionEnterprise { ...@@ -82,12 +82,13 @@ public class TabSysUnionEnterprise {
this.unionEnterpriseName = unionEnterpriseName; this.unionEnterpriseName = unionEnterpriseName;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabSysUnionEnterprise setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Integer getAuthorizationStatus() { public Integer getAuthorizationStatus() {
......
...@@ -66,7 +66,7 @@ public class TabSysUnionEnterpriseResource { ...@@ -66,7 +66,7 @@ public class TabSysUnionEnterpriseResource {
/** /**
* *
*/ */
private Integer status; private Integer deleteFlag;
public Integer getUnionResourceId() { public Integer getUnionResourceId() {
return unionResourceId; return unionResourceId;
...@@ -148,11 +148,12 @@ public class TabSysUnionEnterpriseResource { ...@@ -148,11 +148,12 @@ public class TabSysUnionEnterpriseResource {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabSysUnionEnterpriseResource setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
} }
\ No newline at end of file
...@@ -39,9 +39,9 @@ public class TabSysUser { ...@@ -39,9 +39,9 @@ public class TabSysUser {
private Integer superAdmin; private Integer superAdmin;
/** /**
* 状态,1有效,0无效 * 状态,0有效,1无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -133,12 +133,13 @@ public class TabSysUser { ...@@ -133,12 +133,13 @@ public class TabSysUser {
this.superAdmin = superAdmin; this.superAdmin = superAdmin;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabSysUser setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
......
...@@ -34,9 +34,9 @@ public class TabSysUserResource { ...@@ -34,9 +34,9 @@ public class TabSysUserResource {
private Integer enterpriseId; private Integer enterpriseId;
/** /**
* 状态1:有效 0:无效 * 状态0:有效 1:无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -80,12 +80,13 @@ public class TabSysUserResource { ...@@ -80,12 +80,13 @@ public class TabSysUserResource {
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabSysUserResource setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
......
...@@ -34,9 +34,9 @@ public class TabSysUserRole { ...@@ -34,9 +34,9 @@ public class TabSysUserRole {
private Integer enterpriseId; private Integer enterpriseId;
/** /**
* 状态1:有效 0:无效 * 状态0:有效 1:无效
*/ */
private Integer status; private Integer deleteFlag;
/** /**
* *
...@@ -80,12 +80,13 @@ public class TabSysUserRole { ...@@ -80,12 +80,13 @@ public class TabSysUserRole {
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public Integer getStatus() { public Integer getDeleteFlag() {
return status; return deleteFlag;
} }
public void setStatus(Integer status) { public TabSysUserRole setDeleteFlag(Integer deleteFlag) {
this.status = status; this.deleteFlag = deleteFlag;
return this;
} }
public Date getCreateTime() { public Date getCreateTime() {
......
package com.gic.auth.service.impl; package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysAccountGroupMapper; import com.gic.auth.dao.mapper.TabSysAccountGroupMapper;
import com.gic.auth.dto.AccountGroupDTO; import com.gic.auth.dto.AccountGroupDTO;
import com.gic.auth.entity.TabSysAccountGroup; import com.gic.auth.entity.TabSysAccountGroup;
...@@ -24,7 +25,7 @@ public class AccountGroupServiceImpl implements AccountGroupService{ ...@@ -24,7 +25,7 @@ public class AccountGroupServiceImpl implements AccountGroupService{
private TabSysAccountGroupMapper tabSysAccountGroupMapper; private TabSysAccountGroupMapper tabSysAccountGroupMapper;
@Override @Override
public int save(AccountGroupDTO dto) { public int save(AccountGroupDTO dto) {
dto.setStatus(1); dto.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
dto.setCreateTime(new Date()); dto.setCreateTime(new Date());
dto.setUpdateTime(new Date()); dto.setUpdateTime(new Date());
TabSysAccountGroup record = EntityUtil.changeEntityNew(TabSysAccountGroup.class, dto); TabSysAccountGroup record = EntityUtil.changeEntityNew(TabSysAccountGroup.class, dto);
...@@ -73,7 +74,7 @@ public class AccountGroupServiceImpl implements AccountGroupService{ ...@@ -73,7 +74,7 @@ public class AccountGroupServiceImpl implements AccountGroupService{
public int updateStatusByAccountGroupId(Integer accountGroupId) { public int updateStatusByAccountGroupId(Integer accountGroupId) {
TabSysAccountGroup record = new TabSysAccountGroup(); TabSysAccountGroup record = new TabSysAccountGroup();
record.setAccountGroupId(accountGroupId); record.setAccountGroupId(accountGroupId);
record.setStatus(0); record.setDeleteFlag(DeleteFlagConstants.DELETE_STATUS);
return tabSysAccountGroupMapper.updateByPrimaryKeySelective(record); return tabSysAccountGroupMapper.updateByPrimaryKeySelective(record);
} }
......
package com.gic.auth.service.impl; package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabAuditedGroupMapper; import com.gic.auth.dao.mapper.TabAuditedGroupMapper;
import com.gic.auth.dto.AuditedGroupDTO; import com.gic.auth.dto.AuditedGroupDTO;
import com.gic.auth.entity.TabAuditedGroup; import com.gic.auth.entity.TabAuditedGroup;
...@@ -41,7 +42,7 @@ public class AuditedGroupServiceImpl implements AuditedGroupService { ...@@ -41,7 +42,7 @@ public class AuditedGroupServiceImpl implements AuditedGroupService {
@Override @Override
public Integer save(AuditedGroupDTO auditedGroupDTO) { public Integer save(AuditedGroupDTO auditedGroupDTO) {
TabAuditedGroup auditedGroup = EntityUtil.changeEntityByJSON(TabAuditedGroup.class, auditedGroupDTO); TabAuditedGroup auditedGroup = EntityUtil.changeEntityByJSON(TabAuditedGroup.class, auditedGroupDTO);
auditedGroup.setStatus(GlobalInfo.DATA_STATUS_NORMAL); auditedGroup.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
auditedGroup.setCreateTime(new Date()); auditedGroup.setCreateTime(new Date());
tabAuditedGroupMapper.insertSelective(auditedGroup); tabAuditedGroupMapper.insertSelective(auditedGroup);
return auditedGroup.getAuditedGroupId(); return auditedGroup.getAuditedGroupId();
...@@ -70,7 +71,7 @@ public class AuditedGroupServiceImpl implements AuditedGroupService { ...@@ -70,7 +71,7 @@ public class AuditedGroupServiceImpl implements AuditedGroupService {
@Override @Override
public TabAuditedGroup getAuditedGroup(Integer auditedGroupId) { public TabAuditedGroup getAuditedGroup(Integer auditedGroupId) {
TabAuditedGroup tabAuditedGroup = tabAuditedGroupMapper.selectByPrimaryKey(auditedGroupId); TabAuditedGroup tabAuditedGroup = tabAuditedGroupMapper.selectByPrimaryKey(auditedGroupId);
return tabAuditedGroup != null && (GlobalInfo.DATA_STATUS_NORMAL == tabAuditedGroup.getStatus()) ? tabAuditedGroup : null; return tabAuditedGroup != null && (DeleteFlagConstants.NORMAL_STATUS == tabAuditedGroup.getDeleteFlag()) ? tabAuditedGroup : null;
} }
@Override @Override
......
package com.gic.auth.service.impl; package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabAuditedGroupUserRelMapper; import com.gic.auth.dao.mapper.TabAuditedGroupUserRelMapper;
import com.gic.auth.dto.AuditedGroupDTO; import com.gic.auth.dto.AuditedGroupDTO;
import com.gic.auth.dto.AuditedGroupUserRelDTO; import com.gic.auth.dto.AuditedGroupUserRelDTO;
...@@ -36,7 +37,7 @@ public class AuditedGroupUserRelServiceImpl implements AuditedGroupUserRelServic ...@@ -36,7 +37,7 @@ public class AuditedGroupUserRelServiceImpl implements AuditedGroupUserRelServic
auditedGroupUserRel.setEnterpriseId(auditedGroupDTO.getEnterpriseId()); auditedGroupUserRel.setEnterpriseId(auditedGroupDTO.getEnterpriseId());
auditedGroupUserRel.setAuditedGroupId(auditedGroupDTO.getAuditedGroupId()); auditedGroupUserRel.setAuditedGroupId(auditedGroupDTO.getAuditedGroupId());
auditedGroupUserRel.setUserId(userId); auditedGroupUserRel.setUserId(userId);
auditedGroupUserRel.setStatus(GlobalInfo.DATA_STATUS_NORMAL); auditedGroupUserRel.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
auditedGroupUserRel.setCreateTime(new Date()); auditedGroupUserRel.setCreateTime(new Date());
tabAuditedGroupUserRelMapper.insertSelectiveByNotExist(auditedGroupUserRel); tabAuditedGroupUserRelMapper.insertSelectiveByNotExist(auditedGroupUserRel);
} }
......
package com.gic.auth.service.impl; package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabAuditorAuditedGroupRelMapper; import com.gic.auth.dao.mapper.TabAuditorAuditedGroupRelMapper;
import com.gic.auth.dto.AuditorAuditedGroupRelDTO; import com.gic.auth.dto.AuditorAuditedGroupRelDTO;
import com.gic.auth.entity.TabAuditedGroupUserRel; import com.gic.auth.entity.TabAuditedGroupUserRel;
...@@ -45,7 +46,7 @@ public class AuditorAuditedGroupRelServiceImpl implements AuditorAuditedGroupRel ...@@ -45,7 +46,7 @@ public class AuditorAuditedGroupRelServiceImpl implements AuditorAuditedGroupRel
itemRel.setEnterpriseId(enterpriseId); itemRel.setEnterpriseId(enterpriseId);
itemRel.setAuditorId(auditorId); itemRel.setAuditorId(auditorId);
itemRel.setAuditedGroupId(auditedGroupId); itemRel.setAuditedGroupId(auditedGroupId);
itemRel.setStatus(GlobalInfo.DATA_STATUS_NORMAL); itemRel.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
itemRel.setCreateTime(new Date()); itemRel.setCreateTime(new Date());
tabAuditorAuditedGroupRelMapper.insertSelectiveByNotExist(itemRel); tabAuditorAuditedGroupRelMapper.insertSelectiveByNotExist(itemRel);
} }
......
package com.gic.auth.service.impl; package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabAuditorProjectItemRelMapper; import com.gic.auth.dao.mapper.TabAuditorProjectItemRelMapper;
import com.gic.auth.entity.TabAuditorProjectItemRel; import com.gic.auth.entity.TabAuditorProjectItemRel;
import com.gic.auth.service.AuditorProjectItemRelService; import com.gic.auth.service.AuditorProjectItemRelService;
...@@ -34,7 +35,7 @@ public class AuditorProjectItemRelServiceImpl implements AuditorProjectItemRelSe ...@@ -34,7 +35,7 @@ public class AuditorProjectItemRelServiceImpl implements AuditorProjectItemRelSe
itemRel.setEnterpriseId(enterpriseId); itemRel.setEnterpriseId(enterpriseId);
itemRel.setAuditorId(auditorId); itemRel.setAuditorId(auditorId);
itemRel.setProjectItemId(projectItemId); itemRel.setProjectItemId(projectItemId);
itemRel.setStatus(GlobalInfo.DATA_STATUS_NORMAL); itemRel.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
itemRel.setCreateTime(new Date()); itemRel.setCreateTime(new Date());
tabAuditorProjectItemRelMapper.insertSelectiveByNotExist(itemRel); tabAuditorProjectItemRelMapper.insertSelectiveByNotExist(itemRel);
} }
......
package com.gic.auth.service.impl; package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabAuditorAuditedGroupRelMapper; import com.gic.auth.dao.mapper.TabAuditorAuditedGroupRelMapper;
import com.gic.auth.dao.mapper.TabAuditorMapper; import com.gic.auth.dao.mapper.TabAuditorMapper;
import com.gic.auth.dto.AuditorAuditedGroupRelDTO; import com.gic.auth.dto.AuditorAuditedGroupRelDTO;
...@@ -71,7 +72,7 @@ public class AuditorServiceImpl implements AuditorService { ...@@ -71,7 +72,7 @@ public class AuditorServiceImpl implements AuditorService {
auditor.setPhone(copy.getPhone()); auditor.setPhone(copy.getPhone());
auditor.setUserId(copy.getUserId()); auditor.setUserId(copy.getUserId());
auditor.setIsUse(copy.getIsUse()); auditor.setIsUse(copy.getIsUse());
auditor.setStatus(GlobalInfo.DATA_STATUS_NORMAL); auditor.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
auditor.setCreateTime(new Date()); auditor.setCreateTime(new Date());
tabAuditorMapper.insertSelective(auditor); tabAuditorMapper.insertSelective(auditor);
return auditor.getAuditorId(); return auditor.getAuditorId();
...@@ -93,7 +94,7 @@ public class AuditorServiceImpl implements AuditorService { ...@@ -93,7 +94,7 @@ public class AuditorServiceImpl implements AuditorService {
@Override @Override
public TabAuditor getAuditor(Integer auditorId) { public TabAuditor getAuditor(Integer auditorId) {
TabAuditor auditor = tabAuditorMapper.selectByPrimaryKey(auditorId); TabAuditor auditor = tabAuditorMapper.selectByPrimaryKey(auditorId);
if (auditor != null && auditor.getStatus() == GlobalInfo.DATA_STATUS_NORMAL) { if (auditor != null && auditor.getDeleteFlag() == DeleteFlagConstants.NORMAL_STATUS) {
return auditor; return auditor;
} }
return null; return null;
......
package com.gic.auth.service.impl; package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysAuthCodeMapper; import com.gic.auth.dao.mapper.TabSysAuthCodeMapper;
import com.gic.auth.entity.TabSysAuthCode; import com.gic.auth.entity.TabSysAuthCode;
import com.gic.auth.service.AuthCodeService; import com.gic.auth.service.AuthCodeService;
...@@ -30,7 +31,7 @@ public class AuthCodeServiceImpl implements AuthCodeService { ...@@ -30,7 +31,7 @@ public class AuthCodeServiceImpl implements AuthCodeService {
public int expireAuthCode(Integer authCodeId) { public int expireAuthCode(Integer authCodeId) {
TabSysAuthCode tabSysAuthCode = new TabSysAuthCode(); TabSysAuthCode tabSysAuthCode = new TabSysAuthCode();
tabSysAuthCode.setAuthCodeId(authCodeId); tabSysAuthCode.setAuthCodeId(authCodeId);
tabSysAuthCode.setStatus(Constants.DEL_STATUS); tabSysAuthCode.setDeleteFlag(DeleteFlagConstants.DELETE_STATUS);
return this.tabSysAuthCodeMapper.updateByPrimaryKeySelective(tabSysAuthCode); return this.tabSysAuthCodeMapper.updateByPrimaryKeySelective(tabSysAuthCode);
} }
......
package com.gic.auth.service.impl; package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysBusinessFrontResMapper; import com.gic.auth.dao.mapper.TabSysBusinessFrontResMapper;
import com.gic.auth.dto.BusinessFrontResDTO; import com.gic.auth.dto.BusinessFrontResDTO;
import com.gic.auth.entity.TabSysBusinessFrontRes; import com.gic.auth.entity.TabSysBusinessFrontRes;
...@@ -25,7 +26,7 @@ public class BusinessFrontResServiceImpl implements BusinessFrontResService{ ...@@ -25,7 +26,7 @@ public class BusinessFrontResServiceImpl implements BusinessFrontResService{
@Override @Override
public Integer save(BusinessFrontResDTO dto) { public Integer save(BusinessFrontResDTO dto) {
dto.setStatus(1); dto.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
dto.setCreateTime(new Date()); dto.setCreateTime(new Date());
dto.setUpdateTime(new Date()); dto.setUpdateTime(new Date());
TabSysBusinessFrontRes record = EntityUtil.changeEntityNew(TabSysBusinessFrontRes.class, dto); TabSysBusinessFrontRes record = EntityUtil.changeEntityNew(TabSysBusinessFrontRes.class, dto);
...@@ -49,7 +50,7 @@ public class BusinessFrontResServiceImpl implements BusinessFrontResService{ ...@@ -49,7 +50,7 @@ public class BusinessFrontResServiceImpl implements BusinessFrontResService{
public void delete(Integer resourceId) { public void delete(Integer resourceId) {
TabSysBusinessFrontRes record = new TabSysBusinessFrontRes(); TabSysBusinessFrontRes record = new TabSysBusinessFrontRes();
record.setResourceId(resourceId); record.setResourceId(resourceId);
record.setStatus(0); record.setDeleteFlag(DeleteFlagConstants.DELETE_STATUS);
record.setUpdateTime(new Date()); record.setUpdateTime(new Date());
tabSysBusinessFrontResMapper.updateByPrimaryKeySelective(record); tabSysBusinessFrontResMapper.updateByPrimaryKeySelective(record);
} }
......
package com.gic.auth.service.impl; package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysCollaboratorMapper; import com.gic.auth.dao.mapper.TabSysCollaboratorMapper;
import com.gic.auth.dto.CollaboratorDTO; import com.gic.auth.dto.CollaboratorDTO;
import com.gic.auth.dto.CollaboratorListDTO; import com.gic.auth.dto.CollaboratorListDTO;
...@@ -31,7 +32,7 @@ public class CollaboratorServiceImpl implements CollaboratorService { ...@@ -31,7 +32,7 @@ public class CollaboratorServiceImpl implements CollaboratorService {
public Integer save(CollaboratorDTO dto) { public Integer save(CollaboratorDTO dto) {
dto.setCreateTime(new Date()); dto.setCreateTime(new Date());
dto.setUpdateTime(new Date()); dto.setUpdateTime(new Date());
dto.setStatus(1); dto.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
TabSysCollaborator record = EntityUtil.changeEntityNew(TabSysCollaborator.class, dto); TabSysCollaborator record = EntityUtil.changeEntityNew(TabSysCollaborator.class, dto);
tabSysCollaboratorMapper.insertSelective(record); tabSysCollaboratorMapper.insertSelective(record);
return record.getCollaboratorId(); return record.getCollaboratorId();
......
package com.gic.auth.service.impl; package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.constant.MenuPlatformTypeEnum;
import com.gic.auth.dao.mapper.TabSysMenuMapper; import com.gic.auth.dao.mapper.TabSysMenuMapper;
import com.gic.auth.dto.AuthItemListDTO; import com.gic.auth.dto.AuthItemListDTO;
import com.gic.auth.dto.MenuDTO; import com.gic.auth.dto.MenuDTO;
...@@ -55,7 +57,7 @@ public class MenuServiceImpl implements MenuService { ...@@ -55,7 +57,7 @@ public class MenuServiceImpl implements MenuService {
//默认gic平台菜单 //默认gic平台菜单
record.setPlatformType(0); record.setPlatformType(0);
} }
record.setStatus(1); record.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
if (StringUtils.isBlank(menuDTO.getMenuCode())) { if (StringUtils.isBlank(menuDTO.getMenuCode())) {
//权限项没有菜单code数据,但是这样会导致不好批量上传到生产,给一个默认的数据 //权限项没有菜单code数据,但是这样会导致不好批量上传到生产,给一个默认的数据
record.setMenuCode(menuDTO.getParentCode() + "-" + menuDTO.getLevel() + menuDTO.getSort()); record.setMenuCode(menuDTO.getParentCode() + "-" + menuDTO.getLevel() + menuDTO.getSort());
...@@ -209,7 +211,11 @@ public class MenuServiceImpl implements MenuService { ...@@ -209,7 +211,11 @@ public class MenuServiceImpl implements MenuService {
@Override @Override
public void deleteNotInApp(List<String> projectList) { public void deleteNotInApp(List<String> projectList) {
tabSysMenuMapper.deleteNotInApp(projectList); //目前删除platform_type 为0和2的
List<Integer> platformTypeList = new ArrayList<>(2);
platformTypeList.add(MenuPlatformTypeEnum.GIC.getCode());
platformTypeList.add(MenuPlatformTypeEnum.HAOBAN_APP.getCode());
tabSysMenuMapper.deleteNotInApp(projectList, platformTypeList);
} }
@Override @Override
......
package com.gic.auth.service.impl; package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysOperationUserMapper; import com.gic.auth.dao.mapper.TabSysOperationUserMapper;
import com.gic.auth.dto.OperationUserDTO; import com.gic.auth.dto.OperationUserDTO;
import com.gic.auth.entity.TabSysOperationUser; import com.gic.auth.entity.TabSysOperationUser;
...@@ -32,7 +33,7 @@ public class OperationUserServiceImpl implements OperationUserService{ ...@@ -32,7 +33,7 @@ public class OperationUserServiceImpl implements OperationUserService{
public Integer save(OperationUserDTO dto) { public Integer save(OperationUserDTO dto) {
dto.setCreateTime(new Date()); dto.setCreateTime(new Date());
dto.setUpdateTime(new Date()); dto.setUpdateTime(new Date());
dto.setStatus(1); dto.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
if (StringUtils.isBlank(dto.getPhoneAreaCode())) { if (StringUtils.isBlank(dto.getPhoneAreaCode())) {
dto.setPhoneAreaCode("86"); dto.setPhoneAreaCode("86");
} }
......
package com.gic.auth.service.impl; package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysOrderAppResourceMapper; import com.gic.auth.dao.mapper.TabSysOrderAppResourceMapper;
import com.gic.auth.dto.OrderAppResourceDTO; import com.gic.auth.dto.OrderAppResourceDTO;
import com.gic.auth.entity.TabSysOrderAppResource; import com.gic.auth.entity.TabSysOrderAppResource;
...@@ -28,7 +29,7 @@ public class OrderAppResourceServiceImpl implements OrderAppResourceService { ...@@ -28,7 +29,7 @@ public class OrderAppResourceServiceImpl implements OrderAppResourceService {
public Integer save(OrderAppResourceDTO orderAppResourceDTO) { public Integer save(OrderAppResourceDTO orderAppResourceDTO) {
TabSysOrderAppResource resource = EntityUtil.changeEntityByJSON(TabSysOrderAppResource.class, orderAppResourceDTO); TabSysOrderAppResource resource = EntityUtil.changeEntityByJSON(TabSysOrderAppResource.class, orderAppResourceDTO);
resource.setCreateTime(new Date()); resource.setCreateTime(new Date());
resource.setStatus(GlobalInfo.DATA_STATUS_NORMAL); resource.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
tabSysOrderAppResourceMapper.insertSelective(resource); tabSysOrderAppResourceMapper.insertSelective(resource);
return resource.getOrderAppResourceId(); return resource.getOrderAppResourceId();
} }
...@@ -45,7 +46,7 @@ public class OrderAppResourceServiceImpl implements OrderAppResourceService { ...@@ -45,7 +46,7 @@ public class OrderAppResourceServiceImpl implements OrderAppResourceService {
public Integer del(Integer orderAppResourceId) { public Integer del(Integer orderAppResourceId) {
TabSysOrderAppResource orderAppResource = new TabSysOrderAppResource(); TabSysOrderAppResource orderAppResource = new TabSysOrderAppResource();
orderAppResource.setOrderAppResourceId(orderAppResourceId); orderAppResource.setOrderAppResourceId(orderAppResourceId);
orderAppResource.setStatus(GlobalInfo.DATA_STATUS_DELETE); orderAppResource.setDeleteFlag(DeleteFlagConstants.DELETE_STATUS);
return tabSysOrderAppResourceMapper.updateByPrimaryKeySelective(orderAppResource); return tabSysOrderAppResourceMapper.updateByPrimaryKeySelective(orderAppResource);
} }
......
package com.gic.auth.service.impl; package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysResourceMapper; import com.gic.auth.dao.mapper.TabSysResourceMapper;
import com.gic.auth.dto.ResourceDTO; import com.gic.auth.dto.ResourceDTO;
import com.gic.auth.entity.TabSysResource; import com.gic.auth.entity.TabSysResource;
...@@ -31,7 +32,7 @@ public class ResourceServiceImpl implements ResourceService { ...@@ -31,7 +32,7 @@ public class ResourceServiceImpl implements ResourceService {
@Override @Override
public Integer save(ResourceDTO resourceDTO) { public Integer save(ResourceDTO resourceDTO) {
TabSysResource resource = EntityUtil.changeEntityByOrika(TabSysResource.class, resourceDTO); TabSysResource resource = EntityUtil.changeEntityByOrika(TabSysResource.class, resourceDTO);
resource.setStatus(GlobalInfo.DATA_STATUS_NORMAL); resource.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
resource.setCreateTime(new Date()); resource.setCreateTime(new Date());
return tabSysResourceMapper.insertSelective(resource); return tabSysResourceMapper.insertSelective(resource);
} }
...@@ -45,7 +46,7 @@ public class ResourceServiceImpl implements ResourceService { ...@@ -45,7 +46,7 @@ public class ResourceServiceImpl implements ResourceService {
@Override @Override
public Integer delResource(Integer resourceId) { public Integer delResource(Integer resourceId) {
TabSysResource resource = new TabSysResource(); TabSysResource resource = new TabSysResource();
resource.setStatus(GlobalInfo.DATA_STATUS_DELETE); resource.setDeleteFlag(DeleteFlagConstants.DELETE_STATUS);
resource.setResourceId(resourceId); resource.setResourceId(resourceId);
return tabSysResourceMapper.updateByPrimaryKeySelective(resource); return tabSysResourceMapper.updateByPrimaryKeySelective(resource);
} }
......
package com.gic.auth.service.impl; package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysUnionEnterpriseMapper; import com.gic.auth.dao.mapper.TabSysUnionEnterpriseMapper;
import com.gic.auth.entity.TabSysUnionEnterprise; import com.gic.auth.entity.TabSysUnionEnterprise;
import com.gic.auth.service.UnionEnterpriseService; import com.gic.auth.service.UnionEnterpriseService;
...@@ -46,7 +47,7 @@ public class UnionEnterpriseServiceImpl implements UnionEnterpriseService { ...@@ -46,7 +47,7 @@ public class UnionEnterpriseServiceImpl implements UnionEnterpriseService {
public int delUnionEnterprise(Integer id) { public int delUnionEnterprise(Integer id) {
TabSysUnionEnterprise enterprise = new TabSysUnionEnterprise(); TabSysUnionEnterprise enterprise = new TabSysUnionEnterprise();
enterprise.setUnionId(id); enterprise.setUnionId(id);
enterprise.setStatus(Constants.DEL_STATUS); enterprise.setDeleteFlag(DeleteFlagConstants.DELETE_STATUS);
return this.tabSysUnionEnterpriseMapper.updateByPrimaryKeySelective(enterprise); return this.tabSysUnionEnterpriseMapper.updateByPrimaryKeySelective(enterprise);
} }
......
package com.gic.auth.service.impl; package com.gic.auth.service.impl;
import com.gic.auth.constant.AuthorizationStatusEnum; import com.gic.auth.constant.AuthorizationStatusEnum;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysUnionEnterpriseResourceMapper; import com.gic.auth.dao.mapper.TabSysUnionEnterpriseResourceMapper;
import com.gic.auth.dto.UnionEnterpriseResourceDTO; import com.gic.auth.dto.UnionEnterpriseResourceDTO;
import com.gic.auth.entity.TabSysUnionEnterpriseResource; import com.gic.auth.entity.TabSysUnionEnterpriseResource;
...@@ -35,7 +36,7 @@ public class UnionEnterrpiseResourceServiceImpl implements UnionEnterpriseResour ...@@ -35,7 +36,7 @@ public class UnionEnterrpiseResourceServiceImpl implements UnionEnterpriseResour
return this.tabSysUnionEnterpriseResourceMapper.updateByPrimaryKeySelective(resource); return this.tabSysUnionEnterpriseResourceMapper.updateByPrimaryKeySelective(resource);
}else { }else {
resource.setAuthorizationStatus(AuthorizationStatusEnum.NORMAL.getCode()); resource.setAuthorizationStatus(AuthorizationStatusEnum.NORMAL.getCode());
resource.setStatus(Constants.NORMAL_STATUS); resource.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
resource.setUpdateTime(new Date()); resource.setUpdateTime(new Date());
resource.setCreateTime(new Date()); resource.setCreateTime(new Date());
resource.setUnionId(unionId); resource.setUnionId(unionId);
......
package com.gic.auth.service.impl; package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.constant.LoginUserTypeEnum; import com.gic.auth.constant.LoginUserTypeEnum;
import com.gic.auth.dao.mapper.TabSysUserMapper; import com.gic.auth.dao.mapper.TabSysUserMapper;
import com.gic.auth.dto.UserDTO; import com.gic.auth.dto.UserDTO;
...@@ -33,7 +34,7 @@ public class UserServiceImpl implements UserService { ...@@ -33,7 +34,7 @@ public class UserServiceImpl implements UserService {
userDTO.setLoginType(LoginUserTypeEnum.GIC_USER.getCode()); userDTO.setLoginType(LoginUserTypeEnum.GIC_USER.getCode());
userDTO.setCreateTime(new Date()); userDTO.setCreateTime(new Date());
userDTO.setUpdateTime(new Date()); userDTO.setUpdateTime(new Date());
userDTO.setStatus(1); userDTO.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
TabSysUser tabUser = EntityUtil.changeEntityNew(TabSysUser.class, userDTO); TabSysUser tabUser = EntityUtil.changeEntityNew(TabSysUser.class, userDTO);
if (tabUser.getAccountType() == null) { if (tabUser.getAccountType() == null) {
//永久有效账号 //永久有效账号
...@@ -48,7 +49,7 @@ public class UserServiceImpl implements UserService { ...@@ -48,7 +49,7 @@ public class UserServiceImpl implements UserService {
userDTO.setLoginType(LoginUserTypeEnum.OPERATION_USER.getCode()); userDTO.setLoginType(LoginUserTypeEnum.OPERATION_USER.getCode());
userDTO.setCreateTime(new Date()); userDTO.setCreateTime(new Date());
userDTO.setUpdateTime(new Date()); userDTO.setUpdateTime(new Date());
userDTO.setStatus(1); userDTO.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
//设置超管权限 //设置超管权限
userDTO.setSuperAdmin(1); userDTO.setSuperAdmin(1);
TabSysUser tabUser = EntityUtil.changeEntityNew(TabSysUser.class, userDTO); TabSysUser tabUser = EntityUtil.changeEntityNew(TabSysUser.class, userDTO);
......
...@@ -2,6 +2,7 @@ package com.gic.auth.service.outer.impl; ...@@ -2,6 +2,7 @@ package com.gic.auth.service.outer.impl;
import com.gic.api.base.commons.ServiceResponse; import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.constant.AccountGroupMemberTypeEnum; import com.gic.auth.constant.AccountGroupMemberTypeEnum;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.constant.SignConstants; import com.gic.auth.constant.SignConstants;
import com.gic.auth.dto.AccountGroupDTO; import com.gic.auth.dto.AccountGroupDTO;
import com.gic.auth.dto.AccountGroupListDTO; import com.gic.auth.dto.AccountGroupListDTO;
...@@ -205,7 +206,7 @@ public class AccountGroupApiServiceImpl implements AccountGroupApiService { ...@@ -205,7 +206,7 @@ public class AccountGroupApiServiceImpl implements AccountGroupApiService {
Date now = new Date(); Date now = new Date();
for (AccountGroupMemberDTO dto : list) { for (AccountGroupMemberDTO dto : list) {
AccountGroupRelDTO temp = new AccountGroupRelDTO(); AccountGroupRelDTO temp = new AccountGroupRelDTO();
temp.setStatus(1); temp.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
if (dto.getAccountGroupId() == null) { if (dto.getAccountGroupId() == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "分组ID不能改为空"); return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "分组ID不能改为空");
} }
...@@ -343,7 +344,7 @@ public class AccountGroupApiServiceImpl implements AccountGroupApiService { ...@@ -343,7 +344,7 @@ public class AccountGroupApiServiceImpl implements AccountGroupApiService {
List<AccountGroupRelDTO> result = new ArrayList<>(); List<AccountGroupRelDTO> result = new ArrayList<>();
for (Integer userId : userIdList) { for (Integer userId : userIdList) {
AccountGroupRelDTO temp = new AccountGroupRelDTO(); AccountGroupRelDTO temp = new AccountGroupRelDTO();
temp.setStatus(1); temp.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
temp.setAccountGroupId(groupId); temp.setAccountGroupId(groupId);
temp.setCreateTime(now); temp.setCreateTime(now);
temp.setUpdateTime(now); temp.setUpdateTime(now);
......
package com.gic.auth.service.outer.impl; package com.gic.auth.service.outer.impl;
import com.gic.api.base.commons.ServiceResponse; import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dto.AuthCodeDTO; import com.gic.auth.dto.AuthCodeDTO;
import com.gic.auth.entity.TabSysAuthCode; import com.gic.auth.entity.TabSysAuthCode;
import com.gic.auth.service.AuthCodeApiService; import com.gic.auth.service.AuthCodeApiService;
...@@ -29,7 +30,7 @@ public class AuthCodeApiServiceImpl implements AuthCodeApiService { ...@@ -29,7 +30,7 @@ public class AuthCodeApiServiceImpl implements AuthCodeApiService {
TabSysAuthCode sysAuthCode = EntityUtil.changeEntityByJSON(TabSysAuthCode.class, authCodeDTO); TabSysAuthCode sysAuthCode = EntityUtil.changeEntityByJSON(TabSysAuthCode.class, authCodeDTO);
sysAuthCode.setCreateTime(new Date()); sysAuthCode.setCreateTime(new Date());
sysAuthCode.setUpdateTime(new Date()); sysAuthCode.setUpdateTime(new Date());
sysAuthCode.setStatus(Constants.NORMAL_STATUS); sysAuthCode.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
this.authCodeService.saveAuthCode(sysAuthCode); this.authCodeService.saveAuthCode(sysAuthCode);
return ServiceResponse.success(sysAuthCode.getAuthCodeId()); return ServiceResponse.success(sysAuthCode.getAuthCodeId());
} }
...@@ -56,7 +57,7 @@ public class AuthCodeApiServiceImpl implements AuthCodeApiService { ...@@ -56,7 +57,7 @@ public class AuthCodeApiServiceImpl implements AuthCodeApiService {
public ServiceResponse validateAuthCode(Integer authCodeId, String authCode) { public ServiceResponse validateAuthCode(Integer authCodeId, String authCode) {
TabSysAuthCode sysAuthCode = this.authCodeService.getAuthCode(authCodeId); TabSysAuthCode sysAuthCode = this.authCodeService.getAuthCode(authCodeId);
if(sysAuthCode != null){ if(sysAuthCode != null){
if(sysAuthCode.getStatus() == 0){ if(sysAuthCode.getDeleteFlag() == DeleteFlagConstants.DELETE_STATUS){
return EnterpriseServiceResponse.failure(ErrorCode.AUTHCODE_USED); return EnterpriseServiceResponse.failure(ErrorCode.AUTHCODE_USED);
} }
if(sysAuthCode.getExpirationTime().before(new Date())){ if(sysAuthCode.getExpirationTime().before(new Date())){
......
...@@ -3,6 +3,7 @@ package com.gic.auth.service.outer.impl; ...@@ -3,6 +3,7 @@ package com.gic.auth.service.outer.impl;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse; import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.constant.AccountGroupMemberTypeEnum; import com.gic.auth.constant.AccountGroupMemberTypeEnum;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.constant.SignConstants; import com.gic.auth.constant.SignConstants;
import com.gic.auth.dto.AppDTO; import com.gic.auth.dto.AppDTO;
import com.gic.auth.dto.CollaboratorDTO; import com.gic.auth.dto.CollaboratorDTO;
...@@ -169,7 +170,7 @@ public class CollaboratorApiServiceImpl implements CollaboratorApiService { ...@@ -169,7 +170,7 @@ public class CollaboratorApiServiceImpl implements CollaboratorApiService {
temp.setCreateTime(now); temp.setCreateTime(now);
temp.setUpdateTime(now); temp.setUpdateTime(now);
temp.setMenuId(Integer.parseInt(str)); temp.setMenuId(Integer.parseInt(str));
temp.setStatus(1); temp.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
list.add(temp); list.add(temp);
} }
collaboratorRoleRelService.deleteByCollaboratorId(collaboratorId); collaboratorRoleRelService.deleteByCollaboratorId(collaboratorId);
...@@ -186,7 +187,7 @@ public class CollaboratorApiServiceImpl implements CollaboratorApiService { ...@@ -186,7 +187,7 @@ public class CollaboratorApiServiceImpl implements CollaboratorApiService {
} }
CollaboratorDTO dto = new CollaboratorDTO(); CollaboratorDTO dto = new CollaboratorDTO();
dto.setCollaboratorId(collaboratorId); dto.setCollaboratorId(collaboratorId);
dto.setStatus(0); dto.setDeleteFlag(DeleteFlagConstants.DELETE_STATUS);
collaboratorService.update(dto); collaboratorService.update(dto);
return ServiceResponse.success(); return ServiceResponse.success();
} }
......
...@@ -29,6 +29,7 @@ import com.gic.open.api.dto.*; ...@@ -29,6 +29,7 @@ import com.gic.open.api.dto.*;
import com.gic.open.api.service.AppTokenApiService; import com.gic.open.api.service.AppTokenApiService;
import com.gic.open.api.service.ApplicationApiService; import com.gic.open.api.service.ApplicationApiService;
import com.gic.open.api.service.ServeApiService; import com.gic.open.api.service.ServeApiService;
import com.gic.redis.data.util.RedisUtil;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
...@@ -123,42 +124,17 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -123,42 +124,17 @@ public class MenuApiServiceImpl implements MenuApiService {
if (tabSysUser == null) { if (tabSysUser == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "用户不存在"); return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "用户不存在");
} }
if (StringUtils.isBlank(versionCode)) {
return ServiceResponse.success(new ArrayList<>());
}
//是否是运维用户
boolean isOperationUser = tabSysUser.getLoginType().intValue() != 0;
List<MenuDTO> result;
if (tabSysUser.getSuperAdmin().intValue() == 1) { if (tabSysUser.getSuperAdmin().intValue() == 1) {
List<TabSysMenu> temp = new ArrayList<>(); //没有权限的操作项数据
//超级管理员 ServiceResponse<List<MenuDTO>> tempResult = getNoAuthOperationItem(userId, MenuProjectConstants.ALL_CODE,
MenuListQO params = new MenuListQO(); versionCode);
if (!isOperationUser) { return ServiceResponse.success(tempResult.getResult());
params.setAuthTypeList(Arrays.stream(new Integer[]{1,2}).collect(Collectors.toList()));
}
//查询gic的菜单
params.setIsGIC(MenuProjectConstants.DEFAULT_PROJECT_CODE);
params.setVersionCode(versionCode);
params.setMenuType(MenuTypeEnum.PAGE.getCode());
temp.addAll(this.menuService.listMenu(params));
//查询应用的菜单
params.setVersionCode("");
params.setIsGIC(MenuProjectConstants.APP_PROJECT_CODE);
params.setMenuType(MenuTypeEnum.PAGE.getCode());
temp.addAll(this.menuService.listMenu(params));
result = EntityUtil.changeEntityListNew(MenuDTO.class, filterOperationUserDepartAuth(temp, tabSysUser));
} else { } else {
List<TabSysMenu> menuList = getUserMenuList(userId); //没有权限的操作项数据
result = EntityUtil.changeEntityListNew(MenuDTO.class, menuList);
ServiceResponse<List<MenuDTO>> tempResult = getNoAuthOperationItem(userId, MenuProjectConstants.ALL_CODE, ServiceResponse<List<MenuDTO>> tempResult = getNoAuthOperationItem(userId, MenuProjectConstants.ALL_CODE,
versionCode); versionCode);
result.addAll(tempResult.getResult()); return ServiceResponse.success(tempResult.getResult());
} }
return ServiceResponse.success(result);
} }
@Override @Override
...@@ -259,6 +235,19 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -259,6 +235,19 @@ public class MenuApiServiceImpl implements MenuApiService {
} }
@Override @Override
public ServiceResponse<List<MenuDTO>> getAllMenu() {
//超级管理员
MenuListQO params = new MenuListQO();
//查询gic的菜单
List<Integer> menuTypeList = new ArrayList<>(2);
menuTypeList.add(MenuTypeEnum.PAGE.getCode());
menuTypeList.add(MenuTypeEnum.OPERATION.getCode());
params.setMenuTypeList(menuTypeList);
List<MenuDTO> result = EntityUtil.changeEntityListNew(MenuDTO.class, this.menuService.listMenu(params));
return ServiceResponse.success(result);
}
@Override
public ServiceResponse<List<MenuDTO>> getSuperAdminMenuNotTree(Integer enterpriseId) { public ServiceResponse<List<MenuDTO>> getSuperAdminMenuNotTree(Integer enterpriseId) {
ServiceResponse<EnterpriseDTO> result = enterpriseApiService.getEnterpriseById(enterpriseId); ServiceResponse<EnterpriseDTO> result = enterpriseApiService.getEnterpriseById(enterpriseId);
if (result.isSuccess()) { if (result.isSuccess()) {
...@@ -444,7 +433,7 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -444,7 +433,7 @@ public class MenuApiServiceImpl implements MenuApiService {
MenuDTO menuDTO = new MenuDTO(); MenuDTO menuDTO = new MenuDTO();
menuDTO.setMenuId(menuId); menuDTO.setMenuId(menuId);
menuDTO.setStatus(0); menuDTO.setDeleteFlag(DeleteFlagConstants.DELETE_STATUS);
menuService.updatePage(menuDTO); menuService.updatePage(menuDTO);
return ServiceResponse.success(); return ServiceResponse.success();
} }
...@@ -607,7 +596,7 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -607,7 +596,7 @@ public class MenuApiServiceImpl implements MenuApiService {
MenuItemDTO menuItemDTO = new MenuItemDTO(); MenuItemDTO menuItemDTO = new MenuItemDTO();
menuItemDTO.setItemId(Integer.parseInt(operationItem)); menuItemDTO.setItemId(Integer.parseInt(operationItem));
menuItemDTO.setMenuId(menuId); menuItemDTO.setMenuId(menuId);
menuItemDTO.setStatus(1); menuItemDTO.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
menuItemDTO.setCreateTime(now); menuItemDTO.setCreateTime(now);
menuItemDTO.setUpdateTime(now); menuItemDTO.setUpdateTime(now);
itemDTOList.add(menuItemDTO); itemDTOList.add(menuItemDTO);
...@@ -662,7 +651,7 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -662,7 +651,7 @@ public class MenuApiServiceImpl implements MenuApiService {
MenuItemDTO menuItemDTO = new MenuItemDTO(); MenuItemDTO menuItemDTO = new MenuItemDTO();
menuItemDTO.setItemId(Integer.parseInt(operationItem)); menuItemDTO.setItemId(Integer.parseInt(operationItem));
menuItemDTO.setMenuId(params.getMenuId()); menuItemDTO.setMenuId(params.getMenuId());
menuItemDTO.setStatus(1); menuItemDTO.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
menuItemDTO.setCreateTime(now); menuItemDTO.setCreateTime(now);
menuItemDTO.setUpdateTime(now); menuItemDTO.setUpdateTime(now);
itemDTOList.add(menuItemDTO); itemDTOList.add(menuItemDTO);
...@@ -718,6 +707,24 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -718,6 +707,24 @@ public class MenuApiServiceImpl implements MenuApiService {
} }
@Override @Override
public ServiceResponse<MenuDTO> getHasBuyAppByMenuCode(String menuCode, Integer enterpriseId) {
TabSysMenu record = menuService.getMenuByMenuCode(menuCode);
if (record == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "菜单code错误,无数据");
}
ServiceResponse<List<ApplicationTokenDTO>> appResult = appTokenApiService
.listApplicationByeId(Long.valueOf(enterpriseId));
if (appResult.isSuccess()) {
List<ApplicationTokenDTO> appList = appResult.getResult();
boolean existApp = appList.stream().anyMatch(e -> e.getApplicationId().toString().equals(record.getProject()));
if (existApp) {
return ServiceResponse.success(EntityUtil.changeEntityNew(MenuDTO.class, record));
}
}
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "菜单code错误,无数据");
}
@Override
public ServiceResponse<List<MenuDTO>> test(String menuCode) { public ServiceResponse<List<MenuDTO>> test(String menuCode) {
TabSysMenu tabSysMenu = menuService.getMenuByMenuCode(menuCode); TabSysMenu tabSysMenu = menuService.getMenuByMenuCode(menuCode);
List<TabSysMenu> devMenuList = menuService.listMenuTempForGic(menuCode); List<TabSysMenu> devMenuList = menuService.listMenuTempForGic(menuCode);
...@@ -778,7 +785,7 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -778,7 +785,7 @@ public class MenuApiServiceImpl implements MenuApiService {
MenuItemDTO menuItemDTO = new MenuItemDTO(); MenuItemDTO menuItemDTO = new MenuItemDTO();
menuItemDTO.setItemId(tempItem.getMenuId()); menuItemDTO.setItemId(tempItem.getMenuId());
menuItemDTO.setMenuId(proMenu.getMenuId()); menuItemDTO.setMenuId(proMenu.getMenuId());
menuItemDTO.setStatus(1); menuItemDTO.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
menuItemDTO.setCreateTime(now); menuItemDTO.setCreateTime(now);
menuItemDTO.setUpdateTime(now); menuItemDTO.setUpdateTime(now);
itemDTOList.add(menuItemDTO); itemDTOList.add(menuItemDTO);
...@@ -836,7 +843,7 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -836,7 +843,7 @@ public class MenuApiServiceImpl implements MenuApiService {
Date now = new Date(); Date now = new Date();
menuDTO.setMenuAuthDepartList( menuDTO.setMenuAuthDepartList(
list.stream().map(e -> e.setMenuCode(menuDTO.getMenuCode()) list.stream().map(e -> e.setMenuCode(menuDTO.getMenuCode())
.setStatus(1) .setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS)
.setCreateTime(now) .setCreateTime(now)
.setUpdateTime(now)).collect(Collectors.toList())); .setUpdateTime(now)).collect(Collectors.toList()));
} }
...@@ -948,7 +955,7 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -948,7 +955,7 @@ public class MenuApiServiceImpl implements MenuApiService {
*/ */
private void saveAppMenu() { private void saveAppMenu() {
ServiceResponse<List<ApplicationDTO>> appListResponse = applicationApiService.listApplicationAndServeProp(); ServiceResponse<List<ApplicationDTO>> appListResponse = applicationApiService.listApplicationAndServeProp();
Map<String, TabSysMenu> appMenu = getFirstLevelAppMenu(); Map<String, Integer> appMenu = getFirstLevelAppMenu();
if (appListResponse.isSuccess()) { if (appListResponse.isSuccess()) {
List<ApplicationDTO> appList = appListResponse.getResult(); List<ApplicationDTO> appList = appListResponse.getResult();
//删除已经不存在的应用 //删除已经不存在的应用
...@@ -967,7 +974,7 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -967,7 +974,7 @@ public class MenuApiServiceImpl implements MenuApiService {
menuDTO.setProject(app.getApplicationId().toString()); menuDTO.setProject(app.getApplicationId().toString());
setMenuVersion(app.getPropDTOList(), app.getServeExpanList(), menuDTO); setMenuVersion(app.getPropDTOList(), app.getServeExpanList(), menuDTO);
// setMenuAuthType(menuDTO); // setMenuAuthType(menuDTO);
menuDTO.setMenuId(appMenu.get(app.getApplicationId().toString()).getMenuId()); menuDTO.setMenuId(appMenu.get(app.getApplicationId().toString()));
menuService.updatePage(menuDTO); menuService.updatePage(menuDTO);
} else { } else {
MenuDTO menuDTO = new MenuDTO(); MenuDTO menuDTO = new MenuDTO();
...@@ -976,6 +983,9 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -976,6 +983,9 @@ public class MenuApiServiceImpl implements MenuApiService {
setMenuVersion(app.getPropDTOList(), app.getServeExpanList(), menuDTO); setMenuVersion(app.getPropDTOList(), app.getServeExpanList(), menuDTO);
// setMenuAuthType(menuDTO); // setMenuAuthType(menuDTO);
setNormalFieldValue(menuDTO); setNormalFieldValue(menuDTO);
//3:好办应用
boolean isGicApp =MenuPlatformTypeEnum.GIC.getCode().equals(app.getAppType());
menuDTO.setPlatformType(isGicApp ? MenuPlatformTypeEnum.GIC.getCode() : MenuPlatformTypeEnum.HAOBAN_APP.getCode());
menuService.savePage(menuDTO); menuService.savePage(menuDTO);
} }
} }
...@@ -1024,18 +1034,26 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -1024,18 +1034,26 @@ public class MenuApiServiceImpl implements MenuApiService {
} }
/** /**
* 获取应用第一级菜单(应用列表) * 获取应用第一级菜单(应用列表)(gic和好办应用)
* @return * @return
*/ */
private Map<String, TabSysMenu> getFirstLevelAppMenu() { private Map<String, Integer> getFirstLevelAppMenu() {
MenuListQO params = new MenuListQO(); MenuListQO params = new MenuListQO();
params.setIsGIC(MenuProjectConstants.APP_PROJECT_CODE); params.setIsGIC(MenuProjectConstants.APP_PROJECT_CODE);
params.setLevel(MenuLevelConstants.FIRST_LEVEL); params.setLevel(MenuLevelConstants.FIRST_LEVEL);
List<TabSysMenu> menuList = menuService.listMenu(params); params.setPlatformType(MenuPlatformTypeEnum.GIC.getCode());
Map<String, TabSysMenu> map = new HashMap<>(16); List<TabSysMenu> menuListOfGic = menuService.listMenu(params);
if (menuList != null) { Map<String, Integer> map = new HashMap<>(16);
for (TabSysMenu menu : menuList) { if (menuListOfGic != null) {
map.put(menu.getProject(), menu); for (TabSysMenu menu : menuListOfGic) {
map.put(menu.getProject(), menu.getMenuId());
}
}
params.setPlatformType(MenuPlatformTypeEnum.HAOBAN_APP.getCode());
List<TabSysMenu> menuListOfHaoBanApp = menuService.listMenu(params);
if (menuListOfHaoBanApp != null) {
for (TabSysMenu menu : menuListOfHaoBanApp) {
map.put(menu.getProject(), menu.getMenuId());
} }
} }
return map; return map;
...@@ -1272,16 +1290,7 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -1272,16 +1290,7 @@ public class MenuApiServiceImpl implements MenuApiService {
} }
} }
List<TabSysMenu> tempList = filterResource(resultList, params.getEnterpriseId());
Map<String, Object> resourcePage = getBusinessFrontRes(params.getEnterpriseId());
List<TabSysMenu> tempList = new ArrayList<>();
for (TabSysMenu menu : resultList) {
if (resourcePage.containsKey(menu.getMenuCode())) {
//如果包含了,则过滤掉
continue;
}
tempList.add(menu);
}
if (isNeedTree) { if (isNeedTree) {
return ServiceResponse.success(this.treeMenu(tempList, 1, 0)); return ServiceResponse.success(this.treeMenu(tempList, 1, 0));
...@@ -1298,31 +1307,8 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -1298,31 +1307,8 @@ public class MenuApiServiceImpl implements MenuApiService {
*/ */
private List<TabSysMenu> filterOperationUserDepartAuth(List<TabSysMenu> resultList, TabSysUser tabSysUser) { private List<TabSysMenu> filterOperationUserDepartAuth(List<TabSysMenu> resultList, TabSysUser tabSysUser) {
if (tabSysUser != null && tabSysUser.getLoginType().intValue() != 0) { if (tabSysUser != null && tabSysUser.getLoginType().intValue() != 0) {
//运营人员的部门职位;根据手机号查询运维人员的部门职位信息
GicUserDTO gicUserDTO = gicUserService.getUserByMobile(tabSysUser.getPhoneNumber());
LOGGER.info("运维人员的部门职位数据:{}", JSON.toJSONString(gicUserDTO));
//如果是运营人员 //如果是运营人员
Set<String> departPosition = new HashSet<>(2); Set<String> departPosition = getLoginOperationDepartPosition(tabSysUser.getPhoneNumber());
String departmentCode = gicUserDTO.getDepartmentCode();
if (StringUtils.isNotBlank(departmentCode)) {
if (StringUtils.isBlank(gicUserDTO.getPositionCode())) {
//如果职位code是空,则取下面全部的职位code
List<GicDepartmentDTO> gicDepartmentDTOList = gicDepartmentService.listAllGicDepartment();
if (CollectionUtils.isNotEmpty(gicDepartmentDTOList)) {
Map<String, List<GicPositionDTO>> departMap = gicDepartmentDTOList
.stream()
.collect(Collectors.toMap(e -> e.getDepartmentCode(), e -> e.getPositionList()));
List<GicPositionDTO> positionList = departMap.get(departmentCode);
if (CollectionUtils.isNotEmpty(positionList)) {
positionList.forEach(e -> {
departPosition.add(departmentCode + "-" + e.getPositionCode());
});
}
}
} else {
departPosition.add(departmentCode + "-" + gicUserDTO.getPositionCode());
}
}
//过滤运营人员的部门职位权限 //过滤运营人员的部门职位权限
Map<String, List<TabSysMenuAuthDepart>> departMap = getAuthDepartMap(null); Map<String, List<TabSysMenuAuthDepart>> departMap = getAuthDepartMap(null);
return resultList.stream().filter(e -> { return resultList.stream().filter(e -> {
...@@ -1352,6 +1338,40 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -1352,6 +1338,40 @@ public class MenuApiServiceImpl implements MenuApiService {
} }
/** /**
* 获取运维人员的部门职位数据
* @param phoneNumber
* @return
*/
private Set<String> getLoginOperationDepartPosition(String phoneNumber) {
//如果是运营人员
Set<String> departPosition = new HashSet<>(16);
//运营人员的部门职位;根据手机号查询运维人员的部门职位信息
GicUserDTO gicUserDTO = gicUserService.getUserByMobile(phoneNumber);
LOGGER.info("运维人员的部门职位数据:{}", JSON.toJSONString(gicUserDTO));
String departmentCode = gicUserDTO.getDepartmentCode();
if (StringUtils.isNotBlank(departmentCode)) {
if (StringUtils.isBlank(gicUserDTO.getPositionCode())) {
//如果职位code是空,则取下面全部的职位code
List<GicDepartmentDTO> gicDepartmentDTOList = gicDepartmentService.listAllGicDepartment();
if (CollectionUtils.isNotEmpty(gicDepartmentDTOList)) {
Map<String, List<GicPositionDTO>> departMap = gicDepartmentDTOList
.stream()
.collect(Collectors.toMap(e -> e.getDepartmentCode(), e -> e.getPositionList()));
List<GicPositionDTO> positionList = departMap.get(departmentCode);
if (CollectionUtils.isNotEmpty(positionList)) {
positionList.forEach(e -> {
departPosition.add(departmentCode + DELIMITER + e.getPositionCode());
});
}
}
} else {
departPosition.add(departmentCode + DELIMITER + gicUserDTO.getPositionCode());
}
}
return departPosition;
}
/**
* 查询出所有的部门职位,用于过滤运营人员权限 * 查询出所有的部门职位,用于过滤运营人员权限
* @param menuCodeList * @param menuCodeList
* @return * @return
...@@ -1370,16 +1390,7 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -1370,16 +1390,7 @@ public class MenuApiServiceImpl implements MenuApiService {
private ServiceResponse<List<MenuDTO>> getAppMenuPage(Integer enterpriseId, List<Integer> menuIdList, String appId) { private ServiceResponse<List<MenuDTO>> getAppMenuPage(Integer enterpriseId, List<Integer> menuIdList, String appId) {
//返回结果集定义声明 //返回结果集定义声明
List<TabSysMenu> resultList = menuService.selectByIdsAndOrderBy(menuIdList, " order by sort"); List<TabSysMenu> resultList = menuService.selectByIdsAndOrderBy(menuIdList, " order by sort");
Map<String, Object> resourcePage = getBusinessFrontRes(enterpriseId); List<TabSysMenu> tempList = filterResource(resultList, enterpriseId);
List<TabSysMenu> tempList = new ArrayList<>();
for (TabSysMenu menu : resultList) {
if (resourcePage.containsKey(menu.getMenuCode())) {
//如果包含了,则过滤掉
continue;
}
tempList.add(menu);
}
return ServiceResponse.success(this.treeMenu(tempList, 1, 0)); return ServiceResponse.success(this.treeMenu(tempList, 1, 0));
} }
...@@ -1388,8 +1399,14 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -1388,8 +1399,14 @@ public class MenuApiServiceImpl implements MenuApiService {
* @param enterpriseId * @param enterpriseId
* @return * @return
*/ */
private Map<String, Object> getBusinessFrontRes(Integer enterpriseId) { private Set<String> getBusinessFrontRes(Integer enterpriseId) {
Map<String, Object> resourcePage = new HashMap<>(16); Set<String> resourcePage = new HashSet<>(16);
//商品资源获取接口调整
ServiceResponse<MenuDTO> goods = getHasBuyAppByMenuCode(AppMenuCodeConstants.GOODS_APP, enterpriseId);
boolean hasGoodsAuth = goods.isSuccess();
if (!hasGoodsAuth) {
resourcePage.add(AppMenuCodeConstants.GOODS_GIC);
}
//过滤商品资源页面 //过滤商品资源页面
ServiceResponse<List<EnterpriseResourceRelDTO>> resourceResult = enterpriseApiService.getBusinessFrontRes(enterpriseId); ServiceResponse<List<EnterpriseResourceRelDTO>> resourceResult = enterpriseApiService.getBusinessFrontRes(enterpriseId);
if (resourceResult.isSuccess()) { if (resourceResult.isSuccess()) {
...@@ -1408,7 +1425,7 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -1408,7 +1425,7 @@ public class MenuApiServiceImpl implements MenuApiService {
List<TabSysBusinessFrontRes> frontResourceList = businessFrontResService.listByCode(resourceCodeList, 1); List<TabSysBusinessFrontRes> frontResourceList = businessFrontResService.listByCode(resourceCodeList, 1);
if (CollectionUtils.isNotEmpty(frontResourceList)) { if (CollectionUtils.isNotEmpty(frontResourceList)) {
for (TabSysBusinessFrontRes resource : frontResourceList) { for (TabSysBusinessFrontRes resource : frontResourceList) {
resourcePage.put(resource.getPageName(), 1); resourcePage.add(resource.getPageName());
} }
} }
} }
...@@ -1418,6 +1435,26 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -1418,6 +1435,26 @@ public class MenuApiServiceImpl implements MenuApiService {
} }
/** /**
* 获取前置资源
* @param resultList
* @param enterpriseId
* @return
*/
private List<TabSysMenu> filterResource(List<TabSysMenu> resultList, Integer enterpriseId) {
List<TabSysMenu> tempList = new ArrayList<>();
Set<String> resourcePage = getBusinessFrontRes(enterpriseId);
for (TabSysMenu menu : resultList) {
if (resourcePage.contains(menu.getMenuCode())) {
//如果包含了,则过滤掉
continue;
}
tempList.add(menu);
}
return tempList;
}
/**
* 获取用户没有权限的操作项 * 获取用户没有权限的操作项
* @Title: getNoAuthOperationItem
 * @Title: getNoAuthOperationItem

* @Description: * @Description:
...@@ -1428,45 +1465,34 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -1428,45 +1465,34 @@ public class MenuApiServiceImpl implements MenuApiService {
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.auth.dto.MenuDTO>>
 * @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.auth.dto.MenuDTO>>


 */ 
 */
private ServiceResponse<List<MenuDTO>> getNoAuthOperationItem(Integer userId, int projectCode, String versionCode) { private ServiceResponse<List<MenuDTO>> getNoAuthOperationItem(Integer userId, int projectCode, String versionCode) {
//没有基础服务数据,则返回空
if (projectCode != MenuProjectConstants.APP_PROJECT_CODE && StringUtils.isBlank(versionCode)) {
List<MenuDTO> noAuthList = new ArrayList<>(1);
MenuDTO temp = new MenuDTO();
temp.setMenuId(-1);
noAuthList.add(temp);
return ServiceResponse.success(noAuthList);
}
TabSysUser tabSysUser = userService.getUserById(userId); TabSysUser tabSysUser = userService.getUserById(userId);
if (tabSysUser == null) { if (tabSysUser == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "用户不存在"); return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "用户不存在");
} }
boolean isSuperAdmin = tabSysUser.getSuperAdmin().intValue() == 1;
//添加逻辑:如果是超级管理员,过滤部门权限,给出没有权限的操作项 //添加逻辑:如果是超级管理员,过滤部门权限,给出没有权限的操作项
if (tabSysUser.getSuperAdmin().intValue() == 1) { if (isSuperAdmin) {
// //
MenuListQO params = new MenuListQO(); MenuListQO params = new MenuListQO();
//操作项 //操作项
params.setMenuType(2); params.setMenuType(MenuTypeEnum.OPERATION.getCode());
List<TabSysMenu> allOper = menuService.listMenu(params); List<TabSysMenu> allOper = menuService.listMenu(params);
if (tabSysUser != null && tabSysUser.getLoginType().intValue() != 0) { boolean isOperationUser = tabSysUser.getLoginType().intValue() != 0;
//运营人员的部门职位;根据手机号查询运维人员的部门职位信息
GicUserDTO gicUserDTO = gicUserService.getUserByMobile(tabSysUser.getPhoneNumber()); if (isOperationUser) {
LOGGER.info("运维人员的部门职位数据:{}", JSON.toJSONString(gicUserDTO)); //运营人员的部门职位
//如果是运营人员 Set<String> departPosition = getLoginOperationDepartPosition(tabSysUser.getPhoneNumber());
Set<String> departPosition = new HashSet<>(2);
String departmentCode = gicUserDTO.getDepartmentCode();
if (StringUtils.isNotBlank(departmentCode)) {
if (StringUtils.isBlank(gicUserDTO.getPositionCode())) {
//如果职位code是空,则取下面全部的职位code
List<GicDepartmentDTO> gicDepartmentDTOList = gicDepartmentService.listAllGicDepartment();
if (CollectionUtils.isNotEmpty(gicDepartmentDTOList)) {
Map<String, List<GicPositionDTO>> departMap = gicDepartmentDTOList
.stream()
.collect(Collectors.toMap(e -> e.getDepartmentCode(), e -> e.getPositionList()));
List<GicPositionDTO> positionList = departMap.get(departmentCode);
if (CollectionUtils.isNotEmpty(positionList)) {
positionList.forEach(e -> {
departPosition.add(departmentCode + DELIMITER + e.getPositionCode());
});
}
}
} else {
departPosition.add(departmentCode + DELIMITER + gicUserDTO.getPositionCode());
}
}
//过滤运营人员的部门职位权限 //过滤运营人员的部门职位权限
Map<String, List<TabSysMenuAuthDepart>> departMap = getAuthDepartMap(null); Map<String, List<TabSysMenuAuthDepart>> departMap = getAuthDepartMap(null);
return ServiceResponse.success(EntityUtil.changeEntityListNew(MenuDTO.class, allOper.stream().filter(e -> { return ServiceResponse.success(EntityUtil.changeEntityListNew(MenuDTO.class, allOper.stream().filter(e -> {
...@@ -1485,8 +1511,8 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -1485,8 +1511,8 @@ public class MenuApiServiceImpl implements MenuApiService {
} }
return true; return true;
}).collect(Collectors.toList()))); }).collect(Collectors.toList())));
} else if (tabSysUser != null && tabSysUser.getSuperAdmin().intValue() == 1) { } else {
//超级管理员 //gic超级管理员
return ServiceResponse.success(EntityUtil.changeEntityListNew(MenuDTO.class,allOper.stream().filter(e -> e.getAuthType().intValue() == 3).collect(Collectors.toList()))); return ServiceResponse.success(EntityUtil.changeEntityListNew(MenuDTO.class,allOper.stream().filter(e -> e.getAuthType().intValue() == 3).collect(Collectors.toList())));
} }
} }
......
...@@ -2,6 +2,7 @@ package com.gic.auth.service.outer.impl; ...@@ -2,6 +2,7 @@ package com.gic.auth.service.outer.impl;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse; import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dto.MenuRoleDTO; import com.gic.auth.dto.MenuRoleDTO;
import com.gic.auth.dto.RoleDTO; import com.gic.auth.dto.RoleDTO;
import com.gic.auth.dto.RoleListDTO; import com.gic.auth.dto.RoleListDTO;
...@@ -51,7 +52,7 @@ public class RoleApiServiceImpl implements RoleApiService{ ...@@ -51,7 +52,7 @@ public class RoleApiServiceImpl implements RoleApiService{
} }
dto.setUpdateTime(new Date()); dto.setUpdateTime(new Date());
dto.setCreateTime(new Date()); dto.setCreateTime(new Date());
dto.setStatus(1); dto.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
//验证名称不能重复 //验证名称不能重复
if (roleService.isRepeatRoleName(dto.getEnterpriseId(), null, dto.getRoleName())) { if (roleService.isRepeatRoleName(dto.getEnterpriseId(), null, dto.getRoleName())) {
...@@ -164,7 +165,7 @@ public class RoleApiServiceImpl implements RoleApiService{ ...@@ -164,7 +165,7 @@ public class RoleApiServiceImpl implements RoleApiService{
menuRoleDTO.setMenuId(Integer.parseInt(menuId)); menuRoleDTO.setMenuId(Integer.parseInt(menuId));
menuRoleDTO.setCreateTime(now); menuRoleDTO.setCreateTime(now);
menuRoleDTO.setUpdateTime(now); menuRoleDTO.setUpdateTime(now);
menuRoleDTO.setStatus(1); menuRoleDTO.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
list.add(menuRoleDTO); list.add(menuRoleDTO);
} }
menuRoleService.insertForeach(list); menuRoleService.insertForeach(list);
......
...@@ -3,6 +3,7 @@ package com.gic.auth.service.outer.impl; ...@@ -3,6 +3,7 @@ package com.gic.auth.service.outer.impl;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse; import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.constant.AuthorizationStatusEnum; import com.gic.auth.constant.AuthorizationStatusEnum;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.constant.ResourceTypeEnum; import com.gic.auth.constant.ResourceTypeEnum;
import com.gic.auth.dto.UnionEnterpriseDTO; import com.gic.auth.dto.UnionEnterpriseDTO;
import com.gic.auth.dto.UnionEnterpriseResourceDTO; import com.gic.auth.dto.UnionEnterpriseResourceDTO;
...@@ -45,7 +46,7 @@ public class UnionEnterpriseApiServiceImpl implements UnionEnterpriseApiService ...@@ -45,7 +46,7 @@ public class UnionEnterpriseApiServiceImpl implements UnionEnterpriseApiService
int i = 0; int i = 0;
if(enterpriseDTO.getUnionId() == null) { if(enterpriseDTO.getUnionId() == null) {
unionEnterprise.setCreateTime(new Date()); unionEnterprise.setCreateTime(new Date());
unionEnterprise.setStatus(Constants.NORMAL_STATUS); unionEnterprise.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
unionEnterprise.setAuthorizationStatus(AuthorizationStatusEnum.NORMAL.getCode()); unionEnterprise.setAuthorizationStatus(AuthorizationStatusEnum.NORMAL.getCode());
unionEnterprise.setUpdateTime(new Date()); unionEnterprise.setUpdateTime(new Date());
i = this.unionEnterpriseService.saveUnionEnterprise(unionEnterprise); i = this.unionEnterpriseService.saveUnionEnterprise(unionEnterprise);
......
...@@ -4,6 +4,7 @@ import com.gic.api.base.commons.Page; ...@@ -4,6 +4,7 @@ import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse; import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.constant.AccountGroupMemberTypeEnum; import com.gic.auth.constant.AccountGroupMemberTypeEnum;
import com.gic.auth.constant.AccountPositionEnum; import com.gic.auth.constant.AccountPositionEnum;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.constant.LoginUserTypeEnum; import com.gic.auth.constant.LoginUserTypeEnum;
import com.gic.auth.dto.*; import com.gic.auth.dto.*;
import com.gic.auth.entity.*; import com.gic.auth.entity.*;
...@@ -629,7 +630,7 @@ public class UserApiServiceImpl implements UserApiService { ...@@ -629,7 +630,7 @@ public class UserApiServiceImpl implements UserApiService {
accountGroupRelDTO.setCreateTime(now); accountGroupRelDTO.setCreateTime(now);
accountGroupRelDTO.setUpdateTime(now); accountGroupRelDTO.setUpdateTime(now);
accountGroupRelDTO.setEnterpriseId(enterpriseId); accountGroupRelDTO.setEnterpriseId(enterpriseId);
accountGroupRelDTO.setStatus(1); accountGroupRelDTO.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
accountGroupRelDTOList.add(accountGroupRelDTO); accountGroupRelDTOList.add(accountGroupRelDTO);
} }
accountGroupRelService.insertFetch(accountGroupRelDTOList); accountGroupRelService.insertFetch(accountGroupRelDTOList);
......
package com.gic.auth.service.outer.impl; package com.gic.auth.service.outer.impl;
import com.gic.api.base.commons.ServiceResponse; import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dto.UserResourceDTO; import com.gic.auth.dto.UserResourceDTO;
import com.gic.auth.entity.TabSysUser; import com.gic.auth.entity.TabSysUser;
import com.gic.auth.service.UserResourceApiService; import com.gic.auth.service.UserResourceApiService;
...@@ -40,7 +41,7 @@ public class UserResourceApiServiceImpl implements UserResourceApiService{ ...@@ -40,7 +41,7 @@ public class UserResourceApiServiceImpl implements UserResourceApiService{
dto.setCreateTime(new Date()); dto.setCreateTime(new Date());
dto.setUpdateTime(new Date()); dto.setUpdateTime(new Date());
dto.setStatus(1); dto.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
userResourceService.save(dto); userResourceService.save(dto);
return ServiceResponse.success(); return ServiceResponse.success();
......
package com.gic.auth.service.outer.impl; package com.gic.auth.service.outer.impl;
import com.gic.api.base.commons.ServiceResponse; import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dto.UserRoleDTO; import com.gic.auth.dto.UserRoleDTO;
import com.gic.auth.entity.TabSysUser; import com.gic.auth.entity.TabSysUser;
import com.gic.auth.service.UserRoleApiService; import com.gic.auth.service.UserRoleApiService;
...@@ -38,7 +39,7 @@ public class UserRoleApiServiceImpl implements UserRoleApiService{ ...@@ -38,7 +39,7 @@ public class UserRoleApiServiceImpl implements UserRoleApiService{
dto.setCreateTime(new Date()); dto.setCreateTime(new Date());
dto.setUpdateTime(new Date()); dto.setUpdateTime(new Date());
dto.setStatus(1); dto.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
userRoleService.save(dto); userRoleService.save(dto);
return ServiceResponse.success(); return ServiceResponse.success();
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" /> <result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="audited_group_name" jdbcType="VARCHAR" property="auditedGroupName" /> <result column="audited_group_name" jdbcType="VARCHAR" property="auditedGroupName" />
<result column="all_check" jdbcType="INTEGER" property="allCheck" /> <result column="all_check" jdbcType="INTEGER" property="allCheck" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
audited_group_id, enterprise_id, audited_group_name, all_check, status, create_time, audited_group_id, enterprise_id, audited_group_name, all_check, delete_flag, create_time,
update_time update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
...@@ -20,16 +20,13 @@ ...@@ -20,16 +20,13 @@
from tab_audited_group from tab_audited_group
where audited_group_id = #{auditedGroupId,jdbcType=INTEGER} where audited_group_id = #{auditedGroupId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_audited_group
where audited_group_id = #{auditedGroupId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabAuditedGroup"> <insert id="insert" parameterType="com.gic.auth.entity.TabAuditedGroup">
insert into tab_audited_group (audited_group_id, enterprise_id, audited_group_name, insert into tab_audited_group (audited_group_id, enterprise_id, audited_group_name,
all_check, status, create_time, all_check, delete_flag, create_time,
update_time) update_time)
values (#{auditedGroupId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{auditedGroupName,jdbcType=VARCHAR}, values (#{auditedGroupId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{auditedGroupName,jdbcType=VARCHAR},
#{allCheck,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{allCheck,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}) #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabAuditedGroup"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabAuditedGroup">
...@@ -50,8 +47,8 @@ ...@@ -50,8 +47,8 @@
<if test="allCheck != null"> <if test="allCheck != null">
all_check, all_check,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
...@@ -73,8 +70,8 @@ ...@@ -73,8 +70,8 @@
<if test="allCheck != null"> <if test="allCheck != null">
#{allCheck,jdbcType=INTEGER}, #{allCheck,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
...@@ -96,8 +93,8 @@ ...@@ -96,8 +93,8 @@
<if test="allCheck != null"> <if test="allCheck != null">
all_check = #{allCheck,jdbcType=INTEGER}, all_check = #{allCheck,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -113,7 +110,7 @@ ...@@ -113,7 +110,7 @@
set enterprise_id = #{enterpriseId,jdbcType=INTEGER}, set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
audited_group_name = #{auditedGroupName,jdbcType=VARCHAR}, audited_group_name = #{auditedGroupName,jdbcType=VARCHAR},
all_check = #{allCheck,jdbcType=INTEGER}, all_check = #{allCheck,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where audited_group_id = #{auditedGroupId,jdbcType=INTEGER} where audited_group_id = #{auditedGroupId,jdbcType=INTEGER}
...@@ -122,7 +119,7 @@ ...@@ -122,7 +119,7 @@
select select
1 1
from tab_audited_group from tab_audited_group
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="enterpriseId != null "> <if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
</if> </if>
...@@ -135,14 +132,14 @@ ...@@ -135,14 +132,14 @@
</select> </select>
<update id="delAuditedGroup"> <update id="delAuditedGroup">
update tab_audited_group update tab_audited_group
set status = 0 set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where audited_group_id = #{auditedGroupId} where audited_group_id = #{auditedGroupId}
</update> </update>
<select id="listAuditedGroup" resultMap="BaseResultMap"> <select id="listAuditedGroup" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_audited_group from tab_audited_group
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="enterpriseId != null "> <if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
</if> </if>
...@@ -152,7 +149,7 @@ ...@@ -152,7 +149,7 @@
</select> </select>
<select id="countByAuditedGroupIds" resultType="java.lang.Integer"> <select id="countByAuditedGroupIds" resultType="java.lang.Integer">
select count(1) select count(1)
from tab_audited_group where status = 1 from tab_audited_group where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="null != ids"> <if test="null != ids">
and audited_group_id in and audited_group_id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")"> <foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" /> <result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="audited_group_id" jdbcType="INTEGER" property="auditedGroupId" /> <result column="audited_group_id" jdbcType="INTEGER" property="auditedGroupId" />
<result column="user_id" jdbcType="INTEGER" property="userId" /> <result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
audited_group_user_rel_id, enterprise_id, audited_group_id, user_id, status, create_time, audited_group_user_rel_id, enterprise_id, audited_group_id, user_id, delete_flag, create_time,
update_time update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
...@@ -20,16 +20,13 @@ ...@@ -20,16 +20,13 @@
from tab_audited_group_user_rel from tab_audited_group_user_rel
where audited_group_user_rel_id = #{auditedGroupUserRelId,jdbcType=INTEGER} where audited_group_user_rel_id = #{auditedGroupUserRelId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_audited_group_user_rel
where audited_group_user_rel_id = #{auditedGroupUserRelId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabAuditedGroupUserRel"> <insert id="insert" parameterType="com.gic.auth.entity.TabAuditedGroupUserRel">
insert into tab_audited_group_user_rel (audited_group_user_rel_id, enterprise_id, insert into tab_audited_group_user_rel (audited_group_user_rel_id, enterprise_id,
audited_group_id, user_id, status, audited_group_id, user_id, delete_flag,
create_time, update_time) create_time, update_time)
values (#{auditedGroupUserRelId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, values (#{auditedGroupUserRelId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{auditedGroupId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{auditedGroupId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabAuditedGroupUserRel"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabAuditedGroupUserRel">
...@@ -47,8 +44,8 @@ ...@@ -47,8 +44,8 @@
<if test="userId != null"> <if test="userId != null">
user_id, user_id,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
...@@ -70,8 +67,8 @@ ...@@ -70,8 +67,8 @@
<if test="userId != null"> <if test="userId != null">
#{userId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
...@@ -93,8 +90,8 @@ ...@@ -93,8 +90,8 @@
<if test="userId != null"> <if test="userId != null">
user_id = #{userId,jdbcType=INTEGER}, user_id = #{userId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -110,26 +107,26 @@ ...@@ -110,26 +107,26 @@
set enterprise_id = #{enterpriseId,jdbcType=INTEGER}, set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
audited_group_id = #{auditedGroupId,jdbcType=INTEGER}, audited_group_id = #{auditedGroupId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER}, user_id = #{userId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where audited_group_user_rel_id = #{auditedGroupUserRelId,jdbcType=INTEGER} where audited_group_user_rel_id = #{auditedGroupUserRelId,jdbcType=INTEGER}
</update> </update>
<update id="delByAuditedGroupId"> <update id="delByAuditedGroupId">
update tab_audited_group_user_rel set status = 0 update tab_audited_group_user_rel set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where audited_group_id = #{auditedGroupId} where audited_group_id = #{auditedGroupId}
</update> </update>
<insert id="insertSelectiveByNotExist"> <insert id="insertSelectiveByNotExist">
INSERT INTO tab_audited_group_user_rel ( INSERT INTO tab_audited_group_user_rel (
audited_group_id, audited_group_id,
user_id, user_id,
status, delete_flag,
create_time, create_time,
enterprise_id enterprise_id
) SELECT ) SELECT
#{auditedGroupId}, #{auditedGroupId},
#{userId}, #{userId},
#{status}, #{deleteFlag},
#{createTime}, #{createTime},
#{enterpriseId} #{enterpriseId}
FROM FROM
...@@ -147,7 +144,7 @@ ...@@ -147,7 +144,7 @@
) )
</insert> </insert>
<update id="updateStatusByUserIds"> <update id="updateStatusByUserIds">
update tab_audited_group_user_rel set status = 1 update tab_audited_group_user_rel set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
where enterprise_id = #{enterpriseId} where enterprise_id = #{enterpriseId}
and audited_group_id = #{auditedGroupId} and audited_group_id = #{auditedGroupId}
and user_id in and user_id in
...@@ -160,7 +157,7 @@ ...@@ -160,7 +157,7 @@
audited_group_id auditedGroupId, count(1) userCount audited_group_id auditedGroupId, count(1) userCount
from from
tab_audited_group_user_rel tab_audited_group_user_rel
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="null != ids"> <if test="null != ids">
and audited_group_id in and audited_group_id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")"> <foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
...@@ -183,7 +180,7 @@ ...@@ -183,7 +180,7 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</where> </where>
</select> </select>
<select id="listAuditedGroupByUserId" resultType="java.lang.Integer"> <select id="listAuditedGroupByUserId" resultType="java.lang.Integer">
...@@ -197,7 +194,7 @@ ...@@ -197,7 +194,7 @@
<if test="userId != null "> <if test="userId != null ">
and user_id = #{userId} and user_id = #{userId}
</if> </if>
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</where> </where>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" /> <result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="auditor_id" jdbcType="INTEGER" property="auditorId" /> <result column="auditor_id" jdbcType="INTEGER" property="auditorId" />
<result column="audited_group_id" jdbcType="INTEGER" property="auditedGroupId" /> <result column="audited_group_id" jdbcType="INTEGER" property="auditedGroupId" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
auditor_audited_group_rel_id, enterprise_id, auditor_id, audited_group_id, status, auditor_audited_group_rel_id, enterprise_id, auditor_id, audited_group_id, delete_flag,
create_time, update_time create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
...@@ -20,16 +20,13 @@ ...@@ -20,16 +20,13 @@
from tab_auditor_audited_group_rel from tab_auditor_audited_group_rel
where auditor_audited_group_rel_id = #{auditorAuditedGroupRelId,jdbcType=INTEGER} where auditor_audited_group_rel_id = #{auditorAuditedGroupRelId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_auditor_audited_group_rel
where auditor_audited_group_rel_id = #{auditorAuditedGroupRelId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabAuditorAuditedGroupRel"> <insert id="insert" parameterType="com.gic.auth.entity.TabAuditorAuditedGroupRel">
insert into tab_auditor_audited_group_rel (auditor_audited_group_rel_id, enterprise_id, insert into tab_auditor_audited_group_rel (auditor_audited_group_rel_id, enterprise_id,
auditor_id, audited_group_id, status, auditor_id, audited_group_id, delete_flag,
create_time, update_time) create_time, update_time)
values (#{auditorAuditedGroupRelId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, values (#{auditorAuditedGroupRelId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{auditorId,jdbcType=INTEGER}, #{auditedGroupId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{auditorId,jdbcType=INTEGER}, #{auditedGroupId,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabAuditorAuditedGroupRel"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabAuditorAuditedGroupRel">
...@@ -47,8 +44,8 @@ ...@@ -47,8 +44,8 @@
<if test="auditedGroupId != null"> <if test="auditedGroupId != null">
audited_group_id, audited_group_id,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
...@@ -70,8 +67,8 @@ ...@@ -70,8 +67,8 @@
<if test="auditedGroupId != null"> <if test="auditedGroupId != null">
#{auditedGroupId,jdbcType=INTEGER}, #{auditedGroupId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
...@@ -93,8 +90,8 @@ ...@@ -93,8 +90,8 @@
<if test="auditedGroupId != null"> <if test="auditedGroupId != null">
audited_group_id = #{auditedGroupId,jdbcType=INTEGER}, audited_group_id = #{auditedGroupId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -110,35 +107,35 @@ ...@@ -110,35 +107,35 @@
set enterprise_id = #{enterpriseId,jdbcType=INTEGER}, set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
auditor_id = #{auditorId,jdbcType=INTEGER}, auditor_id = #{auditorId,jdbcType=INTEGER},
audited_group_id = #{auditedGroupId,jdbcType=INTEGER}, audited_group_id = #{auditedGroupId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where auditor_audited_group_rel_id = #{auditorAuditedGroupRelId,jdbcType=INTEGER} where auditor_audited_group_rel_id = #{auditorAuditedGroupRelId,jdbcType=INTEGER}
</update> </update>
<update id="delRel"> <update id="delRel">
update tab_auditor_audited_group_rel update tab_auditor_audited_group_rel
set status = 0 set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where audited_group_id = #{auditedGroupId} where audited_group_id = #{auditedGroupId}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</update> </update>
<update id="delByAuditorId"> <update id="delByAuditorId">
update tab_auditor_audited_group_rel update tab_auditor_audited_group_rel
set status = 0 set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where auditor_id = #{auditorId} where auditor_id = #{auditorId}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</update> </update>
<insert id="insertSelectiveByNotExist"> <insert id="insertSelectiveByNotExist">
INSERT INTO tab_auditor_audited_group_rel ( INSERT INTO tab_auditor_audited_group_rel (
enterprise_id, enterprise_id,
auditor_id, auditor_id,
audited_group_id, audited_group_id,
status, delete_flag,
create_time create_time
) SELECT ) SELECT
#{enterpriseId}, #{enterpriseId},
#{auditorId}, #{auditorId},
#{auditedGroupId}, #{auditedGroupId},
#{status}, #{deleteFlag},
#{createTime} #{createTime}
FROM FROM
DUAL DUAL
...@@ -156,7 +153,7 @@ ...@@ -156,7 +153,7 @@
</insert> </insert>
<update id="updateStatusByAuditedGroupIds"> <update id="updateStatusByAuditedGroupIds">
update tab_auditor_audited_group_rel update tab_auditor_audited_group_rel
set status = 1 set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
where auditor_id = #{auditorId} where auditor_id = #{auditorId}
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
<if test="null != ids"> <if test="null != ids">
...@@ -170,7 +167,7 @@ ...@@ -170,7 +167,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_auditor_audited_group_rel from tab_auditor_audited_group_rel
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="auditorId != null "> <if test="auditorId != null ">
and auditor_id = #{auditorId} and auditor_id = #{auditorId}
</if> </if>
...@@ -189,7 +186,7 @@ ...@@ -189,7 +186,7 @@
auditor_id auditorId, count(1) auditedGroupCount auditor_id auditorId, count(1) auditedGroupCount
from from
tab_auditor_audited_group_rel tab_auditor_audited_group_rel
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="null != ids"> <if test="null != ids">
and auditor_id in and auditor_id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")"> <foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
...@@ -202,7 +199,7 @@ ...@@ -202,7 +199,7 @@
select select
auditor_id auditor_id
from tab_auditor_audited_group_rel from tab_auditor_audited_group_rel
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="enterpriseId != null "> <if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
</if> </if>
......
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
<result column="user_id" jdbcType="INTEGER" property="userId" /> <result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="openid" jdbcType="VARCHAR" property="openid" /> <result column="openid" jdbcType="VARCHAR" property="openid" />
<result column="is_use" jdbcType="INTEGER" property="isUse" /> <result column="is_use" jdbcType="INTEGER" property="isUse" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
auditor_id, enterprise_id, auditor_name, phone, user_id, openid, is_use, status, auditor_id, enterprise_id, auditor_name, phone, user_id, openid, is_use, delete_flag,
create_time, update_time create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
...@@ -23,18 +23,15 @@ ...@@ -23,18 +23,15 @@
from tab_auditor from tab_auditor
where auditor_id = #{auditorId,jdbcType=INTEGER} where auditor_id = #{auditorId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_auditor
where auditor_id = #{auditorId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabAuditor"> <insert id="insert" parameterType="com.gic.auth.entity.TabAuditor">
insert into tab_auditor (auditor_id, enterprise_id, auditor_name, insert into tab_auditor (auditor_id, enterprise_id, auditor_name,
phone, user_id, openid, phone, user_id, openid,
is_use, status, create_time, is_use, delete_flag, create_time,
update_time) update_time)
values (#{auditorId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{auditorName,jdbcType=VARCHAR}, values (#{auditorId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{auditorName,jdbcType=VARCHAR},
#{phone,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER}, #{openid,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER}, #{openid,jdbcType=VARCHAR},
#{isUse,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{isUse,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}) #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabAuditor"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabAuditor">
...@@ -64,8 +61,8 @@ ...@@ -64,8 +61,8 @@
<if test="isUse != null"> <if test="isUse != null">
is_use, is_use,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
...@@ -96,8 +93,8 @@ ...@@ -96,8 +93,8 @@
<if test="isUse != null"> <if test="isUse != null">
#{isUse,jdbcType=INTEGER}, #{isUse,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
...@@ -128,8 +125,8 @@ ...@@ -128,8 +125,8 @@
<if test="isUse != null"> <if test="isUse != null">
is_use = #{isUse,jdbcType=INTEGER}, is_use = #{isUse,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -148,7 +145,7 @@ ...@@ -148,7 +145,7 @@
user_id = #{userId,jdbcType=INTEGER}, user_id = #{userId,jdbcType=INTEGER},
openid = #{openid,jdbcType=VARCHAR}, openid = #{openid,jdbcType=VARCHAR},
is_use = #{isUse,jdbcType=INTEGER}, is_use = #{isUse,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where auditor_id = #{auditorId,jdbcType=INTEGER} where auditor_id = #{auditorId,jdbcType=INTEGER}
...@@ -157,7 +154,7 @@ ...@@ -157,7 +154,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_auditor from tab_auditor
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="phone != null and phone != '' "> <if test="phone != null and phone != '' ">
and phone = #{phone} and phone = #{phone}
</if> </if>
...@@ -179,13 +176,13 @@ ...@@ -179,13 +176,13 @@
limit 1 limit 1
</select> </select>
<update id="delAuditor"> <update id="delAuditor">
update tab_auditor set status = 0 where status = 1 and auditor_id = #{auditorId} update tab_auditor set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS} where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS} and auditor_id = #{auditorId}
</update> </update>
<select id="listAuditor" resultMap="BaseResultMap"> <select id="listAuditor" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_auditor from tab_auditor
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="auditorName != null and auditorName != '' "> <if test="auditorName != null and auditorName != '' ">
and auditor_name like concat('%', #{auditorName}, '%') and auditor_name like concat('%', #{auditorName}, '%')
</if> </if>
...@@ -213,7 +210,7 @@ ...@@ -213,7 +210,7 @@
</if> </if>
</where> </where>
and is_use = 1 and is_use = 1
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
limit 1 limit 1
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" /> <result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="auditor_id" jdbcType="INTEGER" property="auditorId" /> <result column="auditor_id" jdbcType="INTEGER" property="auditorId" />
<result column="project_item_id" jdbcType="INTEGER" property="projectItemId" /> <result column="project_item_id" jdbcType="INTEGER" property="projectItemId" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
auditor_project_item_rel_id, enterprise_id, auditor_id, project_item_id, status, auditor_project_item_rel_id, enterprise_id, auditor_id, project_item_id, delete_flag,
create_time, update_time create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
...@@ -20,16 +20,13 @@ ...@@ -20,16 +20,13 @@
from tab_auditor_project_item_rel from tab_auditor_project_item_rel
where auditor_project_item_rel_id = #{auditorProjectItemRelId,jdbcType=INTEGER} where auditor_project_item_rel_id = #{auditorProjectItemRelId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_auditor_project_item_rel
where auditor_project_item_rel_id = #{auditorProjectItemRelId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabAuditorProjectItemRel"> <insert id="insert" parameterType="com.gic.auth.entity.TabAuditorProjectItemRel">
insert into tab_auditor_project_item_rel (auditor_project_item_rel_id, enterprise_id, insert into tab_auditor_project_item_rel (auditor_project_item_rel_id, enterprise_id,
auditor_id, project_item_id, status, auditor_id, project_item_id, delete_flag,
create_time, update_time) create_time, update_time)
values (#{auditorProjectItemRelId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, values (#{auditorProjectItemRelId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{auditorId,jdbcType=INTEGER}, #{projectItemId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{auditorId,jdbcType=INTEGER}, #{projectItemId,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabAuditorProjectItemRel"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabAuditorProjectItemRel">
...@@ -47,8 +44,8 @@ ...@@ -47,8 +44,8 @@
<if test="projectItemId != null"> <if test="projectItemId != null">
project_item_id, project_item_id,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
...@@ -70,8 +67,8 @@ ...@@ -70,8 +67,8 @@
<if test="projectItemId != null"> <if test="projectItemId != null">
#{projectItemId,jdbcType=INTEGER}, #{projectItemId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
...@@ -93,8 +90,8 @@ ...@@ -93,8 +90,8 @@
<if test="projectItemId != null"> <if test="projectItemId != null">
project_item_id = #{projectItemId,jdbcType=INTEGER}, project_item_id = #{projectItemId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -110,21 +107,21 @@ ...@@ -110,21 +107,21 @@
set enterprise_id = #{enterpriseId,jdbcType=INTEGER}, set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
auditor_id = #{auditorId,jdbcType=INTEGER}, auditor_id = #{auditorId,jdbcType=INTEGER},
project_item_id = #{projectItemId,jdbcType=INTEGER}, project_item_id = #{projectItemId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where auditor_project_item_rel_id = #{auditorProjectItemRelId,jdbcType=INTEGER} where auditor_project_item_rel_id = #{auditorProjectItemRelId,jdbcType=INTEGER}
</update> </update>
<update id="delByAuditorId"> <update id="delByAuditorId">
update tab_auditor_project_item_rel update tab_auditor_project_item_rel
set status = 0 set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and auditor_id = #{auditorId} and auditor_id = #{auditorId}
</update> </update>
<update id="delRelByProjectItemId"> <update id="delRelByProjectItemId">
update tab_auditor_project_item_rel update tab_auditor_project_item_rel
set status = 0 set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and project_item_id = #{projectItemId} and project_item_id = #{projectItemId}
</update> </update>
<insert id="insertSelectiveByNotExist"> <insert id="insertSelectiveByNotExist">
...@@ -132,13 +129,13 @@ ...@@ -132,13 +129,13 @@
enterprise_id, enterprise_id,
auditor_id, auditor_id,
project_item_id, project_item_id,
status, delete_flag,
create_time create_time
) SELECT ) SELECT
#{enterpriseId}, #{enterpriseId},
#{auditorId}, #{auditorId},
#{projectItemId}, #{projectItemId},
#{status}, #{deleteFlag},
#{createTime} #{createTime}
FROM FROM
DUAL DUAL
...@@ -156,7 +153,7 @@ ...@@ -156,7 +153,7 @@
</insert> </insert>
<update id="updateStatusByProjectItemIds"> <update id="updateStatusByProjectItemIds">
update tab_auditor_project_item_rel update tab_auditor_project_item_rel
set status = 1 set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
where auditor_id = #{auditorId} where auditor_id = #{auditorId}
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
<if test="null != ids"> <if test="null != ids">
...@@ -170,7 +167,7 @@ ...@@ -170,7 +167,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_auditor_project_item_rel from tab_auditor_project_item_rel
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="auditorId != null "> <if test="auditorId != null ">
and auditor_id = #{auditorId} and auditor_id = #{auditorId}
</if> </if>
...@@ -180,7 +177,7 @@ ...@@ -180,7 +177,7 @@
select select
auditor_id auditorId, count(1) projectItemCount auditor_id auditorId, count(1) projectItemCount
from tab_auditor_project_item_rel from tab_auditor_project_item_rel
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="null != ids"> <if test="null != ids">
and auditor_id in and auditor_id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")"> <foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
...@@ -193,7 +190,7 @@ ...@@ -193,7 +190,7 @@
select select
auditor_id auditor_id
from tab_auditor_project_item_rel from tab_auditor_project_item_rel
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="enterpriseId != null "> <if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
</if> </if>
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
<id column="account_group_id" jdbcType="INTEGER" property="accountGroupId" /> <id column="account_group_id" jdbcType="INTEGER" property="accountGroupId" />
<result column="account_group_name" jdbcType="VARCHAR" property="accountGroupName" /> <result column="account_group_name" jdbcType="VARCHAR" property="accountGroupName" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" /> <result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="sort" jdbcType="INTEGER" property="sort" /> <result column="sort" jdbcType="INTEGER" property="sort" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
account_group_id, account_group_name, enterprise_id, status, sort, create_time, update_time account_group_id, account_group_name, enterprise_id, delete_flag, sort, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
...@@ -19,16 +19,13 @@ ...@@ -19,16 +19,13 @@
from tab_sys_account_group from tab_sys_account_group
where account_group_id = #{accountGroupId,jdbcType=INTEGER} where account_group_id = #{accountGroupId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_account_group
where account_group_id = #{accountGroupId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysAccountGroup" useGeneratedKeys="true" keyProperty="accountGroupId"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysAccountGroup" useGeneratedKeys="true" keyProperty="accountGroupId">
insert into tab_sys_account_group (account_group_id, account_group_name, insert into tab_sys_account_group (account_group_id, account_group_name,
enterprise_id, status, sort, enterprise_id, delete_flag, sort,
create_time, update_time) create_time, update_time)
values (#{accountGroupId,jdbcType=INTEGER}, #{accountGroupName,jdbcType=VARCHAR}, values (#{accountGroupId,jdbcType=INTEGER}, #{accountGroupName,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysAccountGroup"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysAccountGroup">
...@@ -43,8 +40,8 @@ ...@@ -43,8 +40,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id, enterprise_id,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="sort != null"> <if test="sort != null">
sort, sort,
...@@ -66,8 +63,8 @@ ...@@ -66,8 +63,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="sort != null"> <if test="sort != null">
#{sort,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
...@@ -89,8 +86,8 @@ ...@@ -89,8 +86,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="sort != null"> <if test="sort != null">
sort = #{sort,jdbcType=INTEGER}, sort = #{sort,jdbcType=INTEGER},
...@@ -108,7 +105,7 @@ ...@@ -108,7 +105,7 @@
update tab_sys_account_group update tab_sys_account_group
set account_group_name = #{accountGroupName,jdbcType=VARCHAR}, set account_group_name = #{accountGroupName,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER}, sort = #{sort,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
...@@ -119,14 +116,14 @@ ...@@ -119,14 +116,14 @@
SELECT ifnull(max(sort), 0) SELECT ifnull(max(sort), 0)
from tab_sys_account_group from tab_sys_account_group
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
</select> </select>
<select id="countByAccountGroupName" resultType="int"> <select id="countByAccountGroupName" resultType="int">
SELECT count(1) SELECT count(1)
from tab_sys_account_group from tab_sys_account_group
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
<if test="accountGroupId != null"> <if test="accountGroupId != null">
and account_group_id &lt;&gt; #{accountGroupId} and account_group_id &lt;&gt; #{accountGroupId}
...@@ -137,7 +134,7 @@ ...@@ -137,7 +134,7 @@
<select id="listAccountGroupByEnterpriseId" resultMap="BaseResultMap"> <select id="listAccountGroupByEnterpriseId" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" /> SELECT <include refid="Base_Column_List" />
from tab_sys_account_group from tab_sys_account_group
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
order by sort order by sort
</select> </select>
...@@ -145,7 +142,7 @@ ...@@ -145,7 +142,7 @@
<select id="listByIdList" resultMap="BaseResultMap"> <select id="listByIdList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" /> SELECT <include refid="Base_Column_List" />
from tab_sys_account_group from tab_sys_account_group
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="list != null and list.size() > 0"> <if test="list != null and list.size() > 0">
and account_group_id in and account_group_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
......
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
<result column="account_group_id" jdbcType="INTEGER" property="accountGroupId" /> <result column="account_group_id" jdbcType="INTEGER" property="accountGroupId" />
<result column="user_id" jdbcType="INTEGER" property="userId" /> <result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" /> <result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="type" jdbcType="INTEGER" property="type" /> <result column="type" jdbcType="INTEGER" property="type" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
account_group_rel_id, account_group_id, user_id, enterprise_id, status, type, create_time, account_group_rel_id, account_group_id, user_id, enterprise_id, delete_flag, type, create_time,
update_time update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
...@@ -21,17 +21,14 @@ ...@@ -21,17 +21,14 @@
from tab_sys_account_group_rel from tab_sys_account_group_rel
where account_group_rel_id = #{accountGroupRelId,jdbcType=INTEGER} where account_group_rel_id = #{accountGroupRelId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_account_group_rel
where account_group_rel_id = #{accountGroupRelId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysAccountGroupRel"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysAccountGroupRel">
insert into tab_sys_account_group_rel (account_group_rel_id, account_group_id, insert into tab_sys_account_group_rel (account_group_rel_id, account_group_id,
user_id, enterprise_id, status, user_id, enterprise_id, delete_flag,
type, create_time, update_time type, create_time, update_time
) )
values (#{accountGroupRelId,jdbcType=INTEGER}, #{accountGroupId,jdbcType=INTEGER}, values (#{accountGroupRelId,jdbcType=INTEGER}, #{accountGroupId,jdbcType=INTEGER},
#{userId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
#{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
) )
</insert> </insert>
...@@ -50,8 +47,8 @@ ...@@ -50,8 +47,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id, enterprise_id,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="type != null"> <if test="type != null">
type, type,
...@@ -76,8 +73,8 @@ ...@@ -76,8 +73,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="type != null"> <if test="type != null">
#{type,jdbcType=INTEGER}, #{type,jdbcType=INTEGER},
...@@ -102,8 +99,8 @@ ...@@ -102,8 +99,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="type != null"> <if test="type != null">
type = #{type,jdbcType=INTEGER}, type = #{type,jdbcType=INTEGER},
...@@ -122,7 +119,7 @@ ...@@ -122,7 +119,7 @@
set account_group_id = #{accountGroupId,jdbcType=INTEGER}, set account_group_id = #{accountGroupId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER}, user_id = #{userId,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER}, type = #{type,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
...@@ -131,14 +128,14 @@ ...@@ -131,14 +128,14 @@
<update id="deleteByAccountGroupId"> <update id="deleteByAccountGroupId">
update tab_sys_account_group_rel update tab_sys_account_group_rel
set status = 0 set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and account_group_id = #{accountGroupId} and account_group_id = #{accountGroupId}
</update> </update>
<insert id="insertForeach" parameterType="java.util.List"> <insert id="insertForeach" parameterType="java.util.List">
insert into tab_sys_account_group_rel (account_group_rel_id, account_group_id, insert into tab_sys_account_group_rel (account_group_rel_id, account_group_id,
user_id, enterprise_id, status, user_id, enterprise_id, delete_flag,
type, create_time, update_time type, create_time, update_time
) )
VALUES VALUES
...@@ -148,7 +145,7 @@ ...@@ -148,7 +145,7 @@
#{item.accountGroupId}, #{item.accountGroupId},
#{item.userId}, #{item.userId},
#{item.enterpriseId}, #{item.enterpriseId},
#{item.status}, #{item.deleteFlag},
#{item.type}, #{item.type},
#{item.createTime}, #{item.createTime},
#{item.updateTime} #{item.updateTime}
...@@ -158,16 +155,16 @@ ...@@ -158,16 +155,16 @@
<update id="deleteByUserId"> <update id="deleteByUserId">
update tab_sys_account_group_rel update tab_sys_account_group_rel
set status = 0 set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and user_id = #{userId} and user_id = #{userId}
and type = #{type} and type = #{type}
</update> </update>
<update id="deleteByUserIdList"> <update id="deleteByUserIdList">
update tab_sys_account_group_rel update tab_sys_account_group_rel
set status = 0 set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="userIdList != null and userIdList.size() > 0"> <if test="userIdList != null and userIdList.size() > 0">
and user_id in and user_id in
<foreach collection="userIdList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="userIdList" index="index" item="item" open="(" separator="," close=")">
...@@ -182,14 +179,14 @@ ...@@ -182,14 +179,14 @@
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_account_group_rel from tab_sys_account_group_rel
where user_id = #{userId} where user_id = #{userId}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and type = #{type} and type = #{type}
</select> </select>
<update id="deleteByAccountGroupIdAndUserId"> <update id="deleteByAccountGroupIdAndUserId">
update tab_sys_account_group_rel update tab_sys_account_group_rel
set status = 0 set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and user_id = #{userId} and user_id = #{userId}
and account_group_id = #{accountGroupId} and account_group_id = #{accountGroupId}
and type = #{type} and type = #{type}
...@@ -203,14 +200,14 @@ ...@@ -203,14 +200,14 @@
<if test="type != null"> <if test="type != null">
and type = #{type} and type = #{type}
</if> </if>
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select> </select>
<select id="groupByAccountGroupId" resultType="com.gic.auth.dto.AccountGroupListDTO"> <select id="groupByAccountGroupId" resultType="com.gic.auth.dto.AccountGroupListDTO">
select account_group_id accountGroupId, select account_group_id accountGroupId,
count(user_id) memberCount count(user_id) memberCount
from tab_sys_account_group_rel from tab_sys_account_group_rel
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="list != null and list.size() > 0"> <if test="list != null and list.size() > 0">
and account_group_id in and account_group_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
...@@ -226,7 +223,7 @@ ...@@ -226,7 +223,7 @@
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_account_group_rel from tab_sys_account_group_rel
where where
status = 1 delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="list != null and list.size() > 0"> <if test="list != null and list.size() > 0">
and account_group_id in and account_group_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
......
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
<result column="auth_code" jdbcType="VARCHAR" property="authCode" /> <result column="auth_code" jdbcType="VARCHAR" property="authCode" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" /> <result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="relation_id" jdbcType="INTEGER" property="relationId" /> <result column="relation_id" jdbcType="INTEGER" property="relationId" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="expiration_time" jdbcType="TIMESTAMP" property="expirationTime" /> <result column="expiration_time" jdbcType="TIMESTAMP" property="expirationTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
auth_code_id, auth_code, enterprise_id, relation_id, status, create_time, expiration_time, auth_code_id, auth_code, enterprise_id, relation_id, delete_flag, create_time, expiration_time,
update_time update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
...@@ -21,19 +21,16 @@ ...@@ -21,19 +21,16 @@
from tab_sys_auth_code from tab_sys_auth_code
where auth_code_id = #{authCodeId,jdbcType=INTEGER} where auth_code_id = #{authCodeId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_auth_code
where auth_code_id = #{authCodeId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysAuthCode"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysAuthCode">
<selectKey keyProperty="authCodeId" order="AFTER" resultType="java.lang.Integer"> <selectKey keyProperty="authCodeId" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into tab_sys_auth_code (auth_code_id, auth_code, enterprise_id, insert into tab_sys_auth_code (auth_code_id, auth_code, enterprise_id,
relation_id, status, create_time, relation_id, delete_flag, create_time,
expiration_time, update_time) expiration_time, update_time)
values (#{authCodeId,jdbcType=INTEGER}, #{authCode,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER}, values (#{authCodeId,jdbcType=INTEGER}, #{authCode,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER},
#{relationId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{relationId,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{expirationTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{expirationTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysAuthCode" useGeneratedKeys="true" keyProperty="authCodeId"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysAuthCode" useGeneratedKeys="true" keyProperty="authCodeId">
...@@ -51,8 +48,8 @@ ...@@ -51,8 +48,8 @@
<if test="relationId != null"> <if test="relationId != null">
relation_id, relation_id,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
...@@ -77,8 +74,8 @@ ...@@ -77,8 +74,8 @@
<if test="relationId != null"> <if test="relationId != null">
#{relationId,jdbcType=INTEGER}, #{relationId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
...@@ -103,8 +100,8 @@ ...@@ -103,8 +100,8 @@
<if test="relationId != null"> <if test="relationId != null">
relation_id = #{relationId,jdbcType=INTEGER}, relation_id = #{relationId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -123,7 +120,7 @@ ...@@ -123,7 +120,7 @@
set auth_code = #{authCode,jdbcType=VARCHAR}, set auth_code = #{authCode,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
relation_id = #{relationId,jdbcType=INTEGER}, relation_id = #{relationId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
expiration_time = #{expirationTime,jdbcType=TIMESTAMP}, expiration_time = #{expirationTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
...@@ -137,7 +134,7 @@ ...@@ -137,7 +134,7 @@
<if test="relationId != null"> <if test="relationId != null">
and relation_id = #{relationId} and relation_id = #{relationId}
</if> </if>
and status=1 and delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and expiration_time &gt;= now() and expiration_time &gt;= now()
order by create_time desc order by create_time desc
</select> </select>
......
...@@ -9,13 +9,13 @@ ...@@ -9,13 +9,13 @@
<result column="page_name" jdbcType="VARCHAR" property="pageName" /> <result column="page_name" jdbcType="VARCHAR" property="pageName" />
<result column="resource_detail" jdbcType="VARCHAR" property="resourceDetail" /> <result column="resource_detail" jdbcType="VARCHAR" property="resourceDetail" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" /> <result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
resource_id, resource_name, resource_code, resource_type, page_name, resource_detail, resource_id, resource_name, resource_code, resource_type, page_name, resource_detail,
enterprise_id, status, create_time, update_time enterprise_id, delete_flag, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
...@@ -23,18 +23,15 @@ ...@@ -23,18 +23,15 @@
from tab_sys_business_front_res from tab_sys_business_front_res
where resource_id = #{resourceId,jdbcType=INTEGER} where resource_id = #{resourceId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_business_front_res
where resource_id = #{resourceId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysBusinessFrontRes" useGeneratedKeys="true" keyProperty="resourceId"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysBusinessFrontRes" useGeneratedKeys="true" keyProperty="resourceId">
insert into tab_sys_business_front_res (resource_id, resource_name, resource_code, insert into tab_sys_business_front_res (resource_id, resource_name, resource_code,
resource_type, page_name, resource_detail, resource_type, page_name, resource_detail,
enterprise_id, status, create_time, enterprise_id, delete_flag, create_time,
update_time) update_time)
values (#{resourceId,jdbcType=INTEGER}, #{resourceName,jdbcType=VARCHAR}, #{resourceCode,jdbcType=VARCHAR}, values (#{resourceId,jdbcType=INTEGER}, #{resourceName,jdbcType=VARCHAR}, #{resourceCode,jdbcType=VARCHAR},
#{resourceType,jdbcType=INTEGER}, #{pageName,jdbcType=VARCHAR}, #{resourceDetail,jdbcType=VARCHAR}, #{resourceType,jdbcType=INTEGER}, #{pageName,jdbcType=VARCHAR}, #{resourceDetail,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}) #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysBusinessFrontRes"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysBusinessFrontRes">
...@@ -61,8 +58,8 @@ ...@@ -61,8 +58,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id, enterprise_id,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
...@@ -93,8 +90,8 @@ ...@@ -93,8 +90,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
...@@ -125,8 +122,8 @@ ...@@ -125,8 +122,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -145,7 +142,7 @@ ...@@ -145,7 +142,7 @@
page_name = #{pageName,jdbcType=VARCHAR}, page_name = #{pageName,jdbcType=VARCHAR},
resource_detail = #{resourceDetail,jdbcType=VARCHAR}, resource_detail = #{resourceDetail,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where resource_id = #{resourceId,jdbcType=INTEGER} where resource_id = #{resourceId,jdbcType=INTEGER}
...@@ -154,7 +151,7 @@ ...@@ -154,7 +151,7 @@
<select id="listByParam" resultMap="BaseResultMap"> <select id="listByParam" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include> select <include refid="Base_Column_List"></include>
from tab_sys_business_front_res from tab_sys_business_front_res
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="search != null and search != ''"> <if test="search != null and search != ''">
and (resource_name like concat('%', #{search}, '%') or page_name like concat('%', #{search}, '%') and (resource_name like concat('%', #{search}, '%') or page_name like concat('%', #{search}, '%')
or resource_detail like concat('%', #{search}, '%')) or resource_detail like concat('%', #{search}, '%'))
...@@ -167,7 +164,7 @@ ...@@ -167,7 +164,7 @@
<select id="listByCode" resultMap="BaseResultMap"> <select id="listByCode" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include> select <include refid="Base_Column_List"></include>
from tab_sys_business_front_res from tab_sys_business_front_res
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and resource_type = #{resourceType} and resource_type = #{resourceType}
and resource_code in and resource_code in
<foreach close=")" collection="codeList" index="index" item="item" open="(" separator=","> <foreach close=")" collection="codeList" index="index" item="item" open="(" separator=",">
...@@ -179,14 +176,14 @@ ...@@ -179,14 +176,14 @@
SELECT <include refid="Base_Column_List"></include> SELECT <include refid="Base_Column_List"></include>
from tab_sys_business_front_res from tab_sys_business_front_res
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
GROUP by resource_code GROUP by resource_code
</select> </select>
<select id="listByResourceCode" resultMap="BaseResultMap"> <select id="listByResourceCode" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include> select <include refid="Base_Column_List"></include>
from tab_sys_business_front_res from tab_sys_business_front_res
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and resource_code = #{resourceCode} and resource_code = #{resourceCode}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -12,13 +12,13 @@ ...@@ -12,13 +12,13 @@
<result column="creator" jdbcType="VARCHAR" property="creator" /> <result column="creator" jdbcType="VARCHAR" property="creator" />
<result column="resource_ids" jdbcType="VARCHAR" property="resourceIds" /> <result column="resource_ids" jdbcType="VARCHAR" property="resourceIds" />
<result column="sub_app_ids" jdbcType="VARCHAR" property="subAppIds" /> <result column="sub_app_ids" jdbcType="VARCHAR" property="subAppIds" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
collaborator_id, collaborator_name, enterprise_id, collaboration_enterprise_id, phone, collaborator_id, collaborator_name, enterprise_id, collaboration_enterprise_id, phone,
app_id, app_name, creator, resource_ids, sub_app_ids, status, create_time, update_time app_id, app_name, creator, resource_ids, sub_app_ids, delete_flag, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
...@@ -26,20 +26,17 @@ ...@@ -26,20 +26,17 @@
from tab_sys_collaborator from tab_sys_collaborator
where collaborator_id = #{collaboratorId,jdbcType=INTEGER} where collaborator_id = #{collaboratorId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_collaborator
where collaborator_id = #{collaboratorId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysCollaborator"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysCollaborator">
insert into tab_sys_collaborator (collaborator_id, collaborator_name, insert into tab_sys_collaborator (collaborator_id, collaborator_name,
enterprise_id, collaboration_enterprise_id, enterprise_id, collaboration_enterprise_id,
phone, app_id, app_name, phone, app_id, app_name,
creator, resource_ids, sub_app_ids, status, creator, resource_ids, sub_app_ids, delete_flag,
create_time, update_time) create_time, update_time)
values (#{collaboratorId,jdbcType=INTEGER}, #{collaboratorName,jdbcType=VARCHAR}, values (#{collaboratorId,jdbcType=INTEGER}, #{collaboratorName,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=INTEGER}, #{collaborationEnterpriseId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{collaborationEnterpriseId,jdbcType=INTEGER},
#{phone,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR}, #{appName,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR}, #{appName,jdbcType=VARCHAR},
#{creator,jdbcType=VARCHAR}, #{resourceIds,jdbcType=VARCHAR}, #{subAppIds,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{creator,jdbcType=VARCHAR}, #{resourceIds,jdbcType=VARCHAR}, #{subAppIds,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysCollaborator" useGeneratedKeys="true" keyProperty="collaboratorId"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysCollaborator" useGeneratedKeys="true" keyProperty="collaboratorId">
...@@ -75,8 +72,8 @@ ...@@ -75,8 +72,8 @@
<if test="subAppIds != null"> <if test="subAppIds != null">
sub_app_ids, sub_app_ids,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
...@@ -116,8 +113,8 @@ ...@@ -116,8 +113,8 @@
<if test="subAppIds != null"> <if test="subAppIds != null">
#{subAppIds,jdbcType=VARCHAR}, #{subAppIds,jdbcType=VARCHAR},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
...@@ -157,8 +154,8 @@ ...@@ -157,8 +154,8 @@
<if test="subAppIds != null"> <if test="subAppIds != null">
sub_app_ids = #{subAppIds,jdbcType=VARCHAR}, sub_app_ids = #{subAppIds,jdbcType=VARCHAR},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -180,7 +177,7 @@ ...@@ -180,7 +177,7 @@
creator = #{creator,jdbcType=VARCHAR}, creator = #{creator,jdbcType=VARCHAR},
resource_ids = #{resourceIds,jdbcType=VARCHAR}, resource_ids = #{resourceIds,jdbcType=VARCHAR},
sub_app_ids = #{subAppIds,jdbcType=VARCHAR}, sub_app_ids = #{subAppIds,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where collaborator_id = #{collaboratorId,jdbcType=INTEGER} where collaborator_id = #{collaboratorId,jdbcType=INTEGER}
...@@ -197,7 +194,7 @@ ...@@ -197,7 +194,7 @@
a.app_id appId, a.app_id appId,
a.app_name appName, a.app_name appName,
a.creator, a.creator,
a.status, a.delete_flag deleteFlag,
a.create_time createTime a.create_time createTime
from tab_sys_collaborator a from tab_sys_collaborator a
...@@ -209,8 +206,8 @@ ...@@ -209,8 +206,8 @@
<if test="appId != null and appId != '' "> <if test="appId != null and appId != '' ">
and a.app_id in (${appId}) and a.app_id in (${appId})
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
and a.status = #{status} and a.delete_flag = #{deleteFlag}
</if> </if>
<if test="collaboratorIdList != null and collaboratorIdList.size() > 0"> <if test="collaboratorIdList != null and collaboratorIdList.size() > 0">
and a.collaborator_id in and a.collaborator_id in
...@@ -254,15 +251,15 @@ ...@@ -254,15 +251,15 @@
where collaboration_enterprise_id = #{enterpriseId} where collaboration_enterprise_id = #{enterpriseId}
and phone = #{phone} and phone = #{phone}
and app_id = #{appId} and app_id = #{appId}
and status != 0 and delete_flag != ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
limit 1 limit 1
</select> </select>
<update id="deleteByPhoneAndAppId"> <update id="deleteByPhoneAndAppId">
update tab_sys_collaborator set status = 0, update_time = now() update tab_sys_collaborator set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}, update_time = now()
where collaboration_enterprise_id = #{enterpriseId} where collaboration_enterprise_id = #{enterpriseId}
and phone = #{phone} and phone = #{phone}
and app_id = #{appId} and app_id = #{appId}
and status != 0 and delete_flag != ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
<id column="collaborator_role_rel_id" jdbcType="INTEGER" property="collaboratorRoleRelId" /> <id column="collaborator_role_rel_id" jdbcType="INTEGER" property="collaboratorRoleRelId" />
<result column="collaborator_id" jdbcType="INTEGER" property="collaboratorId" /> <result column="collaborator_id" jdbcType="INTEGER" property="collaboratorId" />
<result column="menu_id" jdbcType="INTEGER" property="menuId" /> <result column="menu_id" jdbcType="INTEGER" property="menuId" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
collaborator_role_rel_id, collaborator_id, menu_id, status, create_time, update_time collaborator_role_rel_id, collaborator_id, menu_id, delete_flag, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
...@@ -18,16 +18,13 @@ ...@@ -18,16 +18,13 @@
from tab_sys_collaborator_role_rel from tab_sys_collaborator_role_rel
where collaborator_role_rel_id = #{collaboratorRoleRelId,jdbcType=INTEGER} where collaborator_role_rel_id = #{collaboratorRoleRelId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_collaborator_role_rel
where collaborator_role_rel_id = #{collaboratorRoleRelId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysCollaboratorRoleRel"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysCollaboratorRoleRel">
insert into tab_sys_collaborator_role_rel (collaborator_role_rel_id, collaborator_id, insert into tab_sys_collaborator_role_rel (collaborator_role_rel_id, collaborator_id,
menu_id, status, create_time, menu_id, delete_flag, create_time,
update_time) update_time)
values (#{collaboratorRoleRelId,jdbcType=INTEGER}, #{collaboratorId,jdbcType=INTEGER}, values (#{collaboratorRoleRelId,jdbcType=INTEGER}, #{collaboratorId,jdbcType=INTEGER},
#{menuId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{menuId,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}) #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysCollaboratorRoleRel"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysCollaboratorRoleRel">
...@@ -42,8 +39,8 @@ ...@@ -42,8 +39,8 @@
<if test="menuId != null"> <if test="menuId != null">
menu_id, menu_id,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
...@@ -62,8 +59,8 @@ ...@@ -62,8 +59,8 @@
<if test="menuId != null"> <if test="menuId != null">
#{menuId,jdbcType=INTEGER}, #{menuId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
...@@ -82,8 +79,8 @@ ...@@ -82,8 +79,8 @@
<if test="menuId != null"> <if test="menuId != null">
menu_id = #{menuId,jdbcType=INTEGER}, menu_id = #{menuId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -98,7 +95,7 @@ ...@@ -98,7 +95,7 @@
update tab_sys_collaborator_role_rel update tab_sys_collaborator_role_rel
set collaborator_id = #{collaboratorId,jdbcType=INTEGER}, set collaborator_id = #{collaboratorId,jdbcType=INTEGER},
menu_id = #{menuId,jdbcType=INTEGER}, menu_id = #{menuId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where collaborator_role_rel_id = #{collaboratorRoleRelId,jdbcType=INTEGER} where collaborator_role_rel_id = #{collaboratorRoleRelId,jdbcType=INTEGER}
...@@ -106,7 +103,7 @@ ...@@ -106,7 +103,7 @@
<insert id="saveFetch" parameterType="java.util.List"> <insert id="saveFetch" parameterType="java.util.List">
insert into tab_sys_collaborator_role_rel (collaborator_role_rel_id, collaborator_id, insert into tab_sys_collaborator_role_rel (collaborator_role_rel_id, collaborator_id,
menu_id, status, create_time, menu_id, delete_flag, create_time,
update_time) update_time)
VALUES VALUES
<foreach collection="list" item="item" index="index" separator=","> <foreach collection="list" item="item" index="index" separator=",">
...@@ -114,7 +111,7 @@ ...@@ -114,7 +111,7 @@
#{item.collaboratorRoleRelId}, #{item.collaboratorRoleRelId},
#{item.collaboratorId}, #{item.collaboratorId},
#{item.menuId}, #{item.menuId},
#{item.status}, #{item.deleteFlag},
#{item.createTime}, #{item.createTime},
#{item.updateTime} #{item.updateTime}
) )
...@@ -122,9 +119,9 @@ ...@@ -122,9 +119,9 @@
</insert> </insert>
<update id="deleteByCollaboratorId"> <update id="deleteByCollaboratorId">
update tab_sys_collaborator_role_rel set status = 0 update tab_sys_collaborator_role_rel set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and collaborator_id = #{collaboratorId} and collaborator_id = #{collaboratorId}
</update> </update>
...@@ -132,7 +129,7 @@ ...@@ -132,7 +129,7 @@
SELECT <include refid="Base_Column_List"></include> SELECT <include refid="Base_Column_List"></include>
from tab_sys_collaborator_role_rel from tab_sys_collaborator_role_rel
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and collaborator_id = #{collaboratorId} and collaborator_id = #{collaboratorId}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -8,13 +8,13 @@ ...@@ -8,13 +8,13 @@
<result column="depart_name" jdbcType="VARCHAR" property="departName" /> <result column="depart_name" jdbcType="VARCHAR" property="departName" />
<result column="position_code" jdbcType="VARCHAR" property="positionCode" /> <result column="position_code" jdbcType="VARCHAR" property="positionCode" />
<result column="position_name" jdbcType="VARCHAR" property="positionName" /> <result column="position_name" jdbcType="VARCHAR" property="positionName" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
menu_depart_id, menu_code, depart_code, depart_name, position_code, position_name, menu_depart_id, menu_code, depart_code, depart_name, position_code, position_name,
status, create_time, update_time delete_flag, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
...@@ -22,18 +22,15 @@ ...@@ -22,18 +22,15 @@
from tab_sys_menu_auth_depart from tab_sys_menu_auth_depart
where menu_depart_id = #{menuDepartId,jdbcType=INTEGER} where menu_depart_id = #{menuDepartId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_menu_auth_depart
where menu_depart_id = #{menuDepartId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysMenuAuthDepart"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysMenuAuthDepart">
insert into tab_sys_menu_auth_depart (menu_depart_id, menu_code, depart_code, insert into tab_sys_menu_auth_depart (menu_depart_id, menu_code, depart_code,
depart_name, position_code, position_name, depart_name, position_code, position_name,
status, create_time, update_time delete_flag, create_time, update_time
) )
values (#{menuDepartId,jdbcType=INTEGER}, #{menuCode,jdbcType=VARCHAR}, #{departCode,jdbcType=VARCHAR}, values (#{menuDepartId,jdbcType=INTEGER}, #{menuCode,jdbcType=VARCHAR}, #{departCode,jdbcType=VARCHAR},
#{departName,jdbcType=VARCHAR}, #{positionCode,jdbcType=VARCHAR}, #{positionName,jdbcType=VARCHAR}, #{departName,jdbcType=VARCHAR}, #{positionCode,jdbcType=VARCHAR}, #{positionName,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} #{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysMenuAuthDepart"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysMenuAuthDepart">
...@@ -57,8 +54,8 @@ ...@@ -57,8 +54,8 @@
<if test="positionName != null"> <if test="positionName != null">
position_name, position_name,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
...@@ -86,8 +83,8 @@ ...@@ -86,8 +83,8 @@
<if test="positionName != null"> <if test="positionName != null">
#{positionName,jdbcType=VARCHAR}, #{positionName,jdbcType=VARCHAR},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
...@@ -115,8 +112,8 @@ ...@@ -115,8 +112,8 @@
<if test="positionName != null"> <if test="positionName != null">
position_name = #{positionName,jdbcType=VARCHAR}, position_name = #{positionName,jdbcType=VARCHAR},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -134,7 +131,7 @@ ...@@ -134,7 +131,7 @@
depart_name = #{departName,jdbcType=VARCHAR}, depart_name = #{departName,jdbcType=VARCHAR},
position_code = #{positionCode,jdbcType=VARCHAR}, position_code = #{positionCode,jdbcType=VARCHAR},
position_name = #{positionName,jdbcType=VARCHAR}, position_name = #{positionName,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where menu_depart_id = #{menuDepartId,jdbcType=INTEGER} where menu_depart_id = #{menuDepartId,jdbcType=INTEGER}
...@@ -143,7 +140,7 @@ ...@@ -143,7 +140,7 @@
<insert id="saveFetch" parameterType="java.util.List"> <insert id="saveFetch" parameterType="java.util.List">
insert into tab_sys_menu_auth_depart (menu_depart_id, menu_code, depart_code, insert into tab_sys_menu_auth_depart (menu_depart_id, menu_code, depart_code,
depart_name, position_code, position_name, depart_name, position_code, position_name,
status, create_time, update_time delete_flag, create_time, update_time
) )
values values
<foreach collection="list" item="item" index="index" separator=","> <foreach collection="list" item="item" index="index" separator=",">
...@@ -154,7 +151,7 @@ ...@@ -154,7 +151,7 @@
#{item.departName}, #{item.departName},
#{item.positionCode}, #{item.positionCode},
#{item.positionName}, #{item.positionName},
#{item.status}, #{item.deleteFlag},
#{item.createTime}, #{item.createTime},
#{item.updateTime} #{item.updateTime}
) )
...@@ -162,8 +159,8 @@ ...@@ -162,8 +159,8 @@
</insert> </insert>
<update id="deleteByMenuCode"> <update id="deleteByMenuCode">
update tab_sys_menu_auth_depart set status = 0 update tab_sys_menu_auth_depart set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and menu_code = #{menuCode} and menu_code = #{menuCode}
</update> </update>
...@@ -173,7 +170,7 @@ ...@@ -173,7 +170,7 @@
from tab_sys_menu_auth_depart from tab_sys_menu_auth_depart
where menu_code = #{menuCode} where menu_code = #{menuCode}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select> </select>
<select id="listAllAuthDepart" resultMap="BaseResultMap"> <select id="listAllAuthDepart" resultMap="BaseResultMap">
...@@ -181,7 +178,7 @@ ...@@ -181,7 +178,7 @@
from tab_sys_menu_auth_depart from tab_sys_menu_auth_depart
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="list != null and list.size() > 0"> <if test="list != null and list.size() > 0">
and menu_code in and menu_code in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
<id column="menu_item_id" jdbcType="INTEGER" property="menuItemId" /> <id column="menu_item_id" jdbcType="INTEGER" property="menuItemId" />
<result column="menu_id" jdbcType="INTEGER" property="menuId" /> <result column="menu_id" jdbcType="INTEGER" property="menuId" />
<result column="item_id" jdbcType="INTEGER" property="itemId" /> <result column="item_id" jdbcType="INTEGER" property="itemId" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
menu_item_id, menu_id, item_id, status, create_time, update_time menu_item_id, menu_id, item_id, delete_flag, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
...@@ -18,16 +18,13 @@ ...@@ -18,16 +18,13 @@
from tab_sys_menu_item from tab_sys_menu_item
where menu_item_id = #{menuItemId,jdbcType=INTEGER} where menu_item_id = #{menuItemId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_menu_item
where menu_item_id = #{menuItemId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysMenuItem"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysMenuItem">
insert into tab_sys_menu_item (menu_item_id, menu_id, item_id, insert into tab_sys_menu_item (menu_item_id, menu_id, item_id,
status, create_time, update_time delete_flag, create_time, update_time
) )
values (#{menuItemId,jdbcType=INTEGER}, #{menuId,jdbcType=INTEGER}, #{itemId,jdbcType=INTEGER}, values (#{menuItemId,jdbcType=INTEGER}, #{menuId,jdbcType=INTEGER}, #{itemId,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} #{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysMenuItem"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysMenuItem">
...@@ -42,8 +39,8 @@ ...@@ -42,8 +39,8 @@
<if test="itemId != null"> <if test="itemId != null">
item_id, item_id,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
...@@ -62,8 +59,8 @@ ...@@ -62,8 +59,8 @@
<if test="itemId != null"> <if test="itemId != null">
#{itemId,jdbcType=INTEGER}, #{itemId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
...@@ -82,8 +79,8 @@ ...@@ -82,8 +79,8 @@
<if test="itemId != null"> <if test="itemId != null">
item_id = #{itemId,jdbcType=INTEGER}, item_id = #{itemId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -98,7 +95,7 @@ ...@@ -98,7 +95,7 @@
update tab_sys_menu_item update tab_sys_menu_item
set menu_id = #{menuId,jdbcType=INTEGER}, set menu_id = #{menuId,jdbcType=INTEGER},
item_id = #{itemId,jdbcType=INTEGER}, item_id = #{itemId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where menu_item_id = #{menuItemId,jdbcType=INTEGER} where menu_item_id = #{menuItemId,jdbcType=INTEGER}
...@@ -106,7 +103,7 @@ ...@@ -106,7 +103,7 @@
<insert id="insertForeach" parameterType="java.util.List"> <insert id="insertForeach" parameterType="java.util.List">
insert into tab_sys_menu_item (menu_item_id, menu_id, item_id, insert into tab_sys_menu_item (menu_item_id, menu_id, item_id,
status, create_time, update_time delete_flag, create_time, update_time
) )
values values
<foreach collection="list" item="item" index="index" separator=","> <foreach collection="list" item="item" index="index" separator=",">
...@@ -114,7 +111,7 @@ ...@@ -114,7 +111,7 @@
#{item.menuItemId}, #{item.menuItemId},
#{item.menuId}, #{item.menuId},
#{item.itemId}, #{item.itemId},
#{item.status}, #{item.deleteFlag},
#{item.createTime}, #{item.createTime},
#{item.updateTime} #{item.updateTime}
) )
...@@ -123,8 +120,8 @@ ...@@ -123,8 +120,8 @@
<update id="deleteByMenuId"> <update id="deleteByMenuId">
<if test="menuId != null"> <if test="menuId != null">
update tab_sys_menu_item set status = 0 update tab_sys_menu_item set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and menu_id = #{menuId} and menu_id = #{menuId}
</if> </if>
</update> </update>
...@@ -135,14 +132,14 @@ ...@@ -135,14 +132,14 @@
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_menu_item from tab_sys_menu_item
where menu_id = #{menuId} where menu_id = #{menuId}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select> </select>
<select id="listMenuItemByMenuIdList" resultMap="BaseResultMap"> <select id="listMenuItemByMenuIdList" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_menu_item from tab_sys_menu_item
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and menu_id in and menu_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
...@@ -153,7 +150,7 @@ ...@@ -153,7 +150,7 @@
select select
item_id item_id
from tab_sys_menu_item from tab_sys_menu_item
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
GROUP by item_id GROUP by item_id
</select> </select>
...@@ -161,7 +158,7 @@ ...@@ -161,7 +158,7 @@
select menu_id menuId, select menu_id menuId,
count(1) operationItemCount count(1) operationItemCount
from tab_sys_menu_item from tab_sys_menu_item
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and item_id = #{itemId} and item_id = #{itemId}
group by menu_id group by menu_id
</select> </select>
...@@ -169,8 +166,8 @@ ...@@ -169,8 +166,8 @@
<update id="deleteByMenuIdList"> <update id="deleteByMenuIdList">
<if test="list != null and list.size() > 0"> <if test="list != null and list.size() > 0">
update tab_sys_menu_item set status = 0 update tab_sys_menu_item set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and menu_id in and menu_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
...@@ -180,8 +177,8 @@ ...@@ -180,8 +177,8 @@
<update id="deleteByItemId"> <update id="deleteByItemId">
<if test="itemId != null"> <if test="itemId != null">
update tab_sys_menu_item set status = 0 update tab_sys_menu_item set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and item_id = #{itemId} and item_id = #{itemId}
</if> </if>
</update> </update>
...@@ -189,7 +186,7 @@ ...@@ -189,7 +186,7 @@
<select id="listByDev" resultMap="BaseResultMap"> <select id="listByDev" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include> select <include refid="Base_Column_List"></include>
from tab_sys_menu_item_dev from tab_sys_menu_item_dev
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and menu_id = #{menuId} and menu_id = #{menuId}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<result column="target" jdbcType="INTEGER" property="target" /> <result column="target" jdbcType="INTEGER" property="target" />
<result column="icon_url" jdbcType="VARCHAR" property="iconUrl" /> <result column="icon_url" jdbcType="VARCHAR" property="iconUrl" />
<result column="sort" jdbcType="INTEGER" property="sort" /> <result column="sort" jdbcType="INTEGER" property="sort" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="level" jdbcType="INTEGER" property="level" /> <result column="level" jdbcType="INTEGER" property="level" />
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<result column="platform_type" jdbcType="INTEGER" property="platformType" /> <result column="platform_type" jdbcType="INTEGER" property="platformType" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
menu_id, menu_name, project, menu_url, parent_id, target, icon_url, sort, status, menu_id, menu_name, project, menu_url, parent_id, target, icon_url, sort, delete_flag,
create_time, update_time, level, is_show, menu_code, parent_code, menu_version, menu_type, create_time, update_time, level, is_show, menu_code, parent_code, menu_version, menu_type,
menu_version_name, project_url_for_web, admin_only_sign, auth_type, platform_type menu_version_name, project_url_for_web, admin_only_sign, auth_type, platform_type
</sql> </sql>
...@@ -48,21 +48,18 @@ ...@@ -48,21 +48,18 @@
from tab_sys_menu from tab_sys_menu
where menu_id = #{menuId,jdbcType=INTEGER} where menu_id = #{menuId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_menu
where menu_id = #{menuId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysMenu"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysMenu">
insert into tab_sys_menu (menu_id, menu_name, project, insert into tab_sys_menu (menu_id, menu_name, project,
menu_url, parent_id, target, menu_url, parent_id, target,
icon_url, sort, status, icon_url, sort, delete_flag,
create_time, update_time, level, create_time, update_time, level,
is_show, menu_code, parent_code, is_show, menu_code, parent_code,
menu_version, menu_type, menu_version_name, menu_version, menu_type, menu_version_name,
project_url_for_web, admin_only_sign, auth_type, platform_type) project_url_for_web, admin_only_sign, auth_type, platform_type)
values (#{menuId,jdbcType=INTEGER}, #{menuName,jdbcType=VARCHAR}, #{project,jdbcType=VARCHAR}, values (#{menuId,jdbcType=INTEGER}, #{menuName,jdbcType=VARCHAR}, #{project,jdbcType=VARCHAR},
#{menuUrl,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER}, #{target,jdbcType=INTEGER}, #{menuUrl,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER}, #{target,jdbcType=INTEGER},
#{iconUrl,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{iconUrl,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{level,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{level,jdbcType=INTEGER},
#{isShow,jdbcType=INTEGER}, #{menuCode,jdbcType=VARCHAR}, #{parentCode,jdbcType=VARCHAR}, #{isShow,jdbcType=INTEGER}, #{menuCode,jdbcType=VARCHAR}, #{parentCode,jdbcType=VARCHAR},
#{menuVersion,jdbcType=VARCHAR}, #{menuType,jdbcType=INTEGER}, #{menuVersionName,jdbcType=VARCHAR}, #{menuVersion,jdbcType=VARCHAR}, #{menuType,jdbcType=INTEGER}, #{menuVersionName,jdbcType=VARCHAR},
...@@ -95,8 +92,8 @@ ...@@ -95,8 +92,8 @@
<if test="sort != null"> <if test="sort != null">
sort, sort,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
...@@ -163,8 +160,8 @@ ...@@ -163,8 +160,8 @@
<if test="sort != null"> <if test="sort != null">
#{sort,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
...@@ -231,8 +228,8 @@ ...@@ -231,8 +228,8 @@
<if test="sort != null"> <if test="sort != null">
sort = #{sort,jdbcType=INTEGER}, sort = #{sort,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -285,7 +282,7 @@ ...@@ -285,7 +282,7 @@
target = #{target,jdbcType=INTEGER}, target = #{target,jdbcType=INTEGER},
icon_url = #{iconUrl,jdbcType=VARCHAR}, icon_url = #{iconUrl,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER}, sort = #{sort,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
level = #{level,jdbcType=INTEGER}, level = #{level,jdbcType=INTEGER},
...@@ -306,7 +303,7 @@ ...@@ -306,7 +303,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_menu from tab_sys_menu
where status=1 where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="search != null and search != '' "> <if test="search != null and search != '' ">
and ( menu_name like concat('%', #{search}, '%') or menu_code like concat('%', #{search}, '%') ) and ( menu_name like concat('%', #{search}, '%') or menu_code like concat('%', #{search}, '%') )
</if> </if>
...@@ -320,7 +317,7 @@ ...@@ -320,7 +317,7 @@
<if test="menuType != null"> <if test="menuType != null">
and menu_type = #{menuType} and menu_type = #{menuType}
</if> </if>
<if test="menuType == null"> <if test="menuType == null and menuTypeList == null">
and menu_type != 2 and menu_type != 2
</if> </if>
<if test="level != null"> <if test="level != null">
...@@ -341,6 +338,12 @@ ...@@ -341,6 +338,12 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="menuTypeList != null and menuTypeList.size() > 0">
and menu_type in
<foreach close=")" collection="menuTypeList" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
order by level,sort order by level,sort
</select> </select>
...@@ -349,7 +352,7 @@ ...@@ -349,7 +352,7 @@
select select
ifnull(max(sort), 0) ifnull(max(sort), 0)
from tab_sys_menu from tab_sys_menu
where status=1 where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and parent_id = #{parentId} and parent_id = #{parentId}
<if test="project != null"> <if test="project != null">
and project = #{project} and project = #{project}
...@@ -361,7 +364,7 @@ ...@@ -361,7 +364,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_menu from tab_sys_menu
where status=1 where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and parent_id = #{parentId} and parent_id = #{parentId}
and menu_type = 2 and menu_type = 2
order by sort order by sort
...@@ -371,7 +374,7 @@ ...@@ -371,7 +374,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_menu from tab_sys_menu
where status=1 where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and parent_id = #{parentId} and parent_id = #{parentId}
and project = #{project} and project = #{project}
order by sort order by sort
...@@ -381,7 +384,7 @@ ...@@ -381,7 +384,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_menu from tab_sys_menu
where status=1 where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="search != null and search != '' "> <if test="search != null and search != '' ">
and ( menu_name like concat('%', #{search}, '%') or menu_code like concat('%', #{search}, '%') or parent_code like concat('%', #{search}, '%') or menu_url like concat('%', #{search}, '%') ) and ( menu_name like concat('%', #{search}, '%') or menu_code like concat('%', #{search}, '%') or parent_code like concat('%', #{search}, '%') or menu_url like concat('%', #{search}, '%') )
</if> </if>
...@@ -400,7 +403,7 @@ ...@@ -400,7 +403,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_menu from tab_sys_menu
where status=1 where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="null != menuIdList and menuIdList.size() &gt; 0"> <if test="null != menuIdList and menuIdList.size() &gt; 0">
and menu_id in and menu_id in
<foreach close=")" collection="menuIdList" index="index" item="item" open="(" separator=","> <foreach close=")" collection="menuIdList" index="index" item="item" open="(" separator=",">
...@@ -413,7 +416,7 @@ ...@@ -413,7 +416,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_menu from tab_sys_menu
where status=1 where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="null != parentMenuIdList and parentMenuIdList.size() &gt; 0"> <if test="null != parentMenuIdList and parentMenuIdList.size() &gt; 0">
and parent_id in and parent_id in
<foreach close=")" collection="parentMenuIdList" index="index" item="item" open="(" separator=","> <foreach close=")" collection="parentMenuIdList" index="index" item="item" open="(" separator=",">
...@@ -426,7 +429,7 @@ ...@@ -426,7 +429,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_menu from tab_sys_menu
where status=1 where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="null != menuIdList and menuIdList.size() &gt; 0"> <if test="null != menuIdList and menuIdList.size() &gt; 0">
and menu_id in and menu_id in
<foreach close=")" collection="menuIdList" index="index" item="item" open="(" separator=","> <foreach close=")" collection="menuIdList" index="index" item="item" open="(" separator=",">
...@@ -442,9 +445,9 @@ ...@@ -442,9 +445,9 @@
select select
a.menu_id menuId, a.menu_id menuId,
a.menu_name menuName, a.menu_name menuName,
(select count(DISTINCT b.item_id) from tab_sys_menu_item b where a.menu_id = b.menu_id and b.status = 1 ) operationItemCount (select count(DISTINCT b.item_id) from tab_sys_menu_item b where a.menu_id = b.menu_id and b.delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS} ) operationItemCount
from tab_sys_menu a from tab_sys_menu a
where a.status=1 where a.delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and a.parent_id = #{menuId} and a.parent_id = #{menuId}
<include refid="role_filter" /> <include refid="role_filter" />
</select> </select>
...@@ -454,7 +457,7 @@ ...@@ -454,7 +457,7 @@
select select
count(1) count(1)
from tab_sys_menu from tab_sys_menu
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and parent_id = #{menuId} and parent_id = #{menuId}
</select> </select>
...@@ -462,7 +465,7 @@ ...@@ -462,7 +465,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_menu from tab_sys_menu
where status=1 where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="project != null"> <if test="project != null">
and project = #{project} and project = #{project}
</if> </if>
...@@ -486,7 +489,7 @@ ...@@ -486,7 +489,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_menu from tab_sys_menu
where status=1 where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and project != 'gic' and project != 'gic'
and platform_type = 0 and platform_type = 0
<include refid="tree_filter" /> <include refid="tree_filter" />
...@@ -502,7 +505,7 @@ ...@@ -502,7 +505,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_menu from tab_sys_menu
where status=1 where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and project != 'gic' and project != 'gic'
and platform_type = 0 and platform_type = 0
<include refid="tree_filter" /> <include refid="tree_filter" />
...@@ -529,7 +532,7 @@ ...@@ -529,7 +532,7 @@
<select id="countByMenuCode" resultType="int"> <select id="countByMenuCode" resultType="int">
SELECT count(1) from tab_sys_menu SELECT count(1) from tab_sys_menu
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and menu_code = #{menuCode} and menu_code = #{menuCode}
<if test="menuId != null"> <if test="menuId != null">
and menu_id &lt;&gt; #{menuId} and menu_id &lt;&gt; #{menuId}
...@@ -539,7 +542,7 @@ ...@@ -539,7 +542,7 @@
<select id="getMenuByMenuCode" resultMap="BaseResultMap"> <select id="getMenuByMenuCode" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include> select <include refid="Base_Column_List"></include>
from tab_sys_menu from tab_sys_menu
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and menu_code = #{menuCode} and menu_code = #{menuCode}
limit 1 limit 1
</select> </select>
...@@ -548,14 +551,14 @@ ...@@ -548,14 +551,14 @@
<update id="updateParentCodeByParentId"> <update id="updateParentCodeByParentId">
update tab_sys_menu set parent_code = #{parentCode} update tab_sys_menu set parent_code = #{parentCode}
where parent_id = #{parentId} where parent_id = #{parentId}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</update> </update>
<select id="listAdminOnlyOperationItem" resultMap="BaseResultMap"> <select id="listAdminOnlyOperationItem" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_menu from tab_sys_menu
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and admin_only_sign = 1 and admin_only_sign = 1
and menu_type = 2 and menu_type = 2
and platform_type = 0 and platform_type = 0
...@@ -564,8 +567,8 @@ ...@@ -564,8 +567,8 @@
<update id="deleteByMenuIdList"> <update id="deleteByMenuIdList">
<if test="list != null and list.size() > 0"> <if test="list != null and list.size() > 0">
update tab_sys_menu set status = 0 update tab_sys_menu set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and menu_id IN and menu_id IN
<foreach close=")" collection="list" index="index" item="item" open="(" separator=","> <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
#{item} #{item}
...@@ -575,10 +578,13 @@ ...@@ -575,10 +578,13 @@
<update id="deleteNotInApp"> <update id="deleteNotInApp">
<if test="list != null and list.size() > 0"> <if test="list != null and list.size() > 0">
update tab_sys_menu set status = 0 update tab_sys_menu set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and project != 'gic' and project != 'gic'
and platform_type = 0 and platform_type in
<foreach close=")" collection="platformTypeList" index="index" item="platformType" open="(" separator=",">
#{platformType}
</foreach>
and project NOT IN and project NOT IN
<foreach close=")" collection="list" index="index" item="item" open="(" separator=","> <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
#{item} #{item}
...@@ -589,7 +595,7 @@ ...@@ -589,7 +595,7 @@
<select id="listMenuTemp" resultMap="BaseResultMap"> <select id="listMenuTemp" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include> select <include refid="Base_Column_List"></include>
from tab_sys_menu_dev from tab_sys_menu_dev
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and project = #{project} and project = #{project}
and platform_type = 0 and platform_type = 0
</select> </select>
...@@ -597,14 +603,14 @@ ...@@ -597,14 +603,14 @@
<select id="listMenuTempByMenuCode" resultMap="BaseResultMap"> <select id="listMenuTempByMenuCode" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include> select <include refid="Base_Column_List"></include>
from tab_sys_menu_dev from tab_sys_menu_dev
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and parent_code = #{menuCode} and parent_code = #{menuCode}
</select> </select>
<select id="listMenuTempByMenuIdList" resultMap="BaseResultMap"> <select id="listMenuTempByMenuIdList" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include> select <include refid="Base_Column_List"></include>
from tab_sys_menu_dev from tab_sys_menu_dev
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and parent_id in and parent_id in
<foreach close=")" collection="list" index="index" item="item" open="(" separator=","> <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
#{item} #{item}
...@@ -617,14 +623,14 @@ ...@@ -617,14 +623,14 @@
FROM FROM
tab_sys_menu tab_sys_menu
WHERE WHERE
status = 1 delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and menu_code IN ( and menu_code IN (
SELECT SELECT
menu_code menu_code
FROM FROM
tab_sys_menu_dev tab_sys_menu_dev
WHERE WHERE
status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS} and
menu_id IN ( menu_id IN (
SELECT SELECT
item_id item_id
...@@ -632,7 +638,7 @@ ...@@ -632,7 +638,7 @@
tab_sys_menu_item_dev tab_sys_menu_item_dev
WHERE WHERE
menu_id = #{menuId} menu_id = #{menuId}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
) )
) )
</select> </select>
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
<result column="menu_id" jdbcType="INTEGER" property="menuId" /> <result column="menu_id" jdbcType="INTEGER" property="menuId" />
<result column="role_id" jdbcType="INTEGER" property="roleId" /> <result column="role_id" jdbcType="INTEGER" property="roleId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" /> <result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
menu_role_id, menu_id, role_id, enterprise_id, status, create_time, update_time menu_role_id, menu_id, role_id, enterprise_id, delete_flag, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
...@@ -19,16 +19,13 @@ ...@@ -19,16 +19,13 @@
from tab_sys_menu_role from tab_sys_menu_role
where menu_role_id = #{menuRoleId,jdbcType=INTEGER} where menu_role_id = #{menuRoleId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_menu_role
where menu_role_id = #{menuRoleId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysMenuRole"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysMenuRole">
insert into tab_sys_menu_role (menu_role_id, menu_id, role_id, insert into tab_sys_menu_role (menu_role_id, menu_id, role_id,
enterprise_id, status, create_time, enterprise_id, delete_flag, create_time,
update_time) update_time)
values (#{menuRoleId,jdbcType=INTEGER}, #{menuId,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}, values (#{menuRoleId,jdbcType=INTEGER}, #{menuId,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER},
#{enterpriseId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}) #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysMenuRole"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysMenuRole">
...@@ -46,8 +43,8 @@ ...@@ -46,8 +43,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id, enterprise_id,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
...@@ -69,8 +66,8 @@ ...@@ -69,8 +66,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
...@@ -92,8 +89,8 @@ ...@@ -92,8 +89,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -109,20 +106,21 @@ ...@@ -109,20 +106,21 @@
set menu_id = #{menuId,jdbcType=INTEGER}, set menu_id = #{menuId,jdbcType=INTEGER},
role_id = #{roleId,jdbcType=INTEGER}, role_id = #{roleId,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where menu_role_id = #{menuRoleId,jdbcType=INTEGER} where menu_role_id = #{menuRoleId,jdbcType=INTEGER}
</update> </update>
<delete id="deleteByRoleId"> <update id="deleteByRoleId">
DELETE FROM tab_sys_menu_role update tab_sys_menu_role set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where role_id = #{roleId} where role_id = #{roleId}
</delete> and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</update>
<insert id="insertForeach" parameterType="java.util.List"> <insert id="insertForeach" parameterType="java.util.List">
insert into tab_sys_menu_role (menu_role_id, menu_id, role_id, insert into tab_sys_menu_role (menu_role_id, menu_id, role_id,
enterprise_id, status, create_time, enterprise_id, delete_flag, create_time,
update_time) update_time)
values values
<foreach collection="list" item="item" index="index" separator=","> <foreach collection="list" item="item" index="index" separator=",">
...@@ -131,7 +129,7 @@ ...@@ -131,7 +129,7 @@
#{item.menuId}, #{item.menuId},
#{item.roleId}, #{item.roleId},
#{item.enterpriseId}, #{item.enterpriseId},
#{item.status}, #{item.deleteFlag},
#{item.createTime}, #{item.createTime},
#{item.updateTime} #{item.updateTime}
) )
...@@ -144,14 +142,14 @@ ...@@ -144,14 +142,14 @@
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_menu_role from tab_sys_menu_role
where role_id = #{roleId} where role_id = #{roleId}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select> </select>
<select id="listMenuRoleByRoleIdList" resultMap="BaseResultMap"> <select id="listMenuRoleByRoleIdList" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_menu_role from tab_sys_menu_role
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and role_id in and role_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
<id column="operation_user_id" jdbcType="INTEGER" property="operationUserId" /> <id column="operation_user_id" jdbcType="INTEGER" property="operationUserId" />
<result column="operation_user_name" jdbcType="VARCHAR" property="operationUserName" /> <result column="operation_user_name" jdbcType="VARCHAR" property="operationUserName" />
<result column="phone_number" jdbcType="VARCHAR" property="phoneNumber" /> <result column="phone_number" jdbcType="VARCHAR" property="phoneNumber" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" /> <result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="phone_area_code" jdbcType="VARCHAR" property="phoneAreaCode" /> <result column="phone_area_code" jdbcType="VARCHAR" property="phoneAreaCode" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
operation_user_id, operation_user_name, phone_number, status, create_time, update_time, operation_user_id, operation_user_name, phone_number, delete_flag, create_time, update_time,
enterprise_id, phone_area_code enterprise_id, phone_area_code
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
...@@ -21,17 +21,14 @@ ...@@ -21,17 +21,14 @@
from tab_sys_operation_user from tab_sys_operation_user
where operation_user_id = #{operationUserId,jdbcType=INTEGER} where operation_user_id = #{operationUserId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_operation_user
where operation_user_id = #{operationUserId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysOperationUser" useGeneratedKeys="true" keyProperty="operationUserId"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysOperationUser" useGeneratedKeys="true" keyProperty="operationUserId">
insert into tab_sys_operation_user (operation_user_id, operation_user_name, insert into tab_sys_operation_user (operation_user_id, operation_user_name,
phone_number, status, create_time, phone_number, delete_flag, create_time,
update_time, enterprise_id, phone_area_code update_time, enterprise_id, phone_area_code
) )
values (#{operationUserId,jdbcType=INTEGER}, #{operationUserName,jdbcType=VARCHAR}, values (#{operationUserId,jdbcType=INTEGER}, #{operationUserName,jdbcType=VARCHAR},
#{phoneNumber,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{phoneNumber,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER}, #{phoneAreaCode,jdbcType=VARCHAR} #{updateTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER}, #{phoneAreaCode,jdbcType=VARCHAR}
) )
</insert> </insert>
...@@ -47,8 +44,8 @@ ...@@ -47,8 +44,8 @@
<if test="phoneNumber != null"> <if test="phoneNumber != null">
phone_number, phone_number,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
...@@ -73,8 +70,8 @@ ...@@ -73,8 +70,8 @@
<if test="phoneNumber != null"> <if test="phoneNumber != null">
#{phoneNumber,jdbcType=VARCHAR}, #{phoneNumber,jdbcType=VARCHAR},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
...@@ -99,8 +96,8 @@ ...@@ -99,8 +96,8 @@
<if test="phoneNumber != null"> <if test="phoneNumber != null">
phone_number = #{phoneNumber,jdbcType=VARCHAR}, phone_number = #{phoneNumber,jdbcType=VARCHAR},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -121,7 +118,7 @@ ...@@ -121,7 +118,7 @@
update tab_sys_operation_user update tab_sys_operation_user
set operation_user_name = #{operationUserName,jdbcType=VARCHAR}, set operation_user_name = #{operationUserName,jdbcType=VARCHAR},
phone_number = #{phoneNumber,jdbcType=VARCHAR}, phone_number = #{phoneNumber,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
enterprise_id = #{enterpriseId,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
...@@ -132,7 +129,7 @@ ...@@ -132,7 +129,7 @@
<select id="getByPhone" resultMap="BaseResultMap"> <select id="getByPhone" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> SELECT <include refid="Base_Column_List"></include>
from tab_sys_operation_user from tab_sys_operation_user
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
and phone_number = #{phone} and phone_number = #{phone}
</select> </select>
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
<result column="content" jdbcType="VARCHAR" property="content" /> <result column="content" jdbcType="VARCHAR" property="content" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
order_app_resource_id, enterprise_id, type, content, create_time, update_time, status order_app_resource_id, enterprise_id, type, content, create_time, update_time, delete_flag
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
...@@ -19,17 +19,14 @@ ...@@ -19,17 +19,14 @@
from tab_sys_order_app_resource from tab_sys_order_app_resource
where order_app_resource_id = #{orderAppResourceId,jdbcType=INTEGER} where order_app_resource_id = #{orderAppResourceId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_order_app_resource
where order_app_resource_id = #{orderAppResourceId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysOrderAppResource"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysOrderAppResource">
insert into tab_sys_order_app_resource (order_app_resource_id, enterprise_id, insert into tab_sys_order_app_resource (order_app_resource_id, enterprise_id,
type, content, create_time, type, content, create_time,
update_time, status) update_time, delete_flag)
values (#{orderAppResourceId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, values (#{orderAppResourceId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{type,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{type,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}) #{updateTime,jdbcType=TIMESTAMP}, #{deleteFlag,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysOrderAppResource"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysOrderAppResource">
<selectKey keyProperty="orderAppResourceId" order="AFTER" resultType="java.lang.Integer"> <selectKey keyProperty="orderAppResourceId" order="AFTER" resultType="java.lang.Integer">
...@@ -55,8 +52,8 @@ ...@@ -55,8 +52,8 @@
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -78,8 +75,8 @@ ...@@ -78,8 +75,8 @@
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
</trim> </trim>
</insert> </insert>
...@@ -101,8 +98,8 @@ ...@@ -101,8 +98,8 @@
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
</set> </set>
where order_app_resource_id = #{orderAppResourceId,jdbcType=INTEGER} where order_app_resource_id = #{orderAppResourceId,jdbcType=INTEGER}
...@@ -114,7 +111,7 @@ ...@@ -114,7 +111,7 @@
content = #{content,jdbcType=VARCHAR}, content = #{content,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER} delete_flag = #{deleteFlag,jdbcType=INTEGER}
where order_app_resource_id = #{orderAppResourceId,jdbcType=INTEGER} where order_app_resource_id = #{orderAppResourceId,jdbcType=INTEGER}
</update> </update>
<select id="listByIds" resultMap="BaseResultMap"> <select id="listByIds" resultMap="BaseResultMap">
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
<result column="channel_resource" jdbcType="INTEGER" property="channelResource" /> <result column="channel_resource" jdbcType="INTEGER" property="channelResource" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
resource_id, resource_name, enterprise_id, user_resource, member_card_resource, fwh_resource, resource_id, resource_name, enterprise_id, user_resource, member_card_resource, fwh_resource,
applet_resource, store_resource, goods_resource_id, order_resource, app_resource, applet_resource, store_resource, goods_resource_id, order_resource, app_resource,
sms_sign_resource, channel_resource, create_time, update_time, status sms_sign_resource, channel_resource, create_time, update_time, delete_flag
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
...@@ -30,23 +30,20 @@ ...@@ -30,23 +30,20 @@
from tab_sys_resource from tab_sys_resource
where resource_id = #{resourceId,jdbcType=INTEGER} where resource_id = #{resourceId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_resource
where resource_id = #{resourceId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysResource"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysResource">
insert into tab_sys_resource (resource_id, resource_name, enterprise_id, insert into tab_sys_resource (resource_id, resource_name, enterprise_id,
user_resource, member_card_resource, fwh_resource, user_resource, member_card_resource, fwh_resource,
applet_resource, store_resource, goods_resource_id, applet_resource, store_resource, goods_resource_id,
order_resource, app_resource, sms_sign_resource, order_resource, app_resource, sms_sign_resource,
channel_resource, create_time, update_time, channel_resource, create_time, update_time,
status) delete_flag)
values (#{resourceId,jdbcType=INTEGER}, #{resourceName,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER}, values (#{resourceId,jdbcType=INTEGER}, #{resourceName,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER},
#{userResource,jdbcType=BIGINT}, #{memberCardResource,jdbcType=BIGINT}, #{fwhResource,jdbcType=BIGINT}, #{userResource,jdbcType=BIGINT}, #{memberCardResource,jdbcType=BIGINT}, #{fwhResource,jdbcType=BIGINT},
#{appletResource,jdbcType=BIGINT}, #{storeResource,jdbcType=BIGINT}, #{goodsResourceId,jdbcType=BIGINT}, #{appletResource,jdbcType=BIGINT}, #{storeResource,jdbcType=BIGINT}, #{goodsResourceId,jdbcType=BIGINT},
#{orderResource,jdbcType=INTEGER}, #{appResource,jdbcType=INTEGER}, #{smsSignResource,jdbcType=INTEGER}, #{orderResource,jdbcType=INTEGER}, #{appResource,jdbcType=INTEGER}, #{smsSignResource,jdbcType=INTEGER},
#{channelResource,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{channelResource,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{status,jdbcType=INTEGER}) #{deleteFlag,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysResource"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysResource">
insert into tab_sys_resource insert into tab_sys_resource
...@@ -96,8 +93,8 @@ ...@@ -96,8 +93,8 @@
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -146,8 +143,8 @@ ...@@ -146,8 +143,8 @@
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
</trim> </trim>
</insert> </insert>
...@@ -196,8 +193,8 @@ ...@@ -196,8 +193,8 @@
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
</set> </set>
where resource_id = #{resourceId,jdbcType=INTEGER} where resource_id = #{resourceId,jdbcType=INTEGER}
...@@ -218,14 +215,14 @@ ...@@ -218,14 +215,14 @@
channel_resource = #{channelResource,jdbcType=INTEGER}, channel_resource = #{channelResource,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER} delete_flag = #{deleteFlag,jdbcType=INTEGER}
where resource_id = #{resourceId,jdbcType=INTEGER} where resource_id = #{resourceId,jdbcType=INTEGER}
</update> </update>
<select id="listResource" resultMap="BaseResultMap"> <select id="listResource" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_resource from tab_sys_resource
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="resourceName != null and resourceName != '' "> <if test="resourceName != null and resourceName != '' ">
and resource_name like concat('%', #{resourceName}, '%') and resource_name like concat('%', #{resourceName}, '%')
</if> </if>
...@@ -238,7 +235,7 @@ ...@@ -238,7 +235,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_resource from tab_sys_resource
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="resourceId != null "> <if test="resourceId != null ">
and resource_id &lt;&gt; #{resourceId} and resource_id &lt;&gt; #{resourceId}
</if> </if>
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
<id column="role_id" jdbcType="INTEGER" property="roleId" /> <id column="role_id" jdbcType="INTEGER" property="roleId" />
<result column="role_name" jdbcType="VARCHAR" property="roleName" /> <result column="role_name" jdbcType="VARCHAR" property="roleName" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" /> <result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
role_id, role_name, enterprise_id, status, create_time, update_time role_id, role_name, enterprise_id, delete_flag, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
...@@ -18,16 +18,13 @@ ...@@ -18,16 +18,13 @@
from tab_sys_role from tab_sys_role
where role_id = #{roleId,jdbcType=INTEGER} where role_id = #{roleId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_role
where role_id = #{roleId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysRole" useGeneratedKeys="true" keyProperty="roleId"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysRole" useGeneratedKeys="true" keyProperty="roleId">
insert into tab_sys_role (role_id, role_name, enterprise_id, insert into tab_sys_role (role_id, role_name, enterprise_id,
status, create_time, update_time delete_flag, create_time, update_time
) )
values (#{roleId,jdbcType=INTEGER}, #{roleName,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER}, values (#{roleId,jdbcType=INTEGER}, #{roleName,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} #{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysRole"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysRole">
...@@ -42,8 +39,8 @@ ...@@ -42,8 +39,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id, enterprise_id,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
...@@ -62,8 +59,8 @@ ...@@ -62,8 +59,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
...@@ -82,8 +79,8 @@ ...@@ -82,8 +79,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -98,7 +95,7 @@ ...@@ -98,7 +95,7 @@
update tab_sys_role update tab_sys_role
set role_name = #{roleName,jdbcType=VARCHAR}, set role_name = #{roleName,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where role_id = #{roleId,jdbcType=INTEGER} where role_id = #{roleId,jdbcType=INTEGER}
...@@ -108,9 +105,9 @@ ...@@ -108,9 +105,9 @@
select select
a.role_id roleId, a.role_id roleId,
a.role_name roleName, a.role_name roleName,
(select count(DISTINCT b.user_id) from tab_sys_user_role b where a.role_id = b.role_id and b.status = 1 ) authUserCount (select count(DISTINCT b.user_id) from tab_sys_user_role b where a.role_id = b.role_id and b.delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS} ) authUserCount
from tab_sys_role a from tab_sys_role a
where a.status = 1 where a.delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and a.enterprise_id = #{enterpriseId} and a.enterprise_id = #{enterpriseId}
<if test="search != null and search != '' "> <if test="search != null and search != '' ">
and ( a.role_name like concat('%', #{search}, '%') ) and ( a.role_name like concat('%', #{search}, '%') )
...@@ -120,23 +117,23 @@ ...@@ -120,23 +117,23 @@
</select> </select>
<update id="deleteByRoleId"> <update id="deleteByRoleId">
update tab_sys_role set status = 0 update tab_sys_role set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where role_id = #{roleId} where role_id = #{roleId}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</update> </update>
<select id="listRoleNoPage" resultMap="BaseResultMap"> <select id="listRoleNoPage" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_role from tab_sys_role
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
</select> </select>
<select id="countRepeatRoleName" resultType="int"> <select id="countRepeatRoleName" resultType="int">
select count(1) from tab_sys_role select count(1) from tab_sys_role
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="roleId != null"> <if test="roleId != null">
and role_id <![CDATA[ <> ]]> #{roleId} and role_id <![CDATA[ <> ]]> #{roleId}
</if> </if>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<id column="union_id" jdbcType="INTEGER" property="unionId" /> <id column="union_id" jdbcType="INTEGER" property="unionId" />
<result column="union_enterprise_id" jdbcType="INTEGER" property="unionEnterpriseId" /> <result column="union_enterprise_id" jdbcType="INTEGER" property="unionEnterpriseId" />
<result column="union_enterprise_name" jdbcType="VARCHAR" property="unionEnterpriseName" /> <result column="union_enterprise_name" jdbcType="VARCHAR" property="unionEnterpriseName" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="authorization_status" jdbcType="INTEGER" property="authorizationStatus" /> <result column="authorization_status" jdbcType="INTEGER" property="authorizationStatus" />
<result column="authorization_time" jdbcType="TIMESTAMP" property="authorizationTime" /> <result column="authorization_time" jdbcType="TIMESTAMP" property="authorizationTime" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" /> <result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
union_id, union_enterprise_id, union_enterprise_name, status, authorization_status, union_id, union_enterprise_id, union_enterprise_name, delete_flag, authorization_status,
authorization_time, create_time, update_time, enterprise_id authorization_time, create_time, update_time, enterprise_id
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
...@@ -22,17 +22,14 @@ ...@@ -22,17 +22,14 @@
from tab_sys_union_enterprise from tab_sys_union_enterprise
where union_id = #{unionId,jdbcType=INTEGER} where union_id = #{unionId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_union_enterprise
where union_id = #{unionId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysUnionEnterprise" useGeneratedKeys="true" keyProperty="unionId"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysUnionEnterprise" useGeneratedKeys="true" keyProperty="unionId">
insert into tab_sys_union_enterprise (union_id, union_enterprise_id, union_enterprise_name, insert into tab_sys_union_enterprise (union_id, union_enterprise_id, union_enterprise_name,
status, authorization_status, authorization_time, delete_flag, authorization_status, authorization_time,
create_time, update_time, enterprise_id create_time, update_time, enterprise_id
) )
values (#{unionId,jdbcType=INTEGER}, #{unionEnterpriseId,jdbcType=INTEGER}, #{unionEnterpriseName,jdbcType=VARCHAR}, values (#{unionId,jdbcType=INTEGER}, #{unionEnterpriseId,jdbcType=INTEGER}, #{unionEnterpriseName,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{authorizationStatus,jdbcType=INTEGER}, #{authorizationTime,jdbcType=TIMESTAMP}, #{deleteFlag,jdbcType=INTEGER}, #{authorizationStatus,jdbcType=INTEGER}, #{authorizationTime,jdbcType=TIMESTAMP},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER} #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER}
) )
</insert> </insert>
...@@ -48,8 +45,8 @@ ...@@ -48,8 +45,8 @@
<if test="unionEnterpriseName != null"> <if test="unionEnterpriseName != null">
union_enterprise_name, union_enterprise_name,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="authorizationStatus != null"> <if test="authorizationStatus != null">
authorization_status, authorization_status,
...@@ -77,8 +74,8 @@ ...@@ -77,8 +74,8 @@
<if test="unionEnterpriseName != null"> <if test="unionEnterpriseName != null">
#{unionEnterpriseName,jdbcType=VARCHAR}, #{unionEnterpriseName,jdbcType=VARCHAR},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="authorizationStatus != null"> <if test="authorizationStatus != null">
#{authorizationStatus,jdbcType=INTEGER}, #{authorizationStatus,jdbcType=INTEGER},
...@@ -106,8 +103,8 @@ ...@@ -106,8 +103,8 @@
<if test="unionEnterpriseName != null"> <if test="unionEnterpriseName != null">
union_enterprise_name = #{unionEnterpriseName,jdbcType=VARCHAR}, union_enterprise_name = #{unionEnterpriseName,jdbcType=VARCHAR},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="authorizationStatus != null"> <if test="authorizationStatus != null">
authorization_status = #{authorizationStatus,jdbcType=INTEGER}, authorization_status = #{authorizationStatus,jdbcType=INTEGER},
...@@ -131,7 +128,7 @@ ...@@ -131,7 +128,7 @@
update tab_sys_union_enterprise update tab_sys_union_enterprise
set union_enterprise_id = #{unionEnterpriseId,jdbcType=INTEGER}, set union_enterprise_id = #{unionEnterpriseId,jdbcType=INTEGER},
union_enterprise_name = #{unionEnterpriseName,jdbcType=VARCHAR}, union_enterprise_name = #{unionEnterpriseName,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
authorization_status = #{authorizationStatus,jdbcType=INTEGER}, authorization_status = #{authorizationStatus,jdbcType=INTEGER},
authorization_time = #{authorizationTime,jdbcType=TIMESTAMP}, authorization_time = #{authorizationTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -144,14 +141,14 @@ ...@@ -144,14 +141,14 @@
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_union_enterprise from tab_sys_union_enterprise
where union_enterprise_id = #{unionId,jdbcType=INTEGER} where union_enterprise_id = #{unionId,jdbcType=INTEGER}
and status=1 and delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select> </select>
<select id="pageUnionEnterprise" resultMap="BaseResultMap"> <select id="pageUnionEnterprise" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_union_enterprise from tab_sys_union_enterprise
where enterprise_id = #{enterpriseId,jdbcType=INTEGER} where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
and status=1 and delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="search != null and search !=''"> <if test="search != null and search !=''">
and union_enterprise_name like concat('%',#{search}, '%') and union_enterprise_name like concat('%',#{search}, '%')
</if> </if>
......
...@@ -12,11 +12,11 @@ ...@@ -12,11 +12,11 @@
<result column="resource" jdbcType="BIGINT" property="resource" /> <result column="resource" jdbcType="BIGINT" property="resource" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
union_resource_id, union_id, resource_type, authorization_status, authorization_time, union_resource_id, union_id, resource_type, authorization_status, authorization_time,
authorization_message, enterprise_id, resource, create_time, update_time, status authorization_message, enterprise_id, resource, create_time, update_time, delete_flag
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
...@@ -24,20 +24,17 @@ ...@@ -24,20 +24,17 @@
from tab_sys_union_enterprise_resource from tab_sys_union_enterprise_resource
where union_resource_id = #{unionResourceId,jdbcType=INTEGER} where union_resource_id = #{unionResourceId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_union_enterprise_resource
where union_resource_id = #{unionResourceId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysUnionEnterpriseResource"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysUnionEnterpriseResource">
insert into tab_sys_union_enterprise_resource (union_resource_id, union_id, resource_type, insert into tab_sys_union_enterprise_resource (union_resource_id, union_id, resource_type,
authorization_status, authorization_time, authorization_status, authorization_time,
authorization_message, enterprise_id, resource, authorization_message, enterprise_id, resource,
create_time, update_time, status create_time, update_time, delete_flag
) )
values (#{unionResourceId,jdbcType=INTEGER}, #{unionId,jdbcType=INTEGER}, #{resourceType,jdbcType=INTEGER}, values (#{unionResourceId,jdbcType=INTEGER}, #{unionId,jdbcType=INTEGER}, #{resourceType,jdbcType=INTEGER},
#{authorizationStatus,jdbcType=INTEGER}, #{authorizationTime,jdbcType=TIMESTAMP}, #{authorizationStatus,jdbcType=INTEGER}, #{authorizationTime,jdbcType=TIMESTAMP},
#{authorizationMessage,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER}, #{resource,jdbcType=BIGINT}, #{authorizationMessage,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER}, #{resource,jdbcType=BIGINT},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER} #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleteFlag,jdbcType=INTEGER}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysUnionEnterpriseResource"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysUnionEnterpriseResource">
...@@ -73,8 +70,8 @@ ...@@ -73,8 +70,8 @@
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -108,8 +105,8 @@ ...@@ -108,8 +105,8 @@
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
</trim> </trim>
</insert> </insert>
...@@ -143,8 +140,8 @@ ...@@ -143,8 +140,8 @@
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
</set> </set>
where union_resource_id = #{unionResourceId,jdbcType=INTEGER} where union_resource_id = #{unionResourceId,jdbcType=INTEGER}
...@@ -160,7 +157,7 @@ ...@@ -160,7 +157,7 @@
resource = #{resource,jdbcType=BIGINT}, resource = #{resource,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER} delete_flag = #{deleteFlag,jdbcType=INTEGER}
where union_resource_id = #{unionResourceId,jdbcType=INTEGER} where union_resource_id = #{unionResourceId,jdbcType=INTEGER}
</update> </update>
<select id="getResource" resultMap="BaseResultMap"> <select id="getResource" resultMap="BaseResultMap">
...@@ -169,18 +166,18 @@ ...@@ -169,18 +166,18 @@
from tab_sys_union_enterprise_resource from tab_sys_union_enterprise_resource
where union_id = #{unionId,jdbcType=INTEGER} where union_id = #{unionId,jdbcType=INTEGER}
and resource_type = #{type} and resource_type = #{type}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select> </select>
<update id="delResource" > <update id="delResource" >
update tab_sys_union_enterprise_resource update tab_sys_union_enterprise_resource
set status=0 set delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where union_id = #{unionId,jdbcType=INTEGER} where union_id = #{unionId,jdbcType=INTEGER}
and enterprise_id= #{enterpriseId} and enterprise_id= #{enterpriseId}
</update> </update>
<update id="updateAuthorizationStatus" > <update id="updateAuthorizationStatus" >
update tab_sys_union_enterprise_resource update tab_sys_union_enterprise_resource
set authorization_status=#{authOrizationStatus},authorization_time=now(),authorization_message=#{authOrizationMessage}, auth_key=#{key} set authorization_status=#{authOrizationStatus},authorization_time=now(),authorization_message=#{authOrizationMessage}, auth_key=#{key}
where enterprise_id= #{enterpriseId} and resource_type=#{resourceType} and status = 1 where enterprise_id= #{enterpriseId} and resource_type=#{resourceType} and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</update> </update>
<select id="listResourceByEnterpriseIdAndType" resultType="com.gic.auth.dto.UnionEnterpriseResourceDTO"> <select id="listResourceByEnterpriseIdAndType" resultType="com.gic.auth.dto.UnionEnterpriseResourceDTO">
select select
...@@ -189,18 +186,18 @@ ...@@ -189,18 +186,18 @@
where t1.enterprise_id = #{enterpriseId,jdbcType=INTEGER} where t1.enterprise_id = #{enterpriseId,jdbcType=INTEGER}
and t1.union_id=t2.union_id and t1.union_id=t2.union_id
and t2.resource_type = #{type} and t2.resource_type = #{type}
and t1.status = 1 and t1.delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select> </select>
<select id="listResourceByUnionId" resultMap="BaseResultMap"> <select id="listResourceByUnionId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_union_enterprise_resource from tab_sys_union_enterprise_resource
where union_id=#{unionId} where union_id=#{unionId}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select> </select>
<update id="delResourceByResourceId" > <update id="delResourceByResourceId" >
update tab_sys_union_enterprise_resource update tab_sys_union_enterprise_resource
set status=0 set delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where resource = #{resourceId} where resource = #{resourceId}
</update> </update>
<select id="getKeyByResourceId" resultMap="BaseResultMap"> <select id="getKeyByResourceId" resultMap="BaseResultMap">
...@@ -208,7 +205,7 @@ ...@@ -208,7 +205,7 @@
auth_key auth_key
from tab_sys_union_enterprise_resource from tab_sys_union_enterprise_resource
where resource=#{resourceId} where resource=#{resourceId}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select> </select>
<select id="getUnionEnterpriseIdByResouce" resultMap="BaseResultMap"> <select id="getUnionEnterpriseIdByResouce" resultMap="BaseResultMap">
select select
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<result column="phone_number" jdbcType="VARCHAR" property="phoneNumber" /> <result column="phone_number" jdbcType="VARCHAR" property="phoneNumber" />
<result column="password" jdbcType="VARCHAR" property="password" /> <result column="password" jdbcType="VARCHAR" property="password" />
<result column="super_admin" jdbcType="INTEGER" property="superAdmin" /> <result column="super_admin" jdbcType="INTEGER" property="superAdmin" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" /> <result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<result column="user_position" jdbcType="INTEGER" property="userPosition" /> <result column="user_position" jdbcType="INTEGER" property="userPosition" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
user_id, user_name, phone_number, password, super_admin, status, create_time, update_time, user_id, user_name, phone_number, password, super_admin, delete_flag, create_time, update_time,
enterprise_id, phone_area_code, user_group_ids, login_type, password_type, account_type, account_due_date, user_position enterprise_id, phone_area_code, user_group_ids, login_type, password_type, account_type, account_due_date, user_position
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
...@@ -29,18 +29,15 @@ ...@@ -29,18 +29,15 @@
from tab_sys_user from tab_sys_user
where user_id = #{userId,jdbcType=INTEGER} where user_id = #{userId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_user
where user_id = #{userId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysUser" useGeneratedKeys="true" keyProperty="userId"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysUser" useGeneratedKeys="true" keyProperty="userId">
insert into tab_sys_user (user_id, user_name, phone_number, insert into tab_sys_user (user_id, user_name, phone_number,
password, super_admin, status, password, super_admin, delete_flag,
create_time, update_time, enterprise_id, create_time, update_time, enterprise_id,
phone_area_code, user_group_ids, login_type, password_type, account_type, account_due_date, user_position phone_area_code, user_group_ids, login_type, password_type, account_type, account_due_date, user_position
) )
values (#{userId,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, #{phoneNumber,jdbcType=VARCHAR}, values (#{userId,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, #{phoneNumber,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, #{superAdmin,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{password,jdbcType=VARCHAR}, #{superAdmin,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER},
#{phoneAreaCode,jdbcType=VARCHAR}, #{userGroupIds,jdbcType=VARCHAR}, #{loginType,jdbcType=INTEGER}, #{phoneAreaCode,jdbcType=VARCHAR}, #{userGroupIds,jdbcType=VARCHAR}, #{loginType,jdbcType=INTEGER},
#{passwordType,jdbcType=INTEGER}, #{accountType,jdbcType=INTEGER}, #{accountDueDate,jdbcType=TIMESTAMP}, #{userPosition,jdbcType=INTEGER} #{passwordType,jdbcType=INTEGER}, #{accountType,jdbcType=INTEGER}, #{accountDueDate,jdbcType=TIMESTAMP}, #{userPosition,jdbcType=INTEGER}
...@@ -64,8 +61,8 @@ ...@@ -64,8 +61,8 @@
<if test="superAdmin != null"> <if test="superAdmin != null">
super_admin, super_admin,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
...@@ -114,8 +111,8 @@ ...@@ -114,8 +111,8 @@
<if test="superAdmin != null"> <if test="superAdmin != null">
#{superAdmin,jdbcType=INTEGER}, #{superAdmin,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
...@@ -164,8 +161,8 @@ ...@@ -164,8 +161,8 @@
<if test="superAdmin != null"> <if test="superAdmin != null">
super_admin = #{superAdmin,jdbcType=INTEGER}, super_admin = #{superAdmin,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -206,7 +203,7 @@ ...@@ -206,7 +203,7 @@
phone_number = #{phoneNumber,jdbcType=VARCHAR}, phone_number = #{phoneNumber,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR}, password = #{password,jdbcType=VARCHAR},
super_admin = #{superAdmin,jdbcType=INTEGER}, super_admin = #{superAdmin,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
enterprise_id = #{enterpriseId,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
...@@ -222,7 +219,7 @@ ...@@ -222,7 +219,7 @@
<select id="countByPhone" resultType="int"> <select id="countByPhone" resultType="int">
select count(1) from tab_sys_user select count(1) from tab_sys_user
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="userId != null"> <if test="userId != null">
and user_id <![CDATA[ <> ]]> #{userId} and user_id <![CDATA[ <> ]]> #{userId}
</if> </if>
...@@ -232,7 +229,7 @@ ...@@ -232,7 +229,7 @@
<select id="countByPhoneAndLoginType" resultType="int"> <select id="countByPhoneAndLoginType" resultType="int">
select count(1) from tab_sys_user select count(1) from tab_sys_user
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="userId != null"> <if test="userId != null">
and user_id <![CDATA[ <> ]]> #{userId} and user_id <![CDATA[ <> ]]> #{userId}
</if> </if>
...@@ -247,7 +244,7 @@ ...@@ -247,7 +244,7 @@
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_user from tab_sys_user
where enterprise_id = #{enterpriseId,jdbcType=INTEGER} where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and super_admin = 1 and super_admin = 1
and login_type = 0 and login_type = 0
</select> </select>
...@@ -256,7 +253,7 @@ ...@@ -256,7 +253,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_user from tab_sys_user
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="enterpriseId != null"> <if test="enterpriseId != null">
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
</if> </if>
...@@ -273,7 +270,7 @@ ...@@ -273,7 +270,7 @@
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_user from tab_sys_user
where phone_number = #{phoneNumber} where phone_number = #{phoneNumber}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
and password = #{password} and password = #{password}
and phone_area_code = #{nationCode} and phone_area_code = #{nationCode}
...@@ -297,9 +294,9 @@ ...@@ -297,9 +294,9 @@
left join tab_sys_user_role b on a.user_id = b.user_id left join tab_sys_user_role b on a.user_id = b.user_id
left join tab_sys_user_resource c on a.user_id = c.user_id left join tab_sys_user_resource c on a.user_id = c.user_id
where a.enterprise_id = #{enterpriseId} where a.enterprise_id = #{enterpriseId}
and a.status = 1 and a.delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and b.status = 1 and b.delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and c.status = 1 and c.delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and a.login_type = 0 and a.login_type = 0
<if test="search != null and search != '' "> <if test="search != null and search != '' ">
and ( a.user_name like concat('%', #{search}, '%') or a.phone_number like concat('%', #{search}, '%') ) and ( a.user_name like concat('%', #{search}, '%') or a.phone_number like concat('%', #{search}, '%') )
...@@ -339,9 +336,9 @@ ...@@ -339,9 +336,9 @@
<update id="deleteById"> <update id="deleteById">
update tab_sys_user set status = 0 update tab_sys_user set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where user_id = #{userId} where user_id = #{userId}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and login_type = 0 and login_type = 0
</update> </update>
...@@ -349,7 +346,7 @@ ...@@ -349,7 +346,7 @@
select select
1 1
from tab_sys_user from tab_sys_user
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and login_type = 0 and login_type = 0
<if test="enterpriseId != null "> <if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
...@@ -363,7 +360,7 @@ ...@@ -363,7 +360,7 @@
limit 1 limit 1
</select> </select>
<select id="countUserByUserIds" resultType="java.lang.Integer"> <select id="countUserByUserIds" resultType="java.lang.Integer">
select count(1) from tab_sys_user where status = 1 select count(1) from tab_sys_user where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and login_type = 0 and login_type = 0
and user_id in and user_id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")"> <foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
...@@ -376,7 +373,7 @@ ...@@ -376,7 +373,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_user from tab_sys_user
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and login_type = 0 and login_type = 0
<if test="ids != null and ids.size() > 0"> <if test="ids != null and ids.size() > 0">
and user_id in and user_id in
...@@ -390,7 +387,7 @@ ...@@ -390,7 +387,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_user from tab_sys_user
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
and login_type = 0 and login_type = 0
and super_admin != 1 and super_admin != 1
...@@ -407,7 +404,7 @@ ...@@ -407,7 +404,7 @@
<select id="listAllUser" resultType="java.lang.Integer"> <select id="listAllUser" resultType="java.lang.Integer">
select user_id from tab_sys_user where status = 1 select user_id from tab_sys_user where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="enterpriseId != null"> <if test="enterpriseId != null">
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
</if> </if>
...@@ -415,7 +412,7 @@ ...@@ -415,7 +412,7 @@
<select id="listGicUser" resultMap="BaseResultMap"> <select id="listGicUser" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include> select <include refid="Base_Column_List"></include>
from tab_sys_user where status = 1 from tab_sys_user where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
<if test="isGic != null"> <if test="isGic != null">
and login_type = #{isGic} and login_type = #{isGic}
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
<result column="resource_id" jdbcType="INTEGER" property="resourceId" /> <result column="resource_id" jdbcType="INTEGER" property="resourceId" />
<result column="user_id" jdbcType="INTEGER" property="userId" /> <result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" /> <result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
user_resource_id, resource_id, user_id, enterprise_id, status, create_time, update_time user_resource_id, resource_id, user_id, enterprise_id, delete_flag, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
...@@ -19,16 +19,13 @@ ...@@ -19,16 +19,13 @@
from tab_sys_user_resource from tab_sys_user_resource
where user_resource_id = #{userResourceId,jdbcType=INTEGER} where user_resource_id = #{userResourceId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_user_resource
where user_resource_id = #{userResourceId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysUserResource"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysUserResource">
insert into tab_sys_user_resource (user_resource_id, resource_id, user_id, insert into tab_sys_user_resource (user_resource_id, resource_id, user_id,
enterprise_id, status, create_time, enterprise_id, delete_flag, create_time,
update_time) update_time)
values (#{userResourceId,jdbcType=INTEGER}, #{resourceId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, values (#{userResourceId,jdbcType=INTEGER}, #{resourceId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER},
#{enterpriseId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}) #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysUserResource"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysUserResource">
...@@ -46,8 +43,8 @@ ...@@ -46,8 +43,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id, enterprise_id,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
...@@ -69,8 +66,8 @@ ...@@ -69,8 +66,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
...@@ -92,8 +89,8 @@ ...@@ -92,8 +89,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -109,7 +106,7 @@ ...@@ -109,7 +106,7 @@
set resource_id = #{resourceId,jdbcType=INTEGER}, set resource_id = #{resourceId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER}, user_id = #{userId,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where user_resource_id = #{userResourceId,jdbcType=INTEGER} where user_resource_id = #{userResourceId,jdbcType=INTEGER}
...@@ -118,7 +115,7 @@ ...@@ -118,7 +115,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_user_resource from tab_sys_user_resource
where status = 1 where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="resourceId != null "> <if test="resourceId != null ">
and resource_id = #{resourceId} and resource_id = #{resourceId}
</if> </if>
...@@ -130,7 +127,7 @@ ...@@ -130,7 +127,7 @@
<!--List<Map<String,Integer>> countByResourceIds(List<Integer> resourceIds);--> <!--List<Map<String,Integer>> countByResourceIds(List<Integer> resourceIds);-->
<select id="countByResourceIds" resultType="java.util.HashMap"> <select id="countByResourceIds" resultType="java.util.HashMap">
select resource_id resourceId , count(1) userResourceCount from tab_sys_user_resource where select resource_id resourceId , count(1) userResourceCount from tab_sys_user_resource where
status = 1 delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="null != ids"> <if test="null != ids">
and resource_id in and resource_id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")"> <foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
...@@ -142,9 +139,9 @@ ...@@ -142,9 +139,9 @@
<update id="deleteByUserId" parameterType="java.lang.Integer"> <update id="deleteByUserId" parameterType="java.lang.Integer">
UPDATE tab_sys_user_resource set status = 0 UPDATE tab_sys_user_resource set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where user_id = #{userId} where user_id = #{userId}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</update> </update>
<select id="listUserResourceByUserId" resultMap="BaseResultMap"> <select id="listUserResourceByUserId" resultMap="BaseResultMap">
...@@ -152,6 +149,6 @@ ...@@ -152,6 +149,6 @@
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_user_resource from tab_sys_user_resource
where user_id = #{userId} where user_id = #{userId}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
<result column="role_id" jdbcType="INTEGER" property="roleId" /> <result column="role_id" jdbcType="INTEGER" property="roleId" />
<result column="user_id" jdbcType="INTEGER" property="userId" /> <result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" /> <result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
user_role_id, role_id, user_id, enterprise_id, status, create_time, update_time user_role_id, role_id, user_id, enterprise_id, delete_flag, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
...@@ -19,16 +19,13 @@ ...@@ -19,16 +19,13 @@
from tab_sys_user_role from tab_sys_user_role
where user_role_id = #{userRoleId,jdbcType=INTEGER} where user_role_id = #{userRoleId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_sys_user_role
where user_role_id = #{userRoleId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysUserRole"> <insert id="insert" parameterType="com.gic.auth.entity.TabSysUserRole">
insert into tab_sys_user_role (user_role_id, role_id, user_id, insert into tab_sys_user_role (user_role_id, role_id, user_id,
enterprise_id, status, create_time, enterprise_id, delete_flag, create_time,
update_time) update_time)
values (#{userRoleId,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, values (#{userRoleId,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER},
#{enterpriseId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}) #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysUserRole"> <insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysUserRole">
...@@ -46,8 +43,8 @@ ...@@ -46,8 +43,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id, enterprise_id,
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
...@@ -69,8 +66,8 @@ ...@@ -69,8 +66,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
#{status,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
...@@ -92,8 +89,8 @@ ...@@ -92,8 +89,8 @@
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="deleteFlag != null">
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
...@@ -109,16 +106,16 @@ ...@@ -109,16 +106,16 @@
set role_id = #{roleId,jdbcType=INTEGER}, set role_id = #{roleId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER}, user_id = #{userId,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where user_role_id = #{userRoleId,jdbcType=INTEGER} where user_role_id = #{userRoleId,jdbcType=INTEGER}
</update> </update>
<update id="deleteByUserId" parameterType="java.lang.Integer"> <update id="deleteByUserId" parameterType="java.lang.Integer">
UPDATE tab_sys_user_role set status = 0 UPDATE tab_sys_user_role set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where user_id = #{userId} where user_id = #{userId}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</update> </update>
<select id="listUserRoleByUserId" resultMap="BaseResultMap"> <select id="listUserRoleByUserId" resultMap="BaseResultMap">
...@@ -126,7 +123,7 @@ ...@@ -126,7 +123,7 @@
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_user_role from tab_sys_user_role
where user_id = #{userId} where user_id = #{userId}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select> </select>
...@@ -135,6 +132,6 @@ ...@@ -135,6 +132,6 @@
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_sys_user_role from tab_sys_user_role
where role_id = #{roleId} where role_id = #{roleId}
and status = 1 and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -29,6 +29,7 @@ import com.gic.enterprise.utils.UserDetailUtils; ...@@ -29,6 +29,7 @@ import com.gic.enterprise.utils.UserDetailUtils;
import com.gic.member.config.api.service.AppletsConfigApiService; import com.gic.member.config.api.service.AppletsConfigApiService;
import com.gic.member.config.api.service.MemberCardApiService; import com.gic.member.config.api.service.MemberCardApiService;
import com.gic.member.config.api.service.ServiceConfigApiService; import com.gic.member.config.api.service.ServiceConfigApiService;
import com.gic.redis.data.util.RedisUtil;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
...@@ -41,6 +42,8 @@ import javax.servlet.http.HttpServletRequest; ...@@ -41,6 +42,8 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* *
* @ClassName: LoginController * @ClassName: LoginController
...@@ -73,6 +76,8 @@ public class LoginController { ...@@ -73,6 +76,8 @@ public class LoginController {
@Autowired @Autowired
private ServiceConfigApiService serviceConfigApiService; private ServiceConfigApiService serviceConfigApiService;
private static final String MENU_LOCAL_CACHE_KEY = "auth:menu:list:all";
@RequestMapping("list-enterprise-by-phone") @RequestMapping("list-enterprise-by-phone")
public RestResponse listUserEnterprise(String phoneNumber, String nationCode) { public RestResponse listUserEnterprise(String phoneNumber, String nationCode) {
if (StringUtils.isBlank(phoneNumber)) { if (StringUtils.isBlank(phoneNumber)) {
...@@ -150,43 +155,22 @@ public class LoginController { ...@@ -150,43 +155,22 @@ public class LoginController {
} }
if (enterpriseDTO != null) { if (enterpriseDTO != null) {
userDetail.setEnterpriseInfo(EntityUtil.changeEntityNew(EnterpriseInfo.class, enterpriseDTO)); userDetail.setEnterpriseInfo(EntityUtil.changeEntityNew(EnterpriseInfo.class, enterpriseDTO));
//登录用户所拥有的权限菜单和操作项(接口)
ServiceResponse<List<MenuDTO>> menuResult = menuApiService.listUserMenu(userDetail.getUserId(), ServiceResponse<List<MenuDTO>> menuResult = menuApiService.listUserMenu(userDetail.getUserId(),
enterpriseDTO.getVersionCode()); enterpriseDTO.getVersionCode());
if (menuResult.isSuccess()) { if (menuResult.isSuccess()) {
List<MenuDTO> menuList = menuResult.getResult(); List<MenuDTO> menuList = menuResult.getResult();
List<MenuInfo> menuInfoList = EntityUtil.changeEntityListNew(MenuInfo.class, menuList); Set<Integer> menuIdSet = new HashSet<>(2);
Map<String, Object> map = new HashMap<>(16); if (CollectionUtils.isNotEmpty(menuList)) {
if (CollectionUtils.isNotEmpty(menuInfoList)) { menuIdSet = menuList.stream().filter(e -> StringUtils.isNotBlank(e.getMenuUrl()))
for (MenuInfo menuDTO : menuInfoList) { .map(e -> e.getMenuId()).collect(Collectors.toSet());
if (StringUtils.isBlank(menuDTO.getMenuUrl())) {
continue;
}
map.put(menuDTO.getMenuUrl(), menuDTO);
}
}
//查询全部的操作模块
Map<String, MenuInfo> moduleMap = new HashMap<>(16);
ServiceResponse<List<MenuDTO>> allGicMenu = menuApiService
.getAllMenuNotTree(enterpriseDTO.getVersionCode());
if (allGicMenu.isSuccess()) {
List<MenuDTO> temp = allGicMenu.getResult();
List<MenuInfo> tempMenuInfoList = EntityUtil.changeEntityListNew(MenuInfo.class, temp);
if (CollectionUtils.isNotEmpty(tempMenuInfoList)) {
for (MenuInfo menuDTO : tempMenuInfoList) {
if (StringUtils.isBlank(menuDTO.getMenuUrl())) {
continue;
}
moduleMap.put(menuDTO.getProjectUrlForWeb() + menuDTO.getMenuUrl(), menuDTO);
}
}
userDetail.setMenuInfoList(tempMenuInfoList);
} }
//塞用户权限菜单值
userDetail.setMenuIdSet(menuIdSet);
//塞本地缓存
setAllMenuToLocaleCache();
//设置用户资源组 //设置用户资源组
this.setUserResource(userDetail, userDetail.getUserId()); this.setUserResource(userDetail, userDetail.getUserId());
//塞值
userDetail.setMenuUrlMap(map);
userDetail.setModuleUrlMap(moduleMap);
} }
//塞缓存 //塞缓存
UserDetailUtils.setUserDetail(userDetail); UserDetailUtils.setUserDetail(userDetail);
...@@ -234,6 +218,19 @@ public class LoginController { ...@@ -234,6 +218,19 @@ public class LoginController {
return RestResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "token错误"); return RestResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "token错误");
} }
/**
* gic平台的菜单数据塞本地缓存
*/
private void setAllMenuToLocaleCache() {
ServiceResponse<List<MenuDTO>> response = menuApiService.getAllMenu();
if (response.isSuccess()) {
List<MenuDTO> list = response.getResult();
//gic平台的菜单数据塞本地缓存
RedisUtil.delLocalCache(MENU_LOCAL_CACHE_KEY);
RedisUtil.setLocalCache(MENU_LOCAL_CACHE_KEY, EntityUtil.changeEntityListNew(MenuInfo.class, list), null);
}
}
private void setUserResource(UserDetail detail, Integer userId) { private void setUserResource(UserDetail detail, Integer userId) {
ServiceResponse<UserResourceDTO> resource = this.userResourceApiService.getResourceByUserId(userId); ServiceResponse<UserResourceDTO> resource = this.userResourceApiService.getResourceByUserId(userId);
detail.setUserResourceInfo(new UserResourceInfo()); detail.setUserResourceInfo(new UserResourceInfo());
......
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