|  |  |  | 
|---|
|  |  |  | package com.doumee.api.web; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson.JSONObject; | 
|---|
|  |  |  | import com.doumee.biz.system.SystemDictDataBiz; | 
|---|
|  |  |  | import com.doumee.config.annotation.ErpLoginRequired; | 
|---|
|  |  |  | import com.doumee.core.constants.ResponseStatus; | 
|---|
|  |  |  | import com.doumee.core.exception.BusinessException; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.erp.model.openapi.request.*; | 
|---|
|  |  |  | import com.doumee.core.erp.model.openapi.response.*; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.dao.web.reqeust.ErpVisitDTO; | 
|---|
|  |  |  | import com.doumee.service.business.VisitsService; | 
|---|
|  |  |  | import com.doumee.service.business.ext.ERPSyncService; | 
|---|
|  |  |  | import com.google.gson.JsonObject; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiImplicitParam; | 
|---|
|  |  |  | import io.swagger.annotations.ApiImplicitParams; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.validation.Valid; | 
|---|
|  |  |  | import java.util.HashMap; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * Created by IntelliJ IDEA. | 
|---|
|  |  |  | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping("/visitbiz") | 
|---|
|  |  |  | @Slf4j | 
|---|
|  |  |  | public class BizResourceController extends ApiController { | 
|---|
|  |  |  | public class BizResourceController{ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ERPSyncService erpSyncService; | 
|---|
|  |  |  | 
|---|
|  |  |  | private VisitsService visitsService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "调用凭据获取接口", notes = "访客端提供,供ERP端调用,向ERP提供统接口调用凭证") | 
|---|
|  |  |  | /* @ApiOperation(value = "调用凭据获取接口", notes = "访客端提供,供ERP端调用,向ERP提供统接口调用凭证") | 
|---|
|  |  |  | @GetMapping("/accesstoken") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "query", dataType = "String", name = "accessKey", value = "访问key,由访客端提供", required = true), | 
|---|
|  |  |  | 
|---|
|  |  |  | public ApiResponse<AccessTokenResponse> accesstoken(@RequestParam  String accessKey, @RequestParam  String accessSecret) { | 
|---|
|  |  |  | ApiResponse response = ApiResponse.success(null); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | response.setData(erpSyncService.createERPToken(accessKey,accessSecret)); | 
|---|
|  |  |  | //            response.setData(erpSyncService.createERPToken(accessKey,accessSecret)); | 
|---|
|  |  |  | }catch (BusinessException e){ | 
|---|
|  |  |  | response = ApiResponse.failed(e.getCode(), e.getMessage()); | 
|---|
|  |  |  | }catch (Exception e){ | 
|---|
|  |  |  | 
|---|
|  |  |  | map.put("FTP资源访问映射地址", | 
|---|
|  |  |  | systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode()); | 
|---|
|  |  |  | return  ApiResponse.success(map); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }*/ | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|