SysHouseHoldInfoMapper.xml 5.71 KB
Newer Older
huyuchen's avatar
huyuchen committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~
  ~      Copyright (c) 2018-2025, lengleng All rights reserved.
  ~
  ~  Redistribution and use in source and binary forms, with or without
  ~  modification, are permitted provided that the following conditions are met:
  ~
  ~ Redistributions of source code must retain the above copyright notice,
  ~  this list of conditions and the following disclaimer.
  ~  Redistributions in binary form must reproduce the above copyright
  ~  notice, this list of conditions and the following disclaimer in the
  ~  documentation and/or other materials provided with the distribution.
  ~  Neither the name of the yifu4cloud.com developer nor the names of its
  ~  contributors may be used to endorse or promote products derived from
  ~  this software without specific prior written permission.
  ~  Author: lengleng (wangiegie@gmail.com)
  ~
  -->

<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.yifu.cloud.plus.v1.yifu.social.mapper.SysHouseHoldInfoMapper">

  <resultMap id="sysHouseHoldInfoMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo">
    <id property="id" column="ID"/>
    <result property="organId" column="ORGAN_ID"/>
    <result property="name" column="NAME"/>
    <result property="createTime" column="CREATE_TIME"/>
    <result property="delFlag" column="DEL_FLAG"/>
    <result property="type" column="TYPE"/>
    <result property="province" column="PROVINCE"/>
    <result property="city" column="CITY"/>
    <result property="town" column="TOWN"/>
    <result property="rmark" column="RMARK"/>
    <result property="organName" column="ORGAN_NAME"/>
    <result property="createBy" column="CREATE_BY"/>
    <result property="updateBy" column="UPDATE_BY"/>
    <result property="createName" column="CREATE_NAME"/>
huyuchen's avatar
huyuchen committed
41
    <result property="createTime" column="CREATE_TIME"/>
huyuchen's avatar
huyuchen committed
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
    <result property="updateTime" column="UPDATE_TIME"/>
  </resultMap>
    <sql id="Base_Column_List">
                a.ID,
                a.ORGAN_ID,
                a.NAME,
                a.CREATE_TIME,
                a.DEL_FLAG,
                a.TYPE,
                a.PROVINCE,
                a.CITY,
                a.TOWN,
                a.RMARK,
                a.ORGAN_NAME,
                a.CREATE_BY,
                a.UPDATE_BY,
                a.CREATE_NAME,
                a.UPDATE_TIME
    </sql>
    <sql id="sysHouseHoldInfo_where">
        <if test="sysHouseHoldInfo != null">
                    <if test="sysHouseHoldInfo.id != null and sysHouseHoldInfo.id.trim() != ''">
                        AND a.ID = #{sysHouseHoldInfo.id}
                    </if>
                    <if test="sysHouseHoldInfo.organId != null and sysHouseHoldInfo.organId.trim() != ''">
                        AND a.ORGAN_ID = #{sysHouseHoldInfo.organId}
                    </if>
                    <if test="sysHouseHoldInfo.name != null and sysHouseHoldInfo.name.trim() != ''">
huyuchen's avatar
huyuchen committed
70
						AND a.NAME like CONCAT('%',#{sysHouseHoldInfo.name},'%')
huyuchen's avatar
huyuchen committed
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
                    </if>
                    <if test="sysHouseHoldInfo.createTime != null">
                        AND a.CREATE_TIME = #{sysHouseHoldInfo.createTime}
                    </if>
                    <if test="sysHouseHoldInfo.delFlag != null and sysHouseHoldInfo.delFlag.trim() != ''">
                        AND a.DEL_FLAG = #{sysHouseHoldInfo.delFlag}
                    </if>
                    <if test="sysHouseHoldInfo.type != null and sysHouseHoldInfo.type.trim() != ''">
                        AND a.TYPE = #{sysHouseHoldInfo.type}
                    </if>
                    <if test="sysHouseHoldInfo.province != null and sysHouseHoldInfo.province.trim() != ''">
                        AND a.PROVINCE = #{sysHouseHoldInfo.province}
                    </if>
                    <if test="sysHouseHoldInfo.city != null and sysHouseHoldInfo.city.trim() != ''">
                        AND a.CITY = #{sysHouseHoldInfo.city}
                    </if>
                    <if test="sysHouseHoldInfo.town != null and sysHouseHoldInfo.town.trim() != ''">
                        AND a.TOWN = #{sysHouseHoldInfo.town}
                    </if>
                    <if test="sysHouseHoldInfo.rmark != null and sysHouseHoldInfo.rmark.trim() != ''">
                        AND a.RMARK = #{sysHouseHoldInfo.rmark}
                    </if>
                    <if test="sysHouseHoldInfo.organName != null and sysHouseHoldInfo.organName.trim() != ''">
                        AND a.ORGAN_NAME = #{sysHouseHoldInfo.organName}
                    </if>
                    <if test="sysHouseHoldInfo.createBy != null and sysHouseHoldInfo.createBy.trim() != ''">
                        AND a.CREATE_BY = #{sysHouseHoldInfo.createBy}
                    </if>
                    <if test="sysHouseHoldInfo.updateBy != null and sysHouseHoldInfo.updateBy.trim() != ''">
                        AND a.UPDATE_BY = #{sysHouseHoldInfo.updateBy}
                    </if>
                    <if test="sysHouseHoldInfo.createName != null and sysHouseHoldInfo.createName.trim() != ''">
                        AND a.CREATE_NAME = #{sysHouseHoldInfo.createName}
                    </if>
                    <if test="sysHouseHoldInfo.updateTime != null">
                        AND a.UPDATE_TIME = #{sysHouseHoldInfo.updateTime}
                    </if>
        </if>
    </sql>
    <!--sysHouseHoldInfo简单分页查询-->
    <select id="getSysHouseHoldInfoPage" resultMap="sysHouseHoldInfoMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM sys_house_hold_info a
        <where>
            1=1
            <include refid="sysHouseHoldInfo_where"/>
        </where>
huyuchen's avatar
huyuchen committed
119
		order by a.CREATE_TIME desc
huyuchen's avatar
huyuchen committed
120 121
    </select>
</mapper>