luojun 2 лет назад
Родитель
Сommit
92128af32f

+ 0 - 310
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/Org.java

@@ -1,310 +0,0 @@
-package com.xunmei.system.api.domain;
-
-import com.xunmei.common.core.web.domain.BaseEntity;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 组织机构信息
- */
-public class Org extends BaseEntity {
-
-    /*主键*/
-    private Long id;
-
-    /*机构名称*/
-    private String name;
-
-    /*层级*/
-    private Integer level;
-
-    /*机构类型*/
-    private Integer type;
-
-    /*是否禁用*/
-    private Integer isLock;
-
-    /*上级机构*/
-    private Long parentId;
-
-    /*联系电话*/
-    private String phone;
-
-    /*行政区域编码*/
-    private String cityCode;
-
-    /**
-     * 负责人
-     */
-    private String manager;
-
-    /**
-     * 负责人电话
-     */
-    private String managerPhone;
-
-    /**
-     * 地址
-     */
-    private String address;
-
-    /*机构code*/
-    private String code;
-
-    /**
-     * guid
-     */
-    private String guid;
-
-    /**
-     * 父节点GUID
-     */
-    private String parentGuid;
-
-    /**
-     * 路径
-     */
-    private String path;
-
-    /**
-     * 删除
-     */
-    private Integer deleted;
-
-    /**
-     * 排序
-     */
-    private Double sort;
-
-    /**
-     * 机构简称
-     */
-    private String shortName;
-
-    /**
-     * 备注
-     */
-    private String remark;
-
-    /**
-     * 子机构
-     */
-    private List<Org> children = new ArrayList<Org>();
-
-    /**
-     * 是否暂停服务
-     */
-    //private Integer temporarilyClosed;
-
-    /**
-     * 天气城市区域编码
-     */
-    //private String weatherCityCode;
-
-    public Org() {
-
-    }
-
-    public List<Org> getChildren() {
-        return children;
-    }
-
-    public void setChildren(List<Org> children) {
-        this.children = children;
-    }
-
-    public Integer getIsLock() {
-        return isLock;
-    }
-
-    public void setIsLock(Integer isLock) {
-        this.isLock = isLock;
-    }
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public Integer getLevel() {
-        return level;
-    }
-
-    public void setLevel(Integer level) {
-        this.level = level;
-    }
-
-    public Integer getType() {
-        return type;
-    }
-
-    public void setType(Integer type) {
-        this.type = type;
-    }
-
-    public Long getParentId() {
-        return parentId;
-    }
-
-    public void setParentId(Long parentId) {
-        this.parentId = parentId;
-    }
-
-    public String getPhone() {
-        return phone;
-    }
-
-    public void setPhone(String phone) {
-        this.phone = phone;
-    }
-
-    public String getCityCode() {
-        return cityCode;
-    }
-
-    public void setCityCode(String cityCode) {
-        this.cityCode = cityCode;
-    }
-
-    public String getManager() {
-        return manager;
-    }
-
-    public void setManager(String manager) {
-        this.manager = manager;
-    }
-
-    public String getManagerPhone() {
-        return managerPhone;
-    }
-
-    public void setManagerPhone(String managerPhone) {
-        this.managerPhone = managerPhone;
-    }
-
-    public String getAddress() {
-        return address;
-    }
-
-    public void setAddress(String address) {
-        this.address = address;
-    }
-
-    public String getCode() {
-        return code;
-    }
-
-    public void setCode(String code) {
-        this.code = code;
-    }
-
-    public String getGuid() {
-        return guid;
-    }
-
-    public void setGuid(String guid) {
-        this.guid = guid;
-    }
-
-    public String getPath() {
-        return path;
-    }
-
-    public void setPath(String path) {
-        this.path = path;
-    }
-
-    public Integer getDeleted() {
-        return deleted;
-    }
-
-    public void setDeleted(Integer deleted) {
-        this.deleted = deleted;
-    }
-
-    public String getShortName() {
-        return shortName;
-    }
-
-    public void setShortName(String shortName) {
-        this.shortName = shortName;
-    }
-
-
-    public String getParentGuid() {
-        return parentGuid;
-    }
-
-    public void setParentGuid(String parentGuid) {
-        this.parentGuid = parentGuid;
-    }
-
-
-    public Double getSort() {
-        return sort;
-    }
-
-    public void setSort(Double sort) {
-        this.sort = sort;
-    }
-
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-/*
-    public Integer getTemporarilyClosed() {
-        return temporarilyClosed;
-    }
-
-    public void setTemporarilyClosed(Integer temporarilyClosed) {
-        this.temporarilyClosed = temporarilyClosed;
-    }
-
-    public String getWeatherCityCode() {
-        return weatherCityCode;
-    }
-
-    public void setWeatherCityCode(String weatherCityCode) {
-        this.weatherCityCode = weatherCityCode;
-    }
-*/
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
-                .append("id", getId())
-                .append("parentId", getParentId())
-                .append("address", getAddress())
-                .append("name", getName())
-                .append("delete", getDeleted())
-                .append("guid", getGuid())
-                .append("phone", getPhone())
-                .append("manager", getManager())
-                .append("managerPhone", getManagerPhone())
-                .append("path", getPath())
-                .append("createBy", getCreateBy())
-                .append("createTime", getCreateTime())
-                .append("updateBy", getUpdateBy())
-                .append("updateTime", getUpdateTime())
-                .toString();
-    }
-}

+ 0 - 133
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/Role.java

@@ -1,133 +0,0 @@
-package com.xunmei.system.api.domain;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.xunmei.common.core.web.domain.BaseEntity;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-import java.util.Set;
-
-@TableName(value = "sys_role")
-public class Role extends BaseEntity {
-
-    private static final long serialVersionUID = 1L;
-
-    /**角色id */
-    private Long id;
-
-    /**角色名字*/
-    private String roleName;
-
-    /** 角色权限*/
-    private String roleKey;
-
-    /**角色排序*/
-    private Integer roleSort;
-
-    /**数据范围 (1:所有数据权限;2:自定义数据权限;3:本机构数据权限;4:本机构及以下数据权限;5:仅本人数据权限)*/
-    private String  dataScope;
-
-    /** 角色状态 (0正常,1停用)*/
-    private Integer status;
-
-    /** 删除标识 (0正常,1删除)*/
-    private Integer delFlag;
-
-    /** 菜单ids*/
-    @TableField(exist = false)
-    private Long[] menuIds;
-
-    /** 角色菜单权限  用于权框架*/
-    @TableField(exist = false)
-    private Set<String> permissions;
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getRoleName() {
-        return roleName;
-    }
-
-    public void setRoleName(String roleName) {
-        this.roleName = roleName;
-    }
-
-    public String getRoleKey() {
-        return roleKey;
-    }
-
-    public void setRoleKey(String roleKey) {
-        this.roleKey = roleKey;
-    }
-
-    public Integer getRoleSort() {
-        return roleSort;
-    }
-
-    public void setRoleSort(Integer roleSort) {
-        this.roleSort = roleSort;
-    }
-
-    public String getDataScope() {
-        return dataScope;
-    }
-
-    public void setDataScope(String dataScope) {
-        this.dataScope = dataScope;
-    }
-
-    public Integer getStatus() {
-        return status;
-    }
-
-    public void setStatus(Integer status) {
-        this.status = status;
-    }
-
-    public Integer getDelFlag() {
-        return delFlag;
-    }
-
-    public void setDelFlag(Integer delFlag) {
-        this.delFlag = delFlag;
-    }
-
-    public Long[] getMenuIds() {
-        return menuIds;
-    }
-
-    public void setMenuIds(Long[] menuIds) {
-        this.menuIds = menuIds;
-    }
-
-    public Set<String> getPermissions() {
-        return permissions;
-    }
-
-    public void setPermissions(Set<String> permissions) {
-        this.permissions = permissions;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
-                .append("roleId", getId())
-                .append("roleName", getRoleName())
-                .append("roleKey", getRoleKey())
-                .append("roleSort", getRoleSort())
-                .append("dataScope", getDataScope())
-                .append("status", getStatus())
-                .append("delFlag", getDelFlag())
-                .append("createBy", getCreateBy())
-                .append("createTime", getCreateTime())
-                .append("updateBy", getUpdateBy())
-                .append("updateTime", getUpdateTime())
-                .toString();
-    }
-}

+ 2 - 1
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/SysOrg.java

@@ -50,7 +50,8 @@ public class SysOrg extends BaseEntity {
 
     @ApiModelProperty(value = "禁用")
     @TableField(value = "is_lock")
-    private String isLock;
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Integer isLock;
 
     @ApiModelProperty(value = "负责人")
     @TableField(value = "manager")

+ 1 - 1
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/SysUser.java

@@ -221,7 +221,7 @@ public class SysUser extends BaseEntity {
 
     /** 机构对象 */
     @TableField(exist = false)
-    private Org org;
+    private SysOrg org;
 
     @TableField(exist = false)
     private Long[] roleIds;

+ 0 - 218
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/User.java

@@ -1,218 +0,0 @@
-package com.xunmei.system.api.domain;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.xunmei.common.core.web.domain.BaseEntity;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Set;
-
-/**
- *机构人员信息
- */
-@TableName(value = "sys_user")
-public class User extends BaseEntity{
-    private static final long serialVersionUID = 1L;
-
-    /** 用户ID */
-    @TableId
-    private Long id;
-
-    /** 机构ID */
-    private Long orgId;
-
-    /** 用户账号 */
-    private String username;
-
-    /** 姓名 */
-    private String name;
-
-    /** 身份证 */
-    private String card;
-
-    /** 手机号码 */
-    private String phone;
-
-    /** 用户性别 */
-    private Integer gender;
-
-    /** 用户头像 */
-    private String image;
-
-    /** 密码 */
-    private String password;
-
-    /** 盐值 */
-    private String salt;
-
-    /** 帐号状态(0正常 1停用) */
-    private Integer isLock;
-
-    /** 删除标志(0代表存在 2代表删除) */
-    private Integer deleted;
-
-    /** 最后登录IP */
-    private String lastIp;
-
-    /** 最后登录时间 */
-    private Date lastTime;
-
-    /** 机构对象 */
-    @TableField(exist = false)
-    private Org org;
-
-    @TableField(exist = false)
-    private Long[] roleIds;
-
-    @TableField(exist = false)
-    private List<Role> roles;
-
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public List<Role> getRoles() {
-        return roles;
-    }
-
-    public void setRoles(List<Role> roles) {
-        this.roles = roles;
-    }
-
-    public Long[] getRoleIds() {
-        return roleIds;
-    }
-
-    public void setRoleIds(Long[] roleIds) {
-        this.roleIds = roleIds;
-    }
-
-    public boolean isAdmin()
-    {
-        return isAdmin(this.getId());
-    }
-
-    public static boolean isAdmin(Long userId)
-    {
-        return userId != null && 1L == userId;
-    }
-
-    public Long getOrgId() {
-        return orgId;
-    }
-
-    public void setOrgId(Long orgId) {
-        this.orgId = orgId;
-    }
-
-    public String getUsername() {
-        return username;
-    }
-
-    public void setUsername(String username) {
-        this.username = username;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getCard() {
-        return card;
-    }
-
-    public void setCard(String card) {
-        this.card = card;
-    }
-
-    public String getPhone() {
-        return phone;
-    }
-
-    public void setPhone(String phone) {
-        this.phone = phone;
-    }
-
-    public Integer getGender() {
-        return gender;
-    }
-
-    public void setGender(Integer gender) {
-        this.gender = gender;
-    }
-
-    public String getImage() {
-        return image;
-    }
-
-    public void setImage(String image) {
-        this.image = image;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    public String getSalt() {
-        return salt;
-    }
-
-    public void setSalt(String salt) {
-        this.salt = salt;
-    }
-
-    public Integer getIsLock() {
-        return isLock;
-    }
-
-    public void setIsLock(Integer isLock) {
-        this.isLock = isLock;
-    }
-
-    public Integer getDeleted() {
-        return deleted;
-    }
-
-    public void setDeleted(Integer deleted) {
-        this.deleted = deleted;
-    }
-
-    public String getLastIp() {
-        return lastIp;
-    }
-
-    public void setLastIp(String lastIp) {
-        this.lastIp = lastIp;
-    }
-
-    public Date getLastTime() {
-        return lastTime;
-    }
-
-    public void setLastTime(Date lastTime) {
-        this.lastTime = lastTime;
-    }
-
-    public Org getOrg() {
-        return org;
-    }
-
-    public void setOrg(Org org) {
-        this.org = org;
-    }
-}

+ 0 - 1
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/model/LoginUser.java

@@ -1,7 +1,6 @@
 package com.xunmei.system.api.model;
 
 import com.xunmei.system.api.domain.SysUser;
-import com.xunmei.system.api.domain.User;
 
 import java.io.Serializable;
 import java.util.Set;

+ 0 - 2
soc-common/soc-common-datascope/src/main/java/com/xunmei/common/datascope/aspect/DataScopeAspect.java

@@ -6,10 +6,8 @@ import com.xunmei.common.core.utils.StringUtils;
 import com.xunmei.common.core.web.domain.BaseEntity;
 import com.xunmei.common.datascope.annotation.DataScope;
 import com.xunmei.common.security.utils.SecurityUtils;
-import com.xunmei.system.api.domain.Role;
 import com.xunmei.system.api.domain.SysRole;
 import com.xunmei.system.api.domain.SysUser;
-import com.xunmei.system.api.domain.User;
 import com.xunmei.system.api.model.LoginUser;
 import org.aspectj.lang.JoinPoint;
 import org.aspectj.lang.annotation.Aspect;

+ 9 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/controller/ApiPlanController.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xunmei.common.core.constant.SecurityConstants;
 import com.xunmei.common.core.domain.R;
 import com.xunmei.common.core.web.domain.AjaxResult;
+import com.xunmei.common.security.annotation.RequiresPermissions;
 import com.xunmei.core.resumption.domain.AppPlan;
 import com.xunmei.core.resumption.dto.DistributeDto;
 import com.xunmei.core.resumption.service.AppPlanService;
@@ -45,6 +46,7 @@ public class ApiPlanController {
      * @return
      */
     @PostMapping("/find")
+    @RequiresPermissions("core:plan:find")
     public AjaxResult hostList(@RequestBody AppPlanVo info) {
 
         Page<AppPlan> result = appPlanService.selectPage(info);
@@ -52,6 +54,7 @@ public class ApiPlanController {
     }
 
     @PostMapping("/distribute")
+    @RequiresPermissions("core:plan:distribute")
     public AjaxResult distribute(@RequestBody DistributeDto dto) {
         try {
             appPlanService.distributeToOrg(dto);
@@ -80,6 +83,7 @@ public class ApiPlanController {
      * @time 2022/5/5 14:39
      */
     @RequestMapping("/item/find")
+    @RequiresPermissions("core:plan:itemFind")
     public AjaxResult itemList(@RequestBody RuleItemVo info) {
         Page<RuleItemVo> result = appPlanService.selectItemPage(info);
         return AjaxResult.success(result);
@@ -94,6 +98,7 @@ public class ApiPlanController {
      * @time 2022/5/5 15:05
      */
     @RequestMapping("/find/rule")
+    @RequiresPermissions("core:plan:findRule")
     public AjaxResult findRule(@RequestBody RuleRequestVo info) {
         List<Map<String, Object>> list = appPlanService.findByOrg(info);
         return AjaxResult.success(list);
@@ -108,6 +113,7 @@ public class ApiPlanController {
      * @time 2022/5/5 16:37
      */
     @RequestMapping("/edit")
+    @RequiresPermissions("core:plan:edit")
     public AjaxResult edit(@RequestBody AppPlanVo info) {
         try {
             appPlanService.saveOrUpdatePlan(info);
@@ -129,6 +135,7 @@ public class ApiPlanController {
      */
     @ApiOperation(value = "获取详情")
     @GetMapping(value = "/find/{id}")
+    @RequiresPermissions("core:plan:findById")
     public AjaxResult findById(@PathVariable Long id) {
         AppPlanVo app = appPlanService.findById(id);
         return AjaxResult.success(app);
@@ -136,6 +143,7 @@ public class ApiPlanController {
 
     @ApiOperation(value = "获取详情")
     @GetMapping(value = "/getPointIds/{id}")
+//    @RequiresPermissions("core:plan:findById")
     public AjaxResult getPointIds(@PathVariable Long id) {
         return AjaxResult.success(appPlanService.selectItemIdsByPlanId(id));
     }
@@ -150,6 +158,7 @@ public class ApiPlanController {
      */
     @ApiOperation(value = "删除计划")
     @GetMapping(value = "/delete/{id}")
+    @RequiresPermissions("core:plan:delete")
     public AjaxResult deleted(@PathVariable Long id) {
         try {
             appPlanService.deleted(id);

+ 18 - 19
soc-modules/soc-modules-sync/src/main/java/com/xunmei/sync/service/impl/FJNXSyncServiceImpl.java

@@ -17,7 +17,6 @@ import com.xunmei.sync.mapper.FjnxOrgBusinessRelationMapper;
 import com.xunmei.sync.service.*;
 import com.xunmei.system.api.RemoteOrgService;
 import com.xunmei.system.api.RemoteUserService;
-import com.xunmei.system.api.domain.Org;
 import com.xunmei.system.api.domain.SysOrg;
 import com.xunmei.system.api.domain.SysUser;
 import io.netty.util.internal.StringUtil;
@@ -458,24 +457,24 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
 //    }
 
 
-    private Org FjnxOrgConvertToOrg(Org org, FJNXOrgDto fjnxOrgDto) {
-        org.setName(fjnxOrgDto.getOrgName());
-        org.setShortName(fjnxOrgDto.getShortName());
-        org.setGuid(fjnxOrgDto.getOrgCode());
-        org.setParentGuid(fjnxOrgDto.getOrgParent());
-        org.setCode(fjnxOrgDto.getOrgCode());
-        org.setPhone(fjnxOrgDto.getOrgPhone());
-        org.setAddress(fjnxOrgDto.getOrgAddress());
-//        org.setCodePath(fjnxOrgDto.getOrgPath());
-        org.setSort(fjnxOrgDto.getOrgOrder());
-        org.setUpdateTime(fjnxOrgDto.getUpdateTime());
-        org.setRemark(fjnxOrgDto.getRemark());
-        org.setLevel(fjnxOrgDto.getOrgPath().split("/").length);
-        // TODO 机构状态和机构类型转换
-        org.setIsLock(fjnxOrgDto.getUsableFlag());
-        return org;
-
-    }
+//    private Org FjnxOrgConvertToOrg(Org org, FJNXOrgDto fjnxOrgDto) {
+//        org.setName(fjnxOrgDto.getOrgName());
+//        org.setShortName(fjnxOrgDto.getShortName());
+//        org.setGuid(fjnxOrgDto.getOrgCode());
+//        org.setParentGuid(fjnxOrgDto.getOrgParent());
+//        org.setCode(fjnxOrgDto.getOrgCode());
+//        org.setPhone(fjnxOrgDto.getOrgPhone());
+//        org.setAddress(fjnxOrgDto.getOrgAddress());
+////        org.setCodePath(fjnxOrgDto.getOrgPath());
+//        org.setSort(fjnxOrgDto.getOrgOrder());
+//        org.setUpdateTime(fjnxOrgDto.getUpdateTime());
+//        org.setRemark(fjnxOrgDto.getRemark());
+//        org.setLevel(fjnxOrgDto.getOrgPath().split("/").length);
+//        // TODO 机构状态和机构类型转换
+//        org.setIsLock(fjnxOrgDto.getUsableFlag());
+//        return org;
+//
+//    }
 
     private SysOrg FjnxOrgConvertToSysOrg(SysOrg org, FjnxOrg fjnxOrg) {
         org.setName(fjnxOrg.getOrgName());

+ 8 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/domain/SysOrgExtend.java

@@ -41,6 +41,7 @@ public class SysOrgExtend extends BaseEntity {
      * 机构类型
      */
     @ApiModelProperty(value = "机构类型")
+    @JsonSerialize(using = ToStringSerializer.class)
     private Long orgType;
 
     /**
@@ -59,12 +60,14 @@ public class SysOrgExtend extends BaseEntity {
      * 是否自有产权
      */
     @ApiModelProperty(value = "是否自有产权")
+//    @JsonSerialize(using = ToStringSerializer.class)
     private Long ownership;
 
     /**
      * 是否区域外
      */
     @ApiModelProperty(value = "是否区域外")
+//    @JsonSerialize(using = ToStringSerializer.class)
     private Long outsideArea;
 
     /**
@@ -77,6 +80,7 @@ public class SysOrgExtend extends BaseEntity {
      * 有无保安
      */
     @ApiModelProperty(value = "有无保安")
+//    @JsonSerialize(using = ToStringSerializer.class)
     private Long askari;
 
     /**
@@ -89,6 +93,7 @@ public class SysOrgExtend extends BaseEntity {
      * 业务库类型
      */
     @ApiModelProperty(value = "业务库类型")
+    @JsonSerialize(using = ToStringSerializer.class)
     private Long businessLibraryType;
 
     /**
@@ -107,6 +112,7 @@ public class SysOrgExtend extends BaseEntity {
      * 是否有在行自助银行
      */
     @ApiModelProperty(value = "是否有在行自助银行")
+//    @JsonSerialize(using = ToStringSerializer.class)
     private Long selfServiceBank;
 
     /**
@@ -127,8 +133,10 @@ public class SysOrgExtend extends BaseEntity {
     @ApiModelProperty(value = "银行物防建设id")
     private Long bankPhysicalDefenseConstructionId;
     @ApiModelProperty(value = "平台品牌")
+    @JsonSerialize(using = ToStringSerializer.class)
     private Long platformBrand;
     @ApiModelProperty(value = "平台供应商品牌")
+    @JsonSerialize(using = ToStringSerializer.class)
     private Long platformSupplierBrand;
 
     /**