|
@@ -29,6 +29,35 @@
|
|
select * from mgr_user where phone = #{phone} limit 1
|
|
select * from mgr_user where phone = #{phone} limit 1
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+<select id="getUserByPhone" resultType="com.bosshand.virgo.core.model.MgrUser">
|
|
|
|
+ SELECT * FROM mgr_user where phone=#{phone}
|
|
|
|
+</select>
|
|
|
|
+
|
|
|
|
+<select id="getIds" parameterType="list" resultType="com.bosshand.virgo.core.model.MgrUser">
|
|
|
|
+ select * from mgr_user
|
|
|
|
+ <trim>
|
|
|
|
+ <if test="list.size > 0">
|
|
|
|
+ where id in (
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=",">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ )
|
|
|
|
+ </if>
|
|
|
|
+ <if test="list.size = 0">
|
|
|
|
+ where 1=0
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+</select>
|
|
|
|
+
|
|
|
|
+<insert id="insert" parameterType="com.bosshand.virgo.core.model.MgrUser" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
+ INSERT into mgr_user(name, sex, phone, email, portrait, create_time, rsonal_signature, id_card, practice_certificate, practice_seal, lastOrganizationId)
|
|
|
|
+ values(#{name}, #{sex}, #{phone}, #{email}, #{portrait}, #{createTime}, #{rsonalSignature}, #{idCard}, #{practiceCertificate}, #{practiceSeal}, #{lastOrganizationId})
|
|
|
|
+</insert>
|
|
|
|
+
|
|
|
|
+<delete id="delete">
|
|
|
|
+ DELETE from mgr_user where id = #{id}
|
|
|
|
+</delete>
|
|
|
|
+
|
|
<update id="updateLastOrganizationId" parameterType="com.bosshand.virgo.core.model.MgrUser">
|
|
<update id="updateLastOrganizationId" parameterType="com.bosshand.virgo.core.model.MgrUser">
|
|
UPDATE mgr_user set lastOrganizationId = #{lastOrganizationId} WHERE id=#{id}
|
|
UPDATE mgr_user set lastOrganizationId = #{lastOrganizationId} WHERE id=#{id}
|
|
</update>
|
|
</update>
|
|
@@ -58,76 +87,6 @@
|
|
WHERE id=#{id}
|
|
WHERE id=#{id}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
-<select id="getIds" parameterType="list" resultType="com.bosshand.virgo.core.model.MgrUser">
|
|
|
|
- select * from mgr_user
|
|
|
|
- <trim>
|
|
|
|
- <if test="list.size > 0">
|
|
|
|
- where id in (
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=",">
|
|
|
|
- #{item}
|
|
|
|
- </foreach>
|
|
|
|
- )
|
|
|
|
- </if>
|
|
|
|
- <if test="list.size = 0">
|
|
|
|
- where 1=0
|
|
|
|
- </if>
|
|
|
|
- </trim>
|
|
|
|
-</select>
|
|
|
|
-
|
|
|
|
-<select id="getUserByPhone" resultType="com.bosshand.virgo.core.model.MgrUser">
|
|
|
|
- SELECT * FROM mgr_user where phone=#{phone}
|
|
|
|
-</select>
|
|
|
|
-
|
|
|
|
-<select id="getUserByOrganizationId" resultType="com.bosshand.virgo.core.model.MgrUser">
|
|
|
|
- SELECT * FROM mgr_user where organization_id=#{organizationId}
|
|
|
|
-</select>
|
|
|
|
-
|
|
|
|
-<select id="getUserByOrganizationIds" parameterType="list" resultType="com.bosshand.virgo.core.model.MgrUser">
|
|
|
|
- select id, role_id from mgr_user where organization_id in (
|
|
|
|
- <trim>
|
|
|
|
- <if test="list.size > 0">
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=",">
|
|
|
|
- #{item}
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- </trim>
|
|
|
|
- )
|
|
|
|
-</select>
|
|
|
|
-
|
|
|
|
-<select id="getList" parameterType="map" resultMap="MgrUserResult">
|
|
|
|
- SELECT id, login_name, portrait, name, sex, phone, email, create_time,organization_id, project_id, department_id, role_id, resource, comment, face, faceStatus FROM mgr_user
|
|
|
|
- WHERE organization_id = #{organizationId}
|
|
|
|
- <trim>
|
|
|
|
- <if test="name != null and name !=''">and name = #{name}</if>
|
|
|
|
- <if test="phone != null and phone !=''">and phone = #{phone}</if>
|
|
|
|
- <if test="sex != null and sex !=''">and sex = #{sex}</if>
|
|
|
|
- </trim>
|
|
|
|
- limit #{currIndex} , #{pageSize}
|
|
|
|
-</select>
|
|
|
|
-
|
|
|
|
-<select id="getTotalCount" parameterType="map" resultType="Integer">
|
|
|
|
- SELECT count(*) FROM mgr_user
|
|
|
|
- WHERE organization_id = #{organizationId}
|
|
|
|
- <trim>
|
|
|
|
- <if test="name != null and name !=''">and name = #{name}</if>
|
|
|
|
- <if test="phone != null and phone !=''">and phone = #{phone}</if>
|
|
|
|
- <if test="sex != null and sex !=''">and sex = #{sex}</if>
|
|
|
|
- </trim>
|
|
|
|
-</select>
|
|
|
|
-
|
|
|
|
-<insert id="insert" parameterType="com.bosshand.virgo.core.model.MgrUser" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
- INSERT into mgr_user(name, sex, phone, email, portrait, create_time, rsonal_signature, id_card, practice_certificate, practice_seal, lastOrganizationId)
|
|
|
|
- values(#{name}, #{sex}, #{phone}, #{email}, #{portrait}, #{createTime}, #{rsonalSignature}, #{idCard}, #{practiceCertificate}, #{practiceSeal}, #{lastOrganizationId})
|
|
|
|
-</insert>
|
|
|
|
-
|
|
|
|
-<delete id="delete">
|
|
|
|
- DELETE from mgr_user where id = #{id}
|
|
|
|
-</delete>
|
|
|
|
-
|
|
|
|
-<update id="checkFace" parameterType="com.bosshand.virgo.core.model.MgrUser">
|
|
|
|
- UPDATE mgr_user SET faceStatus = 1 where id =#{id}
|
|
|
|
-</update>
|
|
|
|
-
|
|
|
|
<update id="updatePhone" parameterType="com.bosshand.virgo.core.model.MgrUser">
|
|
<update id="updatePhone" parameterType="com.bosshand.virgo.core.model.MgrUser">
|
|
UPDATE mgr_user SET phone = #{phone} where id =#{id}
|
|
UPDATE mgr_user SET phone = #{phone} where id =#{id}
|
|
</update>
|
|
</update>
|
|
@@ -135,5 +94,9 @@
|
|
<update id="banUser" parameterType="com.bosshand.virgo.core.model.MgrUser">
|
|
<update id="banUser" parameterType="com.bosshand.virgo.core.model.MgrUser">
|
|
UPDATE mgr_user set status = #{status} WHERE id=#{id}
|
|
UPDATE mgr_user set status = #{status} WHERE id=#{id}
|
|
</update>
|
|
</update>
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+<update id="checkFace" parameterType="com.bosshand.virgo.core.model.MgrUser">
|
|
|
|
+ UPDATE mgr_user SET faceStatus = 1 where id =#{id}
|
|
|
|
+</update>
|
|
|
|
+
|
|
</mapper>
|
|
</mapper>
|