DesignDao.dql 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. -- [addDesignTemplate]
  42. insert into $table$ (id, templateName, backgroundPath, viewThumbPath,
  43. canvasHeight, canvasWidth, breedHeight,
  44. breedWidth, idProduct, voidFlag,
  45. jsonContent, createBy, createTime,
  46. createTimeLong, updateBy, updateTime,
  47. updateTimeLong ) values ( #{id}, #{templatename}, #{backgroundpath}, #{viewthumbpath},
  48. #{canvasheight}, #{canvaswidth}, #{breedheight},
  49. #{breedwidth}, #{idproduct}, #{voidflag},
  50. #{jsoncontent}, #{createby}, #{createtime},
  51. #{createtimelong}, #{updateby}, #{updatetime},
  52. #{updatetimelong} );
  53. -- [addDesignTemplateItem]
  54. insert into $table$ (id, idTemplate, itemType, locationX,
  55. locationY, sizeWidth, sizeHeight,
  56. rotation, zIndex, jsonContent,
  57. createBy, createTime, createTimeLong,
  58. updateBy, updateTime, updateTimeLong ) values ( #{id}, #{idtemplate}, #{itemtype}, #{locationx},
  59. #{locationy}, #{sizewidth}, #{sizeheight},
  60. #{rotation}, #{zindex}, #{jsoncontent},
  61. #{createby}, #{createtime}, #{createtimelong},
  62. #{updateby}, #{updatetime}, #{updatetimelong} );
  63. -- [deleteDesignTemplateItem]
  64. delete from $table$ where idTemplate = #{id};
  65. -- [voidDesignTemplate]
  66. update $table$ set
  67. voidFlag = #{voidflag},
  68. updateBy = #{updateby},
  69. updateTime = #{updatetime}
  70. where id = #{id};