Procházet zdrojové kódy

文化token验证

master
liugw před 5 roky
rodič
revize
3e86f732ff
100 změnil soubory, kde provedl 5782 přidání a 159 odebrání
  1. 1
    15
      pom.xml
  2. 9
    1
      src/main/java/com/xdf/creative/CreativeApplication.java
  3. 4
    0
      src/main/java/com/xdf/creative/base/params/IdParam.java
  4. 49
    0
      src/main/java/com/xdf/creative/base/params/creative/InfoAttachmentQueryParam.java
  5. 52
    0
      src/main/java/com/xdf/creative/base/params/creative/InfoBackQueryParam.java
  6. 82
    0
      src/main/java/com/xdf/creative/base/params/creative/InfoContentAddQueryParam.java
  7. 53
    0
      src/main/java/com/xdf/creative/base/params/creative/InfoContentAuditQueryParam.java
  8. 55
    0
      src/main/java/com/xdf/creative/base/params/creative/InfoContentBackSearchQueryParam.java
  9. 39
    0
      src/main/java/com/xdf/creative/base/params/creative/InfoContentHomePageQueryParam.java
  10. 93
    0
      src/main/java/com/xdf/creative/base/params/creative/InfoContentQueryParam.java
  11. 35
    0
      src/main/java/com/xdf/creative/base/params/creative/InfoContentWebSearchQueryParam.java
  12. 48
    0
      src/main/java/com/xdf/creative/base/params/creative/InfoDetailQueryParam.java
  13. 59
    0
      src/main/java/com/xdf/creative/base/params/creative/InfoTypeQueryParam.java
  14. 49
    0
      src/main/java/com/xdf/creative/base/params/creative/InfoUrlQueryParam.java
  15. 58
    0
      src/main/java/com/xdf/creative/base/params/creative/InfoWordManageQueryParam.java
  16. 53
    0
      src/main/java/com/xdf/creative/base/params/creative/OauthTokenQueryParam.java
  17. 65
    0
      src/main/java/com/xdf/creative/base/params/creative/SysAccountLogQueryParam.java
  18. 65
    0
      src/main/java/com/xdf/creative/base/params/creative/SysOperateLogQueryParam.java
  19. 1
    1
      src/main/java/com/xdf/creative/base/params/creative/SysOrganizeQueryParam.java
  20. 35
    0
      src/main/java/com/xdf/creative/base/params/creative/SysRoleImpowerPermissionQueryParam.java
  21. 25
    0
      src/main/java/com/xdf/creative/base/params/creative/SysRoleQueryParam.java
  22. 65
    0
      src/main/java/com/xdf/creative/base/params/creative/SysUserAddQueryParam.java
  23. 53
    0
      src/main/java/com/xdf/creative/base/params/creative/SysUserBackQueryParam.java
  24. 40
    0
      src/main/java/com/xdf/creative/base/params/creative/SysUserQueryParam.java
  25. 60
    0
      src/main/java/com/xdf/creative/base/params/creative/SysUserUpdateQueryParam.java
  26. 3
    0
      src/main/java/com/xdf/creative/base/params/creative/UpdatePasswordParam.java
  27. 11
    11
      src/main/java/com/xdf/creative/base/service/BaseService.java
  28. 48
    45
      src/main/java/com/xdf/creative/base/service/impl/BaseServiceImpl.java
  29. 40
    0
      src/main/java/com/xdf/creative/base/vo/creative/InfoAttachmentQueryVo.java
  30. 43
    0
      src/main/java/com/xdf/creative/base/vo/creative/InfoBackQueryVo.java
  31. 111
    0
      src/main/java/com/xdf/creative/base/vo/creative/InfoContentAllQueryVo.java
  32. 73
    0
      src/main/java/com/xdf/creative/base/vo/creative/InfoContentBackSearchQueryVo.java
  33. 49
    0
      src/main/java/com/xdf/creative/base/vo/creative/InfoContentHomePageQueryVo.java
  34. 86
    0
      src/main/java/com/xdf/creative/base/vo/creative/InfoContentQueryVo.java
  35. 76
    0
      src/main/java/com/xdf/creative/base/vo/creative/InfoContentRecycleSearchQueryVo.java
  36. 87
    0
      src/main/java/com/xdf/creative/base/vo/creative/InfoContentWebAllQueryVo.java
  37. 55
    0
      src/main/java/com/xdf/creative/base/vo/creative/InfoContentWebSearchQueryVo.java
  38. 40
    0
      src/main/java/com/xdf/creative/base/vo/creative/InfoDetailQueryVo.java
  39. 52
    0
      src/main/java/com/xdf/creative/base/vo/creative/InfoTypeQueryVo.java
  40. 40
    0
      src/main/java/com/xdf/creative/base/vo/creative/InfoUrlQueryVo.java
  41. 49
    0
      src/main/java/com/xdf/creative/base/vo/creative/InfoWordManageQueryVo.java
  42. 42
    0
      src/main/java/com/xdf/creative/base/vo/creative/OauthTokenQueryVo.java
  43. 54
    0
      src/main/java/com/xdf/creative/base/vo/creative/SysAccountLogQueryVo.java
  44. 52
    0
      src/main/java/com/xdf/creative/base/vo/creative/SysOperateLogQueryVo.java
  45. 59
    0
      src/main/java/com/xdf/creative/base/vo/creative/SysRoleListQueryVo.java
  46. 87
    0
      src/main/java/com/xdf/creative/base/vo/creative/SysUserBackQueryVo.java
  47. 67
    0
      src/main/java/com/xdf/creative/base/vo/creative/SysUserInfoQueryVo.java
  48. 34
    0
      src/main/java/com/xdf/creative/config/CorsFilter.java
  49. 34
    0
      src/main/java/com/xdf/creative/config/SpringBootPlusWebMvcConfig.java
  50. 530
    0
      src/main/java/com/xdf/creative/config/xss/HTMLFilter.java
  51. 44
    0
      src/main/java/com/xdf/creative/config/xss/XssFilter.java
  52. 147
    0
      src/main/java/com/xdf/creative/config/xss/XssHttpServletRequestWrapper.java
  53. 3
    1
      src/main/java/com/xdf/creative/enums/ApiCode.java
  54. 27
    0
      src/main/java/com/xdf/creative/enums/InfoAuditTypeEnum.java
  55. 26
    0
      src/main/java/com/xdf/creative/enums/InfoBackTypeEnum.java
  56. 29
    0
      src/main/java/com/xdf/creative/enums/InfoOnlineStateEnum.java
  57. 31
    0
      src/main/java/com/xdf/creative/enums/InfoPublicPropertyTypeEnum.java
  58. 33
    0
      src/main/java/com/xdf/creative/enums/InfoStateTypeEnum.java
  59. 26
    0
      src/main/java/com/xdf/creative/enums/LogTypeEnum.java
  60. 32
    0
      src/main/java/com/xdf/creative/enums/OrganizeTypeEnum.java
  61. 35
    0
      src/main/java/com/xdf/creative/enums/ServiceFileDirEnum.java
  62. 29
    0
      src/main/java/com/xdf/creative/enums/ServiceFileUploadDirEnum.java
  63. 27
    0
      src/main/java/com/xdf/creative/enums/ServiceFileUploadTypeEnum.java
  64. 28
    1
      src/main/java/com/xdf/creative/enums/StatusCode.java
  65. 97
    0
      src/main/java/com/xdf/creative/module/controller/FileUploadController.java
  66. 90
    0
      src/main/java/com/xdf/creative/module/controller/InfoAttachmentController.java
  67. 90
    0
      src/main/java/com/xdf/creative/module/controller/InfoBackController.java
  68. 294
    0
      src/main/java/com/xdf/creative/module/controller/InfoContentController.java
  69. 90
    0
      src/main/java/com/xdf/creative/module/controller/InfoDetailController.java
  70. 97
    0
      src/main/java/com/xdf/creative/module/controller/InfoTypeController.java
  71. 90
    0
      src/main/java/com/xdf/creative/module/controller/InfoUrlController.java
  72. 95
    0
      src/main/java/com/xdf/creative/module/controller/InfoWordManageController.java
  73. 90
    0
      src/main/java/com/xdf/creative/module/controller/OauthTokenController.java
  74. 97
    0
      src/main/java/com/xdf/creative/module/controller/SysAccountLogController.java
  75. 76
    0
      src/main/java/com/xdf/creative/module/controller/SysOperateLogController.java
  76. 45
    22
      src/main/java/com/xdf/creative/module/controller/SysPermissionController.java
  77. 0
    2
      src/main/java/com/xdf/creative/module/controller/SysRegionController.java
  78. 36
    15
      src/main/java/com/xdf/creative/module/controller/SysRoleController.java
  79. 122
    41
      src/main/java/com/xdf/creative/module/controller/SysUserController.java
  80. 32
    0
      src/main/java/com/xdf/creative/module/entity/FileUploadQuery.java
  81. 46
    0
      src/main/java/com/xdf/creative/module/entity/InfoAttachment.java
  82. 49
    0
      src/main/java/com/xdf/creative/module/entity/InfoBack.java
  83. 99
    0
      src/main/java/com/xdf/creative/module/entity/InfoContent.java
  84. 44
    0
      src/main/java/com/xdf/creative/module/entity/InfoDetail.java
  85. 62
    0
      src/main/java/com/xdf/creative/module/entity/InfoType.java
  86. 46
    0
      src/main/java/com/xdf/creative/module/entity/InfoUrl.java
  87. 51
    0
      src/main/java/com/xdf/creative/module/entity/InfoWordManage.java
  88. 50
    0
      src/main/java/com/xdf/creative/module/entity/OauthToken.java
  89. 55
    0
      src/main/java/com/xdf/creative/module/entity/SysAccountLog.java
  90. 54
    0
      src/main/java/com/xdf/creative/module/entity/SysOperateLog.java
  91. 1
    1
      src/main/java/com/xdf/creative/module/entity/SysOrganize.java
  92. 4
    1
      src/main/java/com/xdf/creative/module/entity/SysRole.java
  93. 1
    2
      src/main/java/com/xdf/creative/module/entity/SysUser.java
  94. 42
    0
      src/main/java/com/xdf/creative/module/mapper/InfoAttachmentMapper.java
  95. 42
    0
      src/main/java/com/xdf/creative/module/mapper/InfoBackMapper.java
  96. 82
    0
      src/main/java/com/xdf/creative/module/mapper/InfoContentMapper.java
  97. 42
    0
      src/main/java/com/xdf/creative/module/mapper/InfoDetailMapper.java
  98. 42
    0
      src/main/java/com/xdf/creative/module/mapper/InfoTypeMapper.java
  99. 42
    0
      src/main/java/com/xdf/creative/module/mapper/InfoUrlMapper.java
  100. 0
    0
      src/main/java/com/xdf/creative/module/mapper/InfoWordManageMapper.java

+ 1
- 15
pom.xml Zobrazit soubor

@@ -179,20 +179,6 @@
<version>1.11</version>
</dependency>

<!-- shiro ehcache (shiro缓存)-->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-ehcache</artifactId>
<version>1.4.0</version>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>


<!-- 分页支持pageHelper -->
<dependency>
<groupId>cn.hutool</groupId>
@@ -209,7 +195,7 @@


<build>
<finalName>cultural_creative_server</finalName>
<finalName>cultural_server</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>

+ 9
- 1
src/main/java/com/xdf/creative/CreativeApplication.java Zobrazit soubor

@@ -5,8 +5,10 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.context.request.RequestContextListener;
import springfox.documentation.swagger2.annotations.EnableSwagger2;


@@ -14,13 +16,19 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableSwagger2
@ComponentScan(value = "com.xdf.**.**")
@MapperScan({"com.xdf.creative.**.mapper"})
@ServletComponentScan
@EnableTransactionManagement
@SpringBootApplication
@ServletComponentScan
public class CreativeApplication {

public static void main(String[] args) {
SpringApplication.run(CreativeApplication.class, args);
}

@Bean
public RequestContextListener requestContextListener(){
return new RequestContextListener();
}


}

+ 4
- 0
src/main/java/com/xdf/creative/base/params/IdParam.java Zobrazit soubor

@@ -1,6 +1,7 @@
package com.xdf.creative.base.params;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
@@ -17,4 +18,7 @@ public class IdParam implements Serializable {

@NotNull(message = "ID不能为空")
private Long id;

@ApiModelProperty(value = "标题")
private String value;
}

+ 49
- 0
src/main/java/com/xdf/creative/base/params/creative/InfoAttachmentQueryParam.java Zobrazit soubor

@@ -0,0 +1,49 @@
package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
* <p>
* 相关附件表 查询参数对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoAttachmentQueryParam对象", description = "相关附件表查询参数")
public class InfoAttachmentQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;


@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
@NotNull(message = "主键id不能为空")
private Long id;

@ApiModelProperty(value = "外键id")
private String foreignId;

@ApiModelProperty(value = "附件名称")
private String attachmentName;

@ApiModelProperty(value = "附件地址")
private String attachmentAddress;

@ApiModelProperty(value = "创建时间")
private Date createTime;


}

+ 52
- 0
src/main/java/com/xdf/creative/base/params/creative/InfoBackQueryParam.java Zobrazit soubor

@@ -0,0 +1,52 @@
package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
* <p>
* 信息退回 查询参数对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoBackQueryParam对象", description = "信息退回查询参数")
public class InfoBackQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;


@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
@NotNull(message = "主键id不能为空")
private Long id;

@ApiModelProperty(value = "外键id")
private String foreignId;

@ApiModelProperty(value = "链接名称")
private String reason;

@ApiModelProperty(value = "退回类型 1、初审退回 2、终审退回")
private Integer backType;

@ApiModelProperty(value = "退回操作人")
private Long createUser;

@ApiModelProperty(value = "退回时间")
private Date backTime;


}

+ 82
- 0
src/main/java/com/xdf/creative/base/params/creative/InfoContentAddQueryParam.java Zobrazit soubor

@@ -0,0 +1,82 @@
package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import com.xdf.creative.module.entity.InfoAttachment;
import com.xdf.creative.module.entity.InfoDetail;
import com.xdf.creative.module.entity.InfoUrl;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
* <p>
* 信息内容 查询参数对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoContentQueryParam对象", description = "信息内容查询参数")
public class InfoContentAddQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;


@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
private Long id;

@ApiModelProperty(value = "标题")
private String title;

@ApiModelProperty(value = "栏目类型id")
private Long infoTypeId;

@ApiModelProperty(value = "内容类型 0、图文形式 1 、超链接形式")
private Integer contentType;


@ApiModelProperty(value = "内容状态 0 、草稿 1、待初审 2、待终审 3 终审通过 4、初审退回 5、终审退回 6 初审不通过 7终审不通过")
private Integer state;

@ApiModelProperty(value = "图片地址")
private String imageUrl;

@ApiModelProperty(value = "来源地址")
private String sourceUrl;

@ApiModelProperty(value = "作者")
private String author;

@ApiModelProperty(value = "外键id")
private String foreignId;

@ApiModelProperty(value = "排序")
private Integer sort;


/**
* 信息详情
*/
private InfoDetail infoDetail;

/**
* 附件列表
*/
private List<InfoAttachment> attachmentList;

/**
* url列表
*/
private List<InfoUrl> urlList;
}

+ 53
- 0
src/main/java/com/xdf/creative/base/params/creative/InfoContentAuditQueryParam.java Zobrazit soubor

@@ -0,0 +1,53 @@
package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import com.xdf.creative.module.entity.InfoAttachment;
import com.xdf.creative.module.entity.InfoDetail;
import com.xdf.creative.module.entity.InfoUrl;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
* <p>
* 信息内容 查询参数对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoContentQueryParam对象", description = "信息内容查询参数")
public class InfoContentAuditQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;


@ApiModelProperty(value = "主键id")
@NotNull(message = "ID不能为空")
@TableId(value = "id", type = IdType.AUTO)
private Long id;

@ApiModelProperty(value = "标题")
private String title;

@ApiModelProperty(value = "审核状态 1 、审核 2、审核不通过 3、审核退回")
private Integer auditState;

@ApiModelProperty(value = "内容状态 0 、草稿 1、待初审 2、待终审 3 终审通过 4、初审退回 5、终审退回 6 初审不通过 7终审不通过 ")
private Integer state;

@ApiModelProperty(value = "排序")
private Integer sort;

@ApiModelProperty(value = "退回意见")
private String backIdea;
}

+ 55
- 0
src/main/java/com/xdf/creative/base/params/creative/InfoContentBackSearchQueryParam.java Zobrazit soubor

@@ -0,0 +1,55 @@
package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
* <p>
* 信息内容 查询参数对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoContentQueryParam对象", description = "信息内容查询参数")
public class InfoContentBackSearchQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
private Long id;

@ApiModelProperty(value = "标题")
private String title;

@ApiModelProperty(value = "栏目类型id")
private Long infoTypeId;

@ApiModelProperty(value = "内容状态 0 、草稿 1、待初审 2、待终审 3 终审通过 4、初审退回 5、终审退回 6 初审不通过 7终审不通过")
private Integer state;

@ApiModelProperty(value = "用户名")
private String username;

@ApiModelProperty(value = "昵称")
private String nickname;

@ApiModelProperty(value = "是否置顶 0否 1是")
private Integer istop;

@ApiModelProperty(value = "上下状态 0 下线 1上线")
private Integer onlineType;

}

+ 39
- 0
src/main/java/com/xdf/creative/base/params/creative/InfoContentHomePageQueryParam.java Zobrazit soubor

@@ -0,0 +1,39 @@
package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
* <p>
* 信息内容 查询参数对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "InfoContentQueryParam对象", description = "信息内容查询参数")
public class InfoContentHomePageQueryParam {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "栏目id")
@NotBlank(message = "请选择栏目类型")
private String typeId;


@ApiModelProperty(value = "内容大小")
@NotNull(message = "请选择显示条数")
private Integer contentSize;

}

+ 93
- 0
src/main/java/com/xdf/creative/base/params/creative/InfoContentQueryParam.java Zobrazit soubor

@@ -0,0 +1,93 @@
package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
* <p>
* 信息内容 查询参数对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoContentQueryParam对象", description = "信息内容查询参数")
public class InfoContentQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;


@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
@NotNull(message = "主键id不能为空")
private Long id;

@ApiModelProperty(value = "标题")
private String title;

@ApiModelProperty(value = "栏目类型id")
private Long infoTypeId;

@ApiModelProperty(value = "内容类型 0、图文形式 1 、超链接形式")
private Integer contentType;

@ApiModelProperty(value = "图片地址")
private String imageUrl;

@ApiModelProperty(value = "来源地址")
private String sourceUrl;

@ApiModelProperty(value = "作者")
private String author;

@ApiModelProperty(value = "外键id")
private String foreignId;

@ApiModelProperty(value = "内容状态 0 、草稿 1、待初审 2、待终审 3 终审通过 4、初审退回 5、终审退回 6 初审不通过 7终审不通过")
private Integer state;

@ApiModelProperty(value = "创建用户")
private Long createUser;

@ApiModelProperty(value = "创建时间")
private Date createTime;

@ApiModelProperty(value = "初审人员")
private Long firstAuditUser;

@ApiModelProperty(value = "初审时间")
private Date firstAuditTime;

@ApiModelProperty(value = "终审人员")
private Long finalAuditUser;

@ApiModelProperty(value = "终审时间")
private Date finalAuditTime;

@ApiModelProperty(value = "排序")
private Integer sort;

@ApiModelProperty(value = "是否置顶 0否 1是")
private Integer istop;

@ApiModelProperty(value = "置顶时间")
private Date istopTime;

@ApiModelProperty(value = "上下状态 0 下线 1上线")
private Integer onlineType;

@ApiModelProperty(value = "逻辑删除,0:未删除,1:已删除(收入回收站)")
private Integer deleted;

}

+ 35
- 0
src/main/java/com/xdf/creative/base/params/creative/InfoContentWebSearchQueryParam.java Zobrazit soubor

@@ -0,0 +1,35 @@
package com.xdf.creative.base.params.creative;

import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
* <p>
* 信息内容 查询参数对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoContentQueryParam对象", description = "信息内容查询参数")
public class InfoContentWebSearchQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "栏目id")
private String typeId;

@ApiModelProperty(value = "标题")
@NotBlank(message = "搜索内容不能为空!")
private String title;

}

+ 48
- 0
src/main/java/com/xdf/creative/base/params/creative/InfoDetailQueryParam.java Zobrazit soubor

@@ -0,0 +1,48 @@
package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;

/**
* <p>
* 信息详情 查询参数对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoDetailQueryParam对象", description = "信息详情查询参数")
public class InfoDetailQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;


@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
@NotNull(message = "主键id不能为空")
private Long id;

@ApiModelProperty(value = "摘要")
private String digest;

@ApiModelProperty(value = "正文")
private String content;

@ApiModelProperty(value = "外键id")
private String foreignId;

@ApiModelProperty(value = "作者")
private String hyperlink;


}

+ 59
- 0
src/main/java/com/xdf/creative/base/params/creative/InfoTypeQueryParam.java Zobrazit soubor

@@ -0,0 +1,59 @@
package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
* <p>
* 栏目类型 查询参数对象
* </p>
*
* @author lgw
* @date 2020-03-06
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoTypeQueryParam对象", description = "栏目类型查询参数")
public class InfoTypeQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;


@ApiModelProperty(value = "主键id")
private Long id;

@ApiModelProperty(value = "栏目id")
private String typeId;

@ApiModelProperty(value = "栏目父id")
private String typeParentId;

@ApiModelProperty(value = "栏目名称")
private String infoName;

@ApiModelProperty(value = "模型")
private String modelName;

@ApiModelProperty(value = "排列顺序")
private Integer sort;

@ApiModelProperty(value = "是否显示 0 不显示 1显示")
private Integer state;

@ApiModelProperty(value = "创建时间")
private Date createTime;

@ApiModelProperty(value = "创建用户")
private Long createUserId;


}

+ 49
- 0
src/main/java/com/xdf/creative/base/params/creative/InfoUrlQueryParam.java Zobrazit soubor

@@ -0,0 +1,49 @@
package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
* <p>
* 相关链接 查询参数对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoUrlQueryParam对象", description = "相关链接查询参数")
public class InfoUrlQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;


@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
@NotNull(message = "主键id不能为空")
private Long id;

@ApiModelProperty(value = "外键id")
private String foreignId;

@ApiModelProperty(value = "链接名称")
private String name;

@ApiModelProperty(value = "链接url")
private String url;

@ApiModelProperty(value = "创建时间")
private Date createTime;


}

+ 58
- 0
src/main/java/com/xdf/creative/base/params/creative/InfoWordManageQueryParam.java Zobrazit soubor

@@ -0,0 +1,58 @@
package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
* <p>
* 词管理 查询参数对象
* </p>
*
* @author lgw
* @date 2020-03-06
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoWordManageQueryParam对象", description = "词管理查询参数")
public class InfoWordManageQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;


@TableId(value = "id", type = IdType.AUTO)
private Long id;

@ApiModelProperty(value = "敏感词")
private String word;

@ApiModelProperty(value = "替换内容")
private String replaceContent;

@ApiModelProperty(value = "维护人")
private Long accendantUser;

@ApiModelProperty(value = "开始维护时间")
private Date startAccendantTime;

@ApiModelProperty(value = "结束维护时间")
private Date endAccendantTime;

@ApiModelProperty(value = "修改时间")
private Date updateTime;

@ApiModelProperty(value = "用户名")
private String userName;

@ApiModelProperty(value = "昵称")
private String nickName;


}

+ 53
- 0
src/main/java/com/xdf/creative/base/params/creative/OauthTokenQueryParam.java Zobrazit soubor

@@ -0,0 +1,53 @@
package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
* <p>
* 查询参数对象
* </p>
*
* @author lgw
* @date 2020-03-05
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "OauthTokenQueryParam对象", description = "查询参数")
public class OauthTokenQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;

@TableId(value = "id", type = IdType.AUTO)
@NotNull(message = "不能为空")
private Long id;

@NotBlank(message = "不能为空")
private String accessToken;

@NotNull(message = "不能为空")
private Long userId;

private String permissions;

private String roles;

private Integer refreshToken;

private Date expireTime;

private Date createTime;

private Date updateTime;


}

+ 65
- 0
src/main/java/com/xdf/creative/base/params/creative/SysAccountLogQueryParam.java Zobrazit soubor

@@ -0,0 +1,65 @@
package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
* <p>
* 账户登录日志 查询参数对象
* </p>
*
* @author lgw
* @date 2020-03-06
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SysAccountLogQueryParam对象", description = "账户登录日志查询参数")
public class SysAccountLogQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;


@ApiModelProperty(value = "主键id")
private Long id;

@ApiModelProperty(value = "用户id")
private Long userId;

@ApiModelProperty(value = "ip地址")
private String ip;

@ApiModelProperty(value = "操作名称")
private String name;

@ApiModelProperty(value = "操作内容")
private String content;

@ApiModelProperty(value = "类型 1登录成功 2登录失败")
private Integer type;

@ApiModelProperty(value = "开始创建时间")
private Date startCreateTime;

@ApiModelProperty(value = "结束创建时间")
private Date endCreateTime;

@ApiModelProperty(value = "方法名称")
private String method;

@ApiModelProperty(value = "用户名")
private String userName;

@ApiModelProperty(value = "昵称")
private String nickName;


}

+ 65
- 0
src/main/java/com/xdf/creative/base/params/creative/SysOperateLogQueryParam.java Zobrazit soubor

@@ -0,0 +1,65 @@
package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
* <p>
* 账户操作日志 查询参数对象
* </p>
*
* @author lgw
* @date 2020-03-06
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SysOperateLogQueryParam对象", description = "账户操作日志查询参数")
public class SysOperateLogQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;


@ApiModelProperty(value = "主键id")
private Long id;

@ApiModelProperty(value = "用户id")
private Long userId;

@ApiModelProperty(value = "ip地址")
private String ip;

@ApiModelProperty(value = "操作名称")
private String name;

@ApiModelProperty(value = "操作内容")
private String content;

@ApiModelProperty(value = "类型 1登录成功 2登录失败")
private Integer type;

@ApiModelProperty(value = "开始创建时间")
private Date startCreateTime;

@ApiModelProperty(value = "结束创建时间")
private Date endCreateTime;

@ApiModelProperty(value = "方法名称")
private String method;

@ApiModelProperty(value = "用户名")
private String userName;

@ApiModelProperty(value = "昵称")
private String nickName;


}

+ 1
- 1
src/main/java/com/xdf/creative/base/params/creative/SysOrganizeQueryParam.java Zobrazit soubor

@@ -36,7 +36,7 @@ public class SysOrganizeQueryParam extends QueryParam {
private String organizeName;

@ApiModelProperty(value = "管辖区域")
private Long popedom_id;
private Long popedomId;

@ApiModelProperty(value = "类型: 0 普通用户 1、园区用户 2 区文创办 3市文创办 8后台管理 ")
private Integer organizeType;

+ 35
- 0
src/main/java/com/xdf/creative/base/params/creative/SysRoleImpowerPermissionQueryParam.java Zobrazit soubor

@@ -0,0 +1,35 @@

package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.List;

/**
* <pre>
* 角色权限关系 查询参数对象
* </pre>
*
* @author DeanYe
* @date 2019-10-24
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SysRolePermissionQueryParam对象", description = "角色权限关系查询参数")
public class SysRoleImpowerPermissionQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;

private Long roleId;

@ApiModelProperty(value = "权限id集合")
private List<String> permissionList;

}

+ 25
- 0
src/main/java/com/xdf/creative/base/params/creative/SysRoleQueryParam.java Zobrazit soubor

@@ -1,12 +1,20 @@

package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.Version;
import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Null;
import java.util.Date;

/**
* <pre>
* 系统角色 查询参数对象
@@ -21,4 +29,21 @@ import lombok.experimental.Accessors;
@ApiModel(value = "SysRoleQueryParam对象", description = "系统角色查询参数")
public class SysRoleQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.ID_WORKER)
private Long id;

@ApiModelProperty(value = "角色名称")
@NotBlank(message = "角色名称不能为空")
private String name;

@ApiModelProperty(value = "角色唯一编码")
@NotBlank(message = "角色编码不能为空")
private String code;


@ApiModelProperty(value = "备注")
private String remark;


}

+ 65
- 0
src/main/java/com/xdf/creative/base/params/creative/SysUserAddQueryParam.java Zobrazit soubor

@@ -0,0 +1,65 @@

package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
* <pre>
* 系统用户 查询参数对象
* </pre>
*
* @author DeanYe
* @date 2019-10-24
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SysUserQueryParam对象", description = "系统用户查询参数")
public class SysUserAddQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.AUTO)
private Long id;

@ApiModelProperty(value = "用户名")
@NotBlank(message = "用户名不能为空!")
private String username;

@NotBlank(message = "密码不能为空!")
@ApiModelProperty(value = "密码")
private String password;

@ApiModelProperty(value = "昵称")
private String nickname;

@ApiModelProperty(value = "手机号码")
private String phone;

@ApiModelProperty(value = "邮箱")
private String email;

@ApiModelProperty(value = "性别,0:女,1:男,默认1")
private Integer gender;

@ApiModelProperty(value = "头像")
private String head;

@ApiModelProperty(value = "remark")
private String remark;

@ApiModelProperty(value = "角色id")
private Long roleId;


}

+ 53
- 0
src/main/java/com/xdf/creative/base/params/creative/SysUserBackQueryParam.java Zobrazit soubor

@@ -0,0 +1,53 @@

package com.xdf.creative.base.params.creative;

import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
* <pre>
* 系统用户 查询参数对象
* </pre>
*
* @author DeanYe
* @date 2019-10-24
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SysUserQueryParam对象", description = "系统用户查询参数")
public class SysUserBackQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
private Long id;

@ApiModelProperty(value = "用户名")
private String username;

@ApiModelProperty(value = "昵称")
private String nickname;

@ApiModelProperty(value = "手机号码")
private String phone;

@ApiModelProperty(value = "邮箱")
private String email;

@ApiModelProperty(value = "状态,0:禁用,1:启用,2:锁定")
private Integer state;

@ApiModelProperty(value = "性别,0:女,1:男,默认1")
private Integer gender;

@ApiModelProperty(value = "角色名")
private String roleName;


}

+ 40
- 0
src/main/java/com/xdf/creative/base/params/creative/SysUserQueryParam.java Zobrazit soubor

@@ -1,12 +1,17 @@

package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.TableField;
import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.Set;

/**
* <pre>
* 系统用户 查询参数对象
@@ -21,4 +26,39 @@ import lombok.experimental.Accessors;
@ApiModel(value = "SysUserQueryParam对象", description = "系统用户查询参数")
public class SysUserQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "用户名")
private String username;

@ApiModelProperty(value = "昵称")
private String nickname;

@ApiModelProperty(value = "手机号码")
private String phone;

@ApiModelProperty(value = "邮箱")
private String email;

@ApiModelProperty(value = "状态,0:禁用,1:启用,2:锁定")
private Integer state;

@ApiModelProperty(value = "性别,0:女,1:男,默认1")
private Integer gender;

@ApiModelProperty(value = "头像")
private String head;

@ApiModelProperty(value = "0 普通用户 1、园区 2 区文创办 3 市文创办 8后台管理")
private Integer userType;

@ApiModelProperty(value = "remark")
private String remark;

@ApiModelProperty(value = "开始创建时间")
private Date startCreateTime;

@ApiModelProperty(value = "结束创建时间")
private Date endCreateTime;


}

+ 60
- 0
src/main/java/com/xdf/creative/base/params/creative/SysUserUpdateQueryParam.java Zobrazit soubor

@@ -0,0 +1,60 @@

package com.xdf.creative.base.params.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
* <pre>
* 系统用户 查询参数对象
* </pre>
*
* @author DeanYe
* @date 2019-10-24
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SysUserQueryParam对象", description = "系统用户查询参数")
public class SysUserUpdateQueryParam extends QueryParam {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.AUTO)
@NotNull(message = "数据标识不能为空")
private Long id;

@ApiModelProperty(value = "昵称")
private String nickname;

@ApiModelProperty(value = "手机号码")
private String phone;

@ApiModelProperty(value = "邮箱")
private String email;

@ApiModelProperty(value = "性别,0:女,1:男,默认1")
private Integer gender;

@ApiModelProperty(value = "头像")
private String head;

@ApiModelProperty(value = "remark")
private String remark;

@ApiModelProperty(value = "角色id")
private Long roleId;

private String username;


}

+ 3
- 0
src/main/java/com/xdf/creative/base/params/creative/UpdatePasswordParam.java Zobrazit soubor

@@ -34,4 +34,7 @@ public class UpdatePasswordParam {
@NotEmpty(message = "确认密码不能为空")
private String confirmPassword;


private String username;

}

+ 11
- 11
src/main/java/com/xdf/creative/base/service/BaseService.java Zobrazit soubor

@@ -9,15 +9,15 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface BaseService<T> extends IService<T> {

// Long getUserId();
//
// Long getOrganizeId();
//
// Integer getOrganizeType();
//
// String getRegionId();
//
// boolean verifyUserPermission(Long userId);
//
// boolean verifyOrganizePermission(Long organizeId);
Long getUserId();
Long getOrganizeId();
Integer getOrganizeType();
String getRegionId();
boolean verifyUserPermission(Long userId);
boolean verifyOrganizePermission(Long organizeId);
}

+ 48
- 45
src/main/java/com/xdf/creative/base/service/impl/BaseServiceImpl.java Zobrazit soubor

@@ -6,7 +6,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xdf.creative.base.params.QueryParam;
import com.xdf.creative.base.service.BaseService;
import com.xdf.creative.shiro.jwt.JwtTokenUtil;
import com.xdf.creative.shiro.jwt.JwtUtil;
import com.xdf.creative.util.CollectionTools;
import org.springframework.beans.factory.annotation.Autowired;

/**
*
@@ -14,10 +17,10 @@ import com.xdf.creative.util.CollectionTools;
* @param <T>
*/
public abstract class BaseServiceImpl<M extends BaseMapper<T>, T> extends ServiceImpl<M, T> implements BaseService<T> {
// @Autowired
// private JwtTokenUtil jwtTokenUtil;
// @Autowired
// private JwtUtil jwtUtil;
@Autowired
private JwtTokenUtil jwtTokenUtil;
@Autowired
private JwtUtil jwtUtil;
/**
* 分页排序设置
* 默认按创建时间Desc降序排列
@@ -64,46 +67,46 @@ public abstract class BaseServiceImpl<M extends BaseMapper<T>, T> extends Servic
return page;
}

// @Override
// public Long getUserId() {
// String token = jwtTokenUtil.getToken();
// return jwtUtil.getUserId(token);
// }
//
// @Override
// public Integer getOrganizeType() {
// String token = jwtTokenUtil.getToken();
// return jwtUtil.getOrganizeType(token);
// }
//
// @Override
// public Long getOrganizeId() {
// String token = jwtTokenUtil.getToken();
// return jwtUtil.getOrganizeId(token);
// }
//
// @Override
// public String getRegionId() {
// String token = jwtTokenUtil.getToken();
// return jwtUtil.getRegionId(token);
// }
//
// @Override
// public boolean verifyUserPermission(Long userId) {
// boolean passageFlag = false;
// if (getUserId() == userId || (getUserId() == 1 && getOrganizeId() == 1)) {
// passageFlag = true;
// }
// return passageFlag;
// }
//
// @Override
// public boolean verifyOrganizePermission(Long organizeId) {
// boolean passageFlag = false;
// if (getOrganizeId() == organizeId || (getUserId() == 1 && getOrganizeId() == 1)) {
// passageFlag = true;
// }
// return passageFlag;
// }
@Override
public Long getUserId() {
String token = jwtTokenUtil.getToken();
return jwtUtil.getUserId(token);
}
@Override
public Integer getOrganizeType() {
String token = jwtTokenUtil.getToken();
return jwtUtil.getOrganizeType(token);
}
@Override
public Long getOrganizeId() {
String token = jwtTokenUtil.getToken();
return jwtUtil.getOrganizeId(token);
}
@Override
public String getRegionId() {
String token = jwtTokenUtil.getToken();
return jwtUtil.getRegionId(token);
}
@Override
public boolean verifyUserPermission(Long userId) {
boolean passageFlag = false;
if (getUserId() == userId) {
passageFlag = true;
}
return passageFlag;
}
@Override
public boolean verifyOrganizePermission(Long organizeId) {
boolean passageFlag = false;
if (getOrganizeId() == organizeId || (getUserId() == 1 && getOrganizeId() == 1)) {
passageFlag = true;
}
return passageFlag;
}

}

+ 40
- 0
src/main/java/com/xdf/creative/base/vo/creative/InfoAttachmentQueryVo.java Zobrazit soubor

@@ -0,0 +1,40 @@
package com.xdf.creative.base.vo.creative;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;

import java.util.Date;

/**
* <p>
* 相关附件表 查询结果对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "InfoAttachmentQueryVo对象", description = "相关附件表查询参数")
public class InfoAttachmentQueryVo implements Serializable {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
private Long id;

@ApiModelProperty(value = "外键id")
private String foreignId;

@ApiModelProperty(value = "附件名称")
private String attachmentName;

@ApiModelProperty(value = "附件地址")
private String attachmentAddress;

@ApiModelProperty(value = "创建时间")
private Date createTime;

}

+ 43
- 0
src/main/java/com/xdf/creative/base/vo/creative/InfoBackQueryVo.java Zobrazit soubor

@@ -0,0 +1,43 @@
package com.xdf.creative.base.vo.creative;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;

import java.util.Date;

/**
* <p>
* 信息退回 查询结果对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "InfoBackQueryVo对象", description = "信息退回查询参数")
public class InfoBackQueryVo implements Serializable {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
private Long id;

@ApiModelProperty(value = "外键id")
private String foreignId;

@ApiModelProperty(value = "链接名称")
private String reason;

@ApiModelProperty(value = "退回类型 1、初审退回 2、终审退回")
private Integer backType;

@ApiModelProperty(value = "退回操作人")
private Long createUser;

@ApiModelProperty(value = "退回时间")
private Date backTime;

}

+ 111
- 0
src/main/java/com/xdf/creative/base/vo/creative/InfoContentAllQueryVo.java Zobrazit soubor

@@ -0,0 +1,111 @@
package com.xdf.creative.base.vo.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import com.xdf.creative.module.entity.InfoAttachment;
import com.xdf.creative.module.entity.InfoDetail;
import com.xdf.creative.module.entity.InfoUrl;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
* <p>
* 信息内容 查询参数对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoContentQueryParam对象", description = "信息内容查询参数")
public class InfoContentAllQueryVo extends QueryParam {
private static final long serialVersionUID = 1L;


@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
@NotNull(message = "主键id不能为空")
private Long id;

@ApiModelProperty(value = "标题")
private String title;

@ApiModelProperty(value = "栏目类型id")
private Long infoTypeId;

@ApiModelProperty(value = "内容类型 0、图文形式 1 、超链接形式")
private Integer contentType;

@ApiModelProperty(value = "图片地址")
private String imageUrl;

@ApiModelProperty(value = "来源地址")
private String sourceUrl;

@ApiModelProperty(value = "作者")
private String author;

@ApiModelProperty(value = "外键id")
private String foreignId;

@ApiModelProperty(value = "内容状态 0 、草稿 1、待初审 2、待终审 3 终审通过 4、初审退回 5、终审退回")
private Integer state;

@ApiModelProperty(value = "创建用户")
private Long createUser;

@ApiModelProperty(value = "创建时间")
private Date createTime;

@ApiModelProperty(value = "初审人员")
private Long firstAuditUser;

@ApiModelProperty(value = "初审时间")
private Date firstAuditTime;

@ApiModelProperty(value = "终审人员")
private Long finalAuditUser;

@ApiModelProperty(value = "终审时间")
private Date finalAuditTime;

@ApiModelProperty(value = "排序")
private Integer sort;

@ApiModelProperty(value = "是否置顶 0否 1是")
private Integer istop;

@ApiModelProperty(value = "置顶时间")
private Date istopTime;

@ApiModelProperty(value = "上下状态 0 下线 1上线")
private Integer onlineType;

@ApiModelProperty(value = "逻辑删除,0:未删除,1:已删除")
private Integer deleted;

/**
* 信息详情
*/
private InfoDetail infoDetail;

/**
* 附件列表
*/
private List<InfoAttachment> attachmentList;

/**
* url列表
*/
private List<InfoUrl> urlList;
}

+ 73
- 0
src/main/java/com/xdf/creative/base/vo/creative/InfoContentBackSearchQueryVo.java Zobrazit soubor

@@ -0,0 +1,73 @@
package com.xdf.creative.base.vo.creative;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
* <p>
* 信息内容 查询结果对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "InfoContentQueryVo对象", description = "信息内容查询参数")
public class InfoContentBackSearchQueryVo implements Serializable {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
private Long id;

@ApiModelProperty(value = "标题")
private String title;

@ApiModelProperty(value = "创建用户")
private Long createUser;

@ApiModelProperty(value = "用户名Id")
private Long userId;

@ApiModelProperty(value = "用户名")
private String username;

@ApiModelProperty(value = "昵称")
private String nickname;

@ApiModelProperty(value = "提交时间")
private Date submitTime;

@ApiModelProperty(value = "创建时间")
private Date updateTime;

@ApiModelProperty(value = "栏目类型id")
private Long infoTypeId;

@ApiModelProperty(value = "栏目名称")
private String infoName;

@ApiModelProperty(value = "内容状态 0 、草稿 1、待初审 2、待终审 3 终审通过 4、初审退回 5、终审退回")
private Integer state;

@ApiModelProperty(value = "初审时间")
private Date firstAuditTime;

@ApiModelProperty(value = "终审时间")
private Date finalAuditTime;

@ApiModelProperty(value = "排序")
private Integer sort;

@ApiModelProperty(value = "是否置顶 0否 1是")
private Integer istop;

@ApiModelProperty(value = "上下状态 0 下线 1上线")
private Integer onlineType;

}

+ 49
- 0
src/main/java/com/xdf/creative/base/vo/creative/InfoContentHomePageQueryVo.java Zobrazit soubor

@@ -0,0 +1,49 @@
package com.xdf.creative.base.vo.creative;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
* <p>
* 信息内容 查询结果对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "InfoContentQueryVo对象", description = "信息内容查询参数")
public class InfoContentHomePageQueryVo implements Serializable {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
private Long id;

@ApiModelProperty(value = "标题")
private String title;

@ApiModelProperty(value = "栏目id")
private String typeId;

@ApiModelProperty(value = "栏目名称")
private String infoName;

@ApiModelProperty(value = "终审时间")
private Date finalAuditTime;

@ApiModelProperty(value = "排序")
private Integer sort;

@ApiModelProperty(value = "是否置顶 0否 1是")
private Integer istop;

@ApiModelProperty(value = "置顶时间")
private Date istopTime;

}

+ 86
- 0
src/main/java/com/xdf/creative/base/vo/creative/InfoContentQueryVo.java Zobrazit soubor

@@ -0,0 +1,86 @@
package com.xdf.creative.base.vo.creative;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;

import java.util.Date;

/**
* <p>
* 信息内容 查询结果对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "InfoContentQueryVo对象", description = "信息内容查询参数")
public class InfoContentQueryVo implements Serializable {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
private Long id;

@ApiModelProperty(value = "标题")
private String title;

@ApiModelProperty(value = "栏目类型id")
private Long infoTypeId;

@ApiModelProperty(value = "内容类型 0、图文形式 1 、超链接形式")
private Integer contentType;

@ApiModelProperty(value = "图片地址")
private String imageUrl;

@ApiModelProperty(value = "来源地址")
private String sourceUrl;

@ApiModelProperty(value = "作者")
private String author;

@ApiModelProperty(value = "外键id")
private String foreignId;

@ApiModelProperty(value = "内容状态 0 、草稿 1、待初审 2、待终审 3 终审通过 4、初审退回 5、终审退回")
private Integer state;

@ApiModelProperty(value = "创建用户")
private Long createUser;

@ApiModelProperty(value = "创建时间")
private Date createTime;

@ApiModelProperty(value = "初审人员")
private Long firstAuditUser;

@ApiModelProperty(value = "初审时间")
private Date firstAuditTime;

@ApiModelProperty(value = "终审人员")
private Long finalAuditUser;

@ApiModelProperty(value = "终审时间")
private Date finalAuditTime;

@ApiModelProperty(value = "排序")
private Integer sort;

@ApiModelProperty(value = "是否置顶 0否 1是")
private Integer istop;

@ApiModelProperty(value = "置顶时间")
private Date istopTime;

@ApiModelProperty(value = "上下状态 0 下线 1上线")
private Integer onlineType;


@ApiModelProperty(value = "逻辑删除,0:未删除,1:已删除")
private Integer deleted;

}

+ 76
- 0
src/main/java/com/xdf/creative/base/vo/creative/InfoContentRecycleSearchQueryVo.java Zobrazit soubor

@@ -0,0 +1,76 @@
package com.xdf.creative.base.vo.creative;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
* <p>
* 信息内容 查询结果对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "InfoContentQueryVo对象", description = "信息内容查询参数")
public class InfoContentRecycleSearchQueryVo implements Serializable {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
private Long id;

@ApiModelProperty(value = "标题")
private String title;

@ApiModelProperty(value = "创建用户")
private Long createUser;

@ApiModelProperty(value = "用户名Id")
private Long userId;

@ApiModelProperty(value = "用户名")
private String username;

@ApiModelProperty(value = "昵称")
private String nickname;

@ApiModelProperty(value = "提交时间")
private Date submitTime;

@ApiModelProperty(value = "创建时间")
private Date updateTime;

@ApiModelProperty(value = "栏目类型id")
private Long infoTypeId;

@ApiModelProperty(value = "栏目名称")
private String infoName;

@ApiModelProperty(value = "内容状态 0 、草稿 1、待初审 2、待终审 3 终审通过 4、初审退回 5、终审退回")
private Integer state;

@ApiModelProperty(value = "初审时间")
private Date firstAuditTime;

@ApiModelProperty(value = "终审时间")
private Date finalAuditTime;

@ApiModelProperty(value = "排序")
private Integer sort;

@ApiModelProperty(value = "是否置顶 0否 1是")
private Integer istop;

@ApiModelProperty(value = "上下状态 0 下线 1上线")
private Integer onlineType;

@ApiModelProperty(value = "逻辑删除,0:未删除,1:已删除")
private Integer deleted;

}

+ 87
- 0
src/main/java/com/xdf/creative/base/vo/creative/InfoContentWebAllQueryVo.java Zobrazit soubor

@@ -0,0 +1,87 @@
package com.xdf.creative.base.vo.creative;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.params.QueryParam;
import com.xdf.creative.module.entity.InfoAttachment;
import com.xdf.creative.module.entity.InfoDetail;
import com.xdf.creative.module.entity.InfoUrl;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
* <p>
* 信息内容 查询参数对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoContentQueryParam对象", description = "信息内容查询参数")
public class InfoContentWebAllQueryVo extends QueryParam {
private static final long serialVersionUID = 1L;


@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
@NotNull(message = "主键id不能为空")
private Long id;

@ApiModelProperty(value = "标题")
private String title;

@ApiModelProperty(value = "栏目类型id")
private Long infoTypeId;

@ApiModelProperty(value = "内容类型 0、图文形式 1 、超链接形式")
private Integer contentType;

@ApiModelProperty(value = "图片地址")
private String imageUrl;

@ApiModelProperty(value = "来源地址")
private String sourceUrl;

@ApiModelProperty(value = "作者")
private String author;

@ApiModelProperty(value = "内容状态 0 、草稿 1、待初审 2、待终审 3 终审通过 4、初审退回 5、终审退回")
private Integer state;

@ApiModelProperty(value = "创建时间")
private Date createTime;

@ApiModelProperty(value = "排序")
private Integer sort;

@ApiModelProperty(value = "是否置顶 0否 1是")
private Integer istop;

@ApiModelProperty(value = "置顶时间")
private Date istopTime;

/**
* 信息详情
*/
private InfoDetail infoDetail;

/**
* 附件列表
*/
private List<InfoAttachment> attachmentList;

/**
* url列表
*/
private List<InfoUrl> urlList;
}

+ 55
- 0
src/main/java/com/xdf/creative/base/vo/creative/InfoContentWebSearchQueryVo.java Zobrazit soubor

@@ -0,0 +1,55 @@
package com.xdf.creative.base.vo.creative;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
* <p>
* 信息内容 查询结果对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "InfoContentQueryVo对象", description = "信息内容查询参数")
public class InfoContentWebSearchQueryVo implements Serializable {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
private Long id;

@ApiModelProperty(value = "标题")
private String title;

@ApiModelProperty(value = "栏目id")
private String typeId;

@ApiModelProperty(value = "栏目名称")
private String infoName;

@ApiModelProperty(value = "终审时间")
private Date finalAuditTime;

@ApiModelProperty(value = "排序")
private Integer sort;

@ApiModelProperty(value = "是否置顶 0否 1是")
private Integer istop;

@ApiModelProperty(value = "置顶时间")
private Date istopTime;

@ApiModelProperty(value = "摘要")
private String digest;

@ApiModelProperty(value = "超链接")
private String hyperlink;

}

+ 40
- 0
src/main/java/com/xdf/creative/base/vo/creative/InfoDetailQueryVo.java Zobrazit soubor

@@ -0,0 +1,40 @@
package com.xdf.creative.base.vo.creative;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;

import java.util.Date;

/**
* <p>
* 信息详情 查询结果对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "InfoDetailQueryVo对象", description = "信息详情查询参数")
public class InfoDetailQueryVo implements Serializable {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
private Long id;

@ApiModelProperty(value = "摘要")
private String digest;

@ApiModelProperty(value = "正文")
private String content;

@ApiModelProperty(value = "外键id")
private String foreignId;

@ApiModelProperty(value = "超链接")
private String hyperlink;

}

+ 52
- 0
src/main/java/com/xdf/creative/base/vo/creative/InfoTypeQueryVo.java Zobrazit soubor

@@ -0,0 +1,52 @@
package com.xdf.creative.base.vo.creative;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
* <p>
* 栏目类型 查询结果对象
* </p>
*
* @author lgw
* @date 2020-03-06
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "InfoTypeQueryVo对象", description = "栏目类型查询参数")
public class InfoTypeQueryVo implements Serializable {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
private Long id;

@ApiModelProperty(value = "栏目id")
private String typeId;

@ApiModelProperty(value = "栏目父id")
private String typeParentId;

@ApiModelProperty(value = "栏目名称")
private String infoName;

@ApiModelProperty(value = "模型")
private String modelName;

@ApiModelProperty(value = "排列顺序")
private Integer sort;

@ApiModelProperty(value = "是否显示 0 不显示 1显示")
private Integer state;

@ApiModelProperty(value = "创建时间")
private Date createTime;

@ApiModelProperty(value = "创建用户")
private Long createUserId;

}

+ 40
- 0
src/main/java/com/xdf/creative/base/vo/creative/InfoUrlQueryVo.java Zobrazit soubor

@@ -0,0 +1,40 @@
package com.xdf.creative.base.vo.creative;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;

import java.util.Date;

/**
* <p>
* 相关链接 查询结果对象
* </p>
*
* @author lgw
* @date 2020-03-09
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "InfoUrlQueryVo对象", description = "相关链接查询参数")
public class InfoUrlQueryVo implements Serializable {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
private Long id;

@ApiModelProperty(value = "外键id")
private String foreignId;

@ApiModelProperty(value = "链接名称")
private String name;

@ApiModelProperty(value = "链接url")
private String url;

@ApiModelProperty(value = "创建时间")
private Date createTime;

}

+ 49
- 0
src/main/java/com/xdf/creative/base/vo/creative/InfoWordManageQueryVo.java Zobrazit soubor

@@ -0,0 +1,49 @@
package com.xdf.creative.base.vo.creative;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
* <p>
* 词管理 查询结果对象
* </p>
*
* @author lgw
* @date 2020-03-06
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "InfoWordManageQueryVo对象", description = "词管理查询参数")
public class InfoWordManageQueryVo implements Serializable {
private static final long serialVersionUID = 1L;

private Long id;

@ApiModelProperty(value = "敏感词")
private String word;

@ApiModelProperty(value = "替换内容")
private String replaceContent;

@ApiModelProperty(value = "维护人")
private Long accendantUser;

@ApiModelProperty(value = "维护时间")
private Date accendantTime;

@ApiModelProperty(value = "修改时间")
private Date updateTime;


@ApiModelProperty(value = "用户名")
private String username;

@ApiModelProperty(value = "昵称")
private String nickname;

}

+ 42
- 0
src/main/java/com/xdf/creative/base/vo/creative/OauthTokenQueryVo.java Zobrazit soubor

@@ -0,0 +1,42 @@
package com.xdf.creative.base.vo.creative;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
* <p>
* 查询结果对象
* </p>
*
* @author lgw
* @date 2020-03-05
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "OauthTokenQueryVo对象", description = "查询参数")
public class OauthTokenQueryVo implements Serializable {
private static final long serialVersionUID = 1L;

private Long id;

private String accessToken;

private Long userId;

private String permissions;

private String roles;

private Integer refreshToken;

private Date expireTime;

private Date createTime;

private Date updateTime;

}

+ 54
- 0
src/main/java/com/xdf/creative/base/vo/creative/SysAccountLogQueryVo.java Zobrazit soubor

@@ -0,0 +1,54 @@
package com.xdf.creative.base.vo.creative;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
* <p>
* 账户登录日志 查询结果对象
* </p>
*
* @author lgw
* @date 2020-03-06
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "SysAccountLogQueryVo对象", description = "账户登录日志查询参数")
public class SysAccountLogQueryVo implements Serializable {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
private Long id;

@ApiModelProperty(value = "用户id")
private Long userId;

@ApiModelProperty(value = "ip地址")
private String ip;

@ApiModelProperty(value = "操作名称")
private String name;

@ApiModelProperty(value = "操作内容")
private String content;

@ApiModelProperty(value = "创建时间")
private Date createTime;

@ApiModelProperty(value = "方法名称")
private String method;

@ApiModelProperty(value = "类型 1登录成功 2登录失败")
private Integer type;

@ApiModelProperty(value = "用户名")
private String username;

@ApiModelProperty(value = "昵称")
private String nickname;
}

+ 52
- 0
src/main/java/com/xdf/creative/base/vo/creative/SysOperateLogQueryVo.java Zobrazit soubor

@@ -0,0 +1,52 @@
package com.xdf.creative.base.vo.creative;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
* <p>
* 账户操作日志 查询结果对象
* </p>
*
* @author lgw
* @date 2020-03-06
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "SysOperateLogQueryVo对象", description = "账户操作日志查询参数")
public class SysOperateLogQueryVo implements Serializable {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
private Long id;

@ApiModelProperty(value = "用户id")
private Long userId;

@ApiModelProperty(value = "ip地址")
private String ip;

@ApiModelProperty(value = "操作名称")
private String name;

@ApiModelProperty(value = "操作内容")
private String content;

@ApiModelProperty(value = "创建时间")
private Date createTime;

@ApiModelProperty(value = "用户名")
private String username;

@ApiModelProperty(value = "昵称")
private String nickname;

@ApiModelProperty(value = "方法名称")
private String method;

}

+ 59
- 0
src/main/java/com/xdf/creative/base/vo/creative/SysRoleListQueryVo.java Zobrazit soubor

@@ -0,0 +1,59 @@
/*
* Copyright 2019-2029 geekidea(https://github.com/geekidea)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.xdf.creative.base.vo.creative;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
* <pre>
* 系统角色 查询结果对象
* </pre>
*
* @author DeanYe
* @date 2019-10-24
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "SysRoleQueryVo对象", description = "系统角色查询参数")
public class SysRoleListQueryVo implements Serializable {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键")
private Long id;

@ApiModelProperty(value = "角色名称")
private String name;

@ApiModelProperty(value = "角色唯一编码")
private String code;


@ApiModelProperty(value = "备注")
private String remark;


@ApiModelProperty(value = "创建时间")
private Date createTime;


}

+ 87
- 0
src/main/java/com/xdf/creative/base/vo/creative/SysUserBackQueryVo.java Zobrazit soubor

@@ -0,0 +1,87 @@
/*
* Copyright 2019-2029 geekidea(https://github.com/geekidea)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.xdf.creative.base.vo.creative;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

/**
* <pre>
* 系统用户 查询结果对象
* </pre>
*
* @author DeanYe
* @date 2019-10-24
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "SysUserQueryVo对象", description = "系统用户查询参数")
public class SysUserBackQueryVo implements Serializable {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键")
private Long id;

@ApiModelProperty(value = "用户名")
private String username;

@ApiModelProperty(value = "昵称")
private String nickname;

@ApiModelProperty(value = "手机号码")
private String phone;

@ApiModelProperty(value = "邮箱")
private String email;

@ApiModelProperty(value = "状态,0:禁用,1:启用,2:锁定")
private Integer state;

@ApiModelProperty(value = "性别,0:女,1:男,默认1")
private Integer gender;

@ApiModelProperty(value = "头像")
private String head;

@ApiModelProperty(value = "创建者id")
private Long createUserId;

@ApiModelProperty(value = "逻辑删除,0:未删除,1:已删除")
private Integer deleted;

@ApiModelProperty(value = "remark")
private String remark;

@ApiModelProperty(value = "创建时间")
private Date createTime;

@ApiModelProperty(value = "修改时间")
private Date updateTime;

@ApiModelProperty(value = "角色名")
private String roleName;

private Long roleId;

}

+ 67
- 0
src/main/java/com/xdf/creative/base/vo/creative/SysUserInfoQueryVo.java Zobrazit soubor

@@ -0,0 +1,67 @@
/*
* Copyright 2019-2029 geekidea(https://github.com/geekidea)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.xdf.creative.base.vo.creative;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
* <pre>
* 系统用户 查询结果对象
* </pre>
*
* @author DeanYe
* @date 2019-10-24
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "SysUserQueryVo对象", description = "系统用户查询参数")
public class SysUserInfoQueryVo implements Serializable {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键")
private Long id;

@ApiModelProperty(value = "用户名")
private String username;

@ApiModelProperty(value = "昵称")
private String nickname;

@ApiModelProperty(value = "手机号码")
private String phone;

@ApiModelProperty(value = "邮箱")
private String email;

@ApiModelProperty(value = "性别,0:女,1:男,默认1")
private Integer gender;

@ApiModelProperty(value = "头像")
private String head;

@ApiModelProperty(value = "remark")
private String remark;



}

+ 34
- 0
src/main/java/com/xdf/creative/config/CorsFilter.java Zobrazit soubor

@@ -0,0 +1,34 @@
package com.xdf.creative.config;

/**
* @author : lgw
* @date : 9:59 2020/3/16
*/
import com.xdf.creative.config.xss.XssHttpServletRequestWrapper;
import org.springframework.stereotype.Component;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/*避免传参跨域*/

@Component
public class CorsFilter implements Filter {
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
HttpServletResponse httpResponse = (HttpServletResponse) response;
HttpServletRequest httpRequest = (HttpServletRequest) request;
httpResponse.setHeader("Access-Control-Allow-Origin", httpRequest.getHeader("Origin"));
httpResponse.setHeader("Access-Control-Allow-Methods", httpRequest.getMethod());
httpResponse.setHeader("Access-Control-Max-Age", "3600");
httpResponse.setHeader("Access-Control-Allow-Headers", httpRequest.getHeader("Access-Control-Request-Headers"));
XssHttpServletRequestWrapper xssRequest = new XssHttpServletRequestWrapper(
(HttpServletRequest) request);
chain.doFilter(xssRequest, response);
}

@Override
public void destroy() {

}
}

+ 34
- 0
src/main/java/com/xdf/creative/config/SpringBootPlusWebMvcConfig.java Zobrazit soubor

@@ -0,0 +1,34 @@

package com.xdf.creative.config;

import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


/**
* WebMvc配置
*
* @author DeanYe
* @date 2018-11-08
*/
@Slf4j
@Configuration
public class SpringBootPlusWebMvcConfig implements WebMvcConfigurer {

@Value("${upload_basePath}")
private String basePath;

@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
//路径前面要使用file协议,本地路径使用/分隔
registry.addResourceHandler("/resource/**").addResourceLocations("file:" + basePath);
}



}

+ 530
- 0
src/main/java/com/xdf/creative/config/xss/HTMLFilter.java Zobrazit soubor

@@ -0,0 +1,530 @@
package com.xdf.creative.config.xss;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
*
* HTML filtering utility for protecting against XSS (Cross Site Scripting).
*
* This code is licensed LGPLv3
*
* This code is a Java port of the original work in PHP by Cal Hendersen.
* http://code.iamcal.com/php/lib_filter/
*
* The trickiest part of the translation was handling the differences in regex handling
* between PHP and Java. These resources were helpful in the process:
*
* http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html
* http://us2.php.net/manual/en/reference.pcre.pattern.modifiers.php
* http://www.regular-expressions.info/modifiers.html
*
* A note on naming conventions: instance variables are prefixed with a "v"; global
* constant are in all caps.
*
* Sample use:
* String input = ...
* String clean = new HTMLFilter().filter( input );
*
* The class is not thread safe. Create a new instance if in doubt.
*
* If you find bugs or have suggestions on improvement (especially regarding
* performance), please contact us. The latest version of this
* source, and our contact details, can be found at http://xss-html-filter.sf.net
*
* @author Joseph O'Connell
* @author Cal Hendersen
* @author Michael Semb Wever
*/
public final class HTMLFilter {

/** regex flag union representing /si modifiers in php **/
private static final int REGEX_FLAGS_SI = Pattern.CASE_INSENSITIVE | Pattern.DOTALL;
private static final Pattern P_COMMENTS = Pattern.compile("<!--(.*?)-->", Pattern.DOTALL);
private static final Pattern P_COMMENT = Pattern.compile("^!--(.*)--$", REGEX_FLAGS_SI);
private static final Pattern P_TAGS = Pattern.compile("<(.*?)>", Pattern.DOTALL);
private static final Pattern P_END_TAG = Pattern.compile("^/([a-z0-9]+)", REGEX_FLAGS_SI);
private static final Pattern P_START_TAG = Pattern.compile("^([a-z0-9]+)(.*?)(/?)$", REGEX_FLAGS_SI);
private static final Pattern P_QUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)=([\"'])(.*?)\\2", REGEX_FLAGS_SI);
private static final Pattern P_UNQUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)(=)([^\"\\s']+)", REGEX_FLAGS_SI);
private static final Pattern P_PROTOCOL = Pattern.compile("^([^:]+):", REGEX_FLAGS_SI);
private static final Pattern P_ENTITY = Pattern.compile("&#(\\d+);?");
private static final Pattern P_ENTITY_UNICODE = Pattern.compile("&#x([0-9a-f]+);?");
private static final Pattern P_ENCODE = Pattern.compile("%([0-9a-f]{2});?");
private static final Pattern P_VALID_ENTITIES = Pattern.compile("&([^&;]*)(?=(;|&|$))");
private static final Pattern P_VALID_QUOTES = Pattern.compile("(>|^)([^<]+?)(<|$)", Pattern.DOTALL);
private static final Pattern P_END_ARROW = Pattern.compile("^>");
private static final Pattern P_BODY_TO_END = Pattern.compile("<([^>]*?)(?=<|$)");
private static final Pattern P_XML_CONTENT = Pattern.compile("(^|>)([^<]*?)(?=>)");
private static final Pattern P_STRAY_LEFT_ARROW = Pattern.compile("<([^>]*?)(?=<|$)");
private static final Pattern P_STRAY_RIGHT_ARROW = Pattern.compile("(^|>)([^<]*?)(?=>)");
private static final Pattern P_AMP = Pattern.compile("&");
private static final Pattern P_QUOTE = Pattern.compile("<");
private static final Pattern P_LEFT_ARROW = Pattern.compile("<");
private static final Pattern P_RIGHT_ARROW = Pattern.compile(">");
private static final Pattern P_BOTH_ARROWS = Pattern.compile("<>");

// @xxx could grow large... maybe use sesat's ReferenceMap
private static final ConcurrentMap<String,Pattern> P_REMOVE_PAIR_BLANKS = new ConcurrentHashMap<String, Pattern>();
private static final ConcurrentMap<String,Pattern> P_REMOVE_SELF_BLANKS = new ConcurrentHashMap<String, Pattern>();

/** set of allowed html elements, along with allowed attributes for each element **/
private final Map<String, List<String>> vAllowed;
/** counts of open tags for each (allowable) html element **/
private final Map<String, Integer> vTagCounts = new HashMap<String, Integer>();

/** html elements which must always be self-closing (e.g. "<img />") **/
private final String[] vSelfClosingTags;
/** html elements which must always have separate opening and closing tags (e.g. "<b></b>") **/
private final String[] vNeedClosingTags;
/** set of disallowed html elements **/
private final String[] vDisallowed;
/** attributes which should be checked for valid protocols **/
private final String[] vProtocolAtts;
/** allowed protocols **/
private final String[] vAllowedProtocols;
/** tags which should be removed if they contain no content (e.g. "<b></b>" or "<b />") **/
private final String[] vRemoveBlanks;
/** entities allowed within html markup **/
private final String[] vAllowedEntities;
/** flag determining whether comments are allowed in input String. */
private final boolean stripComment;
private final boolean encodeQuotes;
private boolean vDebug = false;
/**
* flag determining whether to try to make tags when presented with "unbalanced"
* angle brackets (e.g. "<b text </b>" becomes "<b> text </b>"). If set to false,
* unbalanced angle brackets will be html escaped.
*/
private final boolean alwaysMakeTags;

/** Default constructor.
*
*/
public HTMLFilter() {
vAllowed = new HashMap<>();

final ArrayList<String> a_atts = new ArrayList<String>();
a_atts.add("href");
a_atts.add("target");
vAllowed.put("a", a_atts);

final ArrayList<String> img_atts = new ArrayList<String>();
img_atts.add("src");
img_atts.add("width");
img_atts.add("height");
img_atts.add("alt");
vAllowed.put("img", img_atts);

final ArrayList<String> no_atts = new ArrayList<String>();
vAllowed.put("b", no_atts);
vAllowed.put("strong", no_atts);
vAllowed.put("i", no_atts);
vAllowed.put("em", no_atts);

vSelfClosingTags = new String[]{"img"};
vNeedClosingTags = new String[]{"a", "b", "strong", "i", "em"};
vDisallowed = new String[]{};
vAllowedProtocols = new String[]{"http", "mailto", "https"}; // no ftp.
vProtocolAtts = new String[]{"src", "href"};
vRemoveBlanks = new String[]{"a", "b", "strong", "i", "em"};
vAllowedEntities = new String[]{"amp", "gt", "lt", "quot"};
stripComment = true;
encodeQuotes = true;
alwaysMakeTags = true;
}

/** Set debug flag to true. Otherwise use default settings. See the default constructor.
*
* @param debug turn debug on with a true argument
*/
public HTMLFilter(final boolean debug) {
this();
vDebug = debug;

}

/** Map-parameter configurable constructor.
*
* @param conf map containing configuration. keys match field names.
*/
public HTMLFilter(final Map<String,Object> conf) {

assert conf.containsKey("vAllowed") : "configuration requires vAllowed";
assert conf.containsKey("vSelfClosingTags") : "configuration requires vSelfClosingTags";
assert conf.containsKey("vNeedClosingTags") : "configuration requires vNeedClosingTags";
assert conf.containsKey("vDisallowed") : "configuration requires vDisallowed";
assert conf.containsKey("vAllowedProtocols") : "configuration requires vAllowedProtocols";
assert conf.containsKey("vProtocolAtts") : "configuration requires vProtocolAtts";
assert conf.containsKey("vRemoveBlanks") : "configuration requires vRemoveBlanks";
assert conf.containsKey("vAllowedEntities") : "configuration requires vAllowedEntities";

vAllowed = Collections.unmodifiableMap((HashMap<String, List<String>>) conf.get("vAllowed"));
vSelfClosingTags = (String[]) conf.get("vSelfClosingTags");
vNeedClosingTags = (String[]) conf.get("vNeedClosingTags");
vDisallowed = (String[]) conf.get("vDisallowed");
vAllowedProtocols = (String[]) conf.get("vAllowedProtocols");
vProtocolAtts = (String[]) conf.get("vProtocolAtts");
vRemoveBlanks = (String[]) conf.get("vRemoveBlanks");
vAllowedEntities = (String[]) conf.get("vAllowedEntities");
stripComment = conf.containsKey("stripComment") ? (Boolean) conf.get("stripComment") : true;
encodeQuotes = conf.containsKey("encodeQuotes") ? (Boolean) conf.get("encodeQuotes") : true;
alwaysMakeTags = conf.containsKey("alwaysMakeTags") ? (Boolean) conf.get("alwaysMakeTags") : true;
}

private void reset() {
vTagCounts.clear();
}

private void debug(final String msg) {
if (vDebug) {
Logger.getAnonymousLogger().info(msg);
}
}

//---------------------------------------------------------------
// my versions of some PHP library functions
public static String chr(final int decimal) {
return String.valueOf((char) decimal);
}

public static String htmlSpecialChars(final String s) {
String result = s;
result = regexReplace(P_AMP, "&amp;", result);
result = regexReplace(P_QUOTE, "&quot;", result);
result = regexReplace(P_LEFT_ARROW, "&lt;", result);
result = regexReplace(P_RIGHT_ARROW, "&gt;", result);
return result;
}

//---------------------------------------------------------------
/**
* given a user submitted input String, filter out any invalid or restricted
* html.
*
* @param input text (i.e. submitted by a user) than may contain html
* @return "clean" version of input, with only valid, whitelisted html elements allowed
*/
public String filter(final String input) {
reset();
String s = input;

debug("************************************************");
debug(" INPUT: " + input);

s = escapeComments(s);
debug(" escapeComments: " + s);

s = balanceHTML(s);
debug(" balanceHTML: " + s);

s = checkTags(s);
debug(" checkTags: " + s);

s = processRemoveBlanks(s);
debug("processRemoveBlanks: " + s);

s = validateEntities(s);
debug(" validateEntites: " + s);

debug("************************************************\n\n");
return s;
}

public boolean isAlwaysMakeTags(){
return alwaysMakeTags;
}

public boolean isStripComments(){
return stripComment;
}

private String escapeComments(final String s) {
final Matcher m = P_COMMENTS.matcher(s);
final StringBuffer buf = new StringBuffer();
if (m.find()) {
final String match = m.group(1); //(.*?)
m.appendReplacement(buf, Matcher.quoteReplacement("<!--" + htmlSpecialChars(match) + "-->"));
}
m.appendTail(buf);

return buf.toString();
}

private String balanceHTML(String s) {
if (alwaysMakeTags) {
//
// try and form html
//
s = regexReplace(P_END_ARROW, "", s);
s = regexReplace(P_BODY_TO_END, "<$1>", s);
s = regexReplace(P_XML_CONTENT, "$1<$2", s);

} else {
//
// escape stray brackets
//
s = regexReplace(P_STRAY_LEFT_ARROW, "&lt;$1", s);
s = regexReplace(P_STRAY_RIGHT_ARROW, "$1$2&gt;<", s);

//
// the last regexp causes '<>' entities to appear
// (we need to do a lookahead assertion so that the last bracket can
// be used in the next pass of the regexp)
//
s = regexReplace(P_BOTH_ARROWS, "", s);
}

return s;
}

private String checkTags(String s) {
Matcher m = P_TAGS.matcher(s);

final StringBuffer buf = new StringBuffer();
while (m.find()) {
String replaceStr = m.group(1);
replaceStr = processTag(replaceStr);
m.appendReplacement(buf, Matcher.quoteReplacement(replaceStr));
}
m.appendTail(buf);

s = buf.toString();

// these get tallied in processTag
// (remember to reset before subsequent calls to filter method)
for (String key : vTagCounts.keySet()) {
for (int ii = 0; ii < vTagCounts.get(key); ii++) {
s += "</" + key + ">";
}
}

return s;
}

private String processRemoveBlanks(final String s) {
String result = s;
for (String tag : vRemoveBlanks) {
if(!P_REMOVE_PAIR_BLANKS.containsKey(tag)){
P_REMOVE_PAIR_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?></" + tag + ">"));
}
result = regexReplace(P_REMOVE_PAIR_BLANKS.get(tag), "", result);
if(!P_REMOVE_SELF_BLANKS.containsKey(tag)){
P_REMOVE_SELF_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?/>"));
}
result = regexReplace(P_REMOVE_SELF_BLANKS.get(tag), "", result);
}

return result;
}

private static String regexReplace(final Pattern regex_pattern, final String replacement, final String s) {
Matcher m = regex_pattern.matcher(s);
return m.replaceAll(replacement);
}

private String processTag(final String s) {
// ending tags
Matcher m = P_END_TAG.matcher(s);
if (m.find()) {
final String name = m.group(1).toLowerCase();
if (allowed(name)) {
if (!inArray(name, vSelfClosingTags)) {
if (vTagCounts.containsKey(name)) {
vTagCounts.put(name, vTagCounts.get(name) - 1);
return "</" + name + ">";
}
}
}
}

// starting tags
m = P_START_TAG.matcher(s);
if (m.find()) {
final String name = m.group(1).toLowerCase();
final String body = m.group(2);
String ending = m.group(3);

//debug( "in a starting tag, name='" + name + "'; body='" + body + "'; ending='" + ending + "'" );
if (allowed(name)) {
String params = "";

final Matcher m2 = P_QUOTED_ATTRIBUTES.matcher(body);
final Matcher m3 = P_UNQUOTED_ATTRIBUTES.matcher(body);
final List<String> paramNames = new ArrayList<String>();
final List<String> paramValues = new ArrayList<String>();
while (m2.find()) {
paramNames.add(m2.group(1)); //([a-z0-9]+)
paramValues.add(m2.group(3)); //(.*?)
}
while (m3.find()) {
paramNames.add(m3.group(1)); //([a-z0-9]+)
paramValues.add(m3.group(3)); //([^\"\\s']+)
}

String paramName, paramValue;
for (int ii = 0; ii < paramNames.size(); ii++) {
paramName = paramNames.get(ii).toLowerCase();
paramValue = paramValues.get(ii);

// debug( "paramName='" + paramName + "'" );
// debug( "paramValue='" + paramValue + "'" );
// debug( "allowed? " + vAllowed.get( name ).contains( paramName ) );

if (allowedAttribute(name, paramName)) {
if (inArray(paramName, vProtocolAtts)) {
paramValue = processParamProtocol(paramValue);
}
params += " " + paramName + "=\"" + paramValue + "\"";
}
}

if (inArray(name, vSelfClosingTags)) {
ending = " /";
}

if (inArray(name, vNeedClosingTags)) {
ending = "";
}

if (ending == null || ending.length() < 1) {
if (vTagCounts.containsKey(name)) {
vTagCounts.put(name, vTagCounts.get(name) + 1);
} else {
vTagCounts.put(name, 1);
}
} else {
ending = " /";
}
return "<" + name + params + ending + ">";
} else {
return "";
}
}

// comments
m = P_COMMENT.matcher(s);
if (!stripComment && m.find()) {
return "<" + m.group() + ">";
}

return "";
}

private String processParamProtocol(String s) {
s = decodeEntities(s);
final Matcher m = P_PROTOCOL.matcher(s);
if (m.find()) {
final String protocol = m.group(1);
if (!inArray(protocol, vAllowedProtocols)) {
// bad protocol, turn into local anchor link instead
s = "#" + s.substring(protocol.length() + 1, s.length());
if (s.startsWith("#//")) {
s = "#" + s.substring(3, s.length());
}
}
}

return s;
}

private String decodeEntities(String s) {
StringBuffer buf = new StringBuffer();

Matcher m = P_ENTITY.matcher(s);
while (m.find()) {
final String match = m.group(1);
final int decimal = Integer.decode(match).intValue();
m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal)));
}
m.appendTail(buf);
s = buf.toString();

buf = new StringBuffer();
m = P_ENTITY_UNICODE.matcher(s);
while (m.find()) {
final String match = m.group(1);
final int decimal = Integer.valueOf(match, 16).intValue();
m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal)));
}
m.appendTail(buf);
s = buf.toString();

buf = new StringBuffer();
m = P_ENCODE.matcher(s);
while (m.find()) {
final String match = m.group(1);
final int decimal = Integer.valueOf(match, 16).intValue();
m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal)));
}
m.appendTail(buf);
s = buf.toString();

s = validateEntities(s);
return s;
}

private String validateEntities(final String s) {
StringBuffer buf = new StringBuffer();

// validate entities throughout the string
Matcher m = P_VALID_ENTITIES.matcher(s);
while (m.find()) {
final String one = m.group(1); //([^&;]*)
final String two = m.group(2); //(?=(;|&|$))
m.appendReplacement(buf, Matcher.quoteReplacement(checkEntity(one, two)));
}
m.appendTail(buf);

return encodeQuotes(buf.toString());
}

private String encodeQuotes(final String s){
if(encodeQuotes){
StringBuffer buf = new StringBuffer();
Matcher m = P_VALID_QUOTES.matcher(s);
while (m.find()) {
final String one = m.group(1); //(>|^)
final String two = m.group(2); //([^<]+?)
final String three = m.group(3); //(<|$)
m.appendReplacement(buf, Matcher.quoteReplacement(one + regexReplace(P_QUOTE, "&quot;", two) + three));
}
m.appendTail(buf);
return buf.toString();
}else{
return s;
}
}

private String checkEntity(final String preamble, final String term) {

return ";".equals(term) && isValidEntity(preamble)
? '&' + preamble
: "&amp;" + preamble;
}

private boolean isValidEntity(final String entity) {
return inArray(entity, vAllowedEntities);
}

private static boolean inArray(final String s, final String[] array) {
for (String item : array) {
if (item != null && item.equals(s)) {
return true;
}
}
return false;
}

private boolean allowed(final String name) {
return (vAllowed.isEmpty() || vAllowed.containsKey(name)) && !inArray(name, vDisallowed);
}

private boolean allowedAttribute(final String name, final String paramName) {
return allowed(name) && (vAllowed.isEmpty() || vAllowed.get(name).contains(paramName));
}
}

+ 44
- 0
src/main/java/com/xdf/creative/config/xss/XssFilter.java Zobrazit soubor

@@ -0,0 +1,44 @@
/*
package com.xdf.creative.config.xss;

*/
/**
* @author : lgw
* @date : 13:28 2020/3/16
*//*

import org.springframework.stereotype.Component;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

*/
/** * XSS过滤器 * @author Jozz *//*

@WebFilter(filterName="xssFilter",urlPatterns="/*")
public class XssFilter implements Filter {
@Override
public void init(FilterConfig filterConfig) throws ServletException {

}
@Override
public void doFilter(ServletRequest servletRequest,
ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
HttpServletRequest request = (HttpServletRequest)servletRequest; String path = request.getServletPath();
//由于我的@WebFilter注解配置的是urlPatterns="/*"(过滤所有请求),所以这里对不需要过滤的静态资源url,作忽略处理(大家可以依照具体需求配置)
String[] exclusionsUrls = {".js",".gif",".jpg",".png",".css",".ico"};
for (String str : exclusionsUrls) {
if (path.contains(str)) {
filterChain.doFilter(servletRequest,servletResponse);
return;
}
}
XssHttpServletRequestWrapper xssRequest = new XssHttpServletRequestWrapper(request);
filterChain.doFilter(xssRequest,servletResponse);
}
@Override public void destroy() {

}
}*/

+ 147
- 0
src/main/java/com/xdf/creative/config/xss/XssHttpServletRequestWrapper.java Zobrazit soubor

@@ -0,0 +1,147 @@
/**
* Copyright (c) 2016-2019 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有,侵权必究!
*/

package com.xdf.creative.config.xss;

import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;

import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.Map;

/**
* XSS过滤处理
*
* @author Mark sunlightcs@gmail.com
*/
public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
//没被包装过的HttpServletRequest(特殊场景,需要自己过滤)
HttpServletRequest orgRequest;
//html过滤
private final static HTMLFilter htmlFilter = new HTMLFilter();

public XssHttpServletRequestWrapper(HttpServletRequest request) {
super(request);
orgRequest = request;
}

@Override
public ServletInputStream getInputStream() throws IOException {
//非json类型,直接返回
if(!MediaType.APPLICATION_JSON_VALUE.equalsIgnoreCase(super.getHeader(HttpHeaders.CONTENT_TYPE))){
return super.getInputStream();
}

//为空,直接返回
String json = IOUtils.toString(super.getInputStream(), "utf-8");
if (StringUtils.isBlank(json)) {
return super.getInputStream();
}

//xss过滤
json = xssEncode(json);
final ByteArrayInputStream bis = new ByteArrayInputStream(json.getBytes("utf-8"));
return new ServletInputStream() {
@Override
public boolean isFinished() {
return true;
}

@Override
public boolean isReady() {
return true;
}

@Override
public void setReadListener(ReadListener readListener) {

}

@Override
public int read() throws IOException {
return bis.read();
}
};
}

@Override
public String getParameter(String name) {
String value = super.getParameter(xssEncode(name));
if (StringUtils.isNotBlank(value)) {
value = xssEncode(value);
}
return value;
}

@Override
public String[] getParameterValues(String name) {
String[] parameters = super.getParameterValues(name);
if (parameters == null || parameters.length == 0) {
return null;
}

for (int i = 0; i < parameters.length; i++) {
parameters[i] = xssEncode(parameters[i]);
}
return parameters;
}

@Override
public Map<String,String[]> getParameterMap() {
Map<String,String[]> map = new LinkedHashMap<>();
Map<String,String[]> parameters = super.getParameterMap();
for (String key : parameters.keySet()) {
String[] values = parameters.get(key);
for (int i = 0; i < values.length; i++) {
values[i] = xssEncode(values[i]);
}
map.put(key, values);
}
return map;
}

@Override
public String getHeader(String name) {
String value = super.getHeader(xssEncode(name));
if (StringUtils.isNotBlank(value)) {
value = xssEncode(value);
}
return value;
}

private String xssEncode(String input) {
return htmlFilter.filter(input);
}

/**
* 获取最原始的request
*/
public HttpServletRequest getOrgRequest() {
return orgRequest;
}

/**
* 获取最原始的request
*/
public static HttpServletRequest getOrgRequest(HttpServletRequest request) {
if (request instanceof XssHttpServletRequestWrapper) {
return ((XssHttpServletRequestWrapper) request).getOrgRequest();
}

return request;
}

}

+ 3
- 1
src/main/java/com/xdf/creative/enums/ApiCode.java Zobrazit soubor

@@ -21,12 +21,14 @@ public enum ApiCode {

NOT_FOUND(4404, "你请求的资源不存在"),

USERNAME_ERROR(4405, "用户名不正确"),
USERNAME_ERROR(4405, "用户名、密码不正确"),

PASSWORD_ERROR(4406, "密码不正确"),

USER_DISABLE(4407, "用户不可用"),

USER_EXIST(4411, "用户不不存在"),

VERIFICATION_CODE_ERROR(4408, "验证码不正确"),

TOKEN_INVALID(4409, "无效令牌"),

+ 27
- 0
src/main/java/com/xdf/creative/enums/InfoAuditTypeEnum.java Zobrazit soubor

@@ -0,0 +1,27 @@
package com.xdf.creative.enums;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
/**
* 审核状态 1 、审核 2、审核不通过 3、审核退回
*/
public enum InfoAuditTypeEnum {
INFO_STATE_TYPE_AUDIT_PASS(1, "审核通过"),
INFO_STATE_TYPE_AUDIT_NOPASS(2, "审核不通过"),
INFO_STATE_TYPE_AUDIT_BACK(3, "审核退回");
private Integer code;
private String name;
public static String getNameByCode(Integer code) {
for (InfoAuditTypeEnum organizeTypeEnum : InfoAuditTypeEnum.values()) {
if (organizeTypeEnum.code == code) {
return organizeTypeEnum.name;
}
}
return null;
}
}

+ 26
- 0
src/main/java/com/xdf/creative/enums/InfoBackTypeEnum.java Zobrazit soubor

@@ -0,0 +1,26 @@
package com.xdf.creative.enums;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
/**
* 退回类型 1、初审退回 2、终审退回
*/
public enum InfoBackTypeEnum {
INFO_STATE_TYPE_AUDIT_BACK_FIRST(1, "初审退回"),
INFO_STATE_TYPE_AUDIT_BACK_FINAL(2, "终审退回");
private Integer code;
private String name;
public static String getNameByCode(Integer code) {
for (InfoBackTypeEnum organizeTypeEnum : InfoBackTypeEnum.values()) {
if (organizeTypeEnum.code == code) {
return organizeTypeEnum.name;
}
}
return null;
}
}

+ 29
- 0
src/main/java/com/xdf/creative/enums/InfoOnlineStateEnum.java Zobrazit soubor

@@ -0,0 +1,29 @@
package com.xdf.creative.enums;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum InfoOnlineStateEnum {
/**
* 上线类型 1、上线 2、下线
*/
PUBLIC_INFO_STATE_DRAFT(0, "草稿"),
PUBLIC_INFO_STATE_ONLINE(1, "上线"),
PUBLIC_INFO_STATE_OFFLINE(2, "下线"),
;
private Integer code;
private String name;

public static String getNameByCode(Integer code) {
for (InfoOnlineStateEnum sysSignState : InfoOnlineStateEnum.values()) {
if (sysSignState.code == code) {
return sysSignState.name;
}
}
return null;
}
}

+ 31
- 0
src/main/java/com/xdf/creative/enums/InfoPublicPropertyTypeEnum.java Zobrazit soubor

@@ -0,0 +1,31 @@
package com.xdf.creative.enums;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum InfoPublicPropertyTypeEnum {
/**
* 信息分类 :1、banner新闻 2、公告列表 3、文促会动态 4、行业动态 5、政策动态 6、文化活动
*/
PUBLIC_PROPERTY_TYPE_BANNER_NEWS(1, "TP"),
PUBLIC_PROPERTY_TYPE_NOTICE(2, "GG"),
PUBLIC_PROPERTY_TYPE_PROMOTE_NEWS(3, "XW"),
PUBLIC_PROPERTY_TYPE_DLL(4, "HY"),
PUBLIC_PROPERTY_TYPE_SUPPORT(5, "FC"),
PUBLIC_PROPERTY_TYPE_REPORT(6, "AC");
private Integer code;
private String name;

public static String getNameByCode(Integer code) {
for (InfoPublicPropertyTypeEnum sysSignState : InfoPublicPropertyTypeEnum.values()) {
if (sysSignState.code == code) {
return sysSignState.name;
}
}
return null;
}
}

+ 33
- 0
src/main/java/com/xdf/creative/enums/InfoStateTypeEnum.java Zobrazit soubor

@@ -0,0 +1,33 @@
package com.xdf.creative.enums;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
/**
* 内容状态 0 、草稿 1、待初审 2、待终审 3 终审通过 4、初审退回 5、终审退回 6 初审不通过 7终审不通过
*/
public enum InfoStateTypeEnum {
INFO_STATE_TYPE_DRAFT(0, "草稿"),
INFO_STATE_TYPE_FIRST_AUDIT(1, "待初审"),
INFO_STATE_TYPE_FINAL_AUDIT_STAY(2, "待终审"),
INFO_STATE_TYPE_FINAL_AUDIT_PASS(3, "终审通过"),
INFO_STATE_TYPE_FIRST_AUDIT_BACK(4, "初审退回"),
INFO_STATE_TYPE_FINAL_AUDIT_BACK(5, "终审退回"),
INFO_STATE_TYPE_FIRST_AUDIT_NOPASS(6, "初审不通过"),
INFO_STATE_TYPE_FINAL_AUDIT_NOPASS(7, "终审不通过");
private Integer code;
private String name;
public static String getNameByCode(Integer code) {
for (InfoStateTypeEnum organizeTypeEnum : InfoStateTypeEnum.values()) {
if (organizeTypeEnum.code == code) {
return organizeTypeEnum.name;
}
}

return null;
}
}

+ 26
- 0
src/main/java/com/xdf/creative/enums/LogTypeEnum.java Zobrazit soubor

@@ -0,0 +1,26 @@
package com.xdf.creative.enums;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
/**
* 类型 1登录成功 2登录失败
*/
public enum LogTypeEnum {
LOG_TYPE_SUCCESS(1, "登录成功"),
LOG_TYPE_FAIL(2, "登录失败");
private Integer code;
private String name;
public static String getNameByCode(Integer code) {
for (LogTypeEnum organizeTypeEnum : LogTypeEnum.values()) {
if (organizeTypeEnum.code == code) {
return organizeTypeEnum.name;
}
}
return null;
}
}

+ 32
- 0
src/main/java/com/xdf/creative/enums/OrganizeTypeEnum.java Zobrazit soubor

@@ -0,0 +1,32 @@
package com.xdf.creative.enums;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
/**
* 组织类型: 0 普通用户 1、园区用户 2 区文创办 3市文创办 8后台管理
*/
public enum OrganizeTypeEnum {
ORGANIZE_ORDINARY(0, "普通用户"),
ORGANIZE_PARK(1, "园区用户"),
ORGANIZE_DISTRICT(2, "区文创办"),
ORGANIZE_CITY(3, "市文创办"),
ORGANIZE_MANAGE(8, "公司"),
;
private Integer code;
private String name;

public static String getNameByCode(Integer code) {
for (OrganizeTypeEnum organizeTypeEnum : OrganizeTypeEnum.values()) {
if (organizeTypeEnum.code == code) {
return organizeTypeEnum.name;
}
}

return null;
}
}

+ 35
- 0
src/main/java/com/xdf/creative/enums/ServiceFileDirEnum.java Zobrazit soubor

@@ -0,0 +1,35 @@
package com.xdf.creative.enums;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ServiceFileDirEnum {
//0 banner 1 动态新闻 2活动 3专项资金 4政策导航 5 其他
SERVICE_FILE_DIR_PUBLIC_BANNER(0, "banner"),
//信息发布文件
SERVICE_FILE_DIR_PUBLIC_DYNAMIC(1, "dynamic"),
//活动发布图片
SERVICE_FILE_DIR_PUBLIC_ACTIVITY(2, "activity"),
//专项资金
SERVICE_FILE_DIR_SUPPORT(3, "support"),
//政策导航
SERVICE_FILE_DIR_POLICY(4, "policy "),
//其他
SERVICE_FILE_DIR_OTHER(5, "other");

private Integer code;
private String name;

public static String getNameByCode(Integer code) {
for (ServiceFileDirEnum boundTypeEnum : ServiceFileDirEnum.values()) {
if (boundTypeEnum.code == code) {
return boundTypeEnum.name;
}
}
return null;
}
}

+ 29
- 0
src/main/java/com/xdf/creative/enums/ServiceFileUploadDirEnum.java Zobrazit soubor

@@ -0,0 +1,29 @@
package com.xdf.creative.enums;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ServiceFileUploadDirEnum {
//1、web服务 2、auth服务 3、admin服务
//web服务
SERVICE_FILE_UPLOAD_DIR_WEB(1, "web"),
//auth服务
SERVICE_FILE_UPLOAD_DIR_AUTH(2, "auth"),
//admin服务
SERVICE_FILE_UPLOAD_DIR_ADMIN(3, "admin");
private Integer code;
private String name;

public static String getNameByCode(Integer code) {
for (ServiceFileUploadDirEnum boundTypeEnum : ServiceFileUploadDirEnum.values()) {
if (boundTypeEnum.code == code) {
return boundTypeEnum.name;
}
}
return null;
}
}

+ 27
- 0
src/main/java/com/xdf/creative/enums/ServiceFileUploadTypeEnum.java Zobrazit soubor

@@ -0,0 +1,27 @@
package com.xdf.creative.enums;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ServiceFileUploadTypeEnum {
//web服务
SERVICE_FILE_UPLOAD_TYPE_FILE(1, "file"),
//auth服务
SERVICE_FILE_UPLOAD_TYPE_PNG(2, "png"),
;
private Integer code;
private String name;

public static String getNameByCode(Integer code) {
for (ServiceFileUploadTypeEnum boundTypeEnum : ServiceFileUploadTypeEnum.values()) {
if (boundTypeEnum.code == code) {
return boundTypeEnum.name;
}
}
return null;
}
}

+ 28
- 1
src/main/java/com/xdf/creative/enums/StatusCode.java Zobrazit soubor

@@ -12,15 +12,42 @@ public enum StatusCode {
FORM_SUBMIT_UPDATE_VERIFY(000001, "当前数据不存在或已删除,请刷新后再试!"),
//修改数据未传主键id
FORM_SUBMIT_ID_VERIFY(000002, "未知数据标识,请重新选择!"),
FORM_SUBMIT_DELETE_VERIFY(000007, "数据删除失败!"),
AUTH_UPDATE_VERIFY_ERROR(000003, "存在非法访问,请刷新后再试!"),
FORM_AUDIT_STATE_VERIFY(000004, "只能操作待审核的数据!"),
FORM_AUDIT_BACK_IDEA_VERIFY(000010,"退回意见不能为空!"),
FORM_UPDATE_STATE_VERIFY(000005, "只能操作草稿状态的数据!"),
FORM_AUDIT_FINAL_AUDIT_PASS_VERIFY(000011,"只能操作终审通过的信息!"),
FORM_INFO_CONTENT_SORT_VERIFY(000012,"请输入排序号!"),
FORM_INFO_CONTENT_DELETE_VERIFY(000013,"存在信息非法删除!"),

FORM_AUTH_UPDATE_VERIFY_ERROR(000006, "存在非法更新!"),
SMS_SEND_VERIFICATION_CODE_SUCCESS(20000, "短信发送成功"),
SMS_SEND_VERIFICATION_CODE_FAIL(20001, "短信发送失败"),
SMS_MESSAGE_VERIFICATION_CODE_VERIFY(20002, "验证码已过期!"),
SMS_MESSAGE_VERIFICATION_CODE_ERROR(20003, "验证码错误!"),
;
WEB_MANAGE_PUBLIC_DETAIL_BODY_NULL(200003001, "正文内容不能为空!"),


SYS_ROLE_EXIST(100001,"角色标识已存在!"),
SYS_USER_ROLE_EXIST(100002,"该角色下还存在可用用户,不能删除!"),
SYS_USER_ROLE_DELETE(100003,"删除角色失败!"),
SYS_ROLE_PERMISSION_DELETE(100004,"删除角色权限关系失败!"),
SYS_ROLE_EXIST_NO(100005,"该角色不存在!"),
SYS_ROLE_PERMISSION_EXIST(100006,"未发现有效得URL!"),

SYS_USER_NAME_EXIST(101001,"当前用户名已存在!"),
SYS_USER_ROLE_VERIFY_EXIST(101002,"用户所选角色不存在!"),
SYS_USER_HEARD_FAIL(101003,"用户头像修改失败!"),
SYS_USER_PASSWORD_FAIL(101004,"用户密码修改失败!"),
SYS_USER_NAME_STATE_EXIST(101005,"只能删除停用的用户!"),

WEB_FILE_DIR_PATH_NULL(200004001, "文件上传目录不能为空!"),
WEB_FILE_DIR_PATH_TYPE_ILLEGAL(200004002, "文件目录类型非法!"),
WEB_FILE_DIR_PATH_CREATE_ERROR(200004003, "文件目录创建失败!"),
FILE_CL_UPLOAD_FAILED(700102,"文件上传失败,系统未知异常!"),
WEB_FILE_UPLOAD_FAILED(200004004, "系统仅支持后缀为.pdf、.doc、.docx、.xls、.xlsx、.ppt、.pptx、.png、.jpg、.txt文件上传!");



private int status;

+ 97
- 0
src/main/java/com/xdf/creative/module/controller/FileUploadController.java Zobrazit soubor

@@ -0,0 +1,97 @@
package com.xdf.creative.module.controller;


import com.xdf.creative.enums.ApiCode;
import com.xdf.creative.enums.ServiceFileUploadTypeEnum;
import com.xdf.creative.enums.StatusCode;
import com.xdf.creative.module.entity.FileUploadQuery;
import com.xdf.creative.module.service.FileClientService;
import com.xdf.creative.util.UUIDUtil;
import com.xdf.creative.util.file.ServerUploadDirUtil;
import com.xdf.creative.util.file.UploadUtil;
import com.xdf.creative.util.page.ApiResult;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@Slf4j
@RestController
@RequestMapping("/upload")
public class FileUploadController {

@Value("${upload_basePath}")
private String basePath;

@Autowired
private FileClientService fileClientService;

/**
* 上传文件
*
* @param file
* @param uploadPath
* @return
* @throws Exception
*/
@PostMapping("/doFile")
@ApiOperation(value = "添加MultipartFile对象", notes = "添加文件上传", response = ApiResult.class)
public ApiResult<String> doFile(MultipartFile file, @RequestParam Integer uploadPath) throws Exception {
String finalPath = ServerUploadDirUtil.getFileUploadDir(uploadPath);
ApiResult result = UploadUtil.upload(basePath + "/" + finalPath, file, ServiceFileUploadTypeEnum.SERVICE_FILE_UPLOAD_TYPE_FILE.getCode());
if (result.getCode() == ApiCode.SUCCESS.getCode()) {
String saveName = result.getData().toString();
return result.ok(finalPath + "/" + saveName);
} else {
return result;
}
}

/**
* 上传图片文件
*
* @param file
* @param uploadPath
* @return
* @throws Exception
*/
@PostMapping("/doPictureFile")
@ApiOperation(value = "添加MultipartFile对象", notes = "添加图片上传", response = ApiResult.class)
public ApiResult<String> doPictureFile(MultipartFile file, @RequestParam Integer uploadPath) throws Exception {
String finalPath = ServerUploadDirUtil.getFileUploadDir(uploadPath);
ApiResult result = UploadUtil.upload(basePath + "/" + finalPath, file, ServiceFileUploadTypeEnum.SERVICE_FILE_UPLOAD_TYPE_PNG.getCode());
if (result.getCode() == ApiCode.SUCCESS.getCode()) {
String saveName = result.getData().toString();
return result.ok(finalPath + "/" + saveName);
} else {
return result;
}
}

/**
* 上传二进制文件
*
* @param fileUploadQuery
* @return
*/
@RequestMapping(value = "/uploadByDecoder")
public ApiResult uploadFile(@RequestBody FileUploadQuery fileUploadQuery) {
try {
String finalPath = ServerUploadDirUtil.getFileUploadDir(fileUploadQuery.getDirType());
fileUploadQuery.setUploadPath(finalPath);
return fileClientService.uploadUtilFileByDecoder(fileUploadQuery, basePath);
} catch (Exception e) {
return ApiResult.error(StatusCode.FILE_CL_UPLOAD_FAILED);
}
}

/**
* 获取随机ID
*/
@PostMapping("/findRandomId")
public ApiResult findRandomId() {
return ApiResult.ok(UUIDUtil.getUUID());
}
}

+ 90
- 0
src/main/java/com/xdf/creative/module/controller/InfoAttachmentController.java Zobrazit soubor

@@ -0,0 +1,90 @@
package com.xdf.creative.module.controller;

import com.xdf.creative.base.controller.BaseController;
import com.xdf.creative.base.params.IdParam;
import com.xdf.creative.base.params.creative.InfoAttachmentQueryParam;
import com.xdf.creative.base.vo.creative.InfoAttachmentQueryVo;
import com.xdf.creative.module.entity.InfoAttachment;
import com.xdf.creative.module.service.InfoAttachmentService;
import com.xdf.creative.util.page.ApiResult;
import com.xdf.creative.util.page.PageTool;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
* <p>
* 相关附件表 前端控制器
* </p>
*
* @author lgw
* @since 2020-03-09
*/
@Slf4j
@RestController
@RequestMapping("/infoAttachment")
@Api("相关附件表 API")
public class InfoAttachmentController extends BaseController {

@Autowired
private InfoAttachmentService infoAttachmentService;

/**
* 添加相关附件表
*/
@PostMapping("/add")
@ApiOperation(value = "添加InfoAttachment对象", notes = "添加相关附件表", response = ApiResult.class)
public ApiResult<Boolean> addInfoAttachment(@Valid @RequestBody InfoAttachment infoAttachment) throws Exception {
boolean flag = infoAttachmentService.save(infoAttachment);
return ApiResult.result(flag);
}

/**
* 修改相关附件表
*/
@PostMapping("/update")
@ApiOperation(value = "修改InfoAttachment对象", notes = "修改相关附件表", response = ApiResult.class)
public ApiResult<Boolean> updateInfoAttachment(@Valid @RequestBody InfoAttachment infoAttachment) throws Exception {
boolean flag = infoAttachmentService.updateById(infoAttachment);
return ApiResult.result(flag);
}

/**
* 删除相关附件表
*/
@PostMapping("/delete")
@ApiOperation(value = "删除InfoAttachment对象", notes = "删除相关附件表", response = ApiResult.class)
public ApiResult<Boolean> deleteInfoAttachment(@Valid @RequestBody IdParam idParam) throws Exception {
boolean flag = infoAttachmentService.removeById(idParam.getId());
return ApiResult.result(flag);
}

/**
* 获取相关附件表
*/
@PostMapping("/info")
@ApiOperation(value = "获取InfoAttachment对象详情", notes = "查看相关附件表", response = InfoAttachmentQueryVo.class)
public ApiResult<InfoAttachmentQueryVo> getInfoAttachment(@Valid @RequestBody IdParam idParam) throws Exception {
InfoAttachmentQueryVo infoAttachmentQueryVo = infoAttachmentService.getInfoAttachmentById(idParam.getId());
return ApiResult.ok(infoAttachmentQueryVo);
}

/**
* 相关附件表分页列表
*/
@PostMapping("/getPageList")
@ApiOperation(value = "获取InfoAttachment分页列表", notes = "相关附件表分页列表", response = InfoAttachmentQueryVo.class)
public ApiResult<PageTool<InfoAttachmentQueryVo>> getInfoAttachmentPageList(@Valid @RequestBody InfoAttachmentQueryParam infoAttachmentQueryParam) throws Exception {
PageTool<InfoAttachmentQueryVo> pageList = infoAttachmentService.getInfoAttachmentPageList(infoAttachmentQueryParam);
return ApiResult.ok(pageList);
}

}


+ 90
- 0
src/main/java/com/xdf/creative/module/controller/InfoBackController.java Zobrazit soubor

@@ -0,0 +1,90 @@
package com.xdf.creative.module.controller;

import com.xdf.creative.base.controller.BaseController;
import com.xdf.creative.base.params.IdParam;
import com.xdf.creative.base.params.creative.InfoBackQueryParam;
import com.xdf.creative.base.vo.creative.InfoBackQueryVo;
import com.xdf.creative.module.entity.InfoBack;
import com.xdf.creative.module.service.InfoBackService;
import com.xdf.creative.util.page.ApiResult;
import com.xdf.creative.util.page.PageTool;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
* <p>
* 信息退回 前端控制器
* </p>
*
* @author lgw
* @since 2020-03-09
*/
@Slf4j
@RestController
@RequestMapping("/infoBack")
@Api("信息退回 API")
public class InfoBackController extends BaseController {

@Autowired
private InfoBackService infoBackService;

/**
* 添加信息退回
*/
@PostMapping("/add")
@ApiOperation(value = "添加InfoBack对象", notes = "添加信息退回", response = ApiResult.class)
public ApiResult<Boolean> addInfoBack(@Valid @RequestBody InfoBack infoBack) throws Exception {
boolean flag = infoBackService.save(infoBack);
return ApiResult.result(flag);
}

/**
* 修改信息退回
*/
@PostMapping("/update")
@ApiOperation(value = "修改InfoBack对象", notes = "修改信息退回", response = ApiResult.class)
public ApiResult<Boolean> updateInfoBack(@Valid @RequestBody InfoBack infoBack) throws Exception {
boolean flag = infoBackService.updateById(infoBack);
return ApiResult.result(flag);
}

/**
* 删除信息退回
*/
@PostMapping("/delete")
@ApiOperation(value = "删除InfoBack对象", notes = "删除信息退回", response = ApiResult.class)
public ApiResult<Boolean> deleteInfoBack(@Valid @RequestBody IdParam idParam) throws Exception {
boolean flag = infoBackService.removeById(idParam.getId());
return ApiResult.result(flag);
}

/**
* 获取信息退回
*/
@PostMapping("/info")
@ApiOperation(value = "获取InfoBack对象详情", notes = "查看信息退回", response = InfoBackQueryVo.class)
public ApiResult<InfoBackQueryVo> getInfoBack(@Valid @RequestBody IdParam idParam) throws Exception {
InfoBackQueryVo infoBackQueryVo = infoBackService.getInfoBackById(idParam.getId());
return ApiResult.ok(infoBackQueryVo);
}

/**
* 信息退回分页列表
*/
@PostMapping("/getPageList")
@ApiOperation(value = "获取InfoBack分页列表", notes = "信息退回分页列表", response = InfoBackQueryVo.class)
public ApiResult<PageTool<InfoBackQueryVo>> getInfoBackPageList(@Valid @RequestBody InfoBackQueryParam infoBackQueryParam) throws Exception {
PageTool<InfoBackQueryVo> pageList = infoBackService.getInfoBackPageList(infoBackQueryParam);
return ApiResult.ok(pageList);
}

}


+ 294
- 0
src/main/java/com/xdf/creative/module/controller/InfoContentController.java Zobrazit soubor

@@ -0,0 +1,294 @@
package com.xdf.creative.module.controller;

import com.xdf.creative.base.controller.BaseController;
import com.xdf.creative.base.params.IdParam;
import com.xdf.creative.base.params.creative.*;
import com.xdf.creative.base.vo.creative.InfoContentBackSearchQueryVo;
import com.xdf.creative.base.vo.creative.InfoContentQueryVo;
import com.xdf.creative.base.vo.creative.InfoContentRecycleSearchQueryVo;
import com.xdf.creative.base.vo.creative.InfoContentWebSearchQueryVo;
import com.xdf.creative.module.entity.InfoContent;
import com.xdf.creative.module.service.InfoContentService;
import com.xdf.creative.support.aop.OperateLogger;
import com.xdf.creative.util.page.ApiResult;
import com.xdf.creative.util.page.PageTool;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
* <p>
* 信息内容 前端控制器
* </p>
*
* @author lgw
* @since 2020-03-09
*/
@Slf4j
@RestController
@RequestMapping("/infoContent")
@Api("信息内容 API")
public class InfoContentController extends BaseController {

@Autowired
private InfoContentService infoContentService;

/**
* 添加信息内容
*/
@PostMapping("/addInfoContent")
@ApiOperation(value = "添加InfoContent对象", notes = "添加信息内容", response = ApiResult.class)
@OperateLogger(name = "添加内容", attributeId = "id", attributeName = "title")
public ApiResult addInfoContent(@Valid @RequestBody InfoContentAddQueryParam infoContentAddQueryParam) throws Exception {
return infoContentService.addInfoContent(infoContentAddQueryParam);
}

/**
* 预览 web查看详情
*/
@PostMapping("/getWebInfoContent")
@ApiOperation(value = "获取单条InfoContent对象", notes = "获取单条信息内容", response = ApiResult.class)
public ApiResult getWebInfoContent(@Valid @RequestBody IdParam idParam) throws Exception {
return infoContentService.getWebInfoContent(idParam.getId());
}

/**
* 获取信息内容
*/
@PostMapping("/getInfoContent")
@ApiOperation(value = "获取单条InfoContent对象", notes = "获取单条信息内容", response = ApiResult.class)
public ApiResult getInfoContent(@Valid @RequestBody IdParam idParam) throws Exception {
return infoContentService.getInfoContent(idParam.getId());
}

/**
* 修改信息内容
*
* @param infoContentAddQueryParam
* @return
* @throws Exception
*/
@PostMapping("/updateInfoContent")
@ApiOperation(value = "修改InfoContent对象", notes = "修改信息内容", response = ApiResult.class)
@OperateLogger(name = "修改内容", attributeId = "id", attributeName = "title")
public ApiResult updateInfoContent(@Valid @RequestBody InfoContentAddQueryParam infoContentAddQueryParam) throws Exception {
return infoContentService.updateInfoContent(infoContentAddQueryParam);
}


/**
* 管理员初审信息
*
* @param infoContentAuditQueryParam
* @return
* @throws Exception
*/
@PostMapping("/firstAuditInfo")
@ApiOperation(value = "初审InfoContent对象", notes = "初审信息内容", response = ApiResult.class)
@OperateLogger(name = "初审内容", attributeId = "id", attributeName = "title")
public ApiResult firstAuditInfo(@Valid @RequestBody InfoContentAuditQueryParam infoContentAuditQueryParam) throws Exception {
return infoContentService.firstAuditInfo(infoContentAuditQueryParam);
}


/**
* 管理员终审信息
*
* @param infoContentAuditQueryParam
* @return
* @throws Exception
*/
@PostMapping("/finalAuditInfo")
@ApiOperation(value = "终审InfoContent对象", notes = "终审信息内容", response = ApiResult.class)
@OperateLogger(name = "终审内容", attributeId = "id", attributeName = "title")
public ApiResult finalAuditInfo(@Valid @RequestBody InfoContentAuditQueryParam infoContentAuditQueryParam) throws Exception {
return infoContentService.finalAuditInfo(infoContentAuditQueryParam);
}


/**
* 用户提交信息内容
*
* @param infoContentAuditQueryParam
* @return
* @throws Exception
*/
@PostMapping("/commitInfoContent")
@ApiOperation(value = "提交InfoContent对象", notes = "提交信息内容", response = ApiResult.class)
@OperateLogger(name = "提交内容", attributeId = "id", attributeName = "title")
public ApiResult commitInfoContent(@Valid @RequestBody InfoContentAuditQueryParam infoContentAuditQueryParam) throws Exception {
return infoContentService.commitInfoContent(infoContentAuditQueryParam);
}

/**
* 上下线信息内容
*
* @param infoContentAuditQueryParam
* @return
* @throws Exception
*/
@PostMapping("/onlineInfoContent")
@ApiOperation(value = "上下线InfoContent对象", notes = "上下线信息内容", response = ApiResult.class)
@OperateLogger(name = "上下线内容", attributeId = "id", attributeName = "title")
public ApiResult onlineInfoContent(@Valid @RequestBody InfoContentAuditQueryParam infoContentAuditQueryParam) throws Exception {
return infoContentService.onlineInfoContent(infoContentAuditQueryParam);
}


/**
* 是否置顶信息内容
*
* @param infoContentAuditQueryParam
* @return
* @throws Exception
*/
@PostMapping("/isTopInfoContent")
@ApiOperation(value = "置顶InfoContent对象", notes = "置顶信息内容", response = ApiResult.class)
@OperateLogger(name = "置顶内容", attributeId = "id", attributeName = "title")
public ApiResult isTopInfoContent(@Valid @RequestBody InfoContentAuditQueryParam infoContentAuditQueryParam) throws Exception {
return infoContentService.isTopInfoContent(infoContentAuditQueryParam);
}

/**
* 修改排序号
*
* @param infoContentAuditQueryParam
* @return
* @throws Exception
*/
@PostMapping("/updateInfoSort")
@ApiOperation(value = "修改排序号InfoContent对象", notes = "修改信息内容排序号", response = ApiResult.class)
@OperateLogger(name = "修改内容排序", attributeId = "id", attributeName = "title")
public ApiResult updateInfoSort(@Valid @RequestBody InfoContentAuditQueryParam infoContentAuditQueryParam) throws Exception {
return infoContentService.updateInfoSort(infoContentAuditQueryParam);
}

/**
* 信息是否置为回收站
*
* @param infoContentAuditQueryParam
* @return
* @throws Exception
*/
@PostMapping("/recycleInfoContent")
@ApiOperation(value = "将InfoContent对象置为回收站", notes = "将信息内容置为回收站", response = ApiResult.class)
@OperateLogger(name = "删除/还原内容(回收站)", attributeId = "id", attributeName = "title")
public ApiResult recycleInfoContent(@Valid @RequestBody InfoContentAuditQueryParam infoContentAuditQueryParam) throws Exception {
return infoContentService.recycleInfoContent(infoContentAuditQueryParam);
}

/**
* 信息管理员删除(任何状态可以删除)
*
* @param infoContentAuditQueryParam
* @return
* @throws Exception
*/
@PostMapping("/deleteInfoManageContent")
@ApiOperation(value = "删除InfoContent对象", notes = "删除信息内容", response = ApiResult.class)
@OperateLogger(name = "回收站删除内容", attributeId = "id", attributeName = "title")
public ApiResult deleteInfoManageContent(@Valid @RequestBody InfoContentAuditQueryParam infoContentAuditQueryParam) throws Exception {
return infoContentService.deleteInfoManageContent(infoContentAuditQueryParam);
}



/**
* 首页查询信息
*/
@PostMapping("/getHomePageInfo")
@ApiOperation(value = "显示InfoContent对象", notes = "首页查询信息", response = ApiResult.class)
public ApiResult getHomePageInfo(@Valid @RequestBody InfoContentHomePageQueryParam infoContentHomePageQueryParam) throws Exception {
return infoContentService.getHomePageInfo(infoContentHomePageQueryParam);
}

/**
* 首页搜索信息
*/
@PostMapping("/getSearchWebInfo")
@ApiOperation(value = "获取InfoContentWeb分页列表", notes = "信息内容分页列表", response = InfoContentWebSearchQueryVo.class)
public ApiResult<PageTool<InfoContentWebSearchQueryVo>> getSearchWebInfo(@Valid @RequestBody InfoContentWebSearchQueryParam infoContentWebSearchQueryParam) throws Exception {
PageTool<InfoContentWebSearchQueryVo> pageList = infoContentService.getSearchWebInfo(infoContentWebSearchQueryParam);
return ApiResult.ok(pageList);
}

/**
* 后台发布列表
*/
@PostMapping("/getInfoContentByAdd")
@ApiOperation(value = "获取InfoContentBackSearchQueryVo分页列表", notes = "后台发布列表", response = InfoContentWebSearchQueryVo.class)
public ApiResult<PageTool<InfoContentBackSearchQueryVo>> getInfoContentByAdd(@Valid @RequestBody InfoContentBackSearchQueryParam infoContentBackSearchQueryParam) throws Exception {
PageTool<InfoContentBackSearchQueryVo> pageList = infoContentService.getInfoContentByAdd(infoContentBackSearchQueryParam);
return ApiResult.ok(pageList);
}

/**
* 后台初审列表
*/
@PostMapping("/getInfoContentByFirstAudit")
@ApiOperation(value = "获取InfoContentBackSearchQueryVo分页列表", notes = "后台发布列表", response = InfoContentBackSearchQueryVo.class)
public ApiResult<PageTool<InfoContentBackSearchQueryVo>> getInfoContentByFirstAudit(@Valid @RequestBody InfoContentBackSearchQueryParam infoContentBackSearchQueryParam) throws Exception {
PageTool<InfoContentBackSearchQueryVo> pageList = infoContentService.getInfoContentByFirstAudit(infoContentBackSearchQueryParam);
return ApiResult.ok(pageList);
}

/**
* 后台初审列表
*/
@PostMapping("/getInfoContentByFinalAudit")
@ApiOperation(value = "获取InfoContentBackSearchQueryVo分页列表", notes = "后台发布列表", response = InfoContentBackSearchQueryVo.class)
public ApiResult<PageTool<InfoContentBackSearchQueryVo>> getInfoContentByFinalAudit(@Valid @RequestBody InfoContentBackSearchQueryParam infoContentBackSearchQueryParam) throws Exception {
PageTool<InfoContentBackSearchQueryVo> pageList = infoContentService.getInfoContentByFinalAudit(infoContentBackSearchQueryParam);
return ApiResult.ok(pageList);
}

/**
* 后台回收站列表
*/
@PostMapping("/getInfoContentByRecycle")
@ApiOperation(value = "获取InfoContentRecycleSearchQueryVo分页列表", notes = "后台回收站列表", response = InfoContentRecycleSearchQueryVo.class)
public ApiResult<PageTool<InfoContentRecycleSearchQueryVo>> getInfoContentByRecycle(@Valid @RequestBody InfoContentBackSearchQueryParam infoContentBackSearchQueryParam) throws Exception {
PageTool<InfoContentRecycleSearchQueryVo> pageList = infoContentService.getInfoContentByRecycle(infoContentBackSearchQueryParam);
return ApiResult.ok(pageList);
}


/**
* 修改信息内容
*/
@PostMapping("/update")
@ApiOperation(value = "修改InfoContent对象", notes = "修改信息内容", response = ApiResult.class)
public ApiResult<Boolean> updateInfoContent(@Valid @RequestBody InfoContent infoContent) throws Exception {
boolean flag = infoContentService.updateById(infoContent);
return ApiResult.result(flag);
}

/**
* 删除信息内容
*/
@PostMapping("/delete")
@ApiOperation(value = "删除InfoContent对象", notes = "删除信息内容", response = ApiResult.class)
public ApiResult<Boolean> deleteInfoContent(@Valid @RequestBody IdParam idParam) throws Exception {
boolean flag = infoContentService.removeById(idParam.getId());
return ApiResult.result(flag);
}

/**
* 信息内容分页列表
*/
@PostMapping("/getPageList")
@ApiOperation(value = "获取InfoContent分页列表", notes = "信息内容分页列表", response = InfoContentQueryVo.class)
public ApiResult<PageTool<InfoContentQueryVo>> getInfoContentPageList(@Valid @RequestBody InfoContentQueryParam infoContentQueryParam) throws Exception {
PageTool<InfoContentQueryVo> pageList = infoContentService.getInfoContentPageList(infoContentQueryParam);
return ApiResult.ok(pageList);
}

}


+ 90
- 0
src/main/java/com/xdf/creative/module/controller/InfoDetailController.java Zobrazit soubor

@@ -0,0 +1,90 @@
package com.xdf.creative.module.controller;

import com.xdf.creative.base.controller.BaseController;
import com.xdf.creative.base.params.IdParam;
import com.xdf.creative.base.params.creative.InfoDetailQueryParam;
import com.xdf.creative.base.vo.creative.InfoDetailQueryVo;
import com.xdf.creative.module.entity.InfoDetail;
import com.xdf.creative.module.service.InfoDetailService;
import com.xdf.creative.util.page.ApiResult;
import com.xdf.creative.util.page.PageTool;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
* <p>
* 信息详情 前端控制器
* </p>
*
* @author lgw
* @since 2020-03-09
*/
@Slf4j
@RestController
@RequestMapping("/infoDetail")
@Api("信息详情 API")
public class InfoDetailController extends BaseController {

@Autowired
private InfoDetailService infoDetailService;

/**
* 添加信息详情
*/
@PostMapping("/add")
@ApiOperation(value = "添加InfoDetail对象", notes = "添加信息详情", response = ApiResult.class)
public ApiResult<Boolean> addInfoDetail(@Valid @RequestBody InfoDetail infoDetail) throws Exception {
boolean flag = infoDetailService.save(infoDetail);
return ApiResult.result(flag);
}

/**
* 修改信息详情
*/
@PostMapping("/update")
@ApiOperation(value = "修改InfoDetail对象", notes = "修改信息详情", response = ApiResult.class)
public ApiResult<Boolean> updateInfoDetail(@Valid @RequestBody InfoDetail infoDetail) throws Exception {
boolean flag = infoDetailService.updateById(infoDetail);
return ApiResult.result(flag);
}

/**
* 删除信息详情
*/
@PostMapping("/delete")
@ApiOperation(value = "删除InfoDetail对象", notes = "删除信息详情", response = ApiResult.class)
public ApiResult<Boolean> deleteInfoDetail(@Valid @RequestBody IdParam idParam) throws Exception {
boolean flag = infoDetailService.removeById(idParam.getId());
return ApiResult.result(flag);
}

/**
* 获取信息详情
*/
@PostMapping("/info")
@ApiOperation(value = "获取InfoDetail对象详情", notes = "查看信息详情", response = InfoDetailQueryVo.class)
public ApiResult<InfoDetailQueryVo> getInfoDetail(@Valid @RequestBody IdParam idParam) throws Exception {
InfoDetailQueryVo infoDetailQueryVo = infoDetailService.getInfoDetailById(idParam.getId());
return ApiResult.ok(infoDetailQueryVo);
}

/**
* 信息详情分页列表
*/
@PostMapping("/getPageList")
@ApiOperation(value = "获取InfoDetail分页列表", notes = "信息详情分页列表", response = InfoDetailQueryVo.class)
public ApiResult<PageTool<InfoDetailQueryVo>> getInfoDetailPageList(@Valid @RequestBody InfoDetailQueryParam infoDetailQueryParam) throws Exception {
PageTool<InfoDetailQueryVo> pageList = infoDetailService.getInfoDetailPageList(infoDetailQueryParam);
return ApiResult.ok(pageList);
}

}


+ 97
- 0
src/main/java/com/xdf/creative/module/controller/InfoTypeController.java Zobrazit soubor

@@ -0,0 +1,97 @@
package com.xdf.creative.module.controller;

import com.xdf.creative.base.controller.BaseController;
import com.xdf.creative.base.params.IdParam;
import com.xdf.creative.base.params.creative.InfoTypeQueryParam;
import com.xdf.creative.base.vo.creative.InfoTypeQueryVo;
import com.xdf.creative.module.entity.InfoType;
import com.xdf.creative.module.service.InfoTypeService;
import com.xdf.creative.support.aop.OperateLogger;
import com.xdf.creative.util.page.ApiResult;
import com.xdf.creative.util.page.PageTool;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
* <p>
* 栏目类型 前端控制器
* </p>
*
* @author lgw
* @since 2020-03-06
*/
@Slf4j
@RestController
@RequestMapping("/infoType")
@Api("栏目类型 API")
public class InfoTypeController extends BaseController {

@Autowired
private InfoTypeService infoTypeService;

/**
* 添加栏目类型
*/
@PostMapping("/addInfoType")
@ApiOperation(value = "添加InfoType对象", notes = "添加栏目类型", response = ApiResult.class)
@OperateLogger(name = "添加栏目类型",attributeId="id",attributeName="infoName")
public ApiResult addInfoType(@Valid @RequestBody InfoType infoType) throws Exception {
return infoTypeService.addInfoType(infoType);
}

/**
* 栏目类型分页列表
*/
@PostMapping("/getPageList")
@ApiOperation(value = "获取InfoType分页列表", notes = "栏目类型分页列表", response = InfoTypeQueryVo.class)
public ApiResult<PageTool<InfoTypeQueryVo>> getInfoTypePageList(@Valid @RequestBody InfoTypeQueryParam infoTypeQueryParam) throws Exception {
PageTool<InfoTypeQueryVo> pageList = infoTypeService.getInfoTypePageList(infoTypeQueryParam);
return ApiResult.ok(pageList);
}





/**
* 修改栏目类型
*/
@PostMapping("/update")
@ApiOperation(value = "修改InfoType对象", notes = "修改栏目类型", response = ApiResult.class)
public ApiResult<Boolean> updateInfoType(@Valid @RequestBody InfoType infoType) throws Exception {
boolean flag = infoTypeService.updateById(infoType);
return ApiResult.result(flag);
}

/**
* 删除栏目类型
*/
@PostMapping("/delete")
@ApiOperation(value = "删除InfoType对象", notes = "删除栏目类型", response = ApiResult.class)
public ApiResult<Boolean> deleteInfoType(@Valid @RequestBody IdParam idParam) throws Exception {
boolean flag = infoTypeService.removeById(idParam.getId());
return ApiResult.result(flag);
}

/**
* 获取栏目类型
*/
@PostMapping("/info")
@ApiOperation(value = "获取InfoType对象详情", notes = "查看栏目类型", response = InfoTypeQueryVo.class)
public ApiResult<InfoTypeQueryVo> getInfoType(@Valid @RequestBody IdParam idParam) throws Exception {
InfoTypeQueryVo infoTypeQueryVo = infoTypeService.getInfoTypeById(idParam.getId());
return ApiResult.ok(infoTypeQueryVo);
}



}


+ 90
- 0
src/main/java/com/xdf/creative/module/controller/InfoUrlController.java Zobrazit soubor

@@ -0,0 +1,90 @@
package com.xdf.creative.module.controller;

import com.xdf.creative.base.controller.BaseController;
import com.xdf.creative.base.params.IdParam;
import com.xdf.creative.base.params.creative.InfoUrlQueryParam;
import com.xdf.creative.base.vo.creative.InfoUrlQueryVo;
import com.xdf.creative.module.entity.InfoUrl;
import com.xdf.creative.module.service.InfoUrlService;
import com.xdf.creative.util.page.ApiResult;
import com.xdf.creative.util.page.PageTool;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
* <p>
* 相关链接 前端控制器
* </p>
*
* @author lgw
* @since 2020-03-09
*/
@Slf4j
@RestController
@RequestMapping("/infoUrl")
@Api("相关链接 API")
public class InfoUrlController extends BaseController {

@Autowired
private InfoUrlService infoUrlService;

/**
* 添加相关链接
*/
@PostMapping("/add")
@ApiOperation(value = "添加InfoUrl对象", notes = "添加相关链接", response = ApiResult.class)
public ApiResult<Boolean> addInfoUrl(@Valid @RequestBody InfoUrl infoUrl) throws Exception {
boolean flag = infoUrlService.save(infoUrl);
return ApiResult.result(flag);
}

/**
* 修改相关链接
*/
@PostMapping("/update")
@ApiOperation(value = "修改InfoUrl对象", notes = "修改相关链接", response = ApiResult.class)
public ApiResult<Boolean> updateInfoUrl(@Valid @RequestBody InfoUrl infoUrl) throws Exception {
boolean flag = infoUrlService.updateById(infoUrl);
return ApiResult.result(flag);
}

/**
* 删除相关链接
*/
@PostMapping("/delete")
@ApiOperation(value = "删除InfoUrl对象", notes = "删除相关链接", response = ApiResult.class)
public ApiResult<Boolean> deleteInfoUrl(@Valid @RequestBody IdParam idParam) throws Exception {
boolean flag = infoUrlService.removeById(idParam.getId());
return ApiResult.result(flag);
}

/**
* 获取相关链接
*/
@PostMapping("/info")
@ApiOperation(value = "获取InfoUrl对象详情", notes = "查看相关链接", response = InfoUrlQueryVo.class)
public ApiResult<InfoUrlQueryVo> getInfoUrl(@Valid @RequestBody IdParam idParam) throws Exception {
InfoUrlQueryVo infoUrlQueryVo = infoUrlService.getInfoUrlById(idParam.getId());
return ApiResult.ok(infoUrlQueryVo);
}

/**
* 相关链接分页列表
*/
@PostMapping("/getPageList")
@ApiOperation(value = "获取InfoUrl分页列表", notes = "相关链接分页列表", response = InfoUrlQueryVo.class)
public ApiResult<PageTool<InfoUrlQueryVo>> getInfoUrlPageList(@Valid @RequestBody InfoUrlQueryParam infoUrlQueryParam) throws Exception {
PageTool<InfoUrlQueryVo> pageList = infoUrlService.getInfoUrlPageList(infoUrlQueryParam);
return ApiResult.ok(pageList);
}

}


+ 95
- 0
src/main/java/com/xdf/creative/module/controller/InfoWordManageController.java Zobrazit soubor

@@ -0,0 +1,95 @@
package com.xdf.creative.module.controller;

import com.xdf.creative.base.controller.BaseController;
import com.xdf.creative.base.params.IdParam;
import com.xdf.creative.base.params.creative.InfoWordManageQueryParam;
import com.xdf.creative.base.vo.creative.InfoWordManageQueryVo;
import com.xdf.creative.module.entity.InfoWordManage;
import com.xdf.creative.module.service.InfoWordManageService;
import com.xdf.creative.support.aop.OperateLogger;
import com.xdf.creative.util.page.ApiResult;
import com.xdf.creative.util.page.PageTool;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
* <p>
* 词管理 前端控制器
* </p>
*
* @author lgw
* @since 2020-03-06
*/
@Slf4j
@RestController
@RequestMapping("/infoWordManage")
@Api("词管理 API")
public class InfoWordManageController extends BaseController {

@Autowired
private InfoWordManageService infoWordManageService;

/**
* 添加词管理
*/
@PostMapping("/addInfoWordManage")
@ApiOperation(value = "添加InfoWordManage对象", notes = "添加词管理", response = ApiResult.class)
@OperateLogger(name = "添加敏感词",attributeId="id",attributeName="word")
public ApiResult addInfoWordManage(@Valid @RequestBody InfoWordManage infoWordManage) throws Exception {
return infoWordManageService.addInfoWordManage(infoWordManage);
}
/**
* 修改词管理
*/
@PostMapping("/updateInfoWordManage")
@ApiOperation(value = "修改InfoWordManage对象", notes = "修改词管理", response = ApiResult.class)
@OperateLogger(name = "修改敏感词",attributeId="id",attributeName="word")
public ApiResult updateInfoWordManage(@Valid @RequestBody InfoWordManage infoWordManage) throws Exception {
return infoWordManageService.updateInfoWordManage(infoWordManage);
}

/**
* 删除词管理
*/
@PostMapping("/deleteInfoWordManage")
@ApiOperation(value = "删除InfoWordManage对象", notes = "删除词管理", response = ApiResult.class)
@OperateLogger(name = "删除敏感词",attributeId="id",attributeName="value")
public ApiResult<Boolean> deleteInfoWordManage(@Valid @RequestBody IdParam idParam) throws Exception {
return infoWordManageService.deleteInfoWordManage(idParam);
}

/**
* 词管理分页列表
*/
@PostMapping("/getPageList")
@ApiOperation(value = "获取InfoWordManage分页列表", notes = "词管理分页列表", response = InfoWordManageQueryVo.class)
public ApiResult<PageTool<InfoWordManageQueryVo>> getInfoWordManagePageList(@Valid @RequestBody InfoWordManageQueryParam infoWordManageQueryParam) throws Exception {
PageTool<InfoWordManageQueryVo> pageList = infoWordManageService.getInfoWordManagePageList(infoWordManageQueryParam);
return ApiResult.ok(pageList);
}




/**
* 获取词管理
*/
@PostMapping("/getInfoWordManage")
@ApiOperation(value = "获取InfoWordManage对象详情", notes = "查看词管理", response = InfoWordManageQueryVo.class)
public ApiResult<InfoWordManageQueryVo> getInfoWordManage(@Valid @RequestBody IdParam idParam) throws Exception {
InfoWordManageQueryVo infoWordManageQueryVo = infoWordManageService.getInfoWordManageById(idParam.getId());
return ApiResult.ok(infoWordManageQueryVo);
}



}


+ 90
- 0
src/main/java/com/xdf/creative/module/controller/OauthTokenController.java Zobrazit soubor

@@ -0,0 +1,90 @@
package com.xdf.creative.module.controller;

import com.xdf.creative.base.controller.BaseController;
import com.xdf.creative.base.params.IdParam;
import com.xdf.creative.base.params.creative.OauthTokenQueryParam;
import com.xdf.creative.base.vo.creative.OauthTokenQueryVo;
import com.xdf.creative.module.entity.OauthToken;
import com.xdf.creative.module.service.OauthTokenService;
import com.xdf.creative.util.page.ApiResult;
import com.xdf.creative.util.page.PageTool;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
* <p>
* 前端控制器
* </p>
*
* @author lgw
* @since 2020-03-05
*/
@Slf4j
@RestController
@RequestMapping("/oauthToken")
@Api(" API")
public class OauthTokenController extends BaseController {

@Autowired
private OauthTokenService oauthTokenService;

/**
* 添加
*/
@PostMapping("/add")
@ApiOperation(value = "添加OauthToken对象", notes = "添加", response = ApiResult.class)
public ApiResult<Boolean> addOauthToken(@Valid @RequestBody OauthToken oauthToken) throws Exception {
boolean flag = oauthTokenService.save(oauthToken);
return ApiResult.result(flag);
}

/**
* 修改
*/
@PostMapping("/update")
@ApiOperation(value = "修改OauthToken对象", notes = "修改", response = ApiResult.class)
public ApiResult<Boolean> updateOauthToken(@Valid @RequestBody OauthToken oauthToken) throws Exception {
boolean flag = oauthTokenService.updateById(oauthToken);
return ApiResult.result(flag);
}

/**
* 删除
*/
@PostMapping("/delete")
@ApiOperation(value = "删除OauthToken对象", notes = "删除", response = ApiResult.class)
public ApiResult<Boolean> deleteOauthToken(@Valid @RequestBody IdParam idParam) throws Exception {
boolean flag = oauthTokenService.removeById(idParam.getId());
return ApiResult.result(flag);
}

/**
* 获取
*/
@PostMapping("/info")
@ApiOperation(value = "获取OauthToken对象详情", notes = "查看", response = OauthTokenQueryVo.class)
public ApiResult<OauthTokenQueryVo> getOauthToken(@Valid @RequestBody IdParam idParam) throws Exception {
OauthTokenQueryVo oauthTokenQueryVo = oauthTokenService.getOauthTokenById(idParam.getId());
return ApiResult.ok(oauthTokenQueryVo);
}

/**
* 分页列表
*/
@PostMapping("/getPageList")
@ApiOperation(value = "获取OauthToken分页列表", notes = "分页列表", response = OauthTokenQueryVo.class)
public ApiResult<PageTool<OauthTokenQueryVo>> getOauthTokenPageList(@Valid @RequestBody OauthTokenQueryParam oauthTokenQueryParam) throws Exception {
PageTool<OauthTokenQueryVo> pageList = oauthTokenService.getOauthTokenPageList(oauthTokenQueryParam);
return ApiResult.ok(pageList);
}

}


+ 97
- 0
src/main/java/com/xdf/creative/module/controller/SysAccountLogController.java Zobrazit soubor

@@ -0,0 +1,97 @@
package com.xdf.creative.module.controller;

import com.xdf.creative.base.controller.BaseController;
import com.xdf.creative.base.params.IdParam;
import com.xdf.creative.base.params.creative.SysAccountLogQueryParam;
import com.xdf.creative.base.vo.creative.SysAccountLogQueryVo;
import com.xdf.creative.module.entity.SysAccountLog;
import com.xdf.creative.module.service.SysAccountLogService;
import com.xdf.creative.util.page.ApiResult;
import com.xdf.creative.util.page.PageTool;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
* <p>
* 账户登录日志 前端控制器
* </p>
*
* @author lgw
* @since 2020-03-06
*/
@Slf4j
@RestController
@RequestMapping("/sysAccountLog")
@Api("账户登录日志 API")
public class SysAccountLogController extends BaseController {

@Autowired
private SysAccountLogService sysAccountLogService;

/**
* 账户登录日志分页列表
*/
@PostMapping("/getPageList")
@ApiOperation(value = "获取SysAccountLog分页列表", notes = "账户登录日志分页列表", response = SysAccountLogQueryVo.class)
public ApiResult<PageTool<SysAccountLogQueryVo>> getSysAccountLogPageList(@Valid @RequestBody SysAccountLogQueryParam sysAccountLogQueryParam) throws Exception {
PageTool<SysAccountLogQueryVo> pageList = sysAccountLogService.getSysAccountLogPageList(sysAccountLogQueryParam);
return ApiResult.ok(pageList);
}

/**
* 删除账户登录日志
*/
@PostMapping("/deleteSysAccountLog")
@ApiOperation(value = "删除SysAccountLog对象", notes = "删除账户登录日志", response = ApiResult.class)
public ApiResult<Boolean> deleteSysAccountLog(@Valid @RequestBody IdParam idParam) throws Exception {
boolean flag = sysAccountLogService.removeById(idParam.getId());
return ApiResult.result(flag);
}




/**
* 添加账户登录日志
*/
@PostMapping("/add")
@ApiOperation(value = "添加SysAccountLog对象", notes = "添加账户登录日志", response = ApiResult.class)
public ApiResult<Boolean> addSysAccountLog(@Valid @RequestBody SysAccountLog sysAccountLog) throws Exception {
boolean flag = sysAccountLogService.save(sysAccountLog);
return ApiResult.result(flag);
}

/**
* 修改账户登录日志
*/
@PostMapping("/update")
@ApiOperation(value = "修改SysAccountLog对象", notes = "修改账户登录日志", response = ApiResult.class)
public ApiResult<Boolean> updateSysAccountLog(@Valid @RequestBody SysAccountLog sysAccountLog) throws Exception {
boolean flag = sysAccountLogService.updateById(sysAccountLog);
return ApiResult.result(flag);
}



/**
* 获取账户登录日志
*/
@PostMapping("/info")
@ApiOperation(value = "获取SysAccountLog对象详情", notes = "查看账户登录日志", response = SysAccountLogQueryVo.class)
public ApiResult<SysAccountLogQueryVo> getSysAccountLog(@Valid @RequestBody IdParam idParam) throws Exception {
SysAccountLogQueryVo sysAccountLogQueryVo = sysAccountLogService.getSysAccountLogById(idParam.getId());
return ApiResult.ok(sysAccountLogQueryVo);
}



}


+ 76
- 0
src/main/java/com/xdf/creative/module/controller/SysOperateLogController.java Zobrazit soubor

@@ -0,0 +1,76 @@
package com.xdf.creative.module.controller;

import com.xdf.creative.base.controller.BaseController;
import com.xdf.creative.base.params.IdParam;
import com.xdf.creative.base.params.creative.SysOperateLogQueryParam;
import com.xdf.creative.base.vo.creative.SysOperateLogQueryVo;
import com.xdf.creative.module.entity.SysOperateLog;
import com.xdf.creative.module.service.SysOperateLogService;
import com.xdf.creative.util.page.ApiResult;
import com.xdf.creative.util.page.PageTool;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
* <p>
* 账户操作日志 前端控制器
* </p>
*
* @author lgw
* @since 2020-03-06
*/
@Slf4j
@RestController
@RequestMapping("/sysOperateLog")
@Api("账户操作日志 API")
public class SysOperateLogController extends BaseController {

@Autowired
private SysOperateLogService sysOperateLogService;


/**
* 账户操作日志分页列表
*/
@PostMapping("/getPageList")
@ApiOperation(value = "获取SysOperateLog分页列表", notes = "账户操作日志分页列表", response = SysOperateLogQueryVo.class)
public ApiResult<PageTool<SysOperateLogQueryVo>> getSysOperateLogPageList(@Valid @RequestBody SysOperateLogQueryParam sysOperateLogQueryParam) throws Exception {
PageTool<SysOperateLogQueryVo> pageList = sysOperateLogService.getSysOperateLogPageList(sysOperateLogQueryParam);
return ApiResult.ok(pageList);
}

/**
* 删除账户操作日志
*/
@PostMapping("/deleteSysOperateLog")
@ApiOperation(value = "删除SysOperateLog对象", notes = "删除账户操作日志", response = ApiResult.class)
public ApiResult<Boolean> deleteSysOperateLog(@Valid @RequestBody IdParam idParam) throws Exception {
boolean flag = sysOperateLogService.removeById(idParam.getId());
return ApiResult.result(flag);
}




/**
* 获取账户操作日志
*/
@PostMapping("/info")
@ApiOperation(value = "获取SysOperateLog对象详情", notes = "查看账户操作日志", response = SysOperateLogQueryVo.class)
public ApiResult<SysOperateLogQueryVo> getSysOperateLog(@Valid @RequestBody IdParam idParam) throws Exception {
SysOperateLogQueryVo sysOperateLogQueryVo = sysOperateLogService.getSysOperateLogById(idParam.getId());
return ApiResult.ok(sysOperateLogQueryVo);
}



}


+ 45
- 22
src/main/java/com/xdf/creative/module/controller/SysPermissionController.java Zobrazit soubor

@@ -2,7 +2,9 @@
package com.xdf.creative.module.controller;

import com.xdf.creative.base.controller.BaseController;
import com.xdf.creative.base.params.IdParam;
import com.xdf.creative.base.params.creative.SysPermissionQueryParam;
import com.xdf.creative.base.params.creative.SysRoleImpowerPermissionQueryParam;
import com.xdf.creative.base.vo.creative.SysPermissionQueryVo;
import com.xdf.creative.module.entity.SysPermission;
import com.xdf.creative.module.service.SysPermissionService;
@@ -36,6 +38,47 @@ public class SysPermissionController extends BaseController {

@Autowired
private SysPermissionService sysPermissionService;
/**
* 获取所有菜单列表
*/
@PostMapping("/getAllMenuList")
@ApiOperation(value = "获取所有菜单列表", notes = "获取所有菜单列表", response = SysPermission.class)
public ApiResult<SysPermission> getAllMenuList() throws Exception {
List<SysPermission> list = sysPermissionService.getAllMenuList();
return ApiResult.ok(list);
}
/**
* 角色授权资源树
*/
@PostMapping("/impowerResourceTreeList")
@ApiOperation(value = "获取所有菜单列表", notes = "获取所有菜单列表", response = SysPermission.class)
public ApiResult impowerResourceTreeList(@Valid @RequestBody IdParam idParam) throws Exception {
List<Object> list = sysPermissionService.impowerResourceTreeList(idParam.getId());
TreeConfig config = new TreeConfig("resourceId", "parentResourceId", "parentResourceId", "1", "");
return ApiResult.ok(Utils.tree(list, config));
}
/**
* 角色授权资源
*
* @param sysRoleImpowerPermissionQueryParam
* @return
* @throws Exception
*/
@RequestMapping("/setPermissionToRoleByUserId")
@ApiOperation(value = "给用户角色授权", notes = "给用户角色授权", response = SysPermission.class)
public ApiResult<Boolean> setPermissionToRoleByUserId(@Valid @RequestBody SysRoleImpowerPermissionQueryParam sysRoleImpowerPermissionQueryParam) throws Exception {
return sysPermissionService.setPermissionToRoleByUserId(sysRoleImpowerPermissionQueryParam);
}












/**
@@ -88,16 +131,6 @@ public class SysPermissionController extends BaseController {
return ApiResult.ok(paging);
}

/**
* 获取所有菜单列表
*/
@PostMapping("/getAllMenuList")
@ApiOperation(value = "获取所有菜单列表", notes = "获取所有菜单列表", response = SysPermission.class)
public ApiResult<SysPermission> getAllMenuList() throws Exception {
List<SysPermission> list = sysPermissionService.getAllMenuList();
return ApiResult.ok(list);
}


/**
* 根据用户id获取菜单列表
@@ -124,23 +157,13 @@ public class SysPermissionController extends BaseController {
/**
* 角色授权资源树
*/
@PostMapping("/impowerResourceTreeList")
/* @PostMapping("/impowerResourceTreeList")
@ApiOperation(value = "获取所有菜单列表", notes = "获取所有菜单列表", response = SysPermission.class)
public ApiResult<SysPermission> impowerResourceTreeList(Long userId) throws Exception {
List<Object> list = sysPermissionService.impowerResourceTreeList(userId);
TreeConfig config = new TreeConfig("resourceId", "parentResourceId", "parentResourceId", "1", "");
return ApiResult.ok(Utils.tree(list, config));
}


@RequestMapping(value = "/setPermissionToRoleByUserId", method = {RequestMethod.GET})
@ApiOperation(value = "给用户角色授权", notes = "给用户角色授权", response = SysPermission.class)
public ApiResult<Boolean> setPermissionToRoleByUserId(Long userId, Long roleId) throws Exception {
boolean isSucceed = sysPermissionService.setPermissionToRoleByUserId(userId, roleId);
return ApiResult.result(isSucceed);
}


}*/
@RequestMapping(value = "/getTreeMenusByUserId", method = {RequestMethod.GET})
@ApiOperation(value = "根据用户ID获取树形菜单", notes = "根据用户ID获取树形菜单", response = SysPermission.class)
public ApiResult<List<Object>> getTreeMenusByUserId(Long userId) throws Exception {

+ 0
- 2
src/main/java/com/xdf/creative/module/controller/SysRegionController.java Zobrazit soubor

@@ -6,7 +6,6 @@ import com.xdf.creative.base.params.creative.SysRegionQueryParam;
import com.xdf.creative.base.vo.creative.SysRegionQueryVo;
import com.xdf.creative.module.entity.SysRegion;
import com.xdf.creative.module.service.SysRegionService;
import com.xdf.creative.support.aop.OperationLogger;
import com.xdf.creative.util.page.ApiResult;
import com.xdf.creative.util.page.PageTool;
import io.swagger.annotations.Api;
@@ -95,7 +94,6 @@ public class SysRegionController extends BaseController {
/**
* 全国行政区域[sys_region]分页列表
*/
@OperationLogger(value = "获取SysRegion列表") //这里添加了AOP的自定义注解
@PostMapping("/getRegionList")
@RequiresPermissions("/sysRegion/getRegionList")
@ApiOperation(value = "获取SysRegion列表", notes = "全国行政区域[sys_region]分页列表", response = SysRegionQueryVo.class)

+ 36
- 15
src/main/java/com/xdf/creative/module/controller/SysRoleController.java Zobrazit soubor

@@ -2,11 +2,13 @@
package com.xdf.creative.module.controller;

import com.xdf.creative.base.controller.BaseController;
import com.xdf.creative.base.params.IdParam;
import com.xdf.creative.base.params.creative.AddSysRoleParam;
import com.xdf.creative.base.params.creative.SysRoleQueryParam;
import com.xdf.creative.base.params.creative.UpdateSysRoleParam;
import com.xdf.creative.base.vo.creative.SysRoleQueryVo;
import com.xdf.creative.module.service.SysRoleService;
import com.xdf.creative.support.aop.OperateLogger;
import com.xdf.creative.util.page.ApiResult;
import com.xdf.creative.util.page.PageTool;
import io.swagger.annotations.Api;
@@ -38,33 +40,52 @@ public class SysRoleController extends BaseController {
/**
* 添加系统角色
*/
@PostMapping("/add")
@PostMapping("/addSysRole")
@ApiOperation(value = "添加SysRole对象", notes = "添加系统角色", response = ApiResult.class)
public ApiResult<Boolean> addSysRole(@Valid @RequestBody AddSysRoleParam addSysRoleParam) throws Exception {
boolean flag = sysRoleService.saveSysRole(addSysRoleParam);
return ApiResult.result(flag);
@OperateLogger(name = "添加角色",attributeId="id",attributeName="name")
public ApiResult addSysRole(@Valid @RequestBody SysRoleQueryParam sysRoleQueryParam) throws Exception {
return sysRoleService.addSysRole(sysRoleQueryParam);
}

/**
* 修改系统角色
*/
@PostMapping("/update")
@ApiOperation(value = "修改SysRole对象", notes = "修改系统角色", response = ApiResult.class)
public ApiResult<Boolean> updateSysRole(@Valid @RequestBody UpdateSysRoleParam updateSysRoleParam) throws Exception {
boolean flag = sysRoleService.updateSysRole(updateSysRoleParam);
return ApiResult.result(flag);
@PostMapping("/updateSysRole")
@ApiOperation(value = "添加SysRole对象", notes = "添加系统角色", response = ApiResult.class)
@OperateLogger(name = "修改角色",attributeId="id",attributeName="name")
public ApiResult updateSysRole(@Valid @RequestBody SysRoleQueryParam sysRoleQueryParam) throws Exception {
return sysRoleService.updateSysRole(sysRoleQueryParam);
}

/**
* 删除系统角色
*/
@PostMapping("/delete/{id}")
@PostMapping("/deleteSysRole")
@ApiOperation(value = "删除SysRole对象", notes = "删除系统角色", response = ApiResult.class)
public ApiResult<Boolean> deleteSysRole(@PathVariable("id") Long id) throws Exception {
boolean flag = sysRoleService.deleteSysRole(id);
return ApiResult.result(flag);
@OperateLogger(name = "删除角色",attributeId="id",attributeName="value")
public ApiResult<Boolean> deleteSysRole(@Valid @RequestBody IdParam idParam) throws Exception {
return sysRoleService.deleteSysRole(idParam.getId());
}

/**
* 根据UserId系统角色列表
*/
@PostMapping(value = "/getRoleList")
@ApiOperation(value = "获取SysRole列表", notes = "系统角色列表", response = SysRoleQueryVo.class)
public ApiResult getRoleList() {
return sysRoleService.getRoleList();
}













/**
* 获取系统角色
*/

+ 122
- 41
src/main/java/com/xdf/creative/module/controller/SysUserController.java Zobrazit soubor

@@ -2,12 +2,16 @@
package com.xdf.creative.module.controller;

import com.xdf.creative.base.controller.BaseController;
import com.xdf.creative.base.params.creative.SysUserQueryParam;
import com.xdf.creative.base.params.creative.UpdatePasswordParam;
import com.xdf.creative.base.params.creative.UpdateUserParam;
import com.xdf.creative.base.params.IdParam;
import com.xdf.creative.base.params.creative.*;
import com.xdf.creative.base.vo.creative.SysUserBackQueryVo;
import com.xdf.creative.base.vo.creative.SysUserInfoQueryVo;
import com.xdf.creative.base.vo.creative.SysUserQueryVo;
import com.xdf.creative.module.entity.SysUser;
import com.xdf.creative.module.service.OauthTokenService;
import com.xdf.creative.module.service.SysUserService;
import com.xdf.creative.shiro.jwt.JwtUtil;
import com.xdf.creative.support.aop.AccountLogger;
import com.xdf.creative.support.aop.OperateLogger;
import com.xdf.creative.support.auth.LoginParam;
import com.xdf.creative.support.auth.LoginSysUserTokenVo;
import com.xdf.creative.util.page.ApiResult;
@@ -18,6 +22,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;

@@ -37,86 +42,162 @@ public class SysUserController extends BaseController {

@Autowired
private SysUserService sysUserService;
@Autowired
private OauthTokenService oauthTokenService;


/**
* 用户登录
*
* @param loginParam
* @param response
* @return
* @throws Exception
*/
@PostMapping("/login")
@ApiOperation(value = "登陆", notes = "系统用户登陆", response = ApiResult.class)
public ApiResult login(@Valid @RequestBody LoginParam loginParam, HttpServletResponse response) throws Exception {
LoginSysUserTokenVo loginSysUserTokenVo = sysUserService.login(loginParam);
// 设置token响应头
// response.setHeader(JwtTokenUtil.getTokenName(), loginSysUserTokenVo.getToken());
return ApiResult.ok(loginSysUserTokenVo, "登陆成功");
}

/**
* 用户登出
*
* @param request
* @return
* @throws Exception
*/
@PostMapping("/logout")
@ApiOperation(value = "登陆", notes = "系统用户登陆", response = ApiResult.class)
public ApiResult logout(HttpServletRequest request) throws Exception {
String token = request.getHeader("Authorization");
Long userId = JwtUtil.getUserId(token);
oauthTokenService.removeTokenByUserId(userId);
return ApiResult.ok("登陆成功");
}

/**
* 添加系统用户
*/
@PostMapping("/add")
@PostMapping("/addSysUser")
@ApiOperation(value = "添加SysUser对象", notes = "添加系统用户", response = ApiResult.class)
public ApiResult<Boolean> addSysUser(@Valid @RequestBody SysUser sysUser) throws Exception {
boolean flag = sysUserService.saveSysUser(sysUser);
return ApiResult.result(flag);
@OperateLogger(name = "添加用户", attributeId = "id", attributeName = "username")
public ApiResult addSysUser(@Valid @RequestBody SysUserAddQueryParam sysUserAddQueryParam) throws Exception {
return sysUserService.addSysUser(sysUserAddQueryParam);
}

/**
* 修改系统用户
* 停用启用用户
*/
@PostMapping("/update")
@ApiOperation(value = "修改SysUser对象", notes = "修改系统用户", response = ApiResult.class)
public ApiResult<Boolean> updateSysUser(@Valid @RequestBody UpdateUserParam updateUserParam) throws Exception {
boolean flag = sysUserService.updateSysUser(updateUserParam);
return ApiResult.result(flag);
@PostMapping("/enabledSysUser")
@ApiOperation(value = "添加SysUser对象", notes = "添加系统用户", response = ApiResult.class)
@OperateLogger(name = "停用/启用用户", attributeId = "id", attributeName = "value")
public ApiResult enabledSysUser(@Valid @RequestBody IdParam idParam) throws Exception {
return sysUserService.enabledSysUser(idParam);
}

/**
* 删除系统用户
*/
@RequestMapping(value = "/delete", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/deleteSysUser", method = {RequestMethod.GET, RequestMethod.POST})
@ApiOperation(value = "删除SysUser对象", notes = "删除系统用户", response = ApiResult.class)
public ApiResult<Boolean> deleteSysUser(Long id) throws Exception {
boolean flag = sysUserService.deleteSysUser(id);
return ApiResult.result(flag);
@OperateLogger(name = "删除用户", attributeId = "id", attributeName = "value")
public ApiResult<Boolean> deleteSysUser(@Valid @RequestBody IdParam idParam) throws Exception {
return sysUserService.deleteSysUser(idParam);
}

/**
* 获取系统用户
* 修改密码
*/
@GetMapping("/getSysUserById")
@ApiOperation(value = "获取SysUser对象详情", notes = "查看系统用户", response = SysUserQueryVo.class)
public ApiResult<SysUserQueryVo> getSysUser(Long id) throws Exception {
SysUserQueryVo sysUserQueryVo = sysUserService.getSysUserById(id);
return ApiResult.ok(sysUserQueryVo);
@PostMapping("/updatePassword")
@ApiOperation(value = "修改密码", notes = "修改密码", response = ApiResult.class)
@OperateLogger(name = "修改密码", attributeId = "userId", attributeName = "username")
public ApiResult<Boolean> updatePassword(@Valid @RequestBody UpdatePasswordParam updatePasswordParam) throws Exception {
return sysUserService.updatePassword(updatePasswordParam);
}

/**
* 修改头像
*/
@PostMapping("/updateSysUserHead")
@ApiOperation(value = "修改头像", notes = "修改头像", response = ApiResult.class)
@OperateLogger(name = "修改头像", attributeId = "id", attributeName = "username")
public ApiResult updateSysUserHead(@Valid @RequestBody SysUserUpdateQueryParam sysUserUpdateQueryParam) throws Exception {
return sysUserService.updateSysUserHead(sysUserUpdateQueryParam);
}

/**
* 后台修改用户信息(包含角色)
*/
@PostMapping("/updateUserBack")
@ApiOperation(value = "后台修改用户信息(包含角色)", notes = "后台修改用户信息(包含角色)", response = ApiResult.class)
@OperateLogger(name = "管理员修改用户信息", attributeId = "id", attributeName = "username")
public ApiResult updateUserBack(@Valid @RequestBody SysUserUpdateQueryParam sysUserUpdateQueryParam) throws Exception {
return sysUserService.updateUserBack(sysUserUpdateQueryParam);
}


/**
* 用户个人信息修改
*/
/**
* 后台修改用户信息(包含角色)
*/
@PostMapping("/updateUserNom")
@ApiOperation(value = "个人修改用户信息", notes = "(包含角色", response = ApiResult.class)
@OperateLogger(name = "个人修改用户信息", attributeId = "id", attributeName = "username")
public ApiResult updateUserNom(@Valid @RequestBody SysUserUpdateQueryParam sysUserUpdateQueryParam) throws Exception {
return sysUserService.updateUserNom(sysUserUpdateQueryParam);
}


/**
* 重置密码
*/
@PostMapping("/resetPassword")
@ApiOperation(value = "重置密码", notes = "重置密码", response = ApiResult.class)
@OperateLogger(name = "重置密码", attributeId = "userId", attributeName = "username")
public ApiResult resetPassword(@RequestBody UpdatePasswordParam updatePasswordParam) throws Exception {
return sysUserService.resetPassword(updatePasswordParam);
}


/**
* 后台用户获取列表
*/
@PostMapping("/getSysUserBackList")
@ApiOperation(value = "获取SysUser分页列表", notes = "系统用户分页列表", response = SysUserQueryVo.class)
public ApiResult<PageTool<SysUserBackQueryVo>> getSysUserBackList(@Valid @RequestBody SysUserBackQueryParam sysUserQueryParam) throws Exception {
PageTool<SysUserBackQueryVo> pageList = sysUserService.getSysUserBackList(sysUserQueryParam);
return ApiResult.ok(pageList);
}



/**
* 获取系统用户
* 获取系统用户token
*/
@GetMapping("/getSysUserByUserName")
@GetMapping("/getSysUserById")
@ApiOperation(value = "获取SysUser对象详情", notes = "查看系统用户", response = SysUserQueryVo.class)
public ApiResult<SysUser> getSysUserByUserName(@RequestParam String username) throws Exception {
SysUser sysUser = sysUserService.getSysUserByUserName(username);
return ApiResult.ok(sysUser);
public ApiResult getSysUser() throws Exception {
return sysUserService.getSysUserById();
}





/**
* 系统用户分页列表
*/
@PostMapping("/getPageList")
@PostMapping("/getUserPageList")
@ApiOperation(value = "获取SysUser分页列表", notes = "系统用户分页列表", response = SysUserQueryVo.class)
public ApiResult<PageTool<SysUserQueryVo>> getSysUserPageList(@Valid @RequestBody SysUserQueryParam sysUserQueryParam) throws Exception {
PageTool<SysUserQueryVo> pageList = sysUserService.getSysUserPageList(sysUserQueryParam);
return ApiResult.ok(pageList);
}

/**
* 修改密码
*/
@PostMapping("/updatePassword")
@ApiOperation(value = "修改密码", notes = "修改密码", response = ApiResult.class)
public ApiResult<Boolean> updatePassword(@Valid @RequestBody UpdatePasswordParam updatePasswordParam) throws Exception {
boolean flag = sysUserService.updatePassword(updatePasswordParam);
return ApiResult.result(flag);
}

}


+ 32
- 0
src/main/java/com/xdf/creative/module/entity/FileUploadQuery.java Zobrazit soubor

@@ -0,0 +1,32 @@
package com.xdf.creative.module.entity;

import lombok.Data;

@Data
public class FileUploadQuery {
/**
* 文件64位
*/
private String baseCodeFile;
/**
* 文件名称
*/
private String fileName;
/**
* 文件类型
*/
private String fileType;
/**
* 文件上传目录
*/
private String uploadPath;
/**
* 参数目录类型数字
*/
private Integer dirType;

public FileUploadQuery() {

}

}

+ 46
- 0
src/main/java/com/xdf/creative/module/entity/InfoAttachment.java Zobrazit soubor

@@ -0,0 +1,46 @@
package com.xdf.creative.module.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
* <p>
* 相关附件表
* </p>
*
* @author lgw
* @since 2020-03-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoAttachment对象", description = "相关附件表")
public class InfoAttachment extends BaseEntity {

private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
private Long id;

@ApiModelProperty(value = "外键id")
private String foreignId;

@ApiModelProperty(value = "附件名称")
private String attachmentName;

@ApiModelProperty(value = "附件地址")
private String attachmentAddress;

@ApiModelProperty(value = "创建时间")
private Date createTime;

}

+ 49
- 0
src/main/java/com/xdf/creative/module/entity/InfoBack.java Zobrazit soubor

@@ -0,0 +1,49 @@
package com.xdf.creative.module.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
* <p>
* 信息退回
* </p>
*
* @author lgw
* @since 2020-03-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoBack对象", description = "信息退回")
public class InfoBack extends BaseEntity {

private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
private Long id;

@ApiModelProperty(value = "外键id")
private String foreignId;

@ApiModelProperty(value = "链接名称")
private String reason;

@ApiModelProperty(value = "退回类型 1、初审退回 2、终审退回")
private Integer backType;

@ApiModelProperty(value = "退回操作人")
private Long createUser;

@ApiModelProperty(value = "退回时间")
private Date backTime;

}

+ 99
- 0
src/main/java/com/xdf/creative/module/entity/InfoContent.java Zobrazit soubor

@@ -0,0 +1,99 @@
package com.xdf.creative.module.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
* <p>
* 信息内容
* </p>
*
* @author lgw
* @since 2020-03-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoContent对象", description = "信息内容")
public class InfoContent extends BaseEntity {

private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
private Long id;

@ApiModelProperty(value = "标题")
private String title;

@ApiModelProperty(value = "栏目类型id")
private Long infoTypeId;

@ApiModelProperty(value = "内容类型 0、图文形式 1 、超链接形式")
private Integer contentType;

@ApiModelProperty(value = "图片地址")
private String imageUrl;

@ApiModelProperty(value = "来源地址")
private String sourceUrl;

@ApiModelProperty(value = "作者")
private String author;

@ApiModelProperty(value = "外键id")
private String foreignId;

@ApiModelProperty(value = "内容状态 0 、草稿 1、待初审 2、待终审 3 终审通过 4、初审退回 5、终审退回")
private Integer state;

@ApiModelProperty(value = "创建用户")
private Long createUser;

@ApiModelProperty(value = "创建时间")
private Date createTime;


@ApiModelProperty(value = "创建时间")
private Date updateTime;

@ApiModelProperty(value = "提交时间")
private Date submitTime;

@ApiModelProperty(value = "初审人员")
private Long firstAuditUser;

@ApiModelProperty(value = "初审时间")
private Date firstAuditTime;

@ApiModelProperty(value = "终审人员")
private Long finalAuditUser;

@ApiModelProperty(value = "终审时间")
private Date finalAuditTime;

@ApiModelProperty(value = "排序")
private Integer sort;

@ApiModelProperty(value = "是否置顶 0否 1是")
private Integer istop;

@ApiModelProperty(value = "置顶时间")
private Date istopTime;

@ApiModelProperty(value = "上下状态 0 下线 1上线")
private Integer onlineType;


@ApiModelProperty(value = "逻辑删除,0:未删除,1:已删除")
private Integer deleted;

}

+ 44
- 0
src/main/java/com/xdf/creative/module/entity/InfoDetail.java Zobrazit soubor

@@ -0,0 +1,44 @@
package com.xdf.creative.module.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
* <p>
* 信息详情
* </p>
*
* @author lgw
* @since 2020-03-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoDetail对象", description = "信息详情")
public class InfoDetail extends BaseEntity {

private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
private Long id;

@ApiModelProperty(value = "摘要")
private String digest;

@ApiModelProperty(value = "正文")
private String content;

@ApiModelProperty(value = "外键id")
private String foreignId;

@ApiModelProperty(value = "超链接")
private String hyperlink;

}

+ 62
- 0
src/main/java/com/xdf/creative/module/entity/InfoType.java Zobrazit soubor

@@ -0,0 +1,62 @@
package com.xdf.creative.module.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
* <p>
* 栏目类型
* </p>
*
* @author lgw
* @since 2020-03-06
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoType对象", description = "栏目类型")
public class InfoType extends BaseEntity {

private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
private Long id;

@ApiModelProperty(value = "栏目id")
private String typeId;

@ApiModelProperty(value = "栏目父id")
@NotBlank(message = "父栏目不能为空!")
private String typeParentId;

@ApiModelProperty(value = "栏目名称")
@NotBlank(message = "栏目名称不能为空!")
private String infoName;

@ApiModelProperty(value = "模型")
private String modelName;

@ApiModelProperty(value = "排列顺序")
private Integer sort;

@ApiModelProperty(value = "是否显示 0 不显示 1显示")
private Integer state;

@ApiModelProperty(value = "创建时间")
private Date createTime;

@ApiModelProperty(value = "创建用户")
private Long createUserId;

}

+ 46
- 0
src/main/java/com/xdf/creative/module/entity/InfoUrl.java Zobrazit soubor

@@ -0,0 +1,46 @@
package com.xdf.creative.module.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
* <p>
* 相关链接
* </p>
*
* @author lgw
* @since 2020-03-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoUrl对象", description = "相关链接")
public class InfoUrl extends BaseEntity {

private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
private Long id;

@ApiModelProperty(value = "外键id")
private String foreignId;

@ApiModelProperty(value = "链接名称")
private String name;

@ApiModelProperty(value = "链接url")
private String url;

@ApiModelProperty(value = "创建时间")
private Date createTime;

}

+ 51
- 0
src/main/java/com/xdf/creative/module/entity/InfoWordManage.java Zobrazit soubor

@@ -0,0 +1,51 @@
package com.xdf.creative.module.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
* <p>
* 词管理
* </p>
*
* @author lgw
* @since 2020-03-06
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InfoWordManage对象", description = "词管理")
public class InfoWordManage extends BaseEntity {

private static final long serialVersionUID = 1L;

@TableId(value = "id", type = IdType.AUTO)
private Long id;

@ApiModelProperty(value = "敏感词")
@NotBlank(message = "敏感词不能为空")
private String word;

@ApiModelProperty(value = "替换内容")
@NotBlank(message = "替换内容不能为空")
private String replaceContent;

@ApiModelProperty(value = "维护人")
private Long accendantUser;

@ApiModelProperty(value = "维护时间")
private Date accendantTime;

@ApiModelProperty(value = "修改时间")
private Date updateTime;

}

+ 50
- 0
src/main/java/com/xdf/creative/module/entity/OauthToken.java Zobrazit soubor

@@ -0,0 +1,50 @@
package com.xdf.creative.module.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
* <p>
*
* </p>
*
* @author lgw
* @since 2020-03-05
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "OauthToken对象", description = "")
public class OauthToken extends BaseEntity {

private static final long serialVersionUID = 1L;

@TableId(value = "id", type = IdType.AUTO)
private Long id;

private String accessToken;

private Long userId;

private String permissions;

private String roles;
/**
* 是否刷新token 0 否 1是
*/
private Integer refreshToken;

private Date expireTime;

private Date createTime;

private Date updateTime;

}

+ 55
- 0
src/main/java/com/xdf/creative/module/entity/SysAccountLog.java Zobrazit soubor

@@ -0,0 +1,55 @@
package com.xdf.creative.module.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
* <p>
* 账户登录日志
* </p>
*
* @author lgw
* @since 2020-03-06
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SysAccountLog对象", description = "账户登录日志")
public class SysAccountLog extends BaseEntity {

private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
private Long id;

@ApiModelProperty(value = "用户id")
private Long userId;

@ApiModelProperty(value = "ip地址")
private String ip;

@ApiModelProperty(value = "操作名称")
private String name;

@ApiModelProperty(value = "操作内容")
private String content;

@ApiModelProperty(value = "创建时间")
private Date createTime;

@ApiModelProperty(value = "方法名称")
private String method;

@ApiModelProperty(value = "类型 1登录成功 2登录失败")
private Integer type;

}

+ 54
- 0
src/main/java/com/xdf/creative/module/entity/SysOperateLog.java Zobrazit soubor

@@ -0,0 +1,54 @@
package com.xdf.creative.module.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xdf.creative.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
* <p>
* 账户操作日志
* </p>
*
* @author lgw
* @since 2020-03-06
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SysOperateLog对象", description = "账户操作日志")
public class SysOperateLog extends BaseEntity {

private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
private Long id;

@ApiModelProperty(value = "用户id")
private Long userId;

@ApiModelProperty(value = "ip地址")
private String ip;

@ApiModelProperty(value = "操作名称")
private String name;

@ApiModelProperty(value = "操作内容")
private String content;

@ApiModelProperty(value = "创建时间")
private Date createTime;

@ApiModelProperty(value = "方法名称")
private String method;

private String detail;

}

+ 1
- 1
src/main/java/com/xdf/creative/module/entity/SysOrganize.java Zobrazit soubor

@@ -34,7 +34,7 @@ public class SysOrganize extends BaseEntity {
private String organizeName;

@ApiModelProperty(value = "管辖区域")
private Long popedom_id;
private Long popedomId;

@ApiModelProperty(value = "类型: 0 普通用户 1、园区用户 2 区文创办 3市文创办 8后台管理 ")
private Integer organizeType;

+ 4
- 1
src/main/java/com/xdf/creative/module/entity/SysRole.java Zobrazit soubor

@@ -32,7 +32,7 @@ public class SysRole extends BaseEntity {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.ID_WORKER)
@TableId(value = "id", type = IdType.AUTO)
private Long id;

@ApiModelProperty(value = "角色名称")
@@ -64,4 +64,7 @@ public class SysRole extends BaseEntity {
@Null(message = "修改时间不用传")
private Date updateTime;

@ApiModelProperty(value = "逻辑删除,0:未删除,1:已删除")
private Integer deleted;

}

+ 1
- 2
src/main/java/com/xdf/creative/module/entity/SysUser.java Zobrazit soubor

@@ -33,7 +33,7 @@ public class SysUser extends BaseEntity {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.ID_WORKER)
@TableId(value = "id", type = IdType.AUTO)
private Long id;

@ApiModelProperty(value = "用户名")
@@ -44,7 +44,6 @@ public class SysUser extends BaseEntity {
private String nickname;

@ApiModelProperty(value = "密码")
@NotBlank(message = "密码不能为空")
private String password;

@ApiModelProperty(value = "盐值")

+ 42
- 0
src/main/java/com/xdf/creative/module/mapper/InfoAttachmentMapper.java Zobrazit soubor

@@ -0,0 +1,42 @@
package com.xdf.creative.module.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xdf.creative.base.params.creative.InfoAttachmentQueryParam;
import com.xdf.creative.base.vo.creative.InfoAttachmentQueryVo;
import com.xdf.creative.module.entity.InfoAttachment;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.io.Serializable;

/**
* <p>
* 相关附件表 Mapper 接口
* </p>
*
* @author lgw
* @since 2020-03-09
*/
@Repository
public interface InfoAttachmentMapper extends BaseMapper<InfoAttachment> {

/**
* 根据ID获取查询对象
*
* @param id
* @return
*/
InfoAttachmentQueryVo getInfoAttachmentById(Serializable id);

/**
* 获取分页对象
*
* @param page
* @param infoAttachmentQueryParam
* @return
*/
IPage<InfoAttachmentQueryVo> getInfoAttachmentPageList(@Param("page") Page page, @Param("param") InfoAttachmentQueryParam infoAttachmentQueryParam);

}

+ 42
- 0
src/main/java/com/xdf/creative/module/mapper/InfoBackMapper.java Zobrazit soubor

@@ -0,0 +1,42 @@
package com.xdf.creative.module.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xdf.creative.base.params.creative.InfoBackQueryParam;
import com.xdf.creative.base.vo.creative.InfoBackQueryVo;
import com.xdf.creative.module.entity.InfoBack;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.io.Serializable;

/**
* <p>
* 信息退回 Mapper 接口
* </p>
*
* @author lgw
* @since 2020-03-09
*/
@Repository
public interface InfoBackMapper extends BaseMapper<InfoBack> {

/**
* 根据ID获取查询对象
*
* @param id
* @return
*/
InfoBackQueryVo getInfoBackById(Serializable id);

/**
* 获取分页对象
*
* @param page
* @param infoBackQueryParam
* @return
*/
IPage<InfoBackQueryVo> getInfoBackPageList(@Param("page") Page page, @Param("param") InfoBackQueryParam infoBackQueryParam);

}

+ 82
- 0
src/main/java/com/xdf/creative/module/mapper/InfoContentMapper.java Zobrazit soubor

@@ -0,0 +1,82 @@
package com.xdf.creative.module.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xdf.creative.base.params.creative.InfoContentBackSearchQueryParam;
import com.xdf.creative.base.params.creative.InfoContentHomePageQueryParam;
import com.xdf.creative.base.params.creative.InfoContentQueryParam;
import com.xdf.creative.base.params.creative.InfoContentWebSearchQueryParam;
import com.xdf.creative.base.vo.creative.*;
import com.xdf.creative.module.entity.InfoContent;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.io.Serializable;
import java.util.List;

/**
* <p>
* 信息内容 Mapper 接口
* </p>
*
* @author lgw
* @since 2020-03-09
*/
@Repository
public interface InfoContentMapper extends BaseMapper<InfoContent> {

/**
* 首页显示新闻
*
* @param infoContentHomePageQueryParam
* @return
*/
List<InfoContentHomePageQueryVo> getHomePageInfo(@Param("param") InfoContentHomePageQueryParam infoContentHomePageQueryParam);

/**
* 首页新闻搜索
*/
IPage<InfoContentWebSearchQueryVo> getSearchWebInfo(@Param("page") Page page, @Param("param") InfoContentWebSearchQueryParam infoContentWebSearchQueryParam);


/**
* 后台发布列表
*/
IPage<InfoContentBackSearchQueryVo> getInfoContentByAdd(@Param("page") Page page, @Param("param") InfoContentBackSearchQueryParam infoContentBackSearchQueryParam);

/**
* 后台初审列表
*/
IPage<InfoContentBackSearchQueryVo> getInfoContentByFirstAudit(@Param("page") Page page, @Param("param") InfoContentBackSearchQueryParam infoContentBackSearchQueryParam);


/**
* 后台终审列表
*/
IPage<InfoContentBackSearchQueryVo> getInfoContentByFinalAudit(@Param("page") Page page, @Param("param") InfoContentBackSearchQueryParam infoContentBackSearchQueryParam);

/**
* 后台终审列表
*/
IPage<InfoContentRecycleSearchQueryVo> getInfoContentByRecycle(@Param("page") Page page, @Param("param") InfoContentBackSearchQueryParam infoContentBackSearchQueryParam);


/**
* 根据ID获取查询对象
*
* @param id
* @return
*/
InfoContentQueryVo getInfoContentById(Serializable id);

/**
* 获取分页对象
*
* @param page
* @param infoContentQueryParam
* @return
*/
IPage<InfoContentQueryVo> getInfoContentPageList(@Param("page") Page page, @Param("param") InfoContentQueryParam infoContentQueryParam);

}

+ 42
- 0
src/main/java/com/xdf/creative/module/mapper/InfoDetailMapper.java Zobrazit soubor

@@ -0,0 +1,42 @@
package com.xdf.creative.module.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xdf.creative.base.params.creative.InfoDetailQueryParam;
import com.xdf.creative.base.vo.creative.InfoDetailQueryVo;
import com.xdf.creative.module.entity.InfoDetail;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.io.Serializable;

/**
* <p>
* 信息详情 Mapper 接口
* </p>
*
* @author lgw
* @since 2020-03-09
*/
@Repository
public interface InfoDetailMapper extends BaseMapper<InfoDetail> {

/**
* 根据ID获取查询对象
*
* @param id
* @return
*/
InfoDetailQueryVo getInfoDetailById(Serializable id);

/**
* 获取分页对象
*
* @param page
* @param infoDetailQueryParam
* @return
*/
IPage<InfoDetailQueryVo> getInfoDetailPageList(@Param("page") Page page, @Param("param") InfoDetailQueryParam infoDetailQueryParam);

}

+ 42
- 0
src/main/java/com/xdf/creative/module/mapper/InfoTypeMapper.java Zobrazit soubor

@@ -0,0 +1,42 @@
package com.xdf.creative.module.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xdf.creative.base.params.creative.InfoTypeQueryParam;
import com.xdf.creative.base.vo.creative.InfoTypeQueryVo;
import com.xdf.creative.module.entity.InfoType;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.io.Serializable;

/**
* <p>
* 栏目类型 Mapper 接口
* </p>
*
* @author lgw
* @since 2020-03-06
*/
@Repository
public interface InfoTypeMapper extends BaseMapper<InfoType> {

/**
* 根据ID获取查询对象
*
* @param id
* @return
*/
InfoTypeQueryVo getInfoTypeById(Serializable id);

/**
* 获取分页对象
*
* @param page
* @param infoTypeQueryParam
* @return
*/
IPage<InfoTypeQueryVo> getInfoTypePageList(@Param("page") Page page, @Param("param") InfoTypeQueryParam infoTypeQueryParam);

}

+ 42
- 0
src/main/java/com/xdf/creative/module/mapper/InfoUrlMapper.java Zobrazit soubor

@@ -0,0 +1,42 @@
package com.xdf.creative.module.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xdf.creative.base.params.creative.InfoUrlQueryParam;
import com.xdf.creative.base.vo.creative.InfoUrlQueryVo;
import com.xdf.creative.module.entity.InfoUrl;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.io.Serializable;

/**
* <p>
* 相关链接 Mapper 接口
* </p>
*
* @author lgw
* @since 2020-03-09
*/
@Repository
public interface InfoUrlMapper extends BaseMapper<InfoUrl> {

/**
* 根据ID获取查询对象
*
* @param id
* @return
*/
InfoUrlQueryVo getInfoUrlById(Serializable id);

/**
* 获取分页对象
*
* @param page
* @param infoUrlQueryParam
* @return
*/
IPage<InfoUrlQueryVo> getInfoUrlPageList(@Param("page") Page page, @Param("param") InfoUrlQueryParam infoUrlQueryParam);

}

+ 0
- 0
src/main/java/com/xdf/creative/module/mapper/InfoWordManageMapper.java Zobrazit soubor


Některé soubory nejsou zobrazny, neboť je v této revizi změněno mnoho souborů

Načítá se…
Zrušit
Uložit