release- 解决苹果支付的bug

release-2024-04-25
huangyw 2 months ago
parent 8f3a056a14
commit 3db5bece8e

@ -7,6 +7,7 @@ import com.luoo.user.dto.memberShip.MembershipCodeSearchDto;
import com.luoo.user.pojo.MembershipCode;
import com.luoo.user.service.MemberShipService;
import com.luoo.user.service.MembershipCodeService;
import com.luoo.user.vo.membership.VipSkuVO;
import controller.BaseController;
import io.swagger.annotations.*;
@ -135,4 +136,11 @@ public class MembershipController extends BaseController {
return Result.success(memberShipService.prepay(skuId));
}
@ApiOperation(value = "7.获取会员商品列表", notes = "仅限app用户调用")
@GetMapping("/sku/list")
@GlobalInterceptor(checkAppUserLogin = true)
public Result<List<VipSkuVO>> getVipSkuList() {
return Result.success(memberShipService.getVipSkuList());
}
}

@ -44,10 +44,10 @@ public class JPAEntityListener {
@PrePersist
public void setCreatedOn(JPABasePojo jpaBasePojo) {
log.info("Setting created on {}", jpaBasePojo);
jpaBasePojo.setCreateUser(getCurrentUser().getUserId());
jpaBasePojo.setUpdateUser(getCurrentUser().getUserId());
jpaBasePojo.setCreateUserName(getCurrentUser().getNickName());
jpaBasePojo.setUpdateUserName(getCurrentUser().getNickName());
jpaBasePojo.setCreateUser(getCurrentUser() != null ? getCurrentUser().getUserId() : "system");
jpaBasePojo.setUpdateUser(getCurrentUser() != null ? getCurrentUser().getUserId() : "system");
jpaBasePojo.setCreateUserName(getCurrentUser() != null ? getCurrentUser().getNickName() : "system");
jpaBasePojo.setUpdateUserName(getCurrentUser() != null ? getCurrentUser().getNickName() : "system");
jpaBasePojo.setCreateTime(LocalDateTime.now());
jpaBasePojo.setUpdateTime(LocalDateTime.now());
jpaBasePojo.setId(String.valueOf(idWorkerStatic.nextId()));
@ -57,8 +57,8 @@ public class JPAEntityListener {
@PreUpdate
public void setUpdatedOn(JPABasePojo jpaBasePojo) {
log.info("Setting updated on {}", jpaBasePojo);
jpaBasePojo.setUpdateUser(getCurrentUser().getUserId());
jpaBasePojo.setUpdateUserName(getCurrentUser().getNickName());
jpaBasePojo.setUpdateUser(getCurrentUser() != null ? getCurrentUser().getUserId() : "system");
jpaBasePojo.setUpdateUserName(getCurrentUser() != null ? getCurrentUser().getNickName() : "system");
jpaBasePojo.setUpdateTime(LocalDateTime.now());
if(jpaBasePojo.getDelFlag() == 2) {

@ -41,5 +41,5 @@ public class VipSku extends JPABasePojo {
private Integer amount;
@ApiModelProperty(value = "苹果产品id")
private String applyProductId;
private String appleProductId;
}

@ -88,7 +88,7 @@ public class MemberShipService {
.days(item.getDays())
.lifeFlag(item.getLifeFlag())
.amount(item.getAmount())
.applyProductId(item.getApplyProductId())
.appleProductId(item.getAppleProductId())
.build()).collect(Collectors.toList());
}
@ -223,7 +223,7 @@ public class MemberShipService {
QVipSku qVipSku = QVipSku.vipSku;
VipSku vipSku = jpaQueryFactory.selectFrom(qVipSku)
.where(qVipSku.applyProductId.eq(type))
.where(qVipSku.appleProductId.eq(type))
.fetchOne();
if (vipSku != null) {
@ -235,6 +235,7 @@ public class MemberShipService {
membershipOrder.setDuration(vipSku.getDays());
dealUserVipCalc(membershipOrder);
membershipOrderDao.save(membershipOrder);
}

@ -34,5 +34,5 @@ public class VipSkuVO implements Serializable {
private Integer amount;
@ApiModelProperty(value = "苹果产品id")
private String applyProductId;
private String appleProductId;
}

Loading…
Cancel
Save