| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <?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.sckw.system.dao.SysUserDao">
- <resultMap id="BaseResultMap" type="com.sckw.system.model.SysUser">
- <result column="id" property="id" />
- <result column="system_type" property="systemType" />
- <result column="account" property="account" />
- <result column="password" property="password" />
- <result column="name" property="name" />
- <result column="phone" property="phone" />
- <result column="photo" property="photo" />
- <result column="email" property="email" />
- <result column="is_main" property="isMain" />
- <result column="remark" property="remark" />
- <result column="status" property="status" />
- <result column="create_by" property="createBy" />
- <result column="create_time" property="createTime" />
- <result column="update_by" property="updateBy" />
- <result column="update_time" property="updateTime" />
- <result column="del_flag" property="delFlag" />
- </resultMap>
- <insert id="cunstomtest" parameterType="com.sckw.system.model.KwsEntType">
- insert into kws_ent_type
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="entId != null">
- ent_id,
- </if>
- <if test="type != null">
- type,
- </if>
- <if test="remark != null">
- remark,
- </if>
- <if test="status != null">
- status,
- </if>
- <if test="createBy != null">
- create_by,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="updateBy != null">
- update_by,
- </if>
- <if test="updateTime != null">
- update_time,
- </if>
- <if test="delFlag != null">
- del_flag,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=BIGINT},
- </if>
- <if test="entId != null">
- #{entId,jdbcType=BIGINT},
- </if>
- <if test="type != null">
- #{type,jdbcType=INTEGER},
- </if>
- <if test="remark != null">
- #{remark,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- #{status,jdbcType=INTEGER},
- </if>
- <if test="createBy != null">
- #{createBy,jdbcType=BIGINT},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateBy != null">
- #{updateBy,jdbcType=BIGINT},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="delFlag != null">
- #{delFlag,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <select id="findByAccount" parameterType="java.util.Map" resultType="com.sckw.system.model.SysUser">
- SELECT
- id, system_type systemType, account, password, name, phone, photo, email, is_main isMain,
- remark, status, create_by createBy, create_time createTime, update_by updateBy, update_time updateTime
- FROM
- sys_user
- where del_flag = 0
- <if test="systemType != null and systemType != ''">
- and system_type = #{systemType, jdbcType=VARCHAR}
- </if>
- <if test="account != null and account != ''">
- and account = #{account, jdbcType=VARCHAR}
- </if>
- </select>
- <select id="findPage" resultType="java.util.Map" parameterType="java.util.Map" >
- SELECT
- id, system_type systemType, account, password, name, phone, photo, email, is_main isMain,
- remark, status, create_by createBy, create_time createTime, update_by updateBy, update_time updateTime
- FROM
- sys_user u
- where del_flag = 0
- <if test="systemType != null and systemType != ''">
- and d.system_type = #{systemType, jdbcType=VARCHAR}
- </if>
- <if test="account != null and account != ''">
- and account = #{account, jdbcType=VARCHAR}
- </if>
- ORDER BY create_time desc
- </select>
- </mapper>
|