package com.ltkj.mall.service.impl;
|
|
import java.util.List;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.ltkj.common.utils.DateUtils;
|
import com.ltkj.mall.domain.MallOrder;
|
import com.ltkj.mall.mapper.MallOrderMapper;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
import com.ltkj.mall.mapper.MallKeywordMapper;
|
import com.ltkj.mall.domain.MallKeyword;
|
import com.ltkj.mall.service.IMallKeywordService;
|
|
/**
|
* 关键字Service业务层处理
|
*
|
* @author ltkj_赵佳豪&李格
|
* @date 2023-07-13
|
*/
|
@Service
|
public class MallKeywordServiceImpl extends ServiceImpl<MallKeywordMapper, MallKeyword> implements IMallKeywordService {
|
@Autowired
|
private MallKeywordMapper mallKeywordMapper;
|
|
/**
|
* 查询关键字
|
*
|
* @param id 关键字主键
|
* @return 关键字
|
*/
|
@Override
|
public MallKeyword selectMallKeywordById(Long id) {
|
return mallKeywordMapper.selectMallKeywordById(id);
|
}
|
|
/**
|
* 查询关键字列表
|
*
|
* @param mallKeyword 关键字
|
* @return 关键字
|
*/
|
@Override
|
public List<MallKeyword> selectMallKeywordList(MallKeyword mallKeyword) {
|
return mallKeywordMapper.selectMallKeywordList(mallKeyword);
|
}
|
|
/**
|
* 新增关键字
|
*
|
* @param mallKeyword 关键字
|
* @return 结果
|
*/
|
@Override
|
public int insertMallKeyword(MallKeyword mallKeyword) {
|
mallKeyword.setCreateTime(DateUtils.getNowDate());
|
return mallKeywordMapper.insertMallKeyword(mallKeyword);
|
}
|
|
/**
|
* 修改关键字
|
*
|
* @param mallKeyword 关键字
|
* @return 结果
|
*/
|
@Override
|
public int updateMallKeyword(MallKeyword mallKeyword) {
|
mallKeyword.setUpdateTime(DateUtils.getNowDate());
|
return mallKeywordMapper.updateMallKeyword(mallKeyword);
|
}
|
|
/**
|
* 批量删除关键字
|
*
|
* @param ids 需要删除的关键字主键
|
* @return 结果
|
*/
|
@Override
|
public int deleteMallKeywordByIds(Long[] ids) {
|
return mallKeywordMapper.deleteMallKeywordByIds(ids);
|
}
|
|
/**
|
* 删除关键字信息
|
*
|
* @param id 关键字主键
|
* @return 结果
|
*/
|
@Override
|
public int deleteMallKeywordById(Long id) {
|
return mallKeywordMapper.deleteMallKeywordById(id);
|
}
|
|
@Override
|
public String getKeyNames(String[] ids) {
|
return mallKeywordMapper.getKeyNames(ids);
|
}
|
|
@Override
|
public List<String> getKeyIds(String[] ids) {
|
return mallKeywordMapper.getKeyIds(ids);
|
}
|
}
|