CreditGlobalEntityMapper.xml
7.64 KB
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" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.business.mapper.CreditGlobalEntityMapper">
<resultMap type="CreditGlobalEntity" id="CreditGlobalEntityResult">
<result property="id" column="id" />
<result property="creditName" column="credit_name" />
<result property="creditCode" column="credit_code" />
<result property="creditType" column="credit_type" />
<result property="registerCode" column="register_code" />
<result property="orgCode" column="org_code" />
<result property="taxCode" column="tax_code" />
<result property="sectorCode" column="sector_code" />
<result property="societyCode" column="society_code" />
<result property="dataSource" column="data_source" />
<result property="runStatus" column="run_status" />
<result property="belongIndustry" column="belong_industry" />
<result property="foundDate" column="found_date" />
<result property="companyType" column="company_type" />
<result property="runExpire" column="run_expire" />
<result property="delegate" column="delegate" />
<result property="auditDate" column="audit_date" />
<result property="registerFund" column="register_fund" />
<result property="registerParty" column="register_party" />
<result property="registerAddr" column="register_addr" />
<result property="runRange" column="run_range" />
<result property="dataStatus" column="data_status" />
<result property="dataMsg" column="data_msg" />
<result property="dataRef" column="data_ref" />
<result property="reportDate" column="report_date" />
<result property="readCount" column="read_count" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectCreditGlobalEntityVo">
select id, credit_name, credit_code, credit_type, register_code, org_code, tax_code, sector_code, society_code, data_source, run_status, belong_industry, found_date, company_type, run_expire, delegate, audit_date, register_fund, register_party, register_addr, run_range, data_status, data_msg, data_ref, report_date, read_count, del_flag, create_by, create_time, update_by, update_time from credit_global_entity
</sql>
<sql id="selectSimpleGlobalEntityVo">
select id, credit_name, credit_code, credit_type, register_code, org_code, tax_code, sector_code, society_code, data_source, run_status, belong_industry, found_date, company_type, run_expire, delegate, audit_date, register_fund, register_party, register_addr, run_range, read_count from credit_global_entity
</sql>
<select id="selectCreditGlobalEntityList" parameterType="CreditGlobalEntity" resultMap="CreditGlobalEntityResult">
<include refid="selectCreditGlobalEntityVo"/>
<where>
<if test="creditName != null and creditName != ''"> and credit_name like concat('%', #{creditName}, '%')</if>
<if test="creditCode != null and creditCode != ''"> and credit_code = #{creditCode}</if>
<if test="creditType != null and creditType != ''"> and credit_type = #{creditType}</if>
<if test="registerCode != null and registerCode != ''"> and register_code = #{registerCode}</if>
<if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if>
<if test="taxCode != null and taxCode != ''"> and tax_code = #{taxCode}</if>
<if test="sectorCode != null and sectorCode != ''"> and sector_code = #{sectorCode}</if>
<if test="societyCode != null and societyCode != ''"> and society_code = #{societyCode}</if>
<if test="dataSource != null and dataSource != ''"> and data_source = #{dataSource}</if>
<if test="runStatus != null and runStatus != ''"> and run_status = #{runStatus}</if>
<if test="belongIndustry != null and belongIndustry != ''"> and belong_industry = #{belongIndustry}</if>
<if test="foundDate != null "> and found_date = #{foundDate}</if>
<if test="companyType != null and companyType != ''"> and company_type = #{companyType}</if>
<if test="runExpire != null "> and run_expire = #{runExpire}</if>
<if test="delegate != null and delegate != ''"> and delegate = #{delegate}</if>
<if test="auditDate != null "> and audit_date = #{auditDate}</if>
<if test="registerFund != null "> and register_fund = #{registerFund}</if>
<if test="registerParty != null and registerParty != ''"> and register_party = #{registerParty}</if>
<if test="registerAddr != null and registerAddr != ''"> and register_addr = #{registerAddr}</if>
<if test="runRange != null and runRange != ''"> and run_range = #{runRange}</if>
<if test="dataStatus != null "> and data_status = #{dataStatus}</if>
<if test="dataMsg != null and dataMsg != ''"> and data_msg = #{dataMsg}</if>
<if test="dataRef != null "> and data_ref = #{dataRef}</if>
<if test="reportDate != null "> and report_date = #{reportDate}</if>
</where>
</select>
<select id="selectCreditGlobalEntityById" parameterType="Long" resultMap="CreditGlobalEntityResult">
<include refid="selectCreditGlobalEntityVo"/>
where id = #{id}
</select>
<select id="selectInfoList" parameterType="CreditGlobalEntity" resultMap="CreditGlobalEntityResult">
<include refid="selectCreditGlobalEntityVo"/> where del_flag = '0' and data_status = 1
<if test="creditName != null and creditName != ''"> and credit_name like concat('%',#{creditName}, '%')</if>
<if test="creditCode != null and creditCode != ''"> and credit_code like concat('%',#{creditCode}, '%')</if>
<if test="creditType != null and creditType != ''"> and credit_type = #{creditType}</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
AND date_format(found_date,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
</if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
AND date_format(found_date,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</select>
<select id="searchSimpleEntityList" parameterType="CreditGlobalEntity" resultMap="CreditGlobalEntityResult">
<include refid="selectSimpleGlobalEntityVo"/>
where del_flag = '0' and data_status = 1
<if test="creditName != null and creditName != ''"> and credit_name like concat('%',#{creditName}, '%')</if>
<if test="creditCode != null and creditCode != ''"> and credit_code like concat('%',#{creditCode}, '%')</if>
</select>
<update id="addCount" parameterType="CreditGlobalEntity">
update credit_global_entity
<trim prefix="SET" suffixOverrides=",">
<if test="readCount != null">read_count = read_count + #{readCount},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
</mapper>