zjh
2024-02-19 6b354729688853e3cf4b083530bc466ed0836fb1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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);
    }
}