feat:外部接口接入
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.entity.*;
|
||||
@@ -8,16 +9,31 @@ import com.cool.store.enums.QWMessageEnum;
|
||||
import com.cool.store.enums.SMSMsgEnum;
|
||||
import com.cool.store.job.XxlJobHandler;
|
||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||
import com.cool.store.request.bigdata.ProfitDataRequest;
|
||||
import com.cool.store.request.huoma.ShopBasicInfoRequest;
|
||||
import com.cool.store.request.oppty.*;
|
||||
import com.cool.store.request.xfsgFirstOrderListRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.bigdata.ActDataResponse;
|
||||
import com.cool.store.response.bigdata.ProfitDataResponse;
|
||||
import com.cool.store.response.bigdata.ProfitRateResponse;
|
||||
import com.cool.store.response.huoma.ShopBaseInfoResponse;
|
||||
import com.cool.store.response.oppty.CityResponse;
|
||||
import com.cool.store.response.oppty.OpportunityDetailResponse;
|
||||
import com.cool.store.response.oppty.OpportunityInfoPageResponse;
|
||||
import com.cool.store.response.oppty.OpportunityInfoResponse;
|
||||
import com.cool.store.response.xfsgFirstOderListResponse;
|
||||
import com.cool.store.service.DataHandleService;
|
||||
import com.cool.store.service.ShopService;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.service.impl.CommonService;
|
||||
import com.google.gson.JsonObject;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.*;
|
||||
|
||||
@Slf4j
|
||||
@@ -119,4 +135,104 @@ public class PCTestController {
|
||||
|
||||
return ResponseResult.success(Boolean.TRUE);
|
||||
}
|
||||
@Resource
|
||||
ThirdOpportunityService thirdOpportunityService;
|
||||
@Resource
|
||||
ThirdBigDataService thirdBigDataService;
|
||||
@Resource
|
||||
HuoMaService huoMaService;
|
||||
|
||||
@PostMapping("/list")
|
||||
@ApiOperation("机会点列表/我的机会点")
|
||||
public ResponseResult<OpportunityInfoPageResponse> listOpportunities(@Valid @RequestBody OpportunityListRequest request) {
|
||||
OpportunityInfoPageResponse list = thirdOpportunityService.listOpportunities(request);
|
||||
return ResponseResult.success(list);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/getOpportunitiesDetail")
|
||||
@ApiOperation("机会点详情")
|
||||
public ResponseResult<OpportunityDetailResponse> getOpportunitiesDetail(@Valid @RequestBody OpportunityDetailRequest request) {
|
||||
OpportunityDetailResponse list = thirdOpportunityService.getOpportunitiesDetail(request);
|
||||
return ResponseResult.success(list);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/followOpportunity")
|
||||
@ApiOperation("关注/取消关注 机会点")
|
||||
public ResponseResult<String> followOpportunity(@Valid @RequestBody FollowRequest request) {
|
||||
return ResponseResult.success(thirdOpportunityService.followOpportunity(request));
|
||||
}
|
||||
|
||||
@PostMapping("/inspectionOpportunity")
|
||||
@ApiOperation("考察机会点")
|
||||
public ResponseResult<String> inspectionOpportunity(@Valid @RequestBody InspectionRequest request) {
|
||||
return ResponseResult.success(thirdOpportunityService.inspectionOpportunity(request));
|
||||
}
|
||||
|
||||
@PostMapping("/berthOperation")
|
||||
@ApiOperation("铺位关注机会点")
|
||||
public ResponseResult<String> berthOperation(@Valid @RequestBody BerthOperationRequest request) {
|
||||
return ResponseResult.success(thirdOpportunityService.berthOperation(request));
|
||||
}
|
||||
|
||||
@PostMapping("/storeOperation")
|
||||
@ApiOperation("门店关注机会点")
|
||||
public ResponseResult<String> storeOperation(@Valid @RequestBody StoreOperationRequest request) {
|
||||
return ResponseResult.success(thirdOpportunityService.storeOperation(request));
|
||||
}
|
||||
|
||||
@PostMapping("/cityList")
|
||||
@ApiOperation("省市区列表 查询省传0")
|
||||
public ResponseResult<List<CityResponse>> listOpportunities(@Valid @RequestBody CityRequest request) {
|
||||
// 调用第三方接口
|
||||
List<CityResponse> list = thirdOpportunityService.cityList(request);
|
||||
return ResponseResult.success(list);
|
||||
}
|
||||
|
||||
@PostMapping("/getProfitData")
|
||||
@ApiOperation("昨天毛利")
|
||||
public ResponseResult<ProfitDataResponse> listOpportunities(@Valid @RequestBody ProfitDataRequest request) {
|
||||
// 调用第三方接口
|
||||
return ResponseResult.success(thirdBigDataService.getProfitData(request));
|
||||
}
|
||||
|
||||
@PostMapping("/getCurMonthProfitData")
|
||||
@ApiOperation("本月毛利")
|
||||
public ResponseResult<ProfitDataResponse> getCurMonthProfitData(@Valid @RequestBody ProfitDataRequest request) {
|
||||
// 调用第三方接口
|
||||
return ResponseResult.success(thirdBigDataService.getCurMonthProfitData(request));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/getPreMonthProfitData")
|
||||
@ApiOperation("上月毛利")
|
||||
public ResponseResult<ProfitDataResponse> getPreMonthProfitData(@Valid @RequestBody ProfitDataRequest request) {
|
||||
// 调用第三方接口
|
||||
return ResponseResult.success(thirdBigDataService.getPreMonthProfitData(request));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/getMonthProfitTrend")
|
||||
@ApiOperation("毛利趋势")
|
||||
public ResponseResult<List<ProfitRateResponse>> getMonthProfitTrend(@Valid @RequestBody ProfitDataRequest request) {
|
||||
// 调用第三方接口
|
||||
return ResponseResult.success(thirdBigDataService.getMonthProfitTrend(request));
|
||||
}
|
||||
|
||||
@PostMapping("/getActData")
|
||||
@ApiOperation("门店实收")
|
||||
public ResponseResult<ActDataResponse> getActData(@Valid @RequestBody ProfitDataRequest request) {
|
||||
// 调用第三方接口
|
||||
return ResponseResult.success(thirdBigDataService.getActData(request));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/getShopInfo")
|
||||
@ApiOperation("火码 查询门店信息")
|
||||
public ResponseResult<ShopBaseInfoResponse> getShopInfo(@Valid @RequestBody ShopBasicInfoRequest request) {
|
||||
// 调用第三方接口
|
||||
return ResponseResult.success(huoMaService.getShopInfo(request));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ enterprise.dingCorpId=wpayJeDAAAhGIFgUJpJN-zg39JuNbYhg
|
||||
##qywx.task.notice.url1=https://tstore-api.coolstore.cn/notice?corpId=%s&appType=%s&target=%s
|
||||
qywx.task.notice.url2=https://tstore-h5.coolstore.cn/?corpId=%s&appType=%s#/notice?target=%s¬iceType=zx&corpId=%s&appType=%s&eid=%s
|
||||
|
||||
|
||||
#机会点
|
||||
third.party.appKey=IGSAEQoakR2HEaYx
|
||||
third.party.appSecret=aPsA99K1obFeFm3m
|
||||
zx.opportunity.url=https://snp.wenmatech.com/
|
||||
@@ -92,3 +92,7 @@ zx.opportunity.url=https://snp.wenmatech.com/
|
||||
zx.big.data.url=https://ds.zhengxinfood.com/
|
||||
zx.big.data.appKey=ff203b5567744feaaae49fb86f58c5bf
|
||||
zx.big.data.appSecret=35b8b9a400b4430fa022190be0913cd6
|
||||
|
||||
api.auth.url=https://api.zhengxindzg.cn
|
||||
api.auth.username=GkqgAhUJ7p9swJo
|
||||
api.auth.secret=NzVrnS3OWiupdDY
|
||||
|
||||
Reference in New Issue
Block a user