| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?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="cn.tr.module.sys.tenant.repository.SysTenantRepository">
- <resultMap id="CommonResult" type="cn.tr.module.sys.tenant.dto.SysTenantCommonDTO">
- <result column="id" property="id"/>
- <result column="name" property="name"/>
- <result column="package_name" property="packageName"/>
- <result column="username" property="username"/>
- <result column="type" property="type"/>
- <result column="contract_user" property="contractUser"/>
- <result column="contact_mobile" property="contactMobile"/>
- <result column="remark" property="remark"/>
- <result column="disable" property="disable"/>
- </resultMap>
- <select id="stdSelectList" resultType="cn.tr.module.sys.tenant.dto.SysTenantCommonDTO" parameterType="cn.tr.module.sys.tenant.dto.SysTenantQueryDTO">
- select t.*,tp.package_name,u.username from
- sys_tenant as t LEFT JOIN sys_tenant_package as tp on t.package_id=tp.id
- LEFT JOIN sys_user as u on u.id=t.tenant_user_id
- <where>
- t.deleted = 0
- <if test="query.name != null">
- and t.name like concat('%',#{query.name},'%')
- </if>
- <if test="query.contractUser != null">
- and t.contract_user like concat('%',#{query.contractUser},'%')
- </if>
- <if test="query.contactMobile != null">
- and t.contact_mobile like concat('%',#{query.contactMobile},'%')
- </if>
- <if test="query.disable != null">
- and t.disable = #{query.disable}
- </if>
- </where>
- </select>
- <select id="stdSelectById" resultType="cn.tr.module.sys.tenant.dto.SysTenantCommonDTO" parameterType="java.lang.String">
- select t.*,tp.package_name,u.username from
- sys_tenant as t LEFT JOIN sys_tenant_package as tp on t.package_id=tp.id
- LEFT JOIN sys_user as u on u.id=t.tenant_user_id
- where t.id = #{id} and t.deleted = 0
- </select>
- </mapper>
|