|
|
|
@ -1,11 +1,18 @@
|
|
|
|
|
package com.ruoyi.database.service.impl;
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
import com.ruoyi.database.domain.MetaImpUserModelInfo;
|
|
|
|
|
import com.ruoyi.database.service.MetaImpUserModelInfoService;
|
|
|
|
|
import com.ruoyi.database.mapper.MetaImpUserModelInfoMapper;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @author 28758
|
|
|
|
|
* @description 针对表【meta_imp_user_model_info(?ص???Ԥ??ģ????Ϣ?)】的数据库操作Service实现
|
|
|
|
@ -15,6 +22,23 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
public class MetaImpUserModelInfoServiceImpl extends ServiceImpl<MetaImpUserModelInfoMapper, MetaImpUserModelInfo>
|
|
|
|
|
implements MetaImpUserModelInfoService{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private MetaImpUserModelInfoMapper metaImpUserModelInfoMapper;
|
|
|
|
|
|
|
|
|
|
public Map<String, Object> groupAndCountByField() {
|
|
|
|
|
QueryWrapper<MetaImpUserModelInfo> queryWrapper = Wrappers.query();
|
|
|
|
|
queryWrapper.groupBy("imp_user_sub_type");
|
|
|
|
|
List<MetaImpUserModelInfo> metaImpUserModelInfos = metaImpUserModelInfoMapper.selectList(queryWrapper);
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
|
for (MetaImpUserModelInfo metaImpUserModelInfo:metaImpUserModelInfos){
|
|
|
|
|
QueryWrapper<MetaImpUserModelInfo> wrapper = new QueryWrapper<>();
|
|
|
|
|
wrapper.eq("imp_user_sub_type",metaImpUserModelInfo.getImpUserSubType());
|
|
|
|
|
Integer integer = metaImpUserModelInfoMapper.selectCount(wrapper);
|
|
|
|
|
map.put(metaImpUserModelInfo.getImpUserSubTypeCn(),integer);
|
|
|
|
|
}
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|