补充客户信息

This commit is contained in:
2026-05-03 09:36:00 +08:00
parent 7b2691b98f
commit 29b97839ba
10 changed files with 538 additions and 1 deletions

View File

@@ -6,11 +6,13 @@ import com.rj.common.AudioManagementConstants;
import com.rj.common.DataEnrichmentUtil;
import com.rj.dto.CustomerPhotoPreviewResult;
import com.rj.dto.CustomerPhotoUploadResult;
import com.rj.dto.NearbyMerchantSearchResult;
import com.rj.entity.AudioManagement;
import com.rj.entity.CustomerManagement;
import com.rj.entity.SalesManagement;
import com.rj.service.IAudioManagementService;
import com.rj.service.ICustomerManagementService;
import com.rj.service.INearbyMerchantSearchService;
import com.rj.service.ISalesManagementService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
@@ -53,6 +55,9 @@ public class CustomerManagementController {
@Autowired
private ISalesManagementService salesManagementService;
@Autowired
private INearbyMerchantSearchService nearbyMerchantSearchService;
/**
* 新增客户
*/
@@ -202,6 +207,30 @@ public class CustomerManagementController {
@Autowired
private DataEnrichmentUtil dataEnrichmentUtil;
/**
* 根据城市与地址做地理编码,再按半径搜索周边商家(高德 place/around逻辑同 AllShopCollectorV5
*/
@GetMapping("/searchNearbyMerchants")
@Operation(summary = "附近商家检索", description = "根据 CITY、ADDRESS 解析坐标,按 RADIUS、MAX_PAGE、maxRecordsOfpage 调用高德周边搜索")
public ResponseEntity<Map<String, Object>> searchNearbyMerchants(
@Parameter(description = "城市(传给高德地理编码 city", required = true) @RequestParam("CITY") String city,
@Parameter(description = "地址/地标(传给高德地理编码 address", required = true) @RequestParam("ADDRESS") String address,
@Parameter(description = "搜索半径(米)", required = true) @RequestParam("RADIUS") int radius,
@Parameter(description = "最大请求页数", required = true) @RequestParam("MAX_PAGE") int maxPage,
@Parameter(description = "每页条数150高德 offset", required = true) @RequestParam("maxRecordsOfpage") int maxRecordsOfpage) {
NearbyMerchantSearchResult search = nearbyMerchantSearchService.searchNearbyMerchants(
city, address, radius, maxPage, maxRecordsOfpage);
Map<String, Object> result = new HashMap<>();
result.put("success", search.isSuccess());
result.put("message", search.getMessage());
if (search.isSuccess()) {
result.put("centerLocation", search.getCenterLocation());
result.put("totalCount", search.getTotalCount());
result.put("data", search.getMerchants());
}
return ResponseEntity.status(search.getHttpStatus()).body(result);
}
/**
* 分页查询客户列表
*/