<?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.dsh.course.mapper.TOperatorMapper">
|
<update id="changeState">
|
update t_operator set
|
state = #{state}
|
<where>
|
<if test="ids != null and ids.size()>0">
|
AND t_operator.id IN
|
<foreach collection="ids" separator="," item="id" open="(" close=")">
|
#{id}
|
</foreach>
|
</if>
|
</where>
|
</update>
|
|
<select id="listAll" resultType="java.util.Map">
|
select t1.id as id, t1.name as name,t1.type as `type`,t1.state as state,t1.status as status,t2.name as userName,t2.phone as phone
|
from t_operator t1
|
left join sys_user t2 on t1.userId = t2.id
|
where 1=1
|
<if test="userName != null and userName != ''">
|
and t2.name like CONCAT('%',#{userName},'%')
|
</if>
|
<if test="phone != null and phone != ''">
|
and t2.phone like CONCAT('%',#{phone},'%')
|
</if>
|
<if test="type != null and type != ''">
|
and t1.type = #{type}
|
</if>
|
</select>
|
<select id="getBankList" resultType="com.dsh.guns.modular.system.model.Bank">
|
select * from t_bank
|
</select>
|
</mapper>
|