mirror of
https://gitee.com/mmsAdmin/mms
synced 2025-12-07 01:18:23 +08:00
首页接口
This commit is contained in:
parent
a30152797e
commit
d6dbcdc7b7
@ -5,6 +5,7 @@ import cn.hutool.core.date.DateField;
|
|||||||
import cn.hutool.core.date.DateRange;
|
import cn.hutool.core.date.DateRange;
|
||||||
import cn.hutool.core.date.DateTime;
|
import cn.hutool.core.date.DateTime;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.sxpcwlkj.MmsAdminApplication;
|
||||||
import com.sxpcwlkj.authority.LoginObject;
|
import com.sxpcwlkj.authority.LoginObject;
|
||||||
import com.sxpcwlkj.common.code.controller.BaseController;
|
import com.sxpcwlkj.common.code.controller.BaseController;
|
||||||
import com.sxpcwlkj.common.utils.R;
|
import com.sxpcwlkj.common.utils.R;
|
||||||
@ -12,6 +13,7 @@ import com.sxpcwlkj.system.entity.vo.SysConfigVo;
|
|||||||
import com.sxpcwlkj.system.entity.vo.SysFunctionVo;
|
import com.sxpcwlkj.system.entity.vo.SysFunctionVo;
|
||||||
import com.sxpcwlkj.system.service.SysConfigService;
|
import com.sxpcwlkj.system.service.SysConfigService;
|
||||||
import com.sxpcwlkj.system.service.SysFunctionService;
|
import com.sxpcwlkj.system.service.SysFunctionService;
|
||||||
|
import com.sxpcwlkj.system.service.SysNoticeService;
|
||||||
import com.sxpcwlkj.system.service.SysUserService;
|
import com.sxpcwlkj.system.service.SysUserService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@ -35,6 +37,8 @@ public class HomeController extends BaseController {
|
|||||||
private final SysUserService sysUserService;
|
private final SysUserService sysUserService;
|
||||||
private final SysFunctionService functionService;
|
private final SysFunctionService functionService;
|
||||||
private final SysConfigService configService;
|
private final SysConfigService configService;
|
||||||
|
private final MmsAdminApplication mmsAdminApplication;
|
||||||
|
private final SysNoticeService sysNoticeService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 控制台默认数据
|
* 控制台默认数据
|
||||||
@ -51,6 +55,10 @@ public class HomeController extends BaseController {
|
|||||||
map.put("fastList",fastList);
|
map.put("fastList",fastList);
|
||||||
List<SysConfigVo> eventList = configService.selectEventList(12);
|
List<SysConfigVo> eventList = configService.selectEventList(12);
|
||||||
map.put("eventList",eventList);
|
map.put("eventList",eventList);
|
||||||
|
map.put("systemInfo",mmsAdminApplication);
|
||||||
|
map.put("userTool",sysUserService.selectTool());
|
||||||
|
map.put("newsTool",sysNoticeService.selectTool());
|
||||||
|
map.put("task","0/0");
|
||||||
return R.success(map);
|
return R.success(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,4 +22,6 @@ public interface SysNoticeService extends BaseService<SysNotice, SysNoticeVo, Sy
|
|||||||
* @return true:成功 false :失败
|
* @return true:成功 false :失败
|
||||||
*/
|
*/
|
||||||
Boolean imports(Set<SysNoticeExport> list);
|
Boolean imports(Set<SysNoticeExport> list);
|
||||||
|
|
||||||
|
Long selectTool();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -182,4 +182,6 @@ public interface SysUserService {
|
|||||||
* @return true:成功 false :失败
|
* @return true:成功 false :失败
|
||||||
*/
|
*/
|
||||||
boolean bindingOpenId(String openId);
|
boolean bindingOpenId(String openId);
|
||||||
|
|
||||||
|
Long selectTool();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -95,4 +95,9 @@ public class SysNoticeServiceImpl extends BaseServiceImpl<SysNotice, SysNoticeVo
|
|||||||
public Boolean imports(Set<SysNoticeExport> list) {
|
public Boolean imports(Set<SysNoticeExport> list) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long selectTool() {
|
||||||
|
return baseMapper.selectCount(new LambdaQueryWrapper<SysNotice>().eq(SysNotice::getStatus,0));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -445,6 +445,11 @@ public class SysUserServiceImpl implements SysUserService {
|
|||||||
return baseMapper.update(null, new LambdaUpdateWrapper<SysUser>().set(SysUser::getWxOpenid, openId).eq(SysUser::getUserId, LoginObject.getLoginId())) > 0;
|
return baseMapper.update(null, new LambdaUpdateWrapper<SysUser>().set(SysUser::getWxOpenid, openId).eq(SysUser::getUserId, LoginObject.getLoginId())) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long selectTool() {
|
||||||
|
return baseMapper.selectCount(new LambdaQueryWrapper<SysUser>().eq(SysUser::getStatus, 0));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AdminMenuTree> getAdminMenuTree(String userId) {
|
public List<AdminMenuTree> getAdminMenuTree(String userId) {
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user