```
feat(WxUtil): 优化企业微信access_token缓存处理逻辑支持解析JSON格式的缓存数据,同时兼容旧版纯字符串格式。当缓存中存在 access_token时,优先使用缓存值并直接调用用户信息获取方法。若缓存 解析失败,则降级使用原值以保证功能可用性。此外,调整了日志输出内容,使其更符合调试需求,并在重新获取token 时将完整的API响应缓存至Redis,与其他模块保持一致性。```
This commit is contained in:
@@ -73,24 +73,44 @@ public class WxUtil {
|
||||
// 获取access_token
|
||||
public void getAccessToken(String code) {
|
||||
String key = "cache"+ this.tenantId +":ww:access_token";
|
||||
final String access_token = stringRedisTemplate.opsForValue().get(key);
|
||||
if(access_token != null){
|
||||
this.getUserInfo(code,access_token);
|
||||
}else {
|
||||
String url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" +this.appId+ "&corpsecret="+ this.appSecret;
|
||||
System.out.println("url = " + url);
|
||||
String response = HttpUtil.get(url, CharsetUtil.CHARSET_UTF_8);
|
||||
System.out.println("response = " + response);
|
||||
final JSONObject jsonObject = JSONObject.parseObject(response);
|
||||
// 获取成功
|
||||
if(jsonObject.getString("access_token") != null){
|
||||
this.access_token = jsonObject.getString("access_token");
|
||||
this.expires_in = jsonObject.getString("expires_in");
|
||||
stringRedisTemplate.opsForValue().set(key,this.access_token,7000, TimeUnit.SECONDS);
|
||||
System.out.println("获取access_token成功 = " + this.access_token);
|
||||
this.getUserInfo(code,this.access_token);
|
||||
final String cachedValue = stringRedisTemplate.opsForValue().get(key);
|
||||
|
||||
if(cachedValue != null){
|
||||
try {
|
||||
// 尝试解析JSON格式的缓存
|
||||
JSONObject cachedJson = JSONObject.parseObject(cachedValue);
|
||||
String accessToken = cachedJson.getString("access_token");
|
||||
if (accessToken != null) {
|
||||
this.access_token = accessToken;
|
||||
this.getUserInfo(code, accessToken);
|
||||
return;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 如果解析失败,可能是旧格式的纯字符串token
|
||||
System.out.println("企业微信缓存token格式异常,使用原值: " + e.getMessage());
|
||||
this.access_token = cachedValue;
|
||||
this.getUserInfo(code, cachedValue);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 缓存中没有,重新获取
|
||||
String url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" +this.appId+ "&corpsecret="+ this.appSecret;
|
||||
System.out.println("调用企业微信API获取token - URL: " + url);
|
||||
String response = HttpUtil.get(url, CharsetUtil.CHARSET_UTF_8);
|
||||
System.out.println("企业微信API响应: " + response);
|
||||
final JSONObject jsonObject = JSONObject.parseObject(response);
|
||||
|
||||
// 获取成功
|
||||
if(jsonObject.getString("access_token") != null){
|
||||
this.access_token = jsonObject.getString("access_token");
|
||||
this.expires_in = jsonObject.getString("expires_in");
|
||||
|
||||
// 缓存完整的JSON响应,与其他方法保持一致
|
||||
stringRedisTemplate.opsForValue().set(key, response, 7000, TimeUnit.SECONDS);
|
||||
System.out.println("获取企业微信access_token成功 = " + this.access_token);
|
||||
this.getUserInfo(code, this.access_token);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取userinfo
|
||||
|
||||
@@ -73,24 +73,44 @@ public class WxWorkUtil {
|
||||
// 获取access_token
|
||||
public void getAccessToken(String code) {
|
||||
String key = "cache"+ this.tenantId +":ww:access_token";
|
||||
final String access_token = stringRedisTemplate.opsForValue().get(key);
|
||||
if(access_token != null){
|
||||
this.getUserInfo(code,access_token);
|
||||
}else {
|
||||
String url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" +this.appId+ "&corpsecret="+ this.appSecret;
|
||||
System.out.println("url = " + url);
|
||||
String response = HttpUtil.get(url, CharsetUtil.CHARSET_UTF_8);
|
||||
System.out.println("response = " + response);
|
||||
final JSONObject jsonObject = JSONObject.parseObject(response);
|
||||
// 获取成功
|
||||
if(jsonObject.getString("access_token") != null){
|
||||
this.access_token = jsonObject.getString("access_token");
|
||||
this.expires_in = jsonObject.getString("expires_in");
|
||||
stringRedisTemplate.opsForValue().set(key,this.access_token,7000, TimeUnit.SECONDS);
|
||||
System.out.println("获取access_token成功 = " + this.access_token);
|
||||
this.getUserInfo(code,this.access_token);
|
||||
final String cachedValue = stringRedisTemplate.opsForValue().get(key);
|
||||
|
||||
if(cachedValue != null){
|
||||
try {
|
||||
// 尝试解析JSON格式的缓存
|
||||
JSONObject cachedJson = JSONObject.parseObject(cachedValue);
|
||||
String accessToken = cachedJson.getString("access_token");
|
||||
if (accessToken != null) {
|
||||
this.access_token = accessToken;
|
||||
this.getUserInfo(code, accessToken);
|
||||
return;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 如果解析失败,可能是旧格式的纯字符串token
|
||||
System.out.println("企业微信Work缓存token格式异常,使用原值: " + e.getMessage());
|
||||
this.access_token = cachedValue;
|
||||
this.getUserInfo(code, cachedValue);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 缓存中没有,重新获取
|
||||
String url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" +this.appId+ "&corpsecret="+ this.appSecret;
|
||||
System.out.println("调用企业微信Work API获取token - URL: " + url);
|
||||
String response = HttpUtil.get(url, CharsetUtil.CHARSET_UTF_8);
|
||||
System.out.println("企业微信Work API响应: " + response);
|
||||
final JSONObject jsonObject = JSONObject.parseObject(response);
|
||||
|
||||
// 获取成功
|
||||
if(jsonObject.getString("access_token") != null){
|
||||
this.access_token = jsonObject.getString("access_token");
|
||||
this.expires_in = jsonObject.getString("expires_in");
|
||||
|
||||
// 缓存完整的JSON响应,与其他方法保持一致
|
||||
stringRedisTemplate.opsForValue().set(key, response, 7000, TimeUnit.SECONDS);
|
||||
System.out.println("获取企业微信Work access_token成功 = " + this.access_token);
|
||||
this.getUserInfo(code, this.access_token);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取userinfo
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -108,10 +108,22 @@ public class WxNotificationServiceImpl implements WxNotificationService {
|
||||
private String getWxAccessToken(Integer tenantId) {
|
||||
String cacheKey = "wx_official_access_token:" + tenantId;
|
||||
|
||||
// 先从缓存获取
|
||||
String cachedToken = stringRedisTemplate.opsForValue().get(cacheKey);
|
||||
if (cachedToken != null) {
|
||||
return cachedToken;
|
||||
// 先从缓存获取,支持JSON格式
|
||||
String cachedValue = stringRedisTemplate.opsForValue().get(cacheKey);
|
||||
if (cachedValue != null) {
|
||||
try {
|
||||
// 尝试解析JSON格式的缓存
|
||||
JSONObject cachedJson = JSONObject.parseObject(cachedValue);
|
||||
String accessToken = cachedJson.getString("access_token");
|
||||
if (accessToken != null) {
|
||||
System.out.println("从缓存获取到微信公众号access_token: " + accessToken.substring(0, Math.min(10, accessToken.length())) + "...");
|
||||
return accessToken;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 如果解析失败,可能是旧格式的纯字符串token
|
||||
System.out.println("微信公众号缓存token格式异常,使用原值: " + e.getMessage());
|
||||
return cachedValue;
|
||||
}
|
||||
}
|
||||
|
||||
// 缓存中没有,重新获取
|
||||
@@ -124,14 +136,13 @@ public class WxNotificationServiceImpl implements WxNotificationService {
|
||||
throw new RuntimeException("微信公众号配置不完整");
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 调用微信API获取access_token
|
||||
// 调用微信API获取access_token
|
||||
String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid="
|
||||
+ appId + "&secret=" + appSecret;
|
||||
|
||||
System.out.println("调用微信公众号API获取token - 租户ID: " + tenantId);
|
||||
String response = HttpUtil.get(url, CharsetUtil.CHARSET_UTF_8);
|
||||
System.out.println("response = " + response);
|
||||
System.out.println("微信公众号API响应: " + response);
|
||||
JSONObject jsonObject = JSONObject.parseObject(response);
|
||||
|
||||
String accessToken = jsonObject.getString("access_token");
|
||||
@@ -142,10 +153,11 @@ public class WxNotificationServiceImpl implements WxNotificationService {
|
||||
throw new RuntimeException("获取access_token失败: " + errorMsg);
|
||||
}
|
||||
|
||||
// 缓存access_token,提前5分钟过期
|
||||
// 缓存完整的JSON响应,与其他方法保持一致
|
||||
int cacheSeconds = expiresIn != null ? expiresIn - 300 : 7200 - 300;
|
||||
stringRedisTemplate.opsForValue().set(cacheKey, accessToken, cacheSeconds, TimeUnit.SECONDS);
|
||||
stringRedisTemplate.opsForValue().set(cacheKey, response, cacheSeconds, TimeUnit.SECONDS);
|
||||
|
||||
System.out.println("获取微信公众号access_token成功,租户ID: " + tenantId);
|
||||
return accessToken;
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -8,7 +8,6 @@ import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.common.core.config.ConfigProperties;
|
||||
import com.gxwebsoft.common.core.security.JwtUtil;
|
||||
import com.gxwebsoft.common.core.utils.CommonUtil;
|
||||
import com.gxwebsoft.common.core.utils.RedisUtil;
|
||||
@@ -60,8 +59,6 @@ public class OaAppController extends BaseController {
|
||||
private OaAppUserService oaAppUserService;
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
@Resource
|
||||
private ConfigProperties configProperties;
|
||||
|
||||
@PreAuthorize("hasAuthority('oa:app:list')")
|
||||
@Operation(summary = "分页查询应用")
|
||||
@@ -79,6 +76,7 @@ public class OaAppController extends BaseController {
|
||||
if(!StrUtil.equals(d.getRoleCode(),"superAdmin") && !StrUtil.equals(d.getRoleCode(),"admin")){
|
||||
// 非管理员按项目成员权限显示
|
||||
final List<OaAppUser> list = oaAppUserService.list(new LambdaQueryWrapper<OaAppUser>().eq(OaAppUser::getUserId, userId));
|
||||
System.out.println("list = " + list);
|
||||
final Set<Integer> collect = list.stream().map(OaAppUser::getAppId).collect(Collectors.toSet());
|
||||
param.setAppIds(collect);
|
||||
}
|
||||
@@ -201,42 +199,42 @@ public class OaAppController extends BaseController {
|
||||
@GetMapping("/data")
|
||||
public ApiResult<Map<String, Integer>> data() {
|
||||
Map<String, Integer> data = new HashMap<>();
|
||||
long totalNum = oaAppService.count(
|
||||
Integer totalNum = oaAppService.count(
|
||||
new LambdaQueryWrapper<>()
|
||||
);
|
||||
long totalNum2 = oaAppService.count(
|
||||
Integer totalNum2 = oaAppService.count(
|
||||
new LambdaQueryWrapper<OaApp>()
|
||||
.eq(OaApp::getAppStatus, "开发中")
|
||||
);
|
||||
long totalNum3 = oaAppService.count(
|
||||
Integer totalNum3 = oaAppService.count(
|
||||
new LambdaQueryWrapper<OaApp>()
|
||||
.eq(OaApp::getAppStatus, "已上架")
|
||||
);
|
||||
long totalNum4 = oaAppService.count(
|
||||
Integer totalNum4 = oaAppService.count(
|
||||
new LambdaQueryWrapper<OaApp>()
|
||||
.eq(OaApp::getAppStatus, "已上架")
|
||||
.eq(OaApp::getShowExpiration,false)
|
||||
);
|
||||
long totalNum5 = oaAppService.count(
|
||||
Integer totalNum5 = oaAppService.count(
|
||||
new LambdaQueryWrapper<OaApp>()
|
||||
.eq(OaApp::getAppStatus, "已下架")
|
||||
);
|
||||
long totalNum6 = oaAppService.count(
|
||||
Integer totalNum6 = oaAppService.count(
|
||||
new LambdaQueryWrapper<OaApp>()
|
||||
.eq(OaApp::getShowCase,true)
|
||||
);
|
||||
long totalNum7 = oaAppService.count(
|
||||
Integer totalNum7 = oaAppService.count(
|
||||
new LambdaQueryWrapper<OaApp>()
|
||||
.eq(OaApp::getShowIndex, true)
|
||||
);
|
||||
|
||||
data.put("totalNum", Math.toIntExact(totalNum));
|
||||
data.put("totalNum2", Math.toIntExact(totalNum2));
|
||||
data.put("totalNum3", Math.toIntExact(totalNum3));
|
||||
data.put("totalNum4", Math.toIntExact(totalNum4));
|
||||
data.put("totalNum5", Math.toIntExact(totalNum5));
|
||||
data.put("totalNum6", Math.toIntExact(totalNum6));
|
||||
data.put("totalNum7", Math.toIntExact(totalNum7));
|
||||
data.put("totalNum", totalNum);
|
||||
data.put("totalNum2", totalNum2);
|
||||
data.put("totalNum3", totalNum3);
|
||||
data.put("totalNum4", totalNum4);
|
||||
data.put("totalNum5", totalNum5);
|
||||
data.put("totalNum6", totalNum6);
|
||||
data.put("totalNum7", totalNum7);
|
||||
return success(data);
|
||||
}
|
||||
|
||||
@@ -252,7 +250,7 @@ public class OaAppController extends BaseController {
|
||||
// 读取项目附件(链式构建GET请求)
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("appId", d.getAppId());
|
||||
final String build = UrlBuilder.of(configProperties.getServerUrl() + "/page").setQuery(new UrlQuery(map)).build();
|
||||
final String build = UrlBuilder.of("https://server.gxwebsoft.com/api/file/page").setQuery(new UrlQuery(map)).build();
|
||||
String response = HttpRequest.get(build)
|
||||
.header("Authorization", param.getToken())
|
||||
.header("Tenantid", d.getTenantId().toString())
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.gxwebsoft.oa.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.oa.entity.OaApp;
|
||||
import com.gxwebsoft.oa.service.OaAppRenewService;
|
||||
import com.gxwebsoft.oa.entity.OaAppRenew;
|
||||
import com.gxwebsoft.oa.param.OaAppRenewParam;
|
||||
@@ -10,13 +13,18 @@ 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 com.gxwebsoft.oa.service.OaAppService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 续费管理控制器
|
||||
@@ -30,6 +38,8 @@ import java.util.List;
|
||||
public class OaAppRenewController extends BaseController {
|
||||
@Resource
|
||||
private OaAppRenewService oaAppRenewService;
|
||||
@Resource
|
||||
private OaAppService oaAppService;
|
||||
|
||||
@Operation(summary = "分页查询续费管理")
|
||||
@GetMapping("/page")
|
||||
@@ -67,6 +77,7 @@ public class OaAppRenewController extends BaseController {
|
||||
oaAppRenew.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (oaAppRenewService.save(oaAppRenew)) {
|
||||
oaAppService.update(new LambdaUpdateWrapper<OaApp>().eq(OaApp::getAppId, oaAppRenew.getAppId()).set(OaApp::getShowExpiration, true));
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
@@ -117,4 +128,36 @@ public class OaAppRenewController extends BaseController {
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "统计信息")
|
||||
@GetMapping("/data")
|
||||
public ApiResult<Map<String, BigDecimal>> data() {
|
||||
Map<String, BigDecimal> data = new HashMap<>();
|
||||
final User loginUser = getLoginUser();
|
||||
if(loginUser == null){
|
||||
return fail("请先登录",null);
|
||||
}
|
||||
|
||||
// 获取当前年份的起止时间
|
||||
LocalDateTime startOfYear = LocalDateTime.now().withMonth(1).withDayOfMonth(1)
|
||||
.withHour(0).withMinute(0).withSecond(0);
|
||||
LocalDateTime endOfYear = startOfYear.plusYears(1).minusNanos(1);
|
||||
|
||||
// 今年应收续费总金额(到期时间在今年的记录)
|
||||
BigDecimal totalNum1 = oaAppService.sumMoney(new LambdaQueryWrapper<OaApp>()
|
||||
.between(OaApp::getExpirationTime, startOfYear, endOfYear));
|
||||
// 今年已收续费总金额(到期时间在今年的记录)
|
||||
BigDecimal totalNum2 = oaAppRenewService.sumMoney(new LambdaQueryWrapper<OaAppRenew>()
|
||||
.between(OaAppRenew::getEndTime, startOfYear, endOfYear));
|
||||
|
||||
// 今年已收续费总金额(创建时间在今年且已支付的记录)
|
||||
BigDecimal totalNum3 = oaAppRenewService.sumMoney(new LambdaQueryWrapper<OaAppRenew>()
|
||||
.between(OaAppRenew::getCreateTime, startOfYear, endOfYear)
|
||||
.isNotNull(OaAppRenew::getMoney));
|
||||
|
||||
data.put("totalNum1", totalNum1 != null ? totalNum1 : BigDecimal.ZERO);
|
||||
data.put("totalNum2", totalNum2 != null ? totalNum2 : BigDecimal.ZERO);
|
||||
return success(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -41,11 +41,8 @@ public class OaAppUserController extends BaseController {
|
||||
@Operation(summary = "查询全部应用成员")
|
||||
@GetMapping()
|
||||
public ApiResult<List<OaAppUser>> list(OaAppUserParam param) {
|
||||
PageParam<OaAppUser, OaAppUserParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(oaAppUserService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(oaAppUserService.listRel(param));
|
||||
return success(oaAppUserService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('oa:oaAppUser:list')")
|
||||
@@ -53,19 +50,13 @@ public class OaAppUserController extends BaseController {
|
||||
@Operation(summary = "根据id查询应用成员")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<OaAppUser> get(@PathVariable("id") Integer id) {
|
||||
return success(oaAppUserService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(oaAppUserService.getByIdRel(id));
|
||||
return success(oaAppUserService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加应用成员")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody OaAppUser oaAppUser) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
oaAppUser.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (oaAppUserService.save(oaAppUser)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
package com.gxwebsoft.oa.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.oa.service.OaAssetsServerService;
|
||||
import com.gxwebsoft.oa.entity.OaAssetsServer;
|
||||
import com.gxwebsoft.oa.param.OaAssetsServerParam;
|
||||
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 com.gxwebsoft.oa.service.OaAssetsServerService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -19,53 +17,47 @@ import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器资产记录表控制器
|
||||
* 服务控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:57:41
|
||||
* @since 2024-10-21 19:15:26
|
||||
*/
|
||||
@Tag(name = "服务器资产记录表管理")
|
||||
@Tag(name = "服务管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/oa/oa-assets-server")
|
||||
public class OaAssetsServerController extends BaseController {
|
||||
@Resource
|
||||
private OaAssetsServerService oaAssetsServerService;
|
||||
|
||||
@Operation(summary = "分页查询服务器资产记录表")
|
||||
@Operation(summary = "分页查询服务")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<OaAssetsServer>> page(OaAssetsServerParam param) {
|
||||
// 使用关联查询
|
||||
return success(oaAssetsServerService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部服务器资产记录表")
|
||||
@Operation(summary = "查询全部服务")
|
||||
@GetMapping()
|
||||
public ApiResult<List<OaAssetsServer>> list(OaAssetsServerParam param) {
|
||||
PageParam<OaAssetsServer, OaAssetsServerParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(oaAssetsServerService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(oaAssetsServerService.listRel(param));
|
||||
return success(oaAssetsServerService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('oa:oaAssetsServer:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询服务器资产记录表")
|
||||
@Operation(summary = "根据id查询服务")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<OaAssetsServer> get(@PathVariable("id") Integer id) {
|
||||
return success(oaAssetsServerService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(oaAssetsServerService.getByIdRel(id));
|
||||
return success(oaAssetsServerService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加服务器资产记录表")
|
||||
@PreAuthorize("hasAuthority('oa:oaAssetsServer:save')")
|
||||
@Operation(summary = "添加服务")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody OaAssetsServer oaAssetsServer) {
|
||||
// 记录当前登录用户id
|
||||
|
||||
User loginUser = getLoginUser();
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
oaAssetsServer.setUserId(loginUser.getUserId());
|
||||
oaAssetsServer.setTenantId(loginUser.getTenantId());
|
||||
}
|
||||
if (oaAssetsServerService.save(oaAssetsServer)) {
|
||||
return success("添加成功");
|
||||
@@ -73,7 +65,8 @@ public class OaAssetsServerController extends BaseController {
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改服务器资产记录表")
|
||||
@PreAuthorize("hasAuthority('oa:oaAssetsServer:update')")
|
||||
@Operation(summary = "修改服务")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody OaAssetsServer oaAssetsServer) {
|
||||
if (oaAssetsServerService.updateById(oaAssetsServer)) {
|
||||
@@ -82,7 +75,8 @@ public class OaAssetsServerController extends BaseController {
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除服务器资产记录表")
|
||||
@PreAuthorize("hasAuthority('oa:oaAssetsServer:remove')")
|
||||
@Operation(summary = "删除服务")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (oaAssetsServerService.removeById(id)) {
|
||||
@@ -91,7 +85,8 @@ public class OaAssetsServerController extends BaseController {
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加服务器资产记录表")
|
||||
@PreAuthorize("hasAuthority('oa:oaAssetsServer:save')")
|
||||
@Operation(summary = "批量添加服务")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<OaAssetsServer> list) {
|
||||
if (oaAssetsServerService.saveBatch(list)) {
|
||||
@@ -100,16 +95,18 @@ public class OaAssetsServerController extends BaseController {
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改服务器资产记录表")
|
||||
@PreAuthorize("hasAuthority('oa:oaAssetsServer:update')")
|
||||
@Operation(summary = "批量修改服务")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<OaAssetsServer> batchParam) {
|
||||
if (batchParam.update(oaAssetsServerService, "server_id")) {
|
||||
if (batchParam.update(oaAssetsServerService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除服务器资产记录表")
|
||||
@PreAuthorize("hasAuthority('oa:oaAssetsServer:remove')")
|
||||
@Operation(summary = "批量删除服务")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (oaAssetsServerService.removeByIds(ids)) {
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.gxwebsoft.oa.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.oa.service.OaTaskRecordService;
|
||||
import com.gxwebsoft.oa.entity.OaTaskRecord;
|
||||
import com.gxwebsoft.oa.param.OaTaskRecordParam;
|
||||
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.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
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-10 20:57:42
|
||||
*/
|
||||
@Tag(name = "工单回复记录表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/oa/oa-task-record")
|
||||
public class OaTaskRecordController extends BaseController {
|
||||
@Resource
|
||||
private OaTaskRecordService oaTaskRecordService;
|
||||
|
||||
@Operation(summary = "分页查询工单回复记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<OaTaskRecord>> page(OaTaskRecordParam param) {
|
||||
// 使用关联查询
|
||||
return success(oaTaskRecordService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部工单回复记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<OaTaskRecord>> list(OaTaskRecordParam param) {
|
||||
PageParam<OaTaskRecord, OaTaskRecordParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(oaTaskRecordService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(oaTaskRecordService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('oa:oaTaskRecord:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询工单回复记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<OaTaskRecord> get(@PathVariable("id") Integer id) {
|
||||
return success(oaTaskRecordService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(oaTaskRecordService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加工单回复记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody OaTaskRecord oaTaskRecord) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
oaTaskRecord.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (oaTaskRecordService.save(oaTaskRecord)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改工单回复记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody OaTaskRecord oaTaskRecord) {
|
||||
if (oaTaskRecordService.updateById(oaTaskRecord)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除工单回复记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (oaTaskRecordService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加工单回复记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<OaTaskRecord> list) {
|
||||
if (oaTaskRecordService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改工单回复记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<OaTaskRecord> batchParam) {
|
||||
if (batchParam.update(oaTaskRecordService, "task_record_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除工单回复记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (oaTaskRecordService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,10 +4,10 @@ import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.gxwebsoft.common.system.entity.FileRecord;
|
||||
@@ -195,8 +195,7 @@ public class OaApp implements Serializable {
|
||||
private Integer recommend;
|
||||
|
||||
@Schema(description = "到期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime expirationTime;
|
||||
private Date expirationTime;
|
||||
|
||||
@Schema(description = "续费金额")
|
||||
private BigDecimal renewMoney;
|
||||
@@ -227,12 +226,10 @@ public class OaApp implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
@Schema(description = "成员管理")
|
||||
@TableField(exist = false)
|
||||
|
||||
@@ -2,8 +2,7 @@ package com.gxwebsoft.oa.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -49,7 +48,6 @@ public class OaAppField implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@ package com.gxwebsoft.oa.entity;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -37,12 +36,10 @@ public class OaAppRenew implements Serializable {
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
private Date startTime;
|
||||
|
||||
@Schema(description = "到期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
private Date endTime;
|
||||
|
||||
@Schema(description = "企业ID")
|
||||
private Integer companyId;
|
||||
@@ -63,7 +60,6 @@ public class OaAppRenew implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,7 @@ package com.gxwebsoft.oa.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -51,8 +50,7 @@ public class OaAppUrl implements Serializable {
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@@ -2,8 +2,7 @@ package com.gxwebsoft.oa.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -45,7 +44,6 @@ public class OaAppUser implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -99,11 +99,11 @@ public class OaAssets implements Serializable {
|
||||
|
||||
@Schema(description = "购买时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
private Date startTime;
|
||||
|
||||
@Schema(description = "到期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
private Date endTime;
|
||||
|
||||
@Schema(description = "置顶状态")
|
||||
private String isTop;
|
||||
@@ -151,11 +151,9 @@ public class OaAssets implements Serializable {
|
||||
private String logo;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,8 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -82,11 +81,9 @@ public class OaAssetsCode implements Serializable {
|
||||
private String logo;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -54,11 +54,11 @@ public class OaAssetsDomain implements Serializable {
|
||||
|
||||
@Schema(description = "购买时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
private Date startTime;
|
||||
|
||||
@Schema(description = "到期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
private Date endTime;
|
||||
|
||||
@Schema(description = "置顶状态")
|
||||
private String isTop;
|
||||
@@ -94,11 +94,9 @@ public class OaAssetsDomain implements Serializable {
|
||||
private String logo;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -54,11 +54,11 @@ public class OaAssetsEmail implements Serializable {
|
||||
|
||||
@Schema(description = "购买时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
private Date startTime;
|
||||
|
||||
@Schema(description = "到期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
private Date endTime;
|
||||
|
||||
@Schema(description = "置顶状态")
|
||||
private String isTop;
|
||||
@@ -94,11 +94,9 @@ public class OaAssetsEmail implements Serializable {
|
||||
private String logo;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,11 +4,11 @@ import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -59,11 +59,11 @@ public class OaAssetsMysql implements Serializable {
|
||||
|
||||
@Schema(description = "购买时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
private Date startTime;
|
||||
|
||||
@Schema(description = "到期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
private Date endTime;
|
||||
|
||||
@Schema(description = "置顶状态")
|
||||
private String isTop;
|
||||
@@ -99,11 +99,9 @@ public class OaAssetsMysql implements Serializable {
|
||||
private String logo;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,133 +1,56 @@
|
||||
package com.gxwebsoft.oa.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 服务器资产记录表
|
||||
* 服务
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:57:41
|
||||
* @since 2024-10-21 19:15:26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "OaAssetsServer对象", description = "服务器资产记录表")
|
||||
@Schema(name = "OaAssetsServer对象", description = "服务")
|
||||
public class OaAssetsServer implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "资产ID")
|
||||
@TableId(value = "server_id", type = IdType.AUTO)
|
||||
private Integer serverId;
|
||||
@Schema(description = "插件id")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "资产名称")
|
||||
private String name;
|
||||
@Schema(description = "服务名称")
|
||||
private String server;
|
||||
|
||||
@Schema(description = "资产标识")
|
||||
private String code;
|
||||
@Schema(description = "接口地址")
|
||||
private String serverUrl;
|
||||
|
||||
@Schema(description = "资产类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "服务器厂商")
|
||||
private String brand;
|
||||
|
||||
@Schema(description = "服务器配置")
|
||||
private String configuration;
|
||||
|
||||
@Schema(description = "初始账号")
|
||||
private String account;
|
||||
|
||||
@Schema(description = "初始密码")
|
||||
private String password;
|
||||
|
||||
@Schema(description = "(阿里云/腾讯云)登录账号")
|
||||
private String brandAccount;
|
||||
|
||||
@Schema(description = "(阿里云/腾讯云)登录密码")
|
||||
private String brandPassword;
|
||||
|
||||
@Schema(description = "宝塔面板")
|
||||
private String panel;
|
||||
|
||||
@Schema(description = "宝塔面板账号")
|
||||
private String panelAccount;
|
||||
|
||||
@Schema(description = "宝塔面板密码")
|
||||
private String panelPassword;
|
||||
|
||||
@Schema(description = "财务信息-合同金额")
|
||||
private BigDecimal financeAmount;
|
||||
|
||||
@Schema(description = "购买年限")
|
||||
private Integer financeYears;
|
||||
|
||||
@Schema(description = "续费金额")
|
||||
private BigDecimal financeRenew;
|
||||
|
||||
@Schema(description = "客户名称")
|
||||
private String financeCustomerName;
|
||||
|
||||
@Schema(description = "客户联系人")
|
||||
private String financeCustomerContact;
|
||||
|
||||
@Schema(description = "客户联系电话")
|
||||
private String financeCustomerPhone;
|
||||
|
||||
@Schema(description = "客户ID")
|
||||
private Integer customerId;
|
||||
|
||||
@Schema(description = "客户名称")
|
||||
private String customerName;
|
||||
|
||||
@Schema(description = "开放端口")
|
||||
private String openPort;
|
||||
|
||||
@Schema(description = "详情内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "购买时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(description = "到期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "置顶状态")
|
||||
private String isTop;
|
||||
|
||||
@Schema(description = "可见性(public,private,protected)")
|
||||
private String visibility;
|
||||
|
||||
@Schema(description = "宝塔接口秘钥")
|
||||
private String btSign;
|
||||
|
||||
@Schema(description = "文章排序(数字越小越靠前)")
|
||||
@Schema(description = "排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "描述")
|
||||
@Schema(description = "服务器ID")
|
||||
private Integer assetsId;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "客户ID")
|
||||
private Integer companyId;
|
||||
@Schema(description = "状态, 10待审核 20已通过 30已驳回")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "机构id")
|
||||
private Integer organizationId;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private String status;
|
||||
@Schema(description = "可见用户")
|
||||
private String userIds;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
@@ -136,12 +59,15 @@ public class OaAssetsServer implements Serializable {
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
@Schema(description = "应用名称")
|
||||
@TableField(exist = false)
|
||||
private String tenantName;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
@Schema(description = "应用图标")
|
||||
@TableField(exist = false)
|
||||
private String logo;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -5,8 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -66,8 +65,7 @@ public class OaAssetsSite implements Serializable {
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "服务到期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime expirationTime;
|
||||
private Date expirationTime;
|
||||
|
||||
@Schema(description = "模版ID")
|
||||
private Integer templateId;
|
||||
@@ -160,11 +158,9 @@ public class OaAssetsSite implements Serializable {
|
||||
private String logo;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,11 +4,11 @@ import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -53,11 +53,11 @@ public class OaAssetsSoftwareCert implements Serializable {
|
||||
|
||||
@Schema(description = "购买时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
private Date startTime;
|
||||
|
||||
@Schema(description = "到期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
private Date endTime;
|
||||
|
||||
@Schema(description = "置顶状态")
|
||||
private String isTop;
|
||||
@@ -93,11 +93,9 @@ public class OaAssetsSoftwareCert implements Serializable {
|
||||
private String logo;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,11 +4,11 @@ import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -62,11 +62,11 @@ public class OaAssetsSsl implements Serializable {
|
||||
|
||||
@Schema(description = "购买时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
private Date startTime;
|
||||
|
||||
@Schema(description = "到期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
private Date endTime;
|
||||
|
||||
@Schema(description = "置顶状态")
|
||||
private String isTop;
|
||||
@@ -105,11 +105,9 @@ public class OaAssetsSsl implements Serializable {
|
||||
private String logo;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,11 +4,11 @@ import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -53,11 +53,11 @@ public class OaAssetsTrademark implements Serializable {
|
||||
|
||||
@Schema(description = "购买时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
private Date startTime;
|
||||
|
||||
@Schema(description = "到期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
private Date endTime;
|
||||
|
||||
@Schema(description = "置顶状态")
|
||||
private String isTop;
|
||||
@@ -93,11 +93,9 @@ public class OaAssetsTrademark implements Serializable {
|
||||
private String logo;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,7 @@ package com.gxwebsoft.oa.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -45,7 +44,6 @@ public class OaAssetsUser implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -59,11 +59,11 @@ public class OaAssetsVhost implements Serializable {
|
||||
|
||||
@Schema(description = "购买时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
private Date startTime;
|
||||
|
||||
@Schema(description = "到期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
private Date endTime;
|
||||
|
||||
@Schema(description = "置顶状态")
|
||||
private String isTop;
|
||||
@@ -102,11 +102,9 @@ public class OaAssetsVhost implements Serializable {
|
||||
private String logo;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,8 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -71,12 +70,10 @@ public class OaCompany implements Serializable {
|
||||
private String businessEntity;
|
||||
|
||||
@Schema(description = "服务开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
private Date startTime;
|
||||
|
||||
@Schema(description = "服务到期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime expirationTime;
|
||||
private Date expirationTime;
|
||||
|
||||
@Schema(description = "应用版本 10体验版 20授权版 30旗舰版")
|
||||
private Integer version;
|
||||
@@ -187,11 +184,9 @@ public class OaCompany implements Serializable {
|
||||
private String logo;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,8 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -50,7 +49,6 @@ public class OaCompanyField implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,8 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -47,7 +46,6 @@ public class OaCompanyUser implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,7 @@ package com.gxwebsoft.oa.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -68,7 +67,6 @@ public class OaLink implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@ package com.gxwebsoft.oa.entity;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -96,11 +95,9 @@ public class OaProduct implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,7 @@ package com.gxwebsoft.oa.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -71,11 +70,9 @@ public class OaProductTabs implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@ package com.gxwebsoft.oa.entity;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import java.time.LocalDate;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -126,11 +125,9 @@ public class OaTask implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,7 @@ package com.gxwebsoft.oa.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -63,11 +62,9 @@ public class OaTaskCount implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
72
src/main/java/com/gxwebsoft/oa/entity/OaTaskRecord.java
Normal file
72
src/main/java/com/gxwebsoft/oa/entity/OaTaskRecord.java
Normal file
@@ -0,0 +1,72 @@
|
||||
package com.gxwebsoft.oa.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 工单回复记录表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:57:42
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "OaTaskRecord对象", description = "工单回复记录表")
|
||||
public class OaTaskRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "回复ID")
|
||||
@TableId(value = "task_record_id", type = IdType.AUTO)
|
||||
private Integer taskRecordId;
|
||||
|
||||
@Schema(description = "上级id, 0是顶级")
|
||||
private Integer parentId;
|
||||
|
||||
@Schema(description = "工单ID")
|
||||
private Integer taskId;
|
||||
|
||||
@Schema(description = "内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "机密信息")
|
||||
private String confidential;
|
||||
|
||||
@Schema(description = "联系电话")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "工单附件")
|
||||
private String files;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0待处理, 1已完成")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -2,8 +2,7 @@ package com.gxwebsoft.oa.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -45,7 +44,6 @@ public class OaTaskUser implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "加入时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.gxwebsoft.oa.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.oa.entity.OaAppField;
|
||||
import com.gxwebsoft.oa.param.OaAppFieldParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -16,22 +18,22 @@ import java.util.List;
|
||||
*/
|
||||
public interface OaAppFieldMapper extends BaseMapper<OaAppField> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<OaAppField>
|
||||
*/
|
||||
List<OaAppField> selectPageRel(@Param("page") IPage<OaAppField> page,
|
||||
@Param("param") OaAppFieldParam param);
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<OaAppField>
|
||||
*/
|
||||
List<OaAppField> selectPageRel(@Param("page") IPage<OaAppField> page,
|
||||
@Param("param") OaAppFieldParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<OaAppField> selectListRel(@Param("param") OaAppFieldParam param);
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<OaAppField> selectListRel(@Param("param") OaAppFieldParam param);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.gxwebsoft.oa.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.oa.entity.OaApp;
|
||||
import com.gxwebsoft.oa.param.OaAppParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -16,22 +18,30 @@ import java.util.List;
|
||||
*/
|
||||
public interface OaAppMapper extends BaseMapper<OaApp> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<OaApp>
|
||||
*/
|
||||
List<OaApp> selectPageRel(@Param("page") IPage<OaApp> page,
|
||||
@Param("param") OaAppParam param);
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<OaApp>
|
||||
*/
|
||||
List<OaApp> selectPageRel(@Param("page") IPage<OaApp> page,
|
||||
@Param("param") OaAppParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<OaApp> selectListRel(@Param("param") OaAppParam param);
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<OaApp> selectListRel(@Param("param") OaAppParam param);
|
||||
|
||||
/**
|
||||
* 统计金额总和
|
||||
*
|
||||
* @param wrapper 查询条件
|
||||
* @return 金额总和
|
||||
*/
|
||||
BigDecimal selectSumMoney(@Param("ew") Wrapper<?> wrapper);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package com.gxwebsoft.oa.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.oa.entity.OaAppRenew;
|
||||
import com.gxwebsoft.oa.param.OaAppRenewParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -34,4 +37,11 @@ public interface OaAppRenewMapper extends BaseMapper<OaAppRenew> {
|
||||
*/
|
||||
List<OaAppRenew> selectListRel(@Param("param") OaAppRenewParam param);
|
||||
|
||||
/**
|
||||
* 统计金额总和
|
||||
*
|
||||
* @param wrapper 查询条件
|
||||
* @return 金额总和
|
||||
*/
|
||||
BigDecimal selectSumMoney(@Param("ew") Wrapper<?> wrapper);
|
||||
}
|
||||
|
||||
@@ -9,10 +9,10 @@ import org.apache.ibatis.annotations.Param;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器资产记录表Mapper
|
||||
* 服务Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:57:41
|
||||
* @since 2024-10-21 19:15:26
|
||||
*/
|
||||
public interface OaAssetsServerMapper extends BaseMapper<OaAssetsServer> {
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.oa.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.oa.entity.OaTaskRecord;
|
||||
import com.gxwebsoft.oa.param.OaTaskRecordParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工单回复记录表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:57:42
|
||||
*/
|
||||
public interface OaTaskRecordMapper extends BaseMapper<OaTaskRecord> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<OaTaskRecord>
|
||||
*/
|
||||
List<OaTaskRecord> selectPageRel(@Param("page") IPage<OaTaskRecord> page,
|
||||
@Param("param") OaTaskRecordParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<OaTaskRecord> selectListRel(@Param("param") OaTaskRecordParam param);
|
||||
|
||||
}
|
||||
@@ -226,4 +226,13 @@
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 统计金额总和 -->
|
||||
<select id="selectSumMoney" resultType="java.math.BigDecimal">
|
||||
SELECT COALESCE(SUM(renew_money), 0) as total_money
|
||||
FROM oa_app
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<?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.oa.mapper.OaAppRenewMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,
|
||||
b.company_name,b.short_name,b.company_logo,
|
||||
c.app_name
|
||||
FROM oa_app_renew a
|
||||
LEFT JOIN oa_company b ON a.company_id = b.company_id
|
||||
LEFT JOIN oa_app c ON a.app_id = c.app_id
|
||||
<where>
|
||||
<if test="param.appRenewId != null">
|
||||
AND a.app_renew_id = #{param.appRenewId}
|
||||
</if>
|
||||
<if test="param.money != null">
|
||||
AND a.money = #{param.money}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.startTime != null">
|
||||
AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%')
|
||||
</if>
|
||||
<if test="param.endTime != null">
|
||||
AND a.end_time LIKE CONCAT('%', #{param.endTime}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.appId != null">
|
||||
AND a.app_id = #{param.appId}
|
||||
</if>
|
||||
<if test="param.companyId != null">
|
||||
AND a.company_id = #{param.companyId}
|
||||
</if>
|
||||
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.OaAppRenew">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.OaAppRenew">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 统计金额总和 -->
|
||||
<select id="selectSumMoney" resultType="java.math.BigDecimal">
|
||||
SELECT COALESCE(SUM(money), 0) as total_money
|
||||
FROM oa_app_renew
|
||||
<if test="ew != null">
|
||||
${ew.customSqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -128,6 +128,7 @@
|
||||
<if test="param.keywords != null">
|
||||
AND (a.tenant_id = #{param.keywords}
|
||||
OR a.name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.code LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
|
||||
@@ -7,107 +7,32 @@
|
||||
SELECT a.*
|
||||
FROM oa_assets_server a
|
||||
<where>
|
||||
<if test="param.serverId != null">
|
||||
AND a.server_id = #{param.serverId}
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
<if test="param.server != null">
|
||||
AND a.server LIKE CONCAT('%', #{param.server}, '%')
|
||||
</if>
|
||||
<if test="param.code != null">
|
||||
AND a.code LIKE CONCAT('%', #{param.code}, '%')
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type LIKE CONCAT('%', #{param.type}, '%')
|
||||
</if>
|
||||
<if test="param.brand != null">
|
||||
AND a.brand LIKE CONCAT('%', #{param.brand}, '%')
|
||||
</if>
|
||||
<if test="param.configuration != null">
|
||||
AND a.configuration LIKE CONCAT('%', #{param.configuration}, '%')
|
||||
</if>
|
||||
<if test="param.account != null">
|
||||
AND a.account LIKE CONCAT('%', #{param.account}, '%')
|
||||
</if>
|
||||
<if test="param.password != null">
|
||||
AND a.password LIKE CONCAT('%', #{param.password}, '%')
|
||||
</if>
|
||||
<if test="param.brandAccount != null">
|
||||
AND a.brand_account LIKE CONCAT('%', #{param.brandAccount}, '%')
|
||||
</if>
|
||||
<if test="param.brandPassword != null">
|
||||
AND a.brand_password LIKE CONCAT('%', #{param.brandPassword}, '%')
|
||||
</if>
|
||||
<if test="param.panel != null">
|
||||
AND a.panel LIKE CONCAT('%', #{param.panel}, '%')
|
||||
</if>
|
||||
<if test="param.panelAccount != null">
|
||||
AND a.panel_account LIKE CONCAT('%', #{param.panelAccount}, '%')
|
||||
</if>
|
||||
<if test="param.panelPassword != null">
|
||||
AND a.panel_password LIKE CONCAT('%', #{param.panelPassword}, '%')
|
||||
</if>
|
||||
<if test="param.financeAmount != null">
|
||||
AND a.finance_amount = #{param.financeAmount}
|
||||
</if>
|
||||
<if test="param.financeYears != null">
|
||||
AND a.finance_years = #{param.financeYears}
|
||||
</if>
|
||||
<if test="param.financeRenew != null">
|
||||
AND a.finance_renew = #{param.financeRenew}
|
||||
</if>
|
||||
<if test="param.financeCustomerName != null">
|
||||
AND a.finance_customer_name LIKE CONCAT('%', #{param.financeCustomerName}, '%')
|
||||
</if>
|
||||
<if test="param.financeCustomerContact != null">
|
||||
AND a.finance_customer_contact LIKE CONCAT('%', #{param.financeCustomerContact}, '%')
|
||||
</if>
|
||||
<if test="param.financeCustomerPhone != null">
|
||||
AND a.finance_customer_phone LIKE CONCAT('%', #{param.financeCustomerPhone}, '%')
|
||||
</if>
|
||||
<if test="param.customerId != null">
|
||||
AND a.customer_id = #{param.customerId}
|
||||
</if>
|
||||
<if test="param.customerName != null">
|
||||
AND a.customer_name LIKE CONCAT('%', #{param.customerName}, '%')
|
||||
</if>
|
||||
<if test="param.openPort != null">
|
||||
AND a.open_port LIKE CONCAT('%', #{param.openPort}, '%')
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.startTime != null">
|
||||
AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%')
|
||||
</if>
|
||||
<if test="param.endTime != null">
|
||||
AND a.end_time LIKE CONCAT('%', #{param.endTime}, '%')
|
||||
</if>
|
||||
<if test="param.isTop != null">
|
||||
AND a.is_top LIKE CONCAT('%', #{param.isTop}, '%')
|
||||
</if>
|
||||
<if test="param.visibility != null">
|
||||
AND a.visibility LIKE CONCAT('%', #{param.visibility}, '%')
|
||||
</if>
|
||||
<if test="param.btSign != null">
|
||||
AND a.bt_sign LIKE CONCAT('%', #{param.btSign}, '%')
|
||||
<if test="param.serverUrl != null">
|
||||
AND a.server_url LIKE CONCAT('%', #{param.serverUrl}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.assetsId != null">
|
||||
AND a.assets_id = #{param.assetsId}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.companyId != null">
|
||||
AND a.company_id = #{param.companyId}
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.organizationId != null">
|
||||
AND a.organization_id = #{param.organizationId}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status LIKE CONCAT('%', #{param.status}, '%')
|
||||
<if test="param.userIds != null">
|
||||
AND a.user_ids LIKE CONCAT('%', #{param.userIds}, '%')
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
@@ -121,6 +46,11 @@
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.tenant_id = #{param.keywords}
|
||||
OR a.server_url LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<?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.oa.mapper.OaTaskRecordMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM oa_task_record a
|
||||
<where>
|
||||
<if test="param.taskRecordId != null">
|
||||
AND a.task_record_id = #{param.taskRecordId}
|
||||
</if>
|
||||
<if test="param.parentId != null">
|
||||
AND a.parent_id = #{param.parentId}
|
||||
</if>
|
||||
<if test="param.taskId != null">
|
||||
AND a.task_id = #{param.taskId}
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.confidential != null">
|
||||
AND a.confidential LIKE CONCAT('%', #{param.confidential}, '%')
|
||||
</if>
|
||||
<if test="param.phone != null">
|
||||
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
|
||||
</if>
|
||||
<if test="param.files != null">
|
||||
AND a.files LIKE CONCAT('%', #{param.files}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</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 >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.OaTaskRecord">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.OaTaskRecord">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -243,4 +243,8 @@ public class OaAppParam extends BaseParam {
|
||||
@TableField(exist = false)
|
||||
private Set<Integer> appIds;
|
||||
|
||||
@Schema(description = "访问令牌")
|
||||
@TableField(exist = false)
|
||||
private String token;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,139 +1,58 @@
|
||||
package com.gxwebsoft.oa.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 com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 服务器资产记录表查询参数
|
||||
* 服务查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:57:41
|
||||
* @since 2024-10-21 19:15:26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "OaAssetsServerParam对象", description = "服务器资产记录表查询参数")
|
||||
@Schema(name = "OaAssetsServerParam对象", description = "服务查询参数")
|
||||
public class OaAssetsServerParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "资产ID")
|
||||
@Schema(description = "插件id")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer serverId;
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "资产名称")
|
||||
private String name;
|
||||
@Schema(description = "服务名称")
|
||||
private String server;
|
||||
|
||||
@Schema(description = "资产标识")
|
||||
private String code;
|
||||
@Schema(description = "接口地址")
|
||||
private String serverUrl;
|
||||
|
||||
@Schema(description = "资产类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "服务器厂商")
|
||||
private String brand;
|
||||
|
||||
@Schema(description = "服务器配置")
|
||||
private String configuration;
|
||||
|
||||
@Schema(description = "初始账号")
|
||||
private String account;
|
||||
|
||||
@Schema(description = "初始密码")
|
||||
private String password;
|
||||
|
||||
@Schema(description = "(阿里云/腾讯云)登录账号")
|
||||
private String brandAccount;
|
||||
|
||||
@Schema(description = "(阿里云/腾讯云)登录密码")
|
||||
private String brandPassword;
|
||||
|
||||
@Schema(description = "宝塔面板")
|
||||
private String panel;
|
||||
|
||||
@Schema(description = "宝塔面板账号")
|
||||
private String panelAccount;
|
||||
|
||||
@Schema(description = "宝塔面板密码")
|
||||
private String panelPassword;
|
||||
|
||||
@Schema(description = "财务信息-合同金额")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal financeAmount;
|
||||
|
||||
@Schema(description = "购买年限")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer financeYears;
|
||||
|
||||
@Schema(description = "续费金额")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal financeRenew;
|
||||
|
||||
@Schema(description = "客户名称")
|
||||
private String financeCustomerName;
|
||||
|
||||
@Schema(description = "客户联系人")
|
||||
private String financeCustomerContact;
|
||||
|
||||
@Schema(description = "客户联系电话")
|
||||
private String financeCustomerPhone;
|
||||
|
||||
@Schema(description = "客户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer customerId;
|
||||
|
||||
@Schema(description = "客户名称")
|
||||
private String customerName;
|
||||
|
||||
@Schema(description = "开放端口")
|
||||
private String openPort;
|
||||
|
||||
@Schema(description = "详情内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "购买时间")
|
||||
private String startTime;
|
||||
|
||||
@Schema(description = "到期时间")
|
||||
private String endTime;
|
||||
|
||||
@Schema(description = "置顶状态")
|
||||
private String isTop;
|
||||
|
||||
@Schema(description = "可见性(public,private,protected)")
|
||||
private String visibility;
|
||||
|
||||
@Schema(description = "宝塔接口秘钥")
|
||||
private String btSign;
|
||||
|
||||
@Schema(description = "文章排序(数字越小越靠前)")
|
||||
@Schema(description = "排序号")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "描述")
|
||||
@Schema(description = "服务器ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer assetsId;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "客户ID")
|
||||
@Schema(description = "状态, 10待审核 20已通过 30已驳回")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer companyId;
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "机构id")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer organizationId;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private String status;
|
||||
@Schema(description = "可见用户")
|
||||
private String userIds;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
package com.gxwebsoft.oa.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.oa.entity.OaAppRenew;
|
||||
import com.gxwebsoft.oa.param.OaAppRenewParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -39,4 +43,11 @@ public interface OaAppRenewService extends IService<OaAppRenew> {
|
||||
*/
|
||||
OaAppRenew getByIdRel(Integer appRenewId);
|
||||
|
||||
/**
|
||||
* 统计金额总和
|
||||
* @param wrapper 查询条件
|
||||
* @return 金额总和
|
||||
*/
|
||||
BigDecimal sumMoney(LambdaQueryWrapper<OaAppRenew> wrapper);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.gxwebsoft.oa.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.oa.entity.OaApp;
|
||||
import com.gxwebsoft.oa.param.OaAppParam;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -39,4 +41,11 @@ public interface OaAppService extends IService<OaApp> {
|
||||
*/
|
||||
OaApp getByIdRel(Integer appId);
|
||||
|
||||
/**
|
||||
* 统计金额总和
|
||||
*
|
||||
* @param wrapper 查询条件
|
||||
* @return 金额总和
|
||||
*/
|
||||
BigDecimal sumMoney(LambdaQueryWrapper<OaApp> wrapper);
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ import com.gxwebsoft.oa.param.OaAssetsServerParam;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器资产记录表Service
|
||||
* 服务Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:57:41
|
||||
* @since 2024-10-21 19:15:26
|
||||
*/
|
||||
public interface OaAssetsServerService extends IService<OaAssetsServer> {
|
||||
|
||||
@@ -34,9 +34,9 @@ public interface OaAssetsServerService extends IService<OaAssetsServer> {
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param serverId 资产ID
|
||||
* @param id 插件id
|
||||
* @return OaAssetsServer
|
||||
*/
|
||||
OaAssetsServer getByIdRel(Integer serverId);
|
||||
OaAssetsServer getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.oa.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.oa.entity.OaTaskRecord;
|
||||
import com.gxwebsoft.oa.param.OaTaskRecordParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工单回复记录表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:57:42
|
||||
*/
|
||||
public interface OaTaskRecordService extends IService<OaTaskRecord> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<OaTaskRecord>
|
||||
*/
|
||||
PageResult<OaTaskRecord> pageRel(OaTaskRecordParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<OaTaskRecord>
|
||||
*/
|
||||
List<OaTaskRecord> listRel(OaTaskRecordParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param taskRecordId 回复ID
|
||||
* @return OaTaskRecord
|
||||
*/
|
||||
OaTaskRecord getByIdRel(Integer taskRecordId);
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.gxwebsoft.oa.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.oa.mapper.OaAppRenewMapper;
|
||||
import com.gxwebsoft.oa.service.OaAppRenewService;
|
||||
@@ -9,6 +10,7 @@ import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -44,4 +46,9 @@ public class OaAppRenewServiceImpl extends ServiceImpl<OaAppRenewMapper, OaAppRe
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal sumMoney(LambdaQueryWrapper<OaAppRenew> wrapper) {
|
||||
return baseMapper.selectSumMoney(wrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.gxwebsoft.oa.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.oa.mapper.OaAppMapper;
|
||||
import com.gxwebsoft.oa.service.OaAppService;
|
||||
@@ -9,6 +10,7 @@ import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -23,7 +25,7 @@ public class OaAppServiceImpl extends ServiceImpl<OaAppMapper, OaApp> implements
|
||||
@Override
|
||||
public PageResult<OaApp> pageRel(OaAppParam param) {
|
||||
PageParam<OaApp, OaAppParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<OaApp> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
@@ -44,4 +46,9 @@ public class OaAppServiceImpl extends ServiceImpl<OaAppMapper, OaApp> implements
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal sumMoney(LambdaQueryWrapper<OaApp> wrapper) {
|
||||
return baseMapper.selectSumMoney(wrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ public class OaAppUserServiceImpl extends ServiceImpl<OaAppUserMapper, OaAppUser
|
||||
@Override
|
||||
public PageResult<OaAppUser> pageRel(OaAppUserParam param) {
|
||||
PageParam<OaAppUser, OaAppUserParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<OaAppUser> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
@@ -33,7 +32,6 @@ public class OaAppUserServiceImpl extends ServiceImpl<OaAppUserMapper, OaAppUser
|
||||
List<OaAppUser> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<OaAppUser, OaAppUserParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
package com.gxwebsoft.oa.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.oa.mapper.OaAssetsServerMapper;
|
||||
import com.gxwebsoft.oa.service.OaAssetsServerService;
|
||||
import com.gxwebsoft.oa.entity.OaAssetsServer;
|
||||
import com.gxwebsoft.oa.param.OaAssetsServerParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.oa.entity.OaAssetsServer;
|
||||
import com.gxwebsoft.oa.mapper.OaAssetsServerMapper;
|
||||
import com.gxwebsoft.oa.param.OaAssetsServerParam;
|
||||
import com.gxwebsoft.oa.service.OaAssetsServerService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器资产记录表Service实现
|
||||
* 服务Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:57:41
|
||||
* @since 2024-10-21 19:15:26
|
||||
*/
|
||||
@Service
|
||||
public class OaAssetsServerServiceImpl extends ServiceImpl<OaAssetsServerMapper, OaAssetsServer> implements OaAssetsServerService {
|
||||
@@ -23,7 +23,7 @@ public class OaAssetsServerServiceImpl extends ServiceImpl<OaAssetsServerMapper,
|
||||
@Override
|
||||
public PageResult<OaAssetsServer> pageRel(OaAssetsServerParam param) {
|
||||
PageParam<OaAssetsServer, OaAssetsServerParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<OaAssetsServer> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
@@ -33,14 +33,14 @@ public class OaAssetsServerServiceImpl extends ServiceImpl<OaAssetsServerMapper,
|
||||
List<OaAssetsServer> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<OaAssetsServer, OaAssetsServerParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OaAssetsServer getByIdRel(Integer serverId) {
|
||||
public OaAssetsServer getByIdRel(Integer id) {
|
||||
OaAssetsServerParam param = new OaAssetsServerParam();
|
||||
param.setServerId(serverId);
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.gxwebsoft.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.oa.mapper.OaAssetsSslMapper;
|
||||
import com.gxwebsoft.oa.service.OaAssetsSslService;
|
||||
@@ -27,11 +28,10 @@ public class OaAssetsSslServiceImpl extends ServiceImpl<OaAssetsSslMapper, OaAss
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<OaAssetsSsl> list = baseMapper.selectPageRel(page, param);
|
||||
list.forEach(d -> {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
// 即将过期(一周内过期的)
|
||||
d.setSoon(d.getEndTime().minusDays(7).compareTo(now));
|
||||
d.setSoon(DateUtil.offsetDay(d.getEndTime(), -7).compareTo(DateUtil.date()));
|
||||
// 是否过期 -1已过期 大于0 未过期
|
||||
d.setStatus(d.getEndTime().compareTo(now));
|
||||
d.setStatus(d.getEndTime().compareTo(DateUtil.date()));
|
||||
});
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.oa.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.oa.mapper.OaTaskRecordMapper;
|
||||
import com.gxwebsoft.oa.service.OaTaskRecordService;
|
||||
import com.gxwebsoft.oa.entity.OaTaskRecord;
|
||||
import com.gxwebsoft.oa.param.OaTaskRecordParam;
|
||||
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-10 20:57:42
|
||||
*/
|
||||
@Service
|
||||
public class OaTaskRecordServiceImpl extends ServiceImpl<OaTaskRecordMapper, OaTaskRecord> implements OaTaskRecordService {
|
||||
|
||||
@Override
|
||||
public PageResult<OaTaskRecord> pageRel(OaTaskRecordParam param) {
|
||||
PageParam<OaTaskRecord, OaTaskRecordParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<OaTaskRecord> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OaTaskRecord> listRel(OaTaskRecordParam param) {
|
||||
List<OaTaskRecord> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<OaTaskRecord, OaTaskRecordParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OaTaskRecord getByIdRel(Integer taskRecordId) {
|
||||
OaTaskRecordParam param = new OaTaskRecordParam();
|
||||
param.setTaskRecordId(taskRecordId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user