改造:company模块

This commit is contained in:
2024-09-20 16:13:13 +08:00
parent bd2cc7ccfa
commit 6bdae78df2
37 changed files with 552 additions and 58 deletions

View File

@@ -71,7 +71,7 @@ public class CmsWebsiteController extends BaseController {
//return success(cmsWebsiteService.listRel(param));
}
@PreAuthorize("hasAuthority('cms:cmsWebsite:list')")
@PreAuthorize("hasAuthority('cms:website:list')")
@OperationLog
@ApiOperation("根据id查询网站信息记录表")
@GetMapping("/{id}")
@@ -217,4 +217,19 @@ public class CmsWebsiteController extends BaseController {
return success(website);
}
@PreAuthorize("hasAuthority('cms:website:remove')")
@ApiOperation("清除缓存")
@DeleteMapping("/clearSiteInfo/{key}")
public ApiResult<?> clearSiteInfo(@PathVariable("key") String key) {
final String siteInfo = redisUtil.get(key);
// 清除指定key
redisUtil.delete(key);
// 清除小程序缓存
redisUtil.delete("MpInfo:".concat(getTenantId().toString()));
// 清除网站缓存
redisUtil.delete("RootSiteInfo:".concat(getTenantId().toString()));
// 选择支付方式
redisUtil.delete("SelectPayment:".concat(getTenantId().toString()));
return success("清除成功");
}
}

View File

@@ -53,7 +53,7 @@ public class CmsDesign implements Serializable {
private String content;
@ApiModelProperty(value = "是否开启布局")
private Integer showLayout;
private Boolean showLayout;
@ApiModelProperty(value = "页面布局")
private String layout;

View File

@@ -73,6 +73,7 @@ public class MybatisPlusConfig {
"sys_environment",
"sys_components",
"sys_website_field",
"sys_domain",
"sys_white_domain",
"cms_website",
"cms_domain",

View File

@@ -1,19 +1,18 @@
package com.gxwebsoft.common.system.controller;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.core.exception.BusinessException;
import com.gxwebsoft.common.core.utils.CommonUtil;
import com.gxwebsoft.common.core.utils.RedisUtil;
import com.gxwebsoft.common.core.web.*;
import com.gxwebsoft.common.system.entity.Company;
import com.gxwebsoft.common.system.entity.Tenant;
import com.gxwebsoft.common.system.entity.User;
import com.gxwebsoft.common.system.entity.UserCollection;
import com.gxwebsoft.common.system.entity.*;
import com.gxwebsoft.common.system.mapper.CompanyMapper;
import com.gxwebsoft.common.system.mapper.TenantMapper;
import com.gxwebsoft.common.system.param.CompanyParam;
import com.gxwebsoft.common.system.service.CompanyService;
import com.gxwebsoft.common.system.service.DomainService;
import com.gxwebsoft.common.system.service.TenantService;
import com.gxwebsoft.common.system.service.UserCollectionService;
import io.swagger.annotations.Api;
@@ -48,6 +47,8 @@ public class CompanyController extends BaseController {
@Resource
private TenantMapper tenantMapper;
@Resource
private DomainService domainService;
@Resource
private UserCollectionService userCollectionService;
@Resource
private RedisUtil redisUtil;
@@ -141,6 +142,28 @@ public class CompanyController extends BaseController {
@ApiOperation("修改企业信息")
@PutMapping()
public ApiResult<?> update(@RequestBody Company company) {
// 待授权的二级域名
String domain = company.getFreeDomain().concat(".websoft.top");
// 授权新的免费域名
if (StrUtil.isNotBlank(company.getFreeDomain())) {
// 删除旧授权域名
final Domain one = domainService.getOne(new LambdaQueryWrapper<Domain>().eq(Domain::getType, 2).eq(Domain::getCompanyId, company.getCompanyId()).eq(Domain::getDeleted,0).last("limit 1"));
if(one != null){
redisUtil.delete("Domain:".concat(one.getDomain()));
domainService.removeById(one);
}
// 保存记录
final Domain sysDomain = new Domain();
sysDomain.setDomain(domain);
sysDomain.setType(2);
sysDomain.setSortNumber(100);
sysDomain.setCompanyId(company.getCompanyId());
sysDomain.setTenantId(company.getTenantId());
domainService.save(sysDomain);
company.setDomain(domain);
// 写入缓存
redisUtil.set("Domain:".concat(domain), company.getTenantId());
}
if (companyService.updateById(company)) {
// 清除缓存
redisUtil.delete("TenantInfo:".concat(company.getTenantId().toString()));

View File

@@ -0,0 +1,132 @@
package com.gxwebsoft.common.system.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.common.system.entity.User;
import com.gxwebsoft.common.system.service.DomainService;
import com.gxwebsoft.common.system.entity.Domain;
import com.gxwebsoft.common.system.param.DomainParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 授权域名控制器
*
* @author 科技小王子
* @since 2024-09-19 23:56:33
*/
@Api(tags = "授权域名管理")
@RestController
@RequestMapping("/api/system/domain")
public class DomainController extends BaseController {
@Resource
private DomainService domainService;
@PreAuthorize("hasAuthority('sys:domain:list')")
@OperationLog
@ApiOperation("分页查询授权域名")
@GetMapping("/page")
public ApiResult<PageResult<Domain>> page(DomainParam param) {
// 使用关联查询
return success(domainService.pageRel(param));
}
@PreAuthorize("hasAuthority('sys:domain:list')")
@OperationLog
@ApiOperation("查询全部授权域名")
@GetMapping()
public ApiResult<List<Domain>> list(DomainParam param) {
// 使用关联查询
return success(domainService.listRel(param));
}
@PreAuthorize("hasAuthority('sys:domain:list')")
@OperationLog
@ApiOperation("根据id查询授权域名")
@GetMapping("/{id}")
public ApiResult<Domain> get(@PathVariable("id") Integer id) {
// 使用关联查询
return success(domainService.getByIdRel(id));
}
@PreAuthorize("hasAuthority('sys:domain:save')")
@OperationLog
@ApiOperation("添加授权域名")
@PostMapping()
public ApiResult<?> save(@RequestBody Domain domain) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
domain.setUserId(loginUser.getUserId());
}
if (domainService.save(domain)) {
return success("添加成功");
}
return fail("添加失败");
}
@PreAuthorize("hasAuthority('sys:domain:update')")
@OperationLog
@ApiOperation("修改授权域名")
@PutMapping()
public ApiResult<?> update(@RequestBody Domain domain) {
if (domainService.updateById(domain)) {
return success("修改成功");
}
return fail("修改失败");
}
@PreAuthorize("hasAuthority('sys:domain:remove')")
@OperationLog
@ApiOperation("删除授权域名")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (domainService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@PreAuthorize("hasAuthority('sys:domain:save')")
@OperationLog
@ApiOperation("批量添加授权域名")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<Domain> list) {
if (domainService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@PreAuthorize("hasAuthority('sys:domain:update')")
@OperationLog
@ApiOperation("批量修改授权域名")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<Domain> batchParam) {
if (batchParam.update(domainService, "id")) {
return success("修改成功");
}
return fail("修改失败");
}
@PreAuthorize("hasAuthority('sys:domain:remove')")
@OperationLog
@ApiOperation("批量删除授权域名")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (domainService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}

View File

@@ -84,6 +84,8 @@ public class MainController extends BaseController {
private TenantService tenantService;
@Resource
private CompanyMapper companyMapper;
@Resource
private CompanyService companyService;
@ApiOperation("用户登录")

View File

@@ -46,9 +46,12 @@ public class Company implements Serializable {
@ApiModelProperty(value = "应用标识")
private String companyLogo;
@ApiModelProperty(value = "企业域名")
@ApiModelProperty(value = "顶级域名")
private String domain;
@ApiModelProperty(value = "免费域名")
private String freeDomain;
@ApiModelProperty(value = "联系电话")
private String phone;

View File

@@ -0,0 +1,71 @@
package com.gxwebsoft.common.system.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 授权域名
*
* @author 科技小王子
* @since 2024-09-19 23:56:33
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Domain对象", description = "授权域名")
@TableName("sys_domain")
public class Domain implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "域名")
private String domain;
@ApiModelProperty(value = "主机记录")
private String hostName;
@ApiModelProperty(value = "记录值")
private String hostValue;
@ApiModelProperty(value = "备注")
private String comments;
@ApiModelProperty(value = "类型 0常规 1后台 2商家端")
private Integer type;
@ApiModelProperty(value = "状态")
private Integer status;
@ApiModelProperty(value = "排序号")
private Integer sortNumber;
@ApiModelProperty(value = "企业ID")
private Integer companyId;
@ApiModelProperty(value = "用户ID")
private Integer userId;
@ApiModelProperty(value = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@ApiModelProperty(value = "租户id")
private Integer tenantId;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "修改时间")
private LocalDateTime updateTime;
}

View File

@@ -178,6 +178,7 @@ public class User implements UserDetails {
private Boolean isAdmin;
@ApiModelProperty(value = "是否超级管理员")
@TableField(exist = false)
private Boolean isSuperAdmin;
@ApiModelProperty(value = "租户管理员ID")

View File

@@ -0,0 +1,37 @@
package com.gxwebsoft.common.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.Domain;
import com.gxwebsoft.common.system.param.DomainParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 授权域名Mapper
*
* @author 科技小王子
* @since 2024-09-19 23:56:33
*/
public interface DomainMapper extends BaseMapper<Domain> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<Domain>
*/
List<Domain> selectPageRel(@Param("page") IPage<Domain> page,
@Param("param") DomainParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<Domain> selectListRel(@Param("param") DomainParam param);
}

View File

@@ -83,6 +83,9 @@
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.appType != null">
AND a.app_type = #{param.appType}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>

View File

@@ -0,0 +1,62 @@
<?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.gxwebsoft.common.system.mapper.DomainMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM sys_domain a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.domain != null">
AND a.domain LIKE CONCAT('%', #{param.domain}, '%')
</if>
<if test="param.hostName != null">
AND a.host_name LIKE CONCAT('%', #{param.hostName}, '%')
</if>
<if test="param.hostValue != null">
AND a.host_value LIKE CONCAT('%', #{param.hostValue}, '%')
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.type != null">
AND a.type = #{param.type}
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.Domain">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.Domain">
<include refid="selectSql"></include>
</select>
</mapper>

View File

@@ -119,6 +119,9 @@ public class CompanyParam extends BaseParam {
@ApiModelProperty(value = "是否推荐")
private Boolean recommend;
@ApiModelProperty(value = "应用类型 app应用 plug插件")
private String appType;
@ApiModelProperty(value = "状态")
@QueryField(type = QueryType.EQ)
private Integer status;

View File

@@ -0,0 +1,61 @@
package com.gxwebsoft.common.system.param;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.gxwebsoft.common.core.annotation.QueryField;
import com.gxwebsoft.common.core.annotation.QueryType;
import com.gxwebsoft.common.core.web.BaseParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 授权域名查询参数
*
* @author 科技小王子
* @since 2024-09-19 23:56:33
*/
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value = "DomainParam对象", description = "授权域名查询参数")
public class DomainParam extends BaseParam {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
@QueryField(type = QueryType.EQ)
private Integer id;
@ApiModelProperty(value = "域名")
private String domain;
@ApiModelProperty(value = "主机记录")
private String hostName;
@ApiModelProperty(value = "记录值")
private String hostValue;
@ApiModelProperty(value = "备注")
private String comments;
@ApiModelProperty(value = "类型 0常规 1后台 2商家端")
@QueryField(type = QueryType.EQ)
private Integer type;
@ApiModelProperty(value = "状态")
@QueryField(type = QueryType.EQ)
private Integer status;
@ApiModelProperty(value = "排序号")
@QueryField(type = QueryType.EQ)
private Integer sortNumber;
@ApiModelProperty(value = "用户ID")
@QueryField(type = QueryType.EQ)
private Integer userId;
@ApiModelProperty(value = "是否删除, 0否, 1是")
@QueryField(type = QueryType.EQ)
private Integer deleted;
}

View File

@@ -0,0 +1,42 @@
package com.gxwebsoft.common.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.system.entity.Domain;
import com.gxwebsoft.common.system.param.DomainParam;
import java.util.List;
/**
* 授权域名Service
*
* @author 科技小王子
* @since 2024-09-19 23:56:33
*/
public interface DomainService extends IService<Domain> {
/**
* 分页关联查询
*
* @param param 查询参数
* @return PageResult<Domain>
*/
PageResult<Domain> pageRel(DomainParam param);
/**
* 关联查询全部
*
* @param param 查询参数
* @return List<Domain>
*/
List<Domain> listRel(DomainParam param);
/**
* 根据id查询
*
* @param id ID
* @return Domain
*/
Domain getByIdRel(Integer id);
}

View File

@@ -0,0 +1,47 @@
package com.gxwebsoft.common.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxwebsoft.common.system.mapper.DomainMapper;
import com.gxwebsoft.common.system.service.DomainService;
import com.gxwebsoft.common.system.entity.Domain;
import com.gxwebsoft.common.system.param.DomainParam;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.PageResult;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 授权域名Service实现
*
* @author 科技小王子
* @since 2024-09-19 23:56:33
*/
@Service
public class DomainServiceImpl extends ServiceImpl<DomainMapper, Domain> implements DomainService {
@Override
public PageResult<Domain> pageRel(DomainParam param) {
PageParam<Domain, DomainParam> page = new PageParam<>(param);
page.setDefaultOrder("create_time desc");
List<Domain> list = baseMapper.selectPageRel(page, param);
return new PageResult<>(list, page.getTotal());
}
@Override
public List<Domain> listRel(DomainParam param) {
List<Domain> list = baseMapper.selectListRel(param);
// 排序
PageParam<Domain, DomainParam> page = new PageParam<>();
page.setDefaultOrder("create_time desc");
return page.sortRecords(list);
}
@Override
public Domain getByIdRel(Integer id) {
DomainParam param = new DomainParam();
param.setId(id);
return param.getOne(baseMapper.selectListRel(param));
}
}

View File

@@ -417,6 +417,14 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, Tenant> impleme
menu.setTitle("删除文件");
menu.setAuthority("sys:org:remove");
menuService.save(menu);
menu.setParentId(parentId);
menu.setTitle("秘钥管理");
menu.setPath("/system/access-key");
menu.setComponent("/system/access-key");
menu.setIcon("KeyOutlined");
menu.setAuthority("sys:accessKey:list");
menu.setSortNumber(8);
menuService.save(menu);
menu.setMenuType(0);
menu.setParentId(parentId);
menu.setTitle("扩展插件");

View File

@@ -1,7 +1,6 @@
package com.gxwebsoft.oa.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.common.system.entity.User;
import com.gxwebsoft.oa.service.OaCompanyService;
import com.gxwebsoft.oa.entity.OaCompany;
import com.gxwebsoft.oa.param.OaCompanyParam;
@@ -22,7 +21,7 @@ import java.util.List;
* 企业信息控制器
*
* @author 科技小王子
* @since 2024-09-10 20:57:41
* @since 2024-09-20 12:33:12
*/
@Api(tags = "企业信息管理")
@RestController
@@ -61,11 +60,6 @@ public class OaCompanyController extends BaseController {
@ApiOperation("添加企业信息")
@PostMapping()
public ApiResult<?> save(@RequestBody OaCompany oaCompany) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
oaCompany.setUserId(loginUser.getUserId());
}
if (oaCompanyService.save(oaCompany)) {
return success("添加成功");
}

View File

@@ -1,7 +1,6 @@
package com.gxwebsoft.oa.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.common.system.entity.User;
import com.gxwebsoft.oa.service.OaCompanyFieldService;
import com.gxwebsoft.oa.entity.OaCompanyField;
import com.gxwebsoft.oa.param.OaCompanyFieldParam;
@@ -22,7 +21,7 @@ import java.util.List;
* 企业参数控制器
*
* @author 科技小王子
* @since 2024-09-10 20:57:42
* @since 2024-09-20 12:33:12
*/
@Api(tags = "企业参数管理")
@RestController
@@ -61,11 +60,6 @@ public class OaCompanyFieldController extends BaseController {
@ApiOperation("添加企业参数")
@PostMapping()
public ApiResult<?> save(@RequestBody OaCompanyField oaCompanyField) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
oaCompanyField.setUserId(loginUser.getUserId());
}
if (oaCompanyFieldService.save(oaCompanyField)) {
return success("添加成功");
}

View File

@@ -1,7 +1,6 @@
package com.gxwebsoft.oa.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.common.system.entity.User;
import com.gxwebsoft.oa.service.OaCompanyUserService;
import com.gxwebsoft.oa.entity.OaCompanyUser;
import com.gxwebsoft.oa.param.OaCompanyUserParam;
@@ -22,7 +21,7 @@ import java.util.List;
* 成员管理控制器
*
* @author 科技小王子
* @since 2024-09-10 20:57:42
* @since 2024-09-20 12:33:12
*/
@Api(tags = "成员管理管理")
@RestController
@@ -61,11 +60,6 @@ public class OaCompanyUserController extends BaseController {
@ApiOperation("添加成员管理")
@PostMapping()
public ApiResult<?> save(@RequestBody OaCompanyUser oaCompanyUser) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
oaCompanyUser.setUserId(loginUser.getUserId());
}
if (oaCompanyUserService.save(oaCompanyUser)) {
return success("添加成功");
}

View File

@@ -2,7 +2,7 @@ package com.gxwebsoft.oa.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.util.Date;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
@@ -15,7 +15,7 @@ import lombok.EqualsAndHashCode;
* 企业信息
*
* @author 科技小王子
* @since 2024-09-10 20:57:41
* @since 2024-09-20 12:33:12
*/
@Data
@EqualsAndHashCode(callSuper = false)
@@ -68,10 +68,10 @@ public class OaCompany implements Serializable {
private String businessEntity;
@ApiModelProperty(value = "服务开始时间")
private Date startTime;
private LocalDateTime startTime;
@ApiModelProperty(value = "服务到期时间")
private Date expirationTime;
private LocalDateTime expirationTime;
@ApiModelProperty(value = "应用版本 10体验版 20授权版 30旗舰版")
private Integer version;
@@ -174,9 +174,9 @@ public class OaCompany implements Serializable {
private Integer tenantId;
@ApiModelProperty(value = "创建时间")
private Date createTime;
private LocalDateTime createTime;
@ApiModelProperty(value = "修改时间")
private Date updateTime;
private LocalDateTime updateTime;
}

View File

@@ -2,7 +2,7 @@ package com.gxwebsoft.oa.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.util.Date;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
* 企业参数
*
* @author 科技小王子
* @since 2024-09-10 20:57:41
* @since 2024-09-20 12:33:12
*/
@Data
@EqualsAndHashCode(callSuper = false)
@@ -47,6 +47,6 @@ public class OaCompanyField implements Serializable {
private Integer tenantId;
@ApiModelProperty(value = "创建时间")
private Date createTime;
private LocalDateTime createTime;
}

View File

@@ -2,7 +2,7 @@ package com.gxwebsoft.oa.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.util.Date;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
* 成员管理
*
* @author 科技小王子
* @since 2024-09-10 20:57:42
* @since 2024-09-20 12:33:12
*/
@Data
@EqualsAndHashCode(callSuper = false)
@@ -44,6 +44,6 @@ public class OaCompanyUser implements Serializable {
private Integer tenantId;
@ApiModelProperty(value = "创建时间")
private Date createTime;
private LocalDateTime createTime;
}

View File

@@ -12,7 +12,7 @@ import java.util.List;
* 企业参数Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:57:41
* @since 2024-09-20 12:33:12
*/
public interface OaCompanyFieldMapper extends BaseMapper<OaCompanyField> {

View File

@@ -12,7 +12,7 @@ import java.util.List;
* 企业信息Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:57:41
* @since 2024-09-20 12:33:12
*/
public interface OaCompanyMapper extends BaseMapper<OaCompany> {

View File

@@ -12,7 +12,7 @@ import java.util.List;
* 成员管理Mapper
*
* @author 科技小王子
* @since 2024-09-10 20:57:42
* @since 2024-09-20 12:33:12
*/
public interface OaCompanyUserMapper extends BaseMapper<OaCompanyUser> {

View File

@@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
* 企业参数查询参数
*
* @author 科技小王子
* @since 2024-09-10 20:57:41
* @since 2024-09-20 12:33:12
*/
@Data
@EqualsAndHashCode(callSuper = false)

View File

@@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
* 企业信息查询参数
*
* @author 科技小王子
* @since 2024-09-10 20:57:41
* @since 2024-09-20 12:33:12
*/
@Data
@EqualsAndHashCode(callSuper = false)

View File

@@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
* 成员管理查询参数
*
* @author 科技小王子
* @since 2024-09-10 20:57:42
* @since 2024-09-20 12:33:12
*/
@Data
@EqualsAndHashCode(callSuper = false)

View File

@@ -11,7 +11,7 @@ import java.util.List;
* 企业参数Service
*
* @author 科技小王子
* @since 2024-09-10 20:57:42
* @since 2024-09-20 12:33:12
*/
public interface OaCompanyFieldService extends IService<OaCompanyField> {

View File

@@ -11,7 +11,7 @@ import java.util.List;
* 企业信息Service
*
* @author 科技小王子
* @since 2024-09-10 20:57:41
* @since 2024-09-20 12:33:12
*/
public interface OaCompanyService extends IService<OaCompany> {

View File

@@ -11,7 +11,7 @@ import java.util.List;
* 成员管理Service
*
* @author 科技小王子
* @since 2024-09-10 20:57:42
* @since 2024-09-20 12:33:12
*/
public interface OaCompanyUserService extends IService<OaCompanyUser> {

View File

@@ -15,7 +15,7 @@ import java.util.List;
* 企业参数Service实现
*
* @author 科技小王子
* @since 2024-09-10 20:57:42
* @since 2024-09-20 12:33:12
*/
@Service
public class OaCompanyFieldServiceImpl extends ServiceImpl<OaCompanyFieldMapper, OaCompanyField> implements OaCompanyFieldService {

View File

@@ -15,7 +15,7 @@ import java.util.List;
* 企业信息Service实现
*
* @author 科技小王子
* @since 2024-09-10 20:57:41
* @since 2024-09-20 12:33:12
*/
@Service
public class OaCompanyServiceImpl extends ServiceImpl<OaCompanyMapper, OaCompany> implements OaCompanyService {

View File

@@ -15,7 +15,7 @@ import java.util.List;
* 成员管理Service实现
*
* @author 科技小王子
* @since 2024-09-10 20:57:42
* @since 2024-09-20 12:33:12
*/
@Service
public class OaCompanyUserServiceImpl extends ServiceImpl<OaCompanyUserMapper, OaCompanyUser> implements OaCompanyUserService {

View File

@@ -59,9 +59,9 @@ public class OaGenerator {
// "oa_assets_site",
// "oa_assets_user",
// "oa_assets_vhost",
// "oa_company",
// "oa_company_field",
// "oa_company_user",
"oa_company",
"oa_company_field",
"oa_company_user",
// "oa_link",
// "oa_product",
// "oa_product_tabs",

View File

@@ -47,9 +47,10 @@ public class SysGenerator {
private static final String MODULE_NAME = "common.system";
// 需要生成的表
private static final String[] TABLE_NAMES = new String[]{
"sys_website"
// "sys_website_field"
// "sys_domain"
// "sys_website",
// "sys_website_field",
// "sys_domain",
"sys_company"
};
// 需要去除的表前缀
private static final String[] TABLE_PREFIX = new String[]{