Commit 45b6b497 by giaogiao

完成捐款支付调用

parent ac81c85f
......@@ -33,8 +33,6 @@ public class WxPayController {
@PostMapping("/notify/donationOrder")
public String parseDonationOrderNotifyResult(@RequestBody String xmlData) throws WxPayException {
return donationRecordService.parseDonationOrderNotifyResult(xmlData);
}
@ApiOperation(value = "会员充值支付回调通知处理")
......
......@@ -41,10 +41,6 @@ public class VipRecordOpenParam extends BasePageOrderParam {
@ApiModelProperty("是否代替他人开通")
private Boolean isReplace;
// @NotBlank(message = "不能为空")
// @ApiModelProperty("替他人开通,接收人userId, ")
// private Long agentUserId;
@ApiModelProperty("捐款接收用户手机号,当isAgent=1为必填")
private String userPhone;
......
......@@ -35,6 +35,10 @@ import java.io.Serializable;
@Validated
public class AppSmsRegisterParam implements Serializable {
@NotBlank(message = "姓名")
@ApiModelProperty(value = "姓名", example = "何", required = true)
private String userName;
@NotBlank(message = "请输入手机区号")
@ApiModelProperty(value = "手机区号", example = "86", required = true)
private String phoneArea;
......@@ -51,6 +55,4 @@ public class AppSmsRegisterParam implements Serializable {
@NotBlank(message = "请输入openId")
private String openId;
// @ApiModelProperty("姓名")
// private String nickname;
}
......@@ -19,13 +19,13 @@ import lombok.experimental.Accessors;
@ApiModel(value = "AppUserInfoParam对象")
public class AppUserInfoParam extends BaseEntity {
@ApiModelProperty("用户名")
@ApiModelProperty("用户名")
private String username;
@ApiModelProperty("微信id")
private String wechatOpenId;
@ApiModelProperty("姓名")
@ApiModelProperty("微信昵称")
private String nickname;
@ApiModelProperty("证件号码")
......
......@@ -37,10 +37,19 @@ public interface DonationRecordService extends BaseService<DonationRecord> {
boolean saveDonationRecord(DonationRecord donationRecord) throws Exception;
// 回调
/**
* 回调
*/
String parseDonationOrderNotifyResult(String xmlData);
/**
* 我要捐款
*
* @param donationRecordAdd
* @return
* @throws Exception
*/
ApiResult<WxPayMpOrderResult> add(DonationRecordAdd donationRecordAdd) throws Exception;
/**
......
......@@ -118,13 +118,13 @@ public class AppUserApiServiceImpl implements AppUserApiService {
return appUserService.login(loginParam, language, true);
}
// 没注册则保存到数据库
// 没注册则保存到数据库
AppUser appUserByOpenId = appUserService.getOne(new QueryWrapper<AppUser>().lambda().eq(AppUser::getWechatOpenId, loginParam.getOpenId()));
appUserByOpenId.setPhoneArea(loginParam.getPhoneArea());
appUserByOpenId.setPhone(loginParam.getPhone());
boolean isDbOk = appUserService.updateById(appUserByOpenId);
appUserByOpenId.setUsername(loginParam.getUserName());
boolean isDbOk = appUserService.updateById(appUserByOpenId);
if (!isDbOk) {
return ApiResult.fail(ApiCode.SPRING_BOOT_PLUS_EXCEPTION, new LoginAppUserTokenVo());
}
......
......@@ -106,8 +106,6 @@ public class DonationRecordServiceImpl extends BaseServiceImpl<DonationRecordMap
super.updateById(donationRecord);
return WxPayNotifyResponse.successResp("成功");
// 根据自己业务场景需要构造返回对象
// return WxPayNotifyResponse.success("成功");
}
......
......@@ -17,7 +17,7 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "AppUserQueryVo对象")
@ApiModel(value = "AppUserQueryVo")
public class AppUserQueryVo implements Serializable {
@ApiModelProperty("用户名")
......@@ -26,7 +26,7 @@ public class AppUserQueryVo implements Serializable {
@ApiModelProperty("微信id")
private String wechatOpenId;
@ApiModelProperty("姓名")
@ApiModelProperty("微信昵称")
private String nickname;
@ApiModelProperty("证件号码")
......
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