排除接口请求限制 /api/cms/form-record
This commit is contained in:
@@ -3,8 +3,10 @@ package com.gxwebsoft.cms.controller;
|
||||
import com.gxwebsoft.cms.entity.FormRecord;
|
||||
import com.gxwebsoft.cms.param.FormRecordParam;
|
||||
import com.gxwebsoft.cms.service.FormRecordService;
|
||||
import com.gxwebsoft.common.core.web.*;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -49,15 +51,10 @@ public class FormRecordController extends BaseController {
|
||||
@ApiOperation("添加表单数据记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody FormRecord formRecord) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
formRecord.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (formRecordService.save(formRecord)) {
|
||||
return success("添加成功");
|
||||
return success("提交成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
return fail("提交失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改表单数据记录表")
|
||||
|
||||
@@ -23,7 +23,7 @@ public class FormRecordServiceImpl extends ServiceImpl<FormRecordMapper, FormRec
|
||||
@Override
|
||||
public PageResult<FormRecord> pageRel(FormRecordParam param) {
|
||||
PageParam<FormRecord, FormRecordParam> page = new PageParam<>(param);
|
||||
//page.setDefaultOrder("create_time desc");
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<FormRecord> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
@@ -33,7 +33,7 @@ public class FormRecordServiceImpl extends ServiceImpl<FormRecordMapper, FormRec
|
||||
List<FormRecord> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<FormRecord, FormRecordParam> page = new PageParam<>();
|
||||
//page.setDefaultOrder("create_time desc");
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
"/api/wxWorkQrConnect",
|
||||
"/WW_verify_QMv7HoblYU6z63bb.txt",
|
||||
"/5zbYEPkyV4.txt",
|
||||
"/api/love/user-plan-log/wx-pay/**"
|
||||
"/api/love/user-plan-log/wx-pay/**",
|
||||
"/api/cms/form-record"
|
||||
)
|
||||
.permitAll()
|
||||
.anyRequest()
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
# 生产环境配置
|
||||
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://127.0.0.1:3306/db_diia?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
|
||||
username: db_diia
|
||||
password: JKkkKjPjcmEZJfwa
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
file:
|
||||
name: websoft-modules.log
|
||||
level:
|
||||
root: WARN
|
||||
com.gxwebsoft: ERROR
|
||||
com.baomidou.mybatisplus: ERROR
|
||||
|
||||
socketio:
|
||||
host: 0.0.0.0 #IP地址
|
||||
|
||||
# 框架配置
|
||||
config:
|
||||
# 生产环境接口
|
||||
server-url: https://server.gxwebsoft.com/api
|
||||
upload-path: /www/wwwroot/file.ws/
|
||||
|
||||
# 阿里云OSS云存储
|
||||
endpoint: https://oss-cn-shenzhen.aliyuncs.com
|
||||
accessKeyId: LTAI4GKGZ9Z2Z8JZ77c3GNZP
|
||||
accessKeySecret: BiDkpS7UXj72HWwDWaFZxiXjNFBNCM
|
||||
bucketName: oss-gxwebsoft
|
||||
bucketDomain: https://oss.wsdns.cn
|
||||
aliyunDomain: https://oss-gxwebsoft.oss-cn-shenzhen.aliyuncs.com
|
||||
Reference in New Issue
Block a user