Browse Source

更新!

TRX 1 year ago
parent
commit
949c0aa0e8

+ 19 - 0
FullCardClient/src/main/java/com/zhongshu/card/client/model/devices/DeviceInfoServeModel.java

@@ -0,0 +1,19 @@
+package com.zhongshu.card.client.model.devices;
+
+import com.zhongshu.card.client.model.org.OrganizationPayInfoModel;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+ * 查询设备 提供的 服务 或 商品模型
+ *
+ * @author TRX
+ * @date 2024/6/14
+ */
+@Data
+public class DeviceInfoServeModel extends DeviceInfoModel {
+
+    @Schema(description = "收款结构信息")
+    private OrganizationPayInfoModel payOrgInfo;
+
+}

+ 1 - 1
FullCardClient/src/main/java/com/zhongshu/card/client/service/school/DeviceInfoService.java

@@ -58,6 +58,6 @@ public interface DeviceInfoService {
      * @param deviceId
      * @return
      */
-    ResultContent<DeviceInfoMoreModel> getDeviceDetailAndPer(String deviceId);
+    ResultContent<DeviceInfoServeModel> getDeviceDetailAndPer(String deviceId);
 
 }

+ 13 - 3
FullCardServer/src/main/java/com/zhongshu/card/server/core/service/devices/DeviceInfoServiceImpl.java

@@ -293,7 +293,7 @@ public class DeviceInfoServiceImpl extends SuperService implements DeviceInfoSer
      * @return
      */
     @Override
-    public ResultContent<DeviceInfoMoreModel> getDeviceDetailAndPer(String deviceId) {
+    public ResultContent<DeviceInfoServeModel> getDeviceDetailAndPer(String deviceId) {
         DeviceInfo deviceInfo = deviceInfoDao.findTopByDeviceId(deviceId);
 
         // 判断当前用户是否有设备的权限
@@ -303,9 +303,9 @@ public class DeviceInfoServiceImpl extends SuperService implements DeviceInfoSer
             return ResultContent.buildFail(content.getMsg());
         }
 
-        DeviceInfoMoreModel model = null;
+        DeviceInfoServeModel model = null;
         if (ObjectUtils.isNotEmpty(deviceInfo)) {
-            model = toMoreModel(deviceInfo);
+            model = toServeModel(deviceInfo);
             model.setPayOrgInfo(getDeviceReceiveOrgInfo(deviceId));
         }
         return ResultContent.buildSuccess(model);
@@ -321,6 +321,16 @@ public class DeviceInfoServiceImpl extends SuperService implements DeviceInfoSer
         return model;
     }
 
+    public DeviceInfoServeModel toServeModel(DeviceInfo entity) {
+        DeviceInfoServeModel model = null;
+        if (ObjectUtils.isNotEmpty(entity)) {
+            model = new DeviceInfoServeModel();
+            DeviceInfoModel deviceInfoModel = toModel(entity);
+            BeanUtils.copyProperties(deviceInfoModel, model);
+        }
+        return model;
+    }
+
     /**
      * @param param
      * @return