parent
c157f2497b
commit
8cabe4c8de
@ -0,0 +1,87 @@
|
||||
|
||||
package com.service.impl;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.dao.CommonDao;
|
||||
import com.service.CommonService;
|
||||
|
||||
|
||||
/**
|
||||
* 系统用户
|
||||
*/
|
||||
|
||||
@Service("commonService")
|
||||
public class CommonServiceImpl implements CommonService {
|
||||
|
||||
@Autowired
|
||||
private CommonDao commonDao;
|
||||
//核心作用:作为系统公共功能的执行者,处理不特定于某个模块的通用操作
|
||||
//设计特点:
|
||||
//1.使用 Map<String, Object> 作为通用参数容器 → 适配各种业务场景
|
||||
//2.所有方法直接调用 CommonDao → 实现逻辑与数据访问分离
|
||||
//3.无业务实体绑定 → 真正的跨模块服务
|
||||
|
||||
@Override
|
||||
public List<String> getOption(Map<String, Object> params) {
|
||||
return commonDao.getOption(params);
|
||||
}
|
||||
//通用选项获取
|
||||
//作用:获取下拉框/单选组等UI组件的数据源
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getFollowByOption(Map<String, Object> params) {
|
||||
//关联数据查询
|
||||
//根据用户ID获取关联的快递信息
|
||||
return commonDao.getFollowByOption(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sh(Map<String, Object> params) {
|
||||
commonDao.sh(params);
|
||||
}
|
||||
//审核功能
|
||||
//作用:执行数据审核状态变更
|
||||
|
||||
@Override
|
||||
public int remindCount(Map<String, Object> params) {
|
||||
return commonDao.remindCount(params);
|
||||
}
|
||||
//待办提醒统计
|
||||
//作用:获取当前用户的待处理事项数量
|
||||
|
||||
@Override
|
||||
public Map<String, Object> selectCal(Map<String, Object> params) {
|
||||
return commonDao.selectCal(params);
|
||||
}
|
||||
//日历数据查询
|
||||
//作用:获取日历视图所需数据
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> selectGroup(Map<String, Object> params) {
|
||||
//分组统计
|
||||
//作用:执行 GROUP BY 数据统计
|
||||
return commonDao.selectGroup(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> selectValue(Map<String, Object> params) {
|
||||
return commonDao.selectValue(params);
|
||||
}
|
||||
//键值对查询
|
||||
//作用:获取简单的键值对列表
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> selectTimeStatValue(Map<String, Object> params) {
|
||||
//时间维度统计
|
||||
//作用:按时间维度(日/周/月)统计数据
|
||||
|
||||
return commonDao.selectTimeStatValue(params);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in new issue