| | |
| | | <result column="id" property="id" jdbcType="BIGINT" /> |
| | | <result column="email" property="email" jdbcType="VARCHAR" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">id,name,account,pwd,createtime,authority,email</sql> |
| | | <sql id="Base_Column_List">id,`name`,`account`,`pwd`,createtime,authority,`email`</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | |
| | | yeshi_ec_adminuser where id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.common.AdminUser" |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_adminuser |
| | | (id,name,account,pwd,createtime,authority,id,email) values |
| | | (id,`name`,`account`,`pwd`,createtime,authority,`email`) values |
| | | (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{account,jdbcType=VARCHAR}, |
| | | #{pwd,jdbcType=VARCHAR},#{createtime,jdbcType=VARCHAR},#{authority,jdbcType=INTEGER},#{id,jdbcType=BIGINT},#{email,jdbcType=VARCHAR}) |
| | | #{pwd,jdbcType=VARCHAR},#{createtime,jdbcType=VARCHAR},#{authority,jdbcType=INTEGER},#{email,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.common.AdminUser" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_adminuser |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="name != null">name,</if> |
| | | <if test="account != null">account,</if> |
| | | <if test="pwd != null">pwd,</if> |
| | | <if test="name != null">`name`,</if> |
| | | <if test="account != null">`account`,</if> |
| | | <if test="pwd != null">`pwd`,</if> |
| | | <if test="createtime != null">createtime,</if> |
| | | <if test="authority != null">authority,</if> |
| | | <if test="email != null">email,</if> |
| | | <if test="email != null">`email`,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.common.AdminUser">update |
| | | yeshi_ec_adminuser set name = #{name,jdbcType=VARCHAR},account = |
| | | #{account,jdbcType=VARCHAR}, pwd = #{pwd,jdbcType=VARCHAR},createtime |
| | | yeshi_ec_adminuser set `name` = #{name,jdbcType=VARCHAR},`account` = |
| | | #{account,jdbcType=VARCHAR}, `pwd` = #{pwd,jdbcType=VARCHAR},createtime |
| | | = #{createtime,jdbcType=VARCHAR}, authority = |
| | | #{authority,jdbcType=INTEGER} ,email =#{email,jdbcType=VARCHAR} where |
| | | #{authority,jdbcType=INTEGER} ,`email` =#{email,jdbcType=VARCHAR} where |
| | | id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.common.AdminUser"> |
| | | update yeshi_ec_adminuser |
| | | <set> |
| | | <if test="name != null">name=#{name,jdbcType=VARCHAR},</if> |
| | | <if test="account != null">account=#{account,jdbcType=VARCHAR},</if> |
| | | <if test="pwd != null">pwd=#{pwd,jdbcType=VARCHAR},</if> |
| | | <if test="name != null">`name`=#{name,jdbcType=VARCHAR},</if> |
| | | <if test="account != null">`account`=#{account,jdbcType=VARCHAR},</if> |
| | | <if test="pwd != null">`pwd`=#{pwd,jdbcType=VARCHAR},</if> |
| | | <if test="createtime != null">createtime=#{createtime,jdbcType=VARCHAR},</if> |
| | | <if test="authority != null">authority=#{authority,jdbcType=INTEGER},</if> |
| | | <if test="id !=null">id =#{id,jdbcType=BIGINT},</if> |
| | | <if test="email !=null">email =#{email,jdbcType=VARCHAR},</if> |
| | | <if test="email !=null">`email` =#{email,jdbcType=VARCHAR},</if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <select id="getByAccountAndPwd" resultMap="BaseResultMap"> |
| | | SELECT * FROM yeshi_ec_adminuser u |
| | | WHERE u.`account` = #{account} AND u.`pwd`= #{pwd} |
| | | LIMIT 1 |
| | | </select> |
| | | </mapper> |