wangh_branch
王壕 3 years ago
parent e9bd79b231
commit 2c15d4f95b

File diff suppressed because it is too large Load Diff

@ -289,4 +289,5 @@ a4.系统通过弹窗对未完成任务人员进行提醒
![分析类图2](C:/Users/1/AppData/Local/Temp/WeChat Files/027d965d3ef2f7809f797b9129965a6.png) ![分析类图2](../model/分析类图.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 79 KiB

@ -82,6 +82,18 @@
<artifactId>mybatis-plus-boot-starter</artifactId> <artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.1.1</version> <version>3.1.1</version>
</dependency> </dependency>
<!--swagger-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.9.2</version>
</dependency>
</dependencies> </dependencies>

@ -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<RequestParameter> 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();
}
}

@ -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/");
}
}

@ -38,8 +38,8 @@ public class ControllerText {
message="正在热映的后来的我们是刘若英的处女作。"; message="正在热映的后来的我们是刘若英的处女作。";
}else if("微信小程序".equals(word)){ }else if("微信小程序".equals(word)){
message= "想获取更多微信小程序相关知识,请更多的阅读微信官方文档,还有其他更多微信开发相关的内容,学无止境。"; message= "想获取更多微信小程序相关知识,请更多的阅读微信官方文档,还有其他更多微信开发相关的内容,学无止境。";
}else if("西安工业大学".equals(word)){ }else if("cauc".equals(word)){
message="西安工业大学Xi'an Technological University简称”西安工大“位于世界历史名城古都西安是中国西北地区唯一一所以兵工为特色以工为主理、文、经、管、法协调发展的教学研究型大学。原中华人民共和国兵器工业部直属的七所本科院校之一“兵工七子”陕西省重点建设的高水平教学研究型大学、陕西省人民政府与中国兵器工业集团、国防科技工业局共建高校、教育部“卓越工程师教育培养计划”试点高校、陕西省大学生创新能力培养综合改革试点学校。国家二级保密资格单位是一所以\"军民结合,寓军于民\"的国防科研高校。"; message="yes";
} }
map.put("message", message); map.put("message", message);
return map; return map;
@ -61,4 +61,5 @@ public class ControllerText {
} }
@RequestMapping("hes") @RequestMapping("hes")
public String get(){return "df";} public String get(){return "df";}
} }

@ -1,22 +1,17 @@
package com.example.demo.controller; 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.common.GlobalResult;
import com.example.demo.mapper.UserMapper; import com.example.demo.mapper.UserMapper;
import com.example.demo.common.WechatUtil; 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.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date; import java.util.Date;
import java.util.UUID; import java.util.UUID;
@ -97,4 +92,5 @@ public class UserController {
GlobalResult result = GlobalResult.build(200, null, skey); GlobalResult result = GlobalResult.build(200, null, skey);
return result; return result;
} }
} }

@ -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.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;

@ -1,13 +1,12 @@
package com.example.demo.mapper; package com.example.demo.mapper;
import com.example.demo.pojo.User; import com.example.demo.domain.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/** /**
* @desc * @desc
* *
* @author lastwhisper
* @email gaojun56@163.com
*/ */
public interface UserMapper extends BaseMapper<User> { public interface UserMapper extends BaseMapper<User> {
} }
Loading…
Cancel
Save