1 files deleted
4 files modified
| | |
| | | package com.oying.modules.system.domain; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.oying.base.BaseEntity; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import cn.hutool.core.bean.copier.CopyOptions; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | |
| | | @TableName("sys_user_merchant") |
| | | public class UserMerchant extends BaseEntity implements Serializable { |
| | | |
| | | @TableId(value = "merchant_id") |
| | | @NotNull(groups = Update.class) |
| | | @TableId(value = "manager_id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "ID", hidden = true) |
| | | private Long managerId; |
| | | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long merchantId; |
| | | |
| | | @TableId(value = "user_id") |
| | | @ApiModelProperty(value = "用户id") |
| | | private Long userId; |
| | | |
| | |
| | | package com.oying.modules.system.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.oying.base.BaseEntity; |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import cn.hutool.core.bean.copier.CopyOptions; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | |
| | | @TableName("sys_user_store") |
| | | public class UserStore extends BaseEntity implements Serializable { |
| | | |
| | | @NotNull(groups = Update.class) |
| | | @TableId(value = "manager_id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "ID", hidden = true) |
| | | private Long managerId; |
| | | |
| | | @TableId(value = "store_id") |
| | | @ApiModelProperty(value = "门店id") |
| | | private Long storeId; |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.oying.modules.system.mapper.UserMerchantMapper"> |
| | | <resultMap id="BaseResultMap" type="com.oying.modules.system.domain.UserMerchant"> |
| | | <id column="merchant_id" property="merchantId"/> |
| | | <id column="user_id" property="userId"/> |
| | | <id column="manager_id" property="managerId"/> |
| | | <result column="merchant_id" property="merchantId"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="role_type" property="roleType"/> |
| | | <result column="permissions" property="permissions"/> |
| | | <result column="create_by" property="createBy"/> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | merchant_id, user_id, role_type, permissions, create_by, create_time, update_by, update_time |
| | | manager_id, merchant_id, user_id, role_type, permissions, create_by, create_time, update_by, update_time |
| | | </sql> |
| | | |
| | | <select id="findAll" resultMap="BaseResultMap"> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.oying.modules.system.mapper.UserStoreMapper"> |
| | | <resultMap id="BaseResultMap" type="com.oying.modules.system.domain.UserStore"> |
| | | <id column="store_id" property="storeId"/> |
| | | <id column="user_id" property="userId"/> |
| | | <id column="manager_id" property="managerId"/> |
| | | <result column="store_id" property="storeId"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="role_type" property="roleType"/> |
| | | <result column="permissions" property="permissions"/> |
| | | <result column="create_by" property="createBy"/> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | store_id, user_id, role_type, permissions, create_by, create_time, update_by, update_time |
| | | manager_id, store_id, user_id, role_type, permissions, create_by, create_time, update_by, update_time |
| | | </sql> |
| | | |
| | | <select id="findAll" resultMap="BaseResultMap"> |