From f14c50cb0036d3ddd655ce4e34732ba396a836c4 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期二, 30 五月 2023 12:42:03 +0800
Subject: [PATCH] optimize 统计
---
java110-db/src/main/resources/mapper/community/MappingServiceDaoImplMapper.xml | 30 +++++++++++++-----------------
1 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/community/MappingServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/MappingServiceDaoImplMapper.xml
index fde5c95..c337dc4 100755
--- a/java110-db/src/main/resources/mapper/community/MappingServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/MappingServiceDaoImplMapper.xml
@@ -1,19 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="mappingServiceDaoImpl">
<!-- 淇濆瓨鏄犲皠淇℃伅 add by wuxw 2018-07-03 -->
<insert id="saveMappingInfo" parameterType="Map">
<![CDATA[
- insert into c_mapping select
- #{id},#{domain},#{name},#{key},#{value},#{remark},now(),'0'
-
+ insert into c_mapping
+ select #{id},
+ #{domain},
+ #{name},
+ #{key},
+ #{value},
+ #{remark},
+ now(),
+ '0'
]]>
-
</insert>
-
<!-- 鏌ヨ鏄犲皠淇℃伅锛圔usiness锛� add by wuxw 2018-07-03 -->
<select id="getBusinessMappingInfo" parameterType="Map" resultType="Map">
@@ -41,9 +44,7 @@
<if test="key !=null and key != ''">
and t.`key`= #{key}
</if>
-
</select>
-
<!-- 淇濆瓨鏄犲皠淇℃伅鑷� instance琛ㄤ腑 add by wuxw 2018-07-03 -->
<insert id="saveMappingInfoInstance" parameterType="Map">
@@ -69,9 +70,7 @@
<if test="key !=null and key != ''">
and t.key= #{key}
</if>
-
</insert>
-
<!-- 鏌ヨ鏄犲皠淇℃伅 add by wuxw 2018-07-03 -->
<select id="getMappingInfo" parameterType="Map" resultType="Map">
@@ -106,9 +105,7 @@
<if test="page != -1 and page != null ">
limit #{page}, #{row}
</if>
-
</select>
-
<!-- 淇敼鏄犲皠淇℃伅 add by wuxw 2018-07-03 -->
<update id="updateMappingInfo" parameterType="Map">
@@ -133,7 +130,6 @@
<if test="id !=null and id != ''">
and t.id= #{id}
</if>
-
</update>
<!-- 鏌ヨ鏄犲皠鏁伴噺 add by wuxw 2018-07-03 -->
@@ -146,6 +142,9 @@
</if>
<if test="name !=null and name != ''">
and t.name= #{name}
+ </if>
+ <if test="nameLike !=null and nameLike != ''">
+ and t.name like concat('%',#{nameLike},'%')
</if>
<if test="remark !=null and remark != ''">
and t.remark= #{remark}
@@ -162,8 +161,5 @@
<if test="key !=null and key != ''">
and t.key= #{key}
</if>
-
-
</select>
-
</mapper>
--
Gitblit v1.8.0