7/18
This commit is contained in:
@@ -53,10 +53,10 @@ public class SysRoleRest {
|
|||||||
|
|
||||||
|
|
||||||
@ApiOperation("查询所有的角色数据,并根据用户sid查询被选中的角色")
|
@ApiOperation("查询所有的角色数据,并根据用户sid查询被选中的角色")
|
||||||
@PostMapping("/listAllByUserSid/{userSid}")
|
@PostMapping("/listAllByUserSid/{userSid}/{orgSid}")
|
||||||
public ResultBean<List<SysRoleVo>> listAllByUserSid(@PathVariable("userSid") String userSid){
|
public ResultBean<List<SysRoleVo>> listAllByUserSid(@PathVariable("userSid") String userSid,@PathVariable("orgSid") String orgSid){
|
||||||
ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail();
|
||||||
List<SysRoleVo> list = sysRoleService.listAllByUserSid(userSid);
|
List<SysRoleVo> list = sysRoleService.listAllByUserSid(userSid,orgSid);
|
||||||
return rb.success().setData(list);
|
return rb.success().setData(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import com.yxt.common.base.utils.*;
|
|||||||
import com.yxt.common.core.query.PagerQuery;
|
import com.yxt.common.core.query.PagerQuery;
|
||||||
import com.yxt.common.core.result.ResultBean;
|
import com.yxt.common.core.result.ResultBean;
|
||||||
import com.yxt.common.core.vo.PagerVo;
|
import com.yxt.common.core.vo.PagerVo;
|
||||||
|
import com.yxt.portal.biz.sysmenu.SysMenu;
|
||||||
|
import com.yxt.portal.biz.sysmenu.SysMenuService;
|
||||||
import com.yxt.portal.biz.sysorganization.SysOrganization;
|
import com.yxt.portal.biz.sysorganization.SysOrganization;
|
||||||
import com.yxt.portal.biz.sysorganization.SysOrganizationService;
|
import com.yxt.portal.biz.sysorganization.SysOrganizationService;
|
||||||
import com.yxt.portal.biz.syspost.SysPost;
|
import com.yxt.portal.biz.syspost.SysPost;
|
||||||
@@ -15,6 +17,7 @@ import com.yxt.portal.biz.syspost.SysPostService;
|
|||||||
import com.yxt.portal.biz.sysrole.SysRole;
|
import com.yxt.portal.biz.sysrole.SysRole;
|
||||||
import com.yxt.portal.biz.sysrole.SysRoleDto;
|
import com.yxt.portal.biz.sysrole.SysRoleDto;
|
||||||
import com.yxt.portal.biz.sysrole.SysRoleService;
|
import com.yxt.portal.biz.sysrole.SysRoleService;
|
||||||
|
import com.yxt.portal.biz.sysroleauthorize.SysRoleAuthorize;
|
||||||
import com.yxt.portal.biz.sysroleauthorize.SysRoleAuthorizeService;
|
import com.yxt.portal.biz.sysroleauthorize.SysRoleAuthorizeService;
|
||||||
import com.yxt.portal.biz.sysstaffinfo.SysStaffinfo;
|
import com.yxt.portal.biz.sysstaffinfo.SysStaffinfo;
|
||||||
import com.yxt.portal.biz.sysstaffinfo.SysStaffinfoService;
|
import com.yxt.portal.biz.sysstaffinfo.SysStaffinfoService;
|
||||||
@@ -81,6 +84,8 @@ public class SysUserRest {
|
|||||||
private SysUserRoleService sysUserRoleService;
|
private SysUserRoleService sysUserRoleService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysRoleAuthorizeService sysRoleAuthorizeService;
|
private SysRoleAuthorizeService sysRoleAuthorizeService;
|
||||||
|
@Autowired
|
||||||
|
private SysMenuService sysMenuService;
|
||||||
// @Autowired
|
// @Autowired
|
||||||
// private SystemLogService systemLogService;
|
// private SystemLogService systemLogService;
|
||||||
// 定义点选文字图片验证码允许的误差值
|
// 定义点选文字图片验证码允许的误差值
|
||||||
@@ -437,6 +442,21 @@ public class SysUserRest {
|
|||||||
}
|
}
|
||||||
// 根据用户信息查询用户的角色信息
|
// 根据用户信息查询用户的角色信息
|
||||||
List<SysStaffOrgVo>sysStaffOrgVos= sysStaffOrgService.fetchOrgsByStaffSid(user.getStaffSid());
|
List<SysStaffOrgVo>sysStaffOrgVos= sysStaffOrgService.fetchOrgsByStaffSid(user.getStaffSid());
|
||||||
|
for (SysStaffOrgVo sysStaffOrgVo : sysStaffOrgVos) {
|
||||||
|
SysOrganization sysOrganizationOne = sysOrganizationService.fetchBySid(sysStaffOrgVo.getOrgSid());
|
||||||
|
if (sysOrganizationOne != null) {
|
||||||
|
String psid = sysOrganizationOne.getPsid();
|
||||||
|
if(com.yxt.common.base.utils.StringUtils.isNotNull(psid)){
|
||||||
|
if(!psid.equals("0")){
|
||||||
|
String name = sysOrganizationService.fetchBySid(psid).getName();
|
||||||
|
sysStaffOrgVo.setOrgName(name + "-" + sysStaffOrgVo.getOrgName());
|
||||||
|
}else{
|
||||||
|
sysStaffOrgVo.setOrgName(sysStaffOrgVo.getOrgName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SysUserVo userInfoOneVo = new SysUserVo();
|
SysUserVo userInfoOneVo = new SysUserVo();
|
||||||
// if(sysStaffOrgVos.size()>1){
|
// if(sysStaffOrgVos.size()>1){
|
||||||
// userInfoOneVo.setSid(user.getSid());
|
// userInfoOneVo.setSid(user.getSid());
|
||||||
@@ -525,6 +545,8 @@ public class SysUserRest {
|
|||||||
su.setUserName(mobile);
|
su.setUserName(mobile);
|
||||||
su.setPassword(md5);
|
su.setPassword(md5);
|
||||||
su.setIsAdmin("1");
|
su.setIsAdmin("1");
|
||||||
|
su.setUserType(1);
|
||||||
|
su.setAccountType("1");
|
||||||
sysUserService.save(su);
|
sysUserService.save(su);
|
||||||
ssi.setName(name+"系统管理员");
|
ssi.setName(name+"系统管理员");
|
||||||
ssi.setMobile(mobile);
|
ssi.setMobile(mobile);
|
||||||
@@ -535,6 +557,7 @@ public class SysUserRest {
|
|||||||
}
|
}
|
||||||
return new ResultBean<>().success().setData(userInfoOneVo);
|
return new ResultBean<>().success().setData(userInfoOneVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/bindOrganization")
|
@PostMapping("/bindOrganization")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@ApiOperation(value = "绑定组织")
|
@ApiOperation(value = "绑定组织")
|
||||||
@@ -545,6 +568,7 @@ public class SysUserRest {
|
|||||||
sysOrg.setName(dto.getCompanyName());
|
sysOrg.setName(dto.getCompanyName());
|
||||||
sysOrg.setLinkPhone(dto.getContacts());
|
sysOrg.setLinkPhone(dto.getContacts());
|
||||||
sysOrg.setOrgSidPath(sysOrg.getSid());
|
sysOrg.setOrgSidPath(sysOrg.getSid());
|
||||||
|
sysOrg.setPsid("0");
|
||||||
sysOrganizationService.save(sysOrg);
|
sysOrganizationService.save(sysOrg);
|
||||||
|
|
||||||
SysStaffOrg sysStaffOrg=new SysStaffOrg();
|
SysStaffOrg sysStaffOrg=new SysStaffOrg();
|
||||||
@@ -561,6 +585,16 @@ public class SysUserRest {
|
|||||||
sysRole.setType(1);
|
sysRole.setType(1);
|
||||||
sysRole.setOrgSid(sysOrg.getSid());
|
sysRole.setOrgSid(sysOrg.getSid());
|
||||||
sysRoleService.save(sysRole);
|
sysRoleService.save(sysRole);
|
||||||
|
// List<SysMenu> sysMenus=sysMenuService.list(new QueryWrapper<SysMenu>().eq("sourceSid",dto.getSourceSid()));
|
||||||
|
List<SysMenu> sysMenus=sysMenuService.list(new QueryWrapper<SysMenu>().eq("sourceSid","d936f1ba-03c3-11ec-bf08-48452053aa33"));
|
||||||
|
List<SysRoleAuthorize> sysRoleAuthorizes=new ArrayList<>();
|
||||||
|
for (SysMenu sysMenu : sysMenus) {
|
||||||
|
SysRoleAuthorize sysRoleAuthorize=new SysRoleAuthorize();
|
||||||
|
sysRoleAuthorize.setRoleSid(sysRole.getSid());
|
||||||
|
sysRoleAuthorize.setMenuSid(sysMenu.getSid());
|
||||||
|
sysRoleAuthorizes.add(sysRoleAuthorize);
|
||||||
|
}
|
||||||
|
sysRoleAuthorizeService.saveBatch(sysRoleAuthorizes);
|
||||||
//
|
//
|
||||||
SysUserRole sysUserRole=new SysUserRole();
|
SysUserRole sysUserRole=new SysUserRole();
|
||||||
sysUserRole.setRoleSid(sysRole.getSid());
|
sysUserRole.setRoleSid(sysRole.getSid());
|
||||||
|
|||||||
113
src/main/java/com/yxt/portal/apiwx/WxIndexRest.java
Normal file
113
src/main/java/com/yxt/portal/apiwx/WxIndexRest.java
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
//package com.yxt.portal.apiwx;
|
||||||
|
//
|
||||||
|
//import com.yxt.common.base.config.component.FileUploadComponent;
|
||||||
|
//import com.yxt.common.base.utils.StringUtils;
|
||||||
|
//import com.yxt.common.core.result.ResultBean;
|
||||||
|
//import com.yxt.portal.biz.banner.BannerService;
|
||||||
|
//import com.yxt.portal.biz.banner.BannerVo;
|
||||||
|
//import com.yxt.portal.biz.index.WxIndexService;
|
||||||
|
//import com.yxt.portal.biz.index.WxIndexVo;
|
||||||
|
//import com.yxt.portal.biz.index.WxSubsetVersionVo;
|
||||||
|
//import com.yxt.portal.biz.sysnotice.NoticeAppListVo;
|
||||||
|
//import com.yxt.portal.biz.sysnotice.SysNoticeService;
|
||||||
|
//import com.yxt.portal.biz.sysuser.SysUserService;
|
||||||
|
//import io.swagger.annotations.Api;
|
||||||
|
//import io.swagger.annotations.ApiOperation;
|
||||||
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
//import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
//import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
//import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
//import org.springframework.web.bind.annotation.RestController;
|
||||||
|
//
|
||||||
|
//import java.util.*;
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * @Description
|
||||||
|
// * @Author liuguohui
|
||||||
|
// * @Date 2021/9/26
|
||||||
|
// */
|
||||||
|
//@Api(tags = "Wx首页")
|
||||||
|
//@RestController
|
||||||
|
//@RequestMapping("v1/index")
|
||||||
|
//public class WxIndexRest{
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// @Autowired
|
||||||
|
// private SysUserService sysUserService;
|
||||||
|
//
|
||||||
|
// @Autowired
|
||||||
|
// private FileUploadComponent fileUploadComponent;
|
||||||
|
//
|
||||||
|
// private String LINKSID = "147694bb-c765-4426-8f67-d19a66585f31";
|
||||||
|
//
|
||||||
|
// @Autowired
|
||||||
|
// private WxIndexService wxIndexService;
|
||||||
|
// @Autowired
|
||||||
|
// private SysNoticeService sysNoticeService;
|
||||||
|
// @Autowired
|
||||||
|
// private BannerService bannerService;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// @ApiOperation(value = "App首页 ")
|
||||||
|
// @ResponseBody
|
||||||
|
// @GetMapping("/index")
|
||||||
|
// public ResultBean<WxIndexVo> index(String userSid) {
|
||||||
|
// ResultBean<WxIndexVo> rb = ResultBean.fireFail();
|
||||||
|
// WxIndexVo WxVo = new WxIndexVo();
|
||||||
|
// Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
// WxVo.setUserSid(userSid);
|
||||||
|
// // 待办数量
|
||||||
|
// WxVo.setNotWorkNum(0);
|
||||||
|
// // 待阅数量
|
||||||
|
// WxVo.setNotReadNum(0);
|
||||||
|
//
|
||||||
|
// // 通知公告列表
|
||||||
|
// /* FormNoticeQuery formNoticeQuery = new FormNoticeQuery();
|
||||||
|
// PagerQuery<FormNoticeQuery> formNoticeQueryPage = new PagerQuery<>();
|
||||||
|
// formNoticeQueryPage.setParams(formNoticeQuery);
|
||||||
|
// formNoticeQueryPage.getParams().setClosingDate(DateUtils.dateConvertStr(new Date()));
|
||||||
|
// //取前6条
|
||||||
|
// formNoticeQueryPage.setSize(6);
|
||||||
|
// List<FormNoticeVo> formNoticeVoList = formNoticeService.pageList(formNoticeQueryPage).getRecords();*/
|
||||||
|
// ResultBean<List<NoticeAppListVo>> listResultBean = sysNoticeService.getAppDetails();
|
||||||
|
// List<NoticeAppListVo> sysNoticeListVoList = listResultBean.getData();
|
||||||
|
// sysNoticeListVoList.removeAll(Collections.singleton(null));
|
||||||
|
// map.put("tips", sysNoticeListVoList);
|
||||||
|
//
|
||||||
|
// // 子应用列表
|
||||||
|
// String linkSid = LINKSID;
|
||||||
|
// String path = fileUploadComponent.getUrlPrefix();
|
||||||
|
// //查询用户的权限
|
||||||
|
// //查询该用户是否有权限
|
||||||
|
//// List<String> stringList = sysMobileMenuRoleService.selectWxSidList(userSid);
|
||||||
|
// List<AppSubsetVersionVo> subsetVersionVoList = new ArrayList<>();
|
||||||
|
// AppSubsetVersionVo vo=new WxSubsetVersionVo();
|
||||||
|
// vo.setAppName("企业微信");
|
||||||
|
// vo.setCornerNum("");
|
||||||
|
// vo.setIconUrl("企业微信");
|
||||||
|
// vo.setAppSid("");
|
||||||
|
// subsetVersionVoList.add(vo);
|
||||||
|
//// if (!stringList.isEmpty()) {
|
||||||
|
//// subsetVersionVoList = WxSubsetVersionService.selectVersionListOne(linkSid, path, stringList);
|
||||||
|
//// subsetVersionVoList.stream().forEach(item -> {
|
||||||
|
//// item.setCornerNum("");
|
||||||
|
//// });
|
||||||
|
//// }
|
||||||
|
//
|
||||||
|
// map.put("apps", subsetVersionVoList);
|
||||||
|
//
|
||||||
|
// // 轮播图
|
||||||
|
// List<BannerVo> bannerList = bannerService.selectBannerList();
|
||||||
|
// for (BannerVo bannerVo : bannerList) {
|
||||||
|
// String picUrl = fileUploadComponent.getUrlPrefix() + bannerVo.getPicUrl();
|
||||||
|
// String url = fileUploadComponent.getUrlPrefix() + bannerVo.getUrl();
|
||||||
|
// bannerVo.setPicUrl(picUrl);
|
||||||
|
// bannerVo.setUrl(url);
|
||||||
|
// }
|
||||||
|
// map.put("banners", bannerList);
|
||||||
|
//
|
||||||
|
// WxVo.setMapExtra(map);
|
||||||
|
// return rb.setData(WxVo).success();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//}
|
||||||
37
src/main/java/com/yxt/portal/biz/banner/Banner.java
Normal file
37
src/main/java/com/yxt/portal/biz/banner/Banner.java
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
package com.yxt.portal.biz.banner;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.yxt.common.core.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Project: anrui-portal(门户建设) <br/>
|
||||||
|
* File: Banner.java <br/>
|
||||||
|
* Class: com.yxt.anrui.portal.api.banner.Banner <br/>
|
||||||
|
* Description: banner. <br/>
|
||||||
|
* Copyright: Copyright (c) 2011 <br/>
|
||||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||||
|
* Makedate: 2021-09-26 09:50:25 <br/>
|
||||||
|
*
|
||||||
|
* @author liupopo
|
||||||
|
* @version 1.0
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@ApiModel(value = "banner", description = "banner")
|
||||||
|
@TableName("banner")
|
||||||
|
@Data
|
||||||
|
public class Banner extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("地址")
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
@ApiModelProperty("图片")
|
||||||
|
private String picUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("标题")
|
||||||
|
private String title;
|
||||||
|
}
|
||||||
35
src/main/java/com/yxt/portal/biz/banner/BannerDto.java
Normal file
35
src/main/java/com/yxt/portal/biz/banner/BannerDto.java
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
package com.yxt.portal.biz.banner;
|
||||||
|
|
||||||
|
|
||||||
|
import com.yxt.common.core.dto.Dto;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Project: anrui-portal(门户建设) <br/>
|
||||||
|
* File: BannerDto.java <br/>
|
||||||
|
* Class: com.yxt.anrui.portal.api.banner.BannerDto <br/>
|
||||||
|
* Description: banner 数据传输对象. <br/>
|
||||||
|
* Copyright: Copyright (c) 2011 <br/>
|
||||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||||
|
* Makedate: 2021-09-26 09:50:25 <br/>
|
||||||
|
*
|
||||||
|
* @author liupopo
|
||||||
|
* @version 1.0
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@ApiModel(value = "banner 数据传输对象", description = "banner 数据传输对象")
|
||||||
|
@Data
|
||||||
|
public class BannerDto implements Dto {
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("地址")
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
@ApiModelProperty("图片")
|
||||||
|
private String picUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("标题")
|
||||||
|
private String title;
|
||||||
|
}
|
||||||
26
src/main/java/com/yxt/portal/biz/banner/BannerMapper.java
Normal file
26
src/main/java/com/yxt/portal/biz/banner/BannerMapper.java
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
package com.yxt.portal.biz.banner;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Project: anrui-portal(门户建设) <br/>
|
||||||
|
* File: BannerMapper.java <br/>
|
||||||
|
* Class: com.yxt.anrui.portal.biz.banner.BannerMapper <br/>
|
||||||
|
* Description: banner. <br/>
|
||||||
|
* Copyright: Copyright (c) 2011 <br/>
|
||||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||||
|
* Makedate: 2021-09-26 09:50:25 <br/>
|
||||||
|
*
|
||||||
|
* @author liupopo
|
||||||
|
* @version 1.0
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface BannerMapper extends BaseMapper<Banner> {
|
||||||
|
|
||||||
|
public List<BannerVo> bannerVoList();
|
||||||
|
|
||||||
|
}
|
||||||
10
src/main/java/com/yxt/portal/biz/banner/BannerMapper.xml
Normal file
10
src/main/java/com/yxt/portal/biz/banner/BannerMapper.xml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.yxt.portal.biz.banner.BannerMapper">
|
||||||
|
|
||||||
|
<select id="bannerVoList" resultType="com.yxt.portal.biz.banner.BannerVo">
|
||||||
|
SELECT sid, url, picUrl
|
||||||
|
FROM banner
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
35
src/main/java/com/yxt/portal/biz/banner/BannerQuery.java
Normal file
35
src/main/java/com/yxt/portal/biz/banner/BannerQuery.java
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
package com.yxt.portal.biz.banner;
|
||||||
|
|
||||||
|
|
||||||
|
import com.yxt.common.core.query.Query;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Project: anrui-portal(门户建设) <br/>
|
||||||
|
* File: BannerQuery.java <br/>
|
||||||
|
* Class: com.yxt.anrui.portal.api.banner.BannerQuery <br/>
|
||||||
|
* Description: banner 查询条件. <br/>
|
||||||
|
* Copyright: Copyright (c) 2011 <br/>
|
||||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||||
|
* Makedate: 2021-09-26 09:50:25 <br/>
|
||||||
|
*
|
||||||
|
* @author liupopo
|
||||||
|
* @version 1.0
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@ApiModel(value = "banner 查询条件", description = "banner 查询条件")
|
||||||
|
@Data
|
||||||
|
public class BannerQuery implements Query {
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("地址")
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
@ApiModelProperty("图片")
|
||||||
|
private String picUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("标题")
|
||||||
|
private String title;
|
||||||
|
}
|
||||||
38
src/main/java/com/yxt/portal/biz/banner/BannerRest.java
Normal file
38
src/main/java/com/yxt/portal/biz/banner/BannerRest.java
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
package com.yxt.portal.biz.banner;
|
||||||
|
|
||||||
|
import com.yxt.common.core.result.ResultBean;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Project: anrui-portal(门户建设) <br/>
|
||||||
|
* File: BannerFeignFallback.java <br/>
|
||||||
|
* Class: com.yxt.anrui.portal.biz.banner.BannerRest <br/>
|
||||||
|
* Description: banner. <br/>
|
||||||
|
* Copyright: Copyright (c) 2011 <br/>
|
||||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||||
|
* Makedate: 2021-09-26 09:50:25 <br/>
|
||||||
|
*
|
||||||
|
* @author liupopo
|
||||||
|
* @version 1.0
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@Api(tags = "轮播图")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("v1/banner")
|
||||||
|
public class BannerRest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BannerService bannerService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public ResultBean<List<BannerVo>> selectBannerList() {
|
||||||
|
List<BannerVo> bannerVoList = bannerService.selectBannerList();
|
||||||
|
return new ResultBean<List<BannerVo>>().success().setData(bannerVoList);
|
||||||
|
}
|
||||||
|
}
|
||||||
28
src/main/java/com/yxt/portal/biz/banner/BannerService.java
Normal file
28
src/main/java/com/yxt/portal/biz/banner/BannerService.java
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
package com.yxt.portal.biz.banner;
|
||||||
|
|
||||||
|
import com.yxt.common.base.service.MybatisBaseService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Project: anrui-portal(门户建设) <br/>
|
||||||
|
* File: BannerService.java <br/>
|
||||||
|
* Class: com.yxt.anrui.portal.biz.banner.BannerService <br/>
|
||||||
|
* Description: banner 业务逻辑. <br/>
|
||||||
|
* Copyright: Copyright (c) 2011 <br/>
|
||||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||||
|
* Makedate: 2021-09-26 09:50:25 <br/>
|
||||||
|
*
|
||||||
|
* @author liupopo
|
||||||
|
* @version 1.0
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BannerService extends MybatisBaseService<BannerMapper, Banner> {
|
||||||
|
|
||||||
|
public List<BannerVo> selectBannerList() {
|
||||||
|
return baseMapper.bannerVoList();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
34
src/main/java/com/yxt/portal/biz/banner/BannerVo.java
Normal file
34
src/main/java/com/yxt/portal/biz/banner/BannerVo.java
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
package com.yxt.portal.biz.banner;
|
||||||
|
|
||||||
|
|
||||||
|
import com.yxt.common.core.vo.Vo;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Project: anrui-portal(门户建设) <br/>
|
||||||
|
* File: BannerVo.java <br/>
|
||||||
|
* Class: com.yxt.anrui.portal.api.banner.BannerVo <br/>
|
||||||
|
* Description: banner 视图数据对象. <br/>
|
||||||
|
* Copyright: Copyright (c) 2011 <br/>
|
||||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||||
|
* Makedate: 2021-09-26 09:50:25 <br/>
|
||||||
|
*
|
||||||
|
* @author liupopo
|
||||||
|
* @version 1.0
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@ApiModel(value = "banner 视图数据对象", description = "banner 视图数据对象")
|
||||||
|
@Data
|
||||||
|
public class BannerVo implements Vo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "sid")
|
||||||
|
private String sid;
|
||||||
|
|
||||||
|
@ApiModelProperty("地址")
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
@ApiModelProperty("图片")
|
||||||
|
private String picUrl;
|
||||||
|
}
|
||||||
18
src/main/java/com/yxt/portal/biz/index/WxIndexAppNumVo.java
Normal file
18
src/main/java/com/yxt/portal/biz/index/WxIndexAppNumVo.java
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
package com.yxt.portal.biz.index;
|
||||||
|
|
||||||
|
import com.yxt.common.core.vo.Vo;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author dimengzhe
|
||||||
|
* @Date 2022/8/17 14:36
|
||||||
|
* @Description
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WxIndexAppNumVo implements Vo {
|
||||||
|
private static final long serialVersionUID = 8714208618340144189L;
|
||||||
|
|
||||||
|
private String appSid;
|
||||||
|
|
||||||
|
private String cornerNum;
|
||||||
|
}
|
||||||
81
src/main/java/com/yxt/portal/biz/index/WxIndexEnum.java
Normal file
81
src/main/java/com/yxt/portal/biz/index/WxIndexEnum.java
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
package com.yxt.portal.biz.index;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author dimengzhe
|
||||||
|
* @Date 2022/10/26 21:32
|
||||||
|
* @Description
|
||||||
|
*/
|
||||||
|
public class WxIndexEnum {
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public static enum AppVersionSubAppSid {
|
||||||
|
/**
|
||||||
|
* 供应链
|
||||||
|
*/
|
||||||
|
GYL("98ff0724-5df4-4fc7-ab6d-3996e7706acd", "供应链"),
|
||||||
|
|
||||||
|
YW("e25e13b5-f2ed-421f-bdb3-6f2eca2a3028", "业务"),
|
||||||
|
|
||||||
|
FK("fec4e243-491a-11ec-94cd-fa163e0cb33c", "风控");
|
||||||
|
/**
|
||||||
|
* code值
|
||||||
|
*/
|
||||||
|
private final String code;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private final String remarks;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造器
|
||||||
|
*
|
||||||
|
* @param code code值
|
||||||
|
* @param remarks 备注
|
||||||
|
*/
|
||||||
|
private AppVersionSubAppSid(String code, String remarks) {
|
||||||
|
this.code = code;
|
||||||
|
this.remarks = remarks;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public static enum AppMenu {
|
||||||
|
/**
|
||||||
|
* 验车
|
||||||
|
*/
|
||||||
|
YC("1b993770-0f1f-475e-b153-756ac95f09cf", "验车"),
|
||||||
|
YK("25b3dfb2-d3df-47c3-b689-8c38a7785391", "移库"),
|
||||||
|
PK("608e72d3-9f34-4b44-85c4-d6be41de8f76", "盘库"),
|
||||||
|
XJ("ae160247-195e-4f2c-a167-ae50a2e50c81", "巡检"),
|
||||||
|
SC("92659535-38f6-4456-a45a-ab5e9ced3fac", "收车"),
|
||||||
|
HTSH("f4d75ebc-cbab-4c44-bf93-2d38f70c1c15", "合同审核"),
|
||||||
|
JZKHBA("6a80aa48-c988-4880-b0a0-f2a406d8cad5", "价值客户备案"),
|
||||||
|
JFKC("a204a3fa-c8ac-4795-966c-df1d0e131bcf", "家访考察"),
|
||||||
|
FKZLSC("65dc12e0-9213-4364-ae81-18afa9c7e1ee", "放款资料上传"),
|
||||||
|
DYBL("ab7df5a0-9708-48b1-b58a-60d7e024d0a2", "抵押办理"),
|
||||||
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* code值
|
||||||
|
*/
|
||||||
|
private final String code;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private final String remarks;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造器
|
||||||
|
*
|
||||||
|
* @param code code值
|
||||||
|
* @param remarks 备注
|
||||||
|
*/
|
||||||
|
private AppMenu(String code, String remarks) {
|
||||||
|
this.code = code;
|
||||||
|
this.remarks = remarks;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
47
src/main/java/com/yxt/portal/biz/index/WxIndexFeign.java
Normal file
47
src/main/java/com/yxt/portal/biz/index/WxIndexFeign.java
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
package com.yxt.portal.biz.index;
|
||||||
|
|
||||||
|
import com.yxt.common.core.result.ResultBean;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.cloud.openfeign.SpringQueryMap;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Api(tags = "app首页")
|
||||||
|
@FeignClient(
|
||||||
|
contextId = "anrui-portal-AppIndex",
|
||||||
|
name = "anrui-portal",
|
||||||
|
path = "v1/appIndex",
|
||||||
|
fallback = WxIndexFeignFallBack.class)
|
||||||
|
public interface WxIndexFeign {
|
||||||
|
|
||||||
|
@ApiOperation(value = "App首页 ")
|
||||||
|
@ResponseBody
|
||||||
|
@GetMapping("/index")
|
||||||
|
public ResultBean<WxIndexVo> index(@RequestParam("userSid") String userSid);
|
||||||
|
|
||||||
|
@ApiOperation(value = "App首页待办待阅的数量")
|
||||||
|
@ResponseBody
|
||||||
|
@GetMapping("/homeWorkBadge")
|
||||||
|
ResultBean<WxIndexWorkNumVo> selectHomeWorkNum(@RequestParam("userSid") String userSid, @RequestParam("orgPath") String orgPath);
|
||||||
|
|
||||||
|
@ApiOperation(value = "App首页子应用的待办数量")
|
||||||
|
@ResponseBody
|
||||||
|
@GetMapping("/homeAppBadge")
|
||||||
|
ResultBean<List<WxIndexAppNumVo>> selectAppNum(@RequestParam("userSid") String userSid, @RequestParam(value = "orgPath", required = false) String orgPath);
|
||||||
|
|
||||||
|
@ApiOperation(value = "移动端各插件的应用")
|
||||||
|
@ResponseBody
|
||||||
|
@GetMapping("/getBusinessList")
|
||||||
|
ResultBean<List<WxIndexNewVo>> getBusinessList(@RequestParam("userSid") String userSid, @RequestParam("appSid") String appSid, @RequestParam("orgPath")String orgPath);
|
||||||
|
|
||||||
|
@ApiOperation(value = "移动端各插件的应用数量")
|
||||||
|
@ResponseBody
|
||||||
|
@GetMapping("/getBusinessNum")
|
||||||
|
ResultBean<List<WxIndexNumVo>> getBusinessNum(@SpringQueryMap WxIndexNumQuery query);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package com.yxt.portal.biz.index;
|
||||||
|
|
||||||
|
import com.yxt.common.core.result.ResultBean;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author liuguohui
|
||||||
|
* @Date 2021/9/26
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class WxIndexFeignFallBack implements WxIndexFeign {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResultBean<WxIndexVo> index(String userSid) {
|
||||||
|
return new ResultBean<WxIndexVo>().success().setMsg("网站维护,请稍后再试");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResultBean<WxIndexWorkNumVo> selectHomeWorkNum(String userSid, String orgPath) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResultBean<List<WxIndexAppNumVo>> selectAppNum(String userSid, String orgPath) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResultBean<List<WxIndexNewVo>> getBusinessList(String userSid, String appSid, String orgPath) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResultBean<List<WxIndexNumVo>> getBusinessNum(WxIndexNumQuery query) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
33
src/main/java/com/yxt/portal/biz/index/WxIndexNewListVo.java
Normal file
33
src/main/java/com/yxt/portal/biz/index/WxIndexNewListVo.java
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
package com.yxt.portal.biz.index;
|
||||||
|
|
||||||
|
import com.yxt.common.core.vo.Vo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author dimengzhe
|
||||||
|
* @Date 2022/10/26 14:38
|
||||||
|
* @Description
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WxIndexNewListVo implements Vo {
|
||||||
|
private static final long serialVersionUID = -2242568632369452117L;
|
||||||
|
@ApiModelProperty("菜单sid")
|
||||||
|
private String sid;
|
||||||
|
@ApiModelProperty("应用名称")
|
||||||
|
private String name;
|
||||||
|
@ApiModelProperty("图标")
|
||||||
|
private String icon;
|
||||||
|
@ApiModelProperty("待办数量")
|
||||||
|
private String num;
|
||||||
|
|
||||||
|
@ApiModelProperty("跳转参数")
|
||||||
|
private String json;
|
||||||
|
@ApiModelProperty("排序")
|
||||||
|
private String sortNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("跳转路由")
|
||||||
|
private String moduleAction;
|
||||||
|
@ApiModelProperty("分类")
|
||||||
|
private String classification;
|
||||||
|
}
|
||||||
24
src/main/java/com/yxt/portal/biz/index/WxIndexNewVo.java
Normal file
24
src/main/java/com/yxt/portal/biz/index/WxIndexNewVo.java
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
package com.yxt.portal.biz.index;
|
||||||
|
|
||||||
|
import com.yxt.common.core.vo.Vo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author dimengzhe
|
||||||
|
* @Date 2022/10/26 14:37
|
||||||
|
* @Description
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WxIndexNewVo implements Vo {
|
||||||
|
private static final long serialVersionUID = 3045438801481395314L;
|
||||||
|
@ApiModelProperty("应用分组")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
private List<WxIndexNewListVo> apps;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
19
src/main/java/com/yxt/portal/biz/index/WxIndexNumQuery.java
Normal file
19
src/main/java/com/yxt/portal/biz/index/WxIndexNumQuery.java
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
package com.yxt.portal.biz.index;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author dimengzhe
|
||||||
|
* @Date 2022/10/26 17:48
|
||||||
|
* @Description
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WxIndexNumQuery {
|
||||||
|
@ApiModelProperty("用户sid")
|
||||||
|
private String userSid;
|
||||||
|
@ApiModelProperty("组织机构sid")
|
||||||
|
private String orgPath;
|
||||||
|
@ApiModelProperty("appSid")
|
||||||
|
private String appSid;
|
||||||
|
}
|
||||||
19
src/main/java/com/yxt/portal/biz/index/WxIndexNumVo.java
Normal file
19
src/main/java/com/yxt/portal/biz/index/WxIndexNumVo.java
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
package com.yxt.portal.biz.index;
|
||||||
|
|
||||||
|
import com.yxt.common.core.vo.Vo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author dimengzhe
|
||||||
|
* @Date 2022/10/26 17:39
|
||||||
|
* @Description
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WxIndexNumVo implements Vo {
|
||||||
|
private static final long serialVersionUID = -5388012244856879195L;
|
||||||
|
@ApiModelProperty("应用sid")
|
||||||
|
private String sid;
|
||||||
|
@ApiModelProperty("数量")
|
||||||
|
private String num;
|
||||||
|
}
|
||||||
25
src/main/java/com/yxt/portal/biz/index/WxIndexQuery.java
Normal file
25
src/main/java/com/yxt/portal/biz/index/WxIndexQuery.java
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
package com.yxt.portal.biz.index;
|
||||||
|
|
||||||
|
import com.yxt.common.core.query.Query;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author liuguohui
|
||||||
|
* @Date 2021/9/26
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WxIndexQuery implements Query {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -6256204643003327901L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户sid", required = true)
|
||||||
|
@NotBlank(message = "用户sid不能为空")
|
||||||
|
private String userSid;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "linkSid")
|
||||||
|
private String linkSid="147694bb-c765-4426-8f67-d19a66585f31";
|
||||||
|
}
|
||||||
178
src/main/java/com/yxt/portal/biz/index/WxIndexService.java
Normal file
178
src/main/java/com/yxt/portal/biz/index/WxIndexService.java
Normal file
@@ -0,0 +1,178 @@
|
|||||||
|
//package com.yxt.portal.biz.index;
|
||||||
|
//
|
||||||
|
//import cn.hutool.core.bean.BeanUtil;
|
||||||
|
//import com.alibaba.fastjson.JSON;
|
||||||
|
//import com.alibaba.fastjson.JSONObject;
|
||||||
|
//import com.yxt.common.base.utils.StringUtils;
|
||||||
|
//import com.yxt.common.core.result.ResultBean;
|
||||||
|
//import com.yxt.portal.biz.sysuser.SysUserService;
|
||||||
|
//import com.yxt.portal.biz.sysuserrole.SysUserRoleService;
|
||||||
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
//import org.springframework.stereotype.Service;
|
||||||
|
//
|
||||||
|
//import java.util.ArrayList;
|
||||||
|
//import java.util.HashMap;
|
||||||
|
//import java.util.List;
|
||||||
|
//import java.util.Map;
|
||||||
|
//import java.util.stream.Collectors;
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * @Author dimengzhe
|
||||||
|
// * @Date 2022/10/26 14:43
|
||||||
|
// * @Description
|
||||||
|
// */
|
||||||
|
//@Service
|
||||||
|
//public class WxIndexService {
|
||||||
|
// @Autowired
|
||||||
|
// private SysUserRoleService sysUserRoleService;
|
||||||
|
// @Autowired
|
||||||
|
// private SysUserService sysUserService;
|
||||||
|
//
|
||||||
|
// public ResultBean<List<WxIndexNewVo>> getBusinessList(String userSid, String WxSid, String orgPath) {
|
||||||
|
// ResultBean<List<WxIndexNewVo>> rb = ResultBean.fireFail();
|
||||||
|
// if (StringUtils.isBlank(userSid) || StringUtils.isBlank(WxSid)) {
|
||||||
|
// return rb.setData(new ArrayList<>());
|
||||||
|
// }
|
||||||
|
// //查询该用户的所有的角色
|
||||||
|
// List<SysUserRoleVo> userRole = sysUserRoleService.selectByUserSid(userSid);
|
||||||
|
// List<String> roleSids = userRole.stream().map(s -> s.getRoleSid()).collect(Collectors.toList());
|
||||||
|
// //根据WxSid和角色sid查询移动端菜单
|
||||||
|
// List<WxIndexNewVo> WxIndexNewVos = getWx(roleSids, WxSid);
|
||||||
|
// for (WxIndexNewVo vo : WxIndexNewVos) {
|
||||||
|
// List<WxIndexNewListVo> Wxs = vo.getWxs();
|
||||||
|
// if(Wxs != null && Wxs.size()>0){
|
||||||
|
// for (WxIndexNewListVo vv : Wxs) {
|
||||||
|
// if ("移库".equals(vv.getName()) || "简易订单".equals(vv.getName()) || "销售订单".equals(vv.getName())) {
|
||||||
|
// ResultBean resultBean = sysUserService.selectWxHaveMessage(vv.getSid(), orgPath);
|
||||||
|
// String json = vv.getJson();
|
||||||
|
// if (StringUtils.isNotBlank(json)) {
|
||||||
|
// //将字符串json转为map
|
||||||
|
// Map<String, Object> map = JSON.parseObject(json);
|
||||||
|
// if (resultBean.getSuccess()) {
|
||||||
|
// map.put("banCreate", false);
|
||||||
|
// } else {
|
||||||
|
// map.put("reason", resultBean.getMsg());
|
||||||
|
// map.put("banCreate", true);
|
||||||
|
// }
|
||||||
|
// vv.setJson(JSONObject.toJSONString(map));
|
||||||
|
// } else {
|
||||||
|
// Map<String, Object> map = new HashMap<>();
|
||||||
|
// if (resultBean.getSuccess()) {
|
||||||
|
// map.put("banCreate", false);
|
||||||
|
// } else {
|
||||||
|
// map.put("reason", resultBean.getMsg());
|
||||||
|
// map.put("banCreate", true);
|
||||||
|
// }
|
||||||
|
// vv.setJson(JSONObject.toJSONString(map));
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// return rb.success().setData(WxIndexNewVos);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// private List<WxIndexNewVo> getWx(List<String> roleSids, String WxSid) {
|
||||||
|
// return sysMobileMenuRoleService.getWx(roleSids, WxSid);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public ResultBean<List<WxIndexNumVo>> getBusinessNum(WxIndexNumQuery query) {
|
||||||
|
// ResultBean<List<WxIndexNumVo>> rb = ResultBean.fireFail();
|
||||||
|
// String WxSid = query.getWxSid();
|
||||||
|
// String userSid = query.getUserSid();
|
||||||
|
// String orgPath = query.getOrgPath();
|
||||||
|
// WxToDoNumQuery WxToDoNumQuery = new WxToDoNumQuery();
|
||||||
|
// WxToDoNumQuery.setUserSid(userSid);
|
||||||
|
// WxToDoNumQuery.setOrgPath(orgPath);
|
||||||
|
// CommonToDoNumQuery commonToDoNumQuery = new CommonToDoNumQuery();
|
||||||
|
// BusToDoNumQuery busToDoNumQuery = new BusToDoNumQuery();
|
||||||
|
// RiskToDoNumQuery riskToDoNumQuery = new RiskToDoNumQuery();
|
||||||
|
// BeanUtil.copyProperties(WxToDoNumQuery, commonToDoNumQuery);
|
||||||
|
// BeanUtil.copyProperties(WxToDoNumQuery, busToDoNumQuery);
|
||||||
|
// BeanUtil.copyProperties(WxToDoNumQuery, riskToDoNumQuery);
|
||||||
|
// //根据WxSid查询菜单的信息
|
||||||
|
// List<SysMobileMenu> sysMobileMenus = sysMobileMenuService.getMenu(WxSid);
|
||||||
|
// List<WxIndexNumVo> list = new ArrayList<>();
|
||||||
|
// if (WxIndexEnum.WxVersionSubWxSid.GYL.getCode().equals(WxSid)) {
|
||||||
|
// //供应链
|
||||||
|
// for (SysMobileMenu menu : sysMobileMenus) {
|
||||||
|
// WxIndexNumVo WxIndexNumVo = new WxIndexNumVo();
|
||||||
|
// WxIndexNumVo.setSid(menu.getSid());
|
||||||
|
// //验车
|
||||||
|
// if (WxIndexEnum.WxMenu.YC.getRemarks().equals(menu.getTitle())) {
|
||||||
|
// String num = scmVehicleExamineFeign.getToDoNum(WxToDoNumQuery).getData();
|
||||||
|
// WxIndexNumVo.setNum(num);
|
||||||
|
// }
|
||||||
|
// //收车
|
||||||
|
// if (WxIndexEnum.WxMenu.SC.getRemarks().equals(menu.getTitle())) {
|
||||||
|
// String num = scmVehicleEnterlibraryFeign.getToDoNum(WxToDoNumQuery).getData();
|
||||||
|
// WxIndexNumVo.setNum(num);
|
||||||
|
// }
|
||||||
|
// //移库
|
||||||
|
// if (WxIndexEnum.WxMenu.YK.getRemarks().equals(menu.getTitle())) {
|
||||||
|
// String num = scmVehicleGressionFeign.getToDoNum(WxToDoNumQuery).getData();
|
||||||
|
// WxIndexNumVo.setNum(num);
|
||||||
|
// }
|
||||||
|
// //盘库
|
||||||
|
// if (WxIndexEnum.WxMenu.PK.getRemarks().equals(menu.getTitle())) {
|
||||||
|
// String num = scmVehicleInventoryFeign.getToDoNum(WxToDoNumQuery).getData();
|
||||||
|
// WxIndexNumVo.setNum(num);
|
||||||
|
// }
|
||||||
|
// //巡检
|
||||||
|
// if (WxIndexEnum.WxMenu.XJ.getRemarks().equals(menu.getTitle())) {
|
||||||
|
// String num = scmVehiclePatrolinspectionFeign.getToDoNum(WxToDoNumQuery).getData();
|
||||||
|
// WxIndexNumVo.setNum(num);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// list.add(WxIndexNumVo);
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// } else if (WxIndexEnum.WxVersionSubWxSid.YW.getCode().equals(WxSid)) {
|
||||||
|
// //业务
|
||||||
|
// for (SysMobileMenu menu : sysMobileMenus) {
|
||||||
|
// WxIndexNumVo WxIndexNumVo = new WxIndexNumVo();
|
||||||
|
// WxIndexNumVo.setSid(menu.getSid());
|
||||||
|
// //合同审核
|
||||||
|
// if (WxIndexEnum.WxMenu.HTSH.getRemarks().equals(menu.getTitle())) {
|
||||||
|
// String num = commonContractFeign.getToDoNum(commonToDoNumQuery).getData();
|
||||||
|
// WxIndexNumVo.setNum(num);
|
||||||
|
// }
|
||||||
|
// //价值客户
|
||||||
|
// if (WxIndexEnum.WxMenu.JZKHBA.getRemarks().equals(menu.getTitle())) {
|
||||||
|
// String num = busValcustFilingFeign.getToDoNum(busToDoNumQuery).getData();
|
||||||
|
// WxIndexNumVo.setNum(num);
|
||||||
|
// }
|
||||||
|
// list.add(WxIndexNumVo);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }else if (WxIndexEnum.WxVersionSubWxSid.FK.getCode().equals(WxSid)){
|
||||||
|
// //风控
|
||||||
|
// for (SysMobileMenu menu : sysMobileMenus) {
|
||||||
|
// WxIndexNumVo WxIndexNumVo = new WxIndexNumVo();
|
||||||
|
// WxIndexNumVo.setSid(menu.getSid());
|
||||||
|
// //家访考察
|
||||||
|
// if (WxIndexEnum.WxMenu.JFKC.getRemarks().equals(menu.getTitle())) {
|
||||||
|
// String num = loanHomevisitInvestigateFeign.getToDoNum(riskToDoNumQuery).getData();
|
||||||
|
// WxIndexNumVo.setNum(num);
|
||||||
|
// }
|
||||||
|
// //放款资料上传
|
||||||
|
// if (WxIndexEnum.WxMenu.FKZLSC.getRemarks().equals(menu.getTitle())) {
|
||||||
|
// String num = loanFileexamineFeign.getToDoNum(riskToDoNumQuery).getData();
|
||||||
|
// WxIndexNumVo.setNum(num);
|
||||||
|
// }
|
||||||
|
// //抵押办理
|
||||||
|
// if (WxIndexEnum.WxMenu.DYBL.getRemarks().equals(menu.getTitle())) {
|
||||||
|
// String num = loanMortgageInformationTransactFeign.getToDoNum(riskToDoNumQuery).getData();
|
||||||
|
// WxIndexNumVo.setNum(num);
|
||||||
|
// }
|
||||||
|
// list.add(WxIndexNumVo);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return rb.success().setData(list);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
29
src/main/java/com/yxt/portal/biz/index/WxIndexVo.java
Normal file
29
src/main/java/com/yxt/portal/biz/index/WxIndexVo.java
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
package com.yxt.portal.biz.index;
|
||||||
|
|
||||||
|
import com.yxt.common.core.vo.Vo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author liuguohui
|
||||||
|
* @Date 2021/9/26
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WxIndexVo implements Vo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户sid")
|
||||||
|
private String userSid;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "待阅数量")
|
||||||
|
private int notReadNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "待办数量")
|
||||||
|
private int notWorkNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "其他数据")
|
||||||
|
private Map<String,Object> mapExtra;
|
||||||
|
|
||||||
|
}
|
||||||
21
src/main/java/com/yxt/portal/biz/index/WxIndexWorkNumVo.java
Normal file
21
src/main/java/com/yxt/portal/biz/index/WxIndexWorkNumVo.java
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
package com.yxt.portal.biz.index;
|
||||||
|
|
||||||
|
import com.yxt.common.core.vo.Vo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author dimengzhe
|
||||||
|
* @Date 2022/8/17 14:06
|
||||||
|
* @Description
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WxIndexWorkNumVo implements Vo {
|
||||||
|
private static final long serialVersionUID = 6450324108325744150L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "待阅数量")
|
||||||
|
private int notReadNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "待办数量")
|
||||||
|
private int notWorkNum;
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.yxt.portal.biz.index;
|
||||||
|
|
||||||
|
|
||||||
|
import com.yxt.common.core.vo.Vo;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Project: anrui-portal(门户建设) <br/>
|
||||||
|
* File: AppSubsetVersionVo.java <br/>
|
||||||
|
* Class: com.yxt.anrui.portal.api.appsubsetversion.AppSubsetVersionVo <br/>
|
||||||
|
* Description: 一级应用 视图数据对象. <br/>
|
||||||
|
* Copyright: Copyright (c) 2011 <br/>
|
||||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||||
|
* Makedate: 2021-09-13 14:16:33 <br/>
|
||||||
|
*
|
||||||
|
* @author liupopo
|
||||||
|
* @version 1.0
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@ApiModel(value = "一级应用 视图数据对象", description = "一级应用 视图数据对象")
|
||||||
|
@Data
|
||||||
|
public class WxSubsetVersionVo implements Vo {
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("appSid")
|
||||||
|
private String appSid;
|
||||||
|
|
||||||
|
@ApiModelProperty("应用名称")
|
||||||
|
private String appName;
|
||||||
|
|
||||||
|
@ApiModelProperty("应用名称")
|
||||||
|
private String cornerNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("图标地址")
|
||||||
|
private String iconUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("资源sid")
|
||||||
|
private String sourceSid;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.yxt.portal.biz.sysnotice;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/2/1
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class NoticeAppListVo {
|
||||||
|
|
||||||
|
private PushNoticeAppVo pageInfo;
|
||||||
|
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
private String sid;
|
||||||
|
|
||||||
|
@ApiModelProperty("移动端页面地址")
|
||||||
|
@JsonIgnore
|
||||||
|
private String moduleAction;
|
||||||
|
@ApiModelProperty("0.内置Activity 1.内置WebView 2.RePlugin插件")
|
||||||
|
@JsonIgnore
|
||||||
|
private String app_type;
|
||||||
|
@ApiModelProperty("参数(规则),json类型的传参(必须为 string、string)")
|
||||||
|
@JsonIgnore
|
||||||
|
private String args_json;
|
||||||
|
@ApiModelProperty("插件sid")
|
||||||
|
@JsonIgnore
|
||||||
|
private String moduleSid;
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.yxt.portal.biz.sysnotice;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/2/1
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class PushNoticeAppVo {
|
||||||
|
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
private String modulePluginName;
|
||||||
|
|
||||||
|
private int moduleVersion;
|
||||||
|
|
||||||
|
private String json;
|
||||||
|
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
private String moduleAction;
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.yxt.portal.biz.sysnotice;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/2/1
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class PushNoticeQuery {
|
||||||
|
|
||||||
|
@ApiModelProperty("移动端页面地址")
|
||||||
|
private String moduleAction;
|
||||||
|
@ApiModelProperty("0.内置Activity 1.内置WebView 2.RePlugin插件")
|
||||||
|
private String app_type;
|
||||||
|
@ApiModelProperty("参数(规则),json类型的传参(必须为 string、string)")
|
||||||
|
private String args_json;
|
||||||
|
@ApiModelProperty("插件sid")
|
||||||
|
private String moduleSid;
|
||||||
|
private String title;
|
||||||
|
private String sid;
|
||||||
|
private String pcUrl;
|
||||||
|
@ApiModelProperty("类别")
|
||||||
|
private String type;
|
||||||
|
@ApiModelProperty("类别key")
|
||||||
|
private String typeKey;
|
||||||
|
|
||||||
|
private String createTime;
|
||||||
|
@ApiModelProperty("有效期至")
|
||||||
|
private String validityDate;
|
||||||
|
@ApiModelProperty("用户sid")
|
||||||
|
private String userSid;
|
||||||
|
}
|
||||||
43
src/main/java/com/yxt/portal/biz/sysnotice/SysNotice.java
Normal file
43
src/main/java/com/yxt/portal/biz/sysnotice/SysNotice.java
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
package com.yxt.portal.biz.sysnotice;
|
||||||
|
|
||||||
|
import com.yxt.common.core.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/1/30
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class SysNotice extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 8324297245354558865L;
|
||||||
|
@ApiModelProperty("标题")
|
||||||
|
private String title;
|
||||||
|
@ApiModelProperty("有效期至")
|
||||||
|
private String validityDate;
|
||||||
|
@ApiModelProperty("类别")
|
||||||
|
private String type;
|
||||||
|
@ApiModelProperty("类别key")
|
||||||
|
private String typeKey;
|
||||||
|
@ApiModelProperty("是否置顶")
|
||||||
|
private String topping;
|
||||||
|
@ApiModelProperty("内容")
|
||||||
|
private String content;
|
||||||
|
@ApiModelProperty("附件")
|
||||||
|
private String files;
|
||||||
|
@ApiModelProperty("生成类型0添加1自动")
|
||||||
|
private String createType;
|
||||||
|
|
||||||
|
private String pcUrl;
|
||||||
|
@ApiModelProperty("移动端页面地址")
|
||||||
|
private String moduleAction;
|
||||||
|
@ApiModelProperty("0.内置Activity 1.内置WebView 2.RePlugin插件")
|
||||||
|
private String app_type;
|
||||||
|
@ApiModelProperty("参数(规则),json类型的传参(必须为 string、string)")
|
||||||
|
private String args_json;
|
||||||
|
@ApiModelProperty("插件sid")
|
||||||
|
private String moduleSid;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.yxt.portal.biz.sysnotice;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/1/31
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class SysNoticeDetailsVo {
|
||||||
|
|
||||||
|
private String sid;
|
||||||
|
|
||||||
|
@ApiModelProperty("标题")
|
||||||
|
private String title;
|
||||||
|
@ApiModelProperty("有效期至")
|
||||||
|
private String validityDate;
|
||||||
|
@ApiModelProperty("类别")
|
||||||
|
private String type;
|
||||||
|
@ApiModelProperty("类别key")
|
||||||
|
private String typeKey;
|
||||||
|
@ApiModelProperty("是否置顶")
|
||||||
|
private String topping;
|
||||||
|
@ApiModelProperty("内容")
|
||||||
|
private String content;
|
||||||
|
@ApiModelProperty("附件")
|
||||||
|
private List<UrlQuery> filesList = new ArrayList<>();
|
||||||
|
|
||||||
|
private String createTime;
|
||||||
|
}
|
||||||
40
src/main/java/com/yxt/portal/biz/sysnotice/SysNoticeDto.java
Normal file
40
src/main/java/com/yxt/portal/biz/sysnotice/SysNoticeDto.java
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
package com.yxt.portal.biz.sysnotice;
|
||||||
|
|
||||||
|
import com.yxt.common.core.dto.Dto;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/1/31
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class SysNoticeDto implements Dto {
|
||||||
|
private static final long serialVersionUID = 8074080443156103663L;
|
||||||
|
|
||||||
|
private String sid;
|
||||||
|
|
||||||
|
@ApiModelProperty("标题")
|
||||||
|
private String title;
|
||||||
|
@ApiModelProperty("有效期至")
|
||||||
|
private String validityDate;
|
||||||
|
@ApiModelProperty("类别")
|
||||||
|
private String type;
|
||||||
|
@ApiModelProperty("类别key")
|
||||||
|
private String typeKey;
|
||||||
|
@ApiModelProperty("是否置顶")
|
||||||
|
private String topping;
|
||||||
|
@ApiModelProperty("内容")
|
||||||
|
private String content;
|
||||||
|
@ApiModelProperty("附件")
|
||||||
|
private List<UrlQuery> filesList = new ArrayList<>();
|
||||||
|
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
private String userSid;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.yxt.portal.biz.sysnotice;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/1/30
|
||||||
|
**/
|
||||||
|
@Component
|
||||||
|
public class SysNoticeFeignFallback {
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.yxt.portal.biz.sysnotice;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/1/30
|
||||||
|
**/
|
||||||
|
@Mapper
|
||||||
|
public interface SysNoticeMapper extends BaseMapper<SysNotice> {
|
||||||
|
IPage<SysNoticeVo> selectPageVo(IPage<SysNotice> page, @Param(Constants.WRAPPER) QueryWrapper<SysNotice> qw);
|
||||||
|
|
||||||
|
List<SysNoticeListVo> getLists();
|
||||||
|
|
||||||
|
List<NoticeAppListVo> getAppDetails();
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.yxt.portal.biz.sysnotice.SysNoticeMapper">
|
||||||
|
<select id="selectPageVo" resultType="com.yxt.portal.biz.sysnotice.SysNoticeVo">
|
||||||
|
select sn.sid,
|
||||||
|
sn.title,
|
||||||
|
DATE_FORMAT(sn.createTime, '%Y-%m-%d') as createDate,
|
||||||
|
sn.validityDate,
|
||||||
|
case state
|
||||||
|
when 1
|
||||||
|
then '开启'
|
||||||
|
when 2 then '关闭' end as stateValue,
|
||||||
|
sn.topping
|
||||||
|
from sys_notice sn
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getLists" resultType="com.yxt.portal.biz.sysnotice.SysNoticeListVo">
|
||||||
|
select sid, title, DATE_FORMAT(createTime, '%Y-%m-%d') as createTime, pcUrl
|
||||||
|
from sys_notice
|
||||||
|
where state = 1
|
||||||
|
and (validityDate is null or validityDate = '' or validityDate > NOW())
|
||||||
|
order by topping desc, createTime desc
|
||||||
|
limit 4
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getAppDetails" resultType="com.yxt.portal.biz.sysnotice.NoticeAppListVo">
|
||||||
|
select sid, title, moduleAction, app_type, args_json, moduleSid
|
||||||
|
from sys_notice
|
||||||
|
where state = 1
|
||||||
|
and (validityDate is null or validityDate = '' or validityDate > NOW())
|
||||||
|
order by topping desc, createTime desc
|
||||||
|
limit 6
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
237
src/main/java/com/yxt/portal/biz/sysnotice/SysNoticeService.java
Normal file
237
src/main/java/com/yxt/portal/biz/sysnotice/SysNoticeService.java
Normal file
@@ -0,0 +1,237 @@
|
|||||||
|
package com.yxt.portal.biz.sysnotice;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.yxt.common.base.config.component.FileUploadComponent;
|
||||||
|
import com.yxt.common.base.service.MybatisBaseService;
|
||||||
|
import com.yxt.common.base.utils.PagerUtil;
|
||||||
|
import com.yxt.common.base.utils.StringUtils;
|
||||||
|
import com.yxt.common.core.query.PagerQuery;
|
||||||
|
import com.yxt.common.core.result.ResultBean;
|
||||||
|
import com.yxt.common.core.vo.PagerVo;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/1/30
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class SysNoticeService extends MybatisBaseService<SysNoticeMapper, SysNotice> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FileUploadComponent fileUploadComponent;
|
||||||
|
|
||||||
|
public PagerVo<SysNoticeVo> listPageVo(PagerQuery<SysNoticeQuery> pagerQuery) {
|
||||||
|
SysNoticeQuery query = pagerQuery.getParams();
|
||||||
|
QueryWrapper<SysNotice> qw = new QueryWrapper<>();
|
||||||
|
if (query != null) {
|
||||||
|
qw.eq("1", 1);
|
||||||
|
//标题
|
||||||
|
if (StringUtils.isNotBlank(query.getTitle())) {
|
||||||
|
qw.like("sn.title", query.getTitle());
|
||||||
|
}
|
||||||
|
qw.apply(StringUtils.isNotBlank(query.getCreateDateStart()), "date_format (sn.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateDateStart() + "','%Y-%m-%d')").
|
||||||
|
apply(StringUtils.isNotBlank(query.getCreateDateEnd()), "date_format (sn.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateDateEnd() + "','%Y-%m-%d')"
|
||||||
|
);
|
||||||
|
if (StringUtils.isNotBlank(query.getTopping())) {
|
||||||
|
qw.like("sn.topping", query.getTopping());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(query.getState())) {
|
||||||
|
qw.eq("sn.state", query.getState());
|
||||||
|
}
|
||||||
|
qw.orderByDesc("sn.createTime");
|
||||||
|
}
|
||||||
|
IPage<SysNotice> page = PagerUtil.queryToPage(pagerQuery);
|
||||||
|
IPage<SysNoticeVo> pagging = baseMapper.selectPageVo(page, qw);
|
||||||
|
PagerVo<SysNoticeVo> p = PagerUtil.pageToVo(pagging, null);
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean saveOrUpdateNotice(SysNoticeDto dto) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
String sid = dto.getSid();
|
||||||
|
if (StringUtils.isBlank(sid)) {
|
||||||
|
SysNotice sysNotice = new SysNotice();
|
||||||
|
BeanUtil.copyProperties(dto, sysNotice, "sid");
|
||||||
|
List<UrlQuery> filss = dto.getFilesList();
|
||||||
|
filss.removeAll(Collections.singleton(null));
|
||||||
|
if (!filss.isEmpty()) {
|
||||||
|
List<String> filesList = filss.stream().map(v -> v.getUrl()).collect(Collectors.toList());
|
||||||
|
filesList.removeAll(Collections.singleton(null));
|
||||||
|
}
|
||||||
|
sysNotice.setCreateBySid(dto.getUserSid());
|
||||||
|
sysNotice.setApp_type("0");
|
||||||
|
sysNotice.setModuleAction("com.anrui.android.activity.NoticeActivity");
|
||||||
|
sysNotice.setModuleSid("fec4e243-491a-11ec-94cd-fa163e0cb33c");
|
||||||
|
Map<String, Object> maps = new HashMap<>();
|
||||||
|
maps.put("sid", sysNotice.getSid());
|
||||||
|
sysNotice.setArgs_json(JSONObject.toJSONString(maps));
|
||||||
|
sysNotice.setCreateType("0");
|
||||||
|
baseMapper.insert(sysNotice);
|
||||||
|
} else {
|
||||||
|
SysNotice sysNotice = fetchBySid(sid);
|
||||||
|
if (sysNotice == null) {
|
||||||
|
return rb.setMsg("该通知公告不存在");
|
||||||
|
}
|
||||||
|
BeanUtil.copyProperties(dto, sysNotice, "sid");
|
||||||
|
sysNotice.setApp_type("0");
|
||||||
|
sysNotice.setModuleAction("com.anrui.android.activity.NoticeActivity");
|
||||||
|
sysNotice.setModuleSid("fec4e243-491a-11ec-94cd-fa163e0cb33c");
|
||||||
|
Map<String, Object> maps = new HashMap<>();
|
||||||
|
maps.put("sid", sysNotice.getSid());
|
||||||
|
sysNotice.setArgs_json(JSONObject.toJSONString(maps));
|
||||||
|
sysNotice.setCreateType("0");
|
||||||
|
List<UrlQuery> filss = dto.getFilesList();
|
||||||
|
filss.removeAll(Collections.singleton(null));
|
||||||
|
baseMapper.updateById(sysNotice);
|
||||||
|
}
|
||||||
|
return rb.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean<SysNoticeDetailsVo> getDetails(String sid) {
|
||||||
|
ResultBean<SysNoticeDetailsVo> rb = ResultBean.fireFail();
|
||||||
|
SysNoticeDetailsVo sysNoticeDetailsVo = new SysNoticeDetailsVo();
|
||||||
|
SysNotice sysNotice = fetchBySid(sid);
|
||||||
|
if (sysNotice == null) {
|
||||||
|
return rb.setMsg("该通知公告不存在");
|
||||||
|
}
|
||||||
|
BeanUtil.copyProperties(sysNotice, sysNoticeDetailsVo);
|
||||||
|
sysNoticeDetailsVo.setCreateTime(DateUtil.format(sysNotice.getCreateTime(), "yyyy-MM-dd"));
|
||||||
|
String filesss = sysNotice.getFiles();
|
||||||
|
List<UrlQuery> lists = new ArrayList<>();
|
||||||
|
|
||||||
|
return rb.success().setData(sysNoticeDetailsVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean setState(SysNoticesQuery query) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
List<String> sidsList = query.getSidsList();
|
||||||
|
sidsList.removeAll(Collections.singleton(null));
|
||||||
|
if (sidsList.isEmpty()) {
|
||||||
|
return rb.setMsg("请选择数据");
|
||||||
|
}
|
||||||
|
String state = query.getState();
|
||||||
|
for (String sid : sidsList) {
|
||||||
|
SysNotice sysNotice = fetchBySid(sid);
|
||||||
|
if (sysNotice == null) {
|
||||||
|
return rb.setMsg("操作的数据中包含不存在的数据,请刷新后操作");
|
||||||
|
}
|
||||||
|
sysNotice.setState(Integer.valueOf(state).intValue());
|
||||||
|
baseMapper.updateById(sysNotice);
|
||||||
|
}
|
||||||
|
return rb.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean<List<SysNoticeListVo>> getLists() {
|
||||||
|
ResultBean<List<SysNoticeListVo>> rb = ResultBean.fireFail();
|
||||||
|
List<SysNoticeListVo> list = baseMapper.getLists();
|
||||||
|
list.removeAll(Collections.singleton(null));
|
||||||
|
return rb.success().setData(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean delAllBySids(String[] sids) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
delBySids(sids);
|
||||||
|
return rb.success().setMsg("删除成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean setTopping(SysNoticessQuery query) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
List<String> sidsList = query.getSidsList();
|
||||||
|
sidsList.removeAll(Collections.singleton(null));
|
||||||
|
if (sidsList.isEmpty()) {
|
||||||
|
return rb.setMsg("请选择数据");
|
||||||
|
}
|
||||||
|
String topping = query.getTopping();
|
||||||
|
for (String sid : sidsList) {
|
||||||
|
SysNotice sysNotice = fetchBySid(sid);
|
||||||
|
if (sysNotice == null) {
|
||||||
|
return rb.setMsg("操作的数据中包含不存在的数据,请刷新后操作");
|
||||||
|
}
|
||||||
|
sysNotice.setTopping(topping);
|
||||||
|
baseMapper.updateById(sysNotice);
|
||||||
|
}
|
||||||
|
return rb.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean savePushNotice(PushNoticeQuery query) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
SysNotice sysNotice = new SysNotice();
|
||||||
|
BeanUtil.copyProperties(query, sysNotice);
|
||||||
|
sysNotice.setCreateBySid(query.getUserSid());
|
||||||
|
sysNotice.setCreateType("1");
|
||||||
|
sysNotice.setTopping("是");
|
||||||
|
sysNotice.setType("公告");
|
||||||
|
sysNotice.setTypeKey("02");
|
||||||
|
baseMapper.insert(sysNotice);
|
||||||
|
return rb.success().setData(sysNotice);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean<List<NoticeAppListVo>> getAppDetails() {
|
||||||
|
ResultBean<List<NoticeAppListVo>> rb = ResultBean.fireFail();
|
||||||
|
List<NoticeAppListVo> list = baseMapper.getAppDetails();
|
||||||
|
list.removeAll(Collections.singleton(null));
|
||||||
|
//定义的app的sid的index集合
|
||||||
|
Map<String, List<Integer>> appVer = new HashMap<>();
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
NoticeAppListVo noticeAppListVo = list.get(i);
|
||||||
|
PushNoticeAppVo pageInfo = new PushNoticeAppVo();
|
||||||
|
pageInfo.setModuleAction(noticeAppListVo.getModuleAction());
|
||||||
|
pageInfo.setType(noticeAppListVo.getApp_type());
|
||||||
|
pageInfo.setJson(noticeAppListVo.getArgs_json());
|
||||||
|
String moduleSid = noticeAppListVo.getModuleSid();
|
||||||
|
List<Integer> integers = appVer.get(moduleSid);
|
||||||
|
if (integers == null) {
|
||||||
|
integers = new ArrayList<>();
|
||||||
|
}
|
||||||
|
integers.add(i);
|
||||||
|
appVer.put(moduleSid, integers);
|
||||||
|
noticeAppListVo.setPageInfo(pageInfo);
|
||||||
|
}
|
||||||
|
// 循环取map:若为同一个app版本,则只查询一次
|
||||||
|
// for (String key : appVer.keySet()) {
|
||||||
|
// AppSubsetVersionVo appSubsetVersions = appSubsetVersionService.selectByAppSidOne(key);
|
||||||
|
// if (appSubsetVersions != null) {
|
||||||
|
// List<Integer> integers = appVer.get(key);
|
||||||
|
// for (int i = 0; i < integers.size(); i++) {
|
||||||
|
// Integer integer = integers.get(i);
|
||||||
|
// String path = fileUploadComponent.getUrlPrefix();
|
||||||
|
// list.get(integer).getPageInfo().setPath(path + appSubsetVersions.getUpdateUrl());
|
||||||
|
// list.get(integer).getPageInfo().setModuleVersion(appSubsetVersions.getVersionCode());
|
||||||
|
// list.get(integer).getPageInfo().setModulePluginName(appSubsetVersions.getModulePluginName());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
return rb.success().setData(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean<SysNoticeAppDetails> getDetailsApp(String sid) {
|
||||||
|
ResultBean<SysNoticeAppDetails> rb = ResultBean.fireFail();
|
||||||
|
SysNoticeAppDetails sysNoticeAppDetails = new SysNoticeAppDetails();
|
||||||
|
SysNotice sysNotice = fetchBySid(sid);
|
||||||
|
if (sysNotice == null) {
|
||||||
|
return rb.setMsg("该通知公告不存在");
|
||||||
|
}
|
||||||
|
BeanUtil.copyProperties(sysNotice, sysNoticeAppDetails);
|
||||||
|
sysNoticeAppDetails.setCreateTime(DateUtil.format(sysNotice.getCreateTime(), "yyyy-MM-dd"));
|
||||||
|
String filesss = sysNotice.getFiles();
|
||||||
|
if (StringUtils.isNotBlank(filesss)) {
|
||||||
|
List<String> fileList = Arrays.asList(filesss.split(",")).stream().map(c -> fileUploadComponent.getUrlPrefix() + c).collect(Collectors.toList());
|
||||||
|
fileList.removeAll(Collections.singleton(null));
|
||||||
|
if (!fileList.isEmpty()) {
|
||||||
|
sysNoticeAppDetails.setFilesList(fileList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rb.success().setData(sysNoticeAppDetails);
|
||||||
|
}
|
||||||
|
}
|
||||||
24
src/main/java/com/yxt/portal/biz/sysnotice/SysNoticeVo.java
Normal file
24
src/main/java/com/yxt/portal/biz/sysnotice/SysNoticeVo.java
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
package com.yxt.portal.biz.sysnotice;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/1/30
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class SysNoticeVo {
|
||||||
|
private String sid;
|
||||||
|
@ApiModelProperty("标题")
|
||||||
|
private String title;
|
||||||
|
@ApiModelProperty("发布时间")
|
||||||
|
private String createDate;
|
||||||
|
@ApiModelProperty("有效期至")
|
||||||
|
private String validityDate;
|
||||||
|
@ApiModelProperty("状态")
|
||||||
|
private String stateValue;
|
||||||
|
@ApiModelProperty("是否置顶")
|
||||||
|
private String topping;
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.yxt.portal.biz.sysnotice;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/1/31
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class SysNoticesQuery {
|
||||||
|
|
||||||
|
@ApiModelProperty("sids")
|
||||||
|
private List<String> sidsList = new ArrayList<>();
|
||||||
|
@ApiModelProperty("1开启、2关闭")
|
||||||
|
private String state;
|
||||||
|
}
|
||||||
18
src/main/java/com/yxt/portal/biz/sysnotice/UrlQuery.java
Normal file
18
src/main/java/com/yxt/portal/biz/sysnotice/UrlQuery.java
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
package com.yxt.portal.biz.sysnotice;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/1/31
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class UrlQuery {
|
||||||
|
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -39,7 +39,7 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
|
|||||||
|
|
||||||
List<SysRoleVo> fetchByUserSid(String userSid);
|
List<SysRoleVo> fetchByUserSid(String userSid);
|
||||||
|
|
||||||
List<SysRoleVo> listAllByUserSid(String userSid);
|
List<SysRoleVo> listAllByUserSid(@Param("userSid") String userSid,@Param("orgSid") String orgSid);
|
||||||
|
|
||||||
SysRole fetchByName(String name);
|
SysRole fetchByName(String name);
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,9 @@
|
|||||||
SELECT role.name, role.sid, ISNULL(userRole.sid) AS checked
|
SELECT role.name, role.sid, ISNULL(userRole.sid) AS checked
|
||||||
FROM sys_role role
|
FROM sys_role role
|
||||||
LEFT JOIN sys_user_role userRole ON role.sid = userRole.`roleSid`
|
LEFT JOIN sys_user_role userRole ON role.sid = userRole.`roleSid`
|
||||||
AND userRole.userSid = #{param1} and role.isEnable="1"
|
AND userRole.userSid = #{userSid} and role.isEnable="1"
|
||||||
|
where
|
||||||
|
role.orgSid=#{orgSid}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="fetchByUserSid" resultType="com.yxt.portal.biz.sysrole.SysRoleVo">
|
<select id="fetchByUserSid" resultType="com.yxt.portal.biz.sysrole.SysRoleVo">
|
||||||
|
|||||||
@@ -68,6 +68,9 @@ public class SysRoleService extends MybatisBaseService<SysRoleMapper, SysRole> {
|
|||||||
if (query.getType() != null) {
|
if (query.getType() != null) {
|
||||||
qw.eq("sr.type", query.getType());
|
qw.eq("sr.type", query.getType());
|
||||||
}
|
}
|
||||||
|
if (query.getOrgSid() != null) {
|
||||||
|
qw.eq("sr.orgSid", query.getOrgSid());
|
||||||
|
}
|
||||||
qw.eq("sr.isEnable","1");
|
qw.eq("sr.isEnable","1");
|
||||||
return qw;
|
return qw;
|
||||||
}
|
}
|
||||||
@@ -107,8 +110,8 @@ public class SysRoleService extends MybatisBaseService<SysRoleMapper, SysRole> {
|
|||||||
return baseMapper.fetchByUserSid(userSid);
|
return baseMapper.fetchByUserSid(userSid);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<SysRoleVo> listAllByUserSid(String userSid) {
|
public List<SysRoleVo> listAllByUserSid(String userSid,String orgSid) {
|
||||||
return baseMapper.listAllByUserSid(userSid);
|
return baseMapper.listAllByUserSid(userSid,orgSid);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SysRoleVo fetchByName(String name) {
|
public SysRoleVo fetchByName(String name) {
|
||||||
|
|||||||
@@ -738,6 +738,8 @@ public class SysStaffinfoService extends MybatisBaseService<SysStaffinfoMapper,
|
|||||||
|
|
||||||
//更新员工基础信息
|
//更新员工基础信息
|
||||||
BeanUtil.copyProperties(dto, sysStaffinfo);
|
BeanUtil.copyProperties(dto, sysStaffinfo);
|
||||||
|
sysStaffinfo.setIdNo("0");
|
||||||
|
sysStaffinfo.setBankCardNo("0");
|
||||||
sysStaffinfo.setJobNumber(dto.getJobNumber());
|
sysStaffinfo.setJobNumber(dto.getJobNumber());
|
||||||
|
|
||||||
//更新用户信息
|
//更新用户信息
|
||||||
|
|||||||
@@ -44,5 +44,5 @@ public class SysUserDto implements Dto {
|
|||||||
private String userSid;
|
private String userSid;
|
||||||
private String password;
|
private String password;
|
||||||
private String orgSid;
|
private String orgSid;
|
||||||
|
private String sourceSid;
|
||||||
}
|
}
|
||||||
@@ -421,6 +421,8 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
|
|||||||
if(!psid.equals("0")){
|
if(!psid.equals("0")){
|
||||||
String name = sysOrganizationService.fetchBySid(psid).getName();
|
String name = sysOrganizationService.fetchBySid(psid).getName();
|
||||||
userInfoOneVo.setPNameAndDepartmentNameAndPostName(name + "-" + sysStaffOrgVo.getOrgName());
|
userInfoOneVo.setPNameAndDepartmentNameAndPostName(name + "-" + sysStaffOrgVo.getOrgName());
|
||||||
|
}else{
|
||||||
|
userInfoOneVo.setPNameAndDepartmentNameAndPostName(sysStaffOrgVo.getOrgName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -516,42 +518,6 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
|
|||||||
orgList1.setOrgName(vv.getOrgName());
|
orgList1.setOrgName(vv.getOrgName());
|
||||||
orgList1.setDeptName(vv.getOrgName());
|
orgList1.setDeptName(vv.getOrgName());
|
||||||
orgList1.setDeptSid(vv.getOrgSid());
|
orgList1.setDeptSid(vv.getOrgSid());
|
||||||
String orgName = "";
|
|
||||||
String deptName = "";
|
|
||||||
String deptSid = "";
|
|
||||||
// if (StringUtils.isNotBlank(vv.getOrgSidPath())) {
|
|
||||||
// List<String> split = Arrays.asList(vv.getOrgSidPath().split("/"));
|
|
||||||
// if (split.size() > 1) {
|
|
||||||
// //获取本级sid获取本级部门信息
|
|
||||||
// SysOrganization sysOrganization = sysOrganizationService.fetchBySid(split.get(split.size() - 2));
|
|
||||||
// SysOrganization sysOrganization1 = sysOrganizationService.fetchBySid(split.get(split.size() - 1));
|
|
||||||
// orgName = sysOrganization.getName() + "/" + sysOrganization1.getName();
|
|
||||||
// deptName = sysOrganization1.getName();
|
|
||||||
// deptSid = sysOrganization1.getSid();
|
|
||||||
// } else {
|
|
||||||
// SysOrganization sysOrganization = sysOrganizationService.fetchBySid(split.get(0));
|
|
||||||
// orgName = sysOrganization.getName();
|
|
||||||
// deptName = sysOrganization.getName();
|
|
||||||
// deptSid = sysOrganization.getSid();
|
|
||||||
// }
|
|
||||||
// /*String[] split = vv.getOrgSidPath().split("/");
|
|
||||||
// for (int i = 0; i < split.length; i++) {
|
|
||||||
// //获取本级sid获取本级部门信息
|
|
||||||
// SysOrganization sysOrganization = sysOrganizationService.fetchBySid(split[i]);
|
|
||||||
// //从本级部门信息中获取本级部门名称
|
|
||||||
// if (sysOrganization != null) {
|
|
||||||
// String bjName = sysOrganization.getName();
|
|
||||||
// if(i == 0){
|
|
||||||
// orgName = bjName;
|
|
||||||
// }else{
|
|
||||||
// orgName = orgName+"/"+bjName;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }*/
|
|
||||||
// orgList1.setOrgName(orgName);
|
|
||||||
// orgList1.setDeptName(deptName);
|
|
||||||
// orgList1.setDeptSid(deptSid);
|
|
||||||
// }
|
|
||||||
orgList.add(orgList1);
|
orgList.add(orgList1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
FROM sys_user_role a
|
FROM sys_user_role a
|
||||||
left join sys_role b on b.sid =a.roleSid
|
left join sys_role b on b.sid =a.roleSid
|
||||||
left join sys_role_authorize c ON c.roleSid = b.sid
|
left join sys_role_authorize c ON c.roleSid = b.sid
|
||||||
WHERE a.userSid = #{userSid}
|
WHERE a.userSid = #{userSid} and b.isEnable ='1'
|
||||||
<if test="orgSid!=null and orgSid!=''">
|
<if test="orgSid!=null and orgSid!=''">
|
||||||
and b.orgSid=#{orgSid}
|
and b.orgSid=#{orgSid}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
14
src/main/java/com/yxt/portal/utils/OrgPathQuery.java
Normal file
14
src/main/java/com/yxt/portal/utils/OrgPathQuery.java
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
package com.yxt.portal.utils;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Fan
|
||||||
|
* @description
|
||||||
|
* @date 2024/5/17 14:15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrgPathQuery {
|
||||||
|
private String orgPath;
|
||||||
|
private String userOrgSid;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user