DesignDao.dql 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. -- [selectDesignFonts]
  2. select * from $table$;
  3. -- [addDesignFont]
  4. insert into $table$ (id, fontName, fontThumbUrl, voidFlag,
  5. fontFilePath, createBy, createTime,
  6. createTimeLong, updateBy, updateTime,
  7. updateTimeLong ) values ( #{id}, #{fontname}, #{fontthumburl}, #{voidflag},
  8. #{fontfilepath}, #{createby}, #{createtime},
  9. #{createtimelong}, #{updateby}, #{updatetime},
  10. #{updatetimelong} );
  11. -- [voidDesignFont]
  12. update $table$ set
  13. voidFlag = #{voidflag},
  14. updateBy = #{updateby},
  15. updateTime = #{updatetime}
  16. where id = #{id};
  17. -- [selectDesignTemplates]
  18. select *
  19. from $table$
  20. -- trim prefix=WHERE prefixOverrides=AND|OR
  21. -- isNotEmpty voidFlag
  22. -- if voidFlag >= 0
  23. voidFlag = #{voidFlag}
  24. -- end
  25. -- end
  26. -- isNotEmpty keyWord
  27. and (templateName LIKE #{Like:keyWord})
  28. -- end
  29. -- isNotEmpty templateName
  30. and templateName LIKE #{Like:templateName}
  31. -- end
  32. -- end
  33. -- isEmpty orderBy
  34. order by createTime desc
  35. -- else
  36. order by #{orderBy}
  37. -- end
  38. ;
  39. -- [selectDesignTemplateItems]
  40. select * from $table$ where idTemplate = #{idTemplate};
  41. -- [selectDesignOrders]
  42. select *
  43. from $table$
  44. -- trim prefix=WHERE prefixOverrides=AND|OR
  45. -- isNotEmpty voidFlag
  46. -- if voidFlag >= 0
  47. voidFlag = #{voidFlag}
  48. -- end
  49. -- end
  50. -- isNotEmpty keyWord
  51. and (orderName LIKE #{Like:keyWord})
  52. -- end
  53. -- isNotEmpty orderName
  54. and templateName LIKE #{Like:orderName}
  55. -- end
  56. -- end
  57. -- isEmpty orderBy
  58. order by createTime desc
  59. -- else
  60. order by #{orderBy}
  61. -- end
  62. ;
  63. -- [selectDesignOrderItems]
  64. select * from $table$ where idOrder = #{idOrder};
  65. -- [addDesignTemplate]
  66. insert into $table$ (id, templateName, backgroundPath, viewThumbPath,
  67. canvasHeight, canvasWidth, breedHeight,
  68. breedWidth, productIdentity, voidFlag,
  69. jsonContent, createBy, createTime,
  70. createTimeLong, updateBy, updateTime,
  71. updateTimeLong ) values ( #{id}, #{templatename}, #{backgroundpath}, #{viewthumbpath},
  72. #{canvasheight}, #{canvaswidth}, #{breedheight},
  73. #{breedwidth}, #{productidentity}, #{voidflag},
  74. #{jsoncontent}, #{createby}, #{createtime},
  75. #{createtimelong}, #{updateby}, #{updatetime},
  76. #{updatetimelong} );
  77. -- [updateDesignTemplate]
  78. update $table$ set templateName = #{templatename}, jsonContent = #{jsoncontent},
  79. updateBy = #{updateby},
  80. updateTime = #{updatetime}
  81. where id = #{id};
  82. -- [updateDesignTemplateThumb]
  83. update $table$ set templateName = #{templatename}, viewThumbPath = #{viewthumbpath},
  84. updateBy = #{updateby},
  85. updateTime = #{updatetime}
  86. where id = #{id};
  87. -- [addDesignTemplateItem]
  88. insert into $table$ (id, idTemplate, itemType, locationX,
  89. locationY, sizeWidth, sizeHeight,
  90. rotation, zIndex, jsonContent,
  91. createBy, createTime, createTimeLong,
  92. updateBy, updateTime, updateTimeLong ) values ( #{id}, #{idtemplate}, #{itemtype}, #{locationx},
  93. #{locationy}, #{sizewidth}, #{sizeheight},
  94. #{rotation}, #{zindex}, #{jsoncontent},
  95. #{createby}, #{createtime}, #{createtimelong},
  96. #{updateby}, #{updatetime}, #{updatetimelong} );
  97. -- [deleteDesignTemplateItem]
  98. delete from $table$ where idTemplate = #{id};
  99. -- [voidDesignTemplate]
  100. update $table$ set
  101. voidFlag = #{voidflag},
  102. updateBy = #{updateby},
  103. updateTime = #{updatetime}
  104. where id = #{id};
  105. -- [addDesignOrder]
  106. insert into $table$ (id, idTemplate, userIdentity, orderMame,
  107. backgroundPath, viewThumbPath, canvasHeight,
  108. canvasWidth, breedHeight, breedWidth,
  109. productIdentity, voidFlag, jsonContent,
  110. createBy, createTime, createTimeLong,
  111. updateBy, updateTime, updateTimeLong ) values ( #{id}, #{idtemplate}, #{useridentity}, #{ordermame},
  112. #{backgroundpath}, #{viewthumbpath}, #{canvasheight},
  113. #{canvaswidth}, #{breedheight}, #{breedwidth},
  114. #{productidentity}, #{voidflag}, #{jsoncontent},
  115. #{createby}, #{createtime}, #{createtimelong},
  116. #{updateby}, #{updatetime}, #{updatetimelong} );
  117. -- [addDesignOrderItem]
  118. insert into $table$ (id, idOrder, itemType, locationX,
  119. locationY, sizeWidth, sizeHeight,
  120. rotation, zIndex, jsonContent,
  121. createBy, createTime, createTimeLong,
  122. updateBy, updateTime, updateTimeLong ) values ( #{id}, #{idorder}, #{itemtype}, #{locationx},
  123. #{locationy}, #{sizewidth}, #{sizeheight},
  124. #{rotation}, #{zindex}, #{jsoncontent},
  125. #{createby}, #{createtime}, #{createtimelong},
  126. #{updateby}, #{updatetime}, #{updatetimelong} );