Compare commits

...

2 Commits

6 changed files with 55 additions and 8 deletions

View File

@ -82,8 +82,10 @@ public class OrgApplyInfoApiEntity implements Serializable {
private String comLegalPerson; private String comLegalPerson;
/**机构地址*/ /**机构地址*/
private String orgAddress; private String orgAddress;
/**机构位置坐标格式:经度,纬度*/ /**机构位置坐标:经度*/
private String orgCoordinate; private String orgCoordinateLo;
/**机构位置坐标:纬度*/
private String orgCoordinateLa;
/**机构负责人*/ /**机构负责人*/
private String orgLeader; private String orgLeader;
/**机构负责人电话*/ /**机构负责人电话*/

View File

@ -153,10 +153,14 @@ public class OrgApplyInfo implements Serializable {
@Excel(name = "机构地址", width = 15) @Excel(name = "机构地址", width = 15)
@ApiModelProperty(value = "机构地址") @ApiModelProperty(value = "机构地址")
private java.lang.String orgAddress; private java.lang.String orgAddress;
/**机构位置坐标格式:经度,纬度*/ /**机构位置坐标:经度*/
@Excel(name = "机构位置坐标格式:经度,纬度", width = 15) @Excel(name = "机构位置坐标:经度", width = 15)
@ApiModelProperty(value = "机构位置坐标格式:经度,纬度") @ApiModelProperty(value = "机构位置坐标:经度")
private java.lang.String orgCoordinate; private String orgCoordinateLo;
/**机构位置坐标:纬度*/
@Excel(name = "机构位置坐标:纬度", width = 15)
@ApiModelProperty(value = "机构位置坐标:纬度")
private String orgCoordinateLa;
/**机构负责人*/ /**机构负责人*/
@Excel(name = "机构负责人", width = 15) @Excel(name = "机构负责人", width = 15)
@ApiModelProperty(value = "机构负责人") @ApiModelProperty(value = "机构负责人")

View File

@ -14,6 +14,7 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* @Description: 机构加盟申请信息表 * @Description: 机构加盟申请信息表
@ -48,7 +49,13 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
qw.orderByDesc("create_time"); qw.orderByDesc("create_time");
List<OrgApplyInfo> list = baseMapper.selectList(qw); List<OrgApplyInfo> list = baseMapper.selectList(qw);
List<OrgApplyInfoApiEntity> result = Lists.newArrayList(); 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; return result;
} }
} }

View File

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

View File

@ -24,7 +24,8 @@ public class OrgApplyInfoApi {
@PostMapping("/save") @PostMapping("/save")
public Result<Object> save(@RequestBody OrgApplyInfoApiEntity orgApplyInfoApiEntity) { public Result<Object> save(@RequestBody OrgApplyInfoApiEntity orgApplyInfoApiEntity) {
if (StringUtils.isNotBlank(orgApplyInfoApiEntity.getId())) { if (StringUtils.isNotBlank(orgApplyInfoApiEntity.getId())) {
return Result.ok(orgApplyInfoApi.updateById(orgApplyInfoApiEntity)); orgApplyInfoApi.updateById(orgApplyInfoApiEntity);
return Result.ok("保存成功!");
} else { } else {
return Result.ok(orgApplyInfoApi.insert(orgApplyInfoApiEntity)); return Result.ok(orgApplyInfoApi.insert(orgApplyInfoApiEntity));
} }

View File

@ -120,6 +120,8 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/api/pad/versionUpdate", "anon");//pad端版本检测接口 filterChainDefinitionMap.put("/api/pad/versionUpdate", "anon");//pad端版本检测接口
filterChainDefinitionMap.put("/nuIpadApi/versionManage/versionUpdate", "anon");//pad端版本检测接口 filterChainDefinitionMap.put("/nuIpadApi/versionManage/versionUpdate", "anon");//pad端版本检测接口
filterChainDefinitionMap.put("/api/ocr/**", "anon");//阿里云证件识别 filterChainDefinitionMap.put("/api/ocr/**", "anon");//阿里云证件识别
filterChainDefinitionMap.put("/ws/ssh/**", "anon");//SSH测试
filterChainDefinitionMap.put("/api/proxy/**", "anon");//代理请求
//update-begin--Author:scott Date:20221116 for排除静态资源后缀 //update-begin--Author:scott Date:20221116 for排除静态资源后缀
filterChainDefinitionMap.put("/", "anon"); filterChainDefinitionMap.put("/", "anon");