|
@@ -10,18 +10,19 @@
|
|
|
<result column="email" jdbcType="VARCHAR" property="email"/>
|
|
<result column="email" jdbcType="VARCHAR" property="email"/>
|
|
|
<result column="mobile" jdbcType="VARCHAR" property="mobile"/>
|
|
<result column="mobile" jdbcType="VARCHAR" property="mobile"/>
|
|
|
<result column="type" jdbcType="INTEGER" property="type"/>
|
|
<result column="type" jdbcType="INTEGER" property="type"/>
|
|
|
|
|
+ <result column="enabled" jdbcType="BOOLEAN" property="enabled"/>
|
|
|
<result column="creator_id" jdbcType="BIGINT" property="creatorId"/>
|
|
<result column="creator_id" jdbcType="BIGINT" property="creatorId"/>
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
|
|
<result column="updater_id" jdbcType="BIGINT" property="updaterId"/>
|
|
<result column="updater_id" jdbcType="BIGINT" property="updaterId"/>
|
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
<sql id="baseColumns">
|
|
<sql id="baseColumns">
|
|
|
- id,username,password,salt,realname,email,mobile,type,creator_id,create_time,updater_id,update_time
|
|
|
|
|
|
|
+ id,username,password,salt,realname,email,mobile,type,enabled,creator_id,create_time,updater_id,update_time
|
|
|
</sql>
|
|
</sql>
|
|
|
<insert id="insert" parameterType="com.usoftchina.saas.account.po.Account">
|
|
<insert id="insert" parameterType="com.usoftchina.saas.account.po.Account">
|
|
|
- insert into ac_account(username,password,salt,realname,email,mobile,type,creator_id,create_time,updater_id,update_time)
|
|
|
|
|
|
|
+ insert into ac_account(username,password,salt,realname,email,mobile,type,enabled,creator_id,create_time,updater_id,update_time)
|
|
|
values (#{username,jdbcType=VARCHAR},#{password,jdbcType=VARCHAR}, #{salt,jdbcType=VARCHAR},
|
|
values (#{username,jdbcType=VARCHAR},#{password,jdbcType=VARCHAR}, #{salt,jdbcType=VARCHAR},
|
|
|
- #{realname,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER},
|
|
|
|
|
|
|
+ #{realname,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{enabled,jdbcType=BOOLEAN},
|
|
|
#{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP})
|
|
#{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP})
|
|
|
</insert>
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.usoftchina.saas.account.po.Account">
|
|
<insert id="insertSelective" parameterType="com.usoftchina.saas.account.po.Account">
|
|
@@ -48,6 +49,9 @@
|
|
|
<if test="type != null">
|
|
<if test="type != null">
|
|
|
type,
|
|
type,
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="enabled != null">
|
|
|
|
|
+ enabled,
|
|
|
|
|
+ </if>
|
|
|
<if test="creatorId != null">
|
|
<if test="creatorId != null">
|
|
|
creator_id,
|
|
creator_id,
|
|
|
</if>
|
|
</if>
|
|
@@ -81,7 +85,10 @@
|
|
|
#{mobile,jdbcType=VARCHAR},
|
|
#{mobile,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
<if test="type != null">
|
|
<if test="type != null">
|
|
|
- #{type,jdbcType=INT},
|
|
|
|
|
|
|
+ #{type,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="enabled != null">
|
|
|
|
|
+ #{enabled,jdbcType=BOOLEAN},
|
|
|
</if>
|
|
</if>
|
|
|
<if test="creatorId != null">
|
|
<if test="creatorId != null">
|
|
|
#{creatorId,jdbcType=BIGINT},
|
|
#{creatorId,jdbcType=BIGINT},
|
|
@@ -97,6 +104,9 @@
|
|
|
</if>
|
|
</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
|
|
+ select <include refid="baseColumns"/> from ac_account where id=#{id}
|
|
|
|
|
+ </select>
|
|
|
<select id="selectByUsername" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
<select id="selectByUsername" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
select <include refid="baseColumns"/> from ac_account where username=#{username}
|
|
select <include refid="baseColumns"/> from ac_account where username=#{username}
|
|
|
</select>
|
|
</select>
|
|
@@ -109,4 +119,7 @@
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
delete from ac_account where id=#{id}
|
|
delete from ac_account where id=#{id}
|
|
|
</delete>
|
|
</delete>
|
|
|
|
|
+ <update id="updateEnabled">
|
|
|
|
|
+ update ac_account set enabled=#{enabled,jdbcType=BOOLEAN} where id=#{id,jdbcType=BIGINT}
|
|
|
|
|
+ </update>
|
|
|
</mapper>
|
|
</mapper>
|