mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-19 18:45:03 +08:00
update 支付宝小程序
This commit is contained in:
@@ -249,4 +249,26 @@ public class PersonPileController extends BaseController {
|
||||
/**
|
||||
* 个人桩启动充电
|
||||
*/
|
||||
|
||||
/**
|
||||
* 取消预约
|
||||
*/
|
||||
public RestApiResponse<?> canal(HttpServletRequest request, @RequestBody QueryPersonPileDTO dto) {
|
||||
logger.info("取消预约params:{}", JSON.toJSONString(dto));
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String memberId = getMemberIdByAuthorization(request);
|
||||
dto.setMemberId(memberId);
|
||||
pileService.canalReserved(dto);
|
||||
response = new RestApiResponse<>();
|
||||
} catch (BusinessException e) {
|
||||
logger.error("取消预约error", e);
|
||||
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||
} catch (Exception e) {
|
||||
logger.error("取消预约error", e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("取消预约result:{}", response);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,9 +247,10 @@ public class MemberService {
|
||||
String decrypt = Factory.Util.AES().decrypt(dto.getMobileNumberCiphertext());
|
||||
String mobileNumber = JSON.parseObject(decrypt).getString("mobile");
|
||||
|
||||
// 获取buyer_id
|
||||
|
||||
// 根据appid查询merchantId
|
||||
String firstLevelMerchantId = pileMerchantInfoService.getFirstLevelMerchantIdByWxAppId(dto.getAppId());
|
||||
firstLevelMerchantId = "1";
|
||||
String firstLevelMerchantId = pileMerchantInfoService.getFirstLevelMerchantIdByAliAppId(dto.getAppId());
|
||||
|
||||
// 查询手机号码是否注册过
|
||||
MemberRegisterAndLoginDTO loginDTO = MemberRegisterAndLoginDTO.builder()
|
||||
|
||||
@@ -555,4 +555,17 @@ public class PileService {
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询充电桩预约记录
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 取消预约充电
|
||||
* @param dto
|
||||
*/
|
||||
public void canalReserved(QueryPersonPileDTO dto) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,9 +5,11 @@ import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||
import com.jsowell.adapay.dto.*;
|
||||
import com.jsowell.adapay.service.AdapayService;
|
||||
import com.jsowell.adapay.vo.AdapayAccountBalanceVO;
|
||||
import com.jsowell.common.annotation.Log;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.core.page.PageResponse;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
@@ -183,6 +185,7 @@ public class AdapayMemberController extends BaseController {
|
||||
* http://localhost:8080/adapay/member/drawCash
|
||||
*/
|
||||
@PostMapping("/drawCash")
|
||||
@Log(title = "汇付余额提现到银行卡", businessType = BusinessType.UPDATE)
|
||||
public AjaxResult drawCash(@RequestBody WithdrawDTO dto) {
|
||||
AjaxResult result;
|
||||
try {
|
||||
|
||||
@@ -107,7 +107,6 @@ public class AdapayService {
|
||||
if (memberBasicInfo == null) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_GET_OPEN_ID_BY_CODE_ERROR);
|
||||
}
|
||||
String openId = memberBasicInfo.getOpenId();
|
||||
|
||||
// 支付场景
|
||||
String type = dto.getType();
|
||||
@@ -139,7 +138,7 @@ public class AdapayService {
|
||||
createAdaPaymentParam.setDescription(JSON.toJSONString(map));
|
||||
// 异步通知地址,url为http/https路径,服务器POST回调,URL 上请勿附带参数
|
||||
createAdaPaymentParam.setNotify_url(ADAPAY_CALLBACK_URL);
|
||||
createAdaPaymentParam.setExpend(JSON.toJSONString(ImmutableMap.of("open_id", openId)));
|
||||
createAdaPaymentParam.setExpend(JSON.toJSONString(ImmutableMap.of("open_id", memberBasicInfo.getOpenId())));
|
||||
|
||||
// 延时分账
|
||||
if (StringUtils.isNotBlank(payMode)) {
|
||||
@@ -197,7 +196,6 @@ public class AdapayService {
|
||||
if (memberBasicInfo == null) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_GET_OPEN_ID_BY_CODE_ERROR);
|
||||
}
|
||||
String openId = memberBasicInfo.getOpenId();
|
||||
|
||||
// 支付场景
|
||||
String type = dto.getType();
|
||||
@@ -230,7 +228,7 @@ public class AdapayService {
|
||||
createAdaPaymentParam.setNotify_url(ADAPAY_CALLBACK_URL);
|
||||
|
||||
// alipay_lite参数 buyer_id String(100) Y 买家的支付宝用户 id
|
||||
createAdaPaymentParam.setExpend(JSON.toJSONString(ImmutableMap.of("buyer_id", openId)));
|
||||
createAdaPaymentParam.setExpend(JSON.toJSONString(ImmutableMap.of("buyer_id", memberBasicInfo.getBuyerId())));
|
||||
|
||||
// 延时分账
|
||||
if (StringUtils.isNotBlank(payMode)) {
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.alipay.api.AlipayConfig;
|
||||
import com.alipay.api.DefaultAlipayClient;
|
||||
import com.alipay.api.internal.util.AlipayEncrypt;
|
||||
import com.alipay.api.request.AlipaySystemOauthTokenRequest;
|
||||
import com.alipay.easysdk.base.oauth.Client;
|
||||
import com.alipay.easysdk.base.oauth.models.AlipaySystemOauthTokenResponse;
|
||||
import com.alipay.easysdk.factory.Factory;
|
||||
import com.jsowell.alipay.config.AliPayConfig;
|
||||
@@ -43,7 +44,6 @@ public class AliAppletRemoteService {
|
||||
|
||||
String accessToken = token.getAccessToken();
|
||||
|
||||
// Factory.Util.AES().decrypt();
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,11 @@ public class MemberBasicInfo extends BaseEntity {
|
||||
*/
|
||||
private String openId;
|
||||
|
||||
/**
|
||||
* 支付宝买家user_id
|
||||
*/
|
||||
private String buyerId;
|
||||
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
|
||||
@@ -34,4 +34,9 @@ public class MemberRegisterAndLoginDTO extends BaseDTO{
|
||||
* 微信用户openId
|
||||
*/
|
||||
private String openId;
|
||||
|
||||
/**
|
||||
* 支付宝buyer_id
|
||||
*/
|
||||
private String buyerId;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<result property="id" column="id" />
|
||||
<result property="memberId" column="member_id"/>
|
||||
<result property="openId" column="open_id"/>
|
||||
<result property="buyerId" column="buyer_id"/>
|
||||
<result property="licensePlateNumber" column="license_plate_number"/>
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="logicCard" column="logic_card"/>
|
||||
@@ -32,7 +33,8 @@
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated PileBillingTemplate-->
|
||||
id, member_id, open_id, license_plate_number, nick_name,logic_card, physics_card, status, avatar_url, mobile_number, merchant_id, remark,
|
||||
id, member_id, open_id, buyer_id, license_plate_number, nick_name,logic_card, physics_card, status, avatar_url,
|
||||
mobile_number, merchant_id, remark,
|
||||
create_time, create_by, update_time, update_by, del_flag
|
||||
</sql>
|
||||
|
||||
@@ -59,6 +61,7 @@
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="memberId != null">member_id,</if>
|
||||
<if test="openId != null">open_id,</if>
|
||||
<if test="buyerId != null">buyer_id,</if>
|
||||
<if test="licensePlateNumber != null">license_plate_number,</if>
|
||||
<if test="nickName != null">nick_name,</if>
|
||||
<if test="logicCard != null">logic_card,</if>
|
||||
@@ -76,6 +79,7 @@
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="memberId != null">#{memberId},</if>
|
||||
<if test="openId != null">#{openId},</if>
|
||||
<if test="buyerId != null">#{buyerId},</if>
|
||||
<if test="licensePlateNumber != null">#{licensePlateNumber},</if>
|
||||
<if test="nickName != null">#{nickName},</if>
|
||||
<if test="logicCard != null">#{logicCard},</if>
|
||||
@@ -97,6 +101,7 @@
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="memberId != null">member_id = #{memberId},</if>
|
||||
<if test="openId != null">open_id = #{openId},</if>
|
||||
<if test="buyerId != null">buyer_id = #{buyerId},</if>
|
||||
<if test="licensePlateNumber != null">license_plate_number = #{licensePlateNumber},</if>
|
||||
<if test="nickName != null">nick_name = #{nickName},</if>
|
||||
<if test="logicCard != null">logic_card = #{logicCard},</if>
|
||||
|
||||
Reference in New Issue
Block a user