fix:菜品市场菜品服务包上新接口
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dto.FoodTokenDTO;
|
||||
import com.cool.store.dto.recipe.RecipeSpLaunchDTO;
|
||||
import com.cool.store.dto.store.StoreUserUpdateDTO;
|
||||
import com.cool.store.request.recipe.RevenueDataRequest;
|
||||
import com.cool.store.response.caipin.StoreUserResponse;
|
||||
@@ -37,4 +38,11 @@ public interface ThirdFoodService {
|
||||
* @return 营收数据VO列表
|
||||
*/
|
||||
List<RevenueDataVO> getRevenueData(RevenueDataRequest request);
|
||||
|
||||
/**
|
||||
* 查询菜品服务包上新数据
|
||||
* @param request 请求request
|
||||
* @return 服务包菜品上新DTO
|
||||
*/
|
||||
RecipeSpLaunchDTO getRecipeServiceLaunch(RevenueDataRequest request);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.cool.store.dao.StoreDao;
|
||||
import com.cool.store.dto.FoodTokenDTO;
|
||||
import com.cool.store.dto.recipe.RecipeSpLaunchDTO;
|
||||
import com.cool.store.dto.recipe.RevenueDataDTO;
|
||||
import com.cool.store.dto.recipe.RevenueDataQueryDTO;
|
||||
import com.cool.store.dto.store.StoreUserUpdateDTO;
|
||||
@@ -79,6 +80,17 @@ public class ThirdFoodServiceImpl implements ThirdFoodService {
|
||||
return BeanUtil.toList(list, RevenueDataVO.class, CopyOptions.create().setFieldMapping(Collections.singletonMap("storeCode", "storeNum")));
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecipeSpLaunchDTO getRecipeServiceLaunch(RevenueDataRequest request) {
|
||||
StoreDO storeDO = storeDao.getByStoreId(request.getStoreId());
|
||||
if (Objects.isNull(storeDO)) {
|
||||
throw new ServiceException(ErrorCodeEnum.STORE_NOT_FIND);
|
||||
}
|
||||
RevenueDataQueryDTO queryDTO = new RevenueDataQueryDTO(storeDO.getStoreNum(), request.getBusinessDateFrom(), request.getBusinessDateTo());
|
||||
String url = "/v1/store/business/spRecipeList";
|
||||
return executeApiCall(url, queryDTO, RecipeSpLaunchDTO.class);
|
||||
}
|
||||
|
||||
|
||||
private <T> T executeApiCall(String url, Object requestBody, Class<T> responseType) {
|
||||
// 1. 打印请求前日志
|
||||
|
||||
Reference in New Issue
Block a user