Compare commits
2 Commits
3852ceda50
...
b14d02e6ef
Author | SHA1 | Date |
---|---|---|
|
b14d02e6ef | |
|
a2b3bd8814 |
|
@ -82,8 +82,10 @@ public class OrgApplyInfoApiEntity implements Serializable {
|
|||
private String comLegalPerson;
|
||||
/**机构地址*/
|
||||
private String orgAddress;
|
||||
/**机构位置坐标格式:经度,纬度*/
|
||||
private String orgCoordinate;
|
||||
/**机构位置坐标:经度*/
|
||||
private String orgCoordinateLo;
|
||||
/**机构位置坐标:纬度*/
|
||||
private String orgCoordinateLa;
|
||||
/**机构负责人*/
|
||||
private String orgLeader;
|
||||
/**机构负责人电话*/
|
||||
|
|
|
@ -153,10 +153,14 @@ public class OrgApplyInfo implements Serializable {
|
|||
@Excel(name = "机构地址", width = 15)
|
||||
@ApiModelProperty(value = "机构地址")
|
||||
private java.lang.String orgAddress;
|
||||
/**机构位置坐标格式:经度,纬度*/
|
||||
@Excel(name = "机构位置坐标格式:经度,纬度", width = 15)
|
||||
@ApiModelProperty(value = "机构位置坐标格式:经度,纬度")
|
||||
private java.lang.String orgCoordinate;
|
||||
/**机构位置坐标:经度*/
|
||||
@Excel(name = "机构位置坐标:经度", width = 15)
|
||||
@ApiModelProperty(value = "机构位置坐标:经度")
|
||||
private String orgCoordinateLo;
|
||||
/**机构位置坐标:纬度*/
|
||||
@Excel(name = "机构位置坐标:纬度", width = 15)
|
||||
@ApiModelProperty(value = "机构位置坐标:纬度")
|
||||
private String orgCoordinateLa;
|
||||
/**机构负责人*/
|
||||
@Excel(name = "机构负责人", width = 15)
|
||||
@ApiModelProperty(value = "机构负责人")
|
||||
|
|
|
@ -14,6 +14,7 @@ import org.springframework.stereotype.Service;
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 机构加盟申请信息表
|
||||
|
@ -48,7 +49,13 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
|
|||
qw.orderByDesc("create_time");
|
||||
List<OrgApplyInfo> list = baseMapper.selectList(qw);
|
||||
List<OrgApplyInfoApiEntity> result = Lists.newArrayList();
|
||||
BeanUtil.copyProperties(list,result);
|
||||
result = list.stream()
|
||||
.map(item -> {
|
||||
OrgApplyInfoApiEntity entity = new OrgApplyInfoApiEntity();
|
||||
BeanUtils.copyProperties(item, entity);
|
||||
return entity;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
package com.nu.modules.proxy;
|
||||
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/proxy")
|
||||
public class ProxyApi {
|
||||
|
||||
@Autowired
|
||||
private RestTemplate restTemplate;
|
||||
|
||||
@GetMapping("/get")
|
||||
public ResponseEntity<String> proxyGet(@RequestParam String url,
|
||||
@RequestHeader(required = false) HttpHeaders headers) {
|
||||
HttpEntity<String> entity = new HttpEntity<>(headers);
|
||||
ResponseEntity<String> response = restTemplate.exchange(url, HttpMethod.GET, entity, String.class);
|
||||
return ResponseEntity.ok(response.getBody());
|
||||
}
|
||||
|
||||
@PostMapping("/post")
|
||||
public ResponseEntity<String> proxyPost(@RequestParam String url,
|
||||
@RequestBody(required = false) String body,
|
||||
@RequestHeader(required = false) HttpHeaders headers) {
|
||||
HttpEntity<String> entity = new HttpEntity<>(body, headers);
|
||||
ResponseEntity<String> response = restTemplate.exchange(url, HttpMethod.POST, entity, String.class);
|
||||
return ResponseEntity.ok(response.getBody());
|
||||
}
|
||||
}
|
|
@ -24,7 +24,8 @@ public class OrgApplyInfoApi {
|
|||
@PostMapping("/save")
|
||||
public Result<Object> save(@RequestBody OrgApplyInfoApiEntity orgApplyInfoApiEntity) {
|
||||
if (StringUtils.isNotBlank(orgApplyInfoApiEntity.getId())) {
|
||||
return Result.ok(orgApplyInfoApi.updateById(orgApplyInfoApiEntity));
|
||||
orgApplyInfoApi.updateById(orgApplyInfoApiEntity);
|
||||
return Result.ok("保存成功!");
|
||||
} else {
|
||||
return Result.ok(orgApplyInfoApi.insert(orgApplyInfoApiEntity));
|
||||
}
|
||||
|
|
|
@ -120,6 +120,8 @@ public class ShiroConfig {
|
|||
filterChainDefinitionMap.put("/api/pad/versionUpdate", "anon");//pad端版本检测接口
|
||||
filterChainDefinitionMap.put("/nuIpadApi/versionManage/versionUpdate", "anon");//pad端版本检测接口
|
||||
filterChainDefinitionMap.put("/api/ocr/**", "anon");//阿里云证件识别
|
||||
filterChainDefinitionMap.put("/ws/ssh/**", "anon");//SSH测试
|
||||
filterChainDefinitionMap.put("/api/proxy/**", "anon");//代理请求
|
||||
|
||||
//update-begin--Author:scott Date:20221116 for:排除静态资源后缀
|
||||
filterChainDefinitionMap.put("/", "anon");
|
||||
|
|
Loading…
Reference in New Issue