PlatformDao.dql 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. -- [queryPlatformInfoList]
  2. select *
  3. from $table$
  4. -- trim prefix=WHERE prefixOverrides=AND|OR
  5. -- isNotEmpty voidFlag
  6. -- if voidFlag >= 0
  7. voidFlag = #{voidFlag}
  8. -- end
  9. -- end
  10. -- isNotEmpty platformType
  11. -- if platformType >= 0
  12. and platformType = #{platformType}
  13. -- end
  14. -- end
  15. -- isNotEmpty keyWord
  16. and (platformName LIKE #{Like:keyWord})
  17. -- end
  18. -- end
  19. -- isEmpty orderBy
  20. order by createTime desc
  21. -- else
  22. order by #{orderBy}
  23. -- end
  24. ;
  25. -- [addPlatformInfo]
  26. insert into $table$ (
  27. id, platformCode, platformName, platformType,
  28. voidFlag, needAccessToken, refreshTokenSeconds, createBy, createTime,
  29. createTimeLong, updateBy, updateTime,
  30. updateTimeLong )
  31. values (
  32. #{id}, #{platformcode}, #{platformname}, #{platformtype},
  33. #{voidflag}, #{needaccesstoken}, #{refreshtokenseconds}, #{createby}, #{createtime},
  34. #{createtimelong}, #{updateby}, #{updatetime},
  35. #{updatetimelong} );
  36. -- [updatePlatformInfo]
  37. update $table$ set
  38. platformName = #{platformname},
  39. platformType = #{platformtype},
  40. platformCode = #{platformcode},
  41. updateBy = #{updateby},
  42. updateTime = #{updatetime},
  43. updateTimeLong = #{updatetimelong}
  44. where id = #{id};
  45. -- [voidPlatformInfo]
  46. update $table$ set
  47. voidFlag = #{voidflag},
  48. updateBy = #{updateby},
  49. updateTime = #{updatetime},
  50. updateTimeLong = #{updatetimelong}
  51. where id = #{id};
  52. -- [queryPlatformRequireList]
  53. select *
  54. from $table$
  55. -- trim prefix=WHERE prefixOverrides=AND|OR
  56. -- isNotEmpty idPlatform
  57. -- if idPlatform >= 0
  58. idPlatform = #{idPlatform}
  59. -- end
  60. -- end
  61. -- isNotEmpty voidFlag
  62. -- if voidFlag >= 0
  63. and voidFlag = #{voidFlag}
  64. -- end
  65. -- end
  66. -- isNotEmpty keyWord
  67. and (requireName LIKE #{Like:keyWord})
  68. -- end
  69. -- end
  70. -- isEmpty orderBy
  71. order by createTime desc
  72. -- else
  73. order by #{orderBy}
  74. -- end
  75. ;
  76. -- [addPlatformRequire]
  77. insert into $table$
  78. (id, idPlatform, requireName, requireCode, valueType,
  79. voidFlag, createBy, createTime,
  80. createTimeLong, updateBy, updateTime,
  81. updateTimeLong )
  82. values
  83. ( #{id}, #{idplatform}, #{requirename}, #{requirecode}, #{valuetype},
  84. #{voidflag}, #{createby}, #{createtime},
  85. #{createtimelong}, #{updateby}, #{updatetime},
  86. #{updatetimelong} );
  87. -- [updatePlatformRequire]
  88. update $table$ set
  89. requireCode = #{requirecode},
  90. requireName = #{requirename},
  91. updateBy = #{updateby},
  92. updateTime = #{updatetime},
  93. updateTimeLong = #{updatetimelong}
  94. where id = #{id};
  95. -- [voidPlatformRequire]
  96. update $table$ set
  97. voidFlag = #{voidflag},
  98. updateBy = #{updateby},
  99. updateTime = #{updatetime},
  100. updateTimeLong = #{updatetimelong}
  101. where id = #{id};