【3.7.3 版本合并升级】

Merge remote-tracking branch 'origin/springboot3' into springboot3_sas

# Conflicts:
#	jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/JwtUtil.java
#	jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
#	jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroRealm.java
#	jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysTenantPackServiceImpl.java
#	jeecgboot-vue3/package.json
This commit is contained in:
JEECG
2025-02-24 18:24:51 +08:00
229 changed files with 23411 additions and 12302 deletions

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>jeecg-system-api</artifactId>
<groupId>org.jeecgframework.boot</groupId>
<version>3.7.1</version>
<version>3.7.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>jeecg-system-api</artifactId>
<groupId>org.jeecgframework.boot</groupId>
<version>3.7.1</version>
<version>3.7.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>jeecg-module-system</artifactId>
<groupId>org.jeecgframework.boot</groupId>
<version>3.7.1</version>
<version>3.7.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-module-system</artifactId>
<version>3.7.1</version>
<version>3.7.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -36,13 +36,13 @@
</dependency>
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-dashboard-spring-boot3-starter</artifactId>
<artifactId>jimureport-nosql-starter</artifactId>
</dependency>
<!-- 积木报表 mongo redis 支持包
<!-- 积木BI -->
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-nosql-starter</artifactId>
</dependency>-->
<artifactId>jimubi-spring-boot3-starter</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -78,4 +78,30 @@ public class JimuReportTokenService implements JmReportTokenServiceI {
// 将所有信息存放至map 解析sql/api会根据map的键值解析
return map;
}
/**
* 将jeecgboot平台的权限传递给积木报表
* @param token
* @return
*/
@Override
public String[] getPermissions(String token) {
// 获取用户信息
String username = JwtUtil.getUsername(token);
SysUserCacheInfo userInfo = null;
try {
userInfo = sysBaseApi.getCacheUser(username);
} catch (Exception e) {
log.error("获取用户信息异常:"+ e.getMessage());
}
if(userInfo == null){
return null;
}
// 查询权限
Set<String> userPermissions = sysBaseApi.getUserPermissionSet(userInfo.getSysUserId());
if(CollectionUtils.isEmpty(userPermissions)){
return null;
}
return userPermissions.toArray(new String[0]);
}
}

View File

@ -5,12 +5,15 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.jeecg.common.api.dto.message.MessageDTO;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.constant.enums.MessageTypeEnum;
import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.common.util.SpringContextUtils;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.StaticConfig;
import org.jeecg.modules.message.entity.SysMessage;
import org.jeecg.modules.message.handle.ISendMsgHandle;
import org.jeecg.modules.message.mapper.SysMessageMapper;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
@ -43,6 +46,9 @@ public class EmailSendMsgHandle implements ISendMsgHandle {
@Autowired
private RedisUtil redisUtil;
@Autowired
private SysMessageMapper sysMessageMapper;
/**
* 真实姓名变量
@ -78,6 +84,23 @@ public class EmailSendMsgHandle implements ISendMsgHandle {
@Override
public void sendMessage(MessageDTO messageDTO) {
String content = messageDTO.getContent();
String title = messageDTO.getTitle();
//update-begin---author:wangshuai---date:2024-11-20---for:【QQYUN-8523】敲敲云发邮件通知不稳定---
boolean timeJobSendEmail = this.isTimeJobSendEmail(messageDTO.getToUser(), title, content);
if(timeJobSendEmail){
return;
}
//update-end---author:wangshuai---date:2024-11-20---for:【QQYUN-8523】敲敲云发邮件通知不稳定---
this.sendEmailMessage(messageDTO);
}
/**
* 直接发送邮件
*
* @param messageDTO
*/
public void sendEmailMessage(MessageDTO messageDTO) {
String[] arr = messageDTO.getToUser().split(",");
LambdaQueryWrapper<SysUser> query = new LambdaQueryWrapper<SysUser>().in(SysUser::getUsername, arr);
List<SysUser> list = sysUserMapper.selectList(query);
@ -213,4 +236,35 @@ public class EmailSendMsgHandle implements ISendMsgHandle {
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, JwtUtil.EXPIRE_TIME * 1 / 1000);
return token;
}
/**
* 是否定时发送邮箱
* @param toUser
* @param title
* @param content
* @return
*/
private boolean isTimeJobSendEmail(String toUser, String title, String content) {
StaticConfig staticConfig = SpringContextUtils.getBean(StaticConfig.class);
Boolean timeJobSend = staticConfig.getTimeJobSend();
if(null != timeJobSend && timeJobSend){
this.addSysSmsSend(toUser,title,content);
return true;
}
return false;
}
/**
* 保存到短信发送表
*/
private void addSysSmsSend(String toUser, String title, String content) {
SysMessage sysMessage = new SysMessage();
sysMessage.setEsTitle(title);
sysMessage.setEsContent(content);
sysMessage.setEsReceiver(toUser);
sysMessage.setEsSendStatus("0");
sysMessage.setEsSendNum(0);
sysMessage.setEsType(MessageTypeEnum.YJ.getType());
sysMessageMapper.insert(sysMessage);
}
}

View File

@ -51,6 +51,9 @@ public class SendMsgJob implements Job {
md.setToUser(sysMessage.getEsReceiver());
md.setType(sysMessage.getEsType());
md.setToAll(false);
//update-begin---author:wangshuai---date:2024-11-12---for:【QQYUN-8523】敲敲云发邮件通知不稳定---
md.setIsTimeJob(true);
//update-end---author:wangshuai---date:2024-11-12---for:【QQYUN-8523】敲敲云发邮件通知不稳定---
sysBaseAPI.sendTemplateMessage(md);
//发送消息成功
sysMessage.setEsSendStatus(SendMsgStatusEnum.SUCCESS.getCode());

View File

@ -18,7 +18,7 @@ import static org.springframework.boot.actuate.endpoint.annotation.Selector.Matc
* @Date: 2024/5/13 17:02
*/
@Component
@Endpoint(id = "httptrace-new")
@Endpoint(id = "jeecghttptrace")
public class CustomHttpTraceEndpoint{
private final CustomInMemoryHttpTraceRepository repository;

View File

@ -14,6 +14,7 @@ import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.ImportExcelUtil;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.common.util.YouBianCodeUtil;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
@ -67,6 +68,8 @@ public class SysDepartController {
private ISysUserService sysUserService;
@Autowired
private ISysUserDepartService sysUserDepartService;
@Autowired
private RedisUtil redisUtil;
/**
* 查询数据 查出我的部门,并以树结构数据格式响应给前端
*
@ -472,8 +475,8 @@ public class SysDepartController {
//update-end---author:wangshuai---date:2023-10-19---for:【QQYUN-5482】系统的部门导入导出也可以改成敲敲云模式的部门路径---
//清空部门缓存
Set keys3 = redisTemplate.keys(CacheConstant.SYS_DEPARTS_CACHE + "*");
Set keys4 = redisTemplate.keys(CacheConstant.SYS_DEPART_IDS_CACHE + "*");
List<String> keys3 = redisUtil.scan(CacheConstant.SYS_DEPARTS_CACHE + "*");
List<String> keys4 = redisUtil.scan(CacheConstant.SYS_DEPART_IDS_CACHE + "*");
redisTemplate.delete(keys3);
redisTemplate.delete(keys4);
return ImportExcelUtil.imporReturnRes(errorMessageList.size(), listSysDeparts.size() - errorMessageList.size(), errorMessageList);
@ -666,8 +669,8 @@ public class SysDepartController {
listSysDeparts = ExcelImportUtil.importExcel(file.getInputStream(), ExportDepartVo.class, params);
sysDepartService.importExcel(listSysDeparts,errorMessageList);
//清空部门缓存
Set keys3 = redisTemplate.keys(CacheConstant.SYS_DEPARTS_CACHE + "*");
Set keys4 = redisTemplate.keys(CacheConstant.SYS_DEPART_IDS_CACHE + "*");
List<String> keys3 = redisUtil.scan(CacheConstant.SYS_DEPARTS_CACHE + "*");
List<String> keys4 = redisUtil.scan(CacheConstant.SYS_DEPART_IDS_CACHE + "*");
redisTemplate.delete(keys3);
redisTemplate.delete(keys4);
return ImportExcelUtil.imporReturnRes(errorMessageList.size(), listSysDeparts.size() - errorMessageList.size(), errorMessageList);

View File

@ -94,12 +94,15 @@ public class SysDepartRoleController extends JeecgController<SysDepartRole, ISys
// queryWrapper.in("depart_id",deptIds);
//我的部门,选中部门只能看当前部门下的角色
//update-begin---author:chenrui ---date:20250107 for[QQYUN-10775]验证码可以复用 #7674------------
if(oConvertUtils.isNotEmpty(deptId)){
queryWrapper.eq("depart_id",deptId);
IPage<SysDepartRole> pageList = sysDepartRoleService.page(page, queryWrapper);
return Result.ok(pageList);
}else{
return Result.ok(null);
}
IPage<SysDepartRole> pageList = sysDepartRoleService.page(page, queryWrapper);
return Result.ok(pageList);
//update-end---author:chenrui ---date:20250107 for[QQYUN-10775]验证码可以复用 #7674------------
}
/**

View File

@ -24,11 +24,7 @@ import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
import org.jeecg.config.security.utils.SecureUtil;
import org.jeecg.modules.base.service.BaseCommonService;
import org.jeecg.modules.system.entity.*;
import org.jeecg.modules.system.service.ISysTenantPackService;
import org.jeecg.modules.system.service.ISysTenantService;
import org.jeecg.modules.system.service.ISysUserService;
import org.jeecg.modules.system.service.ISysUserTenantService;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.system.service.*;
import org.jeecg.modules.system.vo.SysUserTenantVo;
import org.jeecg.modules.system.vo.tenant.TenantDepartAuthInfo;
import org.jeecg.modules.system.vo.tenant.TenantPackModel;
@ -151,6 +147,21 @@ public class SysTenantController {
return result;
}
/**
* [QQYUN-11032]【jeecg】租户套餐管理增加初始化套餐包按钮
* @param tenantId
* @return
* @author chenrui
* @date 2025/2/6 18:24
*/
@PreAuthorize("@jps.requiresPermissions('system:tenant:syncDefaultPack')")
@PostMapping(value = "/syncDefaultPack")
public Result<?> syncDefaultPack(@RequestParam(name="tenantId",required=true) Integer tenantId) {
//同步默认产品包
sysTenantPackService.syncDefaultPack(tenantId);
return Result.OK("操作成功");
}
/**
* 编辑
* @param

View File

@ -749,7 +749,10 @@ public class SysUserController {
if(oConvertUtils.isEmpty(depId)){
LoginUser user = SecureUtil.currentUser();
int userIdentity = user.getUserIdentity() != null?user.getUserIdentity():CommonConstant.USER_IDENTITY_1;
if(oConvertUtils.isNotEmpty(userIdentity) && userIdentity == CommonConstant.USER_IDENTITY_2 ){
//update-begin---author:chenrui ---date:20250107 for[QQYUN-10775]验证码可以复用 #7674------------
if(oConvertUtils.isNotEmpty(userIdentity) && userIdentity == CommonConstant.USER_IDENTITY_2
&& oConvertUtils.isNotEmpty(user.getDepartIds())) {
//update-end---author:chenrui ---date:20250107 for[QQYUN-10775]验证码可以复用 #7674------------
subDepids = sysDepartService.getMySubDepIdsByDepId(user.getDepartIds());
}
}else{
@ -1277,12 +1280,6 @@ public class SysUserController {
updateUser.setUpdateBy(JwtUtil.getUserNameByToken(request));
updateUser.setUpdateTime(new Date());
sysUserService.revertLogicDeleted(Arrays.asList(userIds.split(",")), updateUser);
// 用户变更,触发同步工作流
List<String> userNameList = sysUserService.userIdToUsername(Arrays.asList(userIds.split(",")));
if (!userNameList.isEmpty()) {
String joinedString = String.join(",", userNameList);
}
}
return Result.ok("还原成功");
}
@ -1851,4 +1848,57 @@ public class SysUserController {
public Result<?> importAppUser(HttpServletRequest request, HttpServletResponse response)throws IOException {
return sysUserService.importAppUser(request);
}
/**
* 更改手机号(敲敲云个人设置专用)
*
* @param json
* @param request
*/
@PutMapping("/changePhone")
public Result<String> changePhone(@RequestBody JSONObject json, HttpServletRequest request){
//获取登录用户名
String username = JwtUtil.getUserNameByToken(request);
sysUserService.changePhone(json,username);
return Result.ok("修改手机号成功!");
}
/**
* 发送短信验证码接口(修改手机号)
*
* @param jsonObject
* @return
*/
@PostMapping(value = "/sendChangePhoneSms")
public Result<String> sendChangePhoneSms(@RequestBody JSONObject jsonObject, HttpServletRequest request) {
//获取登录用户名
String username = JwtUtil.getUserNameByToken(request);
String ipAddress = IpUtils.getIpAddr(request);
sysUserService.sendChangePhoneSms(jsonObject, username, ipAddress);
return Result.ok("发送验证码成功!");
}
/**
* 发送注销用户手机号验证密码[敲敲云专用]
*
* @param jsonObject
* @return
*/
@PostMapping(value = "/sendLogOffPhoneSms")
public Result<String> sendLogOffPhoneSms(@RequestBody JSONObject jsonObject, HttpServletRequest request) {
Result<String> result = new Result<>();
//获取登录用户名
String username = JwtUtil.getUserNameByToken(request);
String name = jsonObject.getString("username");
if (oConvertUtils.isEmpty(name) || !name.equals(username)) {
result.setSuccess(false);
result.setMessage("发送验证码失败,用户不匹配!");
return result;
}
String ipAddress = IpUtils.getIpAddr(request);
sysUserService.sendLogOffPhoneSms(jsonObject, username, ipAddress);
result.setSuccess(true);
result.setMessage("发送验证码成功!");
return result;
}
}

View File

@ -59,7 +59,7 @@ public class SysUserOnlineController {
@RequestMapping(value = "/list", method = RequestMethod.GET)
public Result<Page<SysUserOnlineVO>> list(@RequestParam(name="username", required=false) String username,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
Collection<String> keys = redisTemplate.keys(CommonConstant.PREFIX_USER_TOKEN + "*");
Collection<String> keys = redisUtil.scan(CommonConstant.PREFIX_USER_TOKEN + "*");
List<SysUserOnlineVO> onlineList = new ArrayList<SysUserOnlineVO>();
for (String key : keys) {
String token = (String)redisUtil.get(key);

View File

@ -15,6 +15,7 @@ import org.apache.commons.lang.StringUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.constant.enums.MessageTypeEnum;
import org.jeecg.common.system.api.ISysBaseAPI;
import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.util.*;
import org.jeecg.modules.base.service.BaseCommonService;
@ -74,6 +75,9 @@ public class ThirdLoginController {
@Autowired
private ISysThirdAppConfigService appConfigService;
@Autowired
public ISysBaseAPI sysBaseAPI;
@RequestMapping("/render/{source}")
public void render(@PathVariable("source") String source, HttpServletResponse response) throws IOException {
log.info("第三方登录进入render" + source);
@ -228,7 +232,11 @@ public class ThirdLoginController {
public Result<JSONObject> getThirdLoginUser(@PathVariable("token") String token,@PathVariable("thirdType") String thirdType,@PathVariable("tenantId") String tenantId) throws Exception {
Result<JSONObject> result = new Result<JSONObject>();
String username = JwtUtil.getUsername(token);
//update-begin---author:chenrui ---date:20250210 for[QQYUN-11021]三方登录接口通过token获取用户信息漏洞修复------------
if (!TokenUtils.verifyToken(token, sysBaseAPI, redisUtil)) {
return Result.noauth("token验证失败");
}
//update-end---author:chenrui ---date:20250210 for[QQYUN-11021]三方登录接口通过token获取用户信息漏洞修复------------
//1. 校验用户是否有效
SysUser sysUser = sysUserService.getUserByName(username);
result = sysUserService.checkUserIsEffective(sysUser);
@ -557,4 +565,64 @@ public class ThirdLoginController {
}
}
}
/**
* 新版钉钉登录
*
* @param authCode
* @param state
* @param tenantId
* @param response
* @return
*/
@ResponseBody
@GetMapping("/oauth2/dingding/login")
public String OauthDingDingLogin(@RequestParam(value = "authCode", required = false) String authCode,
@RequestParam("state") String state,
@RequestParam(name = "tenantId",defaultValue = "0") String tenantId,
HttpServletResponse response) {
SysUser loginUser = thirdAppDingtalkService.oauthDingDingLogin(authCode,Integer.valueOf(tenantId));
try {
String redirect = "";
if (state.indexOf("?") > 0) {
String[] arr = state.split("\\?");
state = arr[0];
if(arr.length>1){
redirect = arr[1];
}
}
String token = saveToken(loginUser);
state += "/oauth2-app/login?oauth2LoginToken=" + URLEncoder.encode(token, "UTF-8") + "&tenantId=" + URLEncoder.encode(tenantId, "UTF-8");
state += "&thirdType=DINGTALK";
if (redirect != null && redirect.length() > 0) {
state += "&" + redirect;
}
log.info("OAuth2登录重定向地址: " + state);
try {
response.sendRedirect(state);
return "ok";
} catch (IOException e) {
log.error(e.getMessage(),e);
return "重定向失败";
}
} catch (UnsupportedEncodingException e) {
log.error(e.getMessage(),e);
return "解码失败";
}
}
/**
* 获取企业id和应用id
* @param tenantId
* @return
*/
@ResponseBody
@GetMapping("/get/corpId/clientId")
public Result<SysThirdAppConfig> getCorpIdClientId(@RequestParam(value = "tenantId", defaultValue = "0") String tenantId){
Result<SysThirdAppConfig> result = new Result<>();
SysThirdAppConfig sysThirdAppConfig = thirdAppDingtalkService.getCorpIdClientId(Integer.valueOf(tenantId));
result.setSuccess(true);
result.setResult(sysThirdAppConfig);
return result;
}
}

View File

@ -51,10 +51,10 @@ public class SysThirdAppConfig {
@Schema(description = "钉钉/企业微信应用id对应的秘钥")
private String clientSecret;
/**企业微信自建应用Secret*/
@Excel(name = "企业微信自建应用Secret", width = 15)
@Schema(description = "企业微信自建应用Secret")
private String agentAppSecret;
/**钉钉企业id*/
@Excel(name = "钉钉企业id", width = 15)
@Schema(description = "钉钉企业id")
private String corpId;
/**第三方类别(dingtalk 钉钉 wechat_enterprise 企业微信)*/
@Excel(name = "第三方类别(dingtalk 钉钉 wechat_enterprise 企业微信)", width = 15)

View File

@ -1,7 +1,7 @@
package org.jeecg.modules.system.service;
import org.jeecg.modules.system.entity.SysTenantPack;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.system.entity.SysTenantPack;
import org.jeecg.modules.system.entity.SysTenantPackUser;
import java.util.List;
@ -78,4 +78,13 @@ public interface ISysTenantPackService extends IService<SysTenantPack> {
* @param id
*/
void addTenantDefaultPack(Integer id);
/**
* 同步默认的套餐
* for [QQYUN-11032]【jeecg】租户套餐管理增加初始化套餐包按钮
* @param tenantId
* @author chenrui
* @date 2025/2/5 19:08
*/
void syncDefaultPack(Integer tenantId);
}

View File

@ -443,4 +443,19 @@ public interface ISysUserService extends IService<SysUser> {
* @param ipAddress ip地址
*/
void sendChangePhoneSms(JSONObject jsonObject, String username, String ipAddress);
/**
* 发送注销用户手机号验证密码[敲敲云专用]
* @param jsonObject
* @param username
* @param ipAddress
*/
void sendLogOffPhoneSms(JSONObject jsonObject, String username, String ipAddress);
/**
* 用户注销[敲敲云专用]
* @param jsonObject
* @param username
*/
void userLogOff(JSONObject jsonObject, String username);
}

View File

@ -27,6 +27,12 @@ public class ImportFileServiceImpl implements ImportFileServiceI {
@Override
public String doUpload(byte[] data, String saveUrl) {
return CommonUtils.uploadOnlineImage(data, upLoadPath, "import", uploadType);
//update-begin---author:chenrui ---date:20250114 for[QQYUN-10902]AutoPoi Excel表格导入有问题还会报个错。 #7703------------
String bizPath = "import";
if(null != saveUrl && !saveUrl.isEmpty()){
bizPath = saveUrl;
}
return CommonUtils.uploadOnlineImage(data, upLoadPath, bizPath, uploadType);
//update-end---author:chenrui ---date:20250114 for[QQYUN-10902]AutoPoi Excel表格导入有问题还会报个错。 #7703------------
}
}

View File

@ -1633,7 +1633,13 @@ public class SysBaseApiImpl implements ISysBaseAPI {
// 邮件消息要解析Markdown
message.setContent(HTMLUtils.parseMarkdown(message.getContent()));
}
emailSendMsgHandle.sendMessage(message);
//update-begin---author:wangshuai---date:2024-11-20---for:【QQYUN-8523】敲敲云发邮件通知不稳定---
if(message.getIsTimeJob() != null && message.getIsTimeJob()){
emailSendMsgHandle.sendEmailMessage(message);
}else{
emailSendMsgHandle.sendMessage(message);
}
//update-end---author:wangshuai---date:2024-11-20---for:【QQYUN-8523】敲敲云发邮件通知不稳定---
}else if(MessageTypeEnum.DD.getType().equals(messageType)){
ddSendMsgHandle.sendMessage(message);
}else if(MessageTypeEnum.QYWX.getType().equals(messageType)){

View File

@ -28,7 +28,9 @@ import org.springframework.transaction.annotation.Transactional;
import javax.sql.DataSource;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
@ -239,19 +241,54 @@ public class SysTenantPackServiceImpl extends ServiceImpl<SysTenantPackMapper, S
query.eq(SysTenantPack::getPackType,"default");
List<SysTenantPack> sysTenantPacks = sysTenantPackMapper.selectList(query);
for (SysTenantPack sysTenantPack: sysTenantPacks) {
SysTenantPack pack = new SysTenantPack();
BeanUtils.copyProperties(sysTenantPack,pack);
pack.setTenantId(tenantId);
pack.setPackType("custom");
pack.setId("");
sysTenantPackMapper.insert(pack);
List<String> permissionsByPackId = sysPackPermissionMapper.getPermissionsByPackId(sysTenantPack.getId());
for (String permission:permissionsByPackId) {
SysPackPermission packPermission = new SysPackPermission();
packPermission.setPackId(pack.getId());
packPermission.setPermissionId(permission);
sysPackPermissionMapper.insert(packPermission);
}
syncDefaultPack2CurrentTenant(tenantId, sysTenantPack);
}
}
@Override
public void syncDefaultPack(Integer tenantId) {
// 查询默认套餐包
LambdaQueryWrapper<SysTenantPack> query = new LambdaQueryWrapper<>();
query.eq(SysTenantPack::getPackType,"default");
List<SysTenantPack> sysDefaultTenantPacks = sysTenantPackMapper.selectList(query);
// 查询当前租户套餐包
query = new LambdaQueryWrapper<>();
query.eq(SysTenantPack::getPackType,"custom");
query.eq(SysTenantPack::getTenantId, tenantId);
List<SysTenantPack> currentTenantPacks = sysTenantPackMapper.selectList(query);
Map<String, SysTenantPack> currentTenantPackMap = new HashMap<String, SysTenantPack>();
if (oConvertUtils.listIsNotEmpty(currentTenantPacks)) {
currentTenantPackMap = currentTenantPacks.stream().collect(Collectors.toMap(SysTenantPack::getPackName, o -> o, (existing, replacement) -> existing));
}
// 添加不存在的套餐包
for (SysTenantPack defaultPacks : sysDefaultTenantPacks) {
if(!currentTenantPackMap.containsKey(defaultPacks.getPackName())){
syncDefaultPack2CurrentTenant(tenantId, defaultPacks);
}
}
}
/**
* 同步默认套餐包到当前租户
* for [QQYUN-11032]【jeecg】租户套餐管理增加初始化套餐包按钮
* @param tenantId 目标租户
* @param defaultPacks 默认套餐包
* @author chenrui
* @date 2025/2/5 19:41
*/
private void syncDefaultPack2CurrentTenant(Integer tenantId, SysTenantPack defaultPacks) {
SysTenantPack pack = new SysTenantPack();
BeanUtils.copyProperties(defaultPacks,pack);
pack.setTenantId(tenantId);
pack.setPackType("custom");
pack.setId("");
sysTenantPackMapper.insert(pack);
List<String> permissionsByPackId = sysPackPermissionMapper.getPermissionsByPackId(defaultPacks.getId());
for (String permission:permissionsByPackId) {
SysPackPermission packPermission = new SysPackPermission();
packPermission.setPackId(pack.getId());
packPermission.setPermissionId(permission);
sysPackPermissionMapper.insert(packPermission);
}
}

View File

@ -1984,15 +1984,50 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
}
}
//step4 发送短信验证码
this.sendPhoneSms(phone, ipAddress);
String redisKey = CommonConstant.CHANGE_PHONE_REDIS_KEY_PRE+phone;
this.sendPhoneSms(phone, ipAddress,redisKey);
}
@Override
public void sendLogOffPhoneSms(JSONObject jsonObject, String username, String ipAddress) {
String phone = jsonObject.getString("phone");
//通过用户名查询数据库中的手机号
SysUser userByNameAndPhone = userMapper.getUserByNameAndPhone(phone, username);
if (null == userByNameAndPhone) {
throw new JeecgBootException("当前用户手机号不匹配,无法修改!");
}
String code = CommonConstant.LOG_OFF_PHONE_REDIS_KEY_PRE + phone;
this.sendPhoneSms(phone, ipAddress, code);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void userLogOff(JSONObject jsonObject, String username) {
String phone = jsonObject.getString("phone");
String smsCode = jsonObject.getString("smscode");
//通过用户名查询数据库中的手机号
SysUser userByNameAndPhone = userMapper.getUserByNameAndPhone(phone, username);
if (null == userByNameAndPhone) {
throw new JeecgBootException("当前用户手机号不匹配,无法注销!");
}
String code = CommonConstant.LOG_OFF_PHONE_REDIS_KEY_PRE + phone;
Object redisSmdCode = redisUtil.get(code);
if (null == redisSmdCode) {
throw new JeecgBootException("验证码失效,无法注销!");
}
if (!redisSmdCode.toString().equals(smsCode)) {
throw new JeecgBootException("验证码不匹配,无法注销!");
}
this.deleteUser(userByNameAndPhone.getId());
redisUtil.removeAll(code);
redisUtil.removeAll(CacheConstant.SYS_USERS_CACHE + phone);
}
/**
* 发送短信验证码
* @param phone
*/
private void sendPhoneSms(String phone, String clientIp) {
String redisKey = CommonConstant.CHANGE_PHONE_REDIS_KEY_PRE+phone;
private void sendPhoneSms(String phone, String clientIp,String redisKey) {
Object object = redisUtil.get(redisKey);
if (object != null) {

View File

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.jeecg.dingtalk.api.base.JdtBaseAPI;
import com.jeecg.dingtalk.api.core.response.Response;
import com.jeecg.dingtalk.api.core.util.HttpUtil;
import com.jeecg.dingtalk.api.core.vo.AccessToken;
import com.jeecg.dingtalk.api.core.vo.PageResult;
import com.jeecg.dingtalk.api.department.JdtDepartmentAPI;
@ -46,10 +47,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.*;
import java.util.stream.Collectors;
@ -1254,4 +1252,57 @@ public class ThirdAppDingtalkServiceImpl implements IThirdAppService {
}
}
}
//=================================== begin 新版钉钉登录 ============================================
/**
* 钉钉登录获取用户信息
* 【QQYUN-9421】钉钉登录后打开了敲敲云换其他账号登录后再打开敲敲云显示的是原来账号的应用
* @param authCode
* @param tenantId
* @return
*/
public SysUser oauthDingDingLogin(String authCode, Integer tenantId) {
Long count = tenantMapper.tenantIzExist(tenantId);
if(ObjectUtil.isEmpty(count) || 0 == count){
throw new JeecgBootException("租户不存在!");
}
SysThirdAppConfig config = configMapper.getThirdConfigByThirdType(tenantId, MessageTypeEnum.DD.getType());
String accessToken = this.getTenantAccessToken(config);
if(StringUtils.isEmpty(accessToken)){
throw new JeecgBootBizTipException("accessToken获取失败");
}
String getUserInfoUrl = "https://oapi.dingtalk.com/topapi/v2/user/getuserinfo?access_token=" + accessToken;
Map<String,String> params = new HashMap<>();
params.put("code",authCode);
Response<JSONObject> userInfoResponse = HttpUtil.post(getUserInfoUrl, JSON.toJSONString(params));
if (userInfoResponse.isSuccess()) {
String userId = userInfoResponse.getResult().getString("userid");
// 判断第三方用户表有没有这个人
LambdaQueryWrapper<SysThirdAccount> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SysThirdAccount::getThirdType, THIRD_TYPE);
queryWrapper.eq(SysThirdAccount::getTenantId, tenantId);
queryWrapper.and((wrapper)->wrapper.eq(SysThirdAccount::getThirdUserUuid,userId).or().eq(SysThirdAccount::getThirdUserId,userId));
SysThirdAccount thirdAccount = sysThirdAccountService.getOne(queryWrapper);
if (thirdAccount != null) {
return this.getSysUserByThird(thirdAccount, null, userId, accessToken, tenantId);
}else{
throw new JeecgBootException("该用户没有同步,请先同步!");
}
}
return null;
}
/**
* 根据租户id获取企业id和应用id
* 【QQYUN-9421】钉钉登录后打开了敲敲云换其他账号登录后再打开敲敲云显示的是原来账号的应用
* @param tenantId
*/
public SysThirdAppConfig getCorpIdClientId(Integer tenantId) {
LambdaQueryWrapper<SysThirdAppConfig> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SysThirdAppConfig::getThirdType, THIRD_TYPE);
queryWrapper.eq(SysThirdAppConfig::getTenantId, tenantId);
queryWrapper.select(SysThirdAppConfig::getCorpId,SysThirdAppConfig::getClientId);
return configMapper.selectOne(queryWrapper);
}
//=================================== end 新版钉钉登录 ============================================
}

View File

@ -119,12 +119,9 @@ public class ThirdAppWechatEnterpriseServiceImpl implements IThirdAppService {
public String getAppAccessToken(SysThirdAppConfig config) {
//update-begin---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
String corpId = config.getClientId();
String secret = config.getAgentAppSecret();
// 如果没有配置APP秘钥就说明是老企业可以通用秘钥
if (oConvertUtils.isEmpty(secret)) {
secret = config.getClientSecret();
String secret = config.getClientSecret();
//update-end---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
}
AccessToken accessToken = JwAccessTokenAPI.getAccessToken(corpId, secret);
if (accessToken != null) {

View File

@ -0,0 +1,64 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package org.springframework.boot.autoconfigure.mongo;
import com.mongodb.MongoClientSettings;
import com.mongodb.client.MongoClient;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.mongo.MongoClientFactory;
import org.springframework.boot.autoconfigure.mongo.MongoClientSettingsBuilderCustomizer;
import org.springframework.boot.autoconfigure.mongo.MongoProperties;
import org.springframework.boot.autoconfigure.mongo.MongoPropertiesClientSettingsBuilderCustomizer;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.core.env.Environment;
import java.util.List;
import java.util.stream.Collectors;
@Primary
@AutoConfiguration
@ConditionalOnClass({MongoClient.class})
@ConditionalOnProperty(name = "spring.data.mongodb.uri", havingValue = "", matchIfMissing = false)
@EnableConfigurationProperties({MongoProperties.class})
@ConditionalOnMissingBean(
type = {"org.springframework.data.mongodb.MongoDatabaseFactory"}
)
public class MongoAutoConfiguration {
public MongoAutoConfiguration() {
}
@Bean
@ConditionalOnMissingBean({MongoClient.class})
public MongoClient mongo(ObjectProvider<MongoClientSettingsBuilderCustomizer> builderCustomizers, MongoClientSettings settings) {
return (MongoClient)(new MongoClientFactory((List)builderCustomizers.orderedStream().collect(Collectors.toList()))).createMongoClient(settings);
}
@Configuration(
proxyBeanMethods = false
)
@ConditionalOnMissingBean({MongoClientSettings.class})
static class MongoClientSettingsConfiguration {
MongoClientSettingsConfiguration() {
}
@Bean
MongoClientSettings mongoClientSettings() {
return MongoClientSettings.builder().build();
}
@Bean
MongoPropertiesClientSettingsBuilderCustomizer mongoPropertiesCustomizer(MongoProperties properties, Environment environment) {
return new MongoPropertiesClientSettingsBuilderCustomizer(properties);
}
}
}

View File

@ -53,4 +53,7 @@
</#if>
<#if need_range_number>
import JRangeNumber from "/@/components/Form/src/jeecg/components/JRangeNumber.vue";
</#if>
<#if is_like>
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
</#if>

View File

@ -81,6 +81,13 @@
</#if>
<#if query_field_no gt 1> </#if></a-form-item>
<#if query_field_no gt 1> </#if></a-col>
<#elseif po.queryMode=='like'>
<#if query_field_no gt 1> </#if><a-col :lg="6">
<#if query_field_no gt 1> </#if><a-form-item name="${autoStringSuffixForModel(po)}">
<#if query_field_no gt 1> </#if><template #label><span title="${po.filedComment}"><#if po.filedComment?default("")?trim?length gt 4>${po.filedComment?substring(0,4)}<#else>${po.filedComment}</#if></span></template>
<#if query_field_no gt 1> </#if><JInput v-model:value="queryParam.${po.fieldName}"/>
<#if query_field_no gt 1> </#if></a-form-item>
<#if query_field_no gt 1> </#if></a-col>
<#else>
<#if query_field_no gt 1> </#if><a-col :lg="6">
<#if query_field_no gt 1> </#if><a-form-item name="${autoStringSuffixForModel(po)}">

View File

@ -238,7 +238,7 @@
<#assign rangeField = "">
<#list columns as po>
<#if po.isQuery=='Y'>
<#if po.queryMode!='single'>
<#if po.queryMode=='group'>
<#if po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal' || po.classType=='time' || po.classType=='date' || po.classType=='datetime'>
<#assign rangeField = rangeField + "${po.fieldName},">
</#if>

View File

@ -115,7 +115,7 @@
fieldMapToNumber: [
<#list columns as po>
<#if po.isQuery=='Y'>
<#if po.queryMode!='single'>
<#if po.queryMode=='group'>
<#-- update-begin---author:chenrui ---date:20240527 for[TV360X-388]时间范围查询控件---------- -->
<#if po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal' || po.classType=='time'>
<#-- update-end---author:chenrui ---date:20240527 for[TV360X-388]时间范围查询控件---------- -->
@ -128,7 +128,7 @@
fieldMapToTime: [
<#list columns as po>
<#if po.isQuery=='Y'>
<#if po.queryMode!='single'>
<#if po.queryMode=='group'>
<#if po.classType=='date'>
['${po.fieldName}', ['${po.fieldName}_begin', '${po.fieldName}_end'], 'YYYY-MM-DD'],
<#elseif po.classType=='datetime'>

View File

@ -210,6 +210,12 @@ export const searchFormSchema: FormSchema[] = [
</#if>
//colProps: {span: 6},
},
<#elseif po.queryMode=='like'>
{
label: "${po.filedComment}",
field: "${po.fieldName}",
component: 'JInput',
},
<#else>
{
label: "${po.filedComment}",

View File

@ -23,6 +23,7 @@
<#assign need_range_number = false>
<#assign is_range = false>
<#assign query_flag = false>
<#assign is_like = false>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
@ -65,11 +66,14 @@
<#if po.classType=='time'>
<#assign need_time = true>
</#if>
<#if po.queryMode!='single' && (po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal')>
<#if po.queryMode=='group' && (po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal')>
<#assign need_range_number = true>
</#if>
<#if po.queryMode!='single'>
<#if po.queryMode=='group'>
<#assign is_range = true>
</#if>
<#if po.queryMode=='like'>
<#assign is_like = true>
</#if>
<#include "/common/form/native/vue3NativeSearch.ftl">
</#list>

View File

@ -25,6 +25,7 @@
<#assign need_checkbox = false>
<#assign hasOnlyValidate = false>
<#assign need_range_number = false>
<#assign is_like = false>
<#assign form_span = 24>
<#if tableVo.fieldRowNum==2>
<#assign form_span = 12>

View File

@ -118,7 +118,7 @@
fieldMapToNumber: [
<#list columns as po>
<#if po.isQuery=='Y'>
<#if po.queryMode!='single'>
<#if po.queryMode=='group'>
<#-- update-begin---author:chenrui ---date:20240527 for[TV360X-388]时间范围查询控件---------- -->
<#if po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal' || po.classType=='time'>
<#-- update-end---author:chenrui ---date:20240527 for[TV360X-388]时间范围查询控件---------- -->
@ -131,7 +131,7 @@
fieldMapToTime: [
<#list columns as po>
<#if po.isQuery=='Y'>
<#if po.queryMode!='single'>
<#if po.queryMode=='group'>
<#if po.classType=='date'>
['${po.fieldName}', ['${po.fieldName}_begin', '${po.fieldName}_end'], 'YYYY-MM-DD'],
<#elseif po.classType=='datetime'>
@ -147,6 +147,7 @@
fixed:'right'
},
beforeFetch: (params) => {
params.hasQuery = "true";
return Object.assign(params, queryParam);
},
},

View File

@ -215,6 +215,12 @@ export const searchFormSchema: FormSchema[] = [
</#if>
//colProps: {span: 6},
},
<#elseif po.queryMode=='like'>
{
label: "${po.filedComment}",
field: "${po.fieldName}",
component: 'JInput',
},
<#else>
{
label: "${po.filedComment}",

View File

@ -32,6 +32,7 @@
<#assign need_checkbox = false>
<#assign need_range_number = false>
<#assign is_range = false>
<#assign is_like = false>
<#assign query_flag = false>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
@ -75,11 +76,14 @@
<#if po.classType=='time'>
<#assign need_time = true>
</#if>
<#if po.queryMode!='single' && (po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal')>
<#if po.queryMode=='group' && (po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal')>
<#assign need_range_number = true>
</#if>
<#if po.queryMode!='single'>
<#if po.queryMode=='group'>
<#assign is_range = true>
</#if>
<#if po.queryMode=='like'>
<#assign is_like = true>
</#if>
<#include "/common/form/native/vue3NativeSearch.ftl">
</#list>
@ -202,6 +206,7 @@
fixed: 'right',
},
beforeFetch: async (params) => {
params.hasQuery = "true";
<#if is_range>
let rangerQuery = await setRangeQuery();
return Object.assign(params, rangerQuery);

View File

@ -24,6 +24,7 @@
<#assign need_editor = false>
<#assign need_checkbox = false>
<#assign need_range_number = false>
<#assign is_like = false>
<#assign pidFieldName = "">
<#assign hasOnlyValidate = false>
<#assign form_span = 24>

View File

@ -127,7 +127,7 @@
fieldMapToNumber: [
<#list columns as po>
<#if po.isQuery=='Y'>
<#if po.queryMode!='single'>
<#if po.queryMode=='group'>
<#-- update-begin---author:chenrui ---date:20240527 for[TV360X-388]时间范围查询控件---------- -->
<#if po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal' || po.classType=='time'>
<#-- update-end---author:chenrui ---date:20240527 for[TV360X-388]时间范围查询控件---------- -->
@ -140,7 +140,7 @@
fieldMapToTime: [
<#list columns as po>
<#if po.isQuery=='Y'>
<#if po.queryMode!='single'>
<#if po.queryMode=='group'>
<#if po.classType=='date'>
['${po.fieldName}', ['${po.fieldName}_begin', '${po.fieldName}_end'], 'YYYY-MM-DD'],
<#elseif po.classType=='datetime'>

View File

@ -202,6 +202,12 @@ export const searchFormSchema: FormSchema[] = [
</#if>
//colProps: {span: 6},
},
<#elseif po.queryMode=='like'>
{
label: "${po.filedComment}",
field: "${po.fieldName}",
component: 'JInput',
},
<#else>
{
label: "${po.filedComment}",

View File

@ -23,6 +23,7 @@
<#assign query_flag = false>
<#assign need_range_number = false>
<#assign is_range = false>
<#assign is_like = false>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
@ -68,12 +69,15 @@
<#if po.classType=='time'>
<#assign need_time = true>
</#if>
<#if po.queryMode!='single' && (po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal')>
<#if po.queryMode='group' && (po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal')>
<#assign need_range_number = true>
</#if>
<#if po.queryMode!='single'>
<#if po.queryMode='group'>
<#assign is_range = true>
</#if>
<#if po.queryMode='like'>
<#assign is_like = true>
</#if>
<#include "/common/form/native/vue3NativeSearch.ftl">
</#list>
<#if query_field_no gt 2>

View File

@ -1,6 +1,7 @@
<#list subTables as sub>
#segment#${sub.entityName}List.vue
<#assign need_pca = false>
<#assign is_like = false>
<template>
<div class="p-2">
<#-- 结束循环 -->

View File

@ -25,6 +25,7 @@
<#assign need_checkbox = false>
<#assign hasOnlyValidate = false>
<#assign need_range_number = false>
<#assign is_like = false>
<#assign form_span = 24>
<#if tableVo.fieldRowNum==2>
<#assign form_span = 12>

View File

@ -20,6 +20,7 @@
<#assign need_editor = false>
<#assign need_checkbox = false>
<#assign need_range_number = false>
<#assign is_like = false>
<#assign form_span = 24>
<#if tableVo.fieldRowNum==2>
<#assign form_span = 12>

View File

@ -133,7 +133,7 @@
fieldMapToNumber: [
<#list columns as po>
<#if po.isQuery=='Y'>
<#if po.queryMode!='single'>
<#if po.queryMode=='group'>
<#-- update-begin---author:chenrui ---date:20240527 for[TV360X-388]时间范围查询控件---------- -->
<#if po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal' || po.classType=='time'>
<#-- update-end---author:chenrui ---date:20240527 for[TV360X-388]时间范围查询控件---------- -->
@ -146,7 +146,7 @@
fieldMapToTime: [
<#list columns as po>
<#if po.isQuery=='Y'>
<#if po.queryMode!='single'>
<#if po.queryMode=='group'>
<#if po.classType=='date'>
['${po.fieldName}', ['${po.fieldName}_begin', '${po.fieldName}_end'], 'YYYY-MM-DD'],
<#elseif po.classType=='datetime'>

View File

@ -206,6 +206,12 @@ export const searchFormSchema: FormSchema[] = [
</#if>
//colProps: {span: 6},
},
<#elseif po.queryMode=='like'>
{
label: "${po.filedComment}",
field: "${po.fieldName}",
component: 'JInput',
},
<#else>
{
label: "${po.filedComment}",
@ -931,6 +937,11 @@ export const ${sub.entityName?uncap_first}JVxeColumns: JVxeColumn[] = [
<#if col.readonly=='Y'>
disabled:true,
</#if>
<#elseif col.classType=='pca'>
type: JVxeTypes.pca,
<#if col.readonly=='Y'>
disabled:true,
</#if>
<#elseif col.classType =='popup'>
<#if popupBackFields?length gt 0>
<#assign popupBackFields = "${popupBackFields}"+","+"${col.dictText}">

View File

@ -115,7 +115,7 @@
fieldMapToNumber: [
<#list columns as po>
<#if po.isQuery=='Y'>
<#if po.queryMode!='single'>
<#if po.queryMode=='group'>
<#-- update-begin---author:chenrui ---date:20240527 for[TV360X-388]时间范围查询控件---------- -->
<#if po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal' || po.classType=='time'>
<#-- update-end---author:chenrui ---date:20240527 for[TV360X-388]时间范围查询控件---------- -->
@ -128,7 +128,7 @@
fieldMapToTime: [
<#list columns as po>
<#if po.isQuery=='Y'>
<#if po.queryMode!='single'>
<#if po.queryMode=='group'>
<#if po.classType=='date'>
['${po.fieldName}', ['${po.fieldName}_begin', '${po.fieldName}_end'], 'YYYY-MM-DD'],
<#elseif po.classType=='datetime'>

View File

@ -206,6 +206,12 @@ export const searchFormSchema: FormSchema[] = [
</#if>
//colProps: {span: 6},
},
<#elseif po.queryMode=='like'>
{
label: "${po.filedComment}",
field: "${po.fieldName}",
component: 'JInput',
},
<#else>
{
label: "${po.filedComment}",
@ -858,6 +864,11 @@ export const ${sub.entityName?uncap_first}Columns: JVxeColumn[] = [
<#if col.readonly=='Y'>
disabled:true,
</#if>
<#elseif col.classType=='pca'>
type: JVxeTypes.pca,
<#if col.readonly=='Y'>
disabled:true,
</#if>
<#elseif col.classType =='popup'>
<#if popupBackFields?length gt 0>
<#assign popupBackFields = "${popupBackFields}"+","+"${col.dictText}">

View File

@ -23,6 +23,7 @@
<#assign query_flag = false>
<#assign need_range_number = false>
<#assign is_range = false>
<#assign is_like = false>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
@ -68,12 +69,15 @@
<#if po.classType=='time'>
<#assign need_time = true>
</#if>
<#if po.queryMode!='single' && (po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal')>
<#if po.queryMode=='group' && (po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal')>
<#assign need_range_number = true>
</#if>
<#if po.queryMode!='single'>
<#if po.queryMode=='group'>
<#assign is_range = true>
</#if>
<#if po.queryMode=='like'>
<#assign is_like = true>
</#if>
<#include "/common/form/native/vue3NativeSearch.ftl">
</#list>
<#if query_field_no gt 2>

View File

@ -187,6 +187,11 @@ export const ${sub.entityName?uncap_first}Columns: JVxeColumn[] = [
<#if col.readonly=='Y'>
disabled:true,
</#if>
<#elseif col.classType=='pca'>
type: JVxeTypes.pca,
<#if col.readonly=='Y'>
disabled:true,
</#if>
<#elseif col.classType =='popup'>
<#if popupBackFields?length gt 0>
<#assign popupBackFields = "${popupBackFields}"+","+"${col.dictText}">

View File

@ -18,6 +18,7 @@
<#assign need_editor = false>
<#assign need_checkbox = false>
<#assign need_range_number = false>
<#assign is_like = false>
<#assign form_span = 24>
<#if tableVo.fieldRowNum==2>
<#assign form_span = 12>
@ -53,9 +54,13 @@
</JFormContainer>
<!-- 子表单区域 -->
<a-tabs v-model:activeKey="activeKey" animated>
<a-tabs v-model:activeKey="activeKey" animated style="overflow:hidden;">
<#list subTables as sub><#rt/>
<#if sub.foreignRelationType =='1'>
<a-tab-pane class="sub-one-form" tab="${sub.ftlDescription}" key="${sub.entityName?uncap_first}" :forceRender="true">
<#else>
<a-tab-pane tab="${sub.ftlDescription}" key="${sub.entityName?uncap_first}" :forceRender="true">
</#if>
<#if sub.foreignRelationType =='1'>
<${Format.humpToShortbar(sub.entityName)}-form ref="${sub.entityName?uncap_first}FormRef" :disabled="disabled"></${Format.humpToShortbar(sub.entityName)}-form>
<#else>
@ -354,4 +359,9 @@
}
});
</script>
<style lang="less" scoped></style>
<style lang="less" scoped>
.ant-tabs-tabpane.sub-one-form {
max-height: 340px;
overflow: auto;
}
</style>

View File

@ -22,6 +22,7 @@
<#assign need_editor = false>
<#assign need_checkbox = false>
<#assign need_range_number = false>
<#assign is_like = false>
<#assign form_span = 24>
<#if tableVo.fieldRowNum==2>
<#assign form_span = 12>
@ -179,11 +180,6 @@
}
});
</script>
<style lang="less" scoped>
.antd-modal-form {
max-height: 340px;
overflow: auto;
}
</style>
<style lang="less" scoped></style>
</#if>
</#list>

View File

@ -115,7 +115,7 @@
fieldMapToNumber: [
<#list columns as po>
<#if po.isQuery=='Y'>
<#if po.queryMode!='single'>
<#if po.queryMode=='group'>
<#-- update-begin---author:chenrui ---date:20240527 for[TV360X-388]时间范围查询控件---------- -->
<#if po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal' || po.classType=='time'>
<#-- update-end---author:chenrui ---date:20240527 for[TV360X-388]时间范围查询控件---------- -->
@ -128,7 +128,7 @@
fieldMapToTime: [
<#list columns as po>
<#if po.isQuery=='Y'>
<#if po.queryMode!='single'>
<#if po.queryMode=='group'>
<#if po.classType=='date'>
['${po.fieldName}', ['${po.fieldName}_begin', '${po.fieldName}_end'], 'YYYY-MM-DD'],
<#elseif po.classType=='datetime'>

View File

@ -206,6 +206,12 @@ export const searchFormSchema: FormSchema[] = [
</#if>
//colProps: {span: 6},
},
<#elseif po.queryMode=='like'>
{
label: "${po.filedComment}",
field: "${po.fieldName}",
component: 'JInput',
},
<#else>
{
label: "${po.filedComment}",
@ -871,6 +877,11 @@ export const ${sub.entityName?uncap_first}Columns: JVxeColumn[] = [
<#if col.readonly=='Y'>
disabled:true,
</#if>
<#elseif col.classType=='pca'>
type: JVxeTypes.pca,
<#if col.readonly=='Y'>
disabled:true,
</#if>
<#elseif col.classType =='popup'>
<#if popupBackFields?length gt 0>
<#assign popupBackFields = "${popupBackFields}"+","+"${col.dictText}">

View File

@ -11,6 +11,6 @@ WORKDIR /jeecg-boot
EXPOSE 8080
#ADD ./src/main/resources/jeecg ./config/jeecg
ADD ./target/jeecg-system-start-3.7.1.jar ./
ADD ./target/jeecg-system-start-3.7.3.jar ./
CMD sleep 60;java -Djava.security.egd=file:/dev/./urandom -jar jeecg-system-start-3.7.1.jar
CMD sleep 60;java -Djava.security.egd=file:/dev/./urandom -jar jeecg-system-start-3.7.3.jar

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>jeecg-module-system</artifactId>
<groupId>org.jeecgframework.boot</groupId>
<version>3.7.1</version>
<version>3.7.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -14,6 +14,8 @@ import org.springframework.core.env.Environment;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.Map;
/**
* 单体启动类
@ -31,7 +33,13 @@ public class JeecgSystemApplication extends SpringBootServletInitializer {
}
public static void main(String[] args) throws UnknownHostException {
ConfigurableApplicationContext application = SpringApplication.run(JeecgSystemApplication.class, args);
SpringApplication app = new SpringApplication(JeecgSystemApplication.class);
Map<String, Object> defaultProperties = new HashMap<>();
defaultProperties.put("management.health.elasticsearch.enabled", false);
app.setDefaultProperties(defaultProperties);
log.info("[JEECG] Elasticsearch Health Check Enabled: false" );
ConfigurableApplicationContext application = app.run(args);;
Environment env = application.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress();
String port = env.getProperty("server.port");

View File

@ -22,7 +22,7 @@ management:
endpoints:
web:
exposure:
include: metrics,httpexchanges,httptrace-new
include: metrics,httpexchanges,jeecghttptrace
spring:
# flyway配置
@ -53,6 +53,8 @@ spring:
max-file-size: 10MB
max-request-size: 10MB
mail:
# 定时任务发送邮件
timeJobSend: false
host: smtp.163.com
username: jeecgos@163.com
password: ??
@ -203,6 +205,13 @@ mybatis-plus:
minidao:
base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*
jeecg:
# AI集成
ai-chat:
enabled: true
model: deepseek-chat
apiKey: ??
apiHost: https://api.deepseek.com
timeout: 60
# 平台上线安全配置
firewall:
# 数据源安全 (开启后Online报表和图表的数据源为必填)
@ -230,11 +239,18 @@ jeecg:
secretKey: ??
endpoint: oss-cn-beijing.aliyuncs.com
bucketName: jeecgdev
# ElasticSearch 6设置
elasticsearch:
cluster-name: jeecg-ES
cluster-nodes: 127.0.0.1:9200
check-enabled: false
# 短信模板
sms-template:
# 签名
signature:
# 模板code
templateCode:
# 登录短信、忘记密码模板编码
SMS_175435174:
# 修改密码短信模板编码
SMS_465391221:
# 注册账号短信模板编码
SMS_175430166:
# 在线预览文件服务器地址配置
file-view-domain: http://fileview.jeecg.com
# minio文件上传
@ -270,26 +286,16 @@ jeecg:
password:
type: STANDALONE
enabled: true
# ai-chat
ai-chat:
# 是否开启;必须。
enabled: false
# openAi接口秘钥填写自己的apiKey必须。
apiKey: ""
# openAi域名有代理就填代理的域名。默认openAI官方apiHost
apiHost: "https://api.openai.com"
# 超时时间单位:s。默认 60s
timeout: 60
# 本地代理地址
# proxy:
# host: "http://127.0.0.1"
# port: "7890"
# 百度开放API配置
baidu-api:
app-id: ??
api-key: ??
secret-key: ??
# ElasticSearch 6设置
elasticsearch:
cluster-name: jeecg-ES
cluster-nodes: 127.0.0.1:9200
check-enabled: false
#cas单点登录
cas:
prefixUrl: http://cas.example.org:8443/cas

View File

@ -160,6 +160,13 @@ mybatis-plus:
minidao:
base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*
jeecg:
# AI集成
ai-chat:
enabled: true
model: deepseek-chat
apiKey: ??
apiHost: https://api.deepseek.com
timeout: 60
# 平台上线安全配置
firewall:
# 数据源安全 (开启后Online报表和图表的数据源为必填)
@ -189,11 +196,6 @@ jeecg:
secretKey: ??
endpoint: oss-cn-beijing.aliyuncs.com
bucketName: jeecgdev
# ElasticSearch 6设置
elasticsearch:
cluster-name: jeecg-ES
cluster-nodes: 127.0.0.1:9200
check-enabled: false
# 在线预览文件服务器地址配置
file-view-domain: http://fileview.jeecg.com
# minio文件上传
@ -229,20 +231,11 @@ jeecg:
password:
type: STANDALONE
enabled: true
# ai-chat
ai-chat:
# 是否开启;必须。
enabled: false
# openAi接口秘钥填写自己的apiKey必须。
apiKey: ""
# openAi域名有代理就填代理的域名。默认openAI官方apiHost
apiHost: "https://api.openai.com"
# 超时时间单位:s。默认 60s
timeout: 60
# 本地代理地址
# proxy:
# host: "http://127.0.0.1"
# port: "7890"
# ElasticSearch 6设置
elasticsearch:
cluster-name: jeecg-ES
cluster-nodes: 127.0.0.1:9200
check-enabled: false
#cas单点登录
cas:
prefixUrl: http://cas.example.org:8443/cas

View File

@ -174,6 +174,13 @@ mybatis-plus:
minidao:
base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*
jeecg:
# AI集成
ai-chat:
enabled: true
model: deepseek-chat
apiKey: ??
apiHost: https://api.deepseek.com
timeout: 60
# 平台上线安全配置
firewall:
# 数据源安全 (开启后Online报表和图表的数据源为必填)
@ -243,20 +250,6 @@ jeecg:
password:
type: STANDALONE
enabled: true
# ai-chat
ai-chat:
# 是否开启;必须。
enabled: false
# openAi接口秘钥填写自己的apiKey必须。
apiKey: ""
# openAi域名有代理就填代理的域名。默认openAI官方apiHost
apiHost: "https://api.openai.com"
# 超时时间单位:s。默认 60s
timeout: 60
# 本地代理地址
# proxy:
# host: "http://127.0.0.1"
# port: "7890"
#cas单点登录
cas:
prefixUrl: http://cas.example.org:8443/cas

View File

@ -22,7 +22,7 @@ management:
endpoints:
web:
exposure:
include: metrics,httpexchanges,httptrace-new
include: metrics,httpexchanges,jeecghttptrace
spring:
# flyway配置
@ -53,6 +53,8 @@ spring:
max-file-size: 10MB
max-request-size: 10MB
mail:
# 定时任务发送邮件
timeJobSend: false
host: smtp.163.com
username: jeecgos@163.com
password: ??
@ -203,6 +205,13 @@ mybatis-plus:
minidao:
base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*
jeecg:
# AI集成
ai-chat:
enabled: true
model: deepseek-chat
apiKey: ??
apiHost: https://api.deepseek.com
timeout: 60
# 平台上线安全配置
firewall:
# 数据源安全 (开启后Online报表和图表的数据源为必填)
@ -231,6 +240,18 @@ jeecg:
endpoint: oss-cn-beijing.aliyuncs.com
bucketName: jeecgdev
staticDomain: https://static.jeecg.com
# 短信模板
sms-template:
# 签名
signature:
# 模板code
templateCode:
# 登录短信、忘记密码模板编码
SMS_175435174:
# 修改密码短信模板编码
SMS_465391221:
# 注册账号短信模板编码
SMS_175430166:
# ElasticSearch 设置
elasticsearch:
cluster-name: jeecg-ES

View File

@ -22,7 +22,7 @@ management:
endpoints:
web:
exposure:
include: metrics,httpexchanges,httptrace-new
include: metrics,httpexchanges,jeecghttptrace
spring:
# flyway配置
@ -53,6 +53,8 @@ spring:
max-file-size: 10MB
max-request-size: 10MB
mail:
# 定时任务发送邮件
timeJobSend: false
host: smtp.163.com
username: jeecgos@163.com
password: ??
@ -202,6 +204,13 @@ mybatis-plus:
minidao:
base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*
jeecg:
# AI集成
ai-chat:
enabled: true
model: deepseek-chat
apiKey: ??
apiHost: https://api.deepseek.com
timeout: 60
# 平台上线安全配置
firewall:
# 数据源安全 (开启后Online报表和图表的数据源为必填)
@ -230,11 +239,18 @@ jeecg:
endpoint: oss-cn-beijing.aliyuncs.com
bucketName: jeecgdev
staticDomain: https://static.jeecg.com
# ElasticSearch 设置
elasticsearch:
cluster-name: jeecg-ES
cluster-nodes: 192.168.1.188:9200
check-enabled: false
# 短信模板
sms-template:
# 签名
signature:
# 模板code
templateCode:
# 登录短信、忘记密码模板编码
SMS_175435174:
# 修改密码短信模板编码
SMS_465391221:
# 注册账号短信模板编码
SMS_175430166:
# 在线预览文件服务器地址配置
file-view-domain: http://127.0.0.1:8012
# minio文件上传
@ -275,7 +291,11 @@ jeecg:
app-id: ??
api-key: ??
secret-key: ??
# ElasticSearch 设置
elasticsearch:
cluster-name: jeecg-ES
cluster-nodes: 192.168.1.188:9200
check-enabled: false
#Mybatis输出sql日志
logging:
level:

View File

@ -9,7 +9,7 @@ ${AnsiColor.BRIGHT_BLUE}
${AnsiColor.BRIGHT_GREEN}
Jeecg Boot Version: 3.7.1
Jeecg Boot Version: 3.7.3
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
产品官网: www.jeecg.com
版权所属: 北京国炬信息技术有限公司

View File

@ -0,0 +1,9 @@
-- ---author:wangshuai---date:20241108-----for: 修改字段变更为为钉钉企业id---
ALTER TABLE sys_third_app_config
CHANGE COLUMN agent_app_secret corp_id varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '钉钉企业id' AFTER client_secret;
UPDATE `sys_gateway_route` SET `predicates` = '[{\"args\":[\"/websocket/**\",\"/eoaSocket/**\",\"/newsWebsocket/**\",\"/dragChannelSocket/**\"],\"name\":\"Path\"}]' WHERE `id` = 'jeecg-cloud-websocket';
-- ---author:sunjianlei---date:20240930-----for: 【TV360X-2604】【Online表单】按钮权限未激活时增加提示添加查询索引 ---
ALTER TABLE onl_auth_page ADD INDEX idx_onl_auth_page_code(code);
ALTER TABLE onl_auth_page ADD INDEX idx_onl_auth_page_cgform_id(cgform_id);

View File

@ -0,0 +1,3 @@
-- 升级积木BI到最新版
UPDATE onl_drag_comp SET status='0' WHERE parent_id = '0';
update onl_drag_page set type =0 where iz_template = '1';

View File

@ -0,0 +1,5 @@
-- -author:chenrui---date:2025/1/16-----for:[QQYUN-10935]jeecg租户套餐管理优化---
UPDATE `sys_permission` SET `parent_id` = 'd7d6e2e4e2934f2c9385a623fd98c6f3', `name` = '租户初始套餐' WHERE `id` = '1668174661456171010';
-- -- author:chenrui---date:20250206--for: [QQYUN-11032]jeecg租户套餐管理增加初始化套餐包按钮 ---
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1887447660072292354', '1280350452934307841', '初始化套餐包', NULL, NULL, 0, NULL, NULL, 2, 'system:tenant:syncDefaultPack', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'jeecg', '2025-02-06 18:26:04', 'jeecg', '2025-02-06 18:26:53', 0, 0, '1', 0);

View File

@ -0,0 +1,20 @@
ALTER TABLE `jimu_report_db_field`
ADD COLUMN `field_name_physics` varchar(200) NULL COMMENT '物理字段名文件数据集使用存的是excel的字段标题' AFTER `field_name`;
CREATE TABLE `jimu_report_icon_lib` (
`id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '图片名称',
`type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '图片类型',
`image_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '图片地址',
`create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`tenant_id` int(11) DEFAULT NULL COMMENT '租户id',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='积木图库表';
INSERT INTO `jimu_dict`(`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `tenant_id`) VALUES ('1047797573274468352', '系统图库', 'gallery', '', 0, 'admin', '2025-02-07 19:00:19', NULL, NULL, 0, '1');
INSERT INTO `jimu_dict_item`(`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1047797624512086016', '1047797573274468352', '常规', 'common', NULL, 1, 1, 'admin', '2025-02-07 19:00:31', NULL, NULL);
INSERT INTO `jimu_dict_item`(`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1047797669877678080', '1047797573274468352', '指向', 'point', NULL, 1, 1, 'admin', '2025-02-07 19:00:42', '15931993294', '2025-02-07 19:01:11');
INSERT INTO `jimu_dict_item`(`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1047797751893098496', '1047797573274468352', '专业', 'major', NULL, 1, 1, 'admin', '2025-02-07 19:01:01', NULL, NULL);

View File

@ -0,0 +1,2 @@
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1876220177009315842', '1473927410093187073', '表单设计页面查询', NULL, NULL, 0, NULL, NULL, 2, 'drag:design:getTotalData', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-01-06 18:52:03', NULL, NULL, 0, 0, '1', 0);
INSERT INTO `sys_role_permission` (`id`, `role_id`, `permission_id`, `data_rule_ids`, `operate_date`, `operate_ip`) VALUES ('1892117657990971393', '1456165677820301314', '1876220177009315842', NULL, '2025-02-19 15:42:58', '0:0:0:0:0:0:0:1');

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>jeecg-boot-parent</artifactId>
<groupId>org.jeecgframework.boot</groupId>
<version>3.7.1</version>
<version>3.7.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>