TAutoPaymentInfoMapper.xml 6.98 KB
Newer Older
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
<?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.TAutoPaymentInfoMapper">

  <resultMap id="tAutoPaymentInfoMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentInfo">
    <id property="id" column="ID"/>
28 29 30 31 32 33 34
    <result property="createMonth" column="CREATE_MONTH"/>
    <result property="dataOneFlag" column="DATA_ONE_FLAG"/>
    <result property="dataTwoFlag" column="DATA_TWO_FLAG"/>
    <result property="dataThreeFlag" column="DATA_THREE_FLAG"/>
    <result property="dataOneRemark" column="DATA_ONE_REMARK"/>
    <result property="dataTwoRemark" column="DATA_TWO_REMARK"/>
    <result property="dataThreeRemark" column="DATA_THREE_REMARK"/>
35 36 37 38 39 40 41
    <result property="systemReviewFlag" column="SYSTEM_REVIEW_FLAG"/>
    <result property="repeatReviewFlag" column="REPEAT_REVIEW_FLAG"/>
    <result property="createBy" column="CREATE_BY"/>
    <result property="createName" column="CREATE_NAME"/>
    <result property="createTime" column="CREATE_TIME"/>
    <result property="updateBy" column="UPDATE_BY"/>
    <result property="updateTime" column="UPDATE_TIME"/>
42 43 44 45 46 47
    <result property="attaSrc" column="ATTA_SRC"/>
    <result property="attaUrl" column="ATTA_URL"/>
    <result property="attaUrlOne" column="ATTA_URL_ONE"/>
    <result property="attaUrlTwo" column="ATTA_URL_TWO"/>
    <result property="attaUrlThree" column="ATTA_URL_THREE"/>
    <result property="attaUrlFour" column="ATTA_URL_FOUR"/>
48 49 50
  </resultMap>
    <sql id="Base_Column_List">
                a.ID,
51 52 53 54 55 56 57
                a.CREATE_MONTH,
                a.DATA_ONE_FLAG,
				a.DATA_TWO_FLAG,
				a.DATA_THREE_FLAG,
				a.DATA_ONE_REMARK,
				a.DATA_TWO_REMARK,
				a.DATA_THREE_REMARK,
58 59 60 61 62 63
                a.SYSTEM_REVIEW_FLAG,
                a.REPEAT_REVIEW_FLAG,
                a.CREATE_BY,
                a.CREATE_NAME,
                a.CREATE_TIME,
                a.UPDATE_BY,
64 65 66 67 68 69 70 71
                a.UPDATE_TIME,
                a.ATTA_SRC,
                a.ATTA_URL,
                a.ATTA_URL_ONE,
                a.ATTA_URL_TWO,
                a.ATTA_URL_THREE,
                a.ATTA_URL_FOUR
	</sql>
72 73 74 75 76
    <sql id="tAutoPaymentInfo_where">
        <if test="tAutoPaymentInfo != null">
                    <if test="tAutoPaymentInfo.id != null and tAutoPaymentInfo.id.trim() != ''">
                        AND a.ID = #{tAutoPaymentInfo.id}
                    </if>
77 78 79 80 81 82 83 84 85 86 87
                    <if test="tAutoPaymentInfo.createMonth != null and tAutoPaymentInfo.createMonth.trim() != ''">
                        AND a.CREATE_MONTH = #{tAutoPaymentInfo.createMonth}
                    </if>
                    <if test="tAutoPaymentInfo.dataOneFlag != null and tAutoPaymentInfo.dataOneFlag.trim() != ''">
                        AND a.DATA_ONE_FLAG = #{tAutoPaymentInfo.dataOneFlag}
                    </if>
                    <if test="tAutoPaymentInfo.dataTwoFlag != null and tAutoPaymentInfo.dataTwoFlag.trim() != ''">
                        AND a.DATA_TWO_FLAG = #{tAutoPaymentInfo.dataTwoFlag}
                    </if>
                    <if test="tAutoPaymentInfo.dataThreeFlag != null and tAutoPaymentInfo.dataThreeFlag.trim() != ''">
                        AND a.DATA_THREE_FLAG = #{tAutoPaymentInfo.dataThreeFlag}
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
                    </if>
                    <if test="tAutoPaymentInfo.systemReviewFlag != null and tAutoPaymentInfo.systemReviewFlag.trim() != ''">
                        AND a.SYSTEM_REVIEW_FLAG = #{tAutoPaymentInfo.systemReviewFlag}
                    </if>
                    <if test="tAutoPaymentInfo.repeatReviewFlag != null and tAutoPaymentInfo.repeatReviewFlag.trim() != ''">
                        AND a.REPEAT_REVIEW_FLAG = #{tAutoPaymentInfo.repeatReviewFlag}
                    </if>
                    <if test="tAutoPaymentInfo.createBy != null and tAutoPaymentInfo.createBy.trim() != ''">
                        AND a.CREATE_BY = #{tAutoPaymentInfo.createBy}
                    </if>
                    <if test="tAutoPaymentInfo.createName != null and tAutoPaymentInfo.createName.trim() != ''">
                        AND a.CREATE_NAME = #{tAutoPaymentInfo.createName}
                    </if>
                    <if test="tAutoPaymentInfo.createTime != null">
                        AND a.CREATE_TIME = #{tAutoPaymentInfo.createTime}
                    </if>
                    <if test="tAutoPaymentInfo.updateBy != null and tAutoPaymentInfo.updateBy.trim() != ''">
                        AND a.UPDATE_BY = #{tAutoPaymentInfo.updateBy}
                    </if>
                    <if test="tAutoPaymentInfo.updateTime != null">
                        AND a.UPDATE_TIME = #{tAutoPaymentInfo.updateTime}
                    </if>
110 111 112 113 114 115 116 117 118 119 120 121
					<if test="tAutoPaymentInfo.createTimeStart != null">
						AND a.CREATE_TIME <![CDATA[ >= ]]> #{tAutoPaymentInfo.createTimeStart}
					</if>
					<if test="tAutoPaymentInfo.createTimeEnd != null">
						AND a.CREATE_TIME <![CDATA[ <= ]]> #{tAutoPaymentInfo.createTimeEnd}
					</if>
					<if test="tAutoPaymentInfo.updateTimeStart != null">
						AND a.UPDATE_TIME <![CDATA[ >= ]]> #{tAutoPaymentInfo.updateTimeStart}
					</if>
					<if test="tAutoPaymentInfo.updateTimeEnd != null">
						AND a.UPDATE_TIME <![CDATA[ <= ]]> #{tAutoPaymentInfo.updateTimeEnd}
					</if>
122 123 124 125 126 127 128 129 130 131 132 133
        </if>
    </sql>
    <!--tAutoPaymentInfo简单分页查询-->
    <select id="getTAutoPaymentInfoPage" resultMap="tAutoPaymentInfoMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_auto_payment_info a
        <where>
            1=1
            <include refid="tAutoPaymentInfo_where"/>
        </where>
    </select>
134 135 136 137 138 139 140
    <!--获取当前月的主表-->
    <select id="getThisMonthMainAuto" resultMap="tAutoPaymentInfoMap">
        SELECT
        	<include refid="Base_Column_List"/>
        FROM t_auto_payment_info a
        where a.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
    </select>
141 142 143 144 145 146

    <!-- 重新办理,清空url -->
    <update id="setUrlToNullByRePayment" >
		update t_auto_payment_info a set a.ATTA_URL_ONE = null,a.ATTA_URL_TWO = null,a.ATTA_URL_THREE = null,a.ATTA_URL_FOUR = null where id = #{parentId}
    </update>

147
</mapper>