Blame view

parking-module-pay/src/main/resources/mybatis/smapper/TdCFileStorageServiceSMapper.xml 2.56 KB
55f68655   王彪总   新项目
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
  <?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.zteits.pay.mapper.smapper.TdCFileStorageServiceSMapper" >
  	<insert id="insertFileStorageInfo" parameterType="com.zteits.pay.domain.FileStorageDO">
  		<selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
  	      SELECT LAST_INSERT_ID()
  	    </selectKey>
  	     insert into td_c_file
  	    <trim prefix="(" suffix=")" suffixOverrides="," >
  	      <if test="sourceId != null and sourceId !=''" >
  	        source_id,
  	      </if>
  	      <if test="storageGroupName != null and storageGroupName !=''" >
  	        storage_group_name,
  	      </if>
  	      <if test="storageFileName != null and storageFileName !=''" >
  	        storage_file_name,
  	      </if>
  	      <if test="fileSuffix != null and fileSuffix !=''" >
  	        file_suffix,
  	      </if>
  	      <if test="httpUrlFilePath != null and httpUrlFilePath !=''" >
  	        file_path,
  	      </if>
  	      <if test="fileType != null" >
  	        file_type,
  	      </if>
  	      <if test="fileState != null" >
  	        file_state,
  	      </if>
  	      <if test="dataState != null" >
  	        data_state,
  	      </if>
  	      <if test="fileSize != null" >
  	        file_size,
  	      </if>
  	      create_date
  	    </trim>
  	    <trim prefix="values (" suffix=")" suffixOverrides="," >
  	      <if test="sourceId != null and sourceId !=''" >
  	        #{sourceId, jdbcType=VARCHAR},
  	      </if>
  	      <if test="storageGroupName != null and storageGroupName !=''" >
  	        #{storageGroupName, jdbcType=VARCHAR},
  	      </if>
  	      <if test="storageFileName != null and storageFileName !=''" >
  	        #{storageFileName, jdbcType=VARCHAR},
  	      </if>
  	      <if test="fileSuffix != null and fileSuffix !=''" >
  	        #{fileSuffix, jdbcType=VARCHAR},
  	      </if>
  	      <if test="httpUrlFilePath != null and httpUrlFilePath !=''" >
  	        #{httpUrlFilePath, jdbcType=VARCHAR},
  	      </if>
  	      <if test="fileType != null" >
  	        #{fileType},
  	      </if>
  	      <if test="fileState != null" >
  	        #{fileState},
  	      </if>
  	      <if test="dataState != null" >
  	        #{dataState},
  	      </if>
  	      <if test="fileSize != null" >
  	        #{fileSize},
  	      </if>
  	      SYSDATE()
  	    </trim>
  	</insert>
  	
  	<select id="getFullFileURLPath" resultType="java.lang.String" 
  		parameterType="com.zteits.clouds.api.dto.pay.param.FileURLPathRequest">
  	   select
  		  file_path
  	   from td_c_file
  	   where file_type = #{fileType} and source_id=#{sourceId} 
  	</select>
  </mapper>