Commit 9b62a01a by guojuxing

status改成delete_flag

parent cfab6657
......@@ -47,9 +47,9 @@ public class AccountGroupDTO implements Serializable{
private Integer enterpriseId;
/**
* 1:有效 0:无效
* 0:有效 1:无效
*/
private Integer status;
private Integer deleteFlag;
/**
* 排序
......@@ -95,12 +95,13 @@ public class AccountGroupDTO implements Serializable{
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public AccountGroupDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Integer getSort() {
......@@ -141,7 +142,7 @@ public class AccountGroupDTO implements Serializable{
"accountGroupId=" + accountGroupId +
", accountGroupName='" + accountGroupName + '\'' +
", enterpriseId=" + enterpriseId +
", status=" + status +
", deleteFlag=" + deleteFlag +
", sort=" + sort +
", createTime=" + createTime +
", updateTime=" + updateTime +
......
......@@ -34,9 +34,9 @@ public class AccountGroupRelDTO implements Serializable{
private Integer enterpriseId;
/**
* 1:有效 0:无效
* 0:有效 1:无效
*/
private Integer status;
private Integer deleteFlag;
/**
* 1:管理员 2:协作人
......@@ -86,14 +86,6 @@ public class AccountGroupRelDTO implements Serializable{
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getType() {
return type;
}
......@@ -118,6 +110,15 @@ public class AccountGroupRelDTO implements Serializable{
this.updateTime = updateTime;
}
public Integer getDeleteFlag() {
return deleteFlag;
}
public AccountGroupRelDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
@Override
public String toString() {
return "AccountGroupRelDTO{" +
......@@ -125,7 +126,7 @@ public class AccountGroupRelDTO implements Serializable{
", accountGroupId=" + accountGroupId +
", userId=" + userId +
", enterpriseId=" + enterpriseId +
", status=" + status +
", deleteFlag=" + deleteFlag +
", type=" + type +
", createTime=" + createTime +
", updateTime=" + updateTime +
......
......@@ -34,7 +34,7 @@ public class AuditedGroupUserRelDTO implements Serializable {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -79,12 +79,13 @@ public class AuditedGroupUserRelDTO implements Serializable {
this.userId = userId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public AuditedGroupUserRelDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......@@ -118,7 +119,7 @@ public class AuditedGroupUserRelDTO implements Serializable {
", enterpriseId=" + enterpriseId +
", auditedGroupId=" + auditedGroupId +
", userId=" + userId +
", status=" + status +
", status=" + deleteFlag +
", createTime=" + createTime +
", updateTime=" + updateTime +
", auditedGroupIdList=" + auditedGroupIdList +
......
......@@ -35,7 +35,7 @@ public class AuditorAuditedGroupRelDTO implements Serializable {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -80,12 +80,13 @@ public class AuditorAuditedGroupRelDTO implements Serializable {
this.auditedGroupId = auditedGroupId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public AuditorAuditedGroupRelDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......@@ -119,7 +120,7 @@ public class AuditorAuditedGroupRelDTO implements Serializable {
", enterpriseId=" + enterpriseId +
", auditorId=" + auditorId +
", auditedGroupId=" + auditedGroupId +
", status=" + status +
", status=" + deleteFlag +
", createTime=" + createTime +
", updateTime=" + updateTime +
", auditorIdList=" + auditorIdList +
......
......@@ -35,9 +35,9 @@ public class AuthCodeDTO implements Serializable {
private Integer relationId;
/**
* 1有效 0失效
* 0有效 1失效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -77,12 +77,13 @@ public class AuthCodeDTO implements Serializable {
this.relationId = relationId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public AuthCodeDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getExpirationTime() {
......@@ -100,7 +101,7 @@ public class AuthCodeDTO implements Serializable {
", authCode='" + authCode + '\'' +
", enterpriseId=" + enterpriseId +
", relationId=" + relationId +
", status=" + status +
", deleteFlag=" + deleteFlag +
", expirationTime=" + expirationTime +
'}';
}
......
......@@ -49,9 +49,9 @@ public class BusinessFrontResDTO implements Serializable{
private Integer enterpriseId;
/**
* 状态1:有效 0:无效
* 状态0:有效 1:无效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -119,12 +119,13 @@ public class BusinessFrontResDTO implements Serializable{
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public BusinessFrontResDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......@@ -153,7 +154,7 @@ public class BusinessFrontResDTO implements Serializable{
", pageName='" + pageName + '\'' +
", resourceDetail='" + resourceDetail + '\'' +
", enterpriseId=" + enterpriseId +
", status=" + status +
", deleteFlag=" + deleteFlag +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
......
......@@ -83,9 +83,9 @@ public class CollaboratorDTO implements Serializable{
private String subAppIds;
/**
* 状态: 0:无效 1:youxiao
* 状态: 1:无效 0:youxiao
*/
private Integer status;
private Integer deleteFlag;
/**
* 创建时间
......@@ -167,12 +167,13 @@ public class CollaboratorDTO implements Serializable{
this.subAppIds = subAppIds;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public CollaboratorDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......@@ -253,7 +254,7 @@ public class CollaboratorDTO implements Serializable{
", creator='" + creator + '\'' +
", resourceIds='" + resourceIds + '\'' +
", subAppIds='" + subAppIds + '\'' +
", status=" + status +
", deleteFlag=" + deleteFlag +
", createTime=" + createTime +
", updateTime=" + updateTime +
", subAppIdList=" + subAppIdList +
......
......@@ -59,6 +59,8 @@ public class CollaboratorListDTO implements Serializable{
*/
private Integer status;
private Integer deleteFlag;
/**
* 创建时间
*/
......@@ -137,6 +139,15 @@ public class CollaboratorListDTO implements Serializable{
}
public Integer getStatus() {
if (deleteFlag == null) {
return 0;
}
if (deleteFlag == 1) {
return 0;
}
if (deleteFlag == 0) {
return 1;
}
return status;
}
......@@ -152,6 +163,15 @@ public class CollaboratorListDTO implements Serializable{
this.createTime = createTime;
}
public Integer getDeleteFlag() {
return deleteFlag;
}
public CollaboratorListDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
@Override
public String toString() {
return "CollaboratorListDTO{" +
......@@ -165,6 +185,7 @@ public class CollaboratorListDTO implements Serializable{
", appName='" + appName + '\'' +
", creator='" + creator + '\'' +
", status=" + status +
", deleteFlag=" + deleteFlag +
", createTime=" + createTime +
'}';
}
......
......@@ -43,9 +43,9 @@ public class MenuAuthDepartDTO implements Serializable{
private String positionName;
/**
* 1:有效 0:无效
* 0:有效 1:无效
*/
private Integer status;
private Integer deleteFlag;
/**
* 创建时间
......@@ -112,12 +112,12 @@ public class MenuAuthDepartDTO implements Serializable{
return this;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public MenuAuthDepartDTO setStatus(Integer status) {
this.status = status;
public MenuAuthDepartDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
......@@ -148,7 +148,7 @@ public class MenuAuthDepartDTO implements Serializable{
", departName='" + departName + '\'' +
", positionCode='" + positionCode + '\'' +
", positionName='" + positionName + '\'' +
", status=" + status +
", deleteFlag=" + deleteFlag +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
......
......@@ -112,9 +112,9 @@ public class MenuDTO implements Serializable {
private Integer sort;
/**
* 0删除1有效
* 1删除0有效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -254,12 +254,13 @@ public class MenuDTO implements Serializable {
this.sort = sort;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public MenuDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Integer getLevel() {
......@@ -388,7 +389,7 @@ public class MenuDTO implements Serializable {
", target=" + target +
", iconUrl='" + iconUrl + '\'' +
", sort=" + sort +
", status=" + status +
", status=" + deleteFlag +
", level=" + level +
", isShow=" + isShow +
", menuCode='" + menuCode + '\'' +
......
......@@ -29,9 +29,9 @@ public class MenuItemDTO implements Serializable{
private Integer itemId;
/**
* 1:有效 0:无效
* 0:有效 1:无效
*/
private Integer status;
private Integer deleteFlag;
/**
* 创建时间
......@@ -67,12 +67,13 @@ public class MenuItemDTO implements Serializable{
this.itemId = itemId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public MenuItemDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......@@ -97,7 +98,7 @@ public class MenuItemDTO implements Serializable{
"menuItemId=" + menuItemId +
", menuId=" + menuId +
", itemId=" + itemId +
", status=" + status +
", deleteFlag=" + deleteFlag +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
......
......@@ -42,9 +42,9 @@ public class MenuRoleDTO implements Serializable{
private Integer enterpriseId;
/**
* 状态1:有效 0:无效
* 状态0:有效 1:无效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -88,12 +88,13 @@ public class MenuRoleDTO implements Serializable{
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public MenuRoleDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......@@ -119,7 +120,7 @@ public class MenuRoleDTO implements Serializable{
", menuId=" + menuId +
", roleId=" + roleId +
", enterpriseId=" + enterpriseId +
", status=" + status +
", status=" + deleteFlag +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
......
......@@ -29,9 +29,9 @@ public class OperationUserDTO implements Serializable{
private String phoneNumber;
/**
* 状态,1有效,0无效
* 状态,0有效,1无效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -77,12 +77,13 @@ public class OperationUserDTO implements Serializable{
this.phoneNumber = phoneNumber;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public OperationUserDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......@@ -123,7 +124,7 @@ public class OperationUserDTO implements Serializable{
"operationUserId=" + operationUserId +
", operationUserName='" + operationUserName + '\'' +
", phoneNumber='" + phoneNumber + '\'' +
", status=" + status +
", status=" + deleteFlag +
", createTime=" + createTime +
", updateTime=" + updateTime +
", enterpriseId=" + enterpriseId +
......
......@@ -44,7 +44,7 @@ public class OrderAppResourceDTO implements Serializable {
/**
*
*/
private Integer status;
private Integer deleteFlag;
public Integer getOrderAppResourceId() {
return orderAppResourceId;
......@@ -94,12 +94,13 @@ public class OrderAppResourceDTO implements Serializable {
this.updateTime = updateTime;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public OrderAppResourceDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
@Override
......@@ -111,7 +112,7 @@ public class OrderAppResourceDTO implements Serializable {
", content='" + content + '\'' +
", createTime=" + createTime +
", updateTime=" + updateTime +
", status=" + status +
", status=" + deleteFlag +
'}';
}
}
......@@ -41,9 +41,9 @@ public class RoleDTO implements Serializable{
private Integer enterpriseId;
/**
* 状态1:有效 0:无效
* 状态0:有效 1:无效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -84,12 +84,13 @@ public class RoleDTO implements Serializable{
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public RoleDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......@@ -122,7 +123,7 @@ public class RoleDTO implements Serializable{
"roleId=" + roleId +
", roleName='" + roleName + '\'' +
", enterpriseId=" + enterpriseId +
", status=" + status +
", status=" + deleteFlag +
", createTime=" + createTime +
", updateTime=" + updateTime +
", menuIds='" + menuIds + '\'' +
......
......@@ -36,7 +36,7 @@ public class UnionEnterpriseDTO implements Serializable {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
* 授权状态,1授权中 2授权成功 3授权失败
......@@ -80,12 +80,13 @@ public class UnionEnterpriseDTO implements Serializable {
this.unionEnterpriseName = unionEnterpriseName;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public UnionEnterpriseDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Integer getAuthorizationStatus() {
......@@ -185,7 +186,7 @@ public class UnionEnterpriseDTO implements Serializable {
", unionCompanyName='" + unionCompanyName + '\'' +
", unionManagerName='" + unionManagerName + '\'' +
", unionManagerPhone='" + unionManagerPhone + '\'' +
", status=" + status +
", status=" + deleteFlag +
", authorizationStatus=" + authorizationStatus +
", authorizationTime=" + authorizationTime +
", enterpriseId=" + enterpriseId +
......
......@@ -68,9 +68,9 @@ public class UserDTO implements Serializable{
private Integer superAdmin;
/**
* 状态,1有效,0无效
* 状态,0有效,1无效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -180,12 +180,13 @@ public class UserDTO implements Serializable{
this.superAdmin = superAdmin;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public UserDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......@@ -330,7 +331,7 @@ public class UserDTO implements Serializable{
", passwordType=" + passwordType +
", confirmPassword='" + confirmPassword + '\'' +
", superAdmin=" + superAdmin +
", status=" + status +
", status=" + deleteFlag +
", createTime=" + createTime +
", updateTime=" + updateTime +
", enterpriseId=" + enterpriseId +
......
......@@ -43,9 +43,9 @@ public class UserResourceDTO implements Serializable{
private Integer enterpriseId;
/**
* 状态1:有效 0:无效
* 状态0:有效 1:无效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -89,12 +89,13 @@ public class UserResourceDTO implements Serializable{
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public UserResourceDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......@@ -120,7 +121,7 @@ public class UserResourceDTO implements Serializable{
", resourceId=" + resourceId +
", userId=" + userId +
", enterpriseId=" + enterpriseId +
", status=" + status +
", status=" + deleteFlag +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
......
......@@ -42,9 +42,9 @@ public class UserRoleDTO implements Serializable{
private Integer enterpriseId;
/**
* 状态1:有效 0:无效
* 状态0:有效 1:无效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -88,12 +88,13 @@ public class UserRoleDTO implements Serializable{
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public UserRoleDTO setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......@@ -119,7 +120,7 @@ public class UserRoleDTO implements Serializable{
", roleId=" + roleId +
", userId=" + userId +
", enterpriseId=" + enterpriseId +
", status=" + status +
", status=" + deleteFlag +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
......
......@@ -23,6 +23,8 @@ public class CollaboratorListQO extends PageQO{
private Integer status;
private Integer deleteFlag;
private Integer enterpriseId;
private Integer accountGroupId;
......@@ -76,4 +78,19 @@ public class CollaboratorListQO extends PageQO{
public void setCollaboratorIdList(List<Integer> 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;
}
}
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;
* @date 2020-09-10 9:38
*/
public interface TabAuditedGroupMapper {
/**
* 根据主键删除
*
* @param auditedGroupId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer auditedGroupId);
/**
* 插入一条记录
......
......@@ -16,13 +16,6 @@ import java.util.Map;
* @date 2020-09-10 9:38
*/
public interface TabAuditedGroupUserRelMapper {
/**
* 根据主键删除
*
* @param auditedGroupUserRelId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer auditedGroupUserRelId);
/**
* 插入一条记录
......
......@@ -15,13 +15,6 @@ import java.util.Map;
* @date 2020-09-10 9:39
*/
public interface TabAuditorAuditedGroupRelMapper {
/**
* 根据主键删除
*
* @param auditorAuditedGroupRelId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer auditorAuditedGroupRelId);
/**
* 插入一条记录
......
......@@ -14,13 +14,7 @@ import org.apache.ibatis.annotations.Param;
* @date 2020-09-10 9:39
*/
public interface TabAuditorMapper {
/**
* 根据主键删除
*
* @param auditorId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer auditorId);
/**
* 插入一条记录
......
......@@ -15,13 +15,7 @@ import java.util.Map;
* @date 2020-09-10 9:39
*/
public interface TabAuditorProjectItemRelMapper {
/**
* 根据主键删除
*
* @param auditorProjectItemRelId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer auditorProjectItemRelId);
/**
* 插入一条记录
......
......@@ -13,13 +13,7 @@ import java.util.List;
* @date 2020-09-10 9:39
*/
public interface TabSysAccountGroupMapper {
/**
* 根据主键删除
*
* @param accountGroupId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer accountGroupId);
/**
* 插入一条记录
......
......@@ -15,13 +15,6 @@ import java.util.List;
* @date 2020-09-10 9:39
*/
public interface TabSysAccountGroupRelMapper {
/**
* 根据主键删除
*
* @param accountGroupRelId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer accountGroupRelId);
/**
* 插入一条记录
......
......@@ -14,14 +14,6 @@ import java.util.List;
*/
public interface TabSysAuthCodeMapper {
/**
* 根据主键删除
*
* @param authCodeId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer authCodeId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -13,13 +13,7 @@ import java.util.List;
* @date 2020-09-10 9:39
*/
public interface TabSysBusinessFrontResMapper {
/**
* 根据主键删除
*
* @param resourceId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer resourceId);
/**
* 插入一条记录
......
......@@ -15,13 +15,6 @@ import java.util.List;
* @date 2020-09-10 9:39
*/
public interface TabSysCollaboratorMapper {
/**
* 根据主键删除
*
* @param collaboratorId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer collaboratorId);
/**
* 插入一条记录
......
......@@ -13,13 +13,7 @@ import java.util.List;
* @date 2020-09-10 9:40
*/
public interface TabSysCollaboratorRoleRelMapper {
/**
* 根据主键删除
*
* @param collaboratorRoleRelId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer collaboratorRoleRelId);
/**
* 插入一条记录
......
......@@ -14,13 +14,7 @@ import java.util.List;
* @date 2020-09-10 9:40
*/
public interface TabSysMenuAuthDepartMapper {
/**
* 根据主键删除
*
* @param menuDepartId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer menuDepartId);
/**
* 插入一条记录
......
......@@ -15,13 +15,7 @@ import java.util.List;
* @date 2020-09-10 9:40
*/
public interface TabSysMenuItemMapper {
/**
* 根据主键删除
*
* @param menuItemId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer menuItemId);
/**
* 插入一条记录
......
......@@ -14,13 +14,7 @@ import java.util.List;
* @date 2020-09-10 9:41
*/
public interface TabSysMenuRoleMapper {
/**
* 根据主键删除
*
* @param menuRoleId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer menuRoleId);
/**
* 插入一条记录
......
......@@ -11,13 +11,7 @@ import org.apache.ibatis.annotations.Param;
* @date 2020-09-10 9:41
*/
public interface TabSysOperationUserMapper {
/**
* 根据主键删除
*
* @param operationUserId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer operationUserId);
/**
* 插入一条记录
......
......@@ -12,13 +12,7 @@ import java.util.List;
* @date 2020-09-10 9:41
*/
public interface TabSysOrderAppResourceMapper {
/**
* 根据主键删除
*
* @param orderAppResourceId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer orderAppResourceId);
/**
* 插入一条记录
......
......@@ -15,13 +15,6 @@ import java.util.List;
* @date 2020-09-10 9:41
*/
public interface TabSysResourceMapper {
/**
* 根据主键删除
*
* @param resourceId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer resourceId);
/**
* 插入一条记录
......
......@@ -16,14 +16,6 @@ import java.util.List;
*/
public interface TabSysRoleMapper {
/**
* 根据主键删除
*
* @param roleId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer roleId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -14,13 +14,7 @@ import java.util.List;
* @date 2020-09-10 9:42
*/
public interface TabSysUnionEnterpriseMapper {
/**
* 根据主键删除
*
* @param unionId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer unionId);
/**
* 插入一条记录
......
......@@ -14,13 +14,6 @@ import java.util.List;
* @date 2020-09-10 9:42
*/
public interface TabSysUnionEnterpriseResourceMapper {
/**
* 根据主键删除
*
* @param unionResourceId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer unionResourceId);
/**
* 插入一条记录
......
......@@ -15,13 +15,6 @@ import java.util.List;
* @date 2020-09-10 9:42
*/
public interface TabSysUserMapper {
/**
* 根据主键删除
*
* @param userId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer userId);
/**
* 插入一条记录
......
......@@ -15,13 +15,7 @@ import java.util.Map;
* @date 2020-09-10 9:44
*/
public interface TabSysUserResourceMapper {
/**
* 根据主键删除
*
* @param userResourceId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer userResourceId);
/**
* 插入一条记录
......
......@@ -12,13 +12,7 @@ import java.util.List;
* @date 2020-09-10 9:45
*/
public interface TabSysUserRoleMapper {
/**
* 根据主键删除
*
* @param userRoleId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer userRoleId);
/**
* 插入一条记录
......
......@@ -36,7 +36,7 @@ public class TabAuditedGroup {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -80,12 +80,13 @@ public class TabAuditedGroup {
this.allCheck = allCheck;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabAuditedGroup setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......
......@@ -36,7 +36,7 @@ public class TabAuditedGroupUserRel {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -80,12 +80,13 @@ public class TabAuditedGroupUserRel {
this.userId = userId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabAuditedGroupUserRel setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......
......@@ -51,7 +51,7 @@ public class TabAuditor {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -119,12 +119,13 @@ public class TabAuditor {
this.isUse = isUse;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabAuditor setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......
......@@ -36,7 +36,7 @@ public class TabAuditorAuditedGroupRel {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -80,12 +80,13 @@ public class TabAuditorAuditedGroupRel {
this.auditedGroupId = auditedGroupId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabAuditorAuditedGroupRel setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......
......@@ -36,7 +36,7 @@ public class TabAuditorProjectItemRel {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -80,12 +80,13 @@ public class TabAuditorProjectItemRel {
this.projectItemId = projectItemId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabAuditorProjectItemRel setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......
......@@ -29,9 +29,9 @@ public class TabSysAccountGroup {
private Integer enterpriseId;
/**
* 1:有效 0:无效
* 0:有效 1:无效
*/
private Integer status;
private Integer deleteFlag;
/**
* 排序
......@@ -72,12 +72,13 @@ public class TabSysAccountGroup {
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabSysAccountGroup setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Integer getSort() {
......
......@@ -34,9 +34,9 @@ public class TabSysAccountGroupRel {
private Integer enterpriseId;
/**
* 1:有效 0:无效
* 0:有效 1:无效
*/
private Integer status;
private Integer deleteFlag;
/**
* 1:管理员 2:协作人
......@@ -85,14 +85,6 @@ public class TabSysAccountGroupRel {
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getType() {
return type;
}
......
......@@ -34,9 +34,9 @@ public class TabSysAuthCode {
private Integer relationId;
/**
* 1有效 0失效
* 0有效 1失效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -85,12 +85,13 @@ public class TabSysAuthCode {
this.relationId = relationId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabSysAuthCode setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......
......@@ -49,9 +49,9 @@ public class TabSysBusinessFrontRes {
private Integer enterpriseId;
/**
* 状态1:有效 0:无效
* 状态0:有效 1:无效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -119,12 +119,13 @@ public class TabSysBusinessFrontRes {
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabSysBusinessFrontRes setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......
......@@ -64,9 +64,9 @@ public class TabSysCollaborator {
private String subAppIds;
/**
* 状态: 0:无效 1:youxiao
* 状态: 1:无效 0:youxiao
*/
private Integer status;
private Integer deleteFlag;
/**
* 创建时间
......@@ -150,12 +150,13 @@ public class TabSysCollaborator {
this.subAppIds = subAppIds;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabSysCollaborator setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......
......@@ -29,9 +29,9 @@ public class TabSysCollaboratorRoleRel {
private Integer menuId;
/**
* 0:无效2:有效
* 1:无效0:有效
*/
private Integer status;
private Integer deleteFlag;
/**
* 创建时间
......@@ -67,12 +67,13 @@ public class TabSysCollaboratorRoleRel {
this.menuId = menuId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabSysCollaboratorRoleRel setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......
......@@ -54,9 +54,9 @@ public class TabSysMenu {
private Integer sort;
/**
* 0删除1有效
* 1删除0有效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -187,12 +187,13 @@ public class TabSysMenu {
this.sort = sort;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabSysMenu setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......
......@@ -44,9 +44,9 @@ public class TabSysMenuAuthDepart {
private String positionName;
/**
* 1:有效 0:无效
* 0:有效 1:无效
*/
private Integer status;
private Integer deleteFlag;
/**
* 创建时间
......@@ -112,12 +112,12 @@ public class TabSysMenuAuthDepart {
return this;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public TabSysMenuAuthDepart setStatus(Integer status) {
this.status = status;
public TabSysMenuAuthDepart setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
......
......@@ -29,9 +29,9 @@ public class TabSysMenuItem {
private Integer itemId;
/**
* 1:有效 0:无效
* 0:有效 1:无效
*/
private Integer status;
private Integer deleteFlag;
/**
* 创建时间
......@@ -67,12 +67,13 @@ public class TabSysMenuItem {
this.itemId = itemId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabSysMenuItem setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......
......@@ -34,9 +34,9 @@ public class TabSysMenuRole {
private Integer enterpriseId;
/**
* 状态1:有效 0:无效
* 状态0:有效 1:无效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -80,12 +80,13 @@ public class TabSysMenuRole {
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabSysMenuRole setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......
......@@ -29,9 +29,9 @@ public class TabSysOperationUser {
private String phoneNumber;
/**
* 状态,1有效,0无效
* 状态,0有效,1无效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -77,12 +77,13 @@ public class TabSysOperationUser {
this.phoneNumber = phoneNumber;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabSysOperationUser setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......
......@@ -46,7 +46,7 @@ public class TabSysOrderAppResource {
/**
*
*/
private Integer status;
private Integer deleteFlag;
public Integer getOrderAppResourceId() {
return orderAppResourceId;
......@@ -96,11 +96,12 @@ public class TabSysOrderAppResource {
this.updateTime = updateTime;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabSysOrderAppResource setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
}
\ No newline at end of file
......@@ -113,7 +113,7 @@ public class TabSysResource {
/**
*
*/
private Integer status;
private Integer deleteFlag;
public Integer getResourceId() {
return resourceId;
......@@ -235,11 +235,12 @@ public class TabSysResource {
this.updateTime = updateTime;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabSysResource setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
}
\ No newline at end of file
......@@ -29,9 +29,9 @@ public class TabSysRole {
private Integer enterpriseId;
/**
* 状态1:有效 0:无效
* 状态0:有效 1:无效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -67,12 +67,13 @@ public class TabSysRole {
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabSysRole setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......
......@@ -31,7 +31,7 @@ public class TabSysUnionEnterprise {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
* 授权状态,1授权中 2授权成功 3授权失败
......@@ -82,12 +82,13 @@ public class TabSysUnionEnterprise {
this.unionEnterpriseName = unionEnterpriseName;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabSysUnionEnterprise setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Integer getAuthorizationStatus() {
......
......@@ -66,7 +66,7 @@ public class TabSysUnionEnterpriseResource {
/**
*
*/
private Integer status;
private Integer deleteFlag;
public Integer getUnionResourceId() {
return unionResourceId;
......@@ -148,11 +148,12 @@ public class TabSysUnionEnterpriseResource {
this.updateTime = updateTime;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabSysUnionEnterpriseResource setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
}
\ No newline at end of file
......@@ -39,9 +39,9 @@ public class TabSysUser {
private Integer superAdmin;
/**
* 状态,1有效,0无效
* 状态,0有效,1无效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -133,12 +133,13 @@ public class TabSysUser {
this.superAdmin = superAdmin;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabSysUser setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......
......@@ -34,9 +34,9 @@ public class TabSysUserResource {
private Integer enterpriseId;
/**
* 状态1:有效 0:无效
* 状态0:有效 1:无效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -80,12 +80,13 @@ public class TabSysUserResource {
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabSysUserResource setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......
......@@ -34,9 +34,9 @@ public class TabSysUserRole {
private Integer enterpriseId;
/**
* 状态1:有效 0:无效
* 状态0:有效 1:无效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -80,12 +80,13 @@ public class TabSysUserRole {
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public TabSysUserRole setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
return this;
}
public Date getCreateTime() {
......
package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysAccountGroupMapper;
import com.gic.auth.dto.AccountGroupDTO;
import com.gic.auth.entity.TabSysAccountGroup;
......@@ -24,7 +25,7 @@ public class AccountGroupServiceImpl implements AccountGroupService{
private TabSysAccountGroupMapper tabSysAccountGroupMapper;
@Override
public int save(AccountGroupDTO dto) {
dto.setStatus(1);
dto.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
dto.setCreateTime(new Date());
dto.setUpdateTime(new Date());
TabSysAccountGroup record = EntityUtil.changeEntityNew(TabSysAccountGroup.class, dto);
......@@ -73,7 +74,7 @@ public class AccountGroupServiceImpl implements AccountGroupService{
public int updateStatusByAccountGroupId(Integer accountGroupId) {
TabSysAccountGroup record = new TabSysAccountGroup();
record.setAccountGroupId(accountGroupId);
record.setStatus(0);
record.setDeleteFlag(DeleteFlagConstants.DELETE_STATUS);
return tabSysAccountGroupMapper.updateByPrimaryKeySelective(record);
}
......
package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabAuditedGroupMapper;
import com.gic.auth.dto.AuditedGroupDTO;
import com.gic.auth.entity.TabAuditedGroup;
......@@ -41,7 +42,7 @@ public class AuditedGroupServiceImpl implements AuditedGroupService {
@Override
public Integer save(AuditedGroupDTO auditedGroupDTO) {
TabAuditedGroup auditedGroup = EntityUtil.changeEntityByJSON(TabAuditedGroup.class, auditedGroupDTO);
auditedGroup.setStatus(GlobalInfo.DATA_STATUS_NORMAL);
auditedGroup.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
auditedGroup.setCreateTime(new Date());
tabAuditedGroupMapper.insertSelective(auditedGroup);
return auditedGroup.getAuditedGroupId();
......@@ -70,7 +71,7 @@ public class AuditedGroupServiceImpl implements AuditedGroupService {
@Override
public TabAuditedGroup getAuditedGroup(Integer 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
......
package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabAuditedGroupUserRelMapper;
import com.gic.auth.dto.AuditedGroupDTO;
import com.gic.auth.dto.AuditedGroupUserRelDTO;
......@@ -36,7 +37,7 @@ public class AuditedGroupUserRelServiceImpl implements AuditedGroupUserRelServic
auditedGroupUserRel.setEnterpriseId(auditedGroupDTO.getEnterpriseId());
auditedGroupUserRel.setAuditedGroupId(auditedGroupDTO.getAuditedGroupId());
auditedGroupUserRel.setUserId(userId);
auditedGroupUserRel.setStatus(GlobalInfo.DATA_STATUS_NORMAL);
auditedGroupUserRel.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
auditedGroupUserRel.setCreateTime(new Date());
tabAuditedGroupUserRelMapper.insertSelectiveByNotExist(auditedGroupUserRel);
}
......
package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabAuditorAuditedGroupRelMapper;
import com.gic.auth.dto.AuditorAuditedGroupRelDTO;
import com.gic.auth.entity.TabAuditedGroupUserRel;
......@@ -45,7 +46,7 @@ public class AuditorAuditedGroupRelServiceImpl implements AuditorAuditedGroupRel
itemRel.setEnterpriseId(enterpriseId);
itemRel.setAuditorId(auditorId);
itemRel.setAuditedGroupId(auditedGroupId);
itemRel.setStatus(GlobalInfo.DATA_STATUS_NORMAL);
itemRel.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
itemRel.setCreateTime(new Date());
tabAuditorAuditedGroupRelMapper.insertSelectiveByNotExist(itemRel);
}
......
package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabAuditorProjectItemRelMapper;
import com.gic.auth.entity.TabAuditorProjectItemRel;
import com.gic.auth.service.AuditorProjectItemRelService;
......@@ -34,7 +35,7 @@ public class AuditorProjectItemRelServiceImpl implements AuditorProjectItemRelSe
itemRel.setEnterpriseId(enterpriseId);
itemRel.setAuditorId(auditorId);
itemRel.setProjectItemId(projectItemId);
itemRel.setStatus(GlobalInfo.DATA_STATUS_NORMAL);
itemRel.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
itemRel.setCreateTime(new Date());
tabAuditorProjectItemRelMapper.insertSelectiveByNotExist(itemRel);
}
......
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.TabAuditorMapper;
import com.gic.auth.dto.AuditorAuditedGroupRelDTO;
......@@ -71,7 +72,7 @@ public class AuditorServiceImpl implements AuditorService {
auditor.setPhone(copy.getPhone());
auditor.setUserId(copy.getUserId());
auditor.setIsUse(copy.getIsUse());
auditor.setStatus(GlobalInfo.DATA_STATUS_NORMAL);
auditor.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
auditor.setCreateTime(new Date());
tabAuditorMapper.insertSelective(auditor);
return auditor.getAuditorId();
......@@ -93,7 +94,7 @@ public class AuditorServiceImpl implements AuditorService {
@Override
public TabAuditor getAuditor(Integer 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 null;
......
package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysAuthCodeMapper;
import com.gic.auth.entity.TabSysAuthCode;
import com.gic.auth.service.AuthCodeService;
......@@ -30,7 +31,7 @@ public class AuthCodeServiceImpl implements AuthCodeService {
public int expireAuthCode(Integer authCodeId) {
TabSysAuthCode tabSysAuthCode = new TabSysAuthCode();
tabSysAuthCode.setAuthCodeId(authCodeId);
tabSysAuthCode.setStatus(Constants.DEL_STATUS);
tabSysAuthCode.setDeleteFlag(DeleteFlagConstants.DELETE_STATUS);
return this.tabSysAuthCodeMapper.updateByPrimaryKeySelective(tabSysAuthCode);
}
......
package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysBusinessFrontResMapper;
import com.gic.auth.dto.BusinessFrontResDTO;
import com.gic.auth.entity.TabSysBusinessFrontRes;
......@@ -25,7 +26,7 @@ public class BusinessFrontResServiceImpl implements BusinessFrontResService{
@Override
public Integer save(BusinessFrontResDTO dto) {
dto.setStatus(1);
dto.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
dto.setCreateTime(new Date());
dto.setUpdateTime(new Date());
TabSysBusinessFrontRes record = EntityUtil.changeEntityNew(TabSysBusinessFrontRes.class, dto);
......@@ -49,7 +50,7 @@ public class BusinessFrontResServiceImpl implements BusinessFrontResService{
public void delete(Integer resourceId) {
TabSysBusinessFrontRes record = new TabSysBusinessFrontRes();
record.setResourceId(resourceId);
record.setStatus(0);
record.setDeleteFlag(DeleteFlagConstants.DELETE_STATUS);
record.setUpdateTime(new Date());
tabSysBusinessFrontResMapper.updateByPrimaryKeySelective(record);
}
......
package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysCollaboratorMapper;
import com.gic.auth.dto.CollaboratorDTO;
import com.gic.auth.dto.CollaboratorListDTO;
......@@ -31,7 +32,7 @@ public class CollaboratorServiceImpl implements CollaboratorService {
public Integer save(CollaboratorDTO dto) {
dto.setCreateTime(new Date());
dto.setUpdateTime(new Date());
dto.setStatus(1);
dto.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
TabSysCollaborator record = EntityUtil.changeEntityNew(TabSysCollaborator.class, dto);
tabSysCollaboratorMapper.insertSelective(record);
return record.getCollaboratorId();
......
package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysMenuMapper;
import com.gic.auth.dto.AuthItemListDTO;
import com.gic.auth.dto.MenuDTO;
......@@ -55,7 +56,7 @@ public class MenuServiceImpl implements MenuService {
//默认gic平台菜单
record.setPlatformType(0);
}
record.setStatus(1);
record.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
if (StringUtils.isBlank(menuDTO.getMenuCode())) {
//权限项没有菜单code数据,但是这样会导致不好批量上传到生产,给一个默认的数据
record.setMenuCode(menuDTO.getParentCode() + "-" + menuDTO.getLevel() + menuDTO.getSort());
......
package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysOperationUserMapper;
import com.gic.auth.dto.OperationUserDTO;
import com.gic.auth.entity.TabSysOperationUser;
......@@ -32,7 +33,7 @@ public class OperationUserServiceImpl implements OperationUserService{
public Integer save(OperationUserDTO dto) {
dto.setCreateTime(new Date());
dto.setUpdateTime(new Date());
dto.setStatus(1);
dto.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
if (StringUtils.isBlank(dto.getPhoneAreaCode())) {
dto.setPhoneAreaCode("86");
}
......
package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysOrderAppResourceMapper;
import com.gic.auth.dto.OrderAppResourceDTO;
import com.gic.auth.entity.TabSysOrderAppResource;
......@@ -28,7 +29,7 @@ public class OrderAppResourceServiceImpl implements OrderAppResourceService {
public Integer save(OrderAppResourceDTO orderAppResourceDTO) {
TabSysOrderAppResource resource = EntityUtil.changeEntityByJSON(TabSysOrderAppResource.class, orderAppResourceDTO);
resource.setCreateTime(new Date());
resource.setStatus(GlobalInfo.DATA_STATUS_NORMAL);
resource.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
tabSysOrderAppResourceMapper.insertSelective(resource);
return resource.getOrderAppResourceId();
}
......@@ -45,7 +46,7 @@ public class OrderAppResourceServiceImpl implements OrderAppResourceService {
public Integer del(Integer orderAppResourceId) {
TabSysOrderAppResource orderAppResource = new TabSysOrderAppResource();
orderAppResource.setOrderAppResourceId(orderAppResourceId);
orderAppResource.setStatus(GlobalInfo.DATA_STATUS_DELETE);
orderAppResource.setDeleteFlag(DeleteFlagConstants.DELETE_STATUS);
return tabSysOrderAppResourceMapper.updateByPrimaryKeySelective(orderAppResource);
}
......
package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysResourceMapper;
import com.gic.auth.dto.ResourceDTO;
import com.gic.auth.entity.TabSysResource;
......@@ -31,7 +32,7 @@ public class ResourceServiceImpl implements ResourceService {
@Override
public Integer save(ResourceDTO resourceDTO) {
TabSysResource resource = EntityUtil.changeEntityByOrika(TabSysResource.class, resourceDTO);
resource.setStatus(GlobalInfo.DATA_STATUS_NORMAL);
resource.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
resource.setCreateTime(new Date());
return tabSysResourceMapper.insertSelective(resource);
}
......@@ -45,7 +46,7 @@ public class ResourceServiceImpl implements ResourceService {
@Override
public Integer delResource(Integer resourceId) {
TabSysResource resource = new TabSysResource();
resource.setStatus(GlobalInfo.DATA_STATUS_DELETE);
resource.setDeleteFlag(DeleteFlagConstants.DELETE_STATUS);
resource.setResourceId(resourceId);
return tabSysResourceMapper.updateByPrimaryKeySelective(resource);
}
......
package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysUnionEnterpriseMapper;
import com.gic.auth.entity.TabSysUnionEnterprise;
import com.gic.auth.service.UnionEnterpriseService;
......@@ -46,7 +47,7 @@ public class UnionEnterpriseServiceImpl implements UnionEnterpriseService {
public int delUnionEnterprise(Integer id) {
TabSysUnionEnterprise enterprise = new TabSysUnionEnterprise();
enterprise.setUnionId(id);
enterprise.setStatus(Constants.DEL_STATUS);
enterprise.setDeleteFlag(DeleteFlagConstants.DELETE_STATUS);
return this.tabSysUnionEnterpriseMapper.updateByPrimaryKeySelective(enterprise);
}
......
package com.gic.auth.service.impl;
import com.gic.auth.constant.AuthorizationStatusEnum;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dao.mapper.TabSysUnionEnterpriseResourceMapper;
import com.gic.auth.dto.UnionEnterpriseResourceDTO;
import com.gic.auth.entity.TabSysUnionEnterpriseResource;
......@@ -35,7 +36,7 @@ public class UnionEnterrpiseResourceServiceImpl implements UnionEnterpriseResour
return this.tabSysUnionEnterpriseResourceMapper.updateByPrimaryKeySelective(resource);
}else {
resource.setAuthorizationStatus(AuthorizationStatusEnum.NORMAL.getCode());
resource.setStatus(Constants.NORMAL_STATUS);
resource.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
resource.setUpdateTime(new Date());
resource.setCreateTime(new Date());
resource.setUnionId(unionId);
......
package com.gic.auth.service.impl;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.constant.LoginUserTypeEnum;
import com.gic.auth.dao.mapper.TabSysUserMapper;
import com.gic.auth.dto.UserDTO;
......@@ -33,7 +34,7 @@ public class UserServiceImpl implements UserService {
userDTO.setLoginType(LoginUserTypeEnum.GIC_USER.getCode());
userDTO.setCreateTime(new Date());
userDTO.setUpdateTime(new Date());
userDTO.setStatus(1);
userDTO.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
TabSysUser tabUser = EntityUtil.changeEntityNew(TabSysUser.class, userDTO);
if (tabUser.getAccountType() == null) {
//永久有效账号
......@@ -48,7 +49,7 @@ public class UserServiceImpl implements UserService {
userDTO.setLoginType(LoginUserTypeEnum.OPERATION_USER.getCode());
userDTO.setCreateTime(new Date());
userDTO.setUpdateTime(new Date());
userDTO.setStatus(1);
userDTO.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
//设置超管权限
userDTO.setSuperAdmin(1);
TabSysUser tabUser = EntityUtil.changeEntityNew(TabSysUser.class, userDTO);
......
......@@ -2,6 +2,7 @@ package com.gic.auth.service.outer.impl;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.constant.AccountGroupMemberTypeEnum;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.constant.SignConstants;
import com.gic.auth.dto.AccountGroupDTO;
import com.gic.auth.dto.AccountGroupListDTO;
......@@ -205,7 +206,7 @@ public class AccountGroupApiServiceImpl implements AccountGroupApiService {
Date now = new Date();
for (AccountGroupMemberDTO dto : list) {
AccountGroupRelDTO temp = new AccountGroupRelDTO();
temp.setStatus(1);
temp.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
if (dto.getAccountGroupId() == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "分组ID不能改为空");
}
......@@ -343,7 +344,7 @@ public class AccountGroupApiServiceImpl implements AccountGroupApiService {
List<AccountGroupRelDTO> result = new ArrayList<>();
for (Integer userId : userIdList) {
AccountGroupRelDTO temp = new AccountGroupRelDTO();
temp.setStatus(1);
temp.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
temp.setAccountGroupId(groupId);
temp.setCreateTime(now);
temp.setUpdateTime(now);
......
package com.gic.auth.service.outer.impl;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dto.AuthCodeDTO;
import com.gic.auth.entity.TabSysAuthCode;
import com.gic.auth.service.AuthCodeApiService;
......@@ -29,7 +30,7 @@ public class AuthCodeApiServiceImpl implements AuthCodeApiService {
TabSysAuthCode sysAuthCode = EntityUtil.changeEntityByJSON(TabSysAuthCode.class, authCodeDTO);
sysAuthCode.setCreateTime(new Date());
sysAuthCode.setUpdateTime(new Date());
sysAuthCode.setStatus(Constants.NORMAL_STATUS);
sysAuthCode.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
this.authCodeService.saveAuthCode(sysAuthCode);
return ServiceResponse.success(sysAuthCode.getAuthCodeId());
}
......@@ -56,7 +57,7 @@ public class AuthCodeApiServiceImpl implements AuthCodeApiService {
public ServiceResponse validateAuthCode(Integer authCodeId, String authCode) {
TabSysAuthCode sysAuthCode = this.authCodeService.getAuthCode(authCodeId);
if(sysAuthCode != null){
if(sysAuthCode.getStatus() == 0){
if(sysAuthCode.getDeleteFlag() == DeleteFlagConstants.DELETE_STATUS){
return EnterpriseServiceResponse.failure(ErrorCode.AUTHCODE_USED);
}
if(sysAuthCode.getExpirationTime().before(new Date())){
......
......@@ -3,6 +3,7 @@ package com.gic.auth.service.outer.impl;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.constant.AccountGroupMemberTypeEnum;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.constant.SignConstants;
import com.gic.auth.dto.AppDTO;
import com.gic.auth.dto.CollaboratorDTO;
......@@ -169,7 +170,7 @@ public class CollaboratorApiServiceImpl implements CollaboratorApiService {
temp.setCreateTime(now);
temp.setUpdateTime(now);
temp.setMenuId(Integer.parseInt(str));
temp.setStatus(1);
temp.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
list.add(temp);
}
collaboratorRoleRelService.deleteByCollaboratorId(collaboratorId);
......@@ -186,7 +187,7 @@ public class CollaboratorApiServiceImpl implements CollaboratorApiService {
}
CollaboratorDTO dto = new CollaboratorDTO();
dto.setCollaboratorId(collaboratorId);
dto.setStatus(0);
dto.setDeleteFlag(DeleteFlagConstants.DELETE_STATUS);
collaboratorService.update(dto);
return ServiceResponse.success();
}
......
......@@ -433,7 +433,7 @@ public class MenuApiServiceImpl implements MenuApiService {
MenuDTO menuDTO = new MenuDTO();
menuDTO.setMenuId(menuId);
menuDTO.setStatus(0);
menuDTO.setDeleteFlag(DeleteFlagConstants.DELETE_STATUS);
menuService.updatePage(menuDTO);
return ServiceResponse.success();
}
......@@ -596,7 +596,7 @@ public class MenuApiServiceImpl implements MenuApiService {
MenuItemDTO menuItemDTO = new MenuItemDTO();
menuItemDTO.setItemId(Integer.parseInt(operationItem));
menuItemDTO.setMenuId(menuId);
menuItemDTO.setStatus(1);
menuItemDTO.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
menuItemDTO.setCreateTime(now);
menuItemDTO.setUpdateTime(now);
itemDTOList.add(menuItemDTO);
......@@ -651,7 +651,7 @@ public class MenuApiServiceImpl implements MenuApiService {
MenuItemDTO menuItemDTO = new MenuItemDTO();
menuItemDTO.setItemId(Integer.parseInt(operationItem));
menuItemDTO.setMenuId(params.getMenuId());
menuItemDTO.setStatus(1);
menuItemDTO.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
menuItemDTO.setCreateTime(now);
menuItemDTO.setUpdateTime(now);
itemDTOList.add(menuItemDTO);
......@@ -767,7 +767,7 @@ public class MenuApiServiceImpl implements MenuApiService {
MenuItemDTO menuItemDTO = new MenuItemDTO();
menuItemDTO.setItemId(tempItem.getMenuId());
menuItemDTO.setMenuId(proMenu.getMenuId());
menuItemDTO.setStatus(1);
menuItemDTO.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
menuItemDTO.setCreateTime(now);
menuItemDTO.setUpdateTime(now);
itemDTOList.add(menuItemDTO);
......@@ -825,7 +825,7 @@ public class MenuApiServiceImpl implements MenuApiService {
Date now = new Date();
menuDTO.setMenuAuthDepartList(
list.stream().map(e -> e.setMenuCode(menuDTO.getMenuCode())
.setStatus(1)
.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS)
.setCreateTime(now)
.setUpdateTime(now)).collect(Collectors.toList()));
}
......
......@@ -2,6 +2,7 @@ package com.gic.auth.service.outer.impl;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dto.MenuRoleDTO;
import com.gic.auth.dto.RoleDTO;
import com.gic.auth.dto.RoleListDTO;
......@@ -51,7 +52,7 @@ public class RoleApiServiceImpl implements RoleApiService{
}
dto.setUpdateTime(new Date());
dto.setCreateTime(new Date());
dto.setStatus(1);
dto.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
//验证名称不能重复
if (roleService.isRepeatRoleName(dto.getEnterpriseId(), null, dto.getRoleName())) {
......@@ -164,7 +165,7 @@ public class RoleApiServiceImpl implements RoleApiService{
menuRoleDTO.setMenuId(Integer.parseInt(menuId));
menuRoleDTO.setCreateTime(now);
menuRoleDTO.setUpdateTime(now);
menuRoleDTO.setStatus(1);
menuRoleDTO.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
list.add(menuRoleDTO);
}
menuRoleService.insertForeach(list);
......
......@@ -3,6 +3,7 @@ package com.gic.auth.service.outer.impl;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.constant.AuthorizationStatusEnum;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.constant.ResourceTypeEnum;
import com.gic.auth.dto.UnionEnterpriseDTO;
import com.gic.auth.dto.UnionEnterpriseResourceDTO;
......@@ -45,7 +46,7 @@ public class UnionEnterpriseApiServiceImpl implements UnionEnterpriseApiService
int i = 0;
if(enterpriseDTO.getUnionId() == null) {
unionEnterprise.setCreateTime(new Date());
unionEnterprise.setStatus(Constants.NORMAL_STATUS);
unionEnterprise.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
unionEnterprise.setAuthorizationStatus(AuthorizationStatusEnum.NORMAL.getCode());
unionEnterprise.setUpdateTime(new Date());
i = this.unionEnterpriseService.saveUnionEnterprise(unionEnterprise);
......
......@@ -4,6 +4,7 @@ import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.constant.AccountGroupMemberTypeEnum;
import com.gic.auth.constant.AccountPositionEnum;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.constant.LoginUserTypeEnum;
import com.gic.auth.dto.*;
import com.gic.auth.entity.*;
......@@ -629,7 +630,7 @@ public class UserApiServiceImpl implements UserApiService {
accountGroupRelDTO.setCreateTime(now);
accountGroupRelDTO.setUpdateTime(now);
accountGroupRelDTO.setEnterpriseId(enterpriseId);
accountGroupRelDTO.setStatus(1);
accountGroupRelDTO.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
accountGroupRelDTOList.add(accountGroupRelDTO);
}
accountGroupRelService.insertFetch(accountGroupRelDTOList);
......
package com.gic.auth.service.outer.impl;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dto.UserResourceDTO;
import com.gic.auth.entity.TabSysUser;
import com.gic.auth.service.UserResourceApiService;
......@@ -40,7 +41,7 @@ public class UserResourceApiServiceImpl implements UserResourceApiService{
dto.setCreateTime(new Date());
dto.setUpdateTime(new Date());
dto.setStatus(1);
dto.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
userResourceService.save(dto);
return ServiceResponse.success();
......
package com.gic.auth.service.outer.impl;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.constant.DeleteFlagConstants;
import com.gic.auth.dto.UserRoleDTO;
import com.gic.auth.entity.TabSysUser;
import com.gic.auth.service.UserRoleApiService;
......@@ -38,7 +39,7 @@ public class UserRoleApiServiceImpl implements UserRoleApiService{
dto.setCreateTime(new Date());
dto.setUpdateTime(new Date());
dto.setStatus(1);
dto.setDeleteFlag(DeleteFlagConstants.NORMAL_STATUS);
userRoleService.save(dto);
return ServiceResponse.success();
......
......@@ -6,12 +6,12 @@
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="audited_group_name" jdbcType="VARCHAR" property="auditedGroupName" />
<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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<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
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
......@@ -20,16 +20,13 @@
from tab_audited_group
where audited_group_id = #{auditedGroupId,jdbcType=INTEGER}
</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 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)
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})
</insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabAuditedGroup">
......@@ -50,8 +47,8 @@
<if test="allCheck != null">
all_check,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -73,8 +70,8 @@
<if test="allCheck != null">
#{allCheck,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -96,8 +93,8 @@
<if test="allCheck != null">
all_check = #{allCheck,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -113,7 +110,7 @@
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
audited_group_name = #{auditedGroupName,jdbcType=VARCHAR},
all_check = #{allCheck,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where audited_group_id = #{auditedGroupId,jdbcType=INTEGER}
......@@ -122,7 +119,7 @@
select
1
from tab_audited_group
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
......@@ -135,14 +132,14 @@
</select>
<update id="delAuditedGroup">
update tab_audited_group
set status = 0
set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where audited_group_id = #{auditedGroupId}
</update>
<select id="listAuditedGroup" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_audited_group
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
......@@ -152,7 +149,7 @@
</select>
<select id="countByAuditedGroupIds" resultType="java.lang.Integer">
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">
and audited_group_id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
......
......@@ -6,12 +6,12 @@
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="audited_group_id" jdbcType="INTEGER" property="auditedGroupId" />
<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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<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
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
......@@ -20,16 +20,13 @@
from tab_audited_group_user_rel
where audited_group_user_rel_id = #{auditedGroupUserRelId,jdbcType=INTEGER}
</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 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)
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})
</insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabAuditedGroupUserRel">
......@@ -47,8 +44,8 @@
<if test="userId != null">
user_id,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -70,8 +67,8 @@
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -93,8 +90,8 @@
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -110,26 +107,26 @@
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
audited_group_id = #{auditedGroupId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where audited_group_user_rel_id = #{auditedGroupUserRelId,jdbcType=INTEGER}
</update>
<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}
</update>
<insert id="insertSelectiveByNotExist">
INSERT INTO tab_audited_group_user_rel (
audited_group_id,
user_id,
status,
delete_flag,
create_time,
enterprise_id
) SELECT
#{auditedGroupId},
#{userId},
#{status},
#{deleteFlag},
#{createTime},
#{enterpriseId}
FROM
......@@ -147,7 +144,7 @@
)
</insert>
<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}
and audited_group_id = #{auditedGroupId}
and user_id in
......@@ -160,7 +157,7 @@
audited_group_id auditedGroupId, count(1) userCount
from
tab_audited_group_user_rel
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="null != ids">
and audited_group_id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
......@@ -183,7 +180,7 @@
#{item}
</foreach>
</if>
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</where>
</select>
<select id="listAuditedGroupByUserId" resultType="java.lang.Integer">
......@@ -197,7 +194,7 @@
<if test="userId != null ">
and user_id = #{userId}
</if>
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</where>
</select>
</mapper>
\ No newline at end of file
......@@ -6,12 +6,12 @@
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="auditor_id" jdbcType="INTEGER" property="auditorId" />
<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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<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
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
......@@ -20,16 +20,13 @@
from tab_auditor_audited_group_rel
where auditor_audited_group_rel_id = #{auditorAuditedGroupRelId,jdbcType=INTEGER}
</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 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)
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})
</insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabAuditorAuditedGroupRel">
......@@ -47,8 +44,8 @@
<if test="auditedGroupId != null">
audited_group_id,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -70,8 +67,8 @@
<if test="auditedGroupId != null">
#{auditedGroupId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -93,8 +90,8 @@
<if test="auditedGroupId != null">
audited_group_id = #{auditedGroupId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -110,35 +107,35 @@
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
auditor_id = #{auditorId,jdbcType=INTEGER},
audited_group_id = #{auditedGroupId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where auditor_audited_group_rel_id = #{auditorAuditedGroupRelId,jdbcType=INTEGER}
</update>
<update id="delRel">
update tab_auditor_audited_group_rel
set status = 0
set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where audited_group_id = #{auditedGroupId}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</update>
<update id="delByAuditorId">
update tab_auditor_audited_group_rel
set status = 0
set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where auditor_id = #{auditorId}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</update>
<insert id="insertSelectiveByNotExist">
INSERT INTO tab_auditor_audited_group_rel (
enterprise_id,
auditor_id,
audited_group_id,
status,
delete_flag,
create_time
) SELECT
#{enterpriseId},
#{auditorId},
#{auditedGroupId},
#{status},
#{deleteFlag},
#{createTime}
FROM
DUAL
......@@ -156,7 +153,7 @@
</insert>
<update id="updateStatusByAuditedGroupIds">
update tab_auditor_audited_group_rel
set status = 1
set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
where auditor_id = #{auditorId}
and enterprise_id = #{enterpriseId}
<if test="null != ids">
......@@ -170,7 +167,7 @@
select
<include refid="Base_Column_List" />
from tab_auditor_audited_group_rel
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="auditorId != null ">
and auditor_id = #{auditorId}
</if>
......@@ -189,7 +186,7 @@
auditor_id auditorId, count(1) auditedGroupCount
from
tab_auditor_audited_group_rel
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="null != ids">
and auditor_id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
......@@ -202,7 +199,7 @@
select
auditor_id
from tab_auditor_audited_group_rel
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
......
......@@ -9,12 +9,12 @@
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="openid" jdbcType="VARCHAR" property="openid" />
<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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<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
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
......@@ -23,18 +23,15 @@
from tab_auditor
where auditor_id = #{auditorId,jdbcType=INTEGER}
</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 into tab_auditor (auditor_id, enterprise_id, auditor_name,
phone, user_id, openid,
is_use, status, create_time,
is_use, delete_flag, create_time,
update_time)
values (#{auditorId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{auditorName,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})
</insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabAuditor">
......@@ -64,8 +61,8 @@
<if test="isUse != null">
is_use,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -96,8 +93,8 @@
<if test="isUse != null">
#{isUse,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -128,8 +125,8 @@
<if test="isUse != null">
is_use = #{isUse,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -148,7 +145,7 @@
user_id = #{userId,jdbcType=INTEGER},
openid = #{openid,jdbcType=VARCHAR},
is_use = #{isUse,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where auditor_id = #{auditorId,jdbcType=INTEGER}
......@@ -157,7 +154,7 @@
select
<include refid="Base_Column_List" />
from tab_auditor
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="phone != null and phone != '' ">
and phone = #{phone}
</if>
......@@ -179,13 +176,13 @@
limit 1
</select>
<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>
<select id="listAuditor" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_auditor
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="auditorName != null and auditorName != '' ">
and auditor_name like concat('%', #{auditorName}, '%')
</if>
......@@ -213,7 +210,7 @@
</if>
</where>
and is_use = 1
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
limit 1
</select>
</mapper>
\ No newline at end of file
......@@ -6,12 +6,12 @@
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="auditor_id" jdbcType="INTEGER" property="auditorId" />
<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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<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
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
......@@ -20,16 +20,13 @@
from tab_auditor_project_item_rel
where auditor_project_item_rel_id = #{auditorProjectItemRelId,jdbcType=INTEGER}
</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 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)
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})
</insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabAuditorProjectItemRel">
......@@ -47,8 +44,8 @@
<if test="projectItemId != null">
project_item_id,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -70,8 +67,8 @@
<if test="projectItemId != null">
#{projectItemId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -93,8 +90,8 @@
<if test="projectItemId != null">
project_item_id = #{projectItemId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -110,21 +107,21 @@
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
auditor_id = #{auditorId,jdbcType=INTEGER},
project_item_id = #{projectItemId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where auditor_project_item_rel_id = #{auditorProjectItemRelId,jdbcType=INTEGER}
</update>
<update id="delByAuditorId">
update tab_auditor_project_item_rel
set status = 0
where status = 1
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 id="delRelByProjectItemId">
update tab_auditor_project_item_rel
set status = 0
where status = 1
set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and project_item_id = #{projectItemId}
</update>
<insert id="insertSelectiveByNotExist">
......@@ -132,13 +129,13 @@
enterprise_id,
auditor_id,
project_item_id,
status,
delete_flag,
create_time
) SELECT
#{enterpriseId},
#{auditorId},
#{projectItemId},
#{status},
#{deleteFlag},
#{createTime}
FROM
DUAL
......@@ -156,7 +153,7 @@
</insert>
<update id="updateStatusByProjectItemIds">
update tab_auditor_project_item_rel
set status = 1
set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
where auditor_id = #{auditorId}
and enterprise_id = #{enterpriseId}
<if test="null != ids">
......@@ -170,7 +167,7 @@
select
<include refid="Base_Column_List" />
from tab_auditor_project_item_rel
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="auditorId != null ">
and auditor_id = #{auditorId}
</if>
......@@ -180,7 +177,7 @@
select
auditor_id auditorId, count(1) projectItemCount
from tab_auditor_project_item_rel
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="null != ids">
and auditor_id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
......@@ -193,7 +190,7 @@
select
auditor_id
from tab_auditor_project_item_rel
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
......
......@@ -5,13 +5,13 @@
<id column="account_group_id" jdbcType="INTEGER" property="accountGroupId" />
<result column="account_group_name" jdbcType="VARCHAR" property="accountGroupName" />
<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="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<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>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -19,16 +19,13 @@
from tab_sys_account_group
where account_group_id = #{accountGroupId,jdbcType=INTEGER}
</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 into tab_sys_account_group (account_group_id, account_group_name,
enterprise_id, status, sort,
enterprise_id, delete_flag, sort,
create_time, update_time)
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})
</insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysAccountGroup">
......@@ -43,8 +40,8 @@
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="sort != null">
sort,
......@@ -66,8 +63,8 @@
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
......@@ -89,8 +86,8 @@
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
......@@ -108,7 +105,7 @@
update tab_sys_account_group
set account_group_name = #{accountGroupName,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
......@@ -119,14 +116,14 @@
SELECT ifnull(max(sort), 0)
from tab_sys_account_group
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and enterprise_id = #{enterpriseId}
</select>
<select id="countByAccountGroupName" resultType="int">
SELECT count(1)
from tab_sys_account_group
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and enterprise_id = #{enterpriseId}
<if test="accountGroupId != null">
and account_group_id &lt;&gt; #{accountGroupId}
......@@ -137,7 +134,7 @@
<select id="listAccountGroupByEnterpriseId" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
from tab_sys_account_group
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and enterprise_id = #{enterpriseId}
order by sort
</select>
......@@ -145,7 +142,7 @@
<select id="listByIdList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
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">
and account_group_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
......
......@@ -6,13 +6,13 @@
<result column="account_group_id" jdbcType="INTEGER" property="accountGroupId" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<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="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<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
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
......@@ -21,17 +21,14 @@
from tab_sys_account_group_rel
where account_group_rel_id = #{accountGroupRelId,jdbcType=INTEGER}
</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 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
)
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}
)
</insert>
......@@ -50,8 +47,8 @@
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="type != null">
type,
......@@ -76,8 +73,8 @@
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
......@@ -102,8 +99,8 @@
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
......@@ -122,7 +119,7 @@
set account_group_id = #{accountGroupId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
......@@ -131,14 +128,14 @@
<update id="deleteByAccountGroupId">
update tab_sys_account_group_rel
set status = 0
where status = 1
set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and account_group_id = #{accountGroupId}
</update>
<insert id="insertForeach" parameterType="java.util.List">
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
)
VALUES
......@@ -148,7 +145,7 @@
#{item.accountGroupId},
#{item.userId},
#{item.enterpriseId},
#{item.status},
#{item.deleteFlag},
#{item.type},
#{item.createTime},
#{item.updateTime}
......@@ -158,16 +155,16 @@
<update id="deleteByUserId">
update tab_sys_account_group_rel
set status = 0
where status = 1
set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and user_id = #{userId}
and type = #{type}
</update>
<update id="deleteByUserIdList">
update tab_sys_account_group_rel
set status = 0
where status = 1
set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="userIdList != null and userIdList.size() > 0">
and user_id in
<foreach collection="userIdList" index="index" item="item" open="(" separator="," close=")">
......@@ -182,14 +179,14 @@
<include refid="Base_Column_List" />
from tab_sys_account_group_rel
where user_id = #{userId}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and type = #{type}
</select>
<update id="deleteByAccountGroupIdAndUserId">
update tab_sys_account_group_rel
set status = 0
where status = 1
set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and user_id = #{userId}
and account_group_id = #{accountGroupId}
and type = #{type}
......@@ -203,14 +200,14 @@
<if test="type != null">
and type = #{type}
</if>
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select>
<select id="groupByAccountGroupId" resultType="com.gic.auth.dto.AccountGroupListDTO">
select account_group_id accountGroupId,
count(user_id) memberCount
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">
and account_group_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
......@@ -226,7 +223,7 @@
<include refid="Base_Column_List" />
from tab_sys_account_group_rel
where
status = 1
delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="list != null and list.size() > 0">
and account_group_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
......
......@@ -6,13 +6,13 @@
<result column="auth_code" jdbcType="VARCHAR" property="authCode" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<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="expiration_time" jdbcType="TIMESTAMP" property="expirationTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<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
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
......@@ -21,19 +21,16 @@
from tab_sys_auth_code
where auth_code_id = #{authCodeId,jdbcType=INTEGER}
</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">
<selectKey keyProperty="authCodeId" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
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)
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})
</insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysAuthCode" useGeneratedKeys="true" keyProperty="authCodeId">
......@@ -51,8 +48,8 @@
<if test="relationId != null">
relation_id,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -77,8 +74,8 @@
<if test="relationId != null">
#{relationId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -103,8 +100,8 @@
<if test="relationId != null">
relation_id = #{relationId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -123,7 +120,7 @@
set auth_code = #{authCode,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
relation_id = #{relationId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
expiration_time = #{expirationTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
......@@ -137,7 +134,7 @@
<if test="relationId != null">
and relation_id = #{relationId}
</if>
and status=1
and delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and expiration_time &gt;= now()
order by create_time desc
</select>
......
......@@ -9,13 +9,13 @@
<result column="page_name" jdbcType="VARCHAR" property="pageName" />
<result column="resource_detail" jdbcType="VARCHAR" property="resourceDetail" />
<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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
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>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -23,18 +23,15 @@
from tab_sys_business_front_res
where resource_id = #{resourceId,jdbcType=INTEGER}
</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 into tab_sys_business_front_res (resource_id, resource_name, resource_code,
resource_type, page_name, resource_detail,
enterprise_id, status, create_time,
enterprise_id, delete_flag, create_time,
update_time)
values (#{resourceId,jdbcType=INTEGER}, #{resourceName,jdbcType=VARCHAR}, #{resourceCode,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})
</insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysBusinessFrontRes">
......@@ -61,8 +58,8 @@
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -93,8 +90,8 @@
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -125,8 +122,8 @@
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -145,7 +142,7 @@
page_name = #{pageName,jdbcType=VARCHAR},
resource_detail = #{resourceDetail,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where resource_id = #{resourceId,jdbcType=INTEGER}
......@@ -154,7 +151,7 @@
<select id="listByParam" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
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 != ''">
and (resource_name like concat('%', #{search}, '%') or page_name like concat('%', #{search}, '%')
or resource_detail like concat('%', #{search}, '%'))
......@@ -167,7 +164,7 @@
<select id="listByCode" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
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_code in
<foreach close=")" collection="codeList" index="index" item="item" open="(" separator=",">
......@@ -179,14 +176,14 @@
SELECT <include refid="Base_Column_List"></include>
from tab_sys_business_front_res
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
GROUP by resource_code
</select>
<select id="listByResourceCode" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_sys_business_front_res
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and resource_code = #{resourceCode}
</select>
</mapper>
\ No newline at end of file
......@@ -12,13 +12,13 @@
<result column="creator" jdbcType="VARCHAR" property="creator" />
<result column="resource_ids" jdbcType="VARCHAR" property="resourceIds" />
<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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
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>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -26,20 +26,17 @@
from tab_sys_collaborator
where collaborator_id = #{collaboratorId,jdbcType=INTEGER}
</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 into tab_sys_collaborator (collaborator_id, collaborator_name,
enterprise_id, collaboration_enterprise_id,
phone, app_id, app_name,
creator, resource_ids, sub_app_ids, status,
creator, resource_ids, sub_app_ids, delete_flag,
create_time, update_time)
values (#{collaboratorId,jdbcType=INTEGER}, #{collaboratorName,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=INTEGER}, #{collaborationEnterpriseId,jdbcType=INTEGER},
#{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})
</insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysCollaborator" useGeneratedKeys="true" keyProperty="collaboratorId">
......@@ -75,8 +72,8 @@
<if test="subAppIds != null">
sub_app_ids,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -116,8 +113,8 @@
<if test="subAppIds != null">
#{subAppIds,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -157,8 +154,8 @@
<if test="subAppIds != null">
sub_app_ids = #{subAppIds,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -180,7 +177,7 @@
creator = #{creator,jdbcType=VARCHAR},
resource_ids = #{resourceIds,jdbcType=VARCHAR},
sub_app_ids = #{subAppIds,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where collaborator_id = #{collaboratorId,jdbcType=INTEGER}
......@@ -197,7 +194,7 @@
a.app_id appId,
a.app_name appName,
a.creator,
a.status,
a.delete_flag deleteFlag,
a.create_time createTime
from tab_sys_collaborator a
......@@ -209,8 +206,8 @@
<if test="appId != null and appId != '' ">
and a.app_id in (${appId})
</if>
<if test="status != null">
and a.status = #{status}
<if test="deleteFlag != null">
and a.delete_flag = #{deleteFlag}
</if>
<if test="collaboratorIdList != null and collaboratorIdList.size() > 0">
and a.collaborator_id in
......@@ -254,15 +251,15 @@
where collaboration_enterprise_id = #{enterpriseId}
and phone = #{phone}
and app_id = #{appId}
and status != 0
and delete_flag != ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
limit 1
</select>
<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}
and phone = #{phone}
and app_id = #{appId}
and status != 0
and delete_flag != ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
</update>
</mapper>
\ No newline at end of file
......@@ -5,12 +5,12 @@
<id column="collaborator_role_rel_id" jdbcType="INTEGER" property="collaboratorRoleRelId" />
<result column="collaborator_id" jdbcType="INTEGER" property="collaboratorId" />
<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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<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>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -18,16 +18,13 @@
from tab_sys_collaborator_role_rel
where collaborator_role_rel_id = #{collaboratorRoleRelId,jdbcType=INTEGER}
</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 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)
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})
</insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysCollaboratorRoleRel">
......@@ -42,8 +39,8 @@
<if test="menuId != null">
menu_id,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -62,8 +59,8 @@
<if test="menuId != null">
#{menuId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -82,8 +79,8 @@
<if test="menuId != null">
menu_id = #{menuId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -98,7 +95,7 @@
update tab_sys_collaborator_role_rel
set collaborator_id = #{collaboratorId,jdbcType=INTEGER},
menu_id = #{menuId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where collaborator_role_rel_id = #{collaboratorRoleRelId,jdbcType=INTEGER}
......@@ -106,7 +103,7 @@
<insert id="saveFetch" parameterType="java.util.List">
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)
VALUES
<foreach collection="list" item="item" index="index" separator=",">
......@@ -114,7 +111,7 @@
#{item.collaboratorRoleRelId},
#{item.collaboratorId},
#{item.menuId},
#{item.status},
#{item.deleteFlag},
#{item.createTime},
#{item.updateTime}
)
......@@ -122,9 +119,9 @@
</insert>
<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}
</update>
......@@ -132,7 +129,7 @@
SELECT <include refid="Base_Column_List"></include>
from tab_sys_collaborator_role_rel
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and collaborator_id = #{collaboratorId}
</select>
</mapper>
\ No newline at end of file
......@@ -8,13 +8,13 @@
<result column="depart_name" jdbcType="VARCHAR" property="departName" />
<result column="position_code" jdbcType="VARCHAR" property="positionCode" />
<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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
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>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -22,18 +22,15 @@
from tab_sys_menu_auth_depart
where menu_depart_id = #{menuDepartId,jdbcType=INTEGER}
</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 into tab_sys_menu_auth_depart (menu_depart_id, menu_code, depart_code,
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},
#{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 id="insertSelective" parameterType="com.gic.auth.entity.TabSysMenuAuthDepart">
......@@ -57,8 +54,8 @@
<if test="positionName != null">
position_name,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -86,8 +83,8 @@
<if test="positionName != null">
#{positionName,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -115,8 +112,8 @@
<if test="positionName != null">
position_name = #{positionName,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -134,7 +131,7 @@
depart_name = #{departName,jdbcType=VARCHAR},
position_code = #{positionCode,jdbcType=VARCHAR},
position_name = #{positionName,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where menu_depart_id = #{menuDepartId,jdbcType=INTEGER}
......@@ -143,7 +140,7 @@
<insert id="saveFetch" parameterType="java.util.List">
insert into tab_sys_menu_auth_depart (menu_depart_id, menu_code, depart_code,
depart_name, position_code, position_name,
status, create_time, update_time
delete_flag, create_time, update_time
)
values
<foreach collection="list" item="item" index="index" separator=",">
......@@ -154,7 +151,7 @@
#{item.departName},
#{item.positionCode},
#{item.positionName},
#{item.status},
#{item.deleteFlag},
#{item.createTime},
#{item.updateTime}
)
......@@ -162,8 +159,8 @@
</insert>
<update id="deleteByMenuCode">
update tab_sys_menu_auth_depart set status = 0
where status = 1
update tab_sys_menu_auth_depart set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and menu_code = #{menuCode}
</update>
......@@ -173,7 +170,7 @@
from tab_sys_menu_auth_depart
where menu_code = #{menuCode}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select>
<select id="listAllAuthDepart" resultMap="BaseResultMap">
......@@ -181,7 +178,7 @@
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">
and menu_code in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
......
......@@ -5,12 +5,12 @@
<id column="menu_item_id" jdbcType="INTEGER" property="menuItemId" />
<result column="menu_id" jdbcType="INTEGER" property="menuId" />
<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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<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>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -18,16 +18,13 @@
from tab_sys_menu_item
where menu_item_id = #{menuItemId,jdbcType=INTEGER}
</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 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},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
#{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysMenuItem">
......@@ -42,8 +39,8 @@
<if test="itemId != null">
item_id,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -62,8 +59,8 @@
<if test="itemId != null">
#{itemId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -82,8 +79,8 @@
<if test="itemId != null">
item_id = #{itemId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -98,7 +95,7 @@
update tab_sys_menu_item
set menu_id = #{menuId,jdbcType=INTEGER},
item_id = #{itemId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where menu_item_id = #{menuItemId,jdbcType=INTEGER}
......@@ -106,7 +103,7 @@
<insert id="insertForeach" parameterType="java.util.List">
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
<foreach collection="list" item="item" index="index" separator=",">
......@@ -114,7 +111,7 @@
#{item.menuItemId},
#{item.menuId},
#{item.itemId},
#{item.status},
#{item.deleteFlag},
#{item.createTime},
#{item.updateTime}
)
......@@ -123,8 +120,8 @@
<update id="deleteByMenuId">
<if test="menuId != null">
update tab_sys_menu_item set status = 0
where status = 1
update tab_sys_menu_item set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and menu_id = #{menuId}
</if>
</update>
......@@ -135,14 +132,14 @@
<include refid="Base_Column_List" />
from tab_sys_menu_item
where menu_id = #{menuId}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select>
<select id="listMenuItemByMenuIdList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_sys_menu_item
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and menu_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
......@@ -153,7 +150,7 @@
select
item_id
from tab_sys_menu_item
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
GROUP by item_id
</select>
......@@ -161,7 +158,7 @@
select menu_id menuId,
count(1) operationItemCount
from tab_sys_menu_item
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and item_id = #{itemId}
group by menu_id
</select>
......@@ -169,8 +166,8 @@
<update id="deleteByMenuIdList">
<if test="list != null and list.size() > 0">
update tab_sys_menu_item set status = 0
where status = 1
update tab_sys_menu_item set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and menu_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
......@@ -180,8 +177,8 @@
<update id="deleteByItemId">
<if test="itemId != null">
update tab_sys_menu_item set status = 0
where status = 1
update tab_sys_menu_item set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and item_id = #{itemId}
</if>
</update>
......@@ -189,7 +186,7 @@
<select id="listByDev" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_sys_menu_item_dev
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and menu_id = #{menuId}
</select>
</mapper>
\ No newline at end of file
......@@ -10,7 +10,7 @@
<result column="target" jdbcType="INTEGER" property="target" />
<result column="icon_url" jdbcType="VARCHAR" property="iconUrl" />
<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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="level" jdbcType="INTEGER" property="level" />
......@@ -26,7 +26,7 @@
<result column="platform_type" jdbcType="INTEGER" property="platformType" />
</resultMap>
<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,
menu_version_name, project_url_for_web, admin_only_sign, auth_type, platform_type
</sql>
......@@ -55,14 +55,14 @@
<insert id="insert" parameterType="com.gic.auth.entity.TabSysMenu">
insert into tab_sys_menu (menu_id, menu_name, project,
menu_url, parent_id, target,
icon_url, sort, status,
icon_url, sort, delete_flag,
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)
values (#{menuId,jdbcType=INTEGER}, #{menuName,jdbcType=VARCHAR}, #{project,jdbcType=VARCHAR},
#{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},
#{isShow,jdbcType=INTEGER}, #{menuCode,jdbcType=VARCHAR}, #{parentCode,jdbcType=VARCHAR},
#{menuVersion,jdbcType=VARCHAR}, #{menuType,jdbcType=INTEGER}, #{menuVersionName,jdbcType=VARCHAR},
......@@ -95,8 +95,8 @@
<if test="sort != null">
sort,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -163,8 +163,8 @@
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -231,8 +231,8 @@
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -285,7 +285,7 @@
target = #{target,jdbcType=INTEGER},
icon_url = #{iconUrl,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
level = #{level,jdbcType=INTEGER},
......@@ -306,7 +306,7 @@
select
<include refid="Base_Column_List" />
from tab_sys_menu
where status=1
where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="search != null and search != '' ">
and ( menu_name like concat('%', #{search}, '%') or menu_code like concat('%', #{search}, '%') )
</if>
......@@ -355,7 +355,7 @@
select
ifnull(max(sort), 0)
from tab_sys_menu
where status=1
where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and parent_id = #{parentId}
<if test="project != null">
and project = #{project}
......@@ -367,7 +367,7 @@
select
<include refid="Base_Column_List" />
from tab_sys_menu
where status=1
where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and parent_id = #{parentId}
and menu_type = 2
order by sort
......@@ -377,7 +377,7 @@
select
<include refid="Base_Column_List" />
from tab_sys_menu
where status=1
where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and parent_id = #{parentId}
and project = #{project}
order by sort
......@@ -387,7 +387,7 @@
select
<include refid="Base_Column_List" />
from tab_sys_menu
where status=1
where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<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}, '%') )
</if>
......@@ -406,7 +406,7 @@
select
<include refid="Base_Column_List" />
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">
and menu_id in
<foreach close=")" collection="menuIdList" index="index" item="item" open="(" separator=",">
......@@ -419,7 +419,7 @@
select
<include refid="Base_Column_List" />
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">
and parent_id in
<foreach close=")" collection="parentMenuIdList" index="index" item="item" open="(" separator=",">
......@@ -432,7 +432,7 @@
select
<include refid="Base_Column_List" />
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">
and menu_id in
<foreach close=")" collection="menuIdList" index="index" item="item" open="(" separator=",">
......@@ -448,9 +448,9 @@
select
a.menu_id menuId,
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
where a.status=1
where a.delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and a.parent_id = #{menuId}
<include refid="role_filter" />
</select>
......@@ -460,7 +460,7 @@
select
count(1)
from tab_sys_menu
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and parent_id = #{menuId}
</select>
......@@ -468,7 +468,7 @@
select
<include refid="Base_Column_List" />
from tab_sys_menu
where status=1
where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="project != null">
and project = #{project}
</if>
......@@ -492,7 +492,7 @@
select
<include refid="Base_Column_List" />
from tab_sys_menu
where status=1
where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and project != 'gic'
and platform_type = 0
<include refid="tree_filter" />
......@@ -508,7 +508,7 @@
select
<include refid="Base_Column_List" />
from tab_sys_menu
where status=1
where delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and project != 'gic'
and platform_type = 0
<include refid="tree_filter" />
......@@ -535,7 +535,7 @@
<select id="countByMenuCode" resultType="int">
SELECT count(1) from tab_sys_menu
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and menu_code = #{menuCode}
<if test="menuId != null">
and menu_id &lt;&gt; #{menuId}
......@@ -545,7 +545,7 @@
<select id="getMenuByMenuCode" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_sys_menu
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and menu_code = #{menuCode}
limit 1
</select>
......@@ -554,14 +554,14 @@
<update id="updateParentCodeByParentId">
update tab_sys_menu set parent_code = #{parentCode}
where parent_id = #{parentId}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</update>
<select id="listAdminOnlyOperationItem" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_sys_menu
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and admin_only_sign = 1
and menu_type = 2
and platform_type = 0
......@@ -570,8 +570,8 @@
<update id="deleteByMenuIdList">
<if test="list != null and list.size() > 0">
update tab_sys_menu set status = 0
where status = 1
update tab_sys_menu set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and menu_id IN
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
#{item}
......@@ -581,8 +581,8 @@
<update id="deleteNotInApp">
<if test="list != null and list.size() > 0">
update tab_sys_menu set status = 0
where status = 1
update tab_sys_menu set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and project != 'gic'
and platform_type = 0
and project NOT IN
......@@ -595,7 +595,7 @@
<select id="listMenuTemp" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_sys_menu_dev
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and project = #{project}
and platform_type = 0
</select>
......@@ -603,14 +603,14 @@
<select id="listMenuTempByMenuCode" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_sys_menu_dev
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and parent_code = #{menuCode}
</select>
<select id="listMenuTempByMenuIdList" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_sys_menu_dev
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and parent_id in
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
#{item}
......@@ -623,14 +623,14 @@
FROM
tab_sys_menu
WHERE
status = 1
delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and menu_code IN (
SELECT
menu_code
FROM
tab_sys_menu_dev
WHERE
status = 1 and
delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS} and
menu_id IN (
SELECT
item_id
......@@ -638,7 +638,7 @@
tab_sys_menu_item_dev
WHERE
menu_id = #{menuId}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
)
)
</select>
......
......@@ -6,12 +6,12 @@
<result column="menu_id" jdbcType="INTEGER" property="menuId" />
<result column="role_id" jdbcType="INTEGER" property="roleId" />
<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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<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>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -19,16 +19,13 @@
from tab_sys_menu_role
where menu_role_id = #{menuRoleId,jdbcType=INTEGER}
</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 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)
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})
</insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysMenuRole">
......@@ -46,8 +43,8 @@
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -69,8 +66,8 @@
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -92,8 +89,8 @@
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -109,20 +106,21 @@
set menu_id = #{menuId,jdbcType=INTEGER},
role_id = #{roleId,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where menu_role_id = #{menuRoleId,jdbcType=INTEGER}
</update>
<delete id="deleteByRoleId">
DELETE FROM tab_sys_menu_role
<update id="deleteByRoleId">
update tab_sys_menu_role set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where role_id = #{roleId}
</delete>
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</update>
<insert id="insertForeach" parameterType="java.util.List">
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)
values
<foreach collection="list" item="item" index="index" separator=",">
......@@ -131,7 +129,7 @@
#{item.menuId},
#{item.roleId},
#{item.enterpriseId},
#{item.status},
#{item.deleteFlag},
#{item.createTime},
#{item.updateTime}
)
......@@ -144,14 +142,14 @@
<include refid="Base_Column_List" />
from tab_sys_menu_role
where role_id = #{roleId}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select>
<select id="listMenuRoleByRoleIdList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_sys_menu_role
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and role_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
......
......@@ -5,14 +5,14 @@
<id column="operation_user_id" jdbcType="INTEGER" property="operationUserId" />
<result column="operation_user_name" jdbcType="VARCHAR" property="operationUserName" />
<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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="phone_area_code" jdbcType="VARCHAR" property="phoneAreaCode" />
</resultMap>
<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
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
......@@ -21,17 +21,14 @@
from tab_sys_operation_user
where operation_user_id = #{operationUserId,jdbcType=INTEGER}
</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 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
)
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}
)
</insert>
......@@ -47,8 +44,8 @@
<if test="phoneNumber != null">
phone_number,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -73,8 +70,8 @@
<if test="phoneNumber != null">
#{phoneNumber,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -99,8 +96,8 @@
<if test="phoneNumber != null">
phone_number = #{phoneNumber,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -121,7 +118,7 @@
update tab_sys_operation_user
set operation_user_name = #{operationUserName,jdbcType=VARCHAR},
phone_number = #{phoneNumber,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
......@@ -132,7 +129,7 @@
<select id="getByPhone" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
from tab_sys_operation_user
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and enterprise_id = #{enterpriseId}
and phone_number = #{phone}
</select>
......
......@@ -8,10 +8,10 @@
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
</resultMap>
<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>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -19,17 +19,14 @@
from tab_sys_order_app_resource
where order_app_resource_id = #{orderAppResourceId,jdbcType=INTEGER}
</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 into tab_sys_order_app_resource (order_app_resource_id, enterprise_id,
type, content, create_time,
update_time, status)
update_time, delete_flag)
values (#{orderAppResourceId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{type,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER})
#{updateTime,jdbcType=TIMESTAMP}, #{deleteFlag,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysOrderAppResource">
<selectKey keyProperty="orderAppResourceId" order="AFTER" resultType="java.lang.Integer">
......@@ -55,8 +52,8 @@
<if test="updateTime != null">
update_time,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
......@@ -78,8 +75,8 @@
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
</trim>
</insert>
......@@ -101,8 +98,8 @@
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
</set>
where order_app_resource_id = #{orderAppResourceId,jdbcType=INTEGER}
......@@ -114,7 +111,7 @@
content = #{content,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER}
delete_flag = #{deleteFlag,jdbcType=INTEGER}
where order_app_resource_id = #{orderAppResourceId,jdbcType=INTEGER}
</update>
<select id="listByIds" resultMap="BaseResultMap">
......
......@@ -17,12 +17,12 @@
<result column="channel_resource" jdbcType="INTEGER" property="channelResource" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
</resultMap>
<sql id="Base_Column_List">
resource_id, resource_name, enterprise_id, user_resource, member_card_resource, fwh_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>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -30,23 +30,20 @@
from tab_sys_resource
where resource_id = #{resourceId,jdbcType=INTEGER}
</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 into tab_sys_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, sms_sign_resource,
channel_resource, create_time, update_time,
status)
delete_flag)
values (#{resourceId,jdbcType=INTEGER}, #{resourceName,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER},
#{userResource,jdbcType=BIGINT}, #{memberCardResource,jdbcType=BIGINT}, #{fwhResource,jdbcType=BIGINT},
#{appletResource,jdbcType=BIGINT}, #{storeResource,jdbcType=BIGINT}, #{goodsResourceId,jdbcType=BIGINT},
#{orderResource,jdbcType=INTEGER}, #{appResource,jdbcType=INTEGER}, #{smsSignResource,jdbcType=INTEGER},
#{channelResource,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{status,jdbcType=INTEGER})
#{deleteFlag,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysResource">
insert into tab_sys_resource
......@@ -96,8 +93,8 @@
<if test="updateTime != null">
update_time,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
......@@ -146,8 +143,8 @@
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
</trim>
</insert>
......@@ -196,8 +193,8 @@
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
</set>
where resource_id = #{resourceId,jdbcType=INTEGER}
......@@ -218,14 +215,14 @@
channel_resource = #{channelResource,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER}
delete_flag = #{deleteFlag,jdbcType=INTEGER}
where resource_id = #{resourceId,jdbcType=INTEGER}
</update>
<select id="listResource" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_sys_resource
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="resourceName != null and resourceName != '' ">
and resource_name like concat('%', #{resourceName}, '%')
</if>
......@@ -238,7 +235,7 @@
select
<include refid="Base_Column_List" />
from tab_sys_resource
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="resourceId != null ">
and resource_id &lt;&gt; #{resourceId}
</if>
......
......@@ -5,12 +5,12 @@
<id column="role_id" jdbcType="INTEGER" property="roleId" />
<result column="role_name" jdbcType="VARCHAR" property="roleName" />
<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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<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>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -18,16 +18,13 @@
from tab_sys_role
where role_id = #{roleId,jdbcType=INTEGER}
</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 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},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
#{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysRole">
......@@ -42,8 +39,8 @@
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -62,8 +59,8 @@
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -82,8 +79,8 @@
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -98,7 +95,7 @@
update tab_sys_role
set role_name = #{roleName,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where role_id = #{roleId,jdbcType=INTEGER}
......@@ -108,9 +105,9 @@
select
a.role_id roleId,
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
where a.status = 1
where a.delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and a.enterprise_id = #{enterpriseId}
<if test="search != null and search != '' ">
and ( a.role_name like concat('%', #{search}, '%') )
......@@ -120,23 +117,23 @@
</select>
<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}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</update>
<select id="listRoleNoPage" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_sys_role
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and enterprise_id = #{enterpriseId}
</select>
<select id="countRepeatRoleName" resultType="int">
select count(1) from tab_sys_role
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="roleId != null">
and role_id <![CDATA[ <> ]]> #{roleId}
</if>
......
......@@ -5,7 +5,7 @@
<id column="union_id" jdbcType="INTEGER" property="unionId" />
<result column="union_enterprise_id" jdbcType="INTEGER" property="unionEnterpriseId" />
<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_time" jdbcType="TIMESTAMP" property="authorizationTime" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
......@@ -13,7 +13,7 @@
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
</resultMap>
<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
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
......@@ -22,17 +22,14 @@
from tab_sys_union_enterprise
where union_id = #{unionId,jdbcType=INTEGER}
</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 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
)
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}
)
</insert>
......@@ -48,8 +45,8 @@
<if test="unionEnterpriseName != null">
union_enterprise_name,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="authorizationStatus != null">
authorization_status,
......@@ -77,8 +74,8 @@
<if test="unionEnterpriseName != null">
#{unionEnterpriseName,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="authorizationStatus != null">
#{authorizationStatus,jdbcType=INTEGER},
......@@ -106,8 +103,8 @@
<if test="unionEnterpriseName != null">
union_enterprise_name = #{unionEnterpriseName,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="authorizationStatus != null">
authorization_status = #{authorizationStatus,jdbcType=INTEGER},
......@@ -131,7 +128,7 @@
update tab_sys_union_enterprise
set union_enterprise_id = #{unionEnterpriseId,jdbcType=INTEGER},
union_enterprise_name = #{unionEnterpriseName,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
authorization_status = #{authorizationStatus,jdbcType=INTEGER},
authorization_time = #{authorizationTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -144,14 +141,14 @@
<include refid="Base_Column_List" />
from tab_sys_union_enterprise
where union_enterprise_id = #{unionId,jdbcType=INTEGER}
and status=1
and delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select>
<select id="pageUnionEnterprise" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_sys_union_enterprise
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 !=''">
and union_enterprise_name like concat('%',#{search}, '%')
</if>
......
......@@ -12,11 +12,11 @@
<result column="resource" jdbcType="BIGINT" property="resource" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
</resultMap>
<sql id="Base_Column_List">
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>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -24,20 +24,17 @@
from tab_sys_union_enterprise_resource
where union_resource_id = #{unionResourceId,jdbcType=INTEGER}
</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 into tab_sys_union_enterprise_resource (union_resource_id, union_id, resource_type,
authorization_status, authorization_time,
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},
#{authorizationStatus,jdbcType=INTEGER}, #{authorizationTime,jdbcType=TIMESTAMP},
#{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 id="insertSelective" parameterType="com.gic.auth.entity.TabSysUnionEnterpriseResource">
......@@ -73,8 +70,8 @@
<if test="updateTime != null">
update_time,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
......@@ -108,8 +105,8 @@
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
</trim>
</insert>
......@@ -143,8 +140,8 @@
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
</set>
where union_resource_id = #{unionResourceId,jdbcType=INTEGER}
......@@ -160,7 +157,7 @@
resource = #{resource,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER}
delete_flag = #{deleteFlag,jdbcType=INTEGER}
where union_resource_id = #{unionResourceId,jdbcType=INTEGER}
</update>
<select id="getResource" resultMap="BaseResultMap">
......@@ -169,18 +166,18 @@
from tab_sys_union_enterprise_resource
where union_id = #{unionId,jdbcType=INTEGER}
and resource_type = #{type}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select>
<update id="delResource" >
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}
and enterprise_id= #{enterpriseId}
</update>
<update id="updateAuthorizationStatus" >
update tab_sys_union_enterprise_resource
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>
<select id="listResourceByEnterpriseIdAndType" resultType="com.gic.auth.dto.UnionEnterpriseResourceDTO">
select
......@@ -189,18 +186,18 @@
where t1.enterprise_id = #{enterpriseId,jdbcType=INTEGER}
and t1.union_id=t2.union_id
and t2.resource_type = #{type}
and t1.status = 1
and t1.delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select>
<select id="listResourceByUnionId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_sys_union_enterprise_resource
where union_id=#{unionId}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select>
<update id="delResourceByResourceId" >
update tab_sys_union_enterprise_resource
set status=0
set delete_flag=${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS}
where resource = #{resourceId}
</update>
<select id="getKeyByResourceId" resultMap="BaseResultMap">
......@@ -208,7 +205,7 @@
auth_key
from tab_sys_union_enterprise_resource
where resource=#{resourceId}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select>
<select id="getUnionEnterpriseIdByResouce" resultMap="BaseResultMap">
select
......
......@@ -7,7 +7,7 @@
<result column="phone_number" jdbcType="VARCHAR" property="phoneNumber" />
<result column="password" jdbcType="VARCHAR" property="password" />
<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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
......@@ -20,7 +20,7 @@
<result column="user_position" jdbcType="INTEGER" property="userPosition" />
</resultMap>
<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
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
......@@ -29,18 +29,15 @@
from tab_sys_user
where user_id = #{userId,jdbcType=INTEGER}
</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 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,
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},
#{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},
#{phoneAreaCode,jdbcType=VARCHAR}, #{userGroupIds,jdbcType=VARCHAR}, #{loginType,jdbcType=INTEGER},
#{passwordType,jdbcType=INTEGER}, #{accountType,jdbcType=INTEGER}, #{accountDueDate,jdbcType=TIMESTAMP}, #{userPosition,jdbcType=INTEGER}
......@@ -64,8 +61,8 @@
<if test="superAdmin != null">
super_admin,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -114,8 +111,8 @@
<if test="superAdmin != null">
#{superAdmin,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -164,8 +161,8 @@
<if test="superAdmin != null">
super_admin = #{superAdmin,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -206,7 +203,7 @@
phone_number = #{phoneNumber,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
super_admin = #{superAdmin,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
......@@ -222,7 +219,7 @@
<select id="countByPhone" resultType="int">
select count(1) from tab_sys_user
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="userId != null">
and user_id <![CDATA[ <> ]]> #{userId}
</if>
......@@ -232,7 +229,7 @@
<select id="countByPhoneAndLoginType" resultType="int">
select count(1) from tab_sys_user
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="userId != null">
and user_id <![CDATA[ <> ]]> #{userId}
</if>
......@@ -247,7 +244,7 @@
<include refid="Base_Column_List" />
from tab_sys_user
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and super_admin = 1
and login_type = 0
</select>
......@@ -256,7 +253,7 @@
select
<include refid="Base_Column_List" />
from tab_sys_user
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="enterpriseId != null">
and enterprise_id = #{enterpriseId}
</if>
......@@ -273,7 +270,7 @@
<include refid="Base_Column_List" />
from tab_sys_user
where phone_number = #{phoneNumber}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and enterprise_id = #{enterpriseId}
and password = #{password}
and phone_area_code = #{nationCode}
......@@ -297,9 +294,9 @@
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
where a.enterprise_id = #{enterpriseId}
and a.status = 1
and b.status = 1
and c.status = 1
and a.delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and b.delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and c.delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and a.login_type = 0
<if test="search != null and search != '' ">
and ( a.user_name like concat('%', #{search}, '%') or a.phone_number like concat('%', #{search}, '%') )
......@@ -339,9 +336,9 @@
<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}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and login_type = 0
</update>
......@@ -349,7 +346,7 @@
select
1
from tab_sys_user
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and login_type = 0
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
......@@ -363,7 +360,7 @@
limit 1
</select>
<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 user_id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
......@@ -376,7 +373,7 @@
select
<include refid="Base_Column_List" />
from tab_sys_user
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and login_type = 0
<if test="ids != null and ids.size() > 0">
and user_id in
......@@ -390,7 +387,7 @@
select
<include refid="Base_Column_List" />
from tab_sys_user
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
and enterprise_id = #{enterpriseId}
and login_type = 0
and super_admin != 1
......@@ -407,7 +404,7 @@
<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">
and enterprise_id = #{enterpriseId}
</if>
......@@ -415,7 +412,7 @@
<select id="listGicUser" resultMap="BaseResultMap">
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}
<if test="isGic != null">
and login_type = #{isGic}
......
......@@ -6,12 +6,12 @@
<result column="resource_id" jdbcType="INTEGER" property="resourceId" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<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>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -19,16 +19,13 @@
from tab_sys_user_resource
where user_resource_id = #{userResourceId,jdbcType=INTEGER}
</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 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)
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})
</insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysUserResource">
......@@ -46,8 +43,8 @@
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -69,8 +66,8 @@
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -92,8 +89,8 @@
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -109,7 +106,7 @@
set resource_id = #{resourceId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where user_resource_id = #{userResourceId,jdbcType=INTEGER}
......@@ -118,7 +115,7 @@
select
<include refid="Base_Column_List" />
from tab_sys_user_resource
where status = 1
where delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
<if test="resourceId != null ">
and resource_id = #{resourceId}
</if>
......@@ -130,7 +127,7 @@
<!--List<Map<String,Integer>> countByResourceIds(List<Integer> resourceIds);-->
<select id="countByResourceIds" resultType="java.util.HashMap">
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">
and resource_id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
......@@ -142,9 +139,9 @@
<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}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</update>
<select id="listUserResourceByUserId" resultMap="BaseResultMap">
......@@ -152,6 +149,6 @@
<include refid="Base_Column_List" />
from tab_sys_user_resource
where user_id = #{userId}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select>
</mapper>
\ No newline at end of file
......@@ -6,12 +6,12 @@
<result column="role_id" jdbcType="INTEGER" property="roleId" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<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>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -19,16 +19,13 @@
from tab_sys_user_role
where user_role_id = #{userRoleId,jdbcType=INTEGER}
</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 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)
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})
</insert>
<insert id="insertSelective" parameterType="com.gic.auth.entity.TabSysUserRole">
......@@ -46,8 +43,8 @@
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -69,8 +66,8 @@
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -92,8 +89,8 @@
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -109,16 +106,16 @@
set role_id = #{roleId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where user_role_id = #{userRoleId,jdbcType=INTEGER}
</update>
<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}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</update>
<select id="listUserRoleByUserId" resultMap="BaseResultMap">
......@@ -126,7 +123,7 @@
<include refid="Base_Column_List" />
from tab_sys_user_role
where user_id = #{userId}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select>
......@@ -135,6 +132,6 @@
<include refid="Base_Column_List" />
from tab_sys_user_role
where role_id = #{roleId}
and status = 1
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</select>
</mapper>
\ No newline at end of file
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