|
@@ -1,50 +1,50 @@
|
|
|
-package com.diagbot.facade;
|
|
|
-
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
-import com.diagbot.dto.VersionDetailDTO;
|
|
|
-import com.diagbot.entity.VersionDetail;
|
|
|
-import com.diagbot.enums.IsDeleteEnum;
|
|
|
-import com.diagbot.enums.StatusEnum;
|
|
|
-import com.diagbot.service.impl.VersionDetailServiceImpl;
|
|
|
-import com.diagbot.util.BeanUtil;
|
|
|
-import org.springframework.stereotype.Component;
|
|
|
-
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
-/**
|
|
|
- * 版本详情
|
|
|
- *
|
|
|
- * @author wangfeng
|
|
|
- * @Description: TODO
|
|
|
- * @date 2018年11月21日 上午11:38:40
|
|
|
- */
|
|
|
-@Component
|
|
|
-public class VersionDetailFacaed extends VersionDetailServiceImpl {
|
|
|
-
|
|
|
- /**
|
|
|
- * 根据版本id查询版本详情
|
|
|
- *
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
- */
|
|
|
- public List<VersionDetailDTO> getById(Long id) {
|
|
|
- QueryWrapper<VersionDetail> versionDetailQuery = new QueryWrapper<>();
|
|
|
- Map<String, Object> mapAll = new HashMap<>();
|
|
|
- mapAll.put("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
- mapAll.put("version_id", id);
|
|
|
- mapAll.put("STATUS", StatusEnum.Enable.getKey());
|
|
|
- versionDetailQuery.allEq(mapAll).orderByAsc("order_no");
|
|
|
-
|
|
|
- VersionDetail versionDetail = new VersionDetail();
|
|
|
- versionDetail.setVersionId(id);
|
|
|
- List<VersionDetail> datas = list(versionDetailQuery);
|
|
|
- List<VersionDetailDTO> dataNew = new ArrayList<VersionDetailDTO>();
|
|
|
- //过滤字段
|
|
|
- dataNew = BeanUtil.listCopyTo(datas, VersionDetailDTO.class);
|
|
|
- return dataNew;
|
|
|
-
|
|
|
- }
|
|
|
-}
|
|
|
+package com.diagbot.facade;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.diagbot.dto.VersionDetailDTO;
|
|
|
+import com.diagbot.entity.VersionDetail;
|
|
|
+import com.diagbot.enums.IsDeleteEnum;
|
|
|
+import com.diagbot.enums.StatusEnum;
|
|
|
+import com.diagbot.service.impl.VersionDetailServiceImpl;
|
|
|
+import com.diagbot.util.BeanUtil;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 版本详情
|
|
|
+ *
|
|
|
+ * @author wangfeng
|
|
|
+ * @Description: TODO
|
|
|
+ * @date 2018年11月21日 上午11:38:40
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class VersionDetailFacaed extends VersionDetailServiceImpl {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据版本id查询版本详情
|
|
|
+ *
|
|
|
+ * @param id
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<VersionDetailDTO> getById(Long id) {
|
|
|
+ QueryWrapper<VersionDetail> versionDetailQuery = new QueryWrapper<>();
|
|
|
+ Map<String, Object> mapAll = new HashMap<>();
|
|
|
+ mapAll.put("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
+ mapAll.put("version_id", id);
|
|
|
+ mapAll.put("STATUS", StatusEnum.Enable.getKey());
|
|
|
+ versionDetailQuery.allEq(mapAll).orderByAsc("order_no");
|
|
|
+
|
|
|
+ VersionDetail versionDetail = new VersionDetail();
|
|
|
+ versionDetail.setVersionId(id);
|
|
|
+ List<VersionDetail> datas = list(versionDetailQuery);
|
|
|
+ List<VersionDetailDTO> dataNew = new ArrayList<VersionDetailDTO>();
|
|
|
+ //过滤字段
|
|
|
+ dataNew = BeanUtil.listCopyTo(datas, VersionDetailDTO.class);
|
|
|
+ return dataNew;
|
|
|
+
|
|
|
+ }
|
|
|
+}
|