rk
7 小时以前 4f4538356403d620b9bd510fd45729a251291942
server/platform/src/main/java/com/doumee/api/business/DouyinVerifyController.java
@@ -16,6 +16,7 @@
import com.doumee.dao.business.model.DouyinVerifyLog;
import com.doumee.dao.business.model.DouyinVerifyRecord;
import com.doumee.dao.business.vo.DouyinVerifyRecordPageVO;
import com.doumee.dao.business.web.response.DouyinShopPoiVO;
import com.doumee.service.business.DouyinVerifyLogService;
import com.doumee.service.business.DouyinVerifyService;
import io.swagger.annotations.Api;
@@ -64,22 +65,26 @@
        return ApiResponse.success(douyinVerifyService.findManagePage(pageWrap));
    }
    @ApiOperation("查询抖音商户下门店(用于选核销门店;account_id 从字典读取)")
    @ApiOperation("查询抖音商户下门店(poiId + 门店名称成对返回;account_id 从字典读取)")
    @PostMapping("/poiList")
    @RequiresPermissions("business:douyinVerify:query")
    public ApiResponse<List<String>> poiList() {
    public ApiResponse<List<DouyinShopPoiVO>> poiList() {
        // 门店查询为无状态透传(无落库),Controller → DouyinClient 直连;account_id 由 Client 从字典读取
        DouyinBaseResp<DouyinShopPoiResp> resp = douyinClient.shopPoiQuery();
        List<DouyinShopPoiResp.Poi> pois = resp == null || resp.getData() == null ? null : resp.getData().getPois();
        if (pois == null || pois.isEmpty()) {
            return ApiResponse.success(Collections.emptyList());
        }
        // 仅提取门店ID,过滤 poi 节点或 poiId 为空的条目
        List<String> poiIds = pois.stream()
        // 提取门店ID + 门店名称成对返回;过滤 poi 节点或 poiId 为空的条目
        // 门店名称实际路径为 pois[].account.poi_account.account_name
        List<DouyinShopPoiVO> poiList = pois.stream()
                .filter(p -> p != null && p.getPoi() != null && StringUtils.isNotBlank(p.getPoi().getPoiId()))
                .map(p -> p.getPoi().getPoiId())
                .map(p -> new DouyinShopPoiVO(
                        p.getPoi().getPoiId(),
                        p.getAccount() == null || p.getAccount().getPoiAccount() == null
                                ? null : p.getAccount().getPoiAccount().getAccountName()))
                .collect(Collectors.toList());
        return ApiResponse.success(poiIds);
        return ApiResponse.success(poiList);
    }
    @PreventRepeat