| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- -- [queryAuthorizationItems]
- select * from $table$;
- -- [deleteAuthorizationItems]
- delete from $table$;
- -- [addAuthorizationItems]
- insert into $table$ (permissionIndex, itemName, createBy,
- createTime, createTimeLong, updateBy,
- updateTime, updateTimeLong ) values (#{permissionindex}, #{itemname}, #{createby},
- #{createtime}, #{createtimelong}, #{updateby},
- #{updatetime}, #{updatetimelong} );
- -- [addPrinterClient]
- insert into $table$ (id, printerUniqueCode, printerName, voidFlag,
- authorizeDate, authorizeDateLong, province,
- city, district, address,
- permissions, createBy, createTime,
- createTimeLong, updateBy, updateTime,
- updateTimeLong ) values ( #{id}, #{printeruniquecode}, #{printername}, #{voidflag},
- #{authorizedate}, #{authorizedatelong}, #{province},
- #{city}, #{district}, #{address},
- #{permissions}, #{createby}, #{createtime},
- #{createtimelong}, #{updateby}, #{updatetime},
- #{updatetimelong} );
- -- [voidPrinterClient]
- update $table$ set voidFlag = #{voidflag} where id = #{id};
- -- [updatePrinterClient]
- update $table$ set printerName = #{printername},
- province = #{province}, city = #{city}, district = #{district},
- address = #{address} where id = #{id};
- -- [authorizePrinterClient]
- update $table$ set authorizeDate = #{authorizedate},
- authorizeDateLong = #{authorizedatelong},
- permissions = #{permissions}
- where id = #{id};
- -- [queryPrinterClients]
- select * from $table$
- -- trim prefix=WHERE prefixOverrides=AND|OR
- -- isNotEmpty printerName
- printerName LIKE #{Like:printerName}
- -- end
- -- isNotEmpty keyWord
- and (printerName LIKE #{Like:keyWord} or city LIKE #{Like:keyWord})
- -- end
- -- isNotEmpty printerUniqueCode
- and printerUniqueCode = #{printerUniqueCode}
- -- end
- -- isNotEmpty authOverDays
- -- if authOverDays >= 0
- and DATEDIFF(authorizeDate, NOW()) < #{authOverDays}
- -- end
- -- end
- -- isNotEmpty voidFlag
- -- if voidFlag >= 0
- and voidFlag = #{voidFlag}
- -- end
- -- end
- -- end
- ;
|