Browse Source

修改映射管理sql配置 key 加入引号问题

吴学文 6 years ago
parent
commit
25d9d2e1a9

+ 5 - 4
java110-db/src/main/resources/mapper/mapping/MappingServiceDaoImplMapper.xml

@@ -7,7 +7,7 @@
     <!-- 保存映射信息 add by wuxw 2018-07-03 -->
     <!-- 保存映射信息 add by wuxw 2018-07-03 -->
        <insert id="saveMappingInfo" parameterType="Map">
        <insert id="saveMappingInfo" parameterType="Map">
            insert into c_mapping(
            insert into c_mapping(
-domain,name,remark,id,value,key
+domain,name,remark,id,value,`key`
 ) values (
 ) values (
 #{domain},#{name},#{remark},#{id},#{value},#{key}
 #{domain},#{name},#{remark},#{id},#{value},#{key}
 )
 )
@@ -38,7 +38,7 @@ where 1 =1
    and t.value= #{value}
    and t.value= #{value}
 </if> 
 </if> 
 <if test="key !=null and key != ''">
 <if test="key !=null and key != ''">
-   and t.key= #{key}
+   and t.`key`= #{key}
 </if> 
 </if> 
 
 
        </select>
        </select>
@@ -101,7 +101,8 @@ where 1 =1
 </if> 
 </if> 
 <if test="key !=null and key != ''">
 <if test="key !=null and key != ''">
    and t.key= #{key}
    and t.key= #{key}
-</if> 
+</if>
+        order by t.create_time desc
 <if test="page != -1 and page != null ">
 <if test="page != -1 and page != null ">
    limit #{page}, #{row}
    limit #{page}, #{row}
 </if> 
 </if> 
@@ -128,7 +129,7 @@ where 1 =1
 , t.value= #{value}
 , t.value= #{value}
 </if> 
 </if> 
 <if test="key !=null and key != ''">
 <if test="key !=null and key != ''">
-, t.key= #{key}
+, t.`key`= #{key}
 </if> 
 </if> 
  where 1=1 <if test="id !=null and id != ''">
  where 1=1 <if test="id !=null and id != ''">
 and t.id= #{id}
 and t.id= #{id}