|
调用代码:
Token token = new Token(accessToken);
YouzanCrmCustomerPointsIncrease youzanCrmCustomerPointsIncrease = new YouzanCrmCustomerPointsIncrease();
YouzanCrmCustomerPointsIncreaseParams youzanCrmCustomerPointsIncreaseParams = new YouzanCrmCustomerPointsIncreaseParams();
YouzanCrmCustomerPointsIncreaseParams.YouzanCrmCustomerPointsIncreaseParamsParams youzanCrmCustomerPointsIncreaseParamsParams = new YouzanCrmCustomerPointsIncreaseParams.YouzanCrmCustomerPointsIncreaseParamsParams();
youzanCrmCustomerPointsIncreaseParams.setParams(youzanCrmCustomerPointsIncreaseParamsParams);
String orderNo = pointsDeliveryDTO.getOrderNo();
String pointsMonth = InsureStringUtil.getValueStr(pointsDeliveryDTO.getPointsMonth());
String reason = orderNo.concat(":").concat(pointsMonth).concat(":").concat(pointsDeliveryDTO.getMobile());
youzanCrmCustomerPointsIncreaseParamsParams.setReason("出单派发:" + reason);
youzanCrmCustomerPointsIncreaseParamsParams.setBizValue(reason);
//youzanCrmCustomerPointsIncreaseParamsParams.setBizToken();
youzanCrmCustomerPointsIncreaseParamsParams.setSourceKdtId(shopId);
youzanCrmCustomerPointsIncreaseParamsParams.setCheckCustomer(Boolean.FALSE);
youzanCrmCustomerPointsIncreaseParamsParams.setPoints(pointsDeliveryDTO.getDeliveryPoints());
youzanCrmCustomerPointsIncreaseParamsParams.setIsDoExtPoint(Boolean.FALSE);
YouzanCrmCustomerPointsIncreaseParams.YouzanCrmCustomerPointsIncreaseParamsUser youzanCrmCustomerPointsIncreaseParamsUser
= new YouzanCrmCustomerPointsIncreaseParams.YouzanCrmCustomerPointsIncreaseParamsUser();
youzanCrmCustomerPointsIncreaseParamsParams.setUser(youzanCrmCustomerPointsIncreaseParamsUser);
youzanCrmCustomerPointsIncreaseParamsUser.setAccountType(2);
youzanCrmCustomerPointsIncreaseParamsUser.setAccountId(pointsDeliveryDTO.getMobile());
youzanCrmCustomerPointsIncrease.setAPIParams(youzanCrmCustomerPointsIncreaseParams);
log.info("[有赞API] 新增积分 入参={}", JSONObject.toJSONString(youzanCrmCustomerPointsIncreaseParams));
YouzanCrmCustomerPointsIncreaseResult result = youZanClient.invoke(youzanCrmCustomerPointsIncrease, token, YouzanCrmCustomerPointsIncreaseResult.class);
log.info("[有赞API] 新增积分 响应={}", JSONObject.toJSONString(result));
|
|
|
|
|
|
|