Compare commits
No commits in common. "2c875571ee6a0553d9f4e0d171a91eb373d510c2" and "a6a1ab163d2a81fc4c8bf6768da9bfe0a782be63" have entirely different histories.
2c875571ee
...
a6a1ab163d
@ -11,11 +11,7 @@
|
|||||||
<el-input v-model="formData.name" placeholder="请输入会员卡名称" />
|
<el-input v-model="formData.name" placeholder="请输入会员卡名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="会员有效期(天)" prop="vid">
|
<el-form-item label="会员有效期(天)" prop="vid">
|
||||||
<el-input
|
<el-input v-model="formData.vid" placeholder="请输入会员有效期(天)" />
|
||||||
v-model="formData.vid"
|
|
||||||
placeholder="请输入会员有效期(天)"
|
|
||||||
:disabled="formData.id !== undefined && formData.name === '永久'"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="会员卡原价" prop="originalPrice">
|
<el-form-item label="会员卡原价" prop="originalPrice">
|
||||||
<el-input v-model="formData.originalPrice" placeholder="请输入会员卡原价" />
|
<el-input v-model="formData.originalPrice" placeholder="请输入会员卡原价" />
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.member.controller.app.type;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
||||||
import cn.iocoder.yudao.module.member.controller.app.type.vo.AppMemberCardTypeRespVO;
|
|
||||||
import cn.iocoder.yudao.module.member.convert.type.MemberCardTypeConvert;
|
|
||||||
import cn.iocoder.yudao.module.member.dal.dataobject.membercardtype.PaidMemberCardTypeDO;
|
|
||||||
import cn.iocoder.yudao.module.member.service.membercardtype.PaidMemberCardTypeService;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
||||||
|
|
||||||
@Tag(name = "用户 App - 会员卡类型")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/member/card/type")
|
|
||||||
@Validated
|
|
||||||
public class AppMemberCardTypeController {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private PaidMemberCardTypeService cardService;
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/list")
|
|
||||||
@Operation(summary = "获得会员卡类型列表")
|
|
||||||
public CommonResult<List<AppMemberCardTypeRespVO>> list() {
|
|
||||||
/** 查询状态为启用的会员卡类型列表*/
|
|
||||||
List<PaidMemberCardTypeDO> list = cardService.getCardTypeList(CommonStatusEnum.DISABLE.getStatus());
|
|
||||||
return success(MemberCardTypeConvert.INSTANCE.convertList(list));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.member.controller.app.type.vo;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
|
||||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
@Schema(description = "用户 App - 会员卡类型 Response VO")
|
|
||||||
@Data
|
|
||||||
public class AppMemberCardTypeRespVO {
|
|
||||||
@Schema(description = "会员卡名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@Schema(description = "会员有效期(天)", requiredMode = Schema.RequiredMode.REQUIRED, example = "13455")
|
|
||||||
private String vid;
|
|
||||||
|
|
||||||
@Schema(description = "会员卡原价", requiredMode = Schema.RequiredMode.REQUIRED, example = "32259")
|
|
||||||
private BigDecimal originalPrice;
|
|
||||||
|
|
||||||
@Schema(description = "会员卡优惠价", example = "12301")
|
|
||||||
private BigDecimal specialPrice;
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.member.convert.type;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.member.controller.app.type.vo.AppMemberCardTypeRespVO;
|
|
||||||
import cn.iocoder.yudao.module.member.dal.dataobject.membercardtype.PaidMemberCardTypeDO;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface MemberCardTypeConvert {
|
|
||||||
|
|
||||||
MemberCardTypeConvert INSTANCE = Mappers.getMapper(MemberCardTypeConvert.class);
|
|
||||||
|
|
||||||
List<AppMemberCardTypeRespVO> convertList(List<PaidMemberCardTypeDO> list);
|
|
||||||
}
|
|
@ -7,8 +7,6 @@ import cn.iocoder.yudao.module.member.controller.admin.membercardtype.vo.PaidMem
|
|||||||
import cn.iocoder.yudao.module.member.dal.dataobject.membercardtype.PaidMemberCardTypeDO;
|
import cn.iocoder.yudao.module.member.dal.dataobject.membercardtype.PaidMemberCardTypeDO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员卡类型 Mapper
|
* 会员卡类型 Mapper
|
||||||
*
|
*
|
||||||
@ -28,7 +26,4 @@ public interface PaidMemberCardTypeMapper extends BaseMapperX<PaidMemberCardType
|
|||||||
.orderByDesc(PaidMemberCardTypeDO::getId));
|
.orderByDesc(PaidMemberCardTypeDO::getId));
|
||||||
}
|
}
|
||||||
|
|
||||||
default List<PaidMemberCardTypeDO> selectListByStatus(Integer status){
|
|
||||||
return selectList(PaidMemberCardTypeDO::getStatus, status);
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -6,7 +6,6 @@ import cn.iocoder.yudao.module.member.controller.admin.membercardtype.vo.PaidMem
|
|||||||
import cn.iocoder.yudao.module.member.dal.dataobject.membercardtype.PaidMemberCardTypeDO;
|
import cn.iocoder.yudao.module.member.dal.dataobject.membercardtype.PaidMemberCardTypeDO;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员卡类型 Service 接口
|
* 会员卡类型 Service 接口
|
||||||
@ -53,6 +52,4 @@ public interface PaidMemberCardTypeService {
|
|||||||
*/
|
*/
|
||||||
PageResult<PaidMemberCardTypeDO> getcardPage(PaidMemberCardTypePageReqVO pageReqVO);
|
PageResult<PaidMemberCardTypeDO> getcardPage(PaidMemberCardTypePageReqVO pageReqVO);
|
||||||
|
|
||||||
List<PaidMemberCardTypeDO> getCardTypeList (Integer status);
|
|
||||||
|
|
||||||
}
|
}
|
@ -11,8 +11,6 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.CARD_NOT_EXISTS;
|
import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.CARD_NOT_EXISTS;
|
||||||
|
|
||||||
@ -70,11 +68,4 @@ public class PaidMemberCardTypeServiceImpl implements PaidMemberCardTypeService
|
|||||||
return cardMapper.selectPage(pageReqVO);
|
return cardMapper.selectPage(pageReqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<PaidMemberCardTypeDO> getCardTypeList(Integer status) {
|
|
||||||
List<PaidMemberCardTypeDO> list = cardMapper.selectListByStatus(status);
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user