package com.yeshi.fanli.dao.mybatis.lable;
|
|
import java.util.List;
|
import java.util.Map;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import com.yeshi.fanli.entity.bus.lable.Label;
|
import com.yeshi.fanli.entity.bus.lable.LabelGoods;
|
import com.yeshi.fanli.exception.goods.quality.LabelException;
|
|
public interface LabelMapper {
|
|
int insert(Label record);
|
|
int insertSelective(Label record);
|
|
int updateByPrimaryKey(Label record);
|
|
int updateByPrimaryKeySelective(Label record);
|
|
int deleteByPrimaryKey(Long id);
|
|
Label selectByPrimaryKey(Long id);
|
|
List<Label> selectByTitle(@Param("title") String title);
|
|
|
Label getByTitle(@Param("title") String title);
|
|
|
/**
|
* 多个标签查询
|
* @param list
|
* @return
|
*/
|
List<Label> listByTitles(List<String> list);
|
|
|
/**
|
* 统计标签总数
|
* @return
|
*/
|
long getCount();
|
|
/**
|
* 统计今日方式 录入总数
|
* @return
|
*/
|
long getCountToday();
|
|
|
Map<String, Object> getCountByEntryMode();
|
|
/**
|
* 批量删除
|
* @param ids
|
* @return
|
*/
|
int deleteBatchByPrimaryKey(long[] ids);
|
|
/**
|
* 根据条件查询标签
|
* @param start
|
* @param count
|
* @param title
|
* @param startTime
|
* @param endTime
|
* @return
|
*/
|
List<Label> query(@Param("start") long start, @Param("count") int count, @Param("key") String title,
|
@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("orderMode") String orderMode);
|
|
int getQueryCount(@Param("key") String title, @Param("startTime") String startTime,
|
@Param("endTime") String endTime);
|
|
|
/**
|
* 商品标签添加候选项(已排除存在标签)
|
* @param goodsId
|
* @return
|
* @throws LabelException
|
*/
|
List<Label> queryGoodsCandidate(@Param("start") int start, @Param("count") int count,
|
@Param("key") String key, @Param("goodsId") Long goodsId);
|
int getCountQueryGoodsCandidate(@Param("key") String key, @Param("goodsId") Long goodsId);
|
|
/**
|
* 查询一级分类 标签候选项
|
* @param classId
|
* @return
|
*/
|
List<Label> queryClassCandidate(@Param("start") int start, @Param("count") int count,
|
@Param("key") String key, @Param("classId") Long classId);
|
int getCountQueryClassCandidate(@Param("key") String key, @Param("classId") Long classId);
|
|
|
/**
|
* 查询子级分类 标签候选项
|
* @param subClassId
|
* @return
|
*/
|
List<Label> querySubClassCandidate(@Param("start") int start, @Param("count") int count,
|
@Param("key") String key, @Param("subClassId") Long subClassId);
|
int getCountQuerySubClassCandidate(@Param("key") String key, @Param("subClassId") Long subClassId);
|
|
|
|
/**
|
* 查询二级以下分类 标签列表
|
* @param subClassId
|
* @return
|
*/
|
List<Label> getSecondClassLables(@Param("subClassId") Long subClassId);
|
|
|
/**
|
* 查询商品对应标签
|
* @param goodsId
|
* @return
|
*/
|
List<LabelGoods> getByGoodsId(@Param("goodsId") Long goodsId);
|
|
}
|