| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?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.ydtech.modules.admin.dao.SysWechatCustomerMapper">
- <resultMap id="BaseResultMap" type="com.ydtech.modules.admin.model.po.SysWechatCustomer">
- <id property="id" column="id" jdbcType="INTEGER"/>
- <result property="nickname" column="nickname" jdbcType="VARCHAR"/>
- <result property="avatar" column="avatar" jdbcType="VARCHAR"/>
- <result property="userId" column="user_id" jdbcType="VARCHAR"/>
- <result property="receptionist" column="receptionist" jdbcType="VARCHAR"/>
- <result property="receptionistId" column="receptionist_id" jdbcType="VARCHAR"/>
- <result property="openKfId" column="open_kf_id" jdbcType="VARCHAR"/>
- <result property="dutyCustomerId" column="duty_customer_id" jdbcType="INTEGER"/>
- </resultMap>
- <sql id="Base_Column_List">
- id,nickname,avatar,
- user_id,receptionist,duty_customer_id
- </sql>
- <select id="getByNickname" resultType="com.ydtech.modules.admin.model.vo.wechat.SysWechatCustomerVo">
- select c.id as id,
- f.id as avatar,
- f.url as avatarUrl,
- c.nickname as nickname,
- u.name as username,
- u.id as userId,
- c.department_id as departmentId,
- c.receptionist as receptionist,
- c.receptionist_id as receptionistId,
- swc.nickname as dutyCustomer
- from sys_wechat_customer c
- left join sys_user u on u.id = c.user_id
- left join ins_upload_files f on f.id = c.avatar
- left join sys_wechat_customer swc on swc.id = c.duty_customer_id
- <if test="nickname != null and nickname != ''">
- where c.nickname = #{nickname}
- </if>
- order by c.id
- </select>
- </mapper>
|