Compare commits
4 Commits
1d50394776
...
2f62a01f02
Author | SHA1 | Date | |
---|---|---|---|
2f62a01f02 | |||
1b70fdd086 | |||
9465085136 | |||
6f5f3dd8b2 |
@ -7,6 +7,8 @@ import javax.validation.constraints.*;
|
|||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 会员新增/修改 Request VO")
|
@Schema(description = "管理后台 - 会员新增/修改 Request VO")
|
||||||
@Data
|
@Data
|
||||||
public class PaidMemberUserSaveReqVO {
|
public class PaidMemberUserSaveReqVO {
|
||||||
@ -71,4 +73,26 @@ public class PaidMemberUserSaveReqVO {
|
|||||||
@Schema(description = "用户分组编号", example = "27409")
|
@Schema(description = "用户分组编号", example = "27409")
|
||||||
private Long groupId;
|
private Long groupId;
|
||||||
|
|
||||||
|
@Schema(description = "是否支付", example = "0:未支付,1:已支付")
|
||||||
|
private Boolean paid;
|
||||||
|
|
||||||
|
@Schema(description = "支付时间", example = "2024-11-22 09:30:05")
|
||||||
|
private LocalDateTime payTime;
|
||||||
|
|
||||||
|
@Schema(description = "到期时间", example = "2024-11-22 09:30:05")
|
||||||
|
private LocalDateTime cardExpirationTime;
|
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "支付金额,单位为分", example = "10")
|
||||||
|
private Integer price;
|
||||||
|
|
||||||
|
@Schema(description = "期限天数", example = "10")
|
||||||
|
private String deadlineDay ;
|
||||||
|
|
||||||
|
@Schema(description = "支付方式", example = "免费领取")
|
||||||
|
private String payType;
|
||||||
|
|
||||||
|
@Schema(description = "支付渠道", example = "public-公众号,mini-小程序,h5-网页支付,wechatIos-微信Ios,wechatAndroid-微信Android,alipay-支付包,alipayApp-支付宝App,give-平台赠送,yue-余额支付")
|
||||||
|
private String payChannel;
|
||||||
|
|
||||||
}
|
}
|
@ -34,12 +34,12 @@ public class AppMemberCardTypeController {
|
|||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@Operation(summary = "获得会员卡类型列表")
|
@Operation(summary = "获得会员卡类型列表")
|
||||||
public CommonResult<List<AppMemberCardTypeRespVO>> list(@RequestParam(value = "name", required = false) String name) {
|
public CommonResult<List<AppMemberCardTypeRespVO>> list(@RequestParam(value = "name",required = false) String name) {
|
||||||
/** 查询状态为启用的会员卡类型列表 */
|
/** 查询状态为启用的会员卡类型列表 */
|
||||||
MemberUserDO memberUserDO = userService.getUser(getLoginUserId());
|
MemberUserDO memberUserDO = userService.getUser(getLoginUserId());
|
||||||
/** 根据用户查询是否有试用会员的类型列表 */
|
/** 根据用户查询是否有试用会员的类型列表 */
|
||||||
List<PaidMemberCardTypeDO> list = cardService.getCardTypeList(memberUserDO.getActivate());
|
List<PaidMemberCardTypeDO> list = cardService.getCardTypeList(memberUserDO.getActivate());
|
||||||
if(!name.isEmpty()){
|
if(name != null){
|
||||||
//根据用户查询是否有有效期会员的类型列表
|
//根据用户查询是否有有效期会员的类型列表
|
||||||
list = cardService.getCardTypeList2(memberUserDO.getActivate(),name);
|
list = cardService.getCardTypeList2(memberUserDO.getActivate(),name);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.member.dal.dataobject.user;
|
package cn.iocoder.yudao.module.member.dal.dataobject.user;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@ -107,4 +108,35 @@ public class PaidMemberUserDO extends TenantBaseDO {
|
|||||||
*/
|
*/
|
||||||
private Long groupId;
|
private Long groupId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否支付,0:未支付,1:已支付
|
||||||
|
* */
|
||||||
|
private Boolean paid;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 支付时间
|
||||||
|
* */
|
||||||
|
private LocalDateTime payTime;
|
||||||
|
/**
|
||||||
|
* 到期时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime cardExpirationTime;
|
||||||
|
/**
|
||||||
|
* 支付金额,单位为分
|
||||||
|
*/
|
||||||
|
private Integer price;
|
||||||
|
/**
|
||||||
|
* 期限天数
|
||||||
|
*/
|
||||||
|
private String deadlineDay ;
|
||||||
|
/**
|
||||||
|
* 支付方式
|
||||||
|
*/
|
||||||
|
private String payType;
|
||||||
|
/**
|
||||||
|
* 支付渠道
|
||||||
|
*/
|
||||||
|
private String payChannel;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -111,6 +111,7 @@ public class PaidMemberCardTypeServiceImpl implements PaidMemberCardTypeService
|
|||||||
public PaidMemberCardTypeDO selectByName(String cardName) {
|
public PaidMemberCardTypeDO selectByName(String cardName) {
|
||||||
PaidMemberCardTypeDO paidMemberCardTypeDO = cardMapper.selectOne(new LambdaQueryWrapperX<PaidMemberCardTypeDO>()
|
PaidMemberCardTypeDO paidMemberCardTypeDO = cardMapper.selectOne(new LambdaQueryWrapperX<PaidMemberCardTypeDO>()
|
||||||
.eqIfPresent(PaidMemberCardTypeDO::getName,cardName));
|
.eqIfPresent(PaidMemberCardTypeDO::getName,cardName));
|
||||||
|
validatecardExists(paidMemberCardTypeDO.getId());
|
||||||
return paidMemberCardTypeDO;
|
return paidMemberCardTypeDO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,8 +31,15 @@ public class AppPayChannelController {
|
|||||||
@GetMapping("/get-enable-code-list")
|
@GetMapping("/get-enable-code-list")
|
||||||
@Operation(summary = "获得指定应用的开启的支付渠道编码列表")
|
@Operation(summary = "获得指定应用的开启的支付渠道编码列表")
|
||||||
@Parameter(name = "appId", description = "应用编号", required = true, example = "1")
|
@Parameter(name = "appId", description = "应用编号", required = true, example = "1")
|
||||||
public CommonResult<Set<String>> getEnableChannelCodeList(@RequestParam("appId") Long appId) {
|
public CommonResult<Set<String>> getEnableChannelCodeList(@RequestParam("appId") Long appId, @RequestParam(value = "hideWalletPay", defaultValue = "false") Boolean hideWalletPay) {
|
||||||
List<PayChannelDO> channels = channelService.getEnableChannelList(appId);
|
List<PayChannelDO> channels = channelService.getEnableChannelList(appId);
|
||||||
|
if (hideWalletPay) {
|
||||||
|
for (int i = channels.size() - 1; i >= 0; i--) {
|
||||||
|
if ("wallet".equals(channels.get(i).getCode())) {
|
||||||
|
channels.remove(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return success(convertSet(channels, PayChannelDO::getCode));
|
return success(convertSet(channels, PayChannelDO::getCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user