WorkflowDataFileV1ServiceDaoImplMapper.xml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="workflowDataFileV1ServiceDaoImpl">
  6. <!-- 保存OA附件信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveWorkflowDataFileInfo" parameterType="Map">
  8. insert into oa_workflow_data_file(
  9. file_name,create_user_id,create_user_name,id,real_file_name,store_id,file_id
  10. ) values (
  11. #{fileName},#{createUserId},#{createUserName},#{id},#{realFileName},#{storeId},#{fileId}
  12. )
  13. </insert>
  14. <!-- 查询OA附件信息 add by wuxw 2018-07-03 -->
  15. <select id="getWorkflowDataFileInfo" parameterType="Map" resultType="Map">
  16. select t.file_name,t.file_name fileName,t.create_user_id,t.create_user_id
  17. createUserId,t.create_user_name,t.create_user_name createUserName,t.status_cd,t.status_cd
  18. statusCd,t.id,t.real_file_name,t.real_file_name realFileName,t.store_id,t.store_id storeId,t.file_id,t.file_id
  19. fileId
  20. from oa_workflow_data_file t
  21. where 1 =1
  22. <if test="fileName !=null and fileName != ''">
  23. and t.file_name= #{fileName}
  24. </if>
  25. <if test="createUserId !=null and createUserId != ''">
  26. and t.create_user_id= #{createUserId}
  27. </if>
  28. <if test="createUserName !=null and createUserName != ''">
  29. and t.create_user_name= #{createUserName}
  30. </if>
  31. <if test="statusCd !=null and statusCd != ''">
  32. and t.status_cd= #{statusCd}
  33. </if>
  34. <if test="id !=null and id != ''">
  35. and t.id= #{id}
  36. </if>
  37. <if test="realFileName !=null and realFileName != ''">
  38. and t.real_file_name= #{realFileName}
  39. </if>
  40. <if test="storeId !=null and storeId != ''">
  41. and t.store_id= #{storeId}
  42. </if>
  43. <if test="fileId !=null and fileId != ''">
  44. and t.file_id= #{fileId}
  45. </if>
  46. order by t.create_time desc
  47. <if test="page != -1 and page != null ">
  48. limit #{page}, #{row}
  49. </if>
  50. </select>
  51. <!-- 修改OA附件信息 add by wuxw 2018-07-03 -->
  52. <update id="updateWorkflowDataFileInfo" parameterType="Map">
  53. update oa_workflow_data_file t set t.status_cd = #{statusCd}
  54. <if test="newBId != null and newBId != ''">
  55. ,t.b_id = #{newBId}
  56. </if>
  57. <if test="fileName !=null and fileName != ''">
  58. , t.file_name= #{fileName}
  59. </if>
  60. <if test="createUserId !=null and createUserId != ''">
  61. , t.create_user_id= #{createUserId}
  62. </if>
  63. <if test="createUserName !=null and createUserName != ''">
  64. , t.create_user_name= #{createUserName}
  65. </if>
  66. <if test="id !=null and id != ''">
  67. , t.id= #{id}
  68. </if>
  69. <if test="realFileName !=null and realFileName != ''">
  70. , t.real_file_name= #{realFileName}
  71. </if>
  72. <if test="storeId !=null and storeId != ''">
  73. , t.store_id= #{storeId}
  74. </if>
  75. where 1=1
  76. <if test="fileId !=null and fileId != ''">
  77. and t.file_id= #{fileId}
  78. </if>
  79. </update>
  80. <!-- 查询OA附件数量 add by wuxw 2018-07-03 -->
  81. <select id="queryWorkflowDataFilesCount" parameterType="Map" resultType="Map">
  82. select count(1) count
  83. from oa_workflow_data_file t
  84. where 1 =1
  85. <if test="fileName !=null and fileName != ''">
  86. and t.file_name= #{fileName}
  87. </if>
  88. <if test="createUserId !=null and createUserId != ''">
  89. and t.create_user_id= #{createUserId}
  90. </if>
  91. <if test="createUserName !=null and createUserName != ''">
  92. and t.create_user_name= #{createUserName}
  93. </if>
  94. <if test="statusCd !=null and statusCd != ''">
  95. and t.status_cd= #{statusCd}
  96. </if>
  97. <if test="id !=null and id != ''">
  98. and t.id= #{id}
  99. </if>
  100. <if test="realFileName !=null and realFileName != ''">
  101. and t.real_file_name= #{realFileName}
  102. </if>
  103. <if test="storeId !=null and storeId != ''">
  104. and t.store_id= #{storeId}
  105. </if>
  106. <if test="fileId !=null and fileId != ''">
  107. and t.file_id= #{fileId}
  108. </if>
  109. </select>
  110. </mapper>