记得上下班打卡 | git大法好,push需谨慎

Commit 51b6af65 authored by 胡佳晨's avatar 胡佳晨

修改正在下单接口 admin

parent ed5845e4
......@@ -146,7 +146,7 @@ public class GoblinSelfZhengzaiController extends BaseController {
public ResponseDto<List<GoblinMarketSpuListVo>> purchasingSpuList(@RequestParam("marketId") @Valid String marketId,
@RequestParam("storeId") @Valid String storeId,
@RequestParam("pageNum") @Valid int page) {
return goblinZhengzaiMarketService.zhengzaiSpuList(marketId, storeId, page);
return ResponseDto.success(goblinZhengzaiMarketService.zhengzaiSpuList(marketId, storeId, page));
}
@GetMapping("zhengzai/sku")
......@@ -160,7 +160,7 @@ public class GoblinSelfZhengzaiController extends BaseController {
public ResponseDto<List<GoblinSelfZhengzaiSkuVo>> purchasingSkuList(@RequestParam("marketId") @Valid String marketId,
@RequestParam("storeId") @Valid String storeId,
@RequestParam("spuId") @Valid String spuId) {
return goblinZhengzaiMarketService.zhengzaiSkuList(marketId, storeId, spuId);
return ResponseDto.success(goblinZhengzaiMarketService.zhengzaiSkuList(marketId, storeId, spuId));
}
@PostMapping("zhengzai/sku/del")
......
......@@ -73,7 +73,7 @@ public interface IGoblinZhengzaiMarketService {
* @param storeId 页数
* @return
*/
ResponseDto<List<GoblinMarketSpuListVo>> zhengzaiSpuList(String marketId, String storeId, int page);
List<GoblinMarketSpuListVo> zhengzaiSpuList(String marketId, String storeId, int page);
/**
* 获取活动内sku列表
......@@ -82,7 +82,7 @@ public interface IGoblinZhengzaiMarketService {
* @param storeId 页数
* @return
*/
ResponseDto<List<GoblinSelfZhengzaiSkuVo>> zhengzaiSkuList(String marketId, String storeId, String spuId);
List<GoblinSelfZhengzaiSkuVo> zhengzaiSkuList(String marketId, String storeId, String spuId);
/**
* 删除活动内sku
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.fasterxml.jackson.core.type.TypeReference;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.liquidnet.client.admin.zhengzai.goblin.service.IGoblinZhengzaiMarketService;
import com.liquidnet.client.admin.zhengzai.goblin.utils.GoblinMongoUtils;
import com.liquidnet.client.admin.zhengzai.goblin.utils.GoblinRedisUtils;
......@@ -301,7 +302,7 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
}
@Override
public ResponseDto<List<GoblinMarketSpuListVo>> zhengzaiSpuList(String marketId, String storeId, int page) {
public List<GoblinMarketSpuListVo> zhengzaiSpuList(String marketId, String storeId, int page) {
MultiValueMap<String, String> params = new LinkedMultiValueMap();
params.add("selfMarketId", marketId);
params.add("storeId", storeId);
......@@ -309,13 +310,13 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
MultiValueMap<String, String> headers = CollectionUtil.linkedMultiValueMapStringString();
headers.add("Accept", "application/json;charset=UTF-8");
String returnData = HttpUtil.get(goblinUrl + "/goblin/inner/config/spu?page=" + page + "&selfMarketId=" + marketId + "&storeId=" + storeId, params, headers);
ResponseDto<List<GoblinMarketSpuListVo>> rsp = JsonUtils.fromJson(returnData, new TypeReference<ResponseDto<List<GoblinMarketSpuListVo>>>() {
ResponseDto<PageInfo<GoblinMarketSpuListVo>> rsp = JsonUtils.fromJson(returnData, new TypeReference<ResponseDto<PageInfo<GoblinMarketSpuListVo>>>() {
});
return rsp;
return rsp.getData().getList();
}
@Override
public ResponseDto<List<GoblinSelfZhengzaiSkuVo>> zhengzaiSkuList(String marketId, String storeId, String spuId) {
public List<GoblinSelfZhengzaiSkuVo> zhengzaiSkuList(String marketId, String storeId, String spuId) {
MultiValueMap<String, String> params = new LinkedMultiValueMap();
params.add("selfMarketId", marketId);
params.add("storeId", storeId);
......@@ -325,7 +326,7 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
String returnData = HttpUtil.get(goblinUrl + "/goblin/inner/config/sku?selfMarketId=" + marketId + "&storeId=" + storeId + "&spuId=" + spuId, params, headers);
ResponseDto<List<GoblinSelfZhengzaiSkuVo>> rsp = JsonUtils.fromJson(returnData, new TypeReference<ResponseDto<List<GoblinSelfZhengzaiSkuVo>>>() {
});
return rsp;
return rsp.getData();
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment