From 66513ac91d4b77e67047a6caff216b814011dfee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9A=AE=E5=85=89=EF=BC=9A=E5=9F=8E=E4=B8=AD=E5=9F=8E?= <806783409@qq.com> Date: Sat, 15 Dec 2018 22:32:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=83=E9=99=90=E5=92=8C=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../doc/core/bean/swagger/Contact.java | 5 + .../zyplayer/doc/core/bean/swagger/Info.java | 42 ++ .../zyplayer/doc/core/bean/swagger/Paths.java | 5 + .../doc/core/bean/swagger/SwaggerApiDocs.java | 62 ++ zyplayer-doc-manage/pom.xml | 9 +- .../com/zyplayer/doc/manage/Application.java | 89 +-- .../manage/framework/config/MapperConfig.java | 67 ++ .../interceptor/RequestInfoInterceptor.java | 46 ++ .../manage/web/manage/UserInfoController.java | 75 +- .../doc/manage/web/manage/vo/AuthInfoVo.java | 118 +++ .../main/webapp/statics/lib/mg/css/mg-ui.css | 79 ++ .../main/webapp/statics/lib/mg/js/common.js | 696 +++++++++--------- .../mg/js/{mgResizeble.js => mgResizable.js} | 0 .../main/webapp/statics/lib/mg/js/toast.js | 71 +- .../src/main/webapp/statics/manage/about.html | 31 + .../webapp/statics/manage/auth/manage.html | 64 ++ .../src/main/webapp/statics/manage/hello.html | 26 - .../src/main/webapp/statics/manage/home.html | 123 ++++ .../webapp/statics/manage/user/manage.html | 232 ++++++ .../controller/vo/SwaggerResourcesInfoVo.java | 51 ++ 20 files changed, 1440 insertions(+), 451 deletions(-) create mode 100644 zyplayer-doc-core/src/main/java/com/zyplayer/doc/core/bean/swagger/Contact.java create mode 100644 zyplayer-doc-core/src/main/java/com/zyplayer/doc/core/bean/swagger/Info.java create mode 100644 zyplayer-doc-core/src/main/java/com/zyplayer/doc/core/bean/swagger/Paths.java create mode 100644 zyplayer-doc-core/src/main/java/com/zyplayer/doc/core/bean/swagger/SwaggerApiDocs.java create mode 100644 zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/framework/config/MapperConfig.java create mode 100644 zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/framework/interceptor/RequestInfoInterceptor.java create mode 100644 zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/web/manage/vo/AuthInfoVo.java create mode 100644 zyplayer-doc-manage/src/main/webapp/statics/lib/mg/css/mg-ui.css rename zyplayer-doc-manage/src/main/webapp/statics/lib/mg/js/{mgResizeble.js => mgResizable.js} (100%) create mode 100644 zyplayer-doc-manage/src/main/webapp/statics/manage/about.html create mode 100644 zyplayer-doc-manage/src/main/webapp/statics/manage/auth/manage.html delete mode 100644 zyplayer-doc-manage/src/main/webapp/statics/manage/hello.html create mode 100644 zyplayer-doc-manage/src/main/webapp/statics/manage/home.html create mode 100644 zyplayer-doc-manage/src/main/webapp/statics/manage/user/manage.html create mode 100644 zyplayer-doc-swagger/src/main/java/com/zyplayer/doc/swagger/controller/vo/SwaggerResourcesInfoVo.java diff --git a/zyplayer-doc-core/src/main/java/com/zyplayer/doc/core/bean/swagger/Contact.java b/zyplayer-doc-core/src/main/java/com/zyplayer/doc/core/bean/swagger/Contact.java new file mode 100644 index 00000000..5f08f88d --- /dev/null +++ b/zyplayer-doc-core/src/main/java/com/zyplayer/doc/core/bean/swagger/Contact.java @@ -0,0 +1,5 @@ +package com.zyplayer.doc.core.bean.swagger; + +public class Contact { + +} \ No newline at end of file diff --git a/zyplayer-doc-core/src/main/java/com/zyplayer/doc/core/bean/swagger/Info.java b/zyplayer-doc-core/src/main/java/com/zyplayer/doc/core/bean/swagger/Info.java new file mode 100644 index 00000000..3e775dfa --- /dev/null +++ b/zyplayer-doc-core/src/main/java/com/zyplayer/doc/core/bean/swagger/Info.java @@ -0,0 +1,42 @@ +package com.zyplayer.doc.core.bean.swagger; + +public class Info { + + private String description; + private String version; + private String title; + private Contact contact; + + public void setDescription(String description) { + this.description = description; + } + + public String getDescription() { + return description; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getVersion() { + return version; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getTitle() { + return title; + } + + public void setContact(Contact contact) { + this.contact = contact; + } + + public Contact getContact() { + return contact; + } + +} \ No newline at end of file diff --git a/zyplayer-doc-core/src/main/java/com/zyplayer/doc/core/bean/swagger/Paths.java b/zyplayer-doc-core/src/main/java/com/zyplayer/doc/core/bean/swagger/Paths.java new file mode 100644 index 00000000..d7064a52 --- /dev/null +++ b/zyplayer-doc-core/src/main/java/com/zyplayer/doc/core/bean/swagger/Paths.java @@ -0,0 +1,5 @@ +package com.zyplayer.doc.core.bean.swagger; + +public class Paths { + +} \ No newline at end of file diff --git a/zyplayer-doc-core/src/main/java/com/zyplayer/doc/core/bean/swagger/SwaggerApiDocs.java b/zyplayer-doc-core/src/main/java/com/zyplayer/doc/core/bean/swagger/SwaggerApiDocs.java new file mode 100644 index 00000000..f7a93fb0 --- /dev/null +++ b/zyplayer-doc-core/src/main/java/com/zyplayer/doc/core/bean/swagger/SwaggerApiDocs.java @@ -0,0 +1,62 @@ +package com.zyplayer.doc.core.bean.swagger; + +import java.util.List; + +public class SwaggerApiDocs { + + private String swagger; + private Info info; + private String host; + private String basePath; + private List tags; + private Paths paths; + + public void setSwagger(String swagger) { + this.swagger = swagger; + } + + public String getSwagger() { + return swagger; + } + + public void setInfo(Info info) { + this.info = info; + } + + public Info getInfo() { + return info; + } + + public void setHost(String host) { + this.host = host; + } + + public String getHost() { + return host; + } + + public void setBasePath(String basePath) { + this.basePath = basePath; + } + + public String getBasePath() { + return basePath; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public List getTags() { + return tags; + } + + public void setPaths(Paths paths) { + this.paths = paths; + } + + public Paths getPaths() { + return paths; + } + +} \ No newline at end of file diff --git a/zyplayer-doc-manage/pom.xml b/zyplayer-doc-manage/pom.xml index c45bd2e7..ad930ce5 100644 --- a/zyplayer-doc-manage/pom.xml +++ b/zyplayer-doc-manage/pom.xml @@ -25,6 +25,8 @@ 2.0.1 1.0.0 2.0 + 6.1.0 + 1.1.9 @@ -52,7 +54,7 @@ com.alibaba druid - 1.1.9 + ${alibaba.druid.version} com.baomidou @@ -65,6 +67,11 @@ fastjson ${fastjson.version} + + com.github.dozermapper + dozer-core + ${dozer.core.version} + com.zyplayer diff --git a/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/Application.java b/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/Application.java index 2df33ce1..7c9ab575 100644 --- a/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/Application.java +++ b/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/Application.java @@ -1,42 +1,47 @@ -package com.zyplayer.doc.manage; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; -import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.core.env.Environment; - -import java.net.InetAddress; -import java.util.Optional; - -/** - * 程序启动器 - */ -@SpringBootApplication -public class Application extends SpringBootServletInitializer { - - private static Logger logger = LoggerFactory.getLogger(Application.class); - - @Override - protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { - return application.sources(Application.class); - } - - public static void main(String[] args) throws Exception { - ConfigurableApplicationContext application = SpringApplication.run(Application.class, args); - Environment env = application.getEnvironment(); - String contextPath = env.getProperty("server.servlet.context-path"); - contextPath = Optional.ofNullable(contextPath).orElse("").replaceFirst("/", ""); - contextPath = (contextPath.length() <= 0 || contextPath.endsWith("/")) ? contextPath : contextPath + "/"; - logger.info("\n----------------------------------------------------------\n\t" + - "\t\t地址列表\n\t" + - "文档地址:http://{}:{}/{}document.html\n" + - "----------------------------------------------------------", - InetAddress.getLocalHost().getHostAddress(), env.getProperty("server.port"), contextPath - ); - } -} - +package com.zyplayer.doc.manage; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.core.env.Environment; + +import java.net.InetAddress; +import java.util.Optional; + +/** + * 程序启动器 + */ +@SpringBootApplication +public class Application extends SpringBootServletInitializer { + + private static Logger logger = LoggerFactory.getLogger(Application.class); + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(Application.class); + } + + public static void main(String[] args) throws Exception { + ConfigurableApplicationContext application = SpringApplication.run(Application.class, args); + Environment env = application.getEnvironment(); + String contextPath = env.getProperty("server.servlet.context-path"); + contextPath = Optional.ofNullable(contextPath).orElse("").replaceFirst("/", ""); + contextPath = (contextPath.length() <= 0 || contextPath.endsWith("/")) ? contextPath : contextPath + "/"; + String hostAddress = InetAddress.getLocalHost().getHostAddress(); + String serverPort = env.getProperty("server.port"); + logger.info("\n----------------------------------------------------------\n\t" + + "\t\t地址列表\n\t" + + "文档地址:http://{}:{}/{}document.html\n\t" + + //"数据库地址:http://{}:{}/{}document.html\n " + + "管理地址:http://{}:{}/{}statics/manage/home.html\n" + + "----------------------------------------------------------", + hostAddress, serverPort, contextPath, + hostAddress, serverPort, contextPath + ); + } +} + diff --git a/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/framework/config/MapperConfig.java b/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/framework/config/MapperConfig.java new file mode 100644 index 00000000..02d40b2d --- /dev/null +++ b/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/framework/config/MapperConfig.java @@ -0,0 +1,67 @@ +package com.zyplayer.doc.manage.framework.config; + +import org.dozer.DozerBeanMapperBuilder; +import org.dozer.DozerConverter; +import org.dozer.Mapper; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import java.math.BigDecimal; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; + +@Configuration +public class MapperConfig { + + @Bean + public Mapper dozerBeanMapper() { + DozerBeanMapperBuilder builder = DozerBeanMapperBuilder.create() + .withCustomConverter(new DateStringConvert(Date.class, String.class)) + .withCustomConverter(new BigdecimalToStringConvert(BigDecimal.class, String.class)); + return builder.build(); + // return DozerBeanMapperBuilder.buildDefault(); + } + + private class DateStringConvert extends DozerConverter { + private DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + public DateStringConvert(Class prototypeA, Class prototypeB) { + super(prototypeA, prototypeB); + } + + @Override + public String convertTo(Date source, String destination) { + destination = dateFormat.format(source); + return destination; + } + + @Override + public Date convertFrom(String source, Date destination) { + try { + destination = dateFormat.parse(source); + } catch (ParseException e) { + e.printStackTrace(); + } + return destination; + } + } + + private class BigdecimalToStringConvert extends DozerConverter { + + public BigdecimalToStringConvert(Class prototypeA, Class prototypeB) { + super(prototypeA, prototypeB); + } + + @Override + public String convertTo(BigDecimal source, String destination) { + return source.toString(); + } + + @Override + public BigDecimal convertFrom(String source, BigDecimal destination) { + return BigDecimal.valueOf(Double.parseDouble(source)); + } + } +} diff --git a/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/framework/interceptor/RequestInfoInterceptor.java b/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/framework/interceptor/RequestInfoInterceptor.java new file mode 100644 index 00000000..b0f88842 --- /dev/null +++ b/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/framework/interceptor/RequestInfoInterceptor.java @@ -0,0 +1,46 @@ +package com.zyplayer.doc.manage.framework.interceptor; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; +import org.springframework.web.servlet.HandlerInterceptor; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * 记录当前请求信息 + */ +@Component +public class RequestInfoInterceptor implements HandlerInterceptor { + private static final Logger logger = LoggerFactory.getLogger(RequestInfoInterceptor.class); + + private ThreadLocal startTimeThreadLocal = new ThreadLocal<>(); + + /** + * 把当前请求记录到下来 + */ + @Override + public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object arg2, Exception arg3) + throws Exception { + long startTime = startTimeThreadLocal.get(); + long totalTime = System.currentTimeMillis() - startTime;// 结束时间 + logger.error("总耗时:{}ms URI:{}", totalTime, request.getRequestURI()); + } + + @Override + public void postHandle(HttpServletRequest request, HttpServletResponse response, Object haddler, + ModelAndView modelAndView) throws Exception { + } + + /** + * 记录请求信息 + */ + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object obj) throws Exception { + startTimeThreadLocal.set(System.currentTimeMillis()); + return true; + } + +} diff --git a/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/web/manage/UserInfoController.java b/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/web/manage/UserInfoController.java index 11acd6f8..504b26da 100644 --- a/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/web/manage/UserInfoController.java +++ b/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/web/manage/UserInfoController.java @@ -1,11 +1,19 @@ package com.zyplayer.doc.manage.web.manage; -import java.util.Date; -import java.util.List; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; +import com.zyplayer.doc.manage.repository.manage.entity.AuthInfo; +import com.zyplayer.doc.manage.repository.manage.entity.UserAuth; +import com.zyplayer.doc.manage.service.manage.AuthInfoService; +import com.zyplayer.doc.manage.service.manage.UserAuthService; +import com.zyplayer.doc.manage.web.manage.vo.AuthInfoVo; import org.apache.commons.lang.StringUtils; +import org.dozer.Mapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.DigestUtils; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -25,6 +33,12 @@ public class UserInfoController { @Autowired UserInfoService userInfoService; + @Autowired + AuthInfoService authInfoService; + @Autowired + UserAuthService userAuthService; + @Autowired + Mapper mapper; @PostMapping("/list") public ResponseJson list(String userName) { @@ -32,10 +46,62 @@ public class UserInfoController { if (StringUtils.isNotBlank(userName)) { queryWrapper.like("user_name", userName); } + queryWrapper.eq("del_flag", 0); List userInfoList = userInfoService.list(queryWrapper); + if (userInfoList != null && userInfoList.size() > 0) { + userInfoList.forEach(val -> val.setPassword(null)); + } return DocResponseJson.ok(userInfoList); } + @PostMapping("/auth/list") + public ResponseJson authList(String userIds) { + List authList = authInfoService.list(); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.in("user_id", userIds.split(",")); + queryWrapper.eq("del_flag", 0); + List userAuths = userAuthService.list(queryWrapper); + Map userAuthMap = userAuths.stream().collect(Collectors.toMap(UserAuth::getAuthId, Function.identity(), (val1, val2) -> val1)); + List authInfoVoList = new LinkedList<>(); + authList.forEach(val -> { + UserAuth userAuth = userAuthMap.get(val.getId()); + AuthInfoVo infoVo = mapper.map(val, AuthInfoVo.class); + infoVo.setChecked((userAuth == null) ? 0 : 1); + authInfoVoList.add(infoVo); + }); + return DocResponseJson.ok(authInfoVoList); + } + + @PostMapping("/auth/update") + public ResponseJson updateAuth(String userIds, String authIds) { + List userIdsList = Arrays.asList(userIds.split(",")).stream().collect(Collectors.mapping(val -> Long.valueOf(val), Collectors.toList())); + List authIdsList = Arrays.asList(authIds.split(",")).stream().collect(Collectors.mapping(val -> Long.valueOf(val), Collectors.toList())); + DocUserDetails currentUser = DocUserUtil.getCurrentUser(); + + UserAuth userAuthUp = new UserAuth(); + userAuthUp.setDelFlag(1); + userAuthUp.setUpdateTime(new Date()); + userAuthUp.setUpdateUid(currentUser.getUserId()); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.in("user_id", userIdsList); + userAuthService.update(userAuthUp, queryWrapper); + + List createList = new LinkedList<>(); + for (int i = 0; i < userIdsList.size(); i++) { + for (int j = 0; j < authIdsList.size(); j++) { + UserAuth userAuth = new UserAuth(); + userAuth.setUserId(userIdsList.get(i)); + userAuth.setAuthId(authIdsList.get(j)); + userAuth.setCreateUid(currentUser.getUserId()); + userAuth.setCreationTime(new Date()); + userAuth.setDelFlag(0); + createList.add(userAuth); + } + } + userAuthService.saveBatch(createList); + return DocResponseJson.ok(); + } + @PostMapping("/delete") public ResponseJson delete(Long id) { UserInfo userInfo = new UserInfo(); @@ -48,6 +114,11 @@ public class UserInfoController { @PostMapping("/update") public ResponseJson update(UserInfo userInfo) { + String password = userInfo.getPassword(); + if (StringUtils.isNotBlank(password)) { + password = DigestUtils.md5DigestAsHex(password.getBytes()); + userInfo.setPassword(password); + } if (userInfo.getId() != null && userInfo.getId() > 0) { userInfo.setUpdateTime(new Date()); userInfoService.updateById(userInfo); diff --git a/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/web/manage/vo/AuthInfoVo.java b/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/web/manage/vo/AuthInfoVo.java new file mode 100644 index 00000000..c1de61e6 --- /dev/null +++ b/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/web/manage/vo/AuthInfoVo.java @@ -0,0 +1,118 @@ +package com.zyplayer.doc.manage.web.manage.vo; + +import com.baomidou.mybatisplus.annotation.IdType; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.TableId; +import java.io.Serializable; + +/** + *

+ * + *

+ * + * @author 暮光:城中城 + * @since 2018-12-05 + */ +public class AuthInfoVo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键自增ID + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 是否选中 + */ + private Integer checked; + + /** + * 权限名 + */ + private String authName; + + /** + * 权限说明 + */ + private String authDesc; + + /** + * 是否可编辑 0=否 1=是 + */ + private Integer canEdit; + + /** + * 创建人 + */ + private Long createUid; + + /** + * 创建时间 + */ + private Date creationTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + public String getAuthName() { + return authName; + } + + public void setAuthName(String authName) { + this.authName = authName; + } + public String getAuthDesc() { + return authDesc; + } + + public void setAuthDesc(String authDesc) { + this.authDesc = authDesc; + } + public Integer getCanEdit() { + return canEdit; + } + + public void setCanEdit(Integer canEdit) { + this.canEdit = canEdit; + } + public Long getCreateUid() { + return createUid; + } + + public void setCreateUid(Long createUid) { + this.createUid = createUid; + } + public Date getCreationTime() { + return creationTime; + } + + public void setCreationTime(Date creationTime) { + this.creationTime = creationTime; + } + + @Override + public String toString() { + return "AuthInfo{" + + "id=" + id + + ", authName=" + authName + + ", authDesc=" + authDesc + + ", canEdit=" + canEdit + + ", createUid=" + createUid + + ", creationTime=" + creationTime + + "}"; + } + + public Integer getChecked() { + return checked; + } + + public void setChecked(Integer checked) { + this.checked = checked; + } +} diff --git a/zyplayer-doc-manage/src/main/webapp/statics/lib/mg/css/mg-ui.css b/zyplayer-doc-manage/src/main/webapp/statics/lib/mg/css/mg-ui.css new file mode 100644 index 00000000..6a15e1a8 --- /dev/null +++ b/zyplayer-doc-manage/src/main/webapp/statics/lib/mg/css/mg-ui.css @@ -0,0 +1,79 @@ +body{width: 100%;height: 100%;margin: 0;padding: 0;} +a:focus{outline:none;} +ul{list-style: none;list-style-type: none;} +.tree li a{white-space: nowrap;} +.tree-menu li > ul{background-color: #f1f1f1;} +.tree-menu li li li li a{padding-left: 68px;} +.tree-menu li li li li li a{padding-left: 88px;} +.tree-menu li li li li li li a{padding-left: 108px;} +.tree-menu li li li li li li li a{padding-left: 128px;} +.tree-menu li li li li li li li li a{padding-left: 148px;} +.tree-menu li li li li li li li li li a{padding-left: 168px;} +.tree-menu li li li li li li li li li li a{padding-left: 188px;} +.table td, .table th {vertical-align: middle;} + +/**lable的覆盖样式*/ +.label{font-size: 100%;} +.label-warning {background-color: #f9f5ee; color: #f1a325;} +label{font-weight: normal;} + +.nav.gray{background-color: #f1f1f1;margin-bottom: 10px;} + +.doc-table tr .info{text-align: right; width: 100px;} +.setting-table tr .info{text-align: right; max-width: 150px;} +.show-doc span{color: #aaa;} + +.mgresizableW{z-index: 90;height: 100%; width: 10px; cursor: e-resize;} +.ui-resizable-handle {display: block;font-size: 0.1px;position: absolute;} +#resizableLeftRight{left: 360px;} +.unselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;} + +.left-body{ + width: 360px; height:100%; position: fixed; top: 0; bottom: 0; left: 0; +} +.left-header{ + background: #3280fc;width: 100%; height:60px;line-height:60px; + position: absolute; top: 0; bottom: 0; left: 0;text-align: center; +} +.left-header .logo{ + font-size: 30px;color: #fff; +} +.left-header .icon-bars{ + font-size: 24px;float: right;margin: 18px 18px 0 0;color: #fff;cursor: pointer; +} +.left-container{ + width: 100%;position: absolute;background: #f1f1f1;color: rgba(163, 175, 183, .9); + top: 60px; bottom: 0; left: 0; overflow-y: auto; padding: 10px; +} +.left-container .projects{border: 0px; border-radius: 0px;} + +.right-container{ + position: fixed;top: 0px; bottom: 0; left: 360px; right: 0;padding: 0px; +} + +.modal-table-box{margin-top: 10px; max-height: 500px;overflow-y: auto;} +.modal-table-box{list-style: none;} +.modal-table-box ul{padding-left: 10px;} +.modal-table-box li{padding: 10px 15px; margin: 0 10px 10px 0; background-color: #f1f1f1;cursor: pointer;} +.modal-table-box li.checked{background-color: #8666b8;color:#fff;} + +#rightContentMask{background-color: rgba(0, 0, 0, 0);padding: 0;z-index:9999; height: 100%;display: none;position: absolute;top: 0;bottom: 0;left:0;right: 0;} +#rightZpages{height: 100%;position: relative;top: 0;bottom: 0;left:0;right: 0;} +#rightZpages .tabs-container .tab-pane{padding: 10px;} + +/* S-JSON展示的样式 */ +pre.json{margin-top:0px;margin-bottom:0px;} +pre.json .canvas{font:10pt georgia;background-color:#ececec;color:#000000;border:1px solid #cecece;} +pre.json .object-brace{color:#00aa00;font-weight:bold;} +pre.json .array-brace{color:#0033ff;font-weight:bold;} +pre.json .property-name{color:#cc0000;font-weight:bold;} +pre.json .string{color:#007777;} +pre.json .number{color:#aa00aa;} +pre.json .boolean{color:#0000ff;} +pre.json .function{color:#aa6633;text-decoration:italic;} +pre.json .null{color:#0000ff;} +pre.json .comma{color:#000000;font-weight:bold;} +pre.json .annotation{color:#aaa;} +pre img{cursor: pointer;} +/* E-JSON展示的样式 */ + diff --git a/zyplayer-doc-manage/src/main/webapp/statics/lib/mg/js/common.js b/zyplayer-doc-manage/src/main/webapp/statics/lib/mg/js/common.js index a2e33358..d52a7d38 100644 --- a/zyplayer-doc-manage/src/main/webapp/statics/lib/mg/js/common.js +++ b/zyplayer-doc-manage/src/main/webapp/statics/lib/mg/js/common.js @@ -1,348 +1,348 @@ -/** - * 一些公用方法 - * @author 暮光:城中城 - * @since 2017年5月7日 -*/ - -var ctx = "/"; -var statics = "/statics/"; - -window.onload=function(){ - ctx = getCookie("ctx"); - statics = ctx + "statics/"; -} - -function serialize(value) { - if (typeof value === 'string') { - return value; - } - return JSON.stringify(value); -} - -function deserialize(value) { - if (typeof value !== 'string' || isEmpty(value)) { - return undefined; - } - try { - return JSON.parse(value); - } catch (e) { - try { - return eval('(' + value + ')');// 处理变态的单双引号共存字符串 - } catch (e) { - return value || undefined; - } - } -} - -function validateResult(result) { - if(result.errCode == 200) { - return true; - } else { - alert(result.errMsg); - } - return false; -} - -function getNowDate() { - var date = new Date(); - var month = date.getMonth() + 1; - var strDate = date.getDate(); - if (month >= 1 && month <= 9) { - month = "0" + month; - } - if (strDate >= 0 && strDate <= 9) { - strDate = "0" + strDate; - } - var currentdate = date.getFullYear() + "-" + month + "-" + strDate; - return currentdate; -} - -function getNowTime() { - var date = new Date(); - var hours = date.getHours(); - var minutes = date.getMinutes(); - var seconds = date.getSeconds(); - if (hours >= 1 && hours <= 9) { - hours = "0" + hours; - } - if (minutes >= 0 && minutes <= 9) { - minutes = "0" + minutes; - } - if (seconds >= 0 && seconds <= 9) { - seconds = "0" + seconds; - } - var currentdate = hours + ":" + minutes + ":" + seconds; - return currentdate; -} - -function getNowDateTime() { - var currentdate = getNowDate() + " " + getNowTime(); - return currentdate; -} - -/** - * 返回不为空的字符串,为空返回def - */ -function getNotEmptyStr(str, def) { - if (isEmpty(str)) { - return isEmpty(def) ? "" : def; - } - return str; -} - -/** - * 是否是空对象 - * @param obj - * @returns - */ -function isEmptyObject(obj){ - return $.isEmptyObject(obj); -} - -/** - * 是否是空字符串 - * @param str - * @returns - */ -function isNull(str){ - return (str == null || str == undefined); -} - -/** - * 是否不是空字符串 - * @param str - * @returns - */ -function isNotNull(str){ - return !isNull(str); -} - -/** - * 是否是空字符串 - * @param str - * @returns - */ -function isEmpty(str){ - return (str == "" || str == null || str == undefined); -} - -/** - * 是否不是空字符串 - * @param str - * @returns - */ -function isNotEmpty(str){ - return !isEmpty(str); -} - -/** - * 数组转字符串,使用空格分隔 - * @param array - * @returns - */ -function arrToString(array){ - var temStr = ""; - if(isEmpty(array)){ - return temStr; - } - array.forEach(function(e){ - if(isNotEmpty(temStr)) { - temStr += " "; - } - temStr += e; - }); - return temStr; -} - -/** - * 数组array中是否包含str字符串 - * @param array - * @param str - * @returns - */ -function haveString(array, str){ - if(isEmpty(array)) { - return false; - } - for (var i = 0; i < array.length; i++) { - if(array[i] == str) { - return true; - } - } - return false; -} - -/** - * 直接返回对象的第一个属性 - * @param data - * @returns - */ -function getObjectFirstAttribute(data) { - for ( var key in data) { - return data[key]; - } -} - -/** - * 如果对象只有一个属性则返回第一个属性,否则返回null - * @param data - * @returns - */ -function getObjectFirstAttributeIfOnly(data) { - var len = 0, value = ""; - for ( var key in data) { - if (++len > 1) { - return null; - } - value = data[key]; - } - return value; -} - -function post(url, param, success, fail, complete) { - ajaxTemp(url, "POST", "JSON", param, success, fail, complete); -} - -/** - * ajax处理事件模板 - * - * @url 后台处理的url,即action - * @dataSentType 数据发送的方式,有post,get方式 - * @dataReceiveType 数据接收格式,有html json text等 - * @paramsStr 传入后台的参数 - * @successFunction ajax成功后执行的函数名 ajaxTemp("", "GET", "html", {}, function(){}, - * function(){}, ""); - */ -function ajaxTemp(url, dataSentType, dataReceiveType, paramsStr, successFunction, errorFunction, completeFunction, id) { - $.ajax({ - url : url, // 后台处理程序 - sync : false, - type : dataSentType, // 数据发送方式 - dataType : dataReceiveType, // 接受数据格式 - data : eval(paramsStr), - contentType : "application/x-www-form-urlencoded; charset=UTF-8", - success : function(msg) { - if(typeof successFunction == "function") { - successFunction(msg,id); - } - }, - beforeSend : function() { - - }, - complete : function(msg) { - if(typeof completeFunction == "function") { - completeFunction(msg,id); - } - }, - error : function(msg) { - if(typeof errorFunction == "function") { - errorFunction(msg,id); - } - } - }); -} - -/** - * 获取cookie - * @param name - * @returns - */ -function getCookie(name) { - var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)"); - if(arr=document.cookie.match(reg)){ - return unescape(arr[2]); - } - return null; -} - -/** - * 字符串格式化 - */ -String.prototype.format = function(args) { - if (arguments.length > 0) { - var result = this; - if (arguments.length == 1 && typeof (args) == "object") { - for ( var key in args) { - var reg = new RegExp("({" + key + "})", "g"); - result = result.replace(reg, args[key]); - } - } else { - for (var i = 0; i < arguments.length; i++) { - if (arguments[i] == undefined) { - return ""; - } else { - var reg = new RegExp("({[" + i + "]})", "g"); - result = result.replace(reg, arguments[i]); - } - } - } - return result; - } else { - return this; - } -} - -String.prototype.endWith = function(str) { - if (str == null || str == "" || this.length == 0 || str.length > this.length) { - return false; - } - return (this.substring(this.length - str.length) == str); -}; - -String.prototype.startWith = function(str) { - if (str == null || str == "" || this.length == 0 || str.length > this.length) { - return false; - } - return (this.substr(0, str.length) == str); -}; - -var common = { - //获取页面顶部被卷起来的高度函数 - scrollTop : function(){ - return Math.max( - //chrome - document.body.scrollTop, - //firefox/IE - document.documentElement.scrollTop); - }, - //获取页面文档的总高度 - documentHeight : function(){ - //现代浏览器(IE9+和其他浏览器)和IE8的document.body.scrollHeight和document.documentElement.scrollHeight都可以 - return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight); - }, - //获取页面浏览器视口的高度 - windowHeight : function(){ - return (document.compatMode == "CSS1Compat")? - document.documentElement.clientHeight: - document.body.clientHeight; - }, - //提取地址栏信息 - getRequest: function () { - var url = location.search;// 获取url中"?"符后的字串 - url = decodeURIComponent(url); - var theRequest = {}; - if (url.indexOf("?") != -1) { - var str = url.substr(1); - strs = str.split("&"); - for (var i = 0; i < strs.length; i++) { - theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]); - } - } - return theRequest; - }, - getParam: function(name){ - var url = location.search;// 获取url中"?"符后的字串 - url = decodeURIComponent(url); - if (url.indexOf("?") != -1) { - var str = url.substr(1); - strs = str.split("&"); - for (var i = 0; i < strs.length; i++) { - var nameTemp = strs[i].split("=")[0]; - if(name == nameTemp) { - return unescape(strs[i].split("=")[1]); - } - } - } - return ""; - } -}; +/** + * 一些公用方法 + * @author 暮光:城中城 + * @since 2017年5月7日 +*/ + +var ctx = "/"; +var statics = "/statics/"; +init(); +function init() { + ctx = getCookie("ctx"); + statics = ctx + "statics/"; +} + +function serialize(value) { + if (typeof value === 'string') { + return value; + } + return JSON.stringify(value); +} + +function deserialize(value) { + if (typeof value !== 'string' || isEmpty(value)) { + return undefined; + } + try { + return JSON.parse(value); + } catch (e) { + try { + return eval('(' + value + ')');// 处理变态的单双引号共存字符串 + } catch (e) { + return value || undefined; + } + } +} + +function validateResult(result) { + if(result.errCode == 200) { + return true; + } else { + alert(result.errMsg); + } + return false; +} + +function getNowDate() { + var date = new Date(); + var month = date.getMonth() + 1; + var strDate = date.getDate(); + if (month >= 1 && month <= 9) { + month = "0" + month; + } + if (strDate >= 0 && strDate <= 9) { + strDate = "0" + strDate; + } + var currentdate = date.getFullYear() + "-" + month + "-" + strDate; + return currentdate; +} + +function getNowTime() { + var date = new Date(); + var hours = date.getHours(); + var minutes = date.getMinutes(); + var seconds = date.getSeconds(); + if (hours >= 1 && hours <= 9) { + hours = "0" + hours; + } + if (minutes >= 0 && minutes <= 9) { + minutes = "0" + minutes; + } + if (seconds >= 0 && seconds <= 9) { + seconds = "0" + seconds; + } + var currentdate = hours + ":" + minutes + ":" + seconds; + return currentdate; +} + +function getNowDateTime() { + var currentdate = getNowDate() + " " + getNowTime(); + return currentdate; +} + +/** + * 返回不为空的字符串,为空返回def + */ +function getNotEmptyStr(str, def) { + if (isEmpty(str)) { + return isEmpty(def) ? "" : def; + } + return str; +} + +/** + * 是否是空对象 + * @param obj + * @returns + */ +function isEmptyObject(obj){ + return $.isEmptyObject(obj); +} + +/** + * 是否是空字符串 + * @param str + * @returns + */ +function isNull(str){ + return (str == null || str == undefined); +} + +/** + * 是否不是空字符串 + * @param str + * @returns + */ +function isNotNull(str){ + return !isNull(str); +} + +/** + * 是否是空字符串 + * @param str + * @returns + */ +function isEmpty(str){ + return (str == "" || str == null || str == undefined); +} + +/** + * 是否不是空字符串 + * @param str + * @returns + */ +function isNotEmpty(str){ + return !isEmpty(str); +} + +/** + * 数组转字符串,使用空格分隔 + * @param array + * @returns + */ +function arrToString(array){ + var temStr = ""; + if(isEmpty(array)){ + return temStr; + } + array.forEach(function(e){ + if(isNotEmpty(temStr)) { + temStr += " "; + } + temStr += e; + }); + return temStr; +} + +/** + * 数组array中是否包含str字符串 + * @param array + * @param str + * @returns + */ +function haveString(array, str){ + if(isEmpty(array)) { + return false; + } + for (var i = 0; i < array.length; i++) { + if(array[i] == str) { + return true; + } + } + return false; +} + +/** + * 直接返回对象的第一个属性 + * @param data + * @returns + */ +function getObjectFirstAttribute(data) { + for ( var key in data) { + return data[key]; + } +} + +/** + * 如果对象只有一个属性则返回第一个属性,否则返回null + * @param data + * @returns + */ +function getObjectFirstAttributeIfOnly(data) { + var len = 0, value = ""; + for ( var key in data) { + if (++len > 1) { + return null; + } + value = data[key]; + } + return value; +} + +function post(url, param, success, fail, complete) { + ajaxTemp(url, "POST", "JSON", param, success, fail, complete); +} + +/** + * ajax处理事件模板 + * + * @url 后台处理的url,即action + * @dataSentType 数据发送的方式,有post,get方式 + * @dataReceiveType 数据接收格式,有html json text等 + * @paramsStr 传入后台的参数 + * @successFunction ajax成功后执行的函数名 ajaxTemp("", "GET", "html", {}, function(){}, + * function(){}, ""); + */ +function ajaxTemp(url, dataSentType, dataReceiveType, paramsStr, successFunction, errorFunction, completeFunction, id) { + $.ajax({ + url : url, // 后台处理程序 + sync : false, + type : dataSentType, // 数据发送方式 + dataType : dataReceiveType, // 接受数据格式 + data : eval(paramsStr), + contentType : "application/x-www-form-urlencoded; charset=UTF-8", + success : function(msg) { + if(typeof successFunction == "function") { + successFunction(msg,id); + } + }, + beforeSend : function() { + + }, + complete : function(msg) { + if(typeof completeFunction == "function") { + completeFunction(msg,id); + } + }, + error : function(msg) { + if(typeof errorFunction == "function") { + errorFunction(msg,id); + } + } + }); +} + +/** + * 获取cookie + * @param name + * @returns + */ +function getCookie(name) { + var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)"); + if(arr=document.cookie.match(reg)){ + return unescape(arr[2]); + } + return null; +} + +/** + * 字符串格式化 + */ +String.prototype.format = function(args) { + if (arguments.length > 0) { + var result = this; + if (arguments.length == 1 && typeof (args) == "object") { + for ( var key in args) { + var reg = new RegExp("({" + key + "})", "g"); + result = result.replace(reg, args[key]); + } + } else { + for (var i = 0; i < arguments.length; i++) { + if (arguments[i] == undefined) { + return ""; + } else { + var reg = new RegExp("({[" + i + "]})", "g"); + result = result.replace(reg, arguments[i]); + } + } + } + return result; + } else { + return this; + } +} + +String.prototype.endWith = function(str) { + if (str == null || str == "" || this.length == 0 || str.length > this.length) { + return false; + } + return (this.substring(this.length - str.length) == str); +}; + +String.prototype.startWith = function(str) { + if (str == null || str == "" || this.length == 0 || str.length > this.length) { + return false; + } + return (this.substr(0, str.length) == str); +}; + +var common = { + //获取页面顶部被卷起来的高度函数 + scrollTop : function(){ + return Math.max( + //chrome + document.body.scrollTop, + //firefox/IE + document.documentElement.scrollTop); + }, + //获取页面文档的总高度 + documentHeight : function(){ + //现代浏览器(IE9+和其他浏览器)和IE8的document.body.scrollHeight和document.documentElement.scrollHeight都可以 + return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight); + }, + //获取页面浏览器视口的高度 + windowHeight : function(){ + return (document.compatMode == "CSS1Compat")? + document.documentElement.clientHeight: + document.body.clientHeight; + }, + //提取地址栏信息 + getRequest: function () { + var url = location.search;// 获取url中"?"符后的字串 + url = decodeURIComponent(url); + var theRequest = {}; + if (url.indexOf("?") != -1) { + var str = url.substr(1); + strs = str.split("&"); + for (var i = 0; i < strs.length; i++) { + theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]); + } + } + return theRequest; + }, + getParam: function(name){ + var url = location.search;// 获取url中"?"符后的字串 + url = decodeURIComponent(url); + if (url.indexOf("?") != -1) { + var str = url.substr(1); + strs = str.split("&"); + for (var i = 0; i < strs.length; i++) { + var nameTemp = strs[i].split("=")[0]; + if(name == nameTemp) { + return unescape(strs[i].split("=")[1]); + } + } + } + return ""; + } +}; diff --git a/zyplayer-doc-manage/src/main/webapp/statics/lib/mg/js/mgResizeble.js b/zyplayer-doc-manage/src/main/webapp/statics/lib/mg/js/mgResizable.js similarity index 100% rename from zyplayer-doc-manage/src/main/webapp/statics/lib/mg/js/mgResizeble.js rename to zyplayer-doc-manage/src/main/webapp/statics/lib/mg/js/mgResizable.js diff --git a/zyplayer-doc-manage/src/main/webapp/statics/lib/mg/js/toast.js b/zyplayer-doc-manage/src/main/webapp/statics/lib/mg/js/toast.js index a4d64da8..e826cb07 100644 --- a/zyplayer-doc-manage/src/main/webapp/statics/lib/mg/js/toast.js +++ b/zyplayer-doc-manage/src/main/webapp/statics/lib/mg/js/toast.js @@ -1,33 +1,40 @@ -/** - * 提示工具类 - * @author 暮光:城中城 - * @since 2017年5月7日 - */ -var Toast = { - notOpen:function(){ - var data = { - message:"该功能暂未开放,敬请期待!", - icon: 'exclamation-sign',type:"warning", - }; - this.show(data); - }, - warn:function(msg, time){ - var data = { - message:msg,time:time, - icon: 'exclamation-sign',type:'warning', - }; - this.show(data); - }, - error:function(msg, time){ - var data = { - message:msg,time:time, - icon: 'exclamation-sign',type:'danger', - }; - this.show(data); - }, - show:function(data){ - data.time = isEmpty(data.time)?2000:data.time; - data.placement = isEmpty(data.placement)?'top':data.placement; - new $.zui.Messager(data.message, data).show(); - } +/** + * 提示工具类 + * @author 暮光:城中城 + * @since 2017年5月7日 + */ +var Toast = { + notOpen: function () { + var data = { + message: "该功能暂未开放,敬请期待!", + icon: 'exclamation-sign', type: "warning", + }; + this.show(data); + }, + success: function (msg, time) { + var data = { + message: msg, time: time, + icon: 'check-circle-o', type: 'success', + }; + this.show(data); + }, + warn: function (msg, time) { + var data = { + message: msg, time: time, + icon: 'exclamation-sign', type: 'warning', + }; + this.show(data); + }, + error: function (msg, time) { + var data = { + message: msg, time: time, + icon: 'exclamation-sign', type: 'danger', + }; + this.show(data); + }, + show: function (data) { + data.time = isEmpty(data.time) ? 2000 : data.time; + data.placement = isEmpty(data.placement) ? 'top' : data.placement; + new $.zui.Messager(data.message, data).show(); + } } \ No newline at end of file diff --git a/zyplayer-doc-manage/src/main/webapp/statics/manage/about.html b/zyplayer-doc-manage/src/main/webapp/statics/manage/about.html new file mode 100644 index 00000000..6c520a7d --- /dev/null +++ b/zyplayer-doc-manage/src/main/webapp/statics/manage/about.html @@ -0,0 +1,31 @@ + + + + + + 关于 + + + + +
+ 这是一个关于页面 +
+ + + + + + + + + + + + + + diff --git a/zyplayer-doc-manage/src/main/webapp/statics/manage/auth/manage.html b/zyplayer-doc-manage/src/main/webapp/statics/manage/auth/manage.html new file mode 100644 index 00000000..25cbcf82 --- /dev/null +++ b/zyplayer-doc-manage/src/main/webapp/statics/manage/auth/manage.html @@ -0,0 +1,64 @@ + + + + + + 权限列表 + + + + +
+ + + + + + + + + + + + + + + +
权限名权限说明创建时间
{{item.authName}}{{item.authDesc}}{{item.creationTime}}
+
+ + + + + + + + + + + + + + + diff --git a/zyplayer-doc-manage/src/main/webapp/statics/manage/hello.html b/zyplayer-doc-manage/src/main/webapp/statics/manage/hello.html deleted file mode 100644 index a17c1e8e..00000000 --- a/zyplayer-doc-manage/src/main/webapp/statics/manage/hello.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - -hello - - - -
fasfasfasfa艾斯德斯大所大所大所多撒多撒多撒多
- - - - - - - - - diff --git a/zyplayer-doc-manage/src/main/webapp/statics/manage/home.html b/zyplayer-doc-manage/src/main/webapp/statics/manage/home.html new file mode 100644 index 00000000..a2692d26 --- /dev/null +++ b/zyplayer-doc-manage/src/main/webapp/statics/manage/home.html @@ -0,0 +1,123 @@ + + + + + + 文档管理系统 - zyplayer + + + + + + + +
+
+ + +
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + diff --git a/zyplayer-doc-manage/src/main/webapp/statics/manage/user/manage.html b/zyplayer-doc-manage/src/main/webapp/statics/manage/user/manage.html new file mode 100644 index 00000000..517ef548 --- /dev/null +++ b/zyplayer-doc-manage/src/main/webapp/statics/manage/user/manage.html @@ -0,0 +1,232 @@ + + + + + + 用户管理 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ID登录名密码用户名邮箱创建时间操作
{{item.id}}{{item.userNo}}***{{item.userName}}{{item.email}}{{item.creationTime}} + + +
+ + +
+ + + +
+ + +
+ + + + + + + + + + + + + + + diff --git a/zyplayer-doc-swagger/src/main/java/com/zyplayer/doc/swagger/controller/vo/SwaggerResourcesInfoVo.java b/zyplayer-doc-swagger/src/main/java/com/zyplayer/doc/swagger/controller/vo/SwaggerResourcesInfoVo.java new file mode 100644 index 00000000..ac9a60eb --- /dev/null +++ b/zyplayer-doc-swagger/src/main/java/com/zyplayer/doc/swagger/controller/vo/SwaggerResourcesInfoVo.java @@ -0,0 +1,51 @@ +package com.zyplayer.doc.swagger.controller.vo; + +import cn.hutool.core.util.RandomUtil; +import com.zyplayer.doc.swagger.framework.constant.StorageKeys; + +import java.util.Date; + +public class SwaggerResourcesInfoVo { + private String url; + private String storageKey; + private Date creationTime; + private Date lastSync; + + public SwaggerResourcesInfoVo(String url){ + this.url = url; + this.storageKey = StorageKeys.SWAGGER_OFFLINE_DOC_START + RandomUtil.simpleUUID(); + this.creationTime = new Date(); + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getStorageKey() { + return storageKey; + } + + public void setStorageKey(String storageKey) { + this.storageKey = storageKey; + } + + public Date getCreationTime() { + return creationTime; + } + + public void setCreationTime(Date creationTime) { + this.creationTime = creationTime; + } + + public Date getLastSync() { + return lastSync; + } + + public void setLastSync(Date lastSync) { + this.lastSync = lastSync; + } +}