保存当前版本号
This commit is contained in:
@@ -58,7 +58,8 @@ public class MybatisPlusConfig {
|
||||
"sys_dictionary_data",
|
||||
"sys_user_oauth",
|
||||
"sys_email_record",
|
||||
"sys_plug"
|
||||
"sys_plug",
|
||||
"sys_version"
|
||||
).contains(tableName);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -73,10 +73,10 @@ public class SocketIOConfig implements InitializingBean {
|
||||
config.setKeyStorePassword("123456"); // 设置证书密码
|
||||
|
||||
// 启动socket服务
|
||||
// SocketIOServer server = new SocketIOServer(config);
|
||||
// server.addListeners(socketIOHandler);
|
||||
// server.start();
|
||||
// ClientCache.setSocketIOServer(server);
|
||||
// logger.debug("Netty SocketIO启动:{}:{}",host,port);
|
||||
SocketIOServer server = new SocketIOServer(config);
|
||||
server.addListeners(socketIOHandler);
|
||||
server.start();
|
||||
ClientCache.setSocketIOServer(server);
|
||||
logger.debug("Netty SocketIO启动:{}:{}",host,port);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
package com.gxwebsoft.common.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.*;
|
||||
import com.gxwebsoft.common.system.entity.Company;
|
||||
import com.gxwebsoft.common.system.entity.Menu;
|
||||
import com.gxwebsoft.common.system.entity.Version;
|
||||
import com.gxwebsoft.common.system.param.MenuParam;
|
||||
import com.gxwebsoft.common.system.param.VersionParam;
|
||||
import com.gxwebsoft.common.system.service.CompanyService;
|
||||
import com.gxwebsoft.common.system.service.MenuService;
|
||||
import com.gxwebsoft.common.system.service.VersionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -29,6 +34,8 @@ public class MenuController extends BaseController {
|
||||
private MenuService menuService;
|
||||
@Resource
|
||||
private CompanyService companyService;
|
||||
@Resource
|
||||
private VersionService versionService;
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:menu:list')")
|
||||
@OperationLog
|
||||
@@ -136,7 +143,16 @@ public class MenuController extends BaseController {
|
||||
Company company = new Company();
|
||||
company.setCompanyId(companyId);
|
||||
company.setPlanId(param.getTenantId());
|
||||
VersionParam versionParam = new VersionParam();
|
||||
versionParam.setLimit(1L);
|
||||
final PageResult<Version> result = versionService.pageRel(versionParam);
|
||||
if (!CollectionUtils.isEmpty(result.getList())) {
|
||||
Version version = result.getList().get(0);
|
||||
company.setVersionName(version.getVersionName());
|
||||
company.setVersionCode(version.getVersionCode());
|
||||
}
|
||||
companyService.updateById(company);
|
||||
|
||||
return success("安装成功");
|
||||
}
|
||||
return fail("安装失败");
|
||||
|
||||
@@ -38,6 +38,7 @@ public class RoleController extends BaseController {
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<Role>> page(RoleParam param) {
|
||||
PageParam<Role, RoleParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc");
|
||||
return success(roleService.page(page, page.getWrapper()));
|
||||
}
|
||||
|
||||
@@ -47,6 +48,7 @@ public class RoleController extends BaseController {
|
||||
@GetMapping()
|
||||
public ApiResult<List<Role>> list(RoleParam param) {
|
||||
PageParam<Role, RoleParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc");
|
||||
return success(roleService.list(page.getOrderWrapper()));
|
||||
}
|
||||
|
||||
|
||||
@@ -76,9 +76,9 @@ public class VersionController extends BaseController {
|
||||
version.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (versionService.save(version)) {
|
||||
return success("添加成功");
|
||||
return success("发布成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
return fail("发布失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:version:save')")
|
||||
|
||||
@@ -33,6 +33,9 @@ public class Role implements Serializable {
|
||||
@ApiModelProperty("备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty("是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class Version implements Serializable {
|
||||
private String versionName;
|
||||
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private Integer versionCode;
|
||||
private String versionCode;
|
||||
|
||||
@ApiModelProperty(value = "下载链接")
|
||||
private String vueDownloadUrl;
|
||||
|
||||
Reference in New Issue
Block a user