|
|
|
|
queryByCondition
|
|
|
|
|
===
|
|
|
|
|
* 根据不为空的参数进行分页查询
|
|
|
|
|
|
|
|
|
|
select
|
|
|
|
|
@pageTag(){
|
|
|
|
|
t.*
|
|
|
|
|
@}
|
|
|
|
|
from instance_roles t
|
|
|
|
|
where 1=1
|
|
|
|
|
@//数据权限,该sql语句功能点,如果不考虑数据权限,可以删除此行
|
|
|
|
|
and #function("instanceRoles.query")#
|
|
|
|
|
@if(!isEmpty(id)){
|
|
|
|
|
and t.id =#id#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(instanceDataId)){
|
|
|
|
|
and t.instance_data_id =#instanceDataId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(buyerId)){
|
|
|
|
|
and t.buyer_id =#buyerId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(buyerName)){
|
|
|
|
|
and t.buyer_name =#buyerName#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(sellerId)){
|
|
|
|
|
and t.seller_id =#sellerId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(sellerName)){
|
|
|
|
|
and t.seller_name =#sellerName#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(bankId)){
|
|
|
|
|
and t.bank_id =#bankId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(bankName)){
|
|
|
|
|
and t.bank_name =#bankName#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(expressId)){
|
|
|
|
|
and t.express_id =#expressId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(expressName)){
|
|
|
|
|
and t.express_name =#expressName#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(createdAt)){
|
|
|
|
|
and t.created_at =#createdAt#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(updatedAt)){
|
|
|
|
|
and t.updated_at =#updatedAt#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(data)){
|
|
|
|
|
and t.data =#data#
|
|
|
|
|
@}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
deleteInstanceRolesByIds
|
|
|
|
|
===
|
|
|
|
|
|
|
|
|
|
* 批量删除
|
|
|
|
|
|
|
|
|
|
delete from instance_roles where find_in_set(id,#ids#)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getInstanceRolesValues
|
|
|
|
|
===
|
|
|
|
|
|
|
|
|
|
* 根据不为空的参数进行查询
|
|
|
|
|
|
|
|
|
|
select t.*
|
|
|
|
|
from instance_roles t
|
|
|
|
|
where 1=1
|
|
|
|
|
@if(!isEmpty(id)){
|
|
|
|
|
and t.id =#id#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(instanceDataId)){
|
|
|
|
|
and t.instance_data_id =#instanceDataId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(buyerId)){
|
|
|
|
|
and t.buyer_id =#buyerId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(buyerName)){
|
|
|
|
|
and t.buyer_name =#buyerName#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(sellerId)){
|
|
|
|
|
and t.seller_id =#sellerId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(sellerName)){
|
|
|
|
|
and t.seller_name =#sellerName#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(bankId)){
|
|
|
|
|
and t.bank_id =#bankId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(bankName)){
|
|
|
|
|
and t.bank_name =#bankName#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(expressId)){
|
|
|
|
|
and t.express_id =#expressId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(expressName)){
|
|
|
|
|
and t.express_name =#expressName#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(createdAt)){
|
|
|
|
|
and t.created_at =#createdAt#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(updatedAt)){
|
|
|
|
|
and t.updated_at =#updatedAt#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(data)){
|
|
|
|
|
and t.data =#data#
|
|
|
|
|
@}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getValuesByQuery
|
|
|
|
|
===
|
|
|
|
|
|
|
|
|
|
* 根据不为空的参数进行查询
|
|
|
|
|
|
|
|
|
|
select t.*
|
|
|
|
|
from instance_roles t
|
|
|
|
|
where 1=1
|
|
|
|
|
@if(!isEmpty(id)){
|
|
|
|
|
and t.id =#id#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(instanceDataId)){
|
|
|
|
|
and t.instance_data_id =#instanceDataId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(buyerId)){
|
|
|
|
|
and t.buyer_id =#buyerId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(buyerName)){
|
|
|
|
|
and t.buyer_name =#buyerName#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(sellerId)){
|
|
|
|
|
and t.seller_id =#sellerId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(sellerName)){
|
|
|
|
|
and t.seller_name =#sellerName#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(bankId)){
|
|
|
|
|
and t.bank_id =#bankId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(bankName)){
|
|
|
|
|
and t.bank_name =#bankName#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(expressId)){
|
|
|
|
|
and t.express_id =#expressId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(expressName)){
|
|
|
|
|
and t.express_name =#expressName#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(createdAt)){
|
|
|
|
|
and t.created_at =#createdAt#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(updatedAt)){
|
|
|
|
|
and t.updated_at =#updatedAt#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(data)){
|
|
|
|
|
and t.data =#data#
|
|
|
|
|
@}
|