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.0 KiB

scoresListOfStudent

  • 获取公告列表 SELECT @pageTag(){ * @} FROM notices WHERE teacher_id = #teacher.id# ORDER BY id DESC

queryByCondition

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

    select @pageTag(){ t.* @} from notices t where 1=1
    @//数据权限该sql语句功能点,如果不考虑数据权限,可以删除此行
    and #function("notices.query")# @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(content)){ and t.content =#content# @} @if(!isEmpty(teacherId)){ and t.teacher_id =#teacherId# @}

deleteNoticesByIds

  • 批量删除

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

getNoticesValues

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

    select t.* from notices 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(content)){ and t.content =#content# @} @if(!isEmpty(teacherId)){ and t.teacher_id =#teacherId# @}

getValuesByQuery

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

    select t.* from notices 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(content)){ and t.content =#content# @} @if(!isEmpty(teacherId)){ and t.teacher_id =#teacherId# @}