refactor(shop): 简化店铺详情接口返回结构

移除店铺详情中的冗余字段(封面图、柜机类型、运行模式等),
优化柜机详情API文档注释

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
dzq 2026-01-09 11:19:59 +08:00
parent 7f975aac29
commit 81e98a4516
3 changed files with 2 additions and 26 deletions

View File

@ -49,10 +49,10 @@ public class CabinetDetailDTO {
@ApiModelProperty("密码") @ApiModelProperty("密码")
private String password; private String password;
@ApiModelProperty("使用状态(0-空闲 1-占用 2-维护 3-禁用)") @ApiModelProperty("使用状态(1空闲 2已占用)")
private Integer usageStatus; private Integer usageStatus;
@ApiModelProperty("子类型0-普通 1-冷藏 2-加热") @ApiModelProperty("口类型1小格 2中格 3大格 4超大格")
private Integer cellType; private Integer cellType;
@ApiModelProperty("备注") @ApiModelProperty("备注")

View File

@ -139,22 +139,16 @@ public class ShopApplicationService {
shopDetailDTO.setBelongType(shop.getBelongType()); shopDetailDTO.setBelongType(shop.getBelongType());
shopDetailDTO.setMode(shop.getMode()); shopDetailDTO.setMode(shop.getMode());
shopDetailDTO.setBalanceEnable(shop.getBalanceEnable()); shopDetailDTO.setBalanceEnable(shop.getBalanceEnable());
shopDetailDTO.setCoverImg(shop.getCoverImg());
List<ShopDetailDTO.CabinetInfoDTO> cabinetInfoList = new ArrayList<>(); List<ShopDetailDTO.CabinetInfoDTO> cabinetInfoList = new ArrayList<>();
for (SmartCabinetEntity cabinet : cabinets) { for (SmartCabinetEntity cabinet : cabinets) {
ShopDetailDTO.CabinetInfoDTO cabinetInfo = new ShopDetailDTO.CabinetInfoDTO(); ShopDetailDTO.CabinetInfoDTO cabinetInfo = new ShopDetailDTO.CabinetInfoDTO();
cabinetInfo.setCabinetId(cabinet.getCabinetId()); cabinetInfo.setCabinetId(cabinet.getCabinetId());
cabinetInfo.setCabinetName(cabinet.getCabinetName()); cabinetInfo.setCabinetName(cabinet.getCabinetName());
cabinetInfo.setCabinetType(cabinet.getCabinetType());
cabinetInfo.setMainCabinet(cabinet.getMainCabinet()); cabinetInfo.setMainCabinet(cabinet.getMainCabinet());
cabinetInfo.setMode(cabinet.getMode());
cabinetInfo.setBalanceEnable(cabinet.getBalanceEnable());
cabinetInfo.setBelongType(cabinet.getBelongType());
cabinetInfo.setMqttServerId(cabinet.getMqttServerId()); cabinetInfo.setMqttServerId(cabinet.getMqttServerId());
cabinetInfo.setTemplateNo(cabinet.getTemplateNo()); cabinetInfo.setTemplateNo(cabinet.getTemplateNo());
cabinetInfo.setLockControlNo(cabinet.getLockControlNo()); cabinetInfo.setLockControlNo(cabinet.getLockControlNo());
cabinetInfo.setLocation(cabinet.getLocation());
cabinetInfo.setReturnDeadline(cabinet.getReturnDeadline()); cabinetInfo.setReturnDeadline(cabinet.getReturnDeadline());
cabinetInfoList.add(cabinetInfo); cabinetInfoList.add(cabinetInfo);
} }

View File

@ -26,9 +26,6 @@ public class ShopDetailDTO {
@ApiModelProperty("借呗支付1-正常使用 0-禁止使用)") @ApiModelProperty("借呗支付1-正常使用 0-禁止使用)")
private Integer balanceEnable; private Integer balanceEnable;
@ApiModelProperty("封面图URL")
private String coverImg;
@ApiModelProperty("柜机列表") @ApiModelProperty("柜机列表")
private List<CabinetInfoDTO> cabinets; private List<CabinetInfoDTO> cabinets;
@ -40,21 +37,9 @@ public class ShopDetailDTO {
@ApiModelProperty("柜机名称") @ApiModelProperty("柜机名称")
private String cabinetName; private String cabinetName;
@ApiModelProperty("柜机类型0主柜 1副柜")
private Integer cabinetType;
@ApiModelProperty("归属主柜ID") @ApiModelProperty("归属主柜ID")
private Long mainCabinet; private Long mainCabinet;
@ApiModelProperty("运行模式0-支付模式 1-审批模式 2-借还模式 3-会员模式 4-耗材模式 5-暂存模式)")
private Integer mode;
@ApiModelProperty("借呗支付1-正常使用 0-禁止使用)")
private Integer balanceEnable;
@ApiModelProperty("归属类型0-借还柜 1-固资通)")
private Integer belongType;
@ApiModelProperty("MQTT服务ID") @ApiModelProperty("MQTT服务ID")
private Long mqttServerId; private Long mqttServerId;
@ -64,9 +49,6 @@ public class ShopDetailDTO {
@ApiModelProperty("锁控板序号") @ApiModelProperty("锁控板序号")
private Integer lockControlNo; private Integer lockControlNo;
@ApiModelProperty("柜机位置")
private Integer location;
@ApiModelProperty("归还期限0表示不限制") @ApiModelProperty("归还期限0表示不限制")
private Integer returnDeadline; private Integer returnDeadline;
} }