mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2025-01-31 03:28:21 +08:00
新增目录缓存对象
This commit is contained in:
parent
6a1dd19bb3
commit
d6c72d1508
18 changed files with 243 additions and 14 deletions
|
@ -0,0 +1,27 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.catalog.controller;
|
||||
|
||||
import com.skyeye.annotation.api.Api;
|
||||
import com.skyeye.catalog.service.CatalogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @ClassName: CatalogController
|
||||
* @Description: 目录管理控制层
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2022/11/28 21:58
|
||||
* @Copyright: 2022 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@RestController
|
||||
@Api(value = "目录管理", tags = "目录管理", modelName = "基本服务")
|
||||
public class CatalogController {
|
||||
|
||||
@Autowired
|
||||
private CatalogService catalogService;
|
||||
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.catalog.dao;
|
||||
|
||||
import com.skyeye.catalog.entity.Catalog;
|
||||
import com.skyeye.eve.dao.SkyeyeBaseMapper;
|
||||
|
||||
/**
|
||||
* @ClassName: CatalogDao
|
||||
* @Description: 目录管理数据接口层
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2022/11/28 21:58
|
||||
* @Copyright: 2022 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
public interface CatalogDao extends SkyeyeBaseMapper<Catalog> {
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.catalog.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.skyeye.annotation.api.ApiModel;
|
||||
import com.skyeye.annotation.api.ApiModelProperty;
|
||||
import com.skyeye.annotation.cache.RedisCacheField;
|
||||
import com.skyeye.annotation.unique.UniqueField;
|
||||
import com.skyeye.common.constans.CacheConstants;
|
||||
import com.skyeye.common.constans.RedisConstants;
|
||||
import com.skyeye.common.entity.features.OperatorUserInfo;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName: Catalog
|
||||
* @Description: 目录信息实体类
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2022/11/28 22:07
|
||||
* @Copyright: 2022 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@Data
|
||||
@UniqueField(value = {"name", "parentId", "objectKey", "type"})
|
||||
@RedisCacheField(name = CacheConstants.SKYEYE_CATALOG_CACHE_KEY, cacheTime = RedisConstants.THIRTY_DAY_SECONDS)
|
||||
@TableName(value = "skyeye_catalog")
|
||||
@ApiModel("目录信息实体类")
|
||||
public class Catalog extends OperatorUserInfo {
|
||||
|
||||
@TableId("id")
|
||||
@ApiModelProperty(value = "主键id。为空时新增,不为空时编辑")
|
||||
private String id;
|
||||
|
||||
@TableField(value = "`name`")
|
||||
@ApiModelProperty(value = "目录名称", required = "required")
|
||||
private String name;
|
||||
|
||||
@TableField(value = "parent_id")
|
||||
@ApiModelProperty(value = "所属父节点id", required = "required")
|
||||
private String parentId;
|
||||
|
||||
@TableField(value = "object_key")
|
||||
@ApiModelProperty(value = "目录所属业务对象", required = "required")
|
||||
private String objectKey;
|
||||
|
||||
@TableField(value = "type")
|
||||
@ApiModelProperty(value = "目录类型 1. 公共 2.私有", required = "required,num")
|
||||
private Integer type;
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.catalog.service;
|
||||
|
||||
import com.skyeye.base.business.service.SkyeyeBusinessService;
|
||||
import com.skyeye.catalog.entity.Catalog;
|
||||
|
||||
/**
|
||||
* @ClassName: CatalogService
|
||||
* @Description: 目录管理服务接口层
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2022/11/28 21:59
|
||||
* @Copyright: 2022 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
public interface CatalogService extends SkyeyeBusinessService<Catalog> {
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.catalog.service.impl;
|
||||
|
||||
import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl;
|
||||
import com.skyeye.catalog.dao.CatalogDao;
|
||||
import com.skyeye.catalog.entity.Catalog;
|
||||
import com.skyeye.catalog.service.CatalogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @ClassName: CatalogServiceImpl
|
||||
* @Description: 目录管理服务层
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2022/11/28 21:59
|
||||
* @Copyright: 2022 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@Service
|
||||
public class CatalogServiceImpl extends SkyeyeBusinessServiceImpl<CatalogDao, Catalog> implements CatalogService {
|
||||
|
||||
@Autowired
|
||||
private CatalogDao catalogDao;
|
||||
|
||||
}
|
|
@ -11,7 +11,7 @@ import com.skyeye.annotation.api.ApiOperation;
|
|||
import com.skyeye.common.object.InputObject;
|
||||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.contacts.service.ContactsService;
|
||||
import com.skyeye.eve.entity.contacts.ContactsMation;
|
||||
import com.skyeye.contacts.entity.ContactsMation;
|
||||
import com.skyeye.eve.entity.object.query.BaseServerQueryDo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
package com.skyeye.contacts.dao;
|
||||
|
||||
import com.skyeye.eve.dao.SkyeyeBaseMapper;
|
||||
import com.skyeye.eve.entity.contacts.ContactsMation;
|
||||
import com.skyeye.contacts.entity.ContactsMation;
|
||||
import com.skyeye.eve.entity.object.query.BaseServerQueryDo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.entity.contacts;
|
||||
package com.skyeye.contacts.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
|
@ -12,6 +12,7 @@ import com.skyeye.annotation.api.ApiModel;
|
|||
import com.skyeye.annotation.api.ApiModelProperty;
|
||||
import com.skyeye.annotation.cache.RedisCacheField;
|
||||
import com.skyeye.annotation.unique.UniqueField;
|
||||
import com.skyeye.common.constans.CacheConstants;
|
||||
import com.skyeye.common.constans.RedisConstants;
|
||||
import com.skyeye.common.entity.features.OperatorUserInfo;
|
||||
import lombok.Data;
|
||||
|
@ -26,7 +27,7 @@ import lombok.Data;
|
|||
*/
|
||||
@Data
|
||||
@UniqueField(value = {"name", "objectId"})
|
||||
@RedisCacheField(name = "skyeye:contacts", cacheTime = RedisConstants.THIRTY_DAY_SECONDS)
|
||||
@RedisCacheField(name = CacheConstants.SKYEYE_CONTACTS_CACHE_KEY, cacheTime = RedisConstants.THIRTY_DAY_SECONDS)
|
||||
@TableName(value = "skyeye_contacts")
|
||||
@ApiModel("联系人信息实体类")
|
||||
public class ContactsMation extends OperatorUserInfo {
|
|
@ -5,7 +5,7 @@
|
|||
package com.skyeye.contacts.service;
|
||||
|
||||
import com.skyeye.base.business.service.SkyeyeBusinessService;
|
||||
import com.skyeye.eve.entity.contacts.ContactsMation;
|
||||
import com.skyeye.contacts.entity.ContactsMation;
|
||||
|
||||
public interface ContactsService extends SkyeyeBusinessService<ContactsMation> {
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import com.skyeye.common.object.InputObject;
|
|||
import com.skyeye.common.util.ToolUtil;
|
||||
import com.skyeye.contacts.dao.ContactsDao;
|
||||
import com.skyeye.contacts.service.ContactsService;
|
||||
import com.skyeye.eve.entity.contacts.ContactsMation;
|
||||
import com.skyeye.contacts.entity.ContactsMation;
|
||||
import com.skyeye.eve.entity.object.query.BaseServerQueryDo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
|
@ -2,19 +2,29 @@
|
|||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.controller;
|
||||
package com.skyeye.enclosure.controller;
|
||||
|
||||
import com.skyeye.annotation.api.Api;
|
||||
import com.skyeye.annotation.api.ApiImplicitParam;
|
||||
import com.skyeye.annotation.api.ApiImplicitParams;
|
||||
import com.skyeye.annotation.api.ApiOperation;
|
||||
import com.skyeye.common.object.InputObject;
|
||||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.eve.service.SysEnclosureService;
|
||||
import com.skyeye.enclosure.service.SysEnclosureService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @ClassName: SysEnclosureController
|
||||
* @Description: 附件管理控制类
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2022/11/28 21:39
|
||||
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@RestController
|
||||
@Api(value = "附件管理", tags = "附件管理", modelName = "基本服务")
|
||||
public class SysEnclosureController {
|
||||
|
||||
@Autowired
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.dao;
|
||||
package com.skyeye.enclosure.dao;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.enclosure.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.skyeye.annotation.api.ApiModel;
|
||||
import com.skyeye.annotation.api.ApiModelProperty;
|
||||
import com.skyeye.annotation.cache.RedisCacheField;
|
||||
import com.skyeye.annotation.unique.UniqueField;
|
||||
import com.skyeye.common.constans.CacheConstants;
|
||||
import com.skyeye.common.constans.RedisConstants;
|
||||
import com.skyeye.common.entity.features.OperatorUserInfo;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName: Enclosure
|
||||
* @Description: 附件信息实体类
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2022/11/28 21:35
|
||||
* @Copyright: 2022 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@Data
|
||||
@RedisCacheField(name = CacheConstants.SKYEYE_ENCLOSURE_CACHE_KEY, cacheTime = RedisConstants.THIRTY_DAY_SECONDS)
|
||||
@TableName(value = "sys_enclosure")
|
||||
@ApiModel("附件信息实体类")
|
||||
public class Enclosure extends OperatorUserInfo {
|
||||
|
||||
@TableId("id")
|
||||
@ApiModelProperty(value = "主键id。为空时新增,不为空时编辑")
|
||||
private String id;
|
||||
|
||||
@TableField(value = "`name`")
|
||||
@ApiModelProperty(value = "附件原始名称", required = "required")
|
||||
private String name;
|
||||
|
||||
@TableField(value = "path")
|
||||
@ApiModelProperty(value = "文件地址", required = "required")
|
||||
private String path;
|
||||
|
||||
@TableField(value = "type")
|
||||
@ApiModelProperty(value = "文件类型", required = "required")
|
||||
private String type;
|
||||
|
||||
@TableField(value = "size")
|
||||
@ApiModelProperty(value = "文件大小", required = "required")
|
||||
private String size;
|
||||
|
||||
@TableField(value = "size_type")
|
||||
@ApiModelProperty(value = "文件大小单位 bytes", required = "required")
|
||||
private String sizeType;
|
||||
|
||||
@TableField(value = "catalog")
|
||||
@ApiModelProperty(value = "文件所属目录", required = "required")
|
||||
private String catalog;
|
||||
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.service;
|
||||
package com.skyeye.enclosure.service;
|
||||
|
||||
import com.skyeye.common.object.InputObject;
|
||||
import com.skyeye.common.object.OutputObject;
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.service.impl;
|
||||
package com.skyeye.enclosure.service.impl;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.skyeye.common.constans.CommonNumConstants;
|
||||
|
@ -11,8 +11,8 @@ import com.skyeye.common.object.InputObject;
|
|||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.common.object.PutObject;
|
||||
import com.skyeye.common.util.*;
|
||||
import com.skyeye.eve.dao.SysEnclosureDao;
|
||||
import com.skyeye.eve.service.SysEnclosureService;
|
||||
import com.skyeye.enclosure.dao.SysEnclosureDao;
|
||||
import com.skyeye.enclosure.service.SysEnclosureService;
|
||||
import com.skyeye.exception.CustomException;
|
||||
import com.skyeye.jedis.JedisClientService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -0,0 +1,6 @@
|
|||
<?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.skyeye.catalog.dao.CatalogDao">
|
||||
|
||||
|
||||
</mapper>
|
|
@ -1,6 +1,6 @@
|
|||
<?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.skyeye.eve.dao.SysEnclosureDao">
|
||||
<mapper namespace="com.skyeye.enclosure.dao.SysEnclosureDao">
|
||||
|
||||
<select id="querySysEnclosureFirstTypeListByUserId" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT
|
|
@ -39,6 +39,7 @@ import java.util.Properties;
|
|||
@Configuration
|
||||
@MapperScan(basePackages = {
|
||||
"com.skyeye.*.dao",
|
||||
"com.skyeye.eve.*.dao",
|
||||
"com.skyeye.dao"}, sqlSessionFactoryRef = "baseSqlSessionFactory")
|
||||
public class BaseDataSourceConfig {
|
||||
|
||||
|
|
Loading…
Reference in a new issue