@@ -14,7 +14,7 @@ import javax.validation.constraints.NotNull; | |||
@Accessors(chain = true) | |||
public class WxGetUserPointsDto { | |||
private Integer tenantId; | |||
private String tenantCode; | |||
private String unionId; | |||
@@ -14,7 +14,7 @@ import javax.validation.constraints.NotNull; | |||
@Accessors(chain = true) | |||
public class WxSubUserPointsDto { | |||
private Integer tenantId; | |||
private String tenantCode; | |||
private String unionId; | |||
@@ -12,8 +12,8 @@ import javax.validation.constraints.NotNull; | |||
@Data | |||
public class WxGetUserPointsQuery { | |||
@NotNull(message = "tenantId can not be null") | |||
private Integer tenantId; | |||
@NotNull(message = "tenantCode can not be null") | |||
private String tenantCode; | |||
@NotNull(message = "unionId can not be null") | |||
private String unionId; |
@@ -12,8 +12,8 @@ import javax.validation.constraints.NotNull; | |||
@Data | |||
public class WxSubUserPointsRequest { | |||
@NotNull(message = "tenantId can not be null") | |||
private Integer tenantId; | |||
@NotNull(message = "tenantCode can not be null") | |||
private String tenantCode; | |||
@NotNull(message = "unionId can not be null") | |||
private String unionId; |
@@ -59,7 +59,7 @@ public class WxServiceImpl implements IWxService { | |||
public JsonResult getUserPoints(WxGetUserPointsQuery wxGetUserPointsQuery){ | |||
//todo: 第三方查询用户积分接口 | |||
WxGetUserPointsDto wxGetUserPointsDto = new WxGetUserPointsDto() | |||
.setTenantId(wxGetUserPointsQuery.getTenantId()) | |||
.setTenantCode(wxGetUserPointsQuery.getTenantCode()) | |||
.setUnionId(wxGetUserPointsQuery.getUnionId()) | |||
.setPoints(9000); | |||
return JsonResult.success(wxGetUserPointsDto); | |||
@@ -69,7 +69,7 @@ public class WxServiceImpl implements IWxService { | |||
public JsonResult subUserPoints(WxSubUserPointsRequest wxSubUserPointsRequest){ | |||
//todo: 第三方消减用户积分接口 | |||
WxSubUserPointsDto wxSubUserPointsDto = new WxSubUserPointsDto() | |||
.setTenantId(wxSubUserPointsRequest.getTenantId()) | |||
.setTenantCode(wxSubUserPointsRequest.getTenantCode()) | |||
.setUnionId(wxSubUserPointsRequest.getUnionId()) | |||
.setPoints(wxSubUserPointsRequest.getPoints()) | |||
.setOptResult(true); |