TagMapper

package com.bfr.telinksemifourm.manage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bfr.telinksemifourm.manage.util.MyPage;
import com.bfr.telinksemifourm.shared.model.Tag;
import com.bfr.telinksemifourm.shared.model.Topic;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by .
 * Copyright (c) 2020, All Rights Reserved.
 *
 */
public interface TagMapper extends BaseMapper<Tag> {

    MyPage<Map<String, Object>> selectTopicByTagId(MyPage<Map<String, Object>> iPage, @Param("tagId") Integer tagId);

    int countToday();

    @Select("SELECT t.* FROM tag t  WHERE subtag != 0 and subtag=#{topicId}")
    List<Tag> selectByTopicIdCh(Integer topicId);

    @Select("select  id  from tag	 where id in (select DISTINCT subtag from tag	 where subtag != 0 ) ")
    List<Tag> selectTagSub();

    List<Tag> tagAjaxCompletion2();

    List<Tag> tagAjaxCompletion(String tag);

    @Update("UPDATE tag SET index_time = #{indexTime} WHERE id = #{id}")
    int updateIndexTime(Integer id, Date indexTime);

    @Select("SELECT * FROM tag WHERE index_time IS NULL")
    List<Tag> selectAllIndexTimeIsNull();

    @Select("SELECT * FROM tag WHERE index_time IS NOT NULL")
    List<Tag> selectAllIndexTimeIsNotNull();

    // 更新所有索引时间
    int updateAllIndexTime(@Param("indexTime") Date indexTime);

}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值