新增接口,查询最低最高版本号
This commit is contained in:
@ -1,20 +1,19 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.templatewarehouse.controller;
|
||||
|
||||
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
|
||||
import com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity.BizBidClientVersion;
|
||||
import com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity.BizBidTemplateWarehouse;
|
||||
import com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity.ClientVersionCheck;
|
||||
import com.chinaunicom.mall.ebtp.extend.templatewarehouse.sevice.BizBidClientVersionService;
|
||||
import com.chinaunicom.mall.ebtp.extend.templatewarehouse.sevice.BizBidTemplateWarehouseService;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.chinaunicom.mall.ebtp.extend.templatewarehouse.sevice.ClientVersionCheckService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "模板仓库")
|
||||
@ -24,6 +23,8 @@ public class TemplateWarehouseController {
|
||||
private BizBidTemplateWarehouseService templateWarehouseService;
|
||||
@Resource
|
||||
private BizBidClientVersionService bizBidClientVersionService;
|
||||
@Resource
|
||||
private ClientVersionCheckService clientVersionCheckService;
|
||||
|
||||
/**
|
||||
* 通过模板类型查询模板数据
|
||||
@ -79,4 +80,20 @@ public class TemplateWarehouseController {
|
||||
bizBidClientVersionService.getClientByVersion(version);
|
||||
return BaseResponse.success();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过版本号获得对应客户端文件id
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("查询最低最高版本号")
|
||||
@GetMapping("/client/check")
|
||||
public BaseResponse<ClientVersionCheck> getClientByVersion() {
|
||||
List<ClientVersionCheck> checkList = clientVersionCheckService.list();
|
||||
if (checkList.isEmpty()){
|
||||
return BaseResponse.fail(new ClientVersionCheck());
|
||||
}
|
||||
return BaseResponse.success(checkList.get(0));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,10 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.templatewarehouse.dao;
|
||||
|
||||
|
||||
import com.chinaunicom.mall.ebtp.common.base.dao.IBaseMapper;
|
||||
import com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity.ClientVersionCheck;
|
||||
|
||||
public interface ClientVersionCheckMapper extends IBaseMapper<ClientVersionCheck> {
|
||||
|
||||
|
||||
}
|
@ -7,6 +7,7 @@
|
||||
<result column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="document_center_id" jdbcType="VARCHAR" property="documentCenterId"/>
|
||||
<result column="ipass_version" jdbcType="VARCHAR" property="ipassVersion"/>
|
||||
<result column="config_document_id" jdbcType="VARCHAR" property="configDocumentId"/>
|
||||
<result column="publish_date" jdbcType="TIMESTAMP" property="publishDate"/>
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
||||
</resultMap>
|
||||
|
@ -0,0 +1,12 @@
|
||||
<?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.chinaunicom.mall.ebtp.extend.templatewarehouse.dao.ClientVersionCheckMapper">
|
||||
<resultMap id="BaseResultMap"
|
||||
type="com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity.ClientVersionCheck">
|
||||
<result column="new_version" jdbcType="VARCHAR" property="newVersion"/>
|
||||
<result column="old_version" jdbcType="VARCHAR" property="oldVersion"/>
|
||||
<result column="status" jdbcType="INTEGER" property="status"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
@ -35,11 +35,18 @@ public class BizBidClientVersion implements Serializable {
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 文档中心-文档ID
|
||||
* 客户端对应文档中心-文档ID
|
||||
*/
|
||||
@ApiModelProperty(value = "文档中心-文档ID")
|
||||
@ApiModelProperty(value = "客户端对应文档中心-文档ID")
|
||||
private String documentCenterId;
|
||||
|
||||
/**
|
||||
* 配置文件对应文档中心-文档ID
|
||||
*/
|
||||
@ApiModelProperty(value = "配置文件对应文档中心-文档ID")
|
||||
private String configDocumentId;
|
||||
|
||||
|
||||
/**
|
||||
* ipass客户端版本号
|
||||
*/
|
||||
|
@ -0,0 +1,44 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.chinaunicom.mall.ebtp.common.base.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 实体类 ClientVersionCheck
|
||||
*
|
||||
* @auto.generated
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel
|
||||
@TableName(value = "client_version_check", autoResultMap = true)
|
||||
public class ClientVersionCheck extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 新版本客户端版本号
|
||||
*/
|
||||
@ApiModelProperty(value = "新版本客户端版本号")
|
||||
private String newVersion;
|
||||
|
||||
/**
|
||||
* 旧版本客户端版本号
|
||||
*/
|
||||
@ApiModelProperty(value = "旧版本客户端版本号")
|
||||
private String oldVersion;
|
||||
|
||||
/**
|
||||
* 状态 是否启用校验 1-启用,2-不启用
|
||||
*/
|
||||
@ApiModelProperty(value = "状态 是否启用校验 1-启用,2-不启用")
|
||||
private Integer status;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.templatewarehouse.sevice;
|
||||
|
||||
|
||||
import com.chinaunicom.mall.ebtp.common.base.service.IBaseService;
|
||||
import com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity.ClientVersionCheck;
|
||||
|
||||
/**
|
||||
* 对数据表 client_version_check 操作的 service
|
||||
* @author Auto create
|
||||
*
|
||||
*/
|
||||
public interface ClientVersionCheckService extends IBaseService<ClientVersionCheck>{
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.templatewarehouse.sevice.impl;
|
||||
|
||||
|
||||
import com.chinaunicom.mall.ebtp.extend.templatewarehouse.dao.ClientVersionCheckMapper;
|
||||
import com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity.ClientVersionCheck;
|
||||
import com.chinaunicom.mall.ebtp.extend.templatewarehouse.sevice.ClientVersionCheckService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
|
||||
/**
|
||||
* 对数据表 client_version_check 操作的 serviceImpl
|
||||
* @author Auto create
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class ClientVersionCheckServiceImpl extends BaseServiceImpl<ClientVersionCheckMapper, ClientVersionCheck> implements ClientVersionCheckService {
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user