后台配置文件调整 #11
@ -128,7 +128,7 @@ public class YudaoWebSecurityConfigurerAdapter {
|
|||||||
// ①:全局共享规则
|
// ①:全局共享规则
|
||||||
.authorizeRequests()
|
.authorizeRequests()
|
||||||
// 1.1 静态资源,可匿名访问
|
// 1.1 静态资源,可匿名访问
|
||||||
.antMatchers(HttpMethod.GET, "/*.html", "/**/*.html", "/**/*.css", "/**/*.js").permitAll()
|
.antMatchers(HttpMethod.GET, "/*.html", "/**/*.html", "/**/*.css", "/**/*.js","/intelligentForm/selectDynamicDataById","/intelligentForm/selectDynamicDataById").permitAll()
|
||||||
// 1.2 设置 @PermitAll 无需认证
|
// 1.2 设置 @PermitAll 无需认证
|
||||||
.antMatchers(HttpMethod.GET, permitAllUrls.get(HttpMethod.GET).toArray(new String[0])).permitAll()
|
.antMatchers(HttpMethod.GET, permitAllUrls.get(HttpMethod.GET).toArray(new String[0])).permitAll()
|
||||||
.antMatchers(HttpMethod.POST, permitAllUrls.get(HttpMethod.POST).toArray(new String[0])).permitAll()
|
.antMatchers(HttpMethod.POST, permitAllUrls.get(HttpMethod.POST).toArray(new String[0])).permitAll()
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.promotion.controller.admin.dynamic;
|
package cn.iocoder.yudao.module.promotion.controller.admin.dynamic;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||||
import cn.iocoder.yudao.module.promotion.dal.dataobject.dynamic.DynamicData;
|
import cn.iocoder.yudao.module.promotion.dal.dataobject.dynamic.DynamicData;
|
||||||
import cn.iocoder.yudao.module.promotion.dal.dataobject.dynamic.DynamicForm;
|
import cn.iocoder.yudao.module.promotion.dal.dataobject.dynamic.DynamicForm;
|
||||||
import cn.iocoder.yudao.module.promotion.service.dynamic.DynamicDataService;
|
import cn.iocoder.yudao.module.promotion.service.dynamic.DynamicDataService;
|
||||||
@ -9,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.security.PermitAll;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -45,12 +47,14 @@ public class DynamicDataController {
|
|||||||
}
|
}
|
||||||
//根据id查询数据
|
//根据id查询数据
|
||||||
@GetMapping("/selectDynamicDataById")
|
@GetMapping("/selectDynamicDataById")
|
||||||
|
@PermitAll
|
||||||
public CommonResult<DynamicData> selectDynamicDataById(String id){
|
public CommonResult<DynamicData> selectDynamicDataById(String id){
|
||||||
return success(dynamicDataService.doSelectDynamicDataById(id));
|
return success(dynamicDataService.doSelectDynamicDataById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
//采集数据
|
//采集数据
|
||||||
@PostMapping("/collectData")
|
@PostMapping("/collectData")
|
||||||
|
@PermitAll
|
||||||
public CommonResult<String> collectData(@RequestBody DynamicForm dynamicForm){
|
public CommonResult<String> collectData(@RequestBody DynamicForm dynamicForm){
|
||||||
dynamicFormService.doCollectData(dynamicForm);
|
dynamicFormService.doCollectData(dynamicForm);
|
||||||
return success("保存成功");
|
return success("保存成功");
|
||||||
|
Loading…
Reference in New Issue
Block a user