| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262 |
- -- [selectDesignFonts]
- select * from $table$;
- -- [addDesignFont]
- insert into $table$ (id, fontName, fontFamily, fontThumbUrl,
- voidFlag, fontFilePath, createBy,
- createTime, createTimeLong, updateBy,
- updateTime, updateTimeLong ) values ( #{id}, #{fontname}, #{fontfamily}, #{fontthumburl},
- #{voidflag}, #{fontfilepath}, #{createby},
- #{createtime}, #{createtimelong}, #{updateby},
- #{updatetime}, #{updatetimelong} );
- -- [voidDesignFont]
- update $table$ set
- voidFlag = #{voidflag},
- updateBy = #{updateby},
- updateTime = #{updatetime}
- where id = #{id};
- -- [selectDesignTemplates]
- select a.*
- from $table1$ a left join $table2$ b on a.id = b.idTemplate
- -- trim prefix=WHERE prefixOverrides=AND|OR
- -- isNotEmpty voidFlag
- -- if voidFlag >= 0
- a.voidFlag = #{voidFlag}
- -- end
- -- end
- -- isNotEmpty keyWord
- and (a.templateName LIKE #{Like:keyWord})
- -- end
- -- isNotEmpty templateName
- and a.templateName LIKE #{Like:templateName}
- -- end
- -- isNotEmpty productIdentity
- and FIND_IN_SET(#{productIdentity},a.productIdentity)
- -- end
- -- isNotEmpty tags
- and b.tagName in (/* in tags */)
- -- end
- -- end
- GROUP BY a.id
- -- isNotEmpty tags
- HAVING COUNT(DISTINCT b.tagName) = #{tagCount}
- -- end
- -- isEmpty orderBy
- order by a.createTime desc
- -- else
- order by #{orderBy}
- -- end
- ;
- -- [selectDesignTemplateItems]
- select * from $table$ where idTemplate = #{idTemplate};
- -- [selectDesignOrders]
- select *
- from $table$
- -- trim prefix=WHERE prefixOverrides=AND|OR
- -- isNotEmpty voidFlag
- -- if voidFlag >= 0
- voidFlag = #{voidFlag}
- -- end
- -- end
- -- isNotEmpty userIdentity
- and userIdentity = #{userIdentity}
- -- end
- -- isNotEmpty keyWord
- and (orderName LIKE #{Like:keyWord})
- -- end
- -- isNotEmpty orderName
- and templateName LIKE #{Like:orderName}
- -- end
- -- end
- -- isEmpty orderBy
- order by createTime desc
- -- else
- order by #{orderBy}
- -- end
- ;
- -- [selectDesignOrderItems]
- select * from $table$ where idOrder = #{idOrder};
- -- [addDesignTemplate]
- insert into $table$ (id, templateName, backgroundPath, viewThumbPath,
- canvasHeight, canvasWidth, breedHeight,
- breedWidth, productIdentity, voidFlag,
- jsonContent, createBy, createTime,
- createTimeLong, updateBy, updateTime,
- updateTimeLong ) values ( #{id}, #{templatename}, #{backgroundpath}, #{viewthumbpath},
- #{canvasheight}, #{canvaswidth}, #{breedheight},
- #{breedwidth}, #{productidentity}, #{voidflag},
- #{jsoncontent}, #{createby}, #{createtime},
- #{createtimelong}, #{updateby}, #{updatetime},
- #{updatetimelong} );
- -- [updateDesignTemplate]
- update $table$ set templateName = #{templatename},
- productIdentity = #{productidentity},
- jsonContent = #{jsoncontent},
- backgroundPath = #{backgroundpath},
- canvasHeight = #{canvasheight},
- canvasWidth = #{canvaswidth},
- breedHeight = #{breedheight},
- breedWidth = #{breedwidth},
- updateBy = #{updateby},
- updateTime = #{updatetime}
- where id = #{id};
- -- [updateDesignTemplateThumb]
- update $table$ set templateName = #{templatename}, viewThumbPath = #{viewthumbpath},
- updateBy = #{updateby},
- updateTime = #{updatetime}
- where id = #{id};
- -- [addDesignTemplateItem]
- insert into $table$ (id, idTemplate, itemType, locationX,
- locationY, sizeWidth, sizeHeight,
- rotation, zIndex, jsonContent,
- createBy, createTime, createTimeLong,
- updateBy, updateTime, updateTimeLong ) values ( #{id}, #{idtemplate}, #{itemtype}, #{locationx},
- #{locationy}, #{sizewidth}, #{sizeheight},
- #{rotation}, #{zindex}, #{jsoncontent},
- #{createby}, #{createtime}, #{createtimelong},
- #{updateby}, #{updatetime}, #{updatetimelong} );
- -- [deleteDesignTemplateItem]
- delete from $table$ where idTemplate = #{id};
- -- [voidDesignTemplate]
- update $table$ set
- voidFlag = #{voidflag},
- updateBy = #{updateby},
- updateTime = #{updatetime}
- where id = #{id};
- -- [addDesignOrder]
- insert into $table$ (id, idTemplate, userIdentity, orderName,
- backgroundPath, viewThumbPath, canvasHeight,
- canvasWidth, breedHeight, breedWidth,
- productIdentity, pdfDownloadUrl, voidFlag,
- jsonContent, createBy, createTime,
- createTimeLong, updateBy, updateTime,
- updateTimeLong ) values ( #{id}, #{idtemplate}, #{useridentity}, #{ordername},
- #{backgroundpath}, #{viewthumbpath}, #{canvasheight},
- #{canvaswidth}, #{breedheight}, #{breedwidth},
- #{productidentity}, #{pdfdownloadurl}, #{voidflag},
- #{jsoncontent}, #{createby}, #{createtime},
- #{createtimelong}, #{updateby}, #{updatetime},
- #{updatetimelong} );
- -- [addDesignOrderItem]
- insert into $table$ (id, idOrder, itemType, locationX,
- locationY, sizeWidth, sizeHeight,
- rotation, zIndex, jsonContent,
- createBy, createTime, createTimeLong,
- updateBy, updateTime, updateTimeLong ) values ( #{id}, #{idorder}, #{itemtype}, #{locationx},
- #{locationy}, #{sizewidth}, #{sizeheight},
- #{rotation}, #{zindex}, #{jsoncontent},
- #{createby}, #{createtime}, #{createtimelong},
- #{updateby}, #{updatetime}, #{updatetimelong} );
- -- [updateDesignOrder]
- update $table$ set backgroundPath = #{backgroundpath},
- canvasHeight = #{canvasheight},
- canvasWidth = #{canvaswidth},
- breedHeight = #{breedheight},
- breedWidth = #{breedwidth},
- jsonContent = #{jsoncontent},
- updateBy = #{updateby},
- updateTime = #{updatetime}
- where id = #{id};
- -- [pdfCallbackDesignOrder]
- update $table$ set pdfDownloadUrl = #{pdfdownloadurl}
- where id = #{id};
- -- [deleteDesignOrderItem]
- delete from $table$ where idOrder = #{id};
- -- [queryDesignTagType]
- select *
- from $table$
- -- trim prefix=WHERE prefixOverrides=AND|OR
- -- isNotEmpty keyWord
- (name LIKE #{Like:keyWord})
- -- end
- -- isNotEmpty ids
- and id in (/* in ids */)
- -- end
- -- end
- -- isEmpty orderBy
- order by createTime desc
- -- else
- order by #{orderBy}
- -- end
- ;
- -- [getDesignTagType]
- select * from $table$ where id = #{id};
- -- [newDesignTagType]
- insert into $table$ (id, idParentType, name, createBy,
- createTime, createTimeLong, updateBy,
- updateTime, updateTimeLong ) values ( #{id}, #{idparenttype}, #{name}, #{createby},
- #{createtime}, #{createtimelong}, #{updateby},
- #{updatetime}, #{updatetimelong} );
- -- [deleteDesignTagType]
- delete from $table$ where id = #{id};
- -- [updateDesignTagType]
- update $table$ set idParentType = #{idparenttype},name = #{name},createBy = #{createby},createTime = #{createtime},
- createTimeLong = #{createtimelong},updateBy = #{updateby},updateTime = #{updatetime},updateTimeLong = #{updatetimelong}
- where id = #{id};
- -- [queryDesignTags]
- select *
- from $table$
- -- trim prefix=WHERE prefixOverrides=AND|OR
- -- isNotEmpty keyWord
- (tagName LIKE #{Like:keyWord})
- -- end
- -- isNotEmpty idType
- -- if idType >= 0
- and idType = #{idType}
- -- end
- -- end
- -- end
- -- isEmpty orderBy
- order by createTime desc
- -- else
- order by #{orderBy}
- -- end
- ;
- -- [newDesignTag]
- insert into $table$ (id, idType, tagName, createBy,
- createTime, createTimeLong, updateBy,
- updateTime, updateTimeLong ) values ( #{id}, #{idtype}, #{tagname}, #{createby},
- #{createtime}, #{createtimelong}, #{updateby},
- #{updatetime}, #{updatetimelong} );
- -- [changeTagType]
- update $table$ set idType = #{idtype} where id = #{id};
- -- [deleteDesignTag]
- delete from $table$ where id = #{id};
- -- [getTemplateTags]
- select * from $table$ where idTemplate in (/* in ids */);
- -- [deleteTemplateTag]
- delete from $table$ where idTemplate = #{idTemplate};
- -- [addTemplateTag]
- insert into $table$ (id, idTemplate, tagName, tagTypeName,
- createBy, createTime, createTimeLong,
- updateBy, updateTime, updateTimeLong ) values ( #{id}, #{idtemplate}, #{tagname}, #{tagtypename},
- #{createby}, #{createtime}, #{createtimelong},
- #{updateby}, #{updatetime}, #{updatetimelong} );
|