Compare commits
No commits in common. "188e49976c393005b9e43546566b0747dd93515d" and "f499939b148ef4b6d7d5dc4c5d3d497ee3e901f9" have entirely different histories.
188e49976c
...
f499939b14
|
@ -1,68 +0,0 @@
|
||||||
package com.agileboot.admin.controller.cabinet;
|
|
||||||
|
|
||||||
import com.agileboot.admin.customize.aop.accessLog.AccessLog;
|
|
||||||
import com.agileboot.common.core.base.BaseController;
|
|
||||||
import com.agileboot.common.core.dto.ResponseDTO;
|
|
||||||
import com.agileboot.common.core.page.PageDTO;
|
|
||||||
import com.agileboot.common.enums.common.BusinessTypeEnum;
|
|
||||||
import com.agileboot.domain.common.command.BulkOperationCommand;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.CabinetMainboardApplicationService;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.command.AddCabinetMainboardCommand;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.command.UpdateCabinetMainboardCommand;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.db.CabinetMainboardEntity;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.dto.CabinetMainboardDTO;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.query.SearchCabinetMainboardQuery;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import java.util.List;
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/cabinet/mainboards")
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Validated
|
|
||||||
public class CabinetMainboardController extends BaseController {
|
|
||||||
|
|
||||||
private final CabinetMainboardApplicationService cabinetMainboardApplicationService;
|
|
||||||
|
|
||||||
@Operation(summary = "主板列表")
|
|
||||||
@GetMapping
|
|
||||||
public ResponseDTO<PageDTO<CabinetMainboardDTO>> list(SearchCabinetMainboardQuery<CabinetMainboardEntity> query) {
|
|
||||||
PageDTO<CabinetMainboardDTO> page = cabinetMainboardApplicationService.getMainboardList(query);
|
|
||||||
return ResponseDTO.ok(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "新增主板")
|
|
||||||
@AccessLog(title = "主板管理", businessType = BusinessTypeEnum.ADD)
|
|
||||||
@PostMapping
|
|
||||||
public ResponseDTO<Void> add(@Validated @RequestBody AddCabinetMainboardCommand command) {
|
|
||||||
cabinetMainboardApplicationService.addMainboard(command);
|
|
||||||
return ResponseDTO.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改主板")
|
|
||||||
@AccessLog(title = "主板管理", businessType = BusinessTypeEnum.MODIFY)
|
|
||||||
@PutMapping("/{id}")
|
|
||||||
public ResponseDTO<Void> edit(@PathVariable Long id, @Validated @RequestBody UpdateCabinetMainboardCommand command) {
|
|
||||||
command.setMainboardId(id);
|
|
||||||
cabinetMainboardApplicationService.updateMainboard(command);
|
|
||||||
return ResponseDTO.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "删除主板")
|
|
||||||
@AccessLog(title = "主板管理", businessType = BusinessTypeEnum.DELETE)
|
|
||||||
@DeleteMapping("/{ids}")
|
|
||||||
public ResponseDTO<Void> remove(@PathVariable @NotNull List<Long> ids) {
|
|
||||||
cabinetMainboardApplicationService.deleteMainboard(new BulkOperationCommand<>(ids));
|
|
||||||
return ResponseDTO.ok();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -5,7 +5,6 @@ import com.agileboot.common.core.base.BaseController;
|
||||||
import com.agileboot.common.core.dto.ResponseDTO;
|
import com.agileboot.common.core.dto.ResponseDTO;
|
||||||
import com.agileboot.common.core.page.PageDTO;
|
import com.agileboot.common.core.page.PageDTO;
|
||||||
import com.agileboot.common.enums.common.BusinessTypeEnum;
|
import com.agileboot.common.enums.common.BusinessTypeEnum;
|
||||||
import com.agileboot.domain.ab98.user.dto.Ab98UserDetailDTO;
|
|
||||||
import com.agileboot.domain.cabinet.cell.CabinetCellApplicationService;
|
import com.agileboot.domain.cabinet.cell.CabinetCellApplicationService;
|
||||||
import com.agileboot.domain.cabinet.cell.dto.CabinetCellDTO;
|
import com.agileboot.domain.cabinet.cell.dto.CabinetCellDTO;
|
||||||
import com.agileboot.domain.cabinet.smartCabinet.dto.AllCabinetDataDTO;
|
import com.agileboot.domain.cabinet.smartCabinet.dto.AllCabinetDataDTO;
|
||||||
|
@ -47,13 +46,6 @@ public class SmartCabinetController extends BaseController {
|
||||||
return ResponseDTO.ok(page);
|
return ResponseDTO.ok(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "智能柜详情")
|
|
||||||
@GetMapping("/detail/{cabinetId}")
|
|
||||||
public ResponseDTO<SmartCabinetDTO> detail(@PathVariable Long cabinetId) {
|
|
||||||
SmartCabinetDTO smartCabinetDTO = smartCabinetApplicationService.getSmartCabinetById(cabinetId);
|
|
||||||
return ResponseDTO.ok(smartCabinetDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "新增智能柜")
|
@Operation(summary = "新增智能柜")
|
||||||
@AccessLog(title = "智能柜管理", businessType = BusinessTypeEnum.ADD)
|
@AccessLog(title = "智能柜管理", businessType = BusinessTypeEnum.ADD)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
|
|
|
@ -7,8 +7,6 @@ import com.agileboot.common.exception.ApiException;
|
||||||
import com.agileboot.common.exception.error.ErrorCode;
|
import com.agileboot.common.exception.error.ErrorCode;
|
||||||
import com.agileboot.domain.cabinet.cell.model.CabinetCellModel;
|
import com.agileboot.domain.cabinet.cell.model.CabinetCellModel;
|
||||||
import com.agileboot.domain.cabinet.cell.model.CabinetCellModelFactory;
|
import com.agileboot.domain.cabinet.cell.model.CabinetCellModelFactory;
|
||||||
import com.agileboot.domain.cabinet.mainboard.model.CabinetMainboardModel;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.model.CabinetMainboardModelFactory;
|
|
||||||
import com.agileboot.domain.cabinet.operation.command.AddCabinetCellOperationCommand;
|
import com.agileboot.domain.cabinet.operation.command.AddCabinetCellOperationCommand;
|
||||||
import com.agileboot.domain.cabinet.operation.model.CabinetCellOperationModel;
|
import com.agileboot.domain.cabinet.operation.model.CabinetCellOperationModel;
|
||||||
import com.agileboot.domain.cabinet.operation.model.CabinetCellOperationModelFactory;
|
import com.agileboot.domain.cabinet.operation.model.CabinetCellOperationModelFactory;
|
||||||
|
@ -38,7 +36,6 @@ public class CabinetCellController {
|
||||||
private final CabinetCellModelFactory cabinetCellModelFactory;
|
private final CabinetCellModelFactory cabinetCellModelFactory;
|
||||||
private final GoodsModelFactory goodsModelFactory;
|
private final GoodsModelFactory goodsModelFactory;
|
||||||
private final SmartCabinetModelFactory smartCabinetModelFactory;
|
private final SmartCabinetModelFactory smartCabinetModelFactory;
|
||||||
private final CabinetMainboardModelFactory cabinetMainboardModelFactory;
|
|
||||||
|
|
||||||
@GetMapping("/detail")
|
@GetMapping("/detail")
|
||||||
public ResponseDTO<List<CabinetDetailDTO>> getCabinetDetail() {
|
public ResponseDTO<List<CabinetDetailDTO>> getCabinetDetail() {
|
||||||
|
@ -57,11 +54,7 @@ public class CabinetCellController {
|
||||||
CabinetCellOperationModel cellOperationModel = cabinetCellOperationModelFactory.create();
|
CabinetCellOperationModel cellOperationModel = cabinetCellOperationModelFactory.create();
|
||||||
|
|
||||||
SmartCabinetModel smartCabinetModel = smartCabinetModelFactory.loadById(cabinetId);
|
SmartCabinetModel smartCabinetModel = smartCabinetModelFactory.loadById(cabinetId);
|
||||||
|
Integer lockControlNo = smartCabinetModel.getLockControlNo();
|
||||||
CabinetCellModel cabinetCellModel = cabinetCellModelFactory.loadById(operationCommand.getCellId());
|
|
||||||
CabinetMainboardModel cabinetMainboardModel = cabinetMainboardModelFactory.loadById(cabinetCellModel.getMainboardId());
|
|
||||||
Integer lockControlNo = cabinetMainboardModel.getLockControlNo();
|
|
||||||
|
|
||||||
// 发送指令
|
// 发送指令
|
||||||
String mqttDate = "8A";
|
String mqttDate = "8A";
|
||||||
mqttDate += String.format("%02X", lockControlNo);
|
mqttDate += String.format("%02X", lockControlNo);
|
||||||
|
@ -79,6 +72,7 @@ public class CabinetCellController {
|
||||||
if (operationCommand.getCellId() == null) {
|
if (operationCommand.getCellId() == null) {
|
||||||
log.error("openCabinet 格口ID为空");
|
log.error("openCabinet 格口ID为空");
|
||||||
} else {
|
} else {
|
||||||
|
CabinetCellModel cabinetCellModel = cabinetCellModelFactory.loadById(operationCommand.getCellId());
|
||||||
operationCommand.setGoodsId(cabinetCellModel.getGoodsId());
|
operationCommand.setGoodsId(cabinetCellModel.getGoodsId());
|
||||||
operationCommand.setGoodsName("");
|
operationCommand.setGoodsName("");
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class Ab98ApiUtil {
|
||||||
put("tel", tel);
|
put("tel", tel);
|
||||||
put("nobind", "true");
|
put("nobind", "true");
|
||||||
put("for_login", "true");
|
put("for_login", "true");
|
||||||
put("from", "ys");
|
put("from", "jt");
|
||||||
}};
|
}};
|
||||||
|
|
||||||
String response = HttpUtil.createPost(url)
|
String response = HttpUtil.createPost(url)
|
||||||
|
@ -118,8 +118,8 @@ public class Ab98ApiUtil {
|
||||||
* @return outputData.takeFace 是否需要人脸验证(true需要刷脸)
|
* @return outputData.takeFace 是否需要人脸验证(true需要刷脸)
|
||||||
*/
|
*/
|
||||||
public static TokenResponse getToken(String appName) {
|
public static TokenResponse getToken(String appName) {
|
||||||
// String url = BASE_URL + "?code=doGetToken&from=ys&app=" + appName;
|
// String url = BASE_URL + "?code=doGetToken&from=jt&app=" + appName;
|
||||||
String url = BASE_URL + "?code=doGetToken&from=ys";
|
String url = BASE_URL + "?code=doGetToken&from=jt";
|
||||||
|
|
||||||
String response = HttpUtil.createGet(url)
|
String response = HttpUtil.createGet(url)
|
||||||
.header("noSign", "true")
|
.header("noSign", "true")
|
||||||
|
|
|
@ -75,8 +75,9 @@ public class Ab98UserApplicationService {
|
||||||
|
|
||||||
|
|
||||||
public void saveAb98User(String openid, Ab98ApiUtil.LoginData loginData) {
|
public void saveAb98User(String openid, Ab98ApiUtil.LoginData loginData) {
|
||||||
Ab98UserEntity ab98UserEntity = userService.selectByOpenidAndUserid(openid, loginData.getUserid());
|
Ab98UserEntity ab98UserEntity = getByUserId(loginData.getUserid());
|
||||||
if (ab98UserEntity != null &&
|
if (ab98UserEntity != null &&
|
||||||
|
StringUtils.equals(openid, ab98UserEntity.getOpenid()) &&
|
||||||
StringUtils.equals(loginData.getName(), ab98UserEntity.getName())
|
StringUtils.equals(loginData.getName(), ab98UserEntity.getName())
|
||||||
) {
|
) {
|
||||||
UpdateAb98UserCommand command = new UpdateAb98UserCommand();
|
UpdateAb98UserCommand command = new UpdateAb98UserCommand();
|
||||||
|
@ -109,8 +110,9 @@ public class Ab98UserApplicationService {
|
||||||
|
|
||||||
|
|
||||||
public void saveAb98UserByToken(String openid, SsoLoginUserinfo loginUserinfo) {
|
public void saveAb98UserByToken(String openid, SsoLoginUserinfo loginUserinfo) {
|
||||||
Ab98UserEntity ab98UserEntity = userService.selectByOpenidAndUserid(openid, String.valueOf(loginUserinfo.getId()));
|
Ab98UserEntity ab98UserEntity = getByUserId(String.valueOf(loginUserinfo.getId()));
|
||||||
if (ab98UserEntity != null &&
|
if (ab98UserEntity != null &&
|
||||||
|
StringUtils.equals(openid, ab98UserEntity.getOpenid()) &&
|
||||||
StringUtils.equals(loginUserinfo.getName(), ab98UserEntity.getName())
|
StringUtils.equals(loginUserinfo.getName(), ab98UserEntity.getName())
|
||||||
) {
|
) {
|
||||||
UpdateAb98UserCommand command = new UpdateAb98UserCommand();
|
UpdateAb98UserCommand command = new UpdateAb98UserCommand();
|
||||||
|
|
|
@ -43,7 +43,4 @@ public interface Ab98UserMapper extends BaseMapper<Ab98UserEntity> {
|
||||||
|
|
||||||
@Select("SELECT * FROM ab98_user WHERE openid = #{openid} LIMIT 1")
|
@Select("SELECT * FROM ab98_user WHERE openid = #{openid} LIMIT 1")
|
||||||
Ab98UserEntity selectByOpenid(String openid);
|
Ab98UserEntity selectByOpenid(String openid);
|
||||||
|
|
||||||
@Select("SELECT * FROM ab98_user WHERE openid = #{openid} AND userid = #{userid} LIMIT 1")
|
|
||||||
Ab98UserEntity selectByOpenidAndUserid(@Param("openid")String openid, @Param("userid")String userid);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ package com.agileboot.domain.ab98.user.db;
|
||||||
import com.agileboot.common.core.page.AbstractPageQuery;
|
import com.agileboot.common.core.page.AbstractPageQuery;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -23,6 +22,4 @@ public interface Ab98UserService extends IService<Ab98UserEntity> {
|
||||||
Ab98UserEntity getByOpenid(String openid);
|
Ab98UserEntity getByOpenid(String openid);
|
||||||
|
|
||||||
Ab98UserEntity getByUserid(String userid);
|
Ab98UserEntity getByUserid(String userid);
|
||||||
|
|
||||||
Ab98UserEntity selectByOpenidAndUserid(String openid, String userid);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,9 +39,4 @@ public class Ab98UserServiceImpl extends ServiceImpl<Ab98UserMapper, Ab98UserEnt
|
||||||
public Ab98UserEntity getByUserid(String userid) {
|
public Ab98UserEntity getByUserid(String userid) {
|
||||||
return baseMapper.selectByUserid(userid);
|
return baseMapper.selectByUserid(userid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Ab98UserEntity selectByOpenidAndUserid(String openid, String userid) {
|
|
||||||
return baseMapper.selectByOpenidAndUserid(openid, userid);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,10 +35,6 @@ public class CabinetCellEntity extends BaseEntity<CabinetCellEntity> {
|
||||||
@TableField("cabinet_id")
|
@TableField("cabinet_id")
|
||||||
private Long cabinetId;
|
private Long cabinetId;
|
||||||
|
|
||||||
@ApiModelProperty("关联主板ID")
|
|
||||||
@TableField("mainboard_id")
|
|
||||||
private Long mainboardId;
|
|
||||||
|
|
||||||
@ApiModelProperty("格口号")
|
@ApiModelProperty("格口号")
|
||||||
@TableField("cell_no")
|
@TableField("cell_no")
|
||||||
private Integer cellNo;
|
private Integer cellNo;
|
||||||
|
|
|
@ -37,9 +37,6 @@ public class CabinetCellDTO {
|
||||||
@ExcelColumn(name = "关联柜机ID")
|
@ExcelColumn(name = "关联柜机ID")
|
||||||
private Long cabinetId;
|
private Long cabinetId;
|
||||||
|
|
||||||
@ExcelColumn(name = "关联主板ID")
|
|
||||||
private Long mainboardId;
|
|
||||||
|
|
||||||
@ExcelColumn(name = "格口号")
|
@ExcelColumn(name = "格口号")
|
||||||
private Integer cellNo;
|
private Integer cellNo;
|
||||||
|
|
||||||
|
|
|
@ -1,65 +0,0 @@
|
||||||
package com.agileboot.domain.cabinet.mainboard;
|
|
||||||
|
|
||||||
import com.agileboot.common.core.page.PageDTO;
|
|
||||||
import com.agileboot.domain.common.command.BulkOperationCommand;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.command.AddCabinetMainboardCommand;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.command.UpdateCabinetMainboardCommand;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.db.CabinetMainboardEntity;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.db.CabinetMainboardService;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.dto.CabinetMainboardDTO;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.model.CabinetMainboardModel;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.model.CabinetMainboardModelFactory;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.query.SearchCabinetMainboardQuery;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
@Slf4j
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class CabinetMainboardApplicationService {
|
|
||||||
private final CabinetMainboardService cabinetMainboardService;
|
|
||||||
private final CabinetMainboardModelFactory cabinetMainboardModelFactory;
|
|
||||||
|
|
||||||
public PageDTO<CabinetMainboardDTO> getMainboardList(SearchCabinetMainboardQuery<CabinetMainboardEntity> query) {
|
|
||||||
Page<CabinetMainboardEntity> page = cabinetMainboardService.getMainboardList(query);
|
|
||||||
List<CabinetMainboardDTO> dtoList = page.getRecords().stream()
|
|
||||||
.map(CabinetMainboardDTO::new)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
return new PageDTO<>(dtoList, page.getTotal());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addMainboard(AddCabinetMainboardCommand command) {
|
|
||||||
CabinetMainboardModel model = cabinetMainboardModelFactory.create();
|
|
||||||
model.loadAddCommand(command);
|
|
||||||
model.insert();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateMainboard(UpdateCabinetMainboardCommand command) {
|
|
||||||
CabinetMainboardModel model = cabinetMainboardModelFactory.loadById(command.getMainboardId());
|
|
||||||
model.loadUpdateCommand(command);
|
|
||||||
model.updateById();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void deleteMainboard(BulkOperationCommand<Long> command) {
|
|
||||||
for (Long id : command.getIds()) {
|
|
||||||
CabinetMainboardModel model = cabinetMainboardModelFactory.loadById(id);
|
|
||||||
model.deleteById();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public CabinetMainboardEntity getLatestMainboard() {
|
|
||||||
return cabinetMainboardService.selectLatestMainboard();
|
|
||||||
}
|
|
||||||
|
|
||||||
public CabinetMainboardEntity getByCabinetId(Long cabinetId) {
|
|
||||||
return cabinetMainboardService.selectByCabinetId(cabinetId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<CabinetMainboardEntity> getAllMainboards() {
|
|
||||||
return cabinetMainboardService.selectAll();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
package com.agileboot.domain.cabinet.mainboard.command;
|
|
||||||
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.db.CabinetMainboardEntity;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Data
|
|
||||||
public class AddCabinetMainboardCommand extends CabinetMainboardEntity {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
package com.agileboot.domain.cabinet.mainboard.command;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import javax.validation.constraints.PositiveOrZero;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Data
|
|
||||||
public class UpdateCabinetMainboardCommand extends AddCabinetMainboardCommand {
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@PositiveOrZero
|
|
||||||
private Long mainboardId;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,48 +0,0 @@
|
||||||
package com.agileboot.domain.cabinet.mainboard.db;
|
|
||||||
|
|
||||||
import com.agileboot.common.core.base.BaseEntity;
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 机柜主板信息表
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author valarchie
|
|
||||||
* @since 2025-05-15
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@TableName("cabinet_mainboard")
|
|
||||||
@ApiModel(value = "CabinetMainboardEntity对象", description = "机柜主板信息表")
|
|
||||||
public class CabinetMainboardEntity extends BaseEntity<CabinetMainboardEntity> {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@ApiModelProperty("主板唯一ID")
|
|
||||||
@TableId(value = "mainboard_id", type = IdType.AUTO)
|
|
||||||
private Long mainboardId;
|
|
||||||
|
|
||||||
@ApiModelProperty("关联柜机ID")
|
|
||||||
@TableField("cabinet_id")
|
|
||||||
private Long cabinetId;
|
|
||||||
|
|
||||||
@ApiModelProperty("锁控板序号")
|
|
||||||
@TableField("lock_control_no")
|
|
||||||
private Integer lockControlNo;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Serializable pkVal() {
|
|
||||||
return this.mainboardId;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,41 +0,0 @@
|
||||||
package com.agileboot.domain.cabinet.mainboard.db;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import java.util.List;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import org.apache.ibatis.annotations.Select;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 机柜主板信息表 Mapper 接口
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author valarchie
|
|
||||||
* @since 2025-05-15
|
|
||||||
*/
|
|
||||||
public interface CabinetMainboardMapper extends BaseMapper<CabinetMainboardEntity> {
|
|
||||||
@Select("SELECT mainboard_id, cabinet_id, lock_control_no " +
|
|
||||||
"FROM cabinet_mainboard " +
|
|
||||||
"${ew.customSqlSegment}")
|
|
||||||
Page<CabinetMainboardEntity> getMainboardList(
|
|
||||||
Page<CabinetMainboardEntity> page,
|
|
||||||
@Param(Constants.WRAPPER) Wrapper<CabinetMainboardEntity> queryWrapper
|
|
||||||
);
|
|
||||||
|
|
||||||
@Select("SELECT * " +
|
|
||||||
"FROM cabinet_mainboard " +
|
|
||||||
"ORDER BY create_time DESC " +
|
|
||||||
"LIMIT 1")
|
|
||||||
CabinetMainboardEntity selectLatestMainboard();
|
|
||||||
|
|
||||||
@Select("SELECT * " +
|
|
||||||
"FROM cabinet_mainboard " +
|
|
||||||
"ORDER BY create_time DESC")
|
|
||||||
List<CabinetMainboardEntity> selectAll();
|
|
||||||
|
|
||||||
@Select("SELECT * FROM cabinet_mainboard WHERE cabinet_id = #{cabinetId} LIMIT 1")
|
|
||||||
CabinetMainboardEntity selectByCabinetId(Long cabinetId);
|
|
||||||
}
|
|
|
@ -1,25 +0,0 @@
|
||||||
package com.agileboot.domain.cabinet.mainboard.db;
|
|
||||||
|
|
||||||
import com.agileboot.common.core.page.AbstractPageQuery;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 机柜主板信息表 服务类
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author valarchie
|
|
||||||
* @since 2025-05-15
|
|
||||||
*/
|
|
||||||
public interface CabinetMainboardService extends IService<CabinetMainboardEntity> {
|
|
||||||
Page<CabinetMainboardEntity> getMainboardList(AbstractPageQuery<CabinetMainboardEntity> query);
|
|
||||||
|
|
||||||
List<CabinetMainboardEntity> selectAll();
|
|
||||||
|
|
||||||
CabinetMainboardEntity selectLatestMainboard();
|
|
||||||
|
|
||||||
CabinetMainboardEntity selectByCabinetId(Long cabinetId);
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
package com.agileboot.domain.cabinet.mainboard.db;
|
|
||||||
|
|
||||||
import com.agileboot.common.core.page.AbstractPageQuery;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 机柜主板信息表 服务实现类
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author valarchie
|
|
||||||
* @since 2025-05-15
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class CabinetMainboardServiceImpl extends ServiceImpl<CabinetMainboardMapper, CabinetMainboardEntity> implements CabinetMainboardService {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Page<CabinetMainboardEntity> getMainboardList(AbstractPageQuery<CabinetMainboardEntity> query) {
|
|
||||||
return this.page(query.toPage(), query.toQueryWrapper());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<CabinetMainboardEntity> selectAll() {
|
|
||||||
return baseMapper.selectAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CabinetMainboardEntity selectLatestMainboard() {
|
|
||||||
return baseMapper.selectLatestMainboard();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CabinetMainboardEntity selectByCabinetId(Long cabinetId) {
|
|
||||||
return baseMapper.selectByCabinetId(cabinetId);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
package com.agileboot.domain.cabinet.mainboard.dto;
|
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import com.agileboot.common.annotation.ExcelColumn;
|
|
||||||
import com.agileboot.common.annotation.ExcelSheet;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.db.CabinetMainboardEntity;
|
|
||||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
|
||||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
@ExcelSheet(name = "柜机主板表")
|
|
||||||
@Data
|
|
||||||
public class CabinetMainboardDTO {
|
|
||||||
|
|
||||||
public CabinetMainboardDTO(CabinetMainboardEntity entity) {
|
|
||||||
if (entity != null) {
|
|
||||||
BeanUtil.copyProperties(entity, this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@ExcelColumn(name = "主板唯一ID")
|
|
||||||
private Long mainboardId;
|
|
||||||
|
|
||||||
@ExcelColumn(name = "关联柜机ID")
|
|
||||||
private Long cabinetId;
|
|
||||||
|
|
||||||
@ExcelColumn(name = "锁控板序号")
|
|
||||||
private Integer lockControlNo;
|
|
||||||
|
|
||||||
@ExcelColumn(name = "创建时间")
|
|
||||||
private Date createTime;
|
|
||||||
|
|
||||||
@ExcelColumn(name = "更新时间")
|
|
||||||
private Date updateTime;
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
package com.agileboot.domain.cabinet.mainboard.model;
|
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.command.AddCabinetMainboardCommand;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.command.UpdateCabinetMainboardCommand;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.db.CabinetMainboardEntity;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.db.CabinetMainboardService;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Data
|
|
||||||
public class CabinetMainboardModel extends CabinetMainboardEntity {
|
|
||||||
|
|
||||||
private CabinetMainboardService cabinetMainboardService;
|
|
||||||
|
|
||||||
public CabinetMainboardModel(CabinetMainboardEntity entity, CabinetMainboardService cabinetMainboardService) {
|
|
||||||
this(cabinetMainboardService);
|
|
||||||
if (entity != null) {
|
|
||||||
BeanUtil.copyProperties(entity, this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public CabinetMainboardModel(CabinetMainboardService cabinetMainboardService) {
|
|
||||||
this.cabinetMainboardService = cabinetMainboardService;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void loadAddCommand(AddCabinetMainboardCommand command) {
|
|
||||||
if (command != null) {
|
|
||||||
BeanUtil.copyProperties(command, this, "mainboardId");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void loadUpdateCommand(UpdateCabinetMainboardCommand command) {
|
|
||||||
if (command != null) {
|
|
||||||
loadAddCommand(command);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
package com.agileboot.domain.cabinet.mainboard.model;
|
|
||||||
|
|
||||||
import com.agileboot.common.exception.ApiException;
|
|
||||||
import com.agileboot.common.exception.error.ErrorCode;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.db.CabinetMainboardEntity;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.db.CabinetMainboardService;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class CabinetMainboardModelFactory {
|
|
||||||
|
|
||||||
private final CabinetMainboardService cabinetMainboardService;
|
|
||||||
|
|
||||||
public CabinetMainboardModel loadById(Long mainboardId) {
|
|
||||||
CabinetMainboardEntity entity = cabinetMainboardService.getById(mainboardId);
|
|
||||||
if (entity == null) {
|
|
||||||
throw new ApiException(ErrorCode.Business.COMMON_OBJECT_NOT_FOUND, mainboardId, "机柜主板信息");
|
|
||||||
}
|
|
||||||
return new CabinetMainboardModel(entity, cabinetMainboardService);
|
|
||||||
}
|
|
||||||
|
|
||||||
public CabinetMainboardModel create() {
|
|
||||||
return new CabinetMainboardModel(cabinetMainboardService);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
package com.agileboot.domain.cabinet.mainboard.query;
|
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.agileboot.common.core.page.AbstractPageQuery;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Data
|
|
||||||
public class SearchCabinetMainboardQuery<T> extends AbstractPageQuery<T> {
|
|
||||||
|
|
||||||
private Long cabinetId;
|
|
||||||
private Integer lockControlNo;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public QueryWrapper<T> addQueryCondition() {
|
|
||||||
QueryWrapper<T> queryWrapper = new QueryWrapper<>();
|
|
||||||
|
|
||||||
queryWrapper
|
|
||||||
.eq(cabinetId != null, "cabinet_id", cabinetId)
|
|
||||||
.eq(lockControlNo != null, "lock_control_no", lockControlNo);
|
|
||||||
|
|
||||||
this.timeRangeColumn = "create_time";
|
|
||||||
|
|
||||||
return queryWrapper;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
package com.agileboot.domain.cabinet.smartCabinet;
|
|
||||||
|
|
||||||
public enum CabinetTemplateEnum {
|
|
||||||
CABINET_16(1, "cabinet_16.jpg", "16口机柜", 1),
|
|
||||||
CABINET_20(2, "cabinet_20.jpg", "20口机柜", 1),
|
|
||||||
CABINET_22(3, "cabinet_22.jpg", "22口机柜", 1),
|
|
||||||
CABINET_24(4, "cabinet_24.jpg", "24口机柜", 1),
|
|
||||||
CABINET_40(5, "cabinet_40.jpg", "40口机柜", 2),
|
|
||||||
CABINET_48(6, "cabinet_48.jpg", "48口机柜", 2),
|
|
||||||
CABINET_60(7, "cabinet_60.jpg", "60口机柜", 4),
|
|
||||||
CABINET_120(8, "cabinet_120.jpg", "120口机柜", 6);
|
|
||||||
|
|
||||||
private final int code;
|
|
||||||
private final String img;
|
|
||||||
private final String name;
|
|
||||||
private final int boardCount;
|
|
||||||
|
|
||||||
CabinetTemplateEnum(int code, String img, String name, int boardCount) {
|
|
||||||
this.code = code;
|
|
||||||
this.img = img;
|
|
||||||
this.name = name;
|
|
||||||
this.boardCount = boardCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getImg() {
|
|
||||||
return img;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getBoardCount() {
|
|
||||||
return boardCount;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -15,8 +15,6 @@ import com.agileboot.domain.cabinet.smartCabinet.model.SmartCabinetModelFactory;
|
||||||
import com.agileboot.domain.cabinet.smartCabinet.query.SearchSmartCabinetQuery;
|
import com.agileboot.domain.cabinet.smartCabinet.query.SearchSmartCabinetQuery;
|
||||||
import com.agileboot.domain.shop.goods.db.ShopGoodsEntity;
|
import com.agileboot.domain.shop.goods.db.ShopGoodsEntity;
|
||||||
import com.agileboot.domain.shop.goods.db.ShopGoodsService;
|
import com.agileboot.domain.shop.goods.db.ShopGoodsService;
|
||||||
import com.agileboot.domain.shop.shop.db.ShopEntity;
|
|
||||||
import com.agileboot.domain.shop.shop.db.ShopService;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -32,47 +30,15 @@ public class SmartCabinetApplicationService {
|
||||||
private final SmartCabinetModelFactory smartCabinetModelFactory;
|
private final SmartCabinetModelFactory smartCabinetModelFactory;
|
||||||
private final CabinetCellService cabinetCellService;
|
private final CabinetCellService cabinetCellService;
|
||||||
private final ShopGoodsService shopGoodsService;
|
private final ShopGoodsService shopGoodsService;
|
||||||
private final ShopService shopService;
|
|
||||||
|
|
||||||
public PageDTO<SmartCabinetDTO> getSmartCabinetList(SearchSmartCabinetQuery<SmartCabinetEntity> query) {
|
public PageDTO<SmartCabinetDTO> getSmartCabinetList(SearchSmartCabinetQuery<SmartCabinetEntity> query) {
|
||||||
List<ShopEntity> shopEntities = shopService.selectAll();
|
|
||||||
|
|
||||||
Page<SmartCabinetEntity> page = smartCabinetService.getCabinetList(query);
|
Page<SmartCabinetEntity> page = smartCabinetService.getCabinetList(query);
|
||||||
List<SmartCabinetDTO> dtoList = page.getRecords().stream()
|
List<SmartCabinetDTO> dtoList = page.getRecords().stream()
|
||||||
.map(SmartCabinetDTO::new)
|
.map(SmartCabinetDTO::new)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
dtoList.forEach(dto ->
|
|
||||||
dto.setShopName(
|
|
||||||
shopEntities.stream()
|
|
||||||
.filter(shop -> shop.getShopId().equals(dto.getShopId()))
|
|
||||||
.findFirst()
|
|
||||||
.map(ShopEntity::getShopName)
|
|
||||||
.orElse(""))
|
|
||||||
);
|
|
||||||
return new PageDTO<>(dtoList, page.getTotal());
|
return new PageDTO<>(dtoList, page.getTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
public SmartCabinetDTO getSmartCabinetById(Long cabinetId) {
|
|
||||||
SmartCabinetEntity cabinet = smartCabinetService.getById(cabinetId);
|
|
||||||
SmartCabinetDTO dto = new SmartCabinetDTO(cabinet);
|
|
||||||
|
|
||||||
List<ShopEntity> shopEntities = shopService.selectAll();
|
|
||||||
dto.setShopName(
|
|
||||||
shopEntities.stream()
|
|
||||||
.filter(shop -> shop.getShopId().equals(dto.getShopId()))
|
|
||||||
.findFirst()
|
|
||||||
.map(ShopEntity::getShopName)
|
|
||||||
.orElse("")
|
|
||||||
);
|
|
||||||
|
|
||||||
SmartCabinetEntity mainCabinet = smartCabinetService.getByCabinetId(cabinet.getMainCabinet());
|
|
||||||
if (mainCabinet!= null) {
|
|
||||||
dto.setMainCabinetName(mainCabinet.getCabinetName());
|
|
||||||
}
|
|
||||||
return dto;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addSmartCabinet(AddSmartCabinetCommand command) {
|
public void addSmartCabinet(AddSmartCabinetCommand command) {
|
||||||
SmartCabinetModel model = smartCabinetModelFactory.create();
|
SmartCabinetModel model = smartCabinetModelFactory.create();
|
||||||
model.loadAddCommand(command);
|
model.loadAddCommand(command);
|
||||||
|
@ -149,8 +115,4 @@ public class SmartCabinetApplicationService {
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createCabinetMainboardByTemplate(Long cabinetId) {
|
|
||||||
SmartCabinetModel cabinetModel = smartCabinetModelFactory.loadById(cabinetId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,14 +39,6 @@ public class SmartCabinetEntity extends BaseEntity<SmartCabinetEntity> {
|
||||||
@TableField("cabinet_type")
|
@TableField("cabinet_type")
|
||||||
private Integer cabinetType;
|
private Integer cabinetType;
|
||||||
|
|
||||||
@ApiModelProperty("归属主柜ID")
|
|
||||||
@TableField("main_cabinet")
|
|
||||||
private Long mainCabinet;
|
|
||||||
|
|
||||||
@ApiModelProperty("归属主柜名称")
|
|
||||||
@TableField(exist = false)
|
|
||||||
private String mainCabinetName;
|
|
||||||
|
|
||||||
@ApiModelProperty("MQTT服务ID")
|
@ApiModelProperty("MQTT服务ID")
|
||||||
@TableField("mqtt_server_id")
|
@TableField("mqtt_server_id")
|
||||||
private Long mqttServerId;
|
private Long mqttServerId;
|
||||||
|
|
|
@ -17,9 +17,8 @@ import java.util.List;
|
||||||
* @since 2025-03-17
|
* @since 2025-03-17
|
||||||
*/
|
*/
|
||||||
public interface SmartCabinetMapper extends BaseMapper<SmartCabinetEntity> {
|
public interface SmartCabinetMapper extends BaseMapper<SmartCabinetEntity> {
|
||||||
@Select("SELECT sc.*, scl.cabinet_name AS mainCabinetName " +
|
@Select("SELECT cabinet_id, cabinet_name, cabinet_type, template_no, lock_control_no, location " +
|
||||||
"FROM smart_cabinet sc " +
|
"FROM smart_cabinet " +
|
||||||
"LEFT JOIN smart_cabinet scl ON scl.cabinet_id = sc.main_cabinet " +
|
|
||||||
"${ew.customSqlSegment}")
|
"${ew.customSqlSegment}")
|
||||||
Page<SmartCabinetEntity> getCabinetList(
|
Page<SmartCabinetEntity> getCabinetList(
|
||||||
Page<SmartCabinetEntity> page,
|
Page<SmartCabinetEntity> page,
|
||||||
|
|
|
@ -20,7 +20,7 @@ public class SmartCabinetServiceImpl extends ServiceImpl<SmartCabinetMapper, Sma
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<SmartCabinetEntity> getCabinetList(AbstractPageQuery<SmartCabinetEntity> query) {
|
public Page<SmartCabinetEntity> getCabinetList(AbstractPageQuery<SmartCabinetEntity> query) {
|
||||||
return baseMapper.getCabinetList(query.toPage(), query.toQueryWrapper());
|
return this.page(query.toPage(), query.toQueryWrapper());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -34,21 +34,12 @@ public class SmartCabinetDTO {
|
||||||
@ExcelColumn(name = "柜机类型(0主柜 1副柜)")
|
@ExcelColumn(name = "柜机类型(0主柜 1副柜)")
|
||||||
private Integer cabinetType;
|
private Integer cabinetType;
|
||||||
|
|
||||||
@ExcelColumn(name = "归属主柜ID")
|
|
||||||
private Long mainCabinet;
|
|
||||||
|
|
||||||
@ExcelColumn(name = "归属主柜名称")
|
|
||||||
private String mainCabinetName;
|
|
||||||
|
|
||||||
@ExcelColumn(name = "MQTT服务ID")
|
@ExcelColumn(name = "MQTT服务ID")
|
||||||
private Long mqttServerId;
|
private Long mqttServerId;
|
||||||
|
|
||||||
@ExcelColumn(name = "商店ID")
|
@ExcelColumn(name = "商店ID")
|
||||||
private Long shopId;
|
private Long shopId;
|
||||||
|
|
||||||
@ExcelColumn(name = "商店名称")
|
|
||||||
private String shopName;
|
|
||||||
|
|
||||||
@ExcelColumn(name = "柜机模版编号")
|
@ExcelColumn(name = "柜机模版编号")
|
||||||
private String templateNo;
|
private String templateNo;
|
||||||
|
|
||||||
|
|
|
@ -24,13 +24,13 @@ public class SearchSmartCabinetQuery<T> extends AbstractPageQuery<T> {
|
||||||
QueryWrapper<T> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<T> queryWrapper = new QueryWrapper<>();
|
||||||
|
|
||||||
queryWrapper
|
queryWrapper
|
||||||
.like(StrUtil.isNotEmpty(cabinetName), "sc.cabinet_name", cabinetName)
|
.like(StrUtil.isNotEmpty(cabinetName), "cabinet_name", cabinetName)
|
||||||
.eq(cabinetType != null, "sc.cabinet_type", cabinetType)
|
.eq(cabinetType != null, "cabinet_type", cabinetType)
|
||||||
.eq(mqttServerId!= null, "sc.mqtt_server_id", mqttServerId)
|
.eq(mqttServerId!= null, "mqtt_server_id", mqttServerId)
|
||||||
.eq(shopId!= null, "sc.shop_id", shopId)
|
.eq(shopId!= null, "shop_id", shopId)
|
||||||
.eq(StrUtil.isNotEmpty(templateNo), "sc.template_no", templateNo)
|
.eq(StrUtil.isNotEmpty(templateNo), "template_no", templateNo)
|
||||||
.eq("sc.deleted", false)
|
.eq("deleted", false)
|
||||||
.between(startTime != null && endTime != null, "sc.create_time", startTime, endTime);
|
.between(startTime != null && endTime != null, "create_time", startTime, endTime);
|
||||||
|
|
||||||
this.timeRangeColumn = "create_time";
|
this.timeRangeColumn = "create_time";
|
||||||
|
|
||||||
|
|
|
@ -25,12 +25,6 @@ public class MqttService implements MqttCallback {
|
||||||
private static class ClientConfig {
|
private static class ClientConfig {
|
||||||
private final MqttClient client;
|
private final MqttClient client;
|
||||||
private final MqttServerEntity config;
|
private final MqttServerEntity config;
|
||||||
|
|
||||||
public boolean isSameConnection(MqttServerEntity other) {
|
|
||||||
return config.getServerUrl().equals(other.getServerUrl())
|
|
||||||
&& config.getUsername().equals(other.getUsername())
|
|
||||||
&& config.getPassword().equals(other.getPassword());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,18 +51,6 @@ public class MqttService implements MqttCallback {
|
||||||
|
|
||||||
public void connect() throws MqttException {
|
public void connect() throws MqttException {
|
||||||
for (MqttServerEntity config : mqttServerService.selectAll()) {
|
for (MqttServerEntity config : mqttServerService.selectAll()) {
|
||||||
// 检查是否已有相同连接的client实例
|
|
||||||
ClientConfig existingConfig = clientConfigs.stream()
|
|
||||||
.filter(cc -> cc.isSameConnection(config))
|
|
||||||
.findFirst()
|
|
||||||
.orElse(null);
|
|
||||||
|
|
||||||
if (existingConfig != null) {
|
|
||||||
log.info("复用已有MQTT连接:{} 账号:{}", config.getServerUrl(), config.getUsername());
|
|
||||||
clientConfigs.add(new ClientConfig(existingConfig.client, config));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
MqttClient client = new MqttClient(config.getServerUrl(), MqttClient.generateClientId(), new MemoryPersistence());
|
MqttClient client = new MqttClient(config.getServerUrl(), MqttClient.generateClientId(), new MemoryPersistence());
|
||||||
MqttConnectOptions options = new MqttConnectOptions();
|
MqttConnectOptions options = new MqttConnectOptions();
|
||||||
options.setUserName(config.getUsername());
|
options.setUserName(config.getUsername());
|
||||||
|
|
|
@ -8,10 +8,6 @@ import com.agileboot.common.exception.ApiException;
|
||||||
import com.agileboot.common.exception.error.ErrorCode;
|
import com.agileboot.common.exception.error.ErrorCode;
|
||||||
import com.agileboot.domain.cabinet.cell.db.CabinetCellEntity;
|
import com.agileboot.domain.cabinet.cell.db.CabinetCellEntity;
|
||||||
import com.agileboot.domain.cabinet.cell.db.CabinetCellService;
|
import com.agileboot.domain.cabinet.cell.db.CabinetCellService;
|
||||||
import com.agileboot.domain.cabinet.mainboard.db.CabinetMainboardEntity;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.db.CabinetMainboardService;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.model.CabinetMainboardModel;
|
|
||||||
import com.agileboot.domain.cabinet.mainboard.model.CabinetMainboardModelFactory;
|
|
||||||
import com.agileboot.domain.cabinet.operation.command.AddCabinetCellOperationCommand;
|
import com.agileboot.domain.cabinet.operation.command.AddCabinetCellOperationCommand;
|
||||||
import com.agileboot.domain.cabinet.operation.model.CabinetCellOperationModel;
|
import com.agileboot.domain.cabinet.operation.model.CabinetCellOperationModel;
|
||||||
import com.agileboot.domain.cabinet.operation.model.CabinetCellOperationModelFactory;
|
import com.agileboot.domain.cabinet.operation.model.CabinetCellOperationModelFactory;
|
||||||
|
@ -79,7 +75,6 @@ public class OrderApplicationService {
|
||||||
private final QyUserModelFactory qyUserModelFactory;
|
private final QyUserModelFactory qyUserModelFactory;
|
||||||
private final CabinetCellOperationModelFactory cabinetCellOperationModelFactory;
|
private final CabinetCellOperationModelFactory cabinetCellOperationModelFactory;
|
||||||
private final PaymentOperationLogApplicationService paymentOperationLogApplicationService;
|
private final PaymentOperationLogApplicationService paymentOperationLogApplicationService;
|
||||||
private final CabinetMainboardService cabinetMainboardService;
|
|
||||||
|
|
||||||
public PageDTO<OrderWithGoodsDTO> getOrderList(SearchShopOrderQuery<OrderWithGoodsDTO> query) {
|
public PageDTO<OrderWithGoodsDTO> getOrderList(SearchShopOrderQuery<OrderWithGoodsDTO> query) {
|
||||||
Page<OrderWithGoodsDTO> page = orderService.getOrderList(query);
|
Page<OrderWithGoodsDTO> page = orderService.getOrderList(query);
|
||||||
|
@ -116,8 +111,6 @@ public class OrderApplicationService {
|
||||||
throw new ApiException(ErrorCode.Client.COMMON_FORBIDDEN_TO_CALL, "柜子不存在");
|
throw new ApiException(ErrorCode.Client.COMMON_FORBIDDEN_TO_CALL, "柜子不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
CabinetMainboardEntity cabinetMainboard = cabinetMainboardService.getById(cabinetCellEntity.getMainboardId());
|
|
||||||
|
|
||||||
operationCommand.setCellId(goodsEntity.getCellId());
|
operationCommand.setCellId(goodsEntity.getCellId());
|
||||||
operationCommand.setGoodsId(goodsEntity.getGoodsId());
|
operationCommand.setGoodsId(goodsEntity.getGoodsId());
|
||||||
operationCommand.setGoodsName(goodsEntity.getGoodsName());
|
operationCommand.setGoodsName(goodsEntity.getGoodsName());
|
||||||
|
@ -127,7 +120,7 @@ public class OrderApplicationService {
|
||||||
// 构造MQTT开柜指令:
|
// 构造MQTT开柜指令:
|
||||||
// 指令格式:8A + 锁控编号(2位HEX) + 引脚号(2位HEX) + 操作码11
|
// 指令格式:8A + 锁控编号(2位HEX) + 引脚号(2位HEX) + 操作码11
|
||||||
String mqttDate = "8A";
|
String mqttDate = "8A";
|
||||||
mqttDate += String.format("%02X", cabinetMainboard.getLockControlNo());
|
mqttDate += String.format("%02X", smartCabinet.getLockControlNo());
|
||||||
mqttDate += String.format("%02X", cabinetCellEntity.getPinNo());
|
mqttDate += String.format("%02X", cabinetCellEntity.getPinNo());
|
||||||
mqttDate += "11";
|
mqttDate += "11";
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
|
@ -31,7 +30,7 @@ public class SearchShopOrderQuery<T> extends AbstractPageQuery<T> {
|
||||||
queryWrapper
|
queryWrapper
|
||||||
.eq(orderId != null, "o.order_id", orderId)
|
.eq(orderId != null, "o.order_id", orderId)
|
||||||
.eq(cellId != null, "og.cell_id", cellId)
|
.eq(cellId != null, "og.cell_id", cellId)
|
||||||
.eq(StrUtil.isNotBlank(openid), "o.openid", StringUtils.trim(openid))
|
.eq(StrUtil.isNotBlank(openid), "o.openid", openid.trim())
|
||||||
.eq(cabinetId != null, "cc.cabinet_id", cabinetId)
|
.eq(cabinetId != null, "cc.cabinet_id", cabinetId)
|
||||||
.eq(status != null, "o.status", status)
|
.eq(status != null, "o.status", status)
|
||||||
.eq(payStatus != null, "o.pay_status", payStatus)
|
.eq(payStatus != null, "o.pay_status", payStatus)
|
||||||
|
|
|
@ -18,7 +18,7 @@ import java.util.List;
|
||||||
* @since 2025-05-09
|
* @since 2025-05-09
|
||||||
*/
|
*/
|
||||||
public interface ShopMapper extends BaseMapper<ShopEntity> {
|
public interface ShopMapper extends BaseMapper<ShopEntity> {
|
||||||
@Select("SELECT * " +
|
@Select("SELECT shop_id, shop_name " +
|
||||||
"FROM shop " +
|
"FROM shop " +
|
||||||
"${ew.customSqlSegment}")
|
"${ew.customSqlSegment}")
|
||||||
Page<ShopEntity> getShopList(
|
Page<ShopEntity> getShopList(
|
||||||
|
@ -32,7 +32,7 @@ public interface ShopMapper extends BaseMapper<ShopEntity> {
|
||||||
"LIMIT 1")
|
"LIMIT 1")
|
||||||
ShopEntity selectFirstShop();
|
ShopEntity selectFirstShop();
|
||||||
|
|
||||||
@Select("SELECT * FROM shop WHERE deleted = 0 ORDER BY shop_id DESC")
|
@Select("SELECT * FROM shop ORDER BY shop_id DESC")
|
||||||
List<ShopEntity> selectAll();
|
List<ShopEntity> selectAll();
|
||||||
|
|
||||||
@Select("SELECT * FROM shop WHERE shop_id = #{shopId} LIMIT 1")
|
@Select("SELECT * FROM shop WHERE shop_id = #{shopId} LIMIT 1")
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
package com.agileboot.domain.shop.shop.db;
|
package com.agileboot.domain.shop.shop.db;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 商店表,每个柜子属于一个商店 服务类
|
* 商店表,每个柜子属于一个商店 服务类
|
||||||
|
@ -16,13 +12,4 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface ShopService extends IService<ShopEntity> {
|
public interface ShopService extends IService<ShopEntity> {
|
||||||
|
|
||||||
Page<ShopEntity> getShopList(Page<ShopEntity> page, Wrapper<ShopEntity> queryWrapper);
|
|
||||||
|
|
||||||
ShopEntity selectFirstShop();
|
|
||||||
|
|
||||||
List<ShopEntity> selectAll();
|
|
||||||
|
|
||||||
ShopEntity selectByShopId(Long shopId);
|
|
||||||
|
|
||||||
ShopEntity selectByShopName(String shopName);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
package com.agileboot.domain.shop.shop.db;
|
package com.agileboot.domain.shop.shop.db;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 商店表,每个柜子属于一个商店 服务实现类
|
* 商店表,每个柜子属于一个商店 服务实现类
|
||||||
|
@ -18,28 +14,4 @@ import java.util.List;
|
||||||
@Service
|
@Service
|
||||||
public class ShopServiceImpl extends ServiceImpl<ShopMapper, ShopEntity> implements ShopService {
|
public class ShopServiceImpl extends ServiceImpl<ShopMapper, ShopEntity> implements ShopService {
|
||||||
|
|
||||||
@Override
|
}
|
||||||
public Page<ShopEntity> getShopList(Page<ShopEntity> page, Wrapper<ShopEntity> queryWrapper) {
|
|
||||||
return baseMapper.getShopList(page, queryWrapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ShopEntity selectFirstShop() {
|
|
||||||
return baseMapper.selectFirstShop();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ShopEntity> selectAll() {
|
|
||||||
return baseMapper.selectAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ShopEntity selectByShopId(Long shopId) {
|
|
||||||
return baseMapper.selectByShopId(shopId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ShopEntity selectByShopName(String shopName) {
|
|
||||||
return baseMapper.selectByShopName(shopName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -4,12 +4,10 @@ import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.lang.tree.Tree;
|
import cn.hutool.core.lang.tree.Tree;
|
||||||
import cn.hutool.core.lang.tree.TreeNodeConfig;
|
import cn.hutool.core.lang.tree.TreeNodeConfig;
|
||||||
import cn.hutool.core.lang.tree.TreeUtil;
|
import cn.hutool.core.lang.tree.TreeUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
|
||||||
import com.agileboot.domain.system.menu.command.AddMenuCommand;
|
import com.agileboot.domain.system.menu.command.AddMenuCommand;
|
||||||
import com.agileboot.domain.system.menu.command.UpdateMenuCommand;
|
import com.agileboot.domain.system.menu.command.UpdateMenuCommand;
|
||||||
import com.agileboot.domain.system.menu.dto.MenuDTO;
|
import com.agileboot.domain.system.menu.dto.MenuDTO;
|
||||||
import com.agileboot.domain.system.menu.dto.MenuDetailDTO;
|
import com.agileboot.domain.system.menu.dto.MenuDetailDTO;
|
||||||
import com.agileboot.domain.system.menu.dto.MetaDTO;
|
|
||||||
import com.agileboot.domain.system.menu.dto.RouterDTO;
|
import com.agileboot.domain.system.menu.dto.RouterDTO;
|
||||||
import com.agileboot.domain.system.menu.model.MenuModel;
|
import com.agileboot.domain.system.menu.model.MenuModel;
|
||||||
import com.agileboot.domain.system.menu.model.MenuModelFactory;
|
import com.agileboot.domain.system.menu.model.MenuModelFactory;
|
||||||
|
@ -23,14 +21,12 @@ import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单应用服务
|
* 菜单应用服务
|
||||||
* @author valarchie
|
* @author valarchie
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class MenuApplicationService {
|
public class MenuApplicationService {
|
||||||
|
@ -139,12 +135,8 @@ public class MenuApplicationService {
|
||||||
// 也可以使用 tree.setId(dept.getId());等一些默认值
|
// 也可以使用 tree.setId(dept.getId());等一些默认值
|
||||||
tree.setId(menu.getMenuId());
|
tree.setId(menu.getMenuId());
|
||||||
tree.setParentId(menu.getParentId());
|
tree.setParentId(menu.getParentId());
|
||||||
try {
|
// TODO 可以取meta中的rank来排序
|
||||||
MetaDTO meta = JSONUtil.toBean(menu.getMetaInfo(), MetaDTO.class);
|
// tree.setWeight(menu.getRank());
|
||||||
tree.setWeight(meta.getRank());
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("菜单metaInfo转换失败", e);
|
|
||||||
}
|
|
||||||
tree.putExtra("entity", menu);
|
tree.putExtra("entity", menu);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.agileboot.domain.cabinet.mainboard.db.CabinetMainboardMapper">
|
|
||||||
|
|
||||||
</mapper>
|
|
|
@ -61,7 +61,7 @@ public class CodeGenerator {
|
||||||
//生成的类 放在orm子模块下的/target/generated-code目录底下
|
//生成的类 放在orm子模块下的/target/generated-code目录底下
|
||||||
.module("/agileboot-orm/target/generated-code")
|
.module("/agileboot-orm/target/generated-code")
|
||||||
.parentPackage("com.agileboot")
|
.parentPackage("com.agileboot")
|
||||||
.tableName("cabinet_mainboard")
|
.tableName("ab98_user")
|
||||||
// 决定是否继承基类
|
// 决定是否继承基类
|
||||||
.isExtendsFromBaseEntity(true)
|
.isExtendsFromBaseEntity(true)
|
||||||
.build();
|
.build();
|
||||||
|
|
|
@ -22,29 +22,4 @@ CREATE TABLE `ab98_user` (
|
||||||
KEY `idx_openid` (`openid`),
|
KEY `idx_openid` (`openid`),
|
||||||
KEY `idx_tel` (`tel`),
|
KEY `idx_tel` (`tel`),
|
||||||
KEY `idx_name` (`name`)
|
KEY `idx_name` (`name`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='汇邦云用户信息表';
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='汇邦云用户信息表';
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE `smart_cabinet`
|
|
||||||
ADD COLUMN `main_cabinet` BIGINT NULL COMMENT '归属主柜ID'
|
|
||||||
AFTER `cabinet_type`;
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `cabinet_mainboard`;
|
|
||||||
|
|
||||||
CREATE TABLE `cabinet_mainboard` (
|
|
||||||
`mainboard_id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '主板唯一ID',
|
|
||||||
`cabinet_id` BIGINT NOT NULL COMMENT '关联柜机ID',
|
|
||||||
`lock_control_no` INT NOT NULL COMMENT '锁控板序号',
|
|
||||||
`creator_id` BIGINT NULL DEFAULT 0 COMMENT '创建者ID',
|
|
||||||
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
||||||
`updater_id` BIGINT NULL DEFAULT 0 COMMENT '更新者ID',
|
|
||||||
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
||||||
`deleted` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '删除标志(0存在 1删除)',
|
|
||||||
PRIMARY KEY (`mainboard_id`),
|
|
||||||
KEY `idx_cabinet` (`cabinet_id`),
|
|
||||||
CONSTRAINT `fk_mainboard_cabinet` FOREIGN KEY (`cabinet_id`) REFERENCES `smart_cabinet` (`cabinet_id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='机柜主板信息表';
|
|
||||||
|
|
||||||
ALTER TABLE `cabinet_cell`
|
|
||||||
ADD COLUMN `mainboard_id` BIGINT NULL COMMENT '归属主板ID'
|
|
||||||
AFTER `cabinet_id`;
|
|
Loading…
Reference in New Issue