diff --git a/doc/page_1.html b/doc/page_1.html deleted file mode 100644 index d6bd292..0000000 --- a/doc/page_1.html +++ /dev/null @@ -1,1013 +0,0 @@ - - - - Page 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
- -
- - -
-
- -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
-
-
-

菜单

-
-
- - -
-
- -
- - -
-
- -
- - -
-
-
-

班级通

-
-
- - -
-
-
-

我的

-
-
- - -
-
- -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
-
- -
- - -
-
- -
- - -
-
- -
- - -
-
-
-

开始时间:  截止时间:

-
-
- - -
-
-
-

任务名称1

-
-
- - -
-
-
-

开始时间:  截止时间:

-
-
- - -
-
-
-

开始时间:  截止时间:

-
-
- - -
-
-
-

任务名称2

-
-
- - -
-
-
-

任务名称3

-
-
- - -
-
-
-

公告栏

-
-
- - -
-
- -
- - -
-
- -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
-
-
-

菜单

-
-
- - -
-
- -
- - -
-
- -
- - -
-
-
-

班级通

-
-
- - -
-
-
-

我的

-
-
- - -
-
- -
- - -
-
- -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
-
-
-

菜单

-
-
- - -
-
- -
- - -
-
- -
- - -
-
-
-

班级通

-
-
- - -
-
-
-

我的

-
-
- - -
-
- -
- - -
-
- -
- - -
-
- -
- - -
-
-
-

发布任务

-
-
- - -
-
-
-

发布接龙

-
-
- - -
-
- -
- - -
-
-
-

查看任务进度

-
-
- - -
-
- -
- - -
-
-
-

任务名称1

-
-
- - -
-
- -
- - -
-
-
-

任务名称2

-
-
- - -
-
- -
- - -
-
-
-

任务名称3

-
-
- - -
-
-
-

完成进度:100%

-
-
- - -
-
-
-

完成进度:100%

-
-
- - -
-
-
-

完成进度:100%

-
-
- - -
-
- -
- - -
-
- -
- - -
- - -
- - -
- - -
- - -
-
- -
- - -
-
- -
- - -
-
-
-

班级通

-
-
- - -
-
-
-

我的

-
-
- - -
-
- -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
-
- -
- - -
-
- -
- - -
-
- -
- - -
-
-
-

开始时间:  截止时间:

-
-
- - -
-
-
-

任务名称1

-
-
- - -
-
-
-

开始时间:  截止时间:

-
-
- - -
-
-
-

开始时间:  截止时间:

-
-
- - -
-
-
-

任务名称2

-
-
- - -
-
-
-

任务名称3

-
-
- - -
-
-
-

公告栏

-
-
- - -
- - -
- - -
- -
-

头像

-
-
- - -
- - -
- - -
-
-
-

已绑定,点击可重新绑定     >

-
-
- - -
-
-
-

设置

-
-
- - -
-
-
-

信息反馈

-
-
- - -
-
-
-

个人信息

-
-
- - -
-
- -
- - -
-
- -
- - -
- - -
- - -
- - -
- - -
-
- -
- - -
-
- -
- - -
-
-
-

班级通

-
-
- - -
-
-
-

我的

-
-
- - -
- - -
- - -
- -
-

头像

-
-
- - -
- - -
- - -
-
-
-

已绑定,点击可重新绑定     >

-
-
- - -
-
-
-

设置

-
-
- - -
-
-
-

信息反馈

-
-
- - -
-
-
-

个人信息

-
-
- - -
-
-
-

管理员界面

-
-
- - -
-
-
-

用户界面

-
-
- - -
-
- -
- - -
-
- -
- - -
-
- -
- - -
-
-
-

班级通

-
-
- - -
-
-
-

管理员登录

-
-
- - -
-
-
-

请输入密码

-
-
- - -
-
-
-

请输入账号

-
-
- - -
-
- -
- - -
-
- -
- - -
-
- -
- - -
-
-
-

班级通

-
-
- - -
-
-
-

用户登录

-
-
- - -
-
-
-

请输入密码

-
-
- - -
-
-
-

请输入账号

-
-
-
- - - diff --git a/doc/软件需求模型.md b/doc/软件需求模型.md index 6865c50..8cb22d8 100644 --- a/doc/软件需求模型.md +++ b/doc/软件需求模型.md @@ -289,4 +289,5 @@ a4.系统通过弹窗对未完成任务人员进行提醒 -![分析类图2](C:/Users/1/AppData/Local/Temp/WeChat Files/027d965d3ef2f7809f797b9129965a6.png) +![分析类图2](../model/分析类图.png) + diff --git a/model/分析类图.png b/model/分析类图.png index 75e48bd..c39407d 100644 Binary files a/model/分析类图.png and b/model/分析类图.png differ diff --git a/src/demo/pom.xml b/src/demo/pom.xml index 1f76fa2..8e096ca 100644 --- a/src/demo/pom.xml +++ b/src/demo/pom.xml @@ -82,6 +82,18 @@ mybatis-plus-boot-starter 3.1.1 + + + io.springfox + springfox-swagger2 + 2.9.2 + + + com.github.xiaoymin + swagger-bootstrap-ui + 1.9.2 + + diff --git a/src/demo/src/main/java/com/example/demo/config/SwaggerConfig.java b/src/demo/src/main/java/com/example/demo/config/SwaggerConfig.java new file mode 100644 index 0000000..de2eec6 --- /dev/null +++ b/src/demo/src/main/java/com/example/demo/config/SwaggerConfig.java @@ -0,0 +1,51 @@ +package com.example.demo.config; +import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.service.ApiInfo; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + + +/** + * @author lyr + */ + +@Profile({"prd","test","dev"}) +@Configuration +@EnableSwagger2 +@EnableSwaggerBootstrapUI +public class SwaggerConfig { + + @Bean + public Docket api() { +// List globalRequestParameters = new ArrayList<>(); +// RequestParameter build = new RequestParameterBuilder().name("abc").description("添加swagger公共请求参数abc").required(true).build(); + return new Docket(DocumentationType.SWAGGER_2) + .select() + .apis(RequestHandlerSelectors.basePackage("com.qkc.stat.controller")) + .paths(PathSelectors.any()) + .build() +// .globalRequestParameters(globalRequestParameters) +// .securitySchemes(securitySchemes()) //添加token +// .securityContexts(securityContexts()) //swagger配置页面访问是否需要传token + .apiInfo(apiInfo()); + } + + private ApiInfo apiInfo() { + return new ApiInfoBuilder() + .title("统计信息服务") + .description("统计服务相关接口") + .termsOfServiceUrl("127.0.0.1") + .version("1.0.0") + .build(); + } + + +} \ No newline at end of file diff --git a/src/demo/src/main/java/com/example/demo/config/WebMvnConfig.java b/src/demo/src/main/java/com/example/demo/config/WebMvnConfig.java new file mode 100644 index 0000000..a8042b5 --- /dev/null +++ b/src/demo/src/main/java/com/example/demo/config/WebMvnConfig.java @@ -0,0 +1,31 @@ +package com.example.demo.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; + +/** + * @Author: lyr + * @Date: 2021-04-21 10:13 + */ +@Configuration +public class WebMvnConfig extends WebMvcConfigurationSupport { + + @Override + public void addCorsMappings(CorsRegistry registry) { + + registry.addMapping("/**") + .allowedOrigins("*") + .allowedMethods("PUT", "DELETE", "GET", "POST", "OPTIONS") + .allowCredentials(true).maxAge(3600); + + } + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/"); + registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/"); + } + +} diff --git a/src/demo/src/main/java/com/example/demo/controller/ControllerText.java b/src/demo/src/main/java/com/example/demo/controller/ControllerText.java index b7b4852..b70f175 100644 --- a/src/demo/src/main/java/com/example/demo/controller/ControllerText.java +++ b/src/demo/src/main/java/com/example/demo/controller/ControllerText.java @@ -38,8 +38,8 @@ public class ControllerText { message="正在热映的后来的我们是刘若英的处女作。"; }else if("微信小程序".equals(word)){ message= "想获取更多微信小程序相关知识,请更多的阅读微信官方文档,还有其他更多微信开发相关的内容,学无止境。"; - }else if("西安工业大学".equals(word)){ - message="西安工业大学(Xi'an Technological University)简称”西安工大“,位于世界历史名城古都西安,是中国西北地区唯一一所以兵工为特色,以工为主,理、文、经、管、法协调发展的教学研究型大学。原中华人民共和国兵器工业部直属的七所本科院校之一(“兵工七子”),陕西省重点建设的高水平教学研究型大学、陕西省人民政府与中国兵器工业集团、国防科技工业局共建高校、教育部“卓越工程师教育培养计划”试点高校、陕西省大学生创新能力培养综合改革试点学校。国家二级保密资格单位,是一所以\"军民结合,寓军于民\"的国防科研高校。"; + }else if("cauc".equals(word)){ + message="yes"; } map.put("message", message); return map; @@ -61,4 +61,5 @@ public class ControllerText { } @RequestMapping("hes") public String get(){return "df";} + } diff --git a/src/demo/src/main/java/com/example/demo/controller/UserController.java b/src/demo/src/main/java/com/example/demo/controller/UserController.java index 0b995b3..dbe9fab 100644 --- a/src/demo/src/main/java/com/example/demo/controller/UserController.java +++ b/src/demo/src/main/java/com/example/demo/controller/UserController.java @@ -1,22 +1,17 @@ package com.example.demo.controller; -import com.example.demo.pojo.User; +import com.example.demo.domain.User; import com.example.demo.common.GlobalResult; import com.example.demo.mapper.UserMapper; import com.example.demo.common.WechatUtil; -//import cn.lastwhisper.springbootwx.common.GlobalResult; -//import cn.lastwhisper.springbootwx.mapper.UserMapper; -//import cn.lastwhisper.springbootwx.pojo.User; -//import cn.lastwhisper.springbootwx.common.WechatUtil; + import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import org.apache.commons.codec.digest.DigestUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.*; import java.util.Date; import java.util.UUID; @@ -97,4 +92,5 @@ public class UserController { GlobalResult result = GlobalResult.build(200, null, skey); return result; } + } diff --git a/src/demo/src/main/java/com/example/demo/pojo/User.java b/src/demo/src/main/java/com/example/demo/domain/User.java similarity index 97% rename from src/demo/src/main/java/com/example/demo/pojo/User.java rename to src/demo/src/main/java/com/example/demo/domain/User.java index f52df1a..9ce3e3d 100644 --- a/src/demo/src/main/java/com/example/demo/pojo/User.java +++ b/src/demo/src/main/java/com/example/demo/domain/User.java @@ -1,4 +1,4 @@ -package com.example.demo.pojo; +package com.example.demo.domain; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; diff --git a/src/demo/src/main/java/com/example/demo/mapper/UserMapper.java b/src/demo/src/main/java/com/example/demo/mapper/UserMapper.java index a9ff07a..37e25f1 100644 --- a/src/demo/src/main/java/com/example/demo/mapper/UserMapper.java +++ b/src/demo/src/main/java/com/example/demo/mapper/UserMapper.java @@ -1,13 +1,12 @@ package com.example.demo.mapper; -import com.example.demo.pojo.User; +import com.example.demo.domain.User; import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * @desc * - * @author lastwhisper - * @email gaojun56@163.com + */ public interface UserMapper extends BaseMapper { } \ No newline at end of file