package com.ltkj.mall.mapper;
|
|
import java.util.List;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.ltkj.mall.domain.MallKeyword;
|
import com.ltkj.mall.domain.MallOrder;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Select;
|
|
/**
|
* 关键字Mapper接口
|
*
|
* @author ltkj_赵佳豪&李格
|
* @date 2023-07-13
|
*/
|
@Mapper
|
public interface MallKeywordMapper extends BaseMapper<MallKeyword> {
|
/**
|
* 查询关键字
|
*
|
* @param id 关键字主键
|
* @return 关键字
|
*/
|
public MallKeyword selectMallKeywordById(Long id);
|
|
/**
|
* 查询关键字列表
|
*
|
* @param mallKeyword 关键字
|
* @return 关键字集合
|
*/
|
public List<MallKeyword> selectMallKeywordList(MallKeyword mallKeyword);
|
|
/**
|
* 新增关键字
|
*
|
* @param mallKeyword 关键字
|
* @return 结果
|
*/
|
public int insertMallKeyword(MallKeyword mallKeyword);
|
|
/**
|
* 修改关键字
|
*
|
* @param mallKeyword 关键字
|
* @return 结果
|
*/
|
public int updateMallKeyword(MallKeyword mallKeyword);
|
|
/**
|
* 删除关键字
|
*
|
* @param id 关键字主键
|
* @return 结果
|
*/
|
public int deleteMallKeywordById(Long id);
|
|
/**
|
* 批量删除关键字
|
*
|
* @param ids 需要删除的数据主键集合
|
* @return 结果
|
*/
|
public int deleteMallKeywordByIds(Long[] ids);
|
|
|
@Select({"<script>"," SELECT GROUP_CONCAT(a.keyword ORDER BY a.keyword) AS names FROM mall_keyword a WHERE a.id IN", "<foreach collection='ids' item='id' open='(' separator=',' close=')'>",
|
"#{id}",
|
"</foreach>",
|
"</script>" })
|
String getKeyNames(@Param("ids")String[] ids);
|
|
|
@Select({"<script>"," SELECT a.id FROM mall_keyword a WHERE a.id IN ", "<foreach collection='ids'" +
|
" item='id' open='(' separator=',' close=')'>",
|
"#{id}",
|
"</foreach>",
|
"</script>" })
|
List<String> getKeyIds(@Param("ids")String[] ids);
|
}
|