You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2.1 KiB

queryByCondition

  • 根据不为空的参数进行分页查询

  • @//数据权限该sql语句功能点,如果不考虑数据权限,可以删除此行

  • and #function("configs.query")#

    select @pageTag(){ t.* @} from configs t where 1=1 @if(!isEmpty(id)){ and t.id =#id# @} @if(!isEmpty(createdAt)){ and t.created_at =#createdAt#queryByCondition @} @if(!isEmpty(updatedAt)){ and t.updated_at =#updatedAt# @} @if(!isEmpty(data)){ and t.data =#data# @} @if(!isEmpty(userId)){ and t.user_id =#userId# @} @if(!isEmpty(name)){ and t.name =#name# @} @if(!isEmpty(value)){ and t.value =#value# @}

deleteConfigsByIds

  • 批量删除

    delete from configs where find_in_set(id,#ids#)

getConfigsValues

  • 根据不为空的参数进行查询

    select t.* from configs t where 1=1
    @if(!isEmpty(id)){ and t.id =#id# @} @if(!isEmpty(createdAt)){ and t.created_at =#createdAt# @} @if(!isEmpty(updatedAt)){ and t.updated_at =#updatedAt# @} @if(!isEmpty(data)){ and t.data =#data# @} @if(!isEmpty(userId)){ and t.user_id =#userId# @} @if(!isEmpty(name)){ and t.name =#name# @} @if(!isEmpty(value)){ and t.value =#value# @}

getValuesByQuery

  • 根据不为空的参数进行查询

    select t.* from configs t where 1=1
    @if(!isEmpty(id)){ and t.id =#id# @} @if(!isEmpty(createdAt)){ and t.created_at =#createdAt# @} @if(!isEmpty(updatedAt)){ and t.updated_at =#updatedAt# @} @if(!isEmpty(data)){ and t.data =#data# @} @if(!isEmpty(userId)){ and t.user_id =#userId# @} @if(!isEmpty(name)){ and t.name =#name# @} @if(!isEmpty(value)){ and t.value =#value# @}

updateScoreSetting

  • 更新评分规则
    update configs
    set created_at = #createdAt#, updated_at = #updatedAt#, value = #value#
    where user_id = #userId#
    and name = #name#