TSocialSoldierLogMapper.xml 5.5 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 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 70 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
<?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.TSocialSoldierLogMapper">

	<resultMap id="tSocialSoldierLogMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TSocialSoldierLog">
		<id property="id" column="ID"/>
		<result property="addId" column="ADD_ID"/>
		<result property="socialId" column="SOCIAL_ID"/>
		<result property="empIdcard" column="EMP_IDCARD"/>
		<result property="empName" column="EMP_NAME"/>
		<result property="dispatchItem" column="DISPATCH_ITEM"/>
		<result property="socialHuName" column="SOCIAL_HU_NAME"/>
		<result property="type" column="TYPE"/>
		<result property="remark" column="REMARK"/>
		<result property="createBy" column="CREATE_BY"/>
		<result property="updateBy" column="UPDATE_BY"/>
		<result property="createName" column="CREATE_NAME"/>
		<result property="updateTime" column="UPDATE_TIME"/>
		<result property="createTime" column="CREATE_TIME"/>
	</resultMap>
	<sql id="Base_Column_List">
		a.ID,
                a.ADD_ID,
                a.SOCIAL_ID,
                a.EMP_IDCARD,
                a.EMP_NAME,
                a.DISPATCH_ITEM,
                a.SOCIAL_HU_NAME,
                a.TYPE,
                a.REMARK,
                a.CREATE_BY,
                a.UPDATE_BY,
                a.CREATE_NAME,
                a.UPDATE_TIME,
                a.CREATE_TIME
	</sql>
	<sql id="tSocialSoldierLog_where">
		<if test="tSocialSoldierLog != null">
			<if test="tSocialSoldierLog.id != null and tSocialSoldierLog.id.trim() != ''">
				AND a.ID = #{tSocialSoldierLog.id}
			</if>
			<if test="tSocialSoldierLog.addId != null and tSocialSoldierLog.addId.trim() != ''">
				AND a.ADD_ID = #{tSocialSoldierLog.addId}
			</if>
			<if test="tSocialSoldierLog.socialId != null and tSocialSoldierLog.socialId.trim() != ''">
				AND a.SOCIAL_ID = #{tSocialSoldierLog.socialId}
			</if>
			<if test="tSocialSoldierLog.empIdcard != null and tSocialSoldierLog.empIdcard.trim() != ''">
				AND a.EMP_IDCARD = #{tSocialSoldierLog.empIdcard}
			</if>
			<if test="tSocialSoldierLog.empName != null and tSocialSoldierLog.empName.trim() != ''">
				AND a.EMP_NAME = #{tSocialSoldierLog.empName}
			</if>
			<if test="tSocialSoldierLog.dispatchItem != null and tSocialSoldierLog.dispatchItem.trim() != ''">
				AND a.DISPATCH_ITEM = #{tSocialSoldierLog.dispatchItem}
			</if>
			<if test="tSocialSoldierLog.socialHuName != null and tSocialSoldierLog.socialHuName.trim() != ''">
				AND a.SOCIAL_HU_NAME = #{tSocialSoldierLog.socialHuName}
			</if>
			<if test="tSocialSoldierLog.type != null and tSocialSoldierLog.type.trim() != ''">
				AND a.TYPE = #{tSocialSoldierLog.type}
			</if>
			<if test="tSocialSoldierLog.remark != null and tSocialSoldierLog.remark.trim() != ''">
				AND a.REMARK = #{tSocialSoldierLog.remark}
			</if>
			<if test="tSocialSoldierLog.createBy != null and tSocialSoldierLog.createBy.trim() != ''">
				AND a.CREATE_BY = #{tSocialSoldierLog.createBy}
			</if>
			<if test="tSocialSoldierLog.updateBy != null and tSocialSoldierLog.updateBy.trim() != ''">
				AND a.UPDATE_BY = #{tSocialSoldierLog.updateBy}
			</if>
			<if test="tSocialSoldierLog.createName != null and tSocialSoldierLog.createName.trim() != ''">
				AND a.CREATE_NAME = #{tSocialSoldierLog.createName}
			</if>
			<if test="tSocialSoldierLog.updateTime != null">
				AND a.UPDATE_TIME = #{tSocialSoldierLog.updateTime}
			</if>
			<if test="tSocialSoldierLog.createTimeStart != null">
				AND a.CREATE_TIME >= #{tSocialSoldierLog.createTimeStart}
			</if>
			<if test="tSocialSoldierLog.createTimeEnd != null">
				AND a.CREATE_TIME  <![CDATA[ <= ]]> #{tSocialSoldierLog.createTimeEnd}
			</if>
        </if>
    </sql>
    <!--tSocialSoldierLog简单分页查询-->
    <select id="getTSocialSoldierLogPage" resultMap="tSocialSoldierLogMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_social_soldier_log a
        <where>
            1=1
            <include refid="tSocialSoldierLog_where"/>
        </where>
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
		order by a.CREATE_TIME desc
    </select>

    <!--tSocialSoldierLog简单分页查询-->
    <select id="getTSocialSoldierLogList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.TSocialSoldierLogExportVo">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_social_soldier_log a
        <where>
            1=1
            <include refid="tSocialSoldierLog_where"/>
        </where>
		order by a.CREATE_TIME desc
		<if test="tSocialSoldierLog != null">
			<if test="tSocialSoldierLog.limitStart != null">
				limit #{tSocialSoldierLog.limitStart},#{tSocialSoldierLog.limitEnd}
			</if>
		</if>
134 135
    </select>
</mapper>