最后修改人

This commit is contained in:
jiangzeyin 2019-03-21 16:16:13 +08:00
parent ab78676b27
commit ff5d4dc73c
4 changed files with 24 additions and 14 deletions

View File

@ -107,7 +107,8 @@
账号demo
密码demo123
> 演示系统有部分功能做了限制,详情功能请自行部署体验
> 演示系统有部分功能做了限制,完整功能请自行部署体验
> 如果出现登录不上,请联系我们重置密码,联系方式在最底部
1. [Jboot案例代码](https://gitee.com/keepbx/Jpom-demo-case/tree/master/jboot-test)

View File

@ -163,18 +163,14 @@ public class EditProjectController extends BaseController {
return JsonMessage.getString(400, "管理员才能创建项目!");
}
projectInfo.setCreateTime(DateUtil.now());
// 隐藏系统管理员登录名
if (UserModel.SYSTEM_ADMIN.equals(userName.getParent())) {
projectInfo.setCreateUser(UserModel.SYSTEM_OCCUPY_NAME);
} else {
projectInfo.setCreateUser(userName.getId());
}
this.modify(projectInfo);
projectInfoService.saveProject(projectInfo);
return JsonMessage.getString(200, "新增成功!");
}
if (!userName.isProject(projectInfo.getId())) {
return JsonMessage.getString(400, "你没有对应操作权限操作!");
}
this.modify(exits);
exits.setLog(projectInfo.getLog());
exits.setName(projectInfo.getName());
exits.setGroup(projectInfo.getGroup());
@ -193,6 +189,16 @@ public class EditProjectController extends BaseController {
}
}
private void modify(ProjectInfoModel exits) {
UserModel userName = getUser();
// 隐藏系统管理员登录名
if (UserModel.SYSTEM_ADMIN.equals(userName.getParent())) {
exits.setModifyUser(UserModel.SYSTEM_OCCUPY_NAME);
} else {
exits.setModifyUser(userName.getId());
}
}
/**
* 验证lib 暂时用情况
*

View File

@ -44,16 +44,19 @@ public class ProjectInfoModel extends BaseModel {
*/
private String runLibDesc;
/**
* 创建
* 最后修改
*/
private String createUser;
private String modifyUser;
public String getCreateUser() {
return createUser;
public String getModifyUser() {
if (StrUtil.isEmpty(modifyUser)) {
return UserModel.SYSTEM_OCCUPY_NAME;
}
return modifyUser;
}
public void setCreateUser(String createUser) {
this.createUser = createUser;
public void setModifyUser(String modifyUser) {
this.modifyUser = modifyUser;
}
/**

View File

@ -155,7 +155,7 @@
field: 'createTime', title: '创建时间', sort: true, width: '13%'
},
{
field: 'createUser', title: '创建人', sort: true, width: '13%'
field: 'modifyUser', title: '最后修改人', sort: true, width: '13%'
},
{field: 'modifyTime', title: '修改时间', sort: true, width: '13%'},
{title: '运行状态', templet: "#status_templ", sort: true, width: '10%'},