<?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.permission.mapper.EkpQiweiZhaopinMapper">

  <resultMap id="ekpQiweiZhaopinMap" type="com.yifu.cloud.plus.v1.yifu.permission.entity.EkpQiwiZhaoPin">
    <id property="fdId" column="FD_ID"/>
    <result property="fdSpNo" column="FD_SP_NO"/>
    <result property="fdApplyUserName" column="FD_APPLY_USER_NAME"/>
    <result property="fdApplyUserDept" column="FD_APPLY_USER_DEPT"/>
    <result property="fdApplyDate" column="FD_APPLY_DATE"/>
    <result property="fdNewBegin" column="FD_NEW_BEGIN"/>
    <result property="fdNewEnd" column="FD_NEW_END"/>
    <result property="fdStatus" column="FD_STATUS"/>
    <result property="fdSettleFormNo" column="FD_SETTLE_FORM_NO"/>
    <result property="createTime" column="create_time"/>
    <result property="fdDataSource" column="FD_DATA_SOURCE"/>
    <result property="fdUserDeptName" column="FD_USER_DEPT_NAME"/>
    <result property="fdBuyStyle" column="FD_BUY_STYLE"/>
    <result property="fdPingTaiName" column="FD_PING_TAI_NAME"/>
    <result property="fdPingTaiChanPin" column="FD_PING_TAI_CHAN_PIN"/>
    <result property="fdNum" column="FD_NUM"/>
    <result property="fdMoney" column="FD_MONEY"/>
    <result property="fdMoneySum" column="FD_MONEY_SUM"/>
    <result property="fdDeptName" column="FD_DEPT_NAME"/>
    <result property="fdPostName" column="FD_POST_NAME"/>
    <result property="fdCostName" column="FD_COST_NAME"/>
    <result property="fdTwoIsHeLi" column="FD_TWO_IS_HE_LI"/>
    <result property="fdTwoPingTaiName" column="FD_TWO_PING_TAI_NAME"/>
    <result property="fdTwoPingTaiChanPin" column="FD_TWO_PING_TAI_CHAN_PIN"/>
    <result property="fdTwoNum" column="FD_TWO_NUM"/>
    <result property="fdTwoMoneySum" column="FD_TWO_MONEY_SUM"/>
    <result property="fdTwoYeWu" column="FD_TWO_YE_WU"/>
    <result property="fdTwoRemark" column="FD_TWO_REMARK"/>
    <result property="createDataTime" column="CREATE_DATA_TIME"/>
  </resultMap>
    <sql id="Base_Column_List">
                a.FD_ID,
                a.FD_SP_NO,
                a.FD_APPLY_USER_NAME,
                a.FD_APPLY_USER_DEPT,
                a.FD_APPLY_DATE,
                a.FD_NEW_BEGIN,
                a.FD_NEW_END,
                a.FD_STATUS,
                a.FD_SETTLE_FORM_NO,
                a.create_time,
                a.FD_DATA_SOURCE,
                a.FD_USER_DEPT_NAME,
                a.FD_BUY_STYLE,
                a.FD_PING_TAI_NAME,
                a.FD_PING_TAI_CHAN_PIN,
                a.FD_NUM,
                a.FD_MONEY,
                a.FD_MONEY_SUM,
                a.FD_DEPT_NAME,
                a.FD_POST_NAME,
                a.FD_COST_NAME,
                a.FD_TWO_IS_HE_LI,
                a.FD_TWO_PING_TAI_NAME,
                a.FD_TWO_PING_TAI_CHAN_PIN,
                a.FD_TWO_NUM,
                a.FD_TWO_MONEY_SUM,
                a.FD_TWO_YE_WU,
                a.FD_TWO_REMARK,
                a.CREATE_DATA_TIME
    </sql>

	<!--获取全部的,用来: 拉取企业微信时,不覆盖数据 -->
	<select id="getZhaoPinAllInfo" resultMap="ekpQiweiZhaopinMap">
		SELECT
		<include refid="Base_Column_List"/>
		FROM ekp_qiwei_zhaopin a
		<where>
			1=1
			<if test="status != null and status.trim() != ''">
				AND a.FD_STATUS = #{status}
			</if>
		</where>
	</select>

</mapper>