获取模板列表
parent
2f3cf72b2b
commit
180163360b
@ -0,0 +1,51 @@
|
||||
package com.ms.api.spi.move;
|
||||
|
||||
import com.doudian.open.api.freightTemplate_list.data.FreightTemplateListData;
|
||||
import com.doudian.open.api.freightTemplate_list.param.FreightTemplateListParam;
|
||||
import com.doudian.open.api.product_isv_getClueList.data.ProductIsvGetClueListData;
|
||||
import com.doudian.open.api.product_isv_getClueList.param.ProductIsvGetClueListParam;
|
||||
import com.jinritemai.cloud.base.api.BaseRequest;
|
||||
import com.jinritemai.cloud.base.api.BaseResponse;
|
||||
import com.jinritemai.cloud.base.api.ExtensionService;
|
||||
import com.jinritemai.cloud.base.api.ExtensionServiceHandler;
|
||||
import com.ms.api.common.R;
|
||||
import com.ms.api.common.Ret;
|
||||
import com.ms.api.common.SPIBaseService;
|
||||
import com.ms.api.dto.move.GetFreightTemplateListRequestDTO;
|
||||
import com.ms.api.dto.move.GetShopCloudHotProductsRequestDTO;
|
||||
import com.ms.api.tool.DsJsonRequestTemplate;
|
||||
import com.ms.api.util.DdRequestUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 获取店铺模板列表
|
||||
*/
|
||||
@ExtensionService("getFreightTemplateList")
|
||||
@Slf4j
|
||||
public class GetFreightTemplateList extends SPIBaseService implements ExtensionServiceHandler<GetFreightTemplateListRequestDTO, Ret> {
|
||||
@Override
|
||||
public BaseResponse<Ret> handle(BaseRequest<GetFreightTemplateListRequestDTO> req) {
|
||||
initHandle(req);
|
||||
// ----参数校验----
|
||||
GetFreightTemplateListRequestDTO fields = req.getData();
|
||||
|
||||
// ----逻辑校验----
|
||||
|
||||
// ----业务处理----
|
||||
FreightTemplateListParam param = new FreightTemplateListParam();
|
||||
param.setName(fields.getName());
|
||||
param.setPage(fields.getPageNo());
|
||||
param.setSize(fields.getPageSize());
|
||||
FreightTemplateListData data = DdRequestUtil.FreightTemplateListDataRequest(param);
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("data", data.getList());
|
||||
result.put("total", data.getCount());
|
||||
|
||||
// ----结果返回----
|
||||
return R.ok(Ret.success(result));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue