935090232@qq.com
2022-02-17 94f76200c0ac4d87e73afa4895f6088bfb02b6b2
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
package com.matrix.system.hive.service;
 
import cn.hutool.json.JSONUtil;
import com.matrix.system.hive.bean.AchieveRule;
import com.matrix.system.hive.dao.AchieveRuleDao;
import com.matrix.system.hiveErp.pojo.AchieveRuleItem;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
 
/**
 * 业绩规则服务
 * @author JIANGYOUYAO
 * @date 2021/6/3 0003
 */
@Service
@AllArgsConstructor
public class AchieveRuleService {
 
    AchieveRuleDao achieveRuleDao;
 
 
    /**
     * 根据id查询 AchieveRule
     * @param id
     * @return
     */
    public AchieveRule selectById(Long id){
        AchieveRule achieveRule = achieveRuleDao.selectById(id);
        achieveRule.setRuleItemList(JSONUtil.toList(JSONUtil.parseArray(achieveRule.getRules()), AchieveRuleItem.class));
        return achieveRule;
    }
 
}