修复:项目管理添加续费后,项目没进入续费列表

This commit is contained in:
2025-03-14 18:33:35 +08:00
parent 9dd705779c
commit 7c3bc36424
2 changed files with 31 additions and 14 deletions

View File

@@ -90,8 +90,6 @@ public class MainController extends BaseController {
@Resource
private UserRoleService userRoleService;
@Resource
private CompanyService companyService;
@Resource
private UserRefereeService userRefereeService;
@@ -104,23 +102,40 @@ public class MainController extends BaseController {
// 租户ID
Integer tenantId = 5;
// 用户信息
User user;
User user = null;
// 普通用户登录
if(param.getTenantId() != null){
// 表单主动交租户ID
tenantId = param.getTenantId();
}else {
// 从域名获取租户ID
tenantId = getTenantId();
}
// 超级管理员登录
if(param.getIsSuperAdmin() != null){
user = userService.getAdminByPhone(username);
if(user == null){
return fail("账号不存在",null);
// 如果是手机号码登录
if(username.matches("\\d+") && username.length() == 11){
final LoginParam loginParam = new LoginParam();
loginParam.setPhone(username);
loginParam.setTenantId(tenantId);
final List<User> adminsByPhone = userService.getAdminsByPhone(loginParam);
if(adminsByPhone.isEmpty()){
return fail("用户不存在",null);
}
user = adminsByPhone.get(0);
// 签发token
String access_token = JwtUtil.buildToken(new JwtSubject(username, user.getTenantId()),
tokenExpireTime, configProperties.getTokenKey());
// 同一个手机号码存在多个管理员账号
if(adminsByPhone.size() > 1){
String message = "请选择登录用户";
user.setHasAdminsByPhone(true);
return success(message, new LoginResult(access_token, user));
}
}
}else {
// 普通用户登录
if(param.getTenantId() != null){
// 表单主动交租户ID
tenantId = param.getTenantId();
}else {
// 从域名获取租户ID
tenantId = getTenantId();
}
// 判断图形验证码
if (!tenantId.equals(10159)) {
if(param.getCode() == null){

View File

@@ -1,6 +1,7 @@
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;
@@ -76,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("添加失败");