whycxzp
2023-08-11 edf5ff84c8e93f234cc7f360c123fd70848bc32f
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
package com.whyc.service;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.whyc.mapper.AppAlmParamMapper;
import com.whyc.pojo.AppAlmParam;
import com.whyc.pojo.PageParam;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
 
@Service
 
public class AppAlmParamService {
 
    @Resource
    private AppAlmParamMapper mapper;
 
 
    public Map<Integer, List<AppAlmParam>> getAllList(int categoryId) {
        QueryWrapper<AppAlmParam> wrapper = Wrappers.query();
        wrapper.eq("alm_category",categoryId);
        List<AppAlmParam> pageParamList = mapper.selectList(wrapper);
        return pageParamList.stream().collect(Collectors.groupingBy(AppAlmParam::getAlmAutoClearEn));
    }
 
    public void updateList(List<AppAlmParam> paramList, int operationFlag) {
        //添加
        mapper.updateList(paramList,operationFlag);
    }
}