liujunchi 2 лет назад
Родитель
Сommit
70b7998386

+ 10 - 0
cooleshow-cms/src/main/java/com/yonge/cooleshow/cms/controller/NewsController.java

@@ -45,6 +45,16 @@ public class NewsController extends BaseController {
 	@PostMapping(value = "/page",  consumes="application/json", produces="application/json")
 	public HttpResponseResult<PageInfo<SysNewsInformationDto>> getList(@Valid @RequestBody NewsInformationQueryInfo queryInfo) {
 
+		//  查询app版本
+		if (!StringUtil.isEmpty(queryInfo.getVersion())) {
+			String status = sysNewsInformationService.selectAppVersionInfo(queryInfo.getPlatform(), queryInfo.getVersion());
+			if ("auditing".equals(status) || queryInfo.getVersion().equals("1")) {
+				queryInfo.setVersion("1");
+			} else {
+				queryInfo.setVersion("0");
+			}
+		}
+
 		if (queryInfo.getType() == 2) {
 			queryInfo.setAttribute2(queryInfo.getSubType());
 			queryInfo.setSubType(null);

+ 10 - 0
cooleshow-cms/src/main/java/com/yonge/cooleshow/cms/controller/queryinfo/NewsInformationQueryInfo.java

@@ -47,6 +47,16 @@ public class NewsInformationQueryInfo extends QueryInfo {
 
 	private Date date;
 
+	@ApiModelProperty(value = "平台")
+	private String platform;
+
+	public String getPlatform() {
+		return platform;
+	}
+
+	public void setPlatform(String platform) {
+		this.platform = platform;
+	}
 
 	public String getClientType() {
 		return clientType;