You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RecordCollectService/src/main/resources/mapper/PowerUserMapper.xml

41 lines
1.9 KiB
XML

<?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.docus.server.collection.mapper.PowerUserMapper">
<insert id="addUser">
INSERT INTO `docus_system`.`power_user`(`user_id`,
`user_name`,
`name`,
`user_pwd`,
`user_position`,
`role_id`,
`dept_id`,
`create_date`,
`creater`,
`update_date`,
`updater`,
`user_tel`)
VALUES (#{user.userId},#{user.userName},#{user.name},#{user.userPwd},#{user.position},#{user.roleId}
,#{user.deptId},now(),#{user.authorName},now(),#{user.authorName},#{user.telephone})
</insert>
<update id="updateUser">
update `docus_system`.`power_user`
set `updater`=#{user.authorName},
`dept_id`=#{user.deptId},
`user_position`=#{user.position},
`user_tel`=#{user.telephone},
`name`=#{user.name},
`update_date`=now()
where `user_id`=#{user.userId}
</update>
<delete id="delUserByUserName">
delete from `docus_system`.`power_user` where `user_name` = #{userName}
</delete>
<select id="getUserByUserName" resultType="com.docus.server.collection.entity.PowerUser">
SELECT `user_id`,`user_name`,`user_pwd` FROM `docus_system`.`power_user`
WHERE `user_name` = #{userName} LIMIT 1
</select>
</mapper>