Commit 736977cf authored by 黎博's avatar 黎博

新增两个接口

parent 47d1ccd4
......@@ -304,6 +304,56 @@ public class OrderController {
return response;
}
/**
* 9.3 查询售后概要
* @param queryExts canCancel 申请单是否可取消售后, canConfirm 申请单是否可以确认, canSendSku 申请单是否可以填写发运信息
*/
@PostMapping("/api/afterSaleNew/getAfsOutline")
public AfsOutlineResponse getAfsOutline(String token, String param, String queryExts) {
AfsOutlineRequest.AfsOutlineParam afsOutlineParam = JSON.parseObject(param, AfsOutlineRequest.AfsOutlineParam.class);
AfsOutlineResponse response = new AfsOutlineResponse();
response.setSuccess(true);
response.setResultMessage("操作成功");
response.setResultCode("0000");
AfsOutlineResponse.AfsOutlinePage afsOutlinePage = new AfsOutlineResponse.AfsOutlinePage();
afsOutlinePage.setPageNo(1);
afsOutlinePage.setPageNum(1L);
afsOutlinePage.setPageSize(20);
afsOutlinePage.setTotal(1L);
List<AfsOutlineResponse.ApplyInfo> applyInfoList = new ArrayList<>();
AfsOutlineResponse.ApplyInfo applyInfo = new AfsOutlineResponse.ApplyInfo();
applyInfo.setOrderId(afsOutlineParam.getOrderId());
applyInfo.setOriginalOrderId(afsOutlineParam.getOrderId());
applyInfo.setThirdApplyId(RandomStringUtils.randomNumeric(5));
applyInfo.setIsOffline(false);
applyInfo.setNewPickWareType(4);
applyInfo.setPin("北京量化派VOP");
applyInfo.setApplyTime(DateUtils.convertDate(DateUtils.getBeforeDay(new Date(), 5), "yyyy-mm-dd hh:MM:ss"));
applyInfo.setCompleteTime(DateUtils.convertDate(DateUtils.getBeforeDay(new Date(), 1), "yyyy-mm-dd hh:MM:ss"));
applyInfo.setApplyStep(40); //10申请中待审核;20审核完成待收货;30收货完成待处理;40处理完成(如需退款则等待退款);50待用户确认,60用户确认完成,70取消
applyInfo.setApplyNum(1); // 原始申请数量
applyInfo.setApplicationNum(0); // 申请中数量
applyInfo.setWareServiceNum(0);
applyInfo.setConfirmNum(0);
applyInfo.setWareCompleteNum(1);
applyInfo.setWareCancelNum(0);
applyInfo.setRefundNum(1);
applyInfo.setShouldRefundAmount(new BigDecimal("0"));
applyInfo.setNakedPriceAmount(new BigDecimal("100"));
applyInfo.setRealRefundAmount(new BigDecimal("100"));
applyInfo.setIsComplete(1);
applyInfo.setCanConfirm(true);
applyInfoList.add(applyInfo);
afsOutlinePage.setData(applyInfoList);
response.setResult(afsOutlinePage);
return response;
}
/**
* 11.1 查询推送消息
*
......
......@@ -11,6 +11,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -52,6 +53,31 @@ public class ProductController {
return response;
}
/**
* 4.7 查询商品区域购买限制
*/
@PostMapping("/api/product/checkAreaLimit")
public JSONObject checkAreaLimit(String skuIds, String province, String city, String county, String town) {
JSONObject response = new JSONObject();
response.put("success", true);
response.put("resultMessage", "");
response.put("resultCode", "0000");
JSONArray result = new JSONArray();
if (!StringUtils.isEmpty(skuIds)) {
String[] skuIdList = skuIds.split(",");
for (String skuId: skuIdList) {
JSONObject sku = new JSONObject();
sku.put("skuId", skuId);
sku.put("isAreaRestrict", false);
result.add(sku);
}
}
response.put("result", result);
return response;
}
/**
* 5.1 查询商品售卖价
......
package cn.qg.holmes.entity.mock.keystone.jdbuy;
import lombok.Data;
/**
* 9.3 查询售后概要
*/
@Data
public class AfsOutlineRequest {
private String token;
private AfsOutlineParam param;
private String queryExts;
@Data
public static class AfsOutlineParam{
private Long orderId; //订单号,即京东子订单号
private String thirdApplyId; //第三方申请单号。thirdApplyId值为申请单编号时,表示特定申请单;thirdApplyId=1时表示选中所有申请单
}
}
package cn.qg.holmes.entity.mock.keystone.jdbuy;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* 9.3 查询售后概要
*/
@Data
public class AfsOutlineResponse extends JdBaseResponse{
private AfsOutlinePage result;
@Data
public static class AfsOutlinePage{
private List<ApplyInfo> data; //申请单概要信息集合
private Long pageNum; //总页数
private Long total; //总行数
private Integer pageNo; //当前页数
private Integer pageSize; //分页行数
}
@Data
public static class ApplyInfo{
private Long orderId; //订单号,京东子订单号
private Long originalOrderId; //原始单号。售后换新单对应的原始订单编号。
private String thirdApplyId; //第三方申请单号。子单下不可重复
private Boolean isOffline; //申请途径,1人工发起,2在线发起
private Integer newPickWareType; //当前取件方式。即客服审核完成后的货物与返回京东方式。如果该值为空,代表取件方式仍在确认中搜索,请等待第三方申请单状态更新后再次查询。 4上门取件,7客户送货,40客户发货。
private String pin; //京东PIN
private String applyTime; //申请时间
private String completeTime; //完成时间
private Integer applyStep; //售后环节。10申请中待审核;20审核完成待收货;30收货完成待处理;40处理完成(如需退款则等待退款);50待用户确认,60用户确认完成,70取消
private String customerName; //客户名称
private Integer applyNum; //原始申请数量
private Integer applicationNum; //申请中数量
private Integer wareServiceNum; //服务中数量
private Integer confirmNum; //待确认数量
private Integer wareCompleteNum; //完成数量
private Integer wareCancelNum; //驳回或取消数量
private Integer refundNum; //退货数量
private BigDecimal shouldRefundAmount; //退货商品金额
private BigDecimal nakedPriceAmount; //未税价金额
private BigDecimal realRefundAmount; //退款金额
private Integer isComplete; //是否完成
private Boolean canCancel; //是否可以取消
private Boolean canSendSku; //是否可以填写发运信息
private Boolean canConfirm; //是否可以确认
}
}
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