Browse Source

fix: 生成预览格式接口修改

fangxinjian 3 years ago
parent
commit
55d695ff1c

+ 3 - 3
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/req/PreviewQrVariableReq.java

@@ -18,8 +18,8 @@ import java.util.List;
 @ApiModel
 public class PreviewQrVariableReq implements Serializable {
 
-  @NotNull(message = "ids为空")
-  @ApiModelProperty(value = "ids")
-  private List<Long> ids;
+  @NotNull(message = "paramNameList为空")
+  @ApiModelProperty(value = "paramNameList")
+  private List<Long> paramNameList;
 
 }

+ 3 - 3
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/req/SaveQrFormatReq.java

@@ -33,9 +33,9 @@ public class SaveQrFormatReq implements Serializable {
 	@ApiModelProperty("码变量")
 	private String codeVariable;
 
-	@NotNull(message = "选择参数为空")
-	@ApiModelProperty("码变量对应的类")
-	private String codeVariableBuildClass;
+//	@NotNull(message = "选择参数为空")
+//	@ApiModelProperty("码变量对应的类")
+//	private String codeVariableBuildClass;
 
 	@ApiModelProperty("码组成简介")
 	private String brief;

+ 4 - 4
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/QrVariableServiceImpl.java

@@ -63,17 +63,17 @@ public class QrVariableServiceImpl implements QrVariableService {
     @Override
     public PreviewQrVariableRes previewQrVariable(PreviewQrVariableReq req) {
         //校验入参
-        if (CollectionUtils.isEmpty(req.getIds())) {
-            throw new BusinessException("码格式入参id为空");
+        if (CollectionUtils.isEmpty(req.getParamNameList())) {
+            throw new BusinessException("码格式参数名称为空");
         }
         // 查询码格式变量
         QueryWrapper<QrVariable> qrVariableQw = new QueryWrapper<>();
-        qrVariableQw.in("id", req.getIds());
+        qrVariableQw.in("param_name", req.getParamNameList());
         List<QrVariable> qrVariableList = qrVariableMapper.selectList(qrVariableQw);
         if (CollectionUtils.isEmpty(qrVariableList)) {
             throw new BusinessException("码格式变量不存在");
         }
-        if (qrVariableList.size() != req.getIds().size()) {
+        if (qrVariableList.size() != req.getParamNameList().size()) {
             throw new BusinessException("部分码格式变量不存在");
         }