添加权限管理功能
This commit is contained in:
parent
207a72d116
commit
7faffe541a
@ -97,6 +97,12 @@
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>1.1.10</version>
|
||||
</dependency>
|
||||
<!--lombok依赖-->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
@ -52,6 +52,6 @@ public class AdminUserDetails implements UserDetails {
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
return true;
|
||||
return umsAdmin.getStatus().equals(1);
|
||||
}
|
||||
}
|
||||
|
@ -7,8 +7,6 @@ import com.macro.mall.model.PmsProductCategory;
|
||||
import com.macro.mall.service.PmsProductCategoryService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.BindingResult;
|
||||
@ -75,7 +73,7 @@ public class PmsProductCategoryController {
|
||||
}
|
||||
|
||||
@ApiOperation("删除商品分类")
|
||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.GET)
|
||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object delete(@PathVariable Long id) {
|
||||
int count = productCategoryService.delete(id);
|
||||
|
@ -9,18 +9,15 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.security.Principal;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -80,7 +77,7 @@ public class UmsAdminController {
|
||||
return new CommonResult().success(tokenMap);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取用户信息")
|
||||
@ApiOperation(value = "获取当前登录用户信息")
|
||||
@RequestMapping(value = "/info", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object getAdminInfo(Principal principal) {
|
||||
@ -92,10 +89,51 @@ public class UmsAdminController {
|
||||
data.put("icon", umsAdmin.getIcon());
|
||||
return new CommonResult().success(data);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "登出功能")
|
||||
@RequestMapping(value = "/logout", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object logout() {
|
||||
return new CommonResult().success(null);
|
||||
}
|
||||
|
||||
@ApiOperation("根据用户名或姓名分页获取用户列表")
|
||||
@RequestMapping(value = "/list",method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object list(@RequestParam("name") String name,
|
||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){
|
||||
List<UmsAdmin> adminList = adminService.list(name,pageSize,pageNum);
|
||||
return new CommonResult().pageSuccess(adminList);
|
||||
}
|
||||
|
||||
@ApiOperation("获取指定用户信息")
|
||||
@RequestMapping(value = "/{id}",method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object getItem(@PathVariable Long id){
|
||||
UmsAdmin admin = adminService.getItem(id);
|
||||
return new CommonResult().success(admin);
|
||||
}
|
||||
|
||||
@ApiOperation("获取指定用户信息")
|
||||
@RequestMapping(value = "/update/{id}",method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object update(@PathVariable Long id,@RequestBody UmsAdmin admin){
|
||||
int count = adminService.update(id,admin);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("删除指定用户信息")
|
||||
@RequestMapping(value = "/delete/{id}",method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object delete(@PathVariable Long id){
|
||||
int count = adminService.delete(id);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,65 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.dto.UmsPermissionNode;
|
||||
import com.macro.mall.model.UmsPermission;
|
||||
import com.macro.mall.service.UmsPermissionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 后台用户权限管理
|
||||
* Created by macro on 2018/9/29.
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "UmsPermissionController", description = "后台用户权限管理")
|
||||
@RequestMapping("/admin/permission")
|
||||
public class UmsPermissionController {
|
||||
@Autowired
|
||||
private UmsPermissionService permissionService;
|
||||
@ApiOperation("添加权限")
|
||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object create(@RequestBody UmsPermission permission) {
|
||||
int count = permissionService.create(permission);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("修改权限")
|
||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object update(@PathVariable Long id, @RequestBody UmsPermission permission) {
|
||||
int count = permissionService.update(id,permission);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("根据id批量删除权限")
|
||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object delete(@RequestParam("ids") List<Long> ids) {
|
||||
int count = permissionService.delete(ids);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("以层级结构返回所有权限")
|
||||
@RequestMapping(value = "/treeList", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object treeList() {
|
||||
List<UmsPermissionNode> permissionNodeList = permissionService.treeList();
|
||||
return new CommonResult().success(permissionNodeList);
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.model.UmsPermission;
|
||||
import com.macro.mall.model.UmsRole;
|
||||
import com.macro.mall.service.UmsRoleService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 后台用户角色管理
|
||||
* Created by macro on 2018/9/30.
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "UmsRoleController", description = "后台用户角色管理")
|
||||
@RequestMapping("/admin/role")
|
||||
public class UmsRoleController {
|
||||
@Autowired
|
||||
private UmsRoleService roleService;
|
||||
|
||||
@ApiOperation("添加角色")
|
||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object create(@RequestBody UmsRole role) {
|
||||
int count = roleService.create(role);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("修改角色")
|
||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object update(@PathVariable Long id, @RequestBody UmsRole role) {
|
||||
int count = roleService.update(id,role);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除角色")
|
||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object delete(@RequestParam("ids") List<Long> ids) {
|
||||
int count = roleService.delete(ids);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("获取相应角色权限")
|
||||
@RequestMapping(value = "/permission/{roleId}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object getPermissionList(@PathVariable Long roleId) {
|
||||
List<UmsPermission> permissionList =roleService.getPermissionList(roleId);
|
||||
return new CommonResult().success(permissionList);
|
||||
}
|
||||
|
||||
@ApiOperation("修改角色权限")
|
||||
@RequestMapping(value = "/permission/update", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object updatePermission(@RequestParam Long roleId,
|
||||
@RequestParam("permissionIds") List<Long> permissionIds) {
|
||||
int count = roleService.updatePermission(roleId,permissionIds);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.model.UmsPermission;
|
||||
import com.macro.mall.model.UmsRolePermissionRelation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 后台用户角色管理自定义Dao
|
||||
* Created by macro on 2018/9/30.
|
||||
*/
|
||||
public interface UmsRolePermissionRelationDao {
|
||||
/**
|
||||
* 批量插入角色和权限关系
|
||||
*/
|
||||
int insertList(@Param("list")List<UmsRolePermissionRelation> list);
|
||||
|
||||
/**
|
||||
* 根据角色获取权限
|
||||
*/
|
||||
List<UmsPermission> getPermissionList(@Param("roleId") Long roleId);
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.validator.constraints.Email;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
|
||||
@ -8,6 +10,8 @@ import org.hibernate.validator.constraints.NotEmpty;
|
||||
* 用户登录参数
|
||||
* Created by macro on 2018/4/26.
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class UmsAdminParam {
|
||||
@ApiModelProperty(value = "用户名", required = true)
|
||||
@NotEmpty(message = "用户名不能为空")
|
||||
@ -20,36 +24,8 @@ public class UmsAdminParam {
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
@Email(message = "邮箱格式不合法")
|
||||
private String email;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
@ApiModelProperty(value = "用户昵称")
|
||||
private String nickName;
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String note;
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
import com.macro.mall.model.UmsPermission;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by macro on 2018/9/30.
|
||||
*/
|
||||
public class UmsPermissionNode extends UmsPermission {
|
||||
@Getter
|
||||
@Setter
|
||||
private List<UmsPermissionNode> children;
|
||||
}
|
@ -3,6 +3,8 @@ package com.macro.mall.service;
|
||||
import com.macro.mall.dto.UmsAdminParam;
|
||||
import com.macro.mall.model.UmsAdmin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 后台管理员Service
|
||||
* Created by macro on 2018/4/26.
|
||||
@ -31,4 +33,24 @@ public interface UmsAdminService {
|
||||
* @param oldToken 旧的token
|
||||
*/
|
||||
String refreshToken(String oldToken);
|
||||
|
||||
/**
|
||||
* 根据用户id获取用户
|
||||
*/
|
||||
UmsAdmin getItem(Long id);
|
||||
|
||||
/**
|
||||
* 根据用户名或昵称分页查询用户
|
||||
*/
|
||||
List<UmsAdmin> list(String name, Integer pageSize, Integer pageNum);
|
||||
|
||||
/**
|
||||
* 修改指定用户信息
|
||||
*/
|
||||
int update(Long id, UmsAdmin admin);
|
||||
|
||||
/**
|
||||
* 删除指定用户
|
||||
*/
|
||||
int delete(Long id);
|
||||
}
|
||||
|
@ -0,0 +1,32 @@
|
||||
package com.macro.mall.service;
|
||||
|
||||
import com.macro.mall.dto.UmsPermissionNode;
|
||||
import com.macro.mall.model.UmsPermission;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 后台用户权限管理Service
|
||||
* Created by macro on 2018/9/29.
|
||||
*/
|
||||
public interface UmsPermissionService {
|
||||
/**
|
||||
* 添加权限
|
||||
*/
|
||||
int create(UmsPermission permission);
|
||||
|
||||
/**
|
||||
* 修改权限
|
||||
*/
|
||||
int update(Long id,UmsPermission permission);
|
||||
|
||||
/**
|
||||
* 批量删除权限
|
||||
*/
|
||||
int delete(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 以层级结构返回所有权限
|
||||
*/
|
||||
List<UmsPermissionNode> treeList();
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.macro.mall.service;
|
||||
|
||||
import com.macro.mall.model.UmsPermission;
|
||||
import com.macro.mall.model.UmsRole;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 后台角色管理Service
|
||||
* Created by macro on 2018/9/30.
|
||||
*/
|
||||
public interface UmsRoleService {
|
||||
/**
|
||||
* 添加角色
|
||||
*/
|
||||
int create(UmsRole role);
|
||||
|
||||
/**
|
||||
* 修改角色信息
|
||||
*/
|
||||
int update(Long id, UmsRole role);
|
||||
|
||||
/**
|
||||
* 批量删除角色
|
||||
*/
|
||||
int delete(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获取指定角色权限
|
||||
*/
|
||||
List<UmsPermission> getPermissionList(Long roleId);
|
||||
|
||||
/**
|
||||
* 修改指定角色的权限
|
||||
*/
|
||||
@Transactional
|
||||
int updatePermission(Long roleId, List<Long> permissionIds);
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.macro.mall.service.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.macro.mall.dto.UmsAdminParam;
|
||||
import com.macro.mall.mapper.UmsAdminMapper;
|
||||
import com.macro.mall.model.UmsAdmin;
|
||||
@ -20,6 +21,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -96,4 +98,31 @@ public class UmsAdminServiceImpl implements UmsAdminService{
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UmsAdmin getItem(Long id) {
|
||||
return adminMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UmsAdmin> list(String name, Integer pageSize, Integer pageNum) {
|
||||
PageHelper.startPage(pageNum,pageSize);
|
||||
UmsAdminExample example = new UmsAdminExample();
|
||||
UmsAdminExample.Criteria criteria = example.createCriteria();
|
||||
if(!StringUtils.isEmpty(name)){
|
||||
criteria.andUsernameLike("%"+name+"%");
|
||||
example.or(example.createCriteria().andNickNameLike("%"+name+"%"));
|
||||
}
|
||||
return adminMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(Long id, UmsAdmin admin) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delete(Long id) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,68 @@
|
||||
package com.macro.mall.service.impl;
|
||||
|
||||
import com.macro.mall.dto.UmsPermissionNode;
|
||||
import com.macro.mall.mapper.UmsPermissionMapper;
|
||||
import com.macro.mall.model.UmsPermission;
|
||||
import com.macro.mall.model.UmsPermissionExample;
|
||||
import com.macro.mall.service.UmsPermissionService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 后台用户权限管理Service实现类
|
||||
* Created by macro on 2018/9/29.
|
||||
*/
|
||||
@Service
|
||||
public class UmsPermissionServiceImpl implements UmsPermissionService {
|
||||
@Autowired
|
||||
private UmsPermissionMapper permissionMapper;
|
||||
|
||||
@Override
|
||||
public int create(UmsPermission permission) {
|
||||
permission.setStatus(1);
|
||||
permission.setCreateTime(new Date());
|
||||
permission.setSort(0);
|
||||
return permissionMapper.insert(permission);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(Long id, UmsPermission permission) {
|
||||
permission.setId(id);
|
||||
return permissionMapper.updateByPrimaryKey(permission);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delete(List<Long> ids) {
|
||||
UmsPermissionExample example = new UmsPermissionExample();
|
||||
example.createCriteria().andIdIn(ids);
|
||||
return permissionMapper.deleteByExample(example);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UmsPermissionNode> treeList() {
|
||||
List<UmsPermission> permissionList = permissionMapper.selectByExample(new UmsPermissionExample());
|
||||
List<UmsPermissionNode> result = permissionList.stream()
|
||||
.filter(permission -> permission.getPid().equals(0L))
|
||||
.map(permission -> covert(permission,permissionList)).collect(Collectors.toList());
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将权限转换为带有子级的权限对象
|
||||
* 当找不到子级权限的时候map操作不会再递归调用covert
|
||||
*/
|
||||
private UmsPermissionNode covert(UmsPermission permission,List<UmsPermission> permissionList){
|
||||
UmsPermissionNode node = new UmsPermissionNode();
|
||||
BeanUtils.copyProperties(permission,node);
|
||||
List<UmsPermissionNode> children = permissionList.stream()
|
||||
.filter(subPermission -> subPermission.getPid().equals(permission.getId()))
|
||||
.map(subPermission -> covert(subPermission,permissionList)).collect(Collectors.toList());
|
||||
node.setChildren(children);
|
||||
return node;
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.macro.mall.service.impl;
|
||||
|
||||
import com.macro.mall.dao.UmsRolePermissionRelationDao;
|
||||
import com.macro.mall.mapper.UmsRoleMapper;
|
||||
import com.macro.mall.mapper.UmsRolePermissionRelationMapper;
|
||||
import com.macro.mall.model.*;
|
||||
import com.macro.mall.service.UmsRoleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 后台角色管理Service实现类
|
||||
* Created by macro on 2018/9/30.
|
||||
*/
|
||||
@Service
|
||||
public class UmsRoleServiceImpl implements UmsRoleService {
|
||||
@Autowired
|
||||
private UmsRoleMapper roleMapper;
|
||||
@Autowired
|
||||
private UmsRolePermissionRelationMapper rolePermissionRelationMapper;
|
||||
@Autowired
|
||||
private UmsRolePermissionRelationDao rolePermissionRelationDao;
|
||||
@Override
|
||||
public int create(UmsRole role) {
|
||||
role.setCreateTime(new Date());
|
||||
role.setStatus(1);
|
||||
role.setAdminCount(0);
|
||||
role.setSort(0);
|
||||
return roleMapper.insert(role);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(Long id, UmsRole role) {
|
||||
role.setId(id);
|
||||
return roleMapper.updateByPrimaryKey(role);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delete(List<Long> ids) {
|
||||
UmsRoleExample example = new UmsRoleExample();
|
||||
example.createCriteria().andIdIn(ids);
|
||||
return roleMapper.deleteByExample(example);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UmsPermission> getPermissionList(Long roleId) {
|
||||
return rolePermissionRelationDao.getPermissionList(roleId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updatePermission(Long roleId, List<Long> permissionIds) {
|
||||
//先删除原有关系
|
||||
UmsRolePermissionRelationExample example=new UmsRolePermissionRelationExample();
|
||||
example.createCriteria().andRoleIdEqualTo(roleId);
|
||||
rolePermissionRelationMapper.deleteByExample(example);
|
||||
//批量插入新关系
|
||||
List<UmsRolePermissionRelation> relationList = new ArrayList<>();
|
||||
for (Long permissionId : permissionIds) {
|
||||
UmsRolePermissionRelation relation = new UmsRolePermissionRelation();
|
||||
relation.setRoleId(roleId);
|
||||
relation.setPermissionId(permissionId);
|
||||
relationList.add(relation);
|
||||
}
|
||||
return rolePermissionRelationDao.insertList(relationList);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.macro.mall.dao.UmsRolePermissionRelationDao">
|
||||
<!--批量新增回写主键支持-->
|
||||
<insert id="insertList">
|
||||
INSERT INTO ums_role_permission_relation (role_id, permission_id) VALUES
|
||||
<foreach collection="list" separator="," item="item" index="index">
|
||||
(#{item.roleId,jdbcType=BIGINT},
|
||||
#{item.permissionId,jdbcType=BIGINT})
|
||||
</foreach>
|
||||
</insert>
|
||||
<select id="getPermissionList" resultMap="com.macro.mall.mapper.UmsPermissionMapper.BaseResultMap">
|
||||
SELECT
|
||||
p.*
|
||||
FROM
|
||||
ums_role_permission_relation r
|
||||
LEFT JOIN ums_permission p ON r.permission_id = p.id
|
||||
WHERE
|
||||
r.role_id = #{roleId};
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,30 @@
|
||||
package com.macro.mall.mapper;
|
||||
|
||||
import com.macro.mall.model.UmsAdminPermissionRelation;
|
||||
import com.macro.mall.model.UmsAdminPermissionRelationExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface UmsAdminPermissionRelationMapper {
|
||||
int countByExample(UmsAdminPermissionRelationExample example);
|
||||
|
||||
int deleteByExample(UmsAdminPermissionRelationExample example);
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(UmsAdminPermissionRelation record);
|
||||
|
||||
int insertSelective(UmsAdminPermissionRelation record);
|
||||
|
||||
List<UmsAdminPermissionRelation> selectByExample(UmsAdminPermissionRelationExample example);
|
||||
|
||||
UmsAdminPermissionRelation selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") UmsAdminPermissionRelation record, @Param("example") UmsAdminPermissionRelationExample example);
|
||||
|
||||
int updateByExample(@Param("record") UmsAdminPermissionRelation record, @Param("example") UmsAdminPermissionRelationExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(UmsAdminPermissionRelation record);
|
||||
|
||||
int updateByPrimaryKey(UmsAdminPermissionRelation record);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.macro.mall.mapper;
|
||||
|
||||
import com.macro.mall.model.UmsAdminRoleRelation;
|
||||
import com.macro.mall.model.UmsAdminRoleRelationExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface UmsAdminRoleRelationMapper {
|
||||
int countByExample(UmsAdminRoleRelationExample example);
|
||||
|
||||
int deleteByExample(UmsAdminRoleRelationExample example);
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(UmsAdminRoleRelation record);
|
||||
|
||||
int insertSelective(UmsAdminRoleRelation record);
|
||||
|
||||
List<UmsAdminRoleRelation> selectByExample(UmsAdminRoleRelationExample example);
|
||||
|
||||
UmsAdminRoleRelation selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") UmsAdminRoleRelation record, @Param("example") UmsAdminRoleRelationExample example);
|
||||
|
||||
int updateByExample(@Param("record") UmsAdminRoleRelation record, @Param("example") UmsAdminRoleRelationExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(UmsAdminRoleRelation record);
|
||||
|
||||
int updateByPrimaryKey(UmsAdminRoleRelation record);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.macro.mall.mapper;
|
||||
|
||||
import com.macro.mall.model.UmsPermission;
|
||||
import com.macro.mall.model.UmsPermissionExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface UmsPermissionMapper {
|
||||
int countByExample(UmsPermissionExample example);
|
||||
|
||||
int deleteByExample(UmsPermissionExample example);
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(UmsPermission record);
|
||||
|
||||
int insertSelective(UmsPermission record);
|
||||
|
||||
List<UmsPermission> selectByExample(UmsPermissionExample example);
|
||||
|
||||
UmsPermission selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") UmsPermission record, @Param("example") UmsPermissionExample example);
|
||||
|
||||
int updateByExample(@Param("record") UmsPermission record, @Param("example") UmsPermissionExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(UmsPermission record);
|
||||
|
||||
int updateByPrimaryKey(UmsPermission record);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.macro.mall.mapper;
|
||||
|
||||
import com.macro.mall.model.UmsRole;
|
||||
import com.macro.mall.model.UmsRoleExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface UmsRoleMapper {
|
||||
int countByExample(UmsRoleExample example);
|
||||
|
||||
int deleteByExample(UmsRoleExample example);
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(UmsRole record);
|
||||
|
||||
int insertSelective(UmsRole record);
|
||||
|
||||
List<UmsRole> selectByExample(UmsRoleExample example);
|
||||
|
||||
UmsRole selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") UmsRole record, @Param("example") UmsRoleExample example);
|
||||
|
||||
int updateByExample(@Param("record") UmsRole record, @Param("example") UmsRoleExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(UmsRole record);
|
||||
|
||||
int updateByPrimaryKey(UmsRole record);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.macro.mall.mapper;
|
||||
|
||||
import com.macro.mall.model.UmsRolePermissionRelation;
|
||||
import com.macro.mall.model.UmsRolePermissionRelationExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface UmsRolePermissionRelationMapper {
|
||||
int countByExample(UmsRolePermissionRelationExample example);
|
||||
|
||||
int deleteByExample(UmsRolePermissionRelationExample example);
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(UmsRolePermissionRelation record);
|
||||
|
||||
int insertSelective(UmsRolePermissionRelation record);
|
||||
|
||||
List<UmsRolePermissionRelation> selectByExample(UmsRolePermissionRelationExample example);
|
||||
|
||||
UmsRolePermissionRelation selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") UmsRolePermissionRelation record, @Param("example") UmsRolePermissionRelationExample example);
|
||||
|
||||
int updateByExample(@Param("record") UmsRolePermissionRelation record, @Param("example") UmsRolePermissionRelationExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(UmsRolePermissionRelation record);
|
||||
|
||||
int updateByPrimaryKey(UmsRolePermissionRelation record);
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package com.macro.mall.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class UmsAdmin implements Serializable {
|
||||
private Long id;
|
||||
@ -16,8 +17,48 @@ public class UmsAdmin implements Serializable {
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 最后登录时间
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Date loginTime;
|
||||
|
||||
/**
|
||||
* 帐号启用状态:0->禁用;1->启用
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Long getId() {
|
||||
@ -60,6 +101,46 @@ public class UmsAdmin implements Serializable {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
|
||||
public void setNote(String note) {
|
||||
this.note = note;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getLoginTime() {
|
||||
return loginTime;
|
||||
}
|
||||
|
||||
public void setLoginTime(Date loginTime) {
|
||||
this.loginTime = loginTime;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@ -71,6 +152,11 @@ public class UmsAdmin implements Serializable {
|
||||
sb.append(", password=").append(password);
|
||||
sb.append(", icon=").append(icon);
|
||||
sb.append(", email=").append(email);
|
||||
sb.append(", nickName=").append(nickName);
|
||||
sb.append(", note=").append(note);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", loginTime=").append(loginTime);
|
||||
sb.append(", status=").append(status);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.macro.mall.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class UmsAdminExample {
|
||||
@ -443,6 +444,326 @@ public class UmsAdminExample {
|
||||
addCriterion("email not between", value1, value2, "email");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNickNameIsNull() {
|
||||
addCriterion("nick_name is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNickNameIsNotNull() {
|
||||
addCriterion("nick_name is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNickNameEqualTo(String value) {
|
||||
addCriterion("nick_name =", value, "nickName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNickNameNotEqualTo(String value) {
|
||||
addCriterion("nick_name <>", value, "nickName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNickNameGreaterThan(String value) {
|
||||
addCriterion("nick_name >", value, "nickName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNickNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("nick_name >=", value, "nickName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNickNameLessThan(String value) {
|
||||
addCriterion("nick_name <", value, "nickName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNickNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("nick_name <=", value, "nickName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNickNameLike(String value) {
|
||||
addCriterion("nick_name like", value, "nickName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNickNameNotLike(String value) {
|
||||
addCriterion("nick_name not like", value, "nickName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNickNameIn(List<String> values) {
|
||||
addCriterion("nick_name in", values, "nickName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNickNameNotIn(List<String> values) {
|
||||
addCriterion("nick_name not in", values, "nickName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNickNameBetween(String value1, String value2) {
|
||||
addCriterion("nick_name between", value1, value2, "nickName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNickNameNotBetween(String value1, String value2) {
|
||||
addCriterion("nick_name not between", value1, value2, "nickName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNoteIsNull() {
|
||||
addCriterion("note is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNoteIsNotNull() {
|
||||
addCriterion("note is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNoteEqualTo(String value) {
|
||||
addCriterion("note =", value, "note");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNoteNotEqualTo(String value) {
|
||||
addCriterion("note <>", value, "note");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNoteGreaterThan(String value) {
|
||||
addCriterion("note >", value, "note");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNoteGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("note >=", value, "note");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNoteLessThan(String value) {
|
||||
addCriterion("note <", value, "note");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNoteLessThanOrEqualTo(String value) {
|
||||
addCriterion("note <=", value, "note");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNoteLike(String value) {
|
||||
addCriterion("note like", value, "note");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNoteNotLike(String value) {
|
||||
addCriterion("note not like", value, "note");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNoteIn(List<String> values) {
|
||||
addCriterion("note in", values, "note");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNoteNotIn(List<String> values) {
|
||||
addCriterion("note not in", values, "note");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNoteBetween(String value1, String value2) {
|
||||
addCriterion("note between", value1, value2, "note");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNoteNotBetween(String value1, String value2) {
|
||||
addCriterion("note not between", value1, value2, "note");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Date value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Date value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<Date> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<Date> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(Date value1, Date value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoginTimeIsNull() {
|
||||
addCriterion("login_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoginTimeIsNotNull() {
|
||||
addCriterion("login_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoginTimeEqualTo(Date value) {
|
||||
addCriterion("login_time =", value, "loginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoginTimeNotEqualTo(Date value) {
|
||||
addCriterion("login_time <>", value, "loginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoginTimeGreaterThan(Date value) {
|
||||
addCriterion("login_time >", value, "loginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoginTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("login_time >=", value, "loginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoginTimeLessThan(Date value) {
|
||||
addCriterion("login_time <", value, "loginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoginTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("login_time <=", value, "loginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoginTimeIn(List<Date> values) {
|
||||
addCriterion("login_time in", values, "loginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoginTimeNotIn(List<Date> values) {
|
||||
addCriterion("login_time not in", values, "loginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoginTimeBetween(Date value1, Date value2) {
|
||||
addCriterion("login_time between", value1, value2, "loginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLoginTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("login_time not between", value1, value2, "loginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNull() {
|
||||
addCriterion("status is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNotNull() {
|
||||
addCriterion("status is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusEqualTo(Integer value) {
|
||||
addCriterion("status =", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotEqualTo(Integer value) {
|
||||
addCriterion("status <>", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThan(Integer value) {
|
||||
addCriterion("status >", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("status >=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThan(Integer value) {
|
||||
addCriterion("status <", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("status <=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIn(List<Integer> values) {
|
||||
addCriterion("status in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotIn(List<Integer> values) {
|
||||
addCriterion("status not in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusBetween(Integer value1, Integer value2) {
|
||||
addCriterion("status between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("status not between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
@ -0,0 +1,62 @@
|
||||
package com.macro.mall.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class UmsAdminPermissionRelation implements Serializable {
|
||||
private Long id;
|
||||
|
||||
private Long adminId;
|
||||
|
||||
private Long permissionId;
|
||||
|
||||
private Integer type;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getAdminId() {
|
||||
return adminId;
|
||||
}
|
||||
|
||||
public void setAdminId(Long adminId) {
|
||||
this.adminId = adminId;
|
||||
}
|
||||
|
||||
public Long getPermissionId() {
|
||||
return permissionId;
|
||||
}
|
||||
|
||||
public void setPermissionId(Long permissionId) {
|
||||
this.permissionId = permissionId;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", adminId=").append(adminId);
|
||||
sb.append(", permissionId=").append(permissionId);
|
||||
sb.append(", type=").append(type);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,440 @@
|
||||
package com.macro.mall.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class UmsAdminPermissionRelationExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public UmsAdminPermissionRelationExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Long value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Long value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Long value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Long value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Long> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Long> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Long value1, Long value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdIsNull() {
|
||||
addCriterion("admin_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdIsNotNull() {
|
||||
addCriterion("admin_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdEqualTo(Long value) {
|
||||
addCriterion("admin_id =", value, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdNotEqualTo(Long value) {
|
||||
addCriterion("admin_id <>", value, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdGreaterThan(Long value) {
|
||||
addCriterion("admin_id >", value, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("admin_id >=", value, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdLessThan(Long value) {
|
||||
addCriterion("admin_id <", value, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("admin_id <=", value, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdIn(List<Long> values) {
|
||||
addCriterion("admin_id in", values, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdNotIn(List<Long> values) {
|
||||
addCriterion("admin_id not in", values, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdBetween(Long value1, Long value2) {
|
||||
addCriterion("admin_id between", value1, value2, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("admin_id not between", value1, value2, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdIsNull() {
|
||||
addCriterion("permission_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdIsNotNull() {
|
||||
addCriterion("permission_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdEqualTo(Long value) {
|
||||
addCriterion("permission_id =", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdNotEqualTo(Long value) {
|
||||
addCriterion("permission_id <>", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdGreaterThan(Long value) {
|
||||
addCriterion("permission_id >", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("permission_id >=", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdLessThan(Long value) {
|
||||
addCriterion("permission_id <", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("permission_id <=", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdIn(List<Long> values) {
|
||||
addCriterion("permission_id in", values, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdNotIn(List<Long> values) {
|
||||
addCriterion("permission_id not in", values, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdBetween(Long value1, Long value2) {
|
||||
addCriterion("permission_id between", value1, value2, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("permission_id not between", value1, value2, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIsNull() {
|
||||
addCriterion("type is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIsNotNull() {
|
||||
addCriterion("type is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeEqualTo(Integer value) {
|
||||
addCriterion("type =", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotEqualTo(Integer value) {
|
||||
addCriterion("type <>", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeGreaterThan(Integer value) {
|
||||
addCriterion("type >", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("type >=", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeLessThan(Integer value) {
|
||||
addCriterion("type <", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("type <=", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIn(List<Integer> values) {
|
||||
addCriterion("type in", values, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotIn(List<Integer> values) {
|
||||
addCriterion("type not in", values, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeBetween(Integer value1, Integer value2) {
|
||||
addCriterion("type between", value1, value2, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("type not between", value1, value2, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.macro.mall.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class UmsAdminRoleRelation implements Serializable {
|
||||
private Long id;
|
||||
|
||||
private Long adminId;
|
||||
|
||||
private Long roleId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getAdminId() {
|
||||
return adminId;
|
||||
}
|
||||
|
||||
public void setAdminId(Long adminId) {
|
||||
this.adminId = adminId;
|
||||
}
|
||||
|
||||
public Long getRoleId() {
|
||||
return roleId;
|
||||
}
|
||||
|
||||
public void setRoleId(Long roleId) {
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", adminId=").append(adminId);
|
||||
sb.append(", roleId=").append(roleId);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,380 @@
|
||||
package com.macro.mall.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class UmsAdminRoleRelationExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public UmsAdminRoleRelationExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Long value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Long value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Long value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Long value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Long> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Long> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Long value1, Long value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdIsNull() {
|
||||
addCriterion("admin_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdIsNotNull() {
|
||||
addCriterion("admin_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdEqualTo(Long value) {
|
||||
addCriterion("admin_id =", value, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdNotEqualTo(Long value) {
|
||||
addCriterion("admin_id <>", value, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdGreaterThan(Long value) {
|
||||
addCriterion("admin_id >", value, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("admin_id >=", value, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdLessThan(Long value) {
|
||||
addCriterion("admin_id <", value, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("admin_id <=", value, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdIn(List<Long> values) {
|
||||
addCriterion("admin_id in", values, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdNotIn(List<Long> values) {
|
||||
addCriterion("admin_id not in", values, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdBetween(Long value1, Long value2) {
|
||||
addCriterion("admin_id between", value1, value2, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("admin_id not between", value1, value2, "adminId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdIsNull() {
|
||||
addCriterion("role_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdIsNotNull() {
|
||||
addCriterion("role_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdEqualTo(Long value) {
|
||||
addCriterion("role_id =", value, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdNotEqualTo(Long value) {
|
||||
addCriterion("role_id <>", value, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdGreaterThan(Long value) {
|
||||
addCriterion("role_id >", value, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("role_id >=", value, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdLessThan(Long value) {
|
||||
addCriterion("role_id <", value, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("role_id <=", value, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdIn(List<Long> values) {
|
||||
addCriterion("role_id in", values, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdNotIn(List<Long> values) {
|
||||
addCriterion("role_id not in", values, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdBetween(Long value1, Long value2) {
|
||||
addCriterion("role_id between", value1, value2, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("role_id not between", value1, value2, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
174
mall-mbg/src/main/java/com/macro/mall/model/UmsPermission.java
Normal file
174
mall-mbg/src/main/java/com/macro/mall/model/UmsPermission.java
Normal file
@ -0,0 +1,174 @@
|
||||
package com.macro.mall.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class UmsPermission implements Serializable {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 父级权限id
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Long pid;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 权限值
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String value;
|
||||
|
||||
/**
|
||||
* 图标
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 权限类型:0->目录;1->菜单;2->按钮(接口绑定权限)
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 前端资源路径
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String uri;
|
||||
|
||||
/**
|
||||
* 启用状态;0->禁用;1->启用
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
public void setPid(Long pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getUri() {
|
||||
return uri;
|
||||
}
|
||||
|
||||
public void setUri(String uri) {
|
||||
this.uri = uri;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", pid=").append(pid);
|
||||
sb.append(", name=").append(name);
|
||||
sb.append(", value=").append(value);
|
||||
sb.append(", icon=").append(icon);
|
||||
sb.append(", type=").append(type);
|
||||
sb.append(", uri=").append(uri);
|
||||
sb.append(", status=").append(status);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", sort=").append(sort);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,841 @@
|
||||
package com.macro.mall.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class UmsPermissionExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public UmsPermissionExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Long value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Long value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Long value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Long value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Long> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Long> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Long value1, Long value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidIsNull() {
|
||||
addCriterion("pid is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidIsNotNull() {
|
||||
addCriterion("pid is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidEqualTo(Long value) {
|
||||
addCriterion("pid =", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidNotEqualTo(Long value) {
|
||||
addCriterion("pid <>", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidGreaterThan(Long value) {
|
||||
addCriterion("pid >", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("pid >=", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidLessThan(Long value) {
|
||||
addCriterion("pid <", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidLessThanOrEqualTo(Long value) {
|
||||
addCriterion("pid <=", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidIn(List<Long> values) {
|
||||
addCriterion("pid in", values, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidNotIn(List<Long> values) {
|
||||
addCriterion("pid not in", values, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidBetween(Long value1, Long value2) {
|
||||
addCriterion("pid between", value1, value2, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidNotBetween(Long value1, Long value2) {
|
||||
addCriterion("pid not between", value1, value2, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNull() {
|
||||
addCriterion("name is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNotNull() {
|
||||
addCriterion("name is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameEqualTo(String value) {
|
||||
addCriterion("name =", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotEqualTo(String value) {
|
||||
addCriterion("name <>", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThan(String value) {
|
||||
addCriterion("name >", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("name >=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThan(String value) {
|
||||
addCriterion("name <", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("name <=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLike(String value) {
|
||||
addCriterion("name like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotLike(String value) {
|
||||
addCriterion("name not like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIn(List<String> values) {
|
||||
addCriterion("name in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotIn(List<String> values) {
|
||||
addCriterion("name not in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameBetween(String value1, String value2) {
|
||||
addCriterion("name between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotBetween(String value1, String value2) {
|
||||
addCriterion("name not between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValueIsNull() {
|
||||
addCriterion("value is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValueIsNotNull() {
|
||||
addCriterion("value is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValueEqualTo(String value) {
|
||||
addCriterion("value =", value, "value");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValueNotEqualTo(String value) {
|
||||
addCriterion("value <>", value, "value");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValueGreaterThan(String value) {
|
||||
addCriterion("value >", value, "value");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValueGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("value >=", value, "value");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValueLessThan(String value) {
|
||||
addCriterion("value <", value, "value");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValueLessThanOrEqualTo(String value) {
|
||||
addCriterion("value <=", value, "value");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValueLike(String value) {
|
||||
addCriterion("value like", value, "value");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValueNotLike(String value) {
|
||||
addCriterion("value not like", value, "value");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValueIn(List<String> values) {
|
||||
addCriterion("value in", values, "value");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValueNotIn(List<String> values) {
|
||||
addCriterion("value not in", values, "value");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValueBetween(String value1, String value2) {
|
||||
addCriterion("value between", value1, value2, "value");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValueNotBetween(String value1, String value2) {
|
||||
addCriterion("value not between", value1, value2, "value");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIconIsNull() {
|
||||
addCriterion("icon is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIconIsNotNull() {
|
||||
addCriterion("icon is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIconEqualTo(String value) {
|
||||
addCriterion("icon =", value, "icon");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIconNotEqualTo(String value) {
|
||||
addCriterion("icon <>", value, "icon");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIconGreaterThan(String value) {
|
||||
addCriterion("icon >", value, "icon");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIconGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("icon >=", value, "icon");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIconLessThan(String value) {
|
||||
addCriterion("icon <", value, "icon");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIconLessThanOrEqualTo(String value) {
|
||||
addCriterion("icon <=", value, "icon");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIconLike(String value) {
|
||||
addCriterion("icon like", value, "icon");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIconNotLike(String value) {
|
||||
addCriterion("icon not like", value, "icon");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIconIn(List<String> values) {
|
||||
addCriterion("icon in", values, "icon");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIconNotIn(List<String> values) {
|
||||
addCriterion("icon not in", values, "icon");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIconBetween(String value1, String value2) {
|
||||
addCriterion("icon between", value1, value2, "icon");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIconNotBetween(String value1, String value2) {
|
||||
addCriterion("icon not between", value1, value2, "icon");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIsNull() {
|
||||
addCriterion("type is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIsNotNull() {
|
||||
addCriterion("type is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeEqualTo(Integer value) {
|
||||
addCriterion("type =", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotEqualTo(Integer value) {
|
||||
addCriterion("type <>", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeGreaterThan(Integer value) {
|
||||
addCriterion("type >", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("type >=", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeLessThan(Integer value) {
|
||||
addCriterion("type <", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("type <=", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIn(List<Integer> values) {
|
||||
addCriterion("type in", values, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotIn(List<Integer> values) {
|
||||
addCriterion("type not in", values, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeBetween(Integer value1, Integer value2) {
|
||||
addCriterion("type between", value1, value2, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("type not between", value1, value2, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUriIsNull() {
|
||||
addCriterion("uri is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUriIsNotNull() {
|
||||
addCriterion("uri is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUriEqualTo(String value) {
|
||||
addCriterion("uri =", value, "uri");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUriNotEqualTo(String value) {
|
||||
addCriterion("uri <>", value, "uri");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUriGreaterThan(String value) {
|
||||
addCriterion("uri >", value, "uri");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUriGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("uri >=", value, "uri");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUriLessThan(String value) {
|
||||
addCriterion("uri <", value, "uri");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUriLessThanOrEqualTo(String value) {
|
||||
addCriterion("uri <=", value, "uri");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUriLike(String value) {
|
||||
addCriterion("uri like", value, "uri");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUriNotLike(String value) {
|
||||
addCriterion("uri not like", value, "uri");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUriIn(List<String> values) {
|
||||
addCriterion("uri in", values, "uri");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUriNotIn(List<String> values) {
|
||||
addCriterion("uri not in", values, "uri");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUriBetween(String value1, String value2) {
|
||||
addCriterion("uri between", value1, value2, "uri");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUriNotBetween(String value1, String value2) {
|
||||
addCriterion("uri not between", value1, value2, "uri");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNull() {
|
||||
addCriterion("status is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNotNull() {
|
||||
addCriterion("status is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusEqualTo(Integer value) {
|
||||
addCriterion("status =", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotEqualTo(Integer value) {
|
||||
addCriterion("status <>", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThan(Integer value) {
|
||||
addCriterion("status >", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("status >=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThan(Integer value) {
|
||||
addCriterion("status <", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("status <=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIn(List<Integer> values) {
|
||||
addCriterion("status in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotIn(List<Integer> values) {
|
||||
addCriterion("status not in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusBetween(Integer value1, Integer value2) {
|
||||
addCriterion("status between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("status not between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Date value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Date value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<Date> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<Date> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(Date value1, Date value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortIsNull() {
|
||||
addCriterion("sort is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortIsNotNull() {
|
||||
addCriterion("sort is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortEqualTo(Integer value) {
|
||||
addCriterion("sort =", value, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortNotEqualTo(Integer value) {
|
||||
addCriterion("sort <>", value, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortGreaterThan(Integer value) {
|
||||
addCriterion("sort >", value, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("sort >=", value, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortLessThan(Integer value) {
|
||||
addCriterion("sort <", value, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("sort <=", value, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortIn(List<Integer> values) {
|
||||
addCriterion("sort in", values, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortNotIn(List<Integer> values) {
|
||||
addCriterion("sort not in", values, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortBetween(Integer value1, Integer value2) {
|
||||
addCriterion("sort between", value1, value2, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("sort not between", value1, value2, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
121
mall-mbg/src/main/java/com/macro/mall/model/UmsRole.java
Normal file
121
mall-mbg/src/main/java/com/macro/mall/model/UmsRole.java
Normal file
@ -0,0 +1,121 @@
|
||||
package com.macro.mall.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class UmsRole implements Serializable {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 后台用户数量
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Integer adminCount;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 启用状态:0->禁用;1->启用
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
private Integer sort;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Integer getAdminCount() {
|
||||
return adminCount;
|
||||
}
|
||||
|
||||
public void setAdminCount(Integer adminCount) {
|
||||
this.adminCount = adminCount;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", name=").append(name);
|
||||
sb.append(", description=").append(description);
|
||||
sb.append(", adminCount=").append(adminCount);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", status=").append(status);
|
||||
sb.append(", sort=").append(sort);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
641
mall-mbg/src/main/java/com/macro/mall/model/UmsRoleExample.java
Normal file
641
mall-mbg/src/main/java/com/macro/mall/model/UmsRoleExample.java
Normal file
@ -0,0 +1,641 @@
|
||||
package com.macro.mall.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class UmsRoleExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public UmsRoleExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Long value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Long value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Long value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Long value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Long> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Long> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Long value1, Long value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNull() {
|
||||
addCriterion("name is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNotNull() {
|
||||
addCriterion("name is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameEqualTo(String value) {
|
||||
addCriterion("name =", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotEqualTo(String value) {
|
||||
addCriterion("name <>", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThan(String value) {
|
||||
addCriterion("name >", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("name >=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThan(String value) {
|
||||
addCriterion("name <", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("name <=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLike(String value) {
|
||||
addCriterion("name like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotLike(String value) {
|
||||
addCriterion("name not like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIn(List<String> values) {
|
||||
addCriterion("name in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotIn(List<String> values) {
|
||||
addCriterion("name not in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameBetween(String value1, String value2) {
|
||||
addCriterion("name between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotBetween(String value1, String value2) {
|
||||
addCriterion("name not between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionIsNull() {
|
||||
addCriterion("description is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionIsNotNull() {
|
||||
addCriterion("description is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionEqualTo(String value) {
|
||||
addCriterion("description =", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotEqualTo(String value) {
|
||||
addCriterion("description <>", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionGreaterThan(String value) {
|
||||
addCriterion("description >", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("description >=", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionLessThan(String value) {
|
||||
addCriterion("description <", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionLessThanOrEqualTo(String value) {
|
||||
addCriterion("description <=", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionLike(String value) {
|
||||
addCriterion("description like", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotLike(String value) {
|
||||
addCriterion("description not like", value, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionIn(List<String> values) {
|
||||
addCriterion("description in", values, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotIn(List<String> values) {
|
||||
addCriterion("description not in", values, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionBetween(String value1, String value2) {
|
||||
addCriterion("description between", value1, value2, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescriptionNotBetween(String value1, String value2) {
|
||||
addCriterion("description not between", value1, value2, "description");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminCountIsNull() {
|
||||
addCriterion("admin_count is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminCountIsNotNull() {
|
||||
addCriterion("admin_count is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminCountEqualTo(Integer value) {
|
||||
addCriterion("admin_count =", value, "adminCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminCountNotEqualTo(Integer value) {
|
||||
addCriterion("admin_count <>", value, "adminCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminCountGreaterThan(Integer value) {
|
||||
addCriterion("admin_count >", value, "adminCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminCountGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("admin_count >=", value, "adminCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminCountLessThan(Integer value) {
|
||||
addCriterion("admin_count <", value, "adminCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminCountLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("admin_count <=", value, "adminCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminCountIn(List<Integer> values) {
|
||||
addCriterion("admin_count in", values, "adminCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminCountNotIn(List<Integer> values) {
|
||||
addCriterion("admin_count not in", values, "adminCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminCountBetween(Integer value1, Integer value2) {
|
||||
addCriterion("admin_count between", value1, value2, "adminCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminCountNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("admin_count not between", value1, value2, "adminCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Date value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Date value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<Date> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<Date> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(Date value1, Date value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNull() {
|
||||
addCriterion("status is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNotNull() {
|
||||
addCriterion("status is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusEqualTo(Integer value) {
|
||||
addCriterion("status =", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotEqualTo(Integer value) {
|
||||
addCriterion("status <>", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThan(Integer value) {
|
||||
addCriterion("status >", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("status >=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThan(Integer value) {
|
||||
addCriterion("status <", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("status <=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIn(List<Integer> values) {
|
||||
addCriterion("status in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotIn(List<Integer> values) {
|
||||
addCriterion("status not in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusBetween(Integer value1, Integer value2) {
|
||||
addCriterion("status between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("status not between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortIsNull() {
|
||||
addCriterion("sort is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortIsNotNull() {
|
||||
addCriterion("sort is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortEqualTo(Integer value) {
|
||||
addCriterion("sort =", value, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortNotEqualTo(Integer value) {
|
||||
addCriterion("sort <>", value, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortGreaterThan(Integer value) {
|
||||
addCriterion("sort >", value, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("sort >=", value, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortLessThan(Integer value) {
|
||||
addCriterion("sort <", value, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("sort <=", value, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortIn(List<Integer> values) {
|
||||
addCriterion("sort in", values, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortNotIn(List<Integer> values) {
|
||||
addCriterion("sort not in", values, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortBetween(Integer value1, Integer value2) {
|
||||
addCriterion("sort between", value1, value2, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSortNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("sort not between", value1, value2, "sort");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.macro.mall.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class UmsRolePermissionRelation implements Serializable {
|
||||
private Long id;
|
||||
|
||||
private Long roleId;
|
||||
|
||||
private Long permissionId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getRoleId() {
|
||||
return roleId;
|
||||
}
|
||||
|
||||
public void setRoleId(Long roleId) {
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
public Long getPermissionId() {
|
||||
return permissionId;
|
||||
}
|
||||
|
||||
public void setPermissionId(Long permissionId) {
|
||||
this.permissionId = permissionId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", roleId=").append(roleId);
|
||||
sb.append(", permissionId=").append(permissionId);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,380 @@
|
||||
package com.macro.mall.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class UmsRolePermissionRelationExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public UmsRolePermissionRelationExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Long value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Long value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Long value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Long value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Long> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Long> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Long value1, Long value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdIsNull() {
|
||||
addCriterion("role_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdIsNotNull() {
|
||||
addCriterion("role_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdEqualTo(Long value) {
|
||||
addCriterion("role_id =", value, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdNotEqualTo(Long value) {
|
||||
addCriterion("role_id <>", value, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdGreaterThan(Long value) {
|
||||
addCriterion("role_id >", value, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("role_id >=", value, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdLessThan(Long value) {
|
||||
addCriterion("role_id <", value, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("role_id <=", value, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdIn(List<Long> values) {
|
||||
addCriterion("role_id in", values, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdNotIn(List<Long> values) {
|
||||
addCriterion("role_id not in", values, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdBetween(Long value1, Long value2) {
|
||||
addCriterion("role_id between", value1, value2, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoleIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("role_id not between", value1, value2, "roleId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdIsNull() {
|
||||
addCriterion("permission_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdIsNotNull() {
|
||||
addCriterion("permission_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdEqualTo(Long value) {
|
||||
addCriterion("permission_id =", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdNotEqualTo(Long value) {
|
||||
addCriterion("permission_id <>", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdGreaterThan(Long value) {
|
||||
addCriterion("permission_id >", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("permission_id >=", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdLessThan(Long value) {
|
||||
addCriterion("permission_id <", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("permission_id <=", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdIn(List<Long> values) {
|
||||
addCriterion("permission_id in", values, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdNotIn(List<Long> values) {
|
||||
addCriterion("permission_id not in", values, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdBetween(Long value1, Long value2) {
|
||||
addCriterion("permission_id between", value1, value2, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("permission_id not between", value1, value2, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -7,6 +7,11 @@
|
||||
<result column="password" jdbcType="VARCHAR" property="password" />
|
||||
<result column="icon" jdbcType="VARCHAR" property="icon" />
|
||||
<result column="email" jdbcType="VARCHAR" property="email" />
|
||||
<result column="nick_name" jdbcType="VARCHAR" property="nickName" />
|
||||
<result column="note" jdbcType="VARCHAR" property="note" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="login_time" jdbcType="TIMESTAMP" property="loginTime" />
|
||||
<result column="status" jdbcType="INTEGER" property="status" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
@ -67,7 +72,7 @@
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, username, password, icon, email
|
||||
id, username, password, icon, email, nick_name, note, create_time, login_time, status
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.macro.mall.model.UmsAdminExample" resultMap="BaseResultMap">
|
||||
select
|
||||
@ -104,9 +109,13 @@
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ums_admin (username, password, icon,
|
||||
email)
|
||||
email, nick_name, note,
|
||||
create_time, login_time, status
|
||||
)
|
||||
values (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR},
|
||||
#{email,jdbcType=VARCHAR})
|
||||
#{email,jdbcType=VARCHAR}, #{nickName,jdbcType=VARCHAR}, #{note,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{loginTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsAdmin">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
@ -126,6 +135,21 @@
|
||||
<if test="email != null">
|
||||
email,
|
||||
</if>
|
||||
<if test="nickName != null">
|
||||
nick_name,
|
||||
</if>
|
||||
<if test="note != null">
|
||||
note,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="loginTime != null">
|
||||
login_time,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="username != null">
|
||||
@ -140,6 +164,21 @@
|
||||
<if test="email != null">
|
||||
#{email,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="nickName != null">
|
||||
#{nickName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="note != null">
|
||||
#{note,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="loginTime != null">
|
||||
#{loginTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.macro.mall.model.UmsAdminExample" resultType="java.lang.Integer">
|
||||
@ -166,6 +205,21 @@
|
||||
<if test="record.email != null">
|
||||
email = #{record.email,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.nickName != null">
|
||||
nick_name = #{record.nickName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.note != null">
|
||||
note = #{record.note,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.loginTime != null">
|
||||
login_time = #{record.loginTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
status = #{record.status,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
@ -177,7 +231,12 @@
|
||||
username = #{record.username,jdbcType=VARCHAR},
|
||||
password = #{record.password,jdbcType=VARCHAR},
|
||||
icon = #{record.icon,jdbcType=VARCHAR},
|
||||
email = #{record.email,jdbcType=VARCHAR}
|
||||
email = #{record.email,jdbcType=VARCHAR},
|
||||
nick_name = #{record.nickName,jdbcType=VARCHAR},
|
||||
note = #{record.note,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
login_time = #{record.loginTime,jdbcType=TIMESTAMP},
|
||||
status = #{record.status,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
@ -197,6 +256,21 @@
|
||||
<if test="email != null">
|
||||
email = #{email,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="nickName != null">
|
||||
nick_name = #{nickName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="note != null">
|
||||
note = #{note,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="loginTime != null">
|
||||
login_time = #{loginTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
@ -205,7 +279,12 @@
|
||||
set username = #{username,jdbcType=VARCHAR},
|
||||
password = #{password,jdbcType=VARCHAR},
|
||||
icon = #{icon,jdbcType=VARCHAR},
|
||||
email = #{email,jdbcType=VARCHAR}
|
||||
email = #{email,jdbcType=VARCHAR},
|
||||
nick_name = #{nickName,jdbcType=VARCHAR},
|
||||
note = #{note,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
login_time = #{loginTime,jdbcType=TIMESTAMP},
|
||||
status = #{status,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,196 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.macro.mall.mapper.UmsAdminPermissionRelationMapper">
|
||||
<resultMap id="BaseResultMap" type="com.macro.mall.model.UmsAdminPermissionRelation">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="admin_id" jdbcType="BIGINT" property="adminId" />
|
||||
<result column="permission_id" jdbcType="BIGINT" property="permissionId" />
|
||||
<result column="type" jdbcType="INTEGER" property="type" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, admin_id, permission_id, type
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.macro.mall.model.UmsAdminPermissionRelationExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ums_admin_permission_relation
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ums_admin_permission_relation
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from ums_admin_permission_relation
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.macro.mall.model.UmsAdminPermissionRelationExample">
|
||||
delete from ums_admin_permission_relation
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.macro.mall.model.UmsAdminPermissionRelation">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ums_admin_permission_relation (admin_id, permission_id, type
|
||||
)
|
||||
values (#{adminId,jdbcType=BIGINT}, #{permissionId,jdbcType=BIGINT}, #{type,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsAdminPermissionRelation">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ums_admin_permission_relation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="adminId != null">
|
||||
admin_id,
|
||||
</if>
|
||||
<if test="permissionId != null">
|
||||
permission_id,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="adminId != null">
|
||||
#{adminId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="permissionId != null">
|
||||
#{permissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.macro.mall.model.UmsAdminPermissionRelationExample" resultType="java.lang.Integer">
|
||||
select count(*) from ums_admin_permission_relation
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ums_admin_permission_relation
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.adminId != null">
|
||||
admin_id = #{record.adminId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.permissionId != null">
|
||||
permission_id = #{record.permissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.type != null">
|
||||
type = #{record.type,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ums_admin_permission_relation
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
admin_id = #{record.adminId,jdbcType=BIGINT},
|
||||
permission_id = #{record.permissionId,jdbcType=BIGINT},
|
||||
type = #{record.type,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.macro.mall.model.UmsAdminPermissionRelation">
|
||||
update ums_admin_permission_relation
|
||||
<set>
|
||||
<if test="adminId != null">
|
||||
admin_id = #{adminId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="permissionId != null">
|
||||
permission_id = #{permissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.macro.mall.model.UmsAdminPermissionRelation">
|
||||
update ums_admin_permission_relation
|
||||
set admin_id = #{adminId,jdbcType=BIGINT},
|
||||
permission_id = #{permissionId,jdbcType=BIGINT},
|
||||
type = #{type,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,179 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.macro.mall.mapper.UmsAdminRoleRelationMapper">
|
||||
<resultMap id="BaseResultMap" type="com.macro.mall.model.UmsAdminRoleRelation">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="admin_id" jdbcType="BIGINT" property="adminId" />
|
||||
<result column="role_id" jdbcType="BIGINT" property="roleId" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, admin_id, role_id
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.macro.mall.model.UmsAdminRoleRelationExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ums_admin_role_relation
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ums_admin_role_relation
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from ums_admin_role_relation
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.macro.mall.model.UmsAdminRoleRelationExample">
|
||||
delete from ums_admin_role_relation
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.macro.mall.model.UmsAdminRoleRelation">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ums_admin_role_relation (admin_id, role_id)
|
||||
values (#{adminId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsAdminRoleRelation">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ums_admin_role_relation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="adminId != null">
|
||||
admin_id,
|
||||
</if>
|
||||
<if test="roleId != null">
|
||||
role_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="adminId != null">
|
||||
#{adminId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="roleId != null">
|
||||
#{roleId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.macro.mall.model.UmsAdminRoleRelationExample" resultType="java.lang.Integer">
|
||||
select count(*) from ums_admin_role_relation
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ums_admin_role_relation
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.adminId != null">
|
||||
admin_id = #{record.adminId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.roleId != null">
|
||||
role_id = #{record.roleId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ums_admin_role_relation
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
admin_id = #{record.adminId,jdbcType=BIGINT},
|
||||
role_id = #{record.roleId,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.macro.mall.model.UmsAdminRoleRelation">
|
||||
update ums_admin_role_relation
|
||||
<set>
|
||||
<if test="adminId != null">
|
||||
admin_id = #{adminId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="roleId != null">
|
||||
role_id = #{roleId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.macro.mall.model.UmsAdminRoleRelation">
|
||||
update ums_admin_role_relation
|
||||
set admin_id = #{adminId,jdbcType=BIGINT},
|
||||
role_id = #{roleId,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,288 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.macro.mall.mapper.UmsPermissionMapper">
|
||||
<resultMap id="BaseResultMap" type="com.macro.mall.model.UmsPermission">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="pid" jdbcType="BIGINT" property="pid" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="value" jdbcType="VARCHAR" property="value" />
|
||||
<result column="icon" jdbcType="VARCHAR" property="icon" />
|
||||
<result column="type" jdbcType="INTEGER" property="type" />
|
||||
<result column="uri" jdbcType="VARCHAR" property="uri" />
|
||||
<result column="status" jdbcType="INTEGER" property="status" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="sort" jdbcType="INTEGER" property="sort" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, pid, name, value, icon, type, uri, status, create_time, sort
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.macro.mall.model.UmsPermissionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ums_permission
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ums_permission
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from ums_permission
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.macro.mall.model.UmsPermissionExample">
|
||||
delete from ums_permission
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.macro.mall.model.UmsPermission">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ums_permission (pid, name, value,
|
||||
icon, type, uri, status,
|
||||
create_time, sort)
|
||||
values (#{pid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR},
|
||||
#{icon,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{uri,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{sort,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsPermission">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ums_permission
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="pid != null">
|
||||
pid,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="value != null">
|
||||
value,
|
||||
</if>
|
||||
<if test="icon != null">
|
||||
icon,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="uri != null">
|
||||
uri,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="pid != null">
|
||||
#{pid,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value != null">
|
||||
#{value,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="icon != null">
|
||||
#{icon,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="uri != null">
|
||||
#{uri,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
#{sort,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.macro.mall.model.UmsPermissionExample" resultType="java.lang.Integer">
|
||||
select count(*) from ums_permission
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ums_permission
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.pid != null">
|
||||
pid = #{record.pid,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.value != null">
|
||||
value = #{record.value,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.icon != null">
|
||||
icon = #{record.icon,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.type != null">
|
||||
type = #{record.type,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.uri != null">
|
||||
uri = #{record.uri,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
status = #{record.status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.sort != null">
|
||||
sort = #{record.sort,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ums_permission
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
pid = #{record.pid,jdbcType=BIGINT},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
value = #{record.value,jdbcType=VARCHAR},
|
||||
icon = #{record.icon,jdbcType=VARCHAR},
|
||||
type = #{record.type,jdbcType=INTEGER},
|
||||
uri = #{record.uri,jdbcType=VARCHAR},
|
||||
status = #{record.status,jdbcType=INTEGER},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
sort = #{record.sort,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.macro.mall.model.UmsPermission">
|
||||
update ums_permission
|
||||
<set>
|
||||
<if test="pid != null">
|
||||
pid = #{pid,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value != null">
|
||||
value = #{value,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="icon != null">
|
||||
icon = #{icon,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="uri != null">
|
||||
uri = #{uri,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort = #{sort,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.macro.mall.model.UmsPermission">
|
||||
update ums_permission
|
||||
set pid = #{pid,jdbcType=BIGINT},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
value = #{value,jdbcType=VARCHAR},
|
||||
icon = #{icon,jdbcType=VARCHAR},
|
||||
type = #{type,jdbcType=INTEGER},
|
||||
uri = #{uri,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
sort = #{sort,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,243 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.macro.mall.mapper.UmsRoleMapper">
|
||||
<resultMap id="BaseResultMap" type="com.macro.mall.model.UmsRole">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="admin_count" jdbcType="INTEGER" property="adminCount" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="status" jdbcType="INTEGER" property="status" />
|
||||
<result column="sort" jdbcType="INTEGER" property="sort" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, name, description, admin_count, create_time, status, sort
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.macro.mall.model.UmsRoleExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ums_role
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ums_role
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from ums_role
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.macro.mall.model.UmsRoleExample">
|
||||
delete from ums_role
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.macro.mall.model.UmsRole">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ums_role (name, description, admin_count,
|
||||
create_time, status, sort
|
||||
)
|
||||
values (#{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{adminCount,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsRole">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ums_role
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="adminCount != null">
|
||||
admin_count,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="adminCount != null">
|
||||
#{adminCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
#{sort,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.macro.mall.model.UmsRoleExample" resultType="java.lang.Integer">
|
||||
select count(*) from ums_role
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ums_role
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.adminCount != null">
|
||||
admin_count = #{record.adminCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
status = #{record.status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.sort != null">
|
||||
sort = #{record.sort,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ums_role
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
admin_count = #{record.adminCount,jdbcType=INTEGER},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
status = #{record.status,jdbcType=INTEGER},
|
||||
sort = #{record.sort,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.macro.mall.model.UmsRole">
|
||||
update ums_role
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="adminCount != null">
|
||||
admin_count = #{adminCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort = #{sort,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.macro.mall.model.UmsRole">
|
||||
update ums_role
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
admin_count = #{adminCount,jdbcType=INTEGER},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
sort = #{sort,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,179 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.macro.mall.mapper.UmsRolePermissionRelationMapper">
|
||||
<resultMap id="BaseResultMap" type="com.macro.mall.model.UmsRolePermissionRelation">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="role_id" jdbcType="BIGINT" property="roleId" />
|
||||
<result column="permission_id" jdbcType="BIGINT" property="permissionId" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, role_id, permission_id
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.macro.mall.model.UmsRolePermissionRelationExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ums_role_permission_relation
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ums_role_permission_relation
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from ums_role_permission_relation
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.macro.mall.model.UmsRolePermissionRelationExample">
|
||||
delete from ums_role_permission_relation
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.macro.mall.model.UmsRolePermissionRelation">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ums_role_permission_relation (role_id, permission_id)
|
||||
values (#{roleId,jdbcType=BIGINT}, #{permissionId,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsRolePermissionRelation">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ums_role_permission_relation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="roleId != null">
|
||||
role_id,
|
||||
</if>
|
||||
<if test="permissionId != null">
|
||||
permission_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="roleId != null">
|
||||
#{roleId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="permissionId != null">
|
||||
#{permissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.macro.mall.model.UmsRolePermissionRelationExample" resultType="java.lang.Integer">
|
||||
select count(*) from ums_role_permission_relation
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ums_role_permission_relation
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.roleId != null">
|
||||
role_id = #{record.roleId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.permissionId != null">
|
||||
permission_id = #{record.permissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ums_role_permission_relation
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
role_id = #{record.roleId,jdbcType=BIGINT},
|
||||
permission_id = #{record.permissionId,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.macro.mall.model.UmsRolePermissionRelation">
|
||||
update ums_role_permission_relation
|
||||
<set>
|
||||
<if test="roleId != null">
|
||||
role_id = #{roleId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="permissionId != null">
|
||||
permission_id = #{permissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.macro.mall.model.UmsRolePermissionRelation">
|
||||
update ums_role_permission_relation
|
||||
set role_id = #{roleId,jdbcType=BIGINT},
|
||||
permission_id = #{permissionId,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user