PlatformDao.dql 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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$ (id, platformCode, platformName, platformType, requireListSerial,
  27. voidFlag, createBy, createTime,
  28. createTimeLong, updateBy, updateTime,
  29. updateTimeLong ) values ( #{id}, #{platformcode}, #{platformname}, #{platformtype}, #{requirelistserial},
  30. #{voidflag}, #{createby}, #{createtime},
  31. #{createtimelong}, #{updateby}, #{updatetime},
  32. #{updatetimelong} );
  33. -- [updatePlatformInfo]
  34. update $table$ set platformName = #{platformname},platformType = #{platformtype},requireListSerial = #{requirelistserial},
  35. updateBy = #{updateby},
  36. updateTime = #{updatetime},updateTimeLong = #{updatetimelong} where id = #{id};
  37. -- [voidPlatformInfo]
  38. update $table$ set voidFlag = #{voidflag},updateBy = #{updateby},
  39. updateTime = #{updatetime},updateTimeLong = #{updatetimelong} where id = #{id};
  40. -- [queryPlatformRequireList]
  41. select *
  42. from $table$
  43. -- trim prefix=WHERE prefixOverrides=AND|OR
  44. -- isNotEmpty idPlatform
  45. -- if idPlatform >= 0
  46. idPlatform = #{idPlatform}
  47. -- end
  48. -- end
  49. -- isNotEmpty voidFlag
  50. -- if voidFlag >= 0
  51. and voidFlag = #{voidFlag}
  52. -- end
  53. -- end
  54. -- isNotEmpty keyWord
  55. and (requireName LIKE #{Like:keyWord})
  56. -- end
  57. -- end
  58. -- isEmpty orderBy
  59. order by createTime desc
  60. -- else
  61. order by #{orderBy}
  62. -- end
  63. ;
  64. -- [addPlatformRequire]
  65. insert into $table$
  66. (id, idPlatform, requireName, requireCode, valueType,
  67. voidFlag, createBy, createTime,
  68. createTimeLong, updateBy, updateTime,
  69. updateTimeLong )
  70. values
  71. ( #{id}, #{idplatform}, #{requirename}, #{requirecode}, #{valuetype},
  72. #{voidflag}, #{createby}, #{createtime},
  73. #{createtimelong}, #{updateby}, #{updatetime},
  74. #{updatetimelong} );
  75. -- [updatePlatformRequire]
  76. update $table$ set requireName = #{requirename},valueType = #{valuetype},updateBy = #{updateby},
  77. updateTime = #{updatetime},updateTimeLong = #{updatetimelong} where id = #{id};
  78. -- [voidPlatformRequire]
  79. update $table$ set voidFlag = #{voidflag},updateBy = #{updateby},
  80. updateTime = #{updatetime},updateTimeLong = #{updatetimelong} where id = #{id};