|
@@ -6,7 +6,11 @@ import com.diagbot.dto.VersionWrapperDTO;
|
|
|
import com.diagbot.entity.VersionInfo;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.enums.StatusEnum;
|
|
|
+import com.diagbot.exception.CommonErrorCode;
|
|
|
+import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.service.impl.VersionInfoServiceImpl;
|
|
|
+import com.diagbot.util.IntegerUtil;
|
|
|
+import com.diagbot.vo.VersionVO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -29,10 +33,19 @@ public class VersionInfoFacade extends VersionInfoServiceImpl {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- public VersionWrapperDTO getVersionInfoAll() {
|
|
|
+ public VersionWrapperDTO getVersionInfoAll(VersionVO versionVO) {
|
|
|
+ //入参配置验证
|
|
|
+ if (null == versionVO) {
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_IS_NULL);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (IntegerUtil.isNull(versionVO.getProductType())) {
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "产品类型不能为空!");
|
|
|
+ }
|
|
|
//查询最新的一条版本信息
|
|
|
QueryWrapper<VersionInfo> versionInfoQuery = new QueryWrapper<>();
|
|
|
versionInfoQuery.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("product_type", versionVO.getProductType())
|
|
|
.eq("STATUS", StatusEnum.Enable.getKey())
|
|
|
.orderByDesc("gmt_modified");
|
|
|
|