feat:外部接口接入
This commit is contained in:
@@ -0,0 +1,124 @@
|
||||
package com.cool.store.controller.webc;
|
||||
|
||||
import com.cool.store.request.bigdata.ProfitDataRequest;
|
||||
import com.cool.store.request.oppty.*;
|
||||
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.oppty.CityResponse;
|
||||
import com.cool.store.response.oppty.OpportunityDetailResponse;
|
||||
import com.cool.store.response.oppty.OpportunityInfoPageResponse;
|
||||
import com.cool.store.service.ThirdBigDataService;
|
||||
import com.cool.store.service.ThirdOpportunityService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/4/1 20:49
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/mini/third/api")
|
||||
public class ThirdApiController {
|
||||
|
||||
@Resource
|
||||
ThirdOpportunityService thirdOpportunityService;
|
||||
@Resource
|
||||
ThirdBigDataService thirdBigDataService;
|
||||
|
||||
@PostMapping("/list")
|
||||
@ApiOperation("机会点列表/我的机会点")
|
||||
public ResponseResult<OpportunityInfoPageResponse> listOpportunities(@Valid @RequestBody OpportunityListRequest request) {
|
||||
return ResponseResult.success(thirdOpportunityService.listOpportunities(request));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/getOpportunitiesDetail")
|
||||
@ApiOperation("机会点详情")
|
||||
public ResponseResult<OpportunityDetailResponse> getOpportunitiesDetail(@Valid @RequestBody OpportunityDetailRequest request) {
|
||||
return ResponseResult.success(thirdOpportunityService.getOpportunitiesDetail(request));
|
||||
}
|
||||
|
||||
|
||||
@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) {
|
||||
// 调用第三方接口
|
||||
return ResponseResult.success(thirdOpportunityService.cityList(request));
|
||||
}
|
||||
|
||||
@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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -28,7 +28,7 @@ isv.domain=https://abstore-isv.coolstore.cn/isv
|
||||
#rocketmq \u914D\u7F6E
|
||||
rocketmq.accessKey=LTAI5tJbgtyoHUvofTaeP1RP
|
||||
rocketmq.secretKey=myg755iCx0j4PyQkHMaUVeOr0bw1tA
|
||||
rocketmq.nameSrvAdder=http://MQ_INST_1947409023213164_BX3sLZnA.cn-hangzhou.mq-internal.aliyuncs.com:8080
|
||||
rocketmq.nameSrvAdder=http://MQ_INST_1947409023213164_BX3sLZnA.cn-hangzhou.mq.aliyuncs.com:80
|
||||
rocketmq.topic=simple_message
|
||||
|
||||
#oss配置
|
||||
@@ -82,3 +82,13 @@ 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/
|
||||
|
||||
#大数据地址
|
||||
zx.big.data.url=https://ds.zhengxinfood.com/
|
||||
zx.big.data.appKey=ff203b5567744feaaae49fb86f58c5bf
|
||||
zx.big.data.appSecret=35b8b9a400b4430fa022190be0913cd6
|
||||
|
||||
Reference in New Issue
Block a user