文件记录表新增app_id字段
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.gxwebsoft.common.system.controller;
|
||||
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@@ -184,6 +186,8 @@ public class MainController extends BaseController {
|
||||
menu.setMenuType(0);
|
||||
list.add(menu);
|
||||
tenant.setMenu(list);
|
||||
// 服务器时间
|
||||
tenant.setDate(serverTime());
|
||||
// 授权信息
|
||||
HashMap<String, Object> config = new HashMap<>();
|
||||
config.put("LICENSE_CODE", "dk9mcwJyetRWQlxWRiojIzJCLi8mcQ5Wa4ojI0NWZqJWd6ICZpJCL0kjNwl1NnhENahnIvl2cyVmdiwiIiATMuEjI6IibQf0NW==");
|
||||
@@ -972,6 +976,34 @@ public class MainController extends BaseController {
|
||||
return success("注册成功", tenant.getTenantId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取服务器时间
|
||||
* @return String
|
||||
*/
|
||||
@ApiOperation("获取服务器时间")
|
||||
@GetMapping("/serverTime")
|
||||
public ApiResult<?> serverTime(){
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
// 今天日期
|
||||
DateTime date = DateUtil.date();
|
||||
String today= DateUtil.today();
|
||||
// 明天日期
|
||||
final DateTime dateTime = DateUtil.tomorrow();
|
||||
String tomorrow = DateUtil.format(dateTime, "yyyy-MM-dd");
|
||||
// 今天星期几
|
||||
final int week = DateUtil.thisDayOfWeek();;
|
||||
final DateTime nextWeek = DateUtil.nextWeek();
|
||||
|
||||
map.put("now",DateUtil.now());
|
||||
map.put("today",today);
|
||||
map.put("tomorrow",tomorrow);
|
||||
map.put("week",week);
|
||||
map.put("minDate",DateUtil.offset(date, DateField.DAY_OF_WEEK, -7 ));
|
||||
map.put("maxDate",DateUtil.offset(date, DateField.DAY_OF_WEEK, 7 ));
|
||||
map.put("nextWeek",nextWeek);
|
||||
return success(map);
|
||||
}
|
||||
|
||||
// 缓存租户信息
|
||||
private void saveRedis(Tenant tenant) {
|
||||
String key = "tenant:" + tenant.getTenantId();
|
||||
|
||||
@@ -42,6 +42,9 @@ public class FileRecord implements Serializable {
|
||||
@ApiModelProperty("备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty("应用ID")
|
||||
private Integer appId;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
private Integer createUserId;
|
||||
|
||||
|
||||
@@ -52,14 +52,6 @@ public class Tenant implements Serializable {
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
// @ApiModelProperty(value = "游客")
|
||||
// @TableField(exist = false)
|
||||
// private String username;
|
||||
|
||||
// @ApiModelProperty(value = "游客身份")
|
||||
// @TableField(exist = false)
|
||||
// private String token;
|
||||
|
||||
@ApiModelProperty(value = "菜单信息")
|
||||
@TableField(exist = false)
|
||||
private List<Menu> menu;
|
||||
@@ -80,4 +72,8 @@ public class Tenant implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private Object config;
|
||||
|
||||
@ApiModelProperty(value = "服务器时间")
|
||||
@TableField(exist = false)
|
||||
private Object date;
|
||||
|
||||
}
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
<if test="param.path != null">
|
||||
AND a.path LIKE CONCAT('%', #{param.path}, '%')
|
||||
</if>
|
||||
<if test="param.appId != null">
|
||||
AND a.app_id = #{param.appId}
|
||||
</if>
|
||||
<if test="param.createUserId != null">
|
||||
AND a.create_user_id = #{param.createUserId}
|
||||
</if>
|
||||
|
||||
@@ -38,6 +38,10 @@ public class FileRecordParam extends BaseParam {
|
||||
@ApiModelProperty("文件存储路径")
|
||||
private String path;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
@ApiModelProperty("应用ID")
|
||||
private Integer appId;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
@ApiModelProperty("创建人")
|
||||
private Integer createUserId;
|
||||
|
||||
Reference in New Issue
Block a user