|
@@ -69,35 +69,28 @@
|
|
|
</update>
|
|
|
|
|
|
<select id="selectPage" resultType="com.yonge.cooleshow.biz.dal.wrapper.TenantInfoWrapper$TenantInfo">
|
|
|
- SELECT
|
|
|
- id_ as id,
|
|
|
- name_ AS name,
|
|
|
- logo_ AS logo,
|
|
|
- brief_Introduction_ AS briefIntroduction,
|
|
|
- username_ AS username,
|
|
|
- phone_ AS phone,
|
|
|
- province_code_ AS provinceCode,
|
|
|
- city_code_ AS cityCode,
|
|
|
- region_code_ AS regionCode
|
|
|
- FROM tenant_info t
|
|
|
- where 1=1
|
|
|
- <if test="param.keyword != null and param.keyword != ''">
|
|
|
- and (
|
|
|
- t.name_ like concat('%',#{param.keyword},'%')
|
|
|
- or t.username_ like concat('%',#{param.keyword},'%')
|
|
|
- or t.phone_ like concat('%',#{param.keyword},'%')
|
|
|
- )
|
|
|
- </if>
|
|
|
- <if test="param.provinceCode != null and param.provinceCode != ''
|
|
|
- and param.cityCode != null and param.cityCode != ''
|
|
|
- and param.regionCode != null and param.regionCode != ''">
|
|
|
- and
|
|
|
- t.province_code_ = #{param.provinceCode}
|
|
|
- and
|
|
|
- t.city_code_ = #{param.cityCode}
|
|
|
- and
|
|
|
- t.region_code_ = #{param.regionCode}
|
|
|
- </if>
|
|
|
+ SELECT
|
|
|
+ <include refid="baseColumns"/>
|
|
|
+ FROM tenant_info t
|
|
|
+ <where>
|
|
|
+ <if test="param.keyword != null and param.keyword != ''">
|
|
|
+ and (
|
|
|
+ t.name_ like concat('%',#{param.keyword},'%')
|
|
|
+ or t.username_ like concat('%',#{param.keyword},'%')
|
|
|
+ or t.phone_ like concat('%',#{param.keyword},'%')
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ <if test="param.provinceCode != null">
|
|
|
+ and t.province_code_ = #{param.provinceCode}
|
|
|
+ </if>
|
|
|
+ <if test="param.cityCode != null">
|
|
|
+ and t.city_code_ = #{param.cityCode}
|
|
|
+ </if>
|
|
|
+ <if test="param.regionCode != null">
|
|
|
+ and t.region_code_ = #{param.regionCode}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+
|
|
|
</select>
|
|
|
<select id="queryTeacherCounts" resultType="java.lang.Integer">
|
|
|
SELECT count(t.tenant_id_) FROM teacher t where t.tenant_id_ IN (<foreach collection="listId" separator="," item="Id">#{Id}</foreach>)
|