From 196bb14112448857a885e32dc4149e308e00b01a Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期四, 15 八月 2024 11:57:15 +0800 Subject: [PATCH] 2024.8.15 各项修正 --- src/main/resources/mapper/BaseInfoMapper.xml | 157 ++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 116 insertions(+), 41 deletions(-) diff --git a/src/main/resources/mapper/BaseInfoMapper.xml b/src/main/resources/mapper/BaseInfoMapper.xml index 88f9e98..fe596f5 100644 --- a/src/main/resources/mapper/BaseInfoMapper.xml +++ b/src/main/resources/mapper/BaseInfoMapper.xml @@ -1,42 +1,117 @@ -<?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.flightfeather.supervision.domain.mapper.BaseInfoMapper" > - <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.entity.BaseInfo" > - <!-- - WARNING - @mbg.generated - --> - <id column="BI_GUID" property="biGuid" jdbcType="VARCHAR" /> - <result column="BI_Name" property="biName" jdbcType="VARCHAR" /> - <result column="BI_Nick_Name" property="biNickName" jdbcType="VARCHAR" /> - <result column="CI_GUID" property="ciGuid" jdbcType="VARCHAR" /> - <result column="CI_Name" property="ciName" jdbcType="VARCHAR" /> - <result column="BI_Province_Code" property="biProvinceCode" jdbcType="VARCHAR" /> - <result column="BI_Province_Name" property="biProvinceName" jdbcType="VARCHAR" /> - <result column="BI_City_Code" property="biCityCode" jdbcType="VARCHAR" /> - <result column="BI_City_Name" property="biCityName" jdbcType="VARCHAR" /> - <result column="BI_District_Code" property="biDistrictCode" jdbcType="VARCHAR" /> - <result column="BI_District_Name" property="biDistrictName" jdbcType="VARCHAR" /> - <result column="BI_Town_Code" property="biTownCode" jdbcType="VARCHAR" /> - <result column="BI_Town_Name" property="biTownName" jdbcType="VARCHAR" /> - <result column="BI_Management_Company_Id" property="biManagementCompanyId" jdbcType="VARCHAR" /> - <result column="BI_Management_Company" property="biManagementCompany" jdbcType="VARCHAR" /> - <result column="BI_Contact" property="biContact" jdbcType="VARCHAR" /> - <result column="BI_Telephone" property="biTelephone" jdbcType="VARCHAR" /> - <result column="BI_Address" property="biAddress" jdbcType="VARCHAR" /> - <result column="BI_Create_Time" property="biCreateTime" jdbcType="TIMESTAMP" /> - <result column="BI_Update_Time" property="biUpdateTime" jdbcType="TIMESTAMP" /> - <result column="BI_Extension1" property="biExtension1" jdbcType="VARCHAR" /> - <result column="BI_Extension2" property="biExtension2" jdbcType="VARCHAR" /> - <result column="BI_Extension3" property="biExtension3" jdbcType="VARCHAR" /> - <result column="BI_Remark" property="biRemark" jdbcType="VARCHAR" /> - </resultMap> - <sql id="Base_Column_List" > - <!-- - WARNING - @mbg.generated - --> - BI_GUID, BI_Name, BI_Nick_Name, CI_GUID, CI_Name, BI_Province_Code, BI_Province_Name, - BI_City_Code, BI_City_Name, BI_District_Code, BI_District_Name, BI_Town_Code, BI_Town_Name, - BI_Management_Company_Id, BI_Management_Company, BI_Contact, BI_Telephone, BI_Address, - BI_Create_Time, BI_Update_Time, BI_Extension1, BI_Extension2, BI_Extension3, BI_Remark - </sql> +<?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.flightfeather.supervision.domain.mapper.BaseInfoMapper"> + <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.entity.BaseInfo"> + <!-- + WARNING - @mbg.generated + --> + <id column="BI_GUID" jdbcType="VARCHAR" property="biGuid"/> + <result column="BI_Name" jdbcType="VARCHAR" property="biName"/> + <result column="BI_Nick_Name" jdbcType="VARCHAR" property="biNickName"/> + <result column="CI_GUID" jdbcType="VARCHAR" property="ciGuid"/> + <result column="CI_Name" jdbcType="VARCHAR" property="ciName"/> + <result column="BI_Province_Code" jdbcType="VARCHAR" property="biProvinceCode"/> + <result column="BI_Province_Name" jdbcType="VARCHAR" property="biProvinceName"/> + <result column="BI_City_Code" jdbcType="VARCHAR" property="biCityCode"/> + <result column="BI_City_Name" jdbcType="VARCHAR" property="biCityName"/> + <result column="BI_District_Code" jdbcType="VARCHAR" property="biDistrictCode"/> + <result column="BI_District_Name" jdbcType="VARCHAR" property="biDistrictName"/> + <result column="BI_Town_Code" jdbcType="VARCHAR" property="biTownCode"/> + <result column="BI_Town_Name" jdbcType="VARCHAR" property="biTownName"/> + <result column="BI_Area_Code" jdbcType="VARCHAR" property="biAreaCode"/> + <result column="BI_Area" jdbcType="VARCHAR" property="biArea"/> + <result column="BI_Management_Company_Id" jdbcType="VARCHAR" property="biManagementCompanyId"/> + <result column="BI_Management_Company" jdbcType="VARCHAR" property="biManagementCompany"/> + <result column="BI_Contact" jdbcType="VARCHAR" property="biContact"/> + <result column="BI_Telephone" jdbcType="VARCHAR" property="biTelephone"/> + <result column="BI_Address" jdbcType="VARCHAR" property="biAddress"/> + <result column="BI_Create_Time" jdbcType="TIMESTAMP" property="biCreateTime"/> + <result column="BI_Update_Time" jdbcType="TIMESTAMP" property="biUpdateTime"/> + <result column="BI_Extension1" jdbcType="VARCHAR" property="biExtension1"/> + <result column="BI_Extension2" jdbcType="VARCHAR" property="biExtension2"/> + <result column="BI_Extension3" jdbcType="VARCHAR" property="biExtension3"/> + <result column="BI_Remark" jdbcType="VARCHAR" property="biRemark"/> + </resultMap> + <sql id="Base_Column_List"> + <!-- + WARNING - @mbg.generated + --> + BI_GUID, BI_Name, BI_Nick_Name, CI_GUID, CI_Name, BI_Province_Code, BI_Province_Name, + BI_City_Code, BI_City_Name, BI_District_Code, BI_District_Name, BI_Town_Code, BI_Town_Name, + BI_Area_Code, BI_Area, BI_Management_Company_Id, BI_Management_Company, BI_Contact, + BI_Telephone, BI_Address, BI_Create_Time, BI_Update_Time, BI_Extension1, BI_Extension2, + BI_Extension3, BI_Remark + </sql> + + <resultMap id="UserMap" type="cn.flightfeather.supervision.lightshare.vo.BaseInfoVo" extends="BaseResultMap"> + <result column="SC_Name" jdbcType="VARCHAR" property="sceneTypeName"/> + <association property="userInfo" resultMap="cn.flightfeather.supervision.domain.mapper.UserinfoMapper.BaseResultMap" /> + </resultMap> + + <select id="searchUser" resultMap="UserMap"> + SELECT + c.SC_Name, + a.*, + b.* + FROM + sm_t_userinfo AS a + LEFT JOIN ea_t_baseinfo AS b ON a.UI_GUID = b.BI_GUID + LEFT JOIN ea_t_scene_type AS c ON a.UI_Extension2 = c.SC_Id + <where> + <if test="provinceCode != null"> + AND b.BI_Province_Code = #{provinceCode} + </if> + <if test="provinceName != null"> + AND b.BI_Province_Name = #{provinceName} + </if> + <if test="cityCode != null"> + AND b.BI_City_Code = #{cityCode} + </if> + <if test="cityName != null"> + AND b.BI_City_Name = #{cityName} + </if> + <if test="districtCode != null"> + AND b.BI_District_Code = #{districtCode} + </if> + <if test="districtName != null"> + AND (b.BI_District_Name = #{districtName} OR a.UI_Extension1 = #{districtName}) + </if> + <if test="townCode != null"> + AND b.BI_Town_Code = #{townCode} + </if> + <if test="townName != null"> + AND b.BI_Town_Name = #{townName} + </if> + <if test="areaCode != null"> + AND b.BI_Area_Code = #{areaCode} + </if> + <if test="area != null"> + AND b.BI_Area = #{area} + </if> + <if test="mcId != null"> + AND b.BI_Management_Company_Id = #{mcId} + </if> + <if test="mcName != null"> + AND b.BI_Management_Company = #{mcName} + </if> + <if test="userTypeId != null"> + AND a.UI_UserTypeID = #{userTypeId} + </if> + <if test="userSubTypeId != null"> + AND a.UI_User_SubType_Id = #{userSubTypeId} + </if> + <if test="online != null"> + AND a.UI_IsEnable = #{online} + </if> + <if test="sceneTypes.size() != 0"> + AND a.UI_Extension2 in + <foreach collection="sceneTypes" item="type" open="(" separator="," close=")"> + #{type, jdbcType=VARCHAR} + </foreach> + </if> + <if test="searchText != null and searchText != ''"> + AND a.UI_RealName LIKE CONCAT('%', #{searchText}, '%') + </if> + </where> + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.3