Merge branch 'dev' into frx
This commit is contained in:
commit
c1f0caa1d0
@ -114,7 +114,8 @@ public class AuthController {
|
||||
}
|
||||
List<RoleDO> roles = roleService.getRoleList(roleIds);
|
||||
roles.removeIf(role -> !CommonStatusEnum.ENABLE.getStatus().equals(role.getStatus())
|
||||
|| !type.equals(role.getType().toString())); // 移除禁用和类型不一致的角色
|
||||
|| (!StrUtil.isEmpty(type) && !type.equals(role.getType().toString()))
|
||||
); // 移除禁用和类型不一致的角色
|
||||
|
||||
if (CollUtil.isEmpty(roles)) {
|
||||
return success(AuthConvert.INSTANCE.convert(user, Collections.emptyList(), Collections.emptyList()));
|
||||
@ -174,17 +175,17 @@ public class AuthController {
|
||||
|
||||
@PostMapping("/miniapp_quick_login")
|
||||
@PermitAll
|
||||
@Operation(summary = "微信小程序授权手机号快捷登陆", description = "微信小程序的手机号授权,快捷登陆" )
|
||||
@Operation(summary = "微信小程序授权手机号快捷登陆", description = "微信小程序的手机号授权,快捷登陆")
|
||||
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
|
||||
public CommonResult<AuthLoginRespVO> miniAppQuickLogin(@RequestBody AuthSocialLoginReqVO reqVO) {
|
||||
return success(authService.miniAppQuickLogin(reqVO)) ;
|
||||
return success(authService.miniAppQuickLogin(reqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/miniapp_code2Session")
|
||||
@PermitAll
|
||||
@Operation(summary = "微信小程序openid", description = "获取微信小程序的openid" )
|
||||
@Operation(summary = "微信小程序openid", description = "获取微信小程序的openid")
|
||||
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
|
||||
public CommonResult<WxMaJscode2SessionResult> miniAppCode2Session(@RequestBody AuthSocialLoginReqVO reqVO) {
|
||||
return success(authService.miniAppCode2Session(reqVO)) ;
|
||||
return success(authService.miniAppCode2Session(reqVO));
|
||||
}
|
||||
}
|
||||
|
@ -1035,8 +1035,8 @@ public class AttendanceServiceImpl implements AttendanceService {
|
||||
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,名字为模板 然后文件流会自动关闭
|
||||
|
||||
try {
|
||||
// EasyExcel.write(response.getOutputStream())
|
||||
EasyExcel.write("/Users/aikai/Downloads/" + System.currentTimeMillis() + "考勤统计按日导出.xls")
|
||||
EasyExcel.write(response.getOutputStream())
|
||||
// EasyExcel.write("/Users/aikai/Downloads/" + System.currentTimeMillis() + "考勤统计按日导出.xls")
|
||||
.head(generateDailyHead(headTitle, detailedHead, maxSize))
|
||||
.autoCloseStream(false)
|
||||
.excelType(ExcelTypeEnum.XLS)
|
||||
@ -1044,7 +1044,7 @@ public class AttendanceServiceImpl implements AttendanceService {
|
||||
.sheet("考勤统计按日导出")
|
||||
.doWrite(data);
|
||||
response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("考勤统计", StandardCharsets.UTF_8.name()));
|
||||
// response.setContentType("application/vnd.ms-excel;charset=UTF-8");
|
||||
response.setContentType("application/vnd.ms-excel;charset=UTF-8");
|
||||
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
@ -1182,8 +1182,8 @@ public class AttendanceServiceImpl implements AttendanceService {
|
||||
}
|
||||
|
||||
try {
|
||||
// EasyExcel.write(response.getOutputStream())
|
||||
EasyExcel.write("/Users/aikai/Downloads/" + System.currentTimeMillis() + "考勤统计按日导出.xls")
|
||||
EasyExcel.write(response.getOutputStream())
|
||||
// EasyExcel.write("/Users/aikai/Downloads/" + System.currentTimeMillis() + "考勤统计按日导出.xls")
|
||||
.head(generateHead(headTitle, detailedHead))
|
||||
.autoCloseStream(false)
|
||||
.excelType(ExcelTypeEnum.XLS)
|
||||
@ -1191,7 +1191,7 @@ public class AttendanceServiceImpl implements AttendanceService {
|
||||
.sheet("考勤统计按月导出")
|
||||
.doWrite(data);
|
||||
response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("考勤统计", StandardCharsets.UTF_8.name()));
|
||||
// response.setContentType("application/vnd.ms-excel;charset=UTF-8");
|
||||
response.setContentType("application/vnd.ms-excel;charset=UTF-8");
|
||||
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
@ -23,6 +23,7 @@ import cn.iocoder.yudao.module.system.service.worklog.LogInstanceService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
@ -39,6 +40,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class WorkLogCommentServiceImpl implements WorkLogCommentService {
|
||||
|
||||
@Resource
|
||||
@ -166,20 +168,24 @@ public class WorkLogCommentServiceImpl implements WorkLogCommentService {
|
||||
Map<Long, AdminUserDO> userMap = userService.getUserMap(Arrays.asList(instanceDO.getStartUserId(), workLogComment.getCommentUserId(), workLogComment.getUserId()));
|
||||
|
||||
String openId = null;
|
||||
if (instanceDO.getType() == 0) {
|
||||
if (!workLogComment.getType()) {
|
||||
|
||||
openId = userMap.get(instanceDO.getStartUserId()).getOpenId();
|
||||
} else if (instanceDO.getType() == 1) {
|
||||
} else {
|
||||
|
||||
openId = userMap.get(workLogComment.getCommentUserId()).getOpenId();
|
||||
}
|
||||
|
||||
if (openId != null) {
|
||||
|
||||
//发送消息通知
|
||||
subscribeMessageSendApi.sendWorkLogComment(LogCommentConvert.INSTANCE.convertLogComment(
|
||||
openId, workLogComment, userMap.get(workLogComment.getUserId()).getNickname(),
|
||||
"formal"));
|
||||
try {
|
||||
//发送消息通知
|
||||
subscribeMessageSendApi.sendWorkLogComment(LogCommentConvert.INSTANCE.convertLogComment(
|
||||
openId, workLogComment, userMap.get(workLogComment.getUserId()).getNickname(),
|
||||
"formal"));
|
||||
} catch (Exception e) {
|
||||
log.error("发送消息通知失败", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user