commit
a16a8bacf7
@ -0,0 +1,33 @@
|
||||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 奔跑的面条
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -0,0 +1,15 @@
|
||||
package cn.com;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
@MapperScan("cn.com.v2.mapper")
|
||||
public class GogoApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(GogoApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package cn.com;
|
||||
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||
|
||||
public class ServletInitializer extends SpringBootServletInitializer {
|
||||
|
||||
@Override
|
||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
||||
return application.sources(GogoApplication.class);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package cn.com.v2.common.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
//重写WebMvcConfigurer实现全局跨域配置
|
||||
@Configuration
|
||||
public class CorsConfig implements WebMvcConfigurer {
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**")
|
||||
// 是否发送Cookie
|
||||
.allowCredentials(true)
|
||||
// 放行哪些原始域
|
||||
.allowedOrigins("*")
|
||||
// 放行哪些请求方式
|
||||
.allowedMethods("GET", "POST", "PUT", "DELETE")
|
||||
// 放行哪些原始请求头部信息
|
||||
.allowedHeaders("*")
|
||||
// 暴露哪些头部信息
|
||||
.exposedHeaders("*");
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package cn.com.v2.common.config;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.DbType;
|
||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class MybatisPlusConfig {
|
||||
|
||||
/**
|
||||
* 添加分页插件
|
||||
*/
|
||||
@Bean
|
||||
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); // 如果配置多个插件, 切记分页最后添加
|
||||
// 如果有多数据源可以不配具体类型, 否则都建议配上具体的 DbType
|
||||
return interceptor;
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package cn.com.v2.common.config;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 读取项目相关配置
|
||||
*
|
||||
* @author fuce
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "v2")
|
||||
public class V2Config {
|
||||
|
||||
/**
|
||||
* 存储路径
|
||||
*/
|
||||
private String fileurl;
|
||||
/**
|
||||
* 请求url
|
||||
*/
|
||||
private String httpurl;
|
||||
/**
|
||||
* 虚拟路径map
|
||||
*/
|
||||
private Map<String, String> xnljmap;
|
||||
|
||||
/**
|
||||
* 默认文件格式
|
||||
*/
|
||||
private String defaultFormat;
|
||||
|
||||
|
||||
public String getFileurl() {
|
||||
return fileurl;
|
||||
}
|
||||
|
||||
public void setFileurl(String fileurl) {
|
||||
this.fileurl = fileurl;
|
||||
}
|
||||
|
||||
|
||||
public String getHttpurl() {
|
||||
return httpurl;
|
||||
}
|
||||
|
||||
public void setHttpurl(String httpurl) {
|
||||
this.httpurl = httpurl;
|
||||
}
|
||||
|
||||
public Map<String, String> getXnljmap() {
|
||||
return xnljmap;
|
||||
}
|
||||
|
||||
public void setXnljmap(Map<String, String> xnljmap) {
|
||||
this.xnljmap = xnljmap;
|
||||
}
|
||||
|
||||
public String getDefaultFormat() {
|
||||
return defaultFormat;
|
||||
}
|
||||
|
||||
public void setDefaultFormat(String defaultFormat) {
|
||||
this.defaultFormat = defaultFormat;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package cn.com.v2.common.domain;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* @ClassName: AjaxResult
|
||||
* @Description: ajax操作消息提醒
|
||||
* @author fuce
|
||||
* @date 2018年8月18日
|
||||
*
|
||||
*/
|
||||
public class AjaxResult extends HashMap<String, Object> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 初始化一个新创建的 Message 对象
|
||||
*/
|
||||
public AjaxResult() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回错误消息
|
||||
*
|
||||
* @return 错误消息
|
||||
*/
|
||||
public static AjaxResult error() {
|
||||
return error(500, "操作失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回错误消息
|
||||
*
|
||||
* @param msg 内容
|
||||
* @return 错误消息
|
||||
*/
|
||||
public static AjaxResult error(String msg) {
|
||||
return error(500, msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回错误消息
|
||||
*
|
||||
* @param code 错误码
|
||||
* @param msg 内容
|
||||
* @return 错误消息
|
||||
*/
|
||||
public static AjaxResult error(int code, String msg) {
|
||||
AjaxResult json = new AjaxResult();
|
||||
json.put("code", code);
|
||||
json.put("msg", msg);
|
||||
return json;
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回成功消息
|
||||
*
|
||||
* @param msg 内容
|
||||
* @return 成功消息
|
||||
*/
|
||||
public static AjaxResult success(String msg) {
|
||||
AjaxResult json = new AjaxResult();
|
||||
json.put("msg", msg);
|
||||
json.put("code", 200);
|
||||
return json;
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回成功消息
|
||||
*
|
||||
* @return 成功消息
|
||||
*/
|
||||
public static AjaxResult success() {
|
||||
return AjaxResult.success("操作成功");
|
||||
}
|
||||
|
||||
public static AjaxResult successData(int code, Object value) {
|
||||
AjaxResult json = new AjaxResult();
|
||||
json.put("code", code);
|
||||
json.put("data", value);
|
||||
return json;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 返回成功消息
|
||||
*
|
||||
* @param key 键值
|
||||
* @param value 内容
|
||||
* @return 成功消息
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult put(String key, Object value) {
|
||||
super.put(key, value);
|
||||
return this;
|
||||
}
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
package cn.com.v2.common.domain;
|
||||
|
||||
public class ResultTable {
|
||||
/**
|
||||
* 状态码
|
||||
* */
|
||||
private Integer code;
|
||||
|
||||
/**
|
||||
* 提示消息
|
||||
* */
|
||||
private String msg;
|
||||
|
||||
/**
|
||||
* 消息总量
|
||||
* */
|
||||
private Long count;
|
||||
|
||||
/**
|
||||
* 数据对象
|
||||
* */
|
||||
private Object data;
|
||||
|
||||
/**
|
||||
* 构 建
|
||||
* */
|
||||
public static ResultTable pageTable(long count, Object data) {
|
||||
ResultTable resultTable = new ResultTable();
|
||||
resultTable.setData(data);
|
||||
resultTable.setCode(0);
|
||||
resultTable.setCount(count);
|
||||
if (data != null) {
|
||||
resultTable.setMsg("获取成功");
|
||||
} else {
|
||||
resultTable.setMsg("获取失败");
|
||||
}
|
||||
return resultTable;
|
||||
}
|
||||
|
||||
public static ResultTable dataTable(Object data) {
|
||||
ResultTable resultTable = new ResultTable();
|
||||
resultTable.setData(data);
|
||||
resultTable.setCode(0);
|
||||
if (data != null) {
|
||||
resultTable.setMsg("获取成功");
|
||||
} else {
|
||||
resultTable.setMsg("获取失败");
|
||||
}
|
||||
|
||||
return resultTable;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public Long getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public void setCount(Long count) {
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
public Object getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(Object data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package cn.com.v2.common.domain;
|
||||
|
||||
/**
|
||||
* boostrap table post 参数
|
||||
* @author fc
|
||||
*
|
||||
*/
|
||||
public class Tablepar {
|
||||
private int page;//页码
|
||||
private int limit;//数量
|
||||
private String orderByColumn;//排序字段
|
||||
private String isAsc;//排序字符 asc desc
|
||||
private String searchText;//列表table里面的搜索
|
||||
|
||||
public int getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(int page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public int getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setLimit(int limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public String getOrderByColumn() {
|
||||
return orderByColumn;
|
||||
}
|
||||
|
||||
public void setOrderByColumn(String orderByColumn) {
|
||||
this.orderByColumn = orderByColumn;
|
||||
}
|
||||
|
||||
public String getIsAsc() {
|
||||
return isAsc;
|
||||
}
|
||||
|
||||
public void setIsAsc(String isAsc) {
|
||||
this.isAsc = isAsc;
|
||||
}
|
||||
|
||||
public String getSearchText() {
|
||||
return searchText;
|
||||
}
|
||||
|
||||
public void setSearchText(String searchText) {
|
||||
this.searchText = searchText;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package cn.com.v2.controller;
|
||||
|
||||
import cn.com.v2.common.base.BaseController;
|
||||
import cn.com.v2.common.domain.AjaxResult;
|
||||
import cn.com.v2.model.SysUser;
|
||||
import cn.com.v2.service.ISysUserService;
|
||||
import cn.com.v2.util.SaTokenUtil;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.crypto.SecureUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
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.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/goview/sys")
|
||||
public class ApiController extends BaseController {
|
||||
@Autowired
|
||||
private ISysUserService iSysUserService;
|
||||
|
||||
@ApiOperation(value = "登陆", notes = "登陆")
|
||||
@PostMapping("/login")
|
||||
@ResponseBody
|
||||
public AjaxResult APIlogin(@RequestBody SysUser user, HttpServletRequest request) {
|
||||
|
||||
// 判断是否登陆
|
||||
if (StpUtil.isLogin()) {
|
||||
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("userinfo", SaTokenUtil.getUser());
|
||||
map.put("token", StpUtil.getTokenInfo());
|
||||
return success().put("data", map);
|
||||
} else {
|
||||
if (StrUtil.isNotBlank(user.getUsername()) && StrUtil.isNotBlank(user.getPassword())) {
|
||||
SysUser sysUser = iSysUserService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUsername, user.getUsername()).eq(SysUser::getPassword, SecureUtil.md5(user.getPassword())).last("LIMIT 1"));
|
||||
if (sysUser != null) {
|
||||
StpUtil.login(sysUser.getId());
|
||||
SaTokenUtil.setUser(sysUser);
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("userinfo", sysUser);
|
||||
map.put("token", StpUtil.getTokenInfo());
|
||||
|
||||
return success().put("data", map);
|
||||
} else {
|
||||
return error(500, "账户或者密码错误");
|
||||
}
|
||||
} else {
|
||||
return error(500, "账户密码不能为空");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "登陆", notes = "登陆")
|
||||
@GetMapping("/logout")
|
||||
@ResponseBody
|
||||
public AjaxResult logout() {
|
||||
|
||||
// 判断是否登陆
|
||||
StpUtil.logout();
|
||||
|
||||
return success();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "获取oss地址", notes = "获取oss地址")
|
||||
@GetMapping("/getOssInfo")
|
||||
@ResponseBody
|
||||
public AjaxResult getOssInfo() {
|
||||
|
||||
return success();
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package cn.com.v2.controller;
|
||||
|
||||
|
||||
import cn.com.v2.common.base.BaseController;
|
||||
import cn.com.v2.common.domain.AjaxResult;
|
||||
import cn.com.v2.model.CommonQuestion;
|
||||
import cn.com.v2.service.CommonQuestionService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 常见问题(TCommonQuestion)表控制层
|
||||
*
|
||||
* @author wu
|
||||
* @since 2025-04-21 09:36:06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/goview/commonQuestion")
|
||||
@Api(tags = "常见问题")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class CommonQuestionController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private CommonQuestionService commonQuestionService;
|
||||
|
||||
/**
|
||||
* 分页条件查询所有数据
|
||||
*
|
||||
* @param page 分页条件
|
||||
* @param commonQuestion 查询条件
|
||||
* @return 所有数据
|
||||
*/
|
||||
@GetMapping
|
||||
@ApiOperation(value = "分页条件查询常见问题", response = CommonQuestion.class)
|
||||
public AjaxResult page(Page<CommonQuestion> page, CommonQuestion commonQuestion) {
|
||||
return successData(200, commonQuestionService.page(page, new QueryWrapper<>(commonQuestion)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation(value = "通过主键查询单条常见问题", response = CommonQuestion.class)
|
||||
public AjaxResult getById(@PathVariable Serializable id) {
|
||||
return successData(200, commonQuestionService.getById(id));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param commonQuestion 实体对象
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增常见问题", response = CommonQuestion.class)
|
||||
public AjaxResult insert(@RequestBody CommonQuestion commonQuestion) {
|
||||
return successData(200, commonQuestionService.save(commonQuestion));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param commonQuestion 实体对象
|
||||
* @return 修改结果
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改常见问题")
|
||||
public AjaxResult update(@RequestBody CommonQuestion commonQuestion) {
|
||||
return successData(200, commonQuestionService.updateById(commonQuestion));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
@ApiOperation(value = "删除常见问题")
|
||||
public AjaxResult delete(@PathVariable Serializable id) {
|
||||
return successData(200, commonQuestionService.removeById(id));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,117 @@
|
||||
package cn.com.v2.controller;
|
||||
|
||||
|
||||
import cn.com.v2.common.base.BaseController;
|
||||
import cn.com.v2.common.domain.AjaxResult;
|
||||
import cn.com.v2.model.Dictionary;
|
||||
import cn.com.v2.service.DictionaryService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 字典(Dictionary)表控制层
|
||||
*
|
||||
* @author wu
|
||||
* @since 2025-04-21 14:18:31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/goview/dictionary")
|
||||
@Api(tags = "字典")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class DictionaryController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private DictionaryService dictionaryService;
|
||||
|
||||
/**
|
||||
* 分页条件查询所有数据
|
||||
*
|
||||
* @param page 分页条件
|
||||
* @param dictionary 查询条件
|
||||
* @return 所有数据
|
||||
*/
|
||||
@GetMapping
|
||||
@ApiOperation(value = "分页条件查询字典", response = Dictionary.class)
|
||||
public AjaxResult page(Page<Dictionary> page, Dictionary dictionary) {
|
||||
return successData(200, dictionaryService.page(page, new QueryWrapper<>(dictionary)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型查询字典
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 所有数据
|
||||
*/
|
||||
@GetMapping("/findByType")
|
||||
@ApiOperation(value = "根据字典类型查询字典", response = Dictionary.class)
|
||||
public AjaxResult findByType(String dictType) {
|
||||
QueryWrapper<Dictionary> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("dict_type", dictType);
|
||||
return successData(200, dictionaryService.list(wrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation(value = "通过主键查询单条字典", response = Dictionary.class)
|
||||
public AjaxResult getById(@PathVariable Serializable id) {
|
||||
return successData(200, dictionaryService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param dictionary 实体对象
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增字典", response = Dictionary.class)
|
||||
public AjaxResult insert(@RequestBody Dictionary dictionary) {
|
||||
return successData(200, dictionaryService.save(dictionary));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param dictionary 实体对象
|
||||
* @return 修改结果
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改字典")
|
||||
public AjaxResult update(@RequestBody Dictionary dictionary) {
|
||||
return successData(200, dictionaryService.updateById(dictionary));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
@ApiOperation(value = "删除字典")
|
||||
public AjaxResult delete(@PathVariable Serializable id) {
|
||||
return successData(200, dictionaryService.removeById(id));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,269 @@
|
||||
package cn.com.v2.controller;
|
||||
|
||||
import cn.com.v2.common.base.BaseController;
|
||||
import cn.com.v2.common.config.V2Config;
|
||||
import cn.com.v2.common.domain.AjaxResult;
|
||||
import cn.com.v2.common.domain.ResultTable;
|
||||
import cn.com.v2.common.domain.Tablepar;
|
||||
import cn.com.v2.model.GoviewProject;
|
||||
import cn.com.v2.model.GoviewProjectData;
|
||||
import cn.com.v2.model.SysFile;
|
||||
import cn.com.v2.model.vo.GoviewProjectVo;
|
||||
import cn.com.v2.model.vo.SysFileVo;
|
||||
import cn.com.v2.service.IGoviewProjectDataService;
|
||||
import cn.com.v2.service.IGoviewProjectService;
|
||||
import cn.com.v2.service.ISysFileService;
|
||||
import cn.com.v2.util.ConvertUtil;
|
||||
import cn.com.v2.util.SnowflakeIdWorker;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author fc
|
||||
* @since 2023-04-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/goview/project")
|
||||
public class GoviewProjectController extends BaseController {
|
||||
@Autowired
|
||||
private ISysFileService iSysFileService;
|
||||
@Autowired
|
||||
private V2Config v2Config;
|
||||
@Autowired
|
||||
private IGoviewProjectService iGoviewProjectService;
|
||||
@Autowired
|
||||
private IGoviewProjectDataService iGoviewProjectDataService;
|
||||
|
||||
|
||||
@ApiOperation(value = "分页跳转", notes = "分页跳转")
|
||||
@GetMapping("/list")
|
||||
@ResponseBody
|
||||
public ResultTable list(Tablepar tablepar) {
|
||||
Page<GoviewProject> page = new Page<>(tablepar.getPage(), tablepar.getLimit());
|
||||
GoviewProject entity = new GoviewProject();
|
||||
entity.setState(1);
|
||||
IPage<GoviewProject> iPages = iGoviewProjectService.page(page, new QueryWrapper<>(entity));
|
||||
ResultTable resultTable = new ResultTable();
|
||||
resultTable.setData(iPages.getRecords());
|
||||
resultTable.setCode(200);
|
||||
resultTable.setCount(iPages.getTotal());
|
||||
resultTable.setMsg("获取成功");
|
||||
return resultTable;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "分页跳转", notes = "分页跳转")
|
||||
@PostMapping("/zf")
|
||||
public String zf(@RequestParam Map<String, Object> map) {
|
||||
String body = HttpRequest.post("http://baijiahu.mynatapp.cc/").form(map).timeout(120000).execute().body();
|
||||
return body;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
//@Log(title = "项目表新增", action = "111")
|
||||
@ApiOperation(value = "新增", notes = "新增")
|
||||
@PostMapping("/create")
|
||||
@ResponseBody
|
||||
public AjaxResult add(@RequestBody GoviewProject goviewProject) {
|
||||
goviewProject.setCreateTime(DateUtil.now());
|
||||
goviewProject.setState(-1);
|
||||
boolean b = iGoviewProjectService.save(goviewProject);
|
||||
if (b) {
|
||||
return successData(200, goviewProject).put("msg", "创建成功");
|
||||
} else {
|
||||
return error();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 项目表删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
//@Log(title = "项目表删除", action = "111")
|
||||
@ApiOperation(value = "删除", notes = "删除")
|
||||
@DeleteMapping("/delete")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids) {
|
||||
List<String> lista = ConvertUtil.toListStrArray(ids);
|
||||
Boolean b = iGoviewProjectService.removeByIds(lista);
|
||||
if (b) {
|
||||
return success();
|
||||
} else {
|
||||
return error();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改保存", notes = "修改保存")
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(@RequestBody GoviewProject goviewProject) {
|
||||
goviewProject.setState(1);
|
||||
Boolean b = iGoviewProjectService.updateById(goviewProject);
|
||||
if (b) {
|
||||
return success();
|
||||
}
|
||||
return error();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "项目重命名", notes = "项目重命名")
|
||||
@PostMapping("/rename")
|
||||
@ResponseBody
|
||||
public AjaxResult rename(@RequestBody GoviewProject goviewProject) {
|
||||
|
||||
LambdaUpdateWrapper<GoviewProject> updateWrapper = new LambdaUpdateWrapper<GoviewProject>();
|
||||
updateWrapper.eq(GoviewProject::getId, goviewProject.getId());
|
||||
updateWrapper.set(GoviewProject::getProjectName, goviewProject.getProjectName());
|
||||
Boolean b = iGoviewProjectService.update(updateWrapper);
|
||||
if (b) {
|
||||
return success();
|
||||
}
|
||||
return error();
|
||||
}
|
||||
|
||||
|
||||
//发布/取消项目状态
|
||||
@PutMapping("/publish")
|
||||
@ResponseBody
|
||||
public AjaxResult updateVisible(@RequestBody GoviewProject goviewProject) {
|
||||
if (goviewProject.getState() == -1 || goviewProject.getState() == 1) {
|
||||
|
||||
LambdaUpdateWrapper<GoviewProject> updateWrapper = new LambdaUpdateWrapper<GoviewProject>();
|
||||
updateWrapper.eq(GoviewProject::getId, goviewProject.getId());
|
||||
updateWrapper.set(GoviewProject::getState, goviewProject.getState());
|
||||
Boolean b = iGoviewProjectService.update(updateWrapper);
|
||||
if (b) {
|
||||
return success();
|
||||
}
|
||||
return error();
|
||||
}
|
||||
return error("警告非法字段");
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "获取项目存储数据", notes = "获取项目存储数据")
|
||||
@GetMapping("/getData")
|
||||
@ResponseBody
|
||||
public AjaxResult getData(String projectId, ModelMap map) {
|
||||
GoviewProject goviewProject = iGoviewProjectService.getById(projectId);
|
||||
|
||||
GoviewProjectData blogText = iGoviewProjectDataService.getProjectid(projectId);
|
||||
if (blogText != null) {
|
||||
GoviewProjectVo goviewProjectVo = new GoviewProjectVo();
|
||||
BeanUtils.copyProperties(goviewProject, goviewProjectVo);
|
||||
goviewProjectVo.setContent(blogText.getContent());
|
||||
return AjaxResult.successData(200, goviewProjectVo).put("msg", "获取成功");
|
||||
}
|
||||
return AjaxResult.successData(200, null).put("msg", "无数据");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "保存项目数据", notes = "保存项目数据")
|
||||
@PostMapping("/save/data")
|
||||
@ResponseBody
|
||||
public AjaxResult saveData(GoviewProjectData data) {
|
||||
|
||||
GoviewProject goviewProject = iGoviewProjectService.getById(data.getProjectId());
|
||||
if (goviewProject == null) {
|
||||
return error("没有该项目ID");
|
||||
}
|
||||
GoviewProjectData goviewProjectData = iGoviewProjectDataService.getOne(new LambdaQueryWrapper<GoviewProjectData>().eq(GoviewProjectData::getProjectId, goviewProject.getId()));
|
||||
if (goviewProjectData != null) {
|
||||
data.setId(goviewProjectData.getId());
|
||||
iGoviewProjectDataService.updateById(data);
|
||||
return success("数据保存成功");
|
||||
} else {
|
||||
iGoviewProjectDataService.save(data);
|
||||
return success("数据保存成功");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*
|
||||
* @param object 文件流对象
|
||||
* @param bucketName 桶名
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@PostMapping("/upload")
|
||||
public AjaxResult upload(@RequestBody MultipartFile object) throws IOException {
|
||||
String fileName = object.getOriginalFilename();
|
||||
//默认文件格式
|
||||
String suffixName = v2Config.getDefaultFormat();
|
||||
String mediaKey = "";
|
||||
Long filesize = object.getSize();
|
||||
//文件名字
|
||||
String fileSuffixName = "";
|
||||
if (fileName.lastIndexOf(".") != -1) {//有后缀
|
||||
suffixName = fileName.substring(fileName.lastIndexOf(".")).toLowerCase();
|
||||
//mediaKey=MD5.create().digestHex(fileName);
|
||||
mediaKey = SnowflakeIdWorker.getUUID();
|
||||
fileSuffixName = mediaKey + suffixName;
|
||||
} else {//无后缀
|
||||
//取得唯一id
|
||||
//mediaKey = MD5.create().digestHex(fileName+suffixName);
|
||||
mediaKey = SnowflakeIdWorker.getUUID();
|
||||
//fileSuffixName=mediaKey+suffixName;
|
||||
}
|
||||
String virtualKey = FileController.getFirstNotNull(v2Config.getXnljmap());
|
||||
String absolutePath = v2Config.getXnljmap().get(FileController.getFirstNotNull(v2Config.getXnljmap()));
|
||||
SysFile sysFile = new SysFile();
|
||||
sysFile.setId(SnowflakeIdWorker.getUUID());
|
||||
sysFile.setFileName(fileSuffixName);
|
||||
sysFile.setFileSize(Integer.parseInt(filesize + ""));
|
||||
sysFile.setFileSuffix(suffixName);
|
||||
sysFile.setCreateTime(DateUtil.formatLocalDateTime(LocalDateTime.now()));
|
||||
String filepath = DateUtil.formatDate(new Date());
|
||||
sysFile.setRelativePath(filepath);
|
||||
sysFile.setVirtualKey(virtualKey);
|
||||
sysFile.setAbsolutePath(absolutePath.replace("file:", ""));
|
||||
iSysFileService.saveOrUpdate(sysFile);
|
||||
File desc = FileController.getAbsoluteFile(v2Config.getFileurl() + File.separator + filepath, fileSuffixName);
|
||||
object.transferTo(desc);
|
||||
SysFileVo sysFileVo = BeanUtil.copyProperties(sysFile, SysFileVo.class);
|
||||
sysFileVo.setFileurl(v2Config.getHttpurl() + sysFile.getVirtualKey() + "/" + sysFile.getRelativePath() + "/" + sysFile.getFileName());
|
||||
return successData(200, sysFileVo);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
package cn.com.v2.controller;
|
||||
|
||||
|
||||
import cn.com.v2.common.base.BaseController;
|
||||
import cn.com.v2.common.domain.AjaxResult;
|
||||
import cn.com.v2.model.HistoricalReply;
|
||||
import cn.com.v2.service.HistoricalReplyService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* (THistoricalReply)表控制层
|
||||
*
|
||||
* @author wu
|
||||
* @since 2025-04-18 09:34:27
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/goview/tHistoricalReply")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class HistoricalReplyController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private HistoricalReplyService historicalReplyService;
|
||||
|
||||
/**
|
||||
* 分页条件查询所有数据
|
||||
*
|
||||
* @param page 分页条件
|
||||
* @param historicalReply 查询条件
|
||||
* @return 所有数据
|
||||
*/
|
||||
@GetMapping
|
||||
@ApiOperation(value = "分页条件查询", response = HistoricalReply.class)
|
||||
public AjaxResult page(Page<HistoricalReply> page, HistoricalReply historicalReply) {
|
||||
return successData(200, historicalReplyService.page(page, new QueryWrapper<>(historicalReply)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation(value = "通过主键查询单条", response = HistoricalReply.class)
|
||||
public AjaxResult getById(@PathVariable Serializable id) {
|
||||
return successData(200, historicalReplyService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param historicalReply 实体对象
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增", response = HistoricalReply.class)
|
||||
public AjaxResult insert(@RequestBody HistoricalReply historicalReply) {
|
||||
return successData(200, historicalReplyService.save(historicalReply));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param historicalReply 实体对象
|
||||
* @return 修改结果
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改")
|
||||
public AjaxResult update(@RequestBody HistoricalReply historicalReply) {
|
||||
return successData(200, historicalReplyService.updateById(historicalReply));
|
||||
}
|
||||
|
||||
/**commonProblem
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键集合
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
@ApiOperation(value = "删除")
|
||||
public AjaxResult delete(@PathVariable Serializable id) {
|
||||
return successData(200, historicalReplyService.removeById(id));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
package cn.com.v2.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
@RestController
|
||||
public class Indexcontroller {
|
||||
|
||||
@GetMapping("/")
|
||||
public void index(HttpServletResponse response) throws IOException {
|
||||
response.setContentType("text/html; charset=utf-8");
|
||||
PrintWriter out = response.getWriter();
|
||||
out.println("<p style='color:orange'>goview后台首页</p>");
|
||||
out.flush();
|
||||
out.close();
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package cn.com.v2.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author fc
|
||||
* @since 2023-04-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/v2/sys-user")
|
||||
public class SysUserController {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package cn.com.v2.mapper;
|
||||
|
||||
import cn.com.v2.model.CommonQuestion;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 常见问题(TCommonQuestion)表数据库访问层
|
||||
*
|
||||
* @author wu
|
||||
* @since 2025-04-21 09:36:06
|
||||
*/
|
||||
public interface CommonQuestionMapper extends BaseMapper<CommonQuestion> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package cn.com.v2.mapper;
|
||||
|
||||
import cn.com.v2.model.Dictionary;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 字典(Dictionary)表数据库访问层
|
||||
*
|
||||
* @author wu
|
||||
* @since 2025-04-21 14:18:32
|
||||
*/
|
||||
public interface DictionaryMapper extends BaseMapper<Dictionary> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
package cn.com.v2.mapper;
|
||||
|
||||
import cn.com.v2.model.GoviewProjectData;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author fc
|
||||
* @since 2023-04-30
|
||||
*/
|
||||
public interface GoviewProjectDataMapper extends BaseMapper<GoviewProjectData> {
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.com.v2.mapper;
|
||||
|
||||
import cn.com.v2.model.GoviewProject;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author fc
|
||||
* @since 2023-04-30
|
||||
*/
|
||||
public interface GoviewProjectMapper extends BaseMapper<GoviewProject> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package cn.com.v2.mapper;
|
||||
|
||||
import cn.com.v2.model.HistoricalReply;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* (THistoricalReply)表数据库访问层
|
||||
*
|
||||
* @author wu
|
||||
* @since 2025-04-18 09:34:28
|
||||
*/
|
||||
public interface HistoricalReplyMapper extends BaseMapper<HistoricalReply> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
package cn.com.v2.mapper;
|
||||
|
||||
import cn.com.v2.model.SysFile;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author fc
|
||||
* @since 2022-12-22
|
||||
*/
|
||||
public interface SysFileMapper extends BaseMapper<SysFile> {
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.com.v2.mapper;
|
||||
|
||||
import cn.com.v2.model.SysUser;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author fc
|
||||
* @since 2023-04-30
|
||||
*/
|
||||
public interface SysUserMapper extends BaseMapper<SysUser> {
|
||||
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package cn.com.v2.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 常见问题(TCommonQuestion)表实体类
|
||||
*
|
||||
* @author wu
|
||||
* @since 2025-04-21 09:36:06
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("常见问题实体类")
|
||||
@TableName(value = "t_common_question")
|
||||
public class CommonQuestion implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -29377218335522611L;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ApiModelProperty(value = "主键id")
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 问题类型
|
||||
*/
|
||||
@ApiModelProperty(value = "问题类型")
|
||||
private Integer questionType;
|
||||
|
||||
/**
|
||||
* 问题详情
|
||||
*/
|
||||
@ApiModelProperty(value = "问题详情")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 问题关联人id
|
||||
*/
|
||||
@ApiModelProperty(value = "问题关联人id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createUserId;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,52 @@
|
||||
package cn.com.v2.model;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* 字典(Dictionary)表实体类
|
||||
*
|
||||
* @author wu
|
||||
* @since 2025-04-21 14:18:32
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("字典实体类")
|
||||
@TableName(value = "dictionary")
|
||||
public class Dictionary implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -48691319489377843L;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ApiModelProperty(value = "主键id")
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
@ApiModelProperty(value = "字典类型")
|
||||
private String dictType;
|
||||
|
||||
/**
|
||||
* 字典值
|
||||
*/
|
||||
@ApiModelProperty(value = "字典值")
|
||||
private Integer dictKey;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String dictValue;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,44 @@
|
||||
package cn.com.v2.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author fc
|
||||
* @since 2023-04-30
|
||||
*/
|
||||
@TableName("t_goview_project")
|
||||
@Data
|
||||
public class GoviewProject implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
private String projectName;
|
||||
|
||||
private Integer state;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createTime;
|
||||
|
||||
private String createUserId;
|
||||
|
||||
private Integer isDelete;
|
||||
|
||||
private String indexImage;
|
||||
|
||||
private String remarks;
|
||||
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package cn.com.v2.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author fc
|
||||
* @since 2023-04-30
|
||||
*/
|
||||
@TableName("t_goview_project_data")
|
||||
@Data
|
||||
public class GoviewProjectData implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
private String projectId;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createTime;
|
||||
|
||||
private String createUserId;
|
||||
|
||||
private String content;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package cn.com.v2.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* (THistoricalReply)表实体类
|
||||
*
|
||||
* @author wu
|
||||
* @since 2025-04-18 09:34:28
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("实体类")
|
||||
@TableName(value = "t_historical_reply")
|
||||
public class HistoricalReply implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 204285435715666589L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
private String content;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
private String createUserId;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,118 @@
|
||||
package cn.com.v2.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author fc
|
||||
* @since 2022-12-22
|
||||
*/
|
||||
@TableName("t_sys_file")
|
||||
public class SysFile implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.INPUT)
|
||||
private String id;
|
||||
|
||||
private String fileName;
|
||||
|
||||
private Integer fileSize;
|
||||
|
||||
private String fileSuffix;
|
||||
|
||||
/**
|
||||
* 虚拟路径
|
||||
*/
|
||||
private String virtualKey;
|
||||
|
||||
/**
|
||||
* 相对路径
|
||||
*/
|
||||
private String relativePath;
|
||||
|
||||
/**
|
||||
* 绝对路径
|
||||
*/
|
||||
private String absolutePath;
|
||||
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createTime;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public void setFileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public Integer getFileSize() {
|
||||
return fileSize;
|
||||
}
|
||||
|
||||
public void setFileSize(Integer fileSize) {
|
||||
this.fileSize = fileSize;
|
||||
}
|
||||
|
||||
public String getFileSuffix() {
|
||||
return fileSuffix;
|
||||
}
|
||||
|
||||
public void setFileSuffix(String fileSuffix) {
|
||||
this.fileSuffix = fileSuffix;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
|
||||
public String getVirtualKey() {
|
||||
return virtualKey;
|
||||
}
|
||||
|
||||
public void setVirtualKey(String virtualKey) {
|
||||
this.virtualKey = virtualKey;
|
||||
}
|
||||
|
||||
public String getAbsolutePath() {
|
||||
return absolutePath;
|
||||
}
|
||||
|
||||
public void setAbsolutePath(String absolutePath) {
|
||||
this.absolutePath = absolutePath;
|
||||
}
|
||||
|
||||
public String getRelativePath() {
|
||||
return relativePath;
|
||||
}
|
||||
|
||||
public void setRelativePath(String relativePath) {
|
||||
this.relativePath = relativePath;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package cn.com.v2.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author fc
|
||||
* @since 2023-04-30
|
||||
*/
|
||||
@TableName("t_sys_user")
|
||||
@Data
|
||||
public class SysUser implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
private String username;
|
||||
|
||||
private String password;
|
||||
|
||||
private String nickname;
|
||||
|
||||
private Integer depId;
|
||||
|
||||
private String posId;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
package cn.com.v2.model.vo;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class GoviewProjectVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty(value = "项目状态[-1未发布,1发布]")
|
||||
private Integer state;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "创建人id")
|
||||
private String createUserId;
|
||||
|
||||
@ApiModelProperty(value = "删除状态[1删除,-1未删除]")
|
||||
private Integer isDelete;
|
||||
|
||||
@ApiModelProperty(value = "首页图片")
|
||||
private String indexImage;
|
||||
|
||||
@ApiModelProperty(value = "项目介绍")
|
||||
private String remarks;
|
||||
|
||||
private String content;
|
||||
|
||||
|
||||
@JsonProperty("id")
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@JsonProperty("projectName")
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
@JsonProperty("state")
|
||||
public Integer getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(Integer state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
@JsonProperty("createTime")
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
@JsonProperty("createUserId")
|
||||
public String getCreateUserId() {
|
||||
return createUserId;
|
||||
}
|
||||
|
||||
public void setCreateUserId(String createUserId) {
|
||||
this.createUserId = createUserId;
|
||||
}
|
||||
|
||||
@JsonProperty("isDelete")
|
||||
public Integer getIsDelete() {
|
||||
return isDelete;
|
||||
}
|
||||
|
||||
public void setIsDelete(Integer isDelete) {
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
@JsonProperty("indexImage")
|
||||
public String getIndexImage() {
|
||||
return indexImage;
|
||||
}
|
||||
|
||||
public void setIndexImage(String indexImage) {
|
||||
this.indexImage = indexImage;
|
||||
}
|
||||
|
||||
@JsonProperty("remarks")
|
||||
public String getRemarks() {
|
||||
return remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String dateToStringConvert(Date date) {
|
||||
if (date != null) {
|
||||
return DateUtil.format(date, "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
package cn.com.v2.model.vo;
|
||||
|
||||
|
||||
public class SysFileVo {
|
||||
|
||||
private String id;
|
||||
private String fileName;
|
||||
private Integer fileSize;
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 相对路径
|
||||
*/
|
||||
private String relativePath;
|
||||
|
||||
/**
|
||||
* 虚拟路径key
|
||||
*/
|
||||
private String virtualKey;
|
||||
|
||||
/**
|
||||
* 请求url
|
||||
*/
|
||||
private String fileurl;
|
||||
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public void setFileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public Integer getFileSize() {
|
||||
return fileSize;
|
||||
}
|
||||
|
||||
public void setFileSize(Integer fileSize) {
|
||||
this.fileSize = fileSize;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getRelativePath() {
|
||||
return relativePath;
|
||||
}
|
||||
|
||||
public void setRelativePath(String relativePath) {
|
||||
this.relativePath = relativePath;
|
||||
}
|
||||
|
||||
public String getVirtualKey() {
|
||||
return virtualKey;
|
||||
}
|
||||
|
||||
public void setVirtualKey(String virtualKey) {
|
||||
this.virtualKey = virtualKey;
|
||||
}
|
||||
|
||||
public String getFileurl() {
|
||||
return fileurl;
|
||||
}
|
||||
|
||||
public void setFileurl(String fileurl) {
|
||||
this.fileurl = fileurl;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package cn.com.v2.service;
|
||||
|
||||
import cn.com.v2.model.CommonQuestion;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 常见问题(TCommonQuestion)表服务接口
|
||||
*
|
||||
* @author wu
|
||||
* @since 2025-04-21 09:36:07
|
||||
*/
|
||||
public interface CommonQuestionService extends IService<CommonQuestion> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package cn.com.v2.service;
|
||||
|
||||
import cn.com.v2.model.Dictionary;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 字典(Dictionary)表服务接口
|
||||
*
|
||||
* @author wu
|
||||
* @since 2025-04-21 14:18:32
|
||||
*/
|
||||
public interface DictionaryService extends IService<Dictionary> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package cn.com.v2.service;
|
||||
|
||||
import cn.com.v2.model.HistoricalReply;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* (THistoricalReply)表服务接口
|
||||
*
|
||||
* @author wu
|
||||
* @since 2025-04-18 09:34:28
|
||||
*/
|
||||
public interface HistoricalReplyService extends IService<HistoricalReply> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,18 @@
|
||||
package cn.com.v2.service;
|
||||
|
||||
import cn.com.v2.model.GoviewProjectData;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author fc
|
||||
* @since 2023-04-30
|
||||
*/
|
||||
public interface IGoviewProjectDataService extends IService<GoviewProjectData> {
|
||||
|
||||
public GoviewProjectData getProjectid(String projectId);
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.com.v2.service;
|
||||
|
||||
import cn.com.v2.model.GoviewProject;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author fc
|
||||
* @since 2023-04-30
|
||||
*/
|
||||
public interface IGoviewProjectService extends IService<GoviewProject> {
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package cn.com.v2.service;
|
||||
|
||||
import cn.com.v2.model.SysFile;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author fc
|
||||
* @since 2022-12-22
|
||||
*/
|
||||
public interface ISysFileService extends IService<SysFile> {
|
||||
|
||||
|
||||
public SysFile selectByExamplefileName(String filename);
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.com.v2.service;
|
||||
|
||||
import cn.com.v2.model.SysUser;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author fc
|
||||
* @since 2023-04-30
|
||||
*/
|
||||
public interface ISysUserService extends IService<SysUser> {
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package cn.com.v2.service.impl;
|
||||
|
||||
import cn.com.v2.mapper.CommonQuestionMapper;
|
||||
import cn.com.v2.model.CommonQuestion;
|
||||
import cn.com.v2.service.CommonQuestionService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 常见问题(TCommonQuestion)表服务实现类
|
||||
*
|
||||
* @author wu
|
||||
* @since 2025-04-21 09:36:07
|
||||
*/
|
||||
@Service("commonQuestionService")
|
||||
public class CommonQuestionServiceImpl extends ServiceImpl<CommonQuestionMapper, CommonQuestion> implements CommonQuestionService {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
package cn.com.v2.service.impl;
|
||||
|
||||
import cn.com.v2.mapper.DictionaryMapper;
|
||||
import cn.com.v2.model.Dictionary;
|
||||
import cn.com.v2.service.DictionaryService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 字典(Dictionary)表服务实现类
|
||||
*
|
||||
* @author wu
|
||||
* @since 2025-04-21 14:18:32
|
||||
*/
|
||||
@Service("dictionaryService")
|
||||
public class DictionaryServiceImpl extends ServiceImpl<DictionaryMapper, Dictionary> implements DictionaryService {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,32 @@
|
||||
package cn.com.v2.service.impl;
|
||||
|
||||
import cn.com.v2.mapper.GoviewProjectDataMapper;
|
||||
import cn.com.v2.model.GoviewProjectData;
|
||||
import cn.com.v2.service.IGoviewProjectDataService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author fc
|
||||
* @since 2023-04-30
|
||||
*/
|
||||
@Service
|
||||
public class GoviewProjectDataServiceImpl extends ServiceImpl<GoviewProjectDataMapper, GoviewProjectData> implements IGoviewProjectDataService {
|
||||
@Autowired
|
||||
GoviewProjectDataMapper dataMapper;
|
||||
|
||||
@Override
|
||||
public GoviewProjectData getProjectid(String projectId) {
|
||||
LambdaQueryWrapper<GoviewProjectData> lambdaQueryWrapper = new LambdaQueryWrapper<GoviewProjectData>();
|
||||
lambdaQueryWrapper.eq(GoviewProjectData::getProjectId, projectId);
|
||||
return dataMapper.selectOne(lambdaQueryWrapper);
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package cn.com.v2.service.impl;
|
||||
|
||||
import cn.com.v2.mapper.GoviewProjectMapper;
|
||||
import cn.com.v2.model.GoviewProject;
|
||||
import cn.com.v2.service.IGoviewProjectService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author fc
|
||||
* @since 2023-04-30
|
||||
*/
|
||||
@Service
|
||||
public class GoviewProjectServiceImpl extends ServiceImpl<GoviewProjectMapper, GoviewProject> implements IGoviewProjectService {
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package cn.com.v2.service.impl;
|
||||
|
||||
import cn.com.v2.mapper.HistoricalReplyMapper;
|
||||
import cn.com.v2.model.HistoricalReply;
|
||||
import cn.com.v2.service.HistoricalReplyService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* (THistoricalReply)表服务实现类
|
||||
*
|
||||
* @author wu
|
||||
* @since 2025-04-18 09:34:28
|
||||
*/
|
||||
@Service("historicalReplyService")
|
||||
public class HistoricalReplyServiceImpl extends ServiceImpl<HistoricalReplyMapper, HistoricalReply> implements HistoricalReplyService {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,30 @@
|
||||
package cn.com.v2.service.impl;
|
||||
|
||||
import cn.com.v2.mapper.SysFileMapper;
|
||||
import cn.com.v2.model.SysFile;
|
||||
import cn.com.v2.service.ISysFileService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author fc
|
||||
* @since 2022-12-22
|
||||
*/
|
||||
@Service
|
||||
public class SysFileServiceImpl extends ServiceImpl<SysFileMapper, SysFile> implements ISysFileService {
|
||||
@Autowired
|
||||
private SysFileMapper sysFileMapper;
|
||||
|
||||
@Override
|
||||
public SysFile selectByExamplefileName(String filename) {
|
||||
SysFile sysFile = sysFileMapper.selectOne(new LambdaQueryWrapper<SysFile>().eq(SysFile::getFileName, filename));
|
||||
return sysFile;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package cn.com.v2.service.impl;
|
||||
|
||||
import cn.com.v2.mapper.SysUserMapper;
|
||||
import cn.com.v2.model.SysUser;
|
||||
import cn.com.v2.service.ISysUserService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author fc
|
||||
* @since 2023-04-30
|
||||
*/
|
||||
@Service
|
||||
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService {
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package cn.com.v2.util;
|
||||
|
||||
|
||||
import cn.com.v2.model.SysUser;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
/**
|
||||
* 封装 Sa-Token 常用操作
|
||||
* @author kong
|
||||
*
|
||||
*/
|
||||
public class SaTokenUtil {
|
||||
|
||||
/**
|
||||
* 获取登录用户model
|
||||
*/
|
||||
public static SysUser getUser() {
|
||||
Object object = StpUtil.getSession().get("user");
|
||||
if (object != null) {
|
||||
SysUser tsysUser = new SysUser();
|
||||
BeanUtils.copyProperties(tsysUser, object);
|
||||
return tsysUser;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* set用户
|
||||
*/
|
||||
public static void setUser(SysUser user) {
|
||||
StpUtil.getSession().set("user", user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取登录用户id
|
||||
*/
|
||||
public static String getUserId() {
|
||||
return StpUtil.getLoginIdAsString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取登录用户name
|
||||
*/
|
||||
public static String getLoginName() {
|
||||
SysUser tsysUser = getUser();
|
||||
if (tsysUser == null) {
|
||||
throw new RuntimeException("用户不存在!");
|
||||
}
|
||||
return tsysUser.getUsername();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取登录用户ip
|
||||
* @return
|
||||
* @author fuce
|
||||
* @Date 2019年11月21日 上午9:58:26
|
||||
*/
|
||||
public static String getIp() {
|
||||
|
||||
return StpUtil.getTokenSession().getString("login_ip");
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否登录
|
||||
* @return
|
||||
* @author fuce
|
||||
* @Date 2019年11月21日 上午9:58:26
|
||||
*/
|
||||
public static boolean isLogin() {
|
||||
return StpUtil.isLogin();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
#dev环境 mysql7.0
|
||||
spring:
|
||||
datasource:
|
||||
druid:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/go-view?useSSL=false&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: 123456
|
||||
initial-size: 10
|
||||
min-idle: 10
|
||||
max-active: 20
|
||||
max-wait: 40
|
||||
validation-query: SELECT 1
|
||||
# url: jdbc:sqlite:D:\javaSpaces\go-view-serve\sqllite\goview.db
|
||||
#linux服务器
|
||||
#url: jdbc:sqlite://home/cqfy/project/OSSDATABASE/oss.db
|
||||
username:
|
||||
password:
|
||||
### 连接池配置
|
||||
|
@ -0,0 +1,21 @@
|
||||
#dev环境 mysql7.0
|
||||
spring:
|
||||
datasource:
|
||||
druid:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://39.101.188.84:3307/go-view?useSSL=false&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: Admin123@
|
||||
initial-size: 10
|
||||
min-idle: 10
|
||||
max-active: 20
|
||||
max-wait: 40
|
||||
validation-query: SELECT 1
|
||||
# url: jdbc:sqlite:D:\javaSpaces\go-view-serve\sqllite\goview.db
|
||||
#linux服务器
|
||||
#url: jdbc:sqlite://home/cqfy/project/OSSDATABASE/oss.db
|
||||
username:
|
||||
password:
|
||||
### 连接池配置
|
||||
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.com.v2.mapper.GoviewProjectDataMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.com.v2.mapper.GoviewProjectMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.com.v2oss.mapper.SysFileMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.com.v2.mapper.SysUserMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,13 @@
|
||||
package cn.com.jetshine.oos;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class OosApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue