TSocialSoldierShenBaoTaskMapper.xml 4.38 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
<?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">

24
<mapper namespace="com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialSoldierShenBaoTaskMapper">
25

26
	<resultMap id="tSocialSoldierShenBaoTaskMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TSocialSoldierShenBaoTask">
27
		<id property="id" column="ID"/>
28
		<result property="addId" column="ADD_ID"/>
29
		<result property="type" column="TYPE"/>
30
		<result property="dataStatus" column="DATA_STATUS"/>
31 32 33 34 35 36 37 38
		<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,
39
		a.ADD_ID,
40
		a.TYPE,
41
		a.DATA_STATUS,
42 43 44 45 46 47
		a.CREATE_BY,
		a.UPDATE_BY,
		a.CREATE_NAME,
		a.UPDATE_TIME,
		a.CREATE_TIME
	</sql>
48 49 50 51
	<sql id="tSocialSoldierShenBaoTask_where">
		<if test="tSocialSoldierShenBaoTask != null">
			<if test="tSocialSoldierShenBaoTask.id != null and tSocialSoldierShenBaoTask.id.trim() != ''">
				AND a.ID = #{tSocialSoldierShenBaoTask.id}
52
			</if>
53 54
			<if test="tSocialSoldierShenBaoTask.addId != null and tSocialSoldierShenBaoTask.addId.trim() != ''">
				AND a.ADD_ID = #{tSocialSoldierShenBaoTask.addId}
55
			</if>
56 57
			<if test="tSocialSoldierShenBaoTask.type != null and tSocialSoldierShenBaoTask.type.trim() != ''">
				AND a.TYPE = #{tSocialSoldierShenBaoTask.type}
58
			</if>
59 60 61
			<if test="tSocialSoldierShenBaoTask.dataStatus != null and tSocialSoldierShenBaoTask.dataStatus.trim() != ''">
				AND a.DATA_STATUS = #{tSocialSoldierShenBaoTask.dataStatus}
			</if>
62 63
			<if test="tSocialSoldierShenBaoTask.createBy != null and tSocialSoldierShenBaoTask.createBy.trim() != ''">
				AND a.CREATE_BY = #{tSocialSoldierShenBaoTask.createBy}
64
			</if>
65 66
			<if test="tSocialSoldierShenBaoTask.updateBy != null and tSocialSoldierShenBaoTask.updateBy.trim() != ''">
				AND a.UPDATE_BY = #{tSocialSoldierShenBaoTask.updateBy}
67
			</if>
68 69
			<if test="tSocialSoldierShenBaoTask.createName != null and tSocialSoldierShenBaoTask.createName.trim() != ''">
				AND a.CREATE_NAME = #{tSocialSoldierShenBaoTask.createName}
70
			</if>
71 72
			<if test="tSocialSoldierShenBaoTask.updateTime != null">
				AND a.UPDATE_TIME = #{tSocialSoldierShenBaoTask.updateTime}
73
			</if>
74 75
			<if test="tSocialSoldierShenBaoTask.createTime != null">
				AND a.CREATE_TIME = #{tSocialSoldierShenBaoTask.createTime}
76 77 78 79
			</if>
		</if>
	</sql>
	<!--list-->
80
	<select id="getTSocialSoldierShenBaoTaskList" resultMap="tSocialSoldierShenBaoTaskMap">
81 82
		SELECT
		<include refid="Base_Column_List"/>
83
		FROM t_social_soldier_shen_bao_task a
84 85
		<where>
			1=1
86
			<include refid="tSocialSoldierShenBaoTask_where"/>
87 88
		</where>
	</select>
89
	<!--获取任务id-->
90
	<select id="getSoldierTaskAddIdByType" resultMap="tSocialSoldierShenBaoTaskMap">
91
		SELECT
92
			<include refid="Base_Column_List"/>
93 94 95 96
		FROM t_social_soldier_shen_bao_task a
		where a.TYPE = #{type} and a.DATA_STATUS = '0'
		ORDER BY a.CREATE_TIME desc limit 1
	</select>
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113


	<!--list-->
	<select id="getTSocialSoldierTaskListByRe" resultMap="tSocialSoldierShenBaoTaskMap">
		SELECT
			<include refid="Base_Column_List"/>
		FROM t_social_soldier_shen_bao_task a
		where TYPE in ('7','8','9','10')
	</select>

	<delete id="deleteByPayment">
		delete FROM t_social_soldier_shen_bao_task where TYPE in ('3','4','5','6')
	</delete>

	<delete id="deleteByRePayment">
		delete FROM t_social_soldier_shen_bao_task where TYPE in ('7','8','9','10')
	</delete>
114
</mapper>