12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <?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.caimei.modules.weisha.dao.CmMallUserDao">
- <select id="get" resultType="com.caimei.modules.weisha.entity.CmMallOrganize">
- select * from cm_mall_organize where id = #{id}
- </select>
- <select id="getMallUser" resultType="com.caimei.modules.weisha.entity.CmMallUser">
- SELECT
- id,
- organizeID,
- status,
- account,
- accountName,
- personnelType,
- addTime,
- updateTime
- FROM cm_mall_admin_user
- <where>
- organizeID = #{organizeId} and delFlag = 0
- <if test="account != null and account != ''">
- and account like concat('%',#{account},'%')
- </if>
- <if test="accountName != null and accountName !=''">
- and accountName like concat('%',#{accountName},'%')
- </if>
- <if test="status != null and status != ''">
- and status = #{status}
- </if>
- <if test="personnelType != null and personnelType != ''">
- and personnelType = #{personnelType}
- </if>
- <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
- and addTime <![CDATA[ >= ]]> #{startTime} and addTime <![CDATA[ <= ]]> #{endTime}
- </if>
- </where>
- </select>
- <update id="updateproduct">
- update cm_mall_admin_user
- set status = #{validFlag}
- where id = #{id}
- </update>
- <select id="getMallUserById" resultType="com.caimei.modules.weisha.entity.CmMallUser">
- SELECT
- id,
- organizeID,
- account,
- accountName,
- password,
- salt,
- addTime,
- updateTime
- FROM cm_mall_admin_user
- where id = #{id}
- </select>
- <select id="getRepeat" resultType="java.lang.Integer">
- select id from cm_mall_admin_user where account =#{account}
- <if test="id != null and id != ''">
- and id != #{id}
- </if>
- limit 1
- </select>
- <insert id="insertMallUser">
- INSERT INTO cm_mall_admin_user(account, accountName, PASSWORD, salt, organizeID, status, personnelType, ADDTIME, updateTime, delFlag)
- VALUES(#{account}, #{accountName}, #{password}, #{salt}, #{organizeId}, #{status}, #{personnelType}, #{addTime}, #{updateTime}, #{delFlag})
- </insert>
- <update id="updateMallUser">
- update cm_mall_admin_user
- <set>
- <if test="account != null and account != ''">
- account = #{account},
- </if>
- <if test="accountName != null and accountName != ''">
- accountName = #{accountName},
- </if>
- <if test="password != null and password != ''">
- password = #{password},
- </if>
- <if test="organizeId != null and organizeId != ''">
- organizeID = #{organizeId},
- </if>
- <if test="status != null and status != ''">
- status = #{status},
- </if>
- <if test="personnelType != null and personnelType != ''">
- personnelType = #{personnelType},
- </if>
- <if test="updateTime != null">
- updateTime = #{updateTime},
- </if>
- <if test="salt != null and salt != ''">
- salt = #{salt}
- </if>
- </set>
- where id = #{id}
- </update>
- </mapper>
|