| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- -- [selectBusinessScript]
- select *
- from $table$
- -- trim prefix=WHERE prefixOverrides=AND|OR
- -- isNotEmpty voidFlag
- -- if voidFlag >= 0
- voidFlag = #{voidFlag}
- -- end
- -- end
- -- isNotEmpty keyWord
- and (businessName LIKE #{Like:keyWord} or businessCode LIKE #{Like:keyWord})
- -- end
- -- isNotEmpty businessName
- and businessName LIKE #{Like:businessName}
- -- end
- -- isNotEmpty businessCode
- and businessCode LIKE #{Like:businessCode}
- -- end
- -- isNotEmpty businessModule
- -- if businessModule >= 0
- and businessModule = #{businessModule}
- -- end
- -- end
- -- end
- -- isEmpty orderBy
- order by businessModule asc, createTime desc
- -- else
- order by #{orderBy}
- -- end
- ;
- -- [addBusinessScript]
- insert into $table$
- (id, businessName, businessCode,
- voidFlag, businessModule, systemFlag, commonFlag,
- createBy, createTime,
- updateBy, updateTime)
- values (
- #{id}, #{businessname}, #{businesscode},
- #{voidflag}, #{businessmodule}, #{systemflag}, #{commonflag},
- #{createby}, #{createtime}, #{updateby},
- #{updatetime}
- );
- -- [updateBusinessScript]
- update $table$ set
- businessName = #{businessname},
- commonFlag = #{commonflag},
- updateBy = #{updateby},
- updateTime = #{updatetime}
- where id = #{id};
- -- [voidBusinessScript]
- update $table$ set
- voidFlag = #{voidflag},
- updateBy = #{updateby},
- updateTime = #{updatetime}
- where id = #{id};
- -- [selectInquireMainInfo]
- select * from $table$;
- -- [addInquireMainInfo]
- insert into $table$ (id, inquireName, inquireFuncName, inquireType, canExport, queryInPage,
- voidFlag, createBy, createTime,
- updateBy, updateTime ) values ( #{id}, #{inquirename}, #{inquirefuncname}, #{inquiretype}, #{canexport}, #{queryinpage},
- #{voidflag}, #{createby}, #{createtime},
- #{updateby}, #{updatetime} );
- -- [updateInquireMainInfo]
- update $table$ set inquireName = #{inquirename},inquireType = #{inquiretype}, canExport = #{canexport}, queryInPage = #{queryinpage},
- updateBy = #{updateby},
- updateTime = #{updatetime} where id = #{id};
- -- [voidInquireMainInfo]
- update $table$ set voidFlag = #{voidflag},
- updateBy = #{updateby},
- updateTime = #{updatetime} where id = #{id};
- -- [selectInquireResultColumn]
- select * from $table$
- -- trim prefix=WHERE prefixOverrides=AND|OR
- -- if idInquire > 0
- idInquire = #{idInquire}
- -- end
- -- end
- ;
- -- [addInquireResultColumn]
- insert into $table$ (id, idInquire, idParentColumn, columnName,
- columnField, columnWidth, visible,
- hasStatistics, statisticsFormat, linkUrl,
- sortAsc, createBy, createTime,
- updateBy, updateTime ) values ( #{id}, #{idinquire}, #{idparentcolumn}, #{columnname},
- #{columnfield}, #{columnwidth}, #{visible},
- #{hasstatistics}, #{statisticsformat}, #{linkurl},
- #{sortasc}, #{createby}, #{createtime},
- #{updateby}, #{updatetime} );
- -- [updateInquireResultColumn]
- update $table$ set columnName = #{columnname},columnField = #{columnfield},columnWidth = #{columnwidth},
- visible = #{visible},hasStatistics = #{hasstatistics},statisticsFormat = #{statisticsformat}, linkUrl = #{linkurl}, sortAsc = #{sortasc},
- updateBy = #{updateby},
- updateTime = #{updatetime} where id = #{id};
- -- [deleteInquireResultColumn]
- delete from $table$ where id = #{id};
- -- [selectInquireCondition]
- select * from $table$
- -- trim prefix=WHERE prefixOverrides=AND|OR
- -- if idInquire > 0
- idInquire = #{idInquire}
- -- end
- -- end
- ;
- -- [addInquireCondition]
- insert into $table$ (id, idInquire, conditionName, conditionField,
- dataType, defaultValue, visible,
- selectDicType, sortAsc, createBy,
- createTime, updateBy,
- updateTime ) values ( #{id}, #{idinquire}, #{conditionname}, #{conditionfield},
- #{datatype}, #{defaultvalue}, #{visible},
- #{selectdictype}, #{sortasc}, #{createby},
- #{createtime}, #{updateby},
- #{updatetime} );
- -- [updateInquireCondition]
- update $table$ set conditionName = #{conditionname},conditionField = #{conditionfield},dataType = #{datatype},
- defaultValue = #{defaultvalue},visible = #{visible},selectDicType = #{selectdictype},sortAsc = #{sortasc},
- updateBy = #{updateby},
- updateTime = #{updatetime} where id = #{id};
- -- [deleteInquireCondition]
- delete from $table$ where id = #{id};
- -- [deleteInquireResultColumnByMain]
- delete from $table$ where idInquire = #{id};
- -- [deleteInquireConditionByMain]
- delete from $table$ where idInquire = #{id};
- -- [selectCompanyInfo]
- select *
- from $table$
- -- trim prefix=WHERE prefixOverrides=AND|OR
- -- if voidFlag >= 0
- voidFlag = #{voidFlag}
- -- end
- -- isNotEmpty keyWord
- and (companyName LIKE #{Like:keyWord} or linkMan LIKE #{Like:keyWord})
- -- end
- -- end
- -- isEmpty orderBy
- order by createTime desc
- -- else
- order by #{orderBy}
- -- end;
- -- [addCompanyInfo]
- insert into $table$ (
- id, companyName, address, linkMan,
- linkPhone, voidFlag, createBy,
- createTime, createTimeLong, updateBy,
- updateTime, updateTimeLong )
- values (
- #{id}, #{companyname}, #{address}, #{linkman},
- #{linkphone}, #{voidflag}, #{createby},
- #{createtime}, #{createtimelong}, #{updateby},
- #{updatetime}, #{updatetimelong}
- );
- -- [updateCompanyInfo]
- update $table$ set
- companyName = #{companyname},
- address = #{address},
- linkMan = #{linkman},
- linkPhone = #{linkphone},
- updateBy = #{updateby},
- updateTime = #{updatetime},
- updateTimeLong = #{updatetimelong}
- where id = #{id};
- -- [voidCompanyInfo]
- update $table$ set
- voidFlag = #{voidflag},
- updateBy = #{updateby},
- updateTime = #{updatetime},
- updateTimeLong = #{updatetimelong}
- where id = #{id};
|