SysHouseHoldInfoMapper.xml 7.35 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
<?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"/>
38 39 40 41
	<result property="auditUser" column="AUDIT_USER"/>
	<result property="auditUserName" column="AUDIT_USER_NAME"/>
	<result property="handleUser" column="HANDLE_USER"/>
	<result property="handleUserName" column="HANDLE_USER_NAME"/>
huyuchen's avatar
huyuchen committed
42 43 44
    <result property="createBy" column="CREATE_BY"/>
    <result property="updateBy" column="UPDATE_BY"/>
    <result property="createName" column="CREATE_NAME"/>
huyuchen's avatar
huyuchen committed
45
    <result property="createTime" column="CREATE_TIME"/>
huyuchen's avatar
huyuchen committed
46
    <result property="updateTime" column="UPDATE_TIME"/>
huyuchen's avatar
huyuchen committed
47 48 49
    <result property="houseType" column="HOUSE_TYPE"/>
    <result property="customerNo" column="CUSTOMER_NO"/>
    <result property="unitCreditCode" column="UNIT_CREDIT_CODE"/>
huyuchen's avatar
huyuchen committed
50
	  <result property="fundBank" column="FUND_BANK"/>
huyuchen's avatar
huyuchen committed
51
	  <result property="autoStatus" column="AUTO_STATUS"/>
huyuchen's avatar
huyuchen committed
52
  </resultMap>
huyuchen's avatar
huyuchen committed
53 54 55 56

	<resultMap id="sysHouseHoldSingleInfoMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo">
		<id property="id" column="ID"/>
		<result property="name" column="NAME"/>
huyuchen's avatar
huyuchen committed
57
		<result property="type" column="TYPE"/>
huyuchen's avatar
huyuchen committed
58 59
		<result property="customerNo" column="CUSTOMER_NO"/>
		<result property="unitCreditCode" column="UNIT_CREDIT_CODE"/>
huyuchen's avatar
huyuchen committed
60 61
	</resultMap>

huyuchen's avatar
huyuchen committed
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
    <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,
77 78 79 80
                a.UPDATE_TIME,
				a.AUDIT_USER,
				a.AUDIT_USER_NAME,
				a.HANDLE_USER,
huyuchen's avatar
huyuchen committed
81 82 83
				a.HOUSE_TYPE,
				a.CUSTOMER_NO,
				a.UNIT_CREDIT_CODE,
huyuchen's avatar
huyuchen committed
84
				a.FUND_BANK,
huyuchen's avatar
huyuchen committed
85 86
				a.HANDLE_USER_NAME,
				a.AUTO_STATUS
huyuchen's avatar
huyuchen committed
87 88 89 90 91 92 93 94 95 96
    </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
97
						AND a.NAME like CONCAT('%',#{sysHouseHoldInfo.name},'%')
huyuchen's avatar
huyuchen committed
98 99 100 101 102 103 104 105 106 107
                    </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>
huyuchen's avatar
huyuchen committed
108 109 110
					<if test="sysHouseHoldInfo.houseType != null and sysHouseHoldInfo.houseType.trim() != ''">
						AND a.HOUSE_TYPE = #{sysHouseHoldInfo.houseType}
					</if>
huyuchen's avatar
huyuchen committed
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
                    <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>
huyuchen's avatar
huyuchen committed
135 136 137
					<if test="sysHouseHoldInfo.autoStatus != null and sysHouseHoldInfo.autoStatus.trim() != ''">
						AND a.AUTO_STATUS = #{sysHouseHoldInfo.autoStatus}
					</if>
huyuchen's avatar
huyuchen committed
138 139 140 141 142 143 144 145 146 147 148 149 150 151
                    <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
152
		order by a.CREATE_TIME desc
huyuchen's avatar
huyuchen committed
153
    </select>
huyuchen's avatar
huyuchen committed
154 155 156 157 158

	<!--sysHouseHoldInfo简单分页查询-->
	<select id="getAllSingleSocailPage" resultMap="sysHouseHoldSingleInfoMap">
		SELECT
		a.ID,
huyuchen's avatar
huyuchen committed
159
		a.TYPE,
huyuchen's avatar
huyuchen committed
160 161
		a.CUSTOMER_NO,
		a.UNIT_CREDIT_CODE,
huyuchen's avatar
huyuchen committed
162 163
		a.NAME
		FROM sys_house_hold_info a
huyuchen's avatar
huyuchen committed
164
		where HOUSE_TYPE = '0'
huyuchen's avatar
huyuchen committed
165 166
		order by a.CREATE_TIME desc
	</select>
huyuchen's avatar
huyuchen committed
167
</mapper>