From 1787fb6b794c85a9a6e36c39627e59413a3ef936 Mon Sep 17 00:00:00 2001 From: ovo Date: Sat, 16 Nov 2024 00:38:26 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=BE=E6=8C=BD-11-16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controler/MobilePackageController.java | 57 ++++++++++++ .../mobile/coverter/StatusConverter.java | 35 ++++++-- .../mobilePackage/MobilePackageQueryDto.java | 31 +++++++ .../modules/mobile/entity/MobileCallLogs.java | 2 +- .../modules/mobile/entity/MobilePackage.java | 64 +++++++++---- .../MobilePackage/PackageModelEnum.java | 34 +++++++ .../MobilePackage/PackageTypeEnum.java | 38 ++++++++ .../MobileDeviceMapstructMapper.java | 3 +- .../MobilePackageMapstructMapper.java | 13 +++ .../net/shapelight/modules/mobile/question.md | 25 ++++++ .../mobile/service/MobilePackageService.java | 5 ++ .../service/impl/MobileDeviceServiceImpl.java | 8 +- .../impl/MobilePackageServiceImpl.java | 37 ++++++++ .../vo/MobileCallLogs/MobileCallLogsVo.java | 59 ++++++++++++ .../vo/MobilePackage/MobilePackageVo.java | 90 +++++++++++++++++++ 15 files changed, 468 insertions(+), 33 deletions(-) create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/mobile/controler/MobilePackageController.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/mobile/dto/mobilePackage/MobilePackageQueryDto.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/mobile/enumData/MobilePackage/PackageModelEnum.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/mobile/enumData/MobilePackage/PackageTypeEnum.java rename shapelight-admin/src/main/java/net/shapelight/modules/mobile/mapstructMapper/{ => MobileDevice}/MobileDeviceMapstructMapper.java (83%) create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/mobile/mapstructMapper/MobilePackage/MobilePackageMapstructMapper.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/mobile/question.md create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/mobile/vo/MobileCallLogs/MobileCallLogsVo.java create mode 100644 shapelight-admin/src/main/java/net/shapelight/modules/mobile/vo/MobilePackage/MobilePackageVo.java diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/controler/MobilePackageController.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/controler/MobilePackageController.java new file mode 100644 index 0000000..9599886 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/controler/MobilePackageController.java @@ -0,0 +1,57 @@ +package net.shapelight.modules.mobile.controler; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import net.shapelight.common.utils.R; +import net.shapelight.modules.mobile.dto.mobileDevice.MobileDeviceQueryDto; +import net.shapelight.modules.mobile.dto.mobilePackage.MobilePackageQueryDto; +import net.shapelight.modules.mobile.service.MobilePackageService; +import net.shapelight.modules.sys.controller.AbstractController; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + + +@RestController +@RequestMapping("mobile/package/") +@RequiredArgsConstructor +@Api("公话套餐管理") +public class MobilePackageController extends AbstractController { + + + private final MobilePackageService mobilePackageService; + + @GetMapping("list") + @ApiOperation("设备列表") + @ApiImplicitParams({ + @ApiImplicitParam(name="page",value = "页码",paramType = "query",dataType = "Long",required = true), + @ApiImplicitParam(name="size",value = "每页页数",paramType = "query",dataType = "Long",required = true), + @ApiImplicitParam(name = "packageName", value = "套餐名称", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "packageType", value = "套餐类型", paramType = "query", dataType = "Integer"), + @ApiImplicitParam(name = "packageModel", value = "套餐模式", paramType = "query", dataType = "Integer"), + @ApiImplicitParam(name = "status", value = "套餐状态", paramType = "query", dataType = "Integer") + }) + public R list(@RequestParam(defaultValue = "1") Long page, + @RequestParam(defaultValue = "10") Long size, + @RequestParam(required = false) String packageName, + @RequestParam(required = false) Integer packageType, + @RequestParam(required = false) Integer packageModel, + @RequestParam(required = false) Integer status) { + + MobilePackageQueryDto mobilePackageQueryDto = new MobilePackageQueryDto(); + mobilePackageQueryDto.setCurrent(page); + mobilePackageQueryDto.setSize(size); + mobilePackageQueryDto.setPackageName(packageName); + mobilePackageQueryDto.setPackageType(packageType); + mobilePackageQueryDto.setPackageModel(packageModel); + mobilePackageQueryDto.setStatus(status); + + + return R.ok().put("data", mobilePackageService.list(mobilePackageQueryDto)); + } + +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/coverter/StatusConverter.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/coverter/StatusConverter.java index 5d4f269..8f87024 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/coverter/StatusConverter.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/coverter/StatusConverter.java @@ -7,6 +7,8 @@ import com.guwan.excel.metadata.GlobalConfiguration; import com.guwan.excel.metadata.data.WriteCellData; import com.guwan.excel.metadata.property.ExcelContentProperty; +import java.util.Optional; + public class StatusConverter implements Converter { @Override @@ -20,11 +22,34 @@ public class StatusConverter implements Converter { } @Override - public WriteCellData convertToExcelData(Object value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception { - if (value.equals(0)) { - return new WriteCellData<>("未启用"); // 返回 "未启用" - } else if (value.equals(1)) { - return new WriteCellData<>("启用"); // 返回 "启用" + public WriteCellData convertToExcelData(Object value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) + throws Exception { + + // 获取字段名或其他上下文信息 + String fieldName = contentProperty.getField().getName(); + + // 根据字段名或者类型来判断如何处理 0 和 1 + if ("status".equals(fieldName)) { + // 这里假设 "status" 字段的 0 代表 "未启用" 或 "启用" + if (value.equals(0)) { + return new WriteCellData<>("未启用"); + } else if (value.equals(1)) { + return new WriteCellData<>("启用"); + } + } else if ("type".equals(fieldName)) { + // 假设 "type" 字段的 0 代表 "普通用户",1 代表 "管理员" + if (value.equals(0)) { + return new WriteCellData<>("普通用户"); + } else if (value.equals(1)) { + return new WriteCellData<>("管理员"); + } + } else if ("visibility".equals(fieldName)) { + // 假设 "visibility" 字段的 0 代表 "不可见",1 代表 "可见" + if (value.equals(0)) { + return new WriteCellData<>("不可见"); + } else if (value.equals(1)) { + return new WriteCellData<>("可见"); + } } return new WriteCellData<>(value.toString()); // 默认返回数字字符串 } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/dto/mobilePackage/MobilePackageQueryDto.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/dto/mobilePackage/MobilePackageQueryDto.java new file mode 100644 index 0000000..1f8ebc4 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/dto/mobilePackage/MobilePackageQueryDto.java @@ -0,0 +1,31 @@ +package net.shapelight.modules.mobile.dto.mobilePackage; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import net.shapelight.common.base.BasePageDTO; +import org.springframework.web.bind.annotation.RequestParam; + +/** + * + */ +@Data +public class MobilePackageQueryDto extends BasePageDTO { + /** + * 套餐名称 + */ + String packageName; + /** + * 套餐类型 + */ + Integer packageType; + /** + * 套餐模式 + */ + Integer packageModel; + /** + * 套餐状态 + */ + Integer status; + +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobileCallLogs.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobileCallLogs.java index 529d3ee..1eef353 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobileCallLogs.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobileCallLogs.java @@ -27,7 +27,7 @@ public class MobileCallLogs implements Serializable { @ApiModelProperty("id") private Long id; /** - * 设备ID + * 设备ID (查询公话名称) */ @ApiModelProperty("设备ID") private Long deviceId; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobilePackage.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobilePackage.java index 8000c6f..37d208e 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobilePackage.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobilePackage.java @@ -1,5 +1,8 @@ package net.shapelight.modules.mobile.entity; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -13,7 +16,7 @@ import java.math.BigDecimal; import java.util.Date; /** -* +* * @TableName mobile_package */ @TableName("mobile_package") @@ -34,60 +37,76 @@ public class MobilePackage implements Serializable { @ApiModelProperty("套餐名称") private String packageName; /** - * 套餐类型 + * 套餐类型(视频/通话)(套餐包/临时包) */ @Size(max= 20,message="编码长度不能超过20") @ApiModelProperty("套餐类型") - private String packageType; + private Integer packageType; /** - * 套餐价格 + * 套餐描述 + */ + private String description; + /** + * 有效期 + */ + private Integer validityPeriod; + /** + * 套餐价格(套餐单价) */ @ApiModelProperty("套餐价格") private BigDecimal price; /** - * 通话时长 + * 消耗类型 + */ + private Integer consumptionType; + /** + * 通话时长(每月通话时长) */ @ApiModelProperty("通话时长") private Integer duration; /** - * 通话次数(临时包) + * 通话次数 */ @ApiModelProperty("通话次数(临时包)") private Integer callCount; /** - * 开始时间 + * 套餐上架时间 */ - @ApiModelProperty("开始时间") - private Date startTime; + @ApiModelProperty("套餐上架时间") + private Date launchTime; /** - * 结束时间 + * 套餐下架时间 */ - @ApiModelProperty("结束时间") - private Date endTime; + @ApiModelProperty("套餐下架时间") + private Date downTime; /** * 生效类型(0当月1下月) */ @ApiModelProperty("生效类型(0当月1下月)") private Integer effectType; /** - * 套餐模式 + * 套餐模式 (正式套餐 试用套餐) */ @ApiModelProperty("套餐模式") private Integer packageModel; /** - * 折扣 + * 是否参与折扣 + */ + private Integer isDiscount; + /** + * 折扣率 */ - @ApiModelProperty("折扣") - private BigDecimal discount; + @ApiModelProperty("折扣率") + private BigDecimal discountPercent; /** * 月底是否清零 */ @ApiModelProperty("月底是否清零") - private Integer isClear; + private Integer isMouthClear; /** - * 状态(0未启用1启用) + * 状态(0未上架1已上架) */ - @ApiModelProperty("状态(0未启用1启用)") + @ApiModelProperty("状态(0未上架1已上架)") private Integer status; /** * 创建时间 @@ -105,5 +124,12 @@ public class MobilePackage implements Serializable { @Size(max= 20,message="编码长度不能超过20") @ApiModelProperty("创建人") private String createBy; + /** + * 删除标记位 + */ + @ApiModelProperty(name = "删除标志位") + @TableField(fill = FieldFill.INSERT) + @TableLogic + private Integer deleteFlag; } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/enumData/MobilePackage/PackageModelEnum.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/enumData/MobilePackage/PackageModelEnum.java new file mode 100644 index 0000000..1d145d6 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/enumData/MobilePackage/PackageModelEnum.java @@ -0,0 +1,34 @@ +package net.shapelight.modules.mobile.enumData.MobilePackage; + +public enum PackageModelEnum { + REGULARPACKAGE(0, "正式套餐"), + DISCOUNTPACKAGE(1, "折扣套餐"), + TRIALPACKAGE(2, "试用套餐"); + + private final int code; // 套餐类型的数字编码 + private final String name; + + PackageModelEnum(int code, String name) { + this.code = code; + this.name = name; + } + + public int getCode() { + return code; + } + + public String getName() { + return name; + } + + public static PackageModelEnum fromCode(int code) { + + for (PackageModelEnum type : PackageModelEnum.values()) { + if (type.getCode() == code) { + return type; + } + } + throw new IllegalArgumentException("Unexpected value: " + code); + } + +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/enumData/MobilePackage/PackageTypeEnum.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/enumData/MobilePackage/PackageTypeEnum.java new file mode 100644 index 0000000..332b6cb --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/enumData/MobilePackage/PackageTypeEnum.java @@ -0,0 +1,38 @@ +package net.shapelight.modules.mobile.enumData.MobilePackage; + +public enum PackageTypeEnum { + + VOICEPACKAGE(0, "语音套餐包"), + VOICETEMP(1, "语音临时包"), + VIDEOPACKAGE(2, "视频套餐包"), + VIDEOTEMP(3, "视频临时包"); + + private final int code; // 套餐类型的数字编码 + private final String name; // 套餐类型的名称 + + // 构造函数 + PackageTypeEnum(int code, String name) { + this.code = code; + this.name = name; + } + + // 获取套餐类型的数字编码 + public int getCode() { + return code; + } + + // 获取套餐类型的名称 + public String getName() { + return name; + } + + // 根据数字编码获取对应的套餐类型 + public static PackageTypeEnum fromCode(int code) { + for (PackageTypeEnum type : PackageTypeEnum.values()) { + if (type.getCode() == code) { + return type; + } + } + throw new IllegalArgumentException("Unexpected value: " + code); + } +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/mapstructMapper/MobileDeviceMapstructMapper.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/mapstructMapper/MobileDevice/MobileDeviceMapstructMapper.java similarity index 83% rename from shapelight-admin/src/main/java/net/shapelight/modules/mobile/mapstructMapper/MobileDeviceMapstructMapper.java rename to shapelight-admin/src/main/java/net/shapelight/modules/mobile/mapstructMapper/MobileDevice/MobileDeviceMapstructMapper.java index 63417f5..f189485 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/mapstructMapper/MobileDeviceMapstructMapper.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/mapstructMapper/MobileDevice/MobileDeviceMapstructMapper.java @@ -1,4 +1,4 @@ -package net.shapelight.modules.mobile.mapstructMapper; +package net.shapelight.modules.mobile.mapstructMapper.MobileDevice; import net.shapelight.modules.mobile.dto.mobileDevice.MobileDeviceAddDto; import net.shapelight.modules.mobile.entity.MobileDevice; @@ -11,4 +11,5 @@ public interface MobileDeviceMapstructMapper { MobileDevice mobileDeviceAddDtoToMobileDevice(MobileDeviceAddDto mobileDeviceAddDto); + } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/mapstructMapper/MobilePackage/MobilePackageMapstructMapper.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/mapstructMapper/MobilePackage/MobilePackageMapstructMapper.java new file mode 100644 index 0000000..ee7a7d1 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/mapstructMapper/MobilePackage/MobilePackageMapstructMapper.java @@ -0,0 +1,13 @@ +package net.shapelight.modules.mobile.mapstructMapper.MobilePackage; + +import net.shapelight.modules.mobile.entity.MobilePackage; +import net.shapelight.modules.mobile.vo.MobilePackage.MobilePackageVo; +import org.mapstruct.Mapper; + +@Mapper(componentModel = "spring") +public interface MobilePackageMapstructMapper { + + + MobilePackageVo entityToVo(MobilePackage entity); + +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/question.md b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/question.md new file mode 100644 index 0000000..597c44a --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/question.md @@ -0,0 +1,25 @@ +套餐编号 +套餐名称 +套餐类型(视频/通话)(套餐包/临时包) +套餐描述(介绍) +套餐价格 +有效期(自购买后 /天 内有效) +消耗类型 (时长/次数) +通话时长 +通话次数 +套餐上架时间 +套餐下架时间 +生效类型(0当月1下月) + 套餐模式 (正式套餐 试用套餐) +是否打折 +折扣率 +月底是否清零 +状态(0未上架1已上架) + 创建时间 + 更新时间 + 创建人 + 删除标志位 + + + + diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/service/MobilePackageService.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/service/MobilePackageService.java index 41bd7dd..bdad160 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/service/MobilePackageService.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/service/MobilePackageService.java @@ -1,7 +1,11 @@ package net.shapelight.modules.mobile.service; import com.baomidou.mybatisplus.extension.service.IService; +import net.shapelight.modules.mobile.dto.mobilePackage.MobilePackageQueryDto; import net.shapelight.modules.mobile.entity.MobilePackage; +import net.shapelight.modules.mobile.vo.MobilePackage.MobilePackageVo; + +import java.util.List; /** * @author zhangbo @@ -10,4 +14,5 @@ import net.shapelight.modules.mobile.entity.MobilePackage; */ public interface MobilePackageService extends IService { + List list(MobilePackageQueryDto mobilePackageQueryDto); } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/service/impl/MobileDeviceServiceImpl.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/service/impl/MobileDeviceServiceImpl.java index f162d23..80fcd40 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/service/impl/MobileDeviceServiceImpl.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/service/impl/MobileDeviceServiceImpl.java @@ -2,25 +2,19 @@ package net.shapelight.modules.mobile.service.impl; import com.baomidou.mybatisplus.core.batch.MybatisBatch; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import lombok.RequiredArgsConstructor; -import net.shapelight.common.utils.PageUtils; -import net.shapelight.common.utils.Query; import net.shapelight.common.utils.SnowflakeIdWorker; import net.shapelight.modules.mobile.dto.mobileDevice.MobileDeviceAddDto; import net.shapelight.modules.mobile.dto.mobileDevice.MobileDeviceQueryDto; import net.shapelight.modules.mobile.entity.MobileDevice; -import net.shapelight.modules.mobile.mapstructMapper.MobileDeviceMapstructMapper; +import net.shapelight.modules.mobile.mapstructMapper.MobileDevice.MobileDeviceMapstructMapper; import net.shapelight.modules.mobile.service.MobileDeviceService; import net.shapelight.modules.mobile.mapper.MobileDeviceMapper; -import org.apache.ibatis.session.SqlSessionFactory; -import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import java.util.List; -import java.util.Map; import java.util.Objects; /** diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/service/impl/MobilePackageServiceImpl.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/service/impl/MobilePackageServiceImpl.java index c517f4b..c22a815 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/service/impl/MobilePackageServiceImpl.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/service/impl/MobilePackageServiceImpl.java @@ -1,20 +1,57 @@ package net.shapelight.modules.mobile.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import net.shapelight.common.utils.BeanUtils; +import net.shapelight.modules.mobile.dto.mobilePackage.MobilePackageQueryDto; import net.shapelight.modules.mobile.entity.MobilePackage; import net.shapelight.modules.mobile.service.MobilePackageService; import net.shapelight.modules.mobile.mapper.MobilePackageMapper; +import net.shapelight.modules.mobile.vo.MobilePackage.MobilePackageVo; import org.springframework.stereotype.Service; +import java.util.Collections; +import java.util.List; +import java.util.Objects; + /** * @author zhangbo * @description 针对表【mobile_package】的数据库操作Service实现 * @createDate 2024-11-14 09:50:19 */ @Service +@RequiredArgsConstructor public class MobilePackageServiceImpl extends ServiceImpl implements MobilePackageService{ + private final MobilePackageMapper mobilePackageMapper; + + + @Override + public List list(MobilePackageQueryDto mobilePackageQueryDto) { + + /* List mobilePackages = mobilePackageMapper.selectList(new LambdaQueryWrapper() + .like(Objects.nonNull(mobilePackageQueryDto.getPackageName()), + MobilePackage::getPackageName, mobilePackageQueryDto.getPackageName()) + .eq(Objects.nonNull(mobilePackageQueryDto.getPackageType()), + MobilePackage::getPackageType, mobilePackageQueryDto.getPackageType()) + .eq(Objects.nonNull(mobilePackageQueryDto.getPackageModel()), + MobilePackage::getPackageModel, mobilePackageQueryDto.getPackageModel()) + .eq(Objects.nonNull(mobilePackageQueryDto.getStatus()), + MobilePackage::getStatus, mobilePackageQueryDto.getStatus()));*/ + + return BeanUtils.toBean(mobilePackageMapper.selectList(new LambdaQueryWrapper() + .like(Objects.nonNull(mobilePackageQueryDto.getPackageName()), + MobilePackage::getPackageName, mobilePackageQueryDto.getPackageName()) + .eq(Objects.nonNull(mobilePackageQueryDto.getPackageType()), + MobilePackage::getPackageType, mobilePackageQueryDto.getPackageType()) + .eq(Objects.nonNull(mobilePackageQueryDto.getPackageModel()), + MobilePackage::getPackageModel, mobilePackageQueryDto.getPackageModel()) + .eq(Objects.nonNull(mobilePackageQueryDto.getStatus()), + MobilePackage::getStatus, mobilePackageQueryDto.getStatus())), MobilePackageVo.class); + + } } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/vo/MobileCallLogs/MobileCallLogsVo.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/vo/MobileCallLogs/MobileCallLogsVo.java new file mode 100644 index 0000000..2e5b5f1 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/vo/MobileCallLogs/MobileCallLogsVo.java @@ -0,0 +1,59 @@ +package net.shapelight.modules.mobile.vo.MobileCallLogs; + +import java.util.Date; + +public class MobileCallLogsVo { + /** + * 用户名称 + */ + private String personName; + /** + * 用户id + */ + private Long personId; + /** + * 公话名称 + */ + private String deviceName; + /** + * 通话日期 + */ + private Date callDate; + /** + * 接听人 + */ + private String relationName; + /** + * 通话类型(0语音1视频) + */ + private Integer callType; + /** + * 接通类型 是否接通(0否1是) + */ + private Integer isConnected; + /** + * 是否SOS + */ + private Integer isSos; + /** + * 接听操作状态 + */ + private String callOperationStatus; + /** + * 接听电话 + */ + private String phoneNumber; + /** + * 通话开始时间 + */ + private Date callStartTime; + /** + * 通话结束时间 + */ + private Date callEndTime; + /** + * 通话时长 + */ + private Integer callDuration; + +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/vo/MobilePackage/MobilePackageVo.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/vo/MobilePackage/MobilePackageVo.java new file mode 100644 index 0000000..da2de26 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/vo/MobilePackage/MobilePackageVo.java @@ -0,0 +1,90 @@ +package net.shapelight.modules.mobile.vo.MobilePackage; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + + +@Data +public class MobilePackageVo { + + /** + * 套餐ID + */ + private Long packageId; + /** + * 套餐名称 + */ + private String packageName; + /** + * 套餐类型(视频/通话)(套餐包/临时包) + */ + private String packageType; + /** + * 套餐描述 + */ + private String description; + /** + * 有效期 + */ + private Integer validityPeriod; + /** + * 套餐价格(套餐单价) + */ + private BigDecimal price; + /** + * 消耗类型 + */ + private Integer consumptionType; + /** + * 通话时长(每月通话时长) + */ + private Integer duration; + /** + * 通话次数 + */ + private Integer callCount; + /** + * 套餐上架时间 + */ + private Date launchTime; + /** + * 套餐下架时间 + */ + private Date downTime; + /** + * 生效类型(0当月1下月) + */ + private Integer effectType; + /** + * 套餐模式 (正式套餐 试用套餐) + */ + private Integer packageModel; + /** + * 是否参与折扣 + */ + private Integer isDiscount; + /** + * 折扣率 + */ + private BigDecimal discountPercent; + /** + * 月底是否清零 + */ + private Integer isMouthClear; + /** + * 状态(0未上架1已上架) + */ + private Integer status; +}