liulingling.177216
2024-08-26 349f1cfc5fa77fbc636d542df0d8050fddec48c2
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
package com.dingzhuo.energy.project.basicSetup.service.impl;
 
import java.util.List;
import java.util.UUID;
 
import com.dingzhuo.energy.common.utils.DateUtils;
import com.dingzhuo.energy.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dingzhuo.energy.project.basicSetup.mapper.SysStandardCategoryMapper;
import com.dingzhuo.energy.project.basicSetup.domain.SysStandardCategory;
import com.dingzhuo.energy.project.basicSetup.service.ISysStandardCategoryService;
 
/**
 * categoryService业务层处理
 * 
 * @author ruoyi
 * @date 2020-02-12
 */
@Service
public class SysStandardCategoryServiceImpl implements ISysStandardCategoryService 
{
    @Autowired
    private SysStandardCategoryMapper sysStandardCategoryMapper;
 
    /**
     * 查询category
     * 
     * @param id categoryID
     * @return category
     */
    @Override
    public SysStandardCategory selectSysStandardCategoryById(String id)
    {
        return sysStandardCategoryMapper.selectSysStandardCategoryById(id);
    }
 
    /**
     * 查询category列表
     * 
     * @param sysStandardCategory category
     * @return category
     */
    @Override
    public List<SysStandardCategory> selectSysStandardCategoryList(SysStandardCategory sysStandardCategory)
    {
        return sysStandardCategoryMapper.selectSysStandardCategoryList(sysStandardCategory);
    }
 
    /**
     * 新增category
     * 
     * @param sysStandardCategory category
     * @return 结果
     */
    @Override
    public int insertSysStandardCategory(SysStandardCategory sysStandardCategory)
    {
        //sysStandardCategory.setId(UUID.randomUUID().toString());
        sysStandardCategory.setCreateBy(SecurityUtils.getUsername());
        sysStandardCategory.setCreateTime(DateUtils.getNowDate());
        return sysStandardCategoryMapper.insertSysStandardCategory(sysStandardCategory);
    }
 
    /**
     * 修改category
     * 
     * @param sysStandardCategory category
     * @return 结果
     */
    @Override
    public int updateSysStandardCategory(SysStandardCategory sysStandardCategory)
    {
        sysStandardCategory.setUpdateBy(SecurityUtils.getUsername());
        sysStandardCategory.setUpdateTime(DateUtils.getNowDate());
        return sysStandardCategoryMapper.updateSysStandardCategory(sysStandardCategory);
    }
 
    /**
     * 批量删除category
     * 
     * @param ids 需要删除的categoryID
     * @return 结果
     */
    @Override
    public int deleteSysStandardCategoryByIds(String[] ids)
    {
        return sysStandardCategoryMapper.deleteSysStandardCategoryByIds(ids);
    }
 
    /**
     * 删除category信息
     * 
     * @param id categoryID
     * @return 结果
     */
    @Override
    public int deleteSysStandardCategoryById(String id)
    {
        return sysStandardCategoryMapper.deleteSysStandardCategoryById(id);
    }
}