新增消息列表及其它细节修改

This commit is contained in:
2025-02-25 14:01:25 +08:00
parent 4f60577e78
commit 89a92e0b8a
13 changed files with 226 additions and 62 deletions

View File

@ -112,25 +112,25 @@ public class WgzAppController {
* 【首页】【首页界面】招工列表
*/
@ApiOperation("【首页】【首页界面】招工列表")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userJobListing')")
// //@PreAuthorize("@ss.hasPermi('wgzApp:user:userJobListing')")
@GetMapping("/WgzUserJobListing")
public AjaxResult<WgzAppJobListingRes> userJobListing(@Validated WgzAppJobListingReq req) {
public TableDataInfo<WgzAppJobListingRes> userJobListing(@Validated WgzAppJobListingReq req) {
TableDataInfo<WgzAppJobListingRes> wgzAppJobListingRes = new TableDataInfo<>();
//1、请求转换
BgtProjectRecruitQueryDTO dto = new BgtProjectRecruitQueryDTO();
BeanUtils.copyProperties(req,dto);
//2、查询招工列表信息
TableDataInfo<BgtProjectRecruitVO> info = iBgtProjectRecruitService.appQueryPageList(dto);
//3、将招工信息转换
WgzAppJobListingRes wgzAppJobListingRes = new WgzAppJobListingRes();
BeanUtils.copyProperties(info,wgzAppJobListingRes);
return AjaxResult.success(wgzAppJobListingRes);
return wgzAppJobListingRes;
}
/**
* 【我的】修改用户头像
*/
@ApiOperation("【我的】修改用户头像")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userModifyingUserProfilePicture')")
// //@PreAuthorize("@ss.hasPermi('wgzApp:user:userModifyingUserProfilePicture')")
@PutMapping("/wgzUserModifyingUserProfilePicture")
public AjaxResult<Boolean> userModifyingUserProfilePicture(@Validated @RequestBody WgzAppModifyingUserProfilePictureReq req) {
return AjaxResult.success(iWgzUserService.userModifyingUserProfilePicture(req));
@ -140,7 +140,7 @@ public class WgzAppController {
* 【我的】【个人基本信息】查询基础用户信息(还未带附件信息)
*/
@ApiOperation("【我的】个人基本信息(还未带附件信息)")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userPersonalBasicInformation')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userPersonalBasicInformation')")
@GetMapping("/wgzUserPersonalBasicInformation")
public AjaxResult<WgzAppPersonalBasicInformationRes> userPersonalBasicInformation(@Validated WgzAppPersonalBasicInformationReq req) {
return AjaxResult.success(iWgzUserService.userPersonalBasicInformation(req));
@ -150,7 +150,7 @@ public class WgzAppController {
* 【我的】【实名认证】实名认证
*/
@ApiOperation("【我的】实名认证")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userRealNameAuthentication')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userRealNameAuthentication')")
@PutMapping("/wgzUserRealNameAuthentication")
public AjaxResult<Boolean> userRealNameAuthentication(@Validated @RequestBody WgzAppRealNameAuthenticationReq req) {
return AjaxResult.success(iWgzUserService.userRealNameAuthentication(req));
@ -160,7 +160,7 @@ public class WgzAppController {
* 【我的】【岗前培训】获取安全教育考试试卷(随机获取)
*/
@ApiOperation("【我的】【岗前培训】岗前培训·获取随机试卷")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userGetTestPaper')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userGetTestPaper')")
@GetMapping("/WgzUserGetTestPaper")
public AjaxResult<WgzAppGetTestPaperRes> userGetTestPaper() {
//1、获取配置信息
@ -189,7 +189,7 @@ public class WgzAppController {
* 【我的】【岗前培训】提交用户的试卷(只保存最高分的试卷信息)
*/
@ApiOperation("【我的】【岗前培训】岗前培训·提交试卷")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userSubmitATestPaper')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userSubmitATestPaper')")
@PostMapping("/WgzUserSubmitATestPaper")
public AjaxResult<WgzAppSubmitATestPaperRes> userSubmitATestPaper(@Validated @RequestBody WgzAppSubmitATestPaperReq req) {
return AjaxResult.success(iWgzQuestionSaveService.userSubmitATestPaper(req));
@ -199,7 +199,7 @@ public class WgzAppController {
* 【我的】【请假】 历史请假列表
*/
@ApiOperation("【我的】【请假】请假·历史请假列表")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userLeaveHistoryList')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userLeaveHistoryList')")
@GetMapping("/WgzAppUserLeaveHistoryListPage")//PageReq
public TableDataInfo<WgzAppLeaveHistoryListPageRes> userLeaveHistoryListPage(@Validated WgzAppLeaveHistoryListPageReq req) {
return iWgzLeaveService.userLeaveHistoryListPage(req);
@ -209,7 +209,7 @@ public class WgzAppController {
* 【我的】【请假】 提交请假上下班的时间需要等待zt创建好mysql字段
*/
@ApiOperation("【我的】【请假】请假·提交请假上下班的时间需要等待zt创建好mysql字段")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userSubmitLeave')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userSubmitLeave')")
@PostMapping("/WgzAppSubmitLeave")
public AjaxResult<Boolean> userSubmitLeave(@Validated @RequestBody WgzAppSubmitLeaveReq req) {
return AjaxResult.success(iWgzLeaveService.userSubmitLeave(req));
@ -219,7 +219,7 @@ public class WgzAppController {
* 【我的】【请假】 取消请假
*/
@ApiOperation("【我的】【请假】请假·取消请假")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userCancelLeave')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userCancelLeave')")
@PutMapping("/WgzAppUserCancelLeave")
public AjaxResult<Boolean> userCancelLeave(@Validated @RequestBody WgzAppCancelLeaveReq req) {
return AjaxResult.success(iWgzLeaveService.userCancelLeave(req));
@ -229,7 +229,7 @@ public class WgzAppController {
* 【日报】日报日历
*/
@ApiOperation("【日报】日报日历")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userDailyCalendar')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userDailyCalendar')")
@GetMapping("/WgzUserDailyCalendar")
public AjaxResult<WgzUserDailyCalendarRes> userDailyCalendar(@Validated WgzAppDailyCalendarReq req) {
WgzUserDailyCalendarRes wfzUserDailyCalendarRes = iWgzDailyClockService.userDailyCalendar(req);
@ -240,7 +240,7 @@ public class WgzAppController {
* 【日报】日报日历·日报记录
*/
@ApiOperation("【日报】【日报日历】日报日历·日报记录")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userDailyRecord')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userDailyRecord')")
@GetMapping("/WgzUserDailyRecord")
public TableDataInfo<WgzAppUserDailyRecordRes> userDailyRecord(@Validated WgzAppDailyRecordReq req) {
return iWgzDailyClockService.userDailyRecord(req);
@ -250,7 +250,7 @@ public class WgzAppController {
* 【日报】日报日历·查看日报
*/
@ApiOperation("【日报】【日报日历】日报日历·查看日报")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userCheckDailyNewspaper')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userCheckDailyNewspaper')")
@GetMapping("/WgzUserCheckDailyNewspaper/{id}")
public AjaxResult<WgzDailyClock> userCheckDailyNewspaper(@NotNull(message = "主键不能为空") @PathVariable("id") Long id) {
return AjaxResult.success(iWgzDailyClockService.userCheckDailyNewspaper(id));
@ -260,7 +260,7 @@ public class WgzAppController {
* 【考勤打卡】【打卡】 提交上下班打卡·查看当前用户的打卡状态0上班 1下班 2请假
*/
@ApiOperation("【考勤打卡】【打卡】 提交上下班打卡·用户今日打卡状态0上班 1下班 2请假")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userClockingCondition')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userClockingCondition')")
@GetMapping("/WgzAppUserClockingCondition")
public AjaxResult<WgzAppUserClockingConditionRes> userClockingCondition() {
return AjaxResult.success(iWgzAttendanceService.userClockingCondition());
@ -270,7 +270,7 @@ public class WgzAppController {
* 【考勤打卡】【打卡】 提交上下班打卡
*/
@ApiOperation("【考勤打卡】【打卡】 提交上下班打卡)")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userSubmitTheClock')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userSubmitTheClock')")
@PostMapping("/WgzAppUserSubmitTheClock")
public AjaxResult<Boolean> userSubmitTheClock(@Validated @RequestBody WgzAppSubmitTheClockReq req) {
return AjaxResult.success(iWgzAttendanceService.userSubmitTheClock(req));
@ -280,7 +280,7 @@ public class WgzAppController {
* 【考勤打卡】【打卡日历】 打卡日历记录
*/
@ApiOperation("【考勤打卡】【打卡日历】 打卡日历记录)")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userPunchTheCalendarRecord')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userPunchTheCalendarRecord')")
@GetMapping("/WgzAppUserPunchTheCalendarRecord")
public AjaxResult<WgzAppPunchTheCalendarRecordRes> userPunchTheCalendarRecord() {
return AjaxResult.success(iWgzAttendanceService.userPunchTheCalendarRecord());
@ -290,7 +290,7 @@ public class WgzAppController {
* 【考勤打卡】【打卡日历】 补卡申请列表
*/
@ApiOperation("【考勤打卡】【打卡日历】 补卡申请列表")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userCardReplacementApplicationList')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userCardReplacementApplicationList')")
@GetMapping("/WgzAppUserCardReplacementApplicationList")
public AjaxResult<WgzAppCardReplacementApplicationRes> userCardReplacementApplication() {
return AjaxResult.success(iWgzAttendanceService.userCardReplacementApplication());
@ -300,7 +300,7 @@ public class WgzAppController {
* 【考勤打卡】【打卡日历】 补卡申请
*/
@ApiOperation("【考勤打卡】【打卡日历】 补卡申请)")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userCardReplacementApplication')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userCardReplacementApplication')")
@PostMapping("/WgzAppUserCardReplacementApplication")
public AjaxResult<Boolean> userCardReplacementApplication(@Validated @RequestBody WgzAppCardReplacementApplicationReq req) {
return AjaxResult.success(iWgzReissueacardService.userCardReplacementApplication(req));
@ -310,7 +310,7 @@ public class WgzAppController {
* 【考勤打卡】【打卡日历】 补卡记录
*/
@ApiOperation("【考勤打卡】【打卡日历】 补卡记录)")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userReplacementCardRecord')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userReplacementCardRecord')")
@GetMapping("/WgzAppUserReplacementCardRecord")
public TableDataInfo<WgzReplacementCardRecordRes> userReplacementCardRecord(@Validated WgzAppReplacementCardRecordReq req) {
return iWgzReissueacardService.userReplacementCardRecord(req);
@ -320,7 +320,7 @@ public class WgzAppController {
* 【首页】【项目详情】 项目详情
*/
@ApiOperation("【首页】【项目详情】 项目详情)")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userProjectDetails')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userProjectDetails')")
@GetMapping("/WgzAppUserProjectDetails/{id}")
public AjaxResult<WgzAppProjectDetailsRes> userProjectDetails(@NotNull(message = "主键不能为空") @PathVariable("id") Long id) {
return AjaxResult.success(iBgtProjectRecruitService.userProjectDetails(id));
@ -330,7 +330,7 @@ public class WgzAppController {
* 【首页】【项目详情】 项目详情·申请报名(还未校验工种是否匹配工地岗位)
*/
@ApiOperation("【首页】【项目详情】 项目详情·申请报名)")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForRegistration')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForRegistration')")
@GetMapping("/WgzAppUserApplyForRegistration/{id}")
public AjaxResult<Boolean> userApplyForRegistration(@NotNull(message = "主键不能为空") @PathVariable("id") Long id) {
return AjaxResult.success(iBgtProjectRecruitApplyService.userApplyForRegistration(id));
@ -340,7 +340,7 @@ public class WgzAppController {
* 【首页】【已报名项目】 已报名项目
*/
@ApiOperation("【首页】【已报名项目】 已报名项目)")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userRegisteredProject')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userRegisteredProject')")
@GetMapping("/WgzAppUserRegisteredProject")
public TableDataInfo<WgzAppRegisteredProjectRes> userRegisteredProject(@Validated WgzAppRegisteredProjectReq req) {
return iBgtProjectRecruitService.userRegisteredProject(req);
@ -350,7 +350,7 @@ public class WgzAppController {
* 【首页】【已报名项目】 已报名项目·取消报名
*/
@ApiOperation("【首页】【已报名项目】 已报名项目·取消报名)")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userCancelRegistration')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userCancelRegistration')")
@DeleteMapping("/WgzAppUserCancelRegistration/{recruitId}")
public AjaxResult<Boolean> userCancelRegistration(@NotEmpty(message = "招工主键不能为空") @PathVariable Long recruitId) {
return AjaxResult.success(iBgtProjectRecruitApplyService.userCancelRegistration(recruitId));
@ -360,7 +360,7 @@ public class WgzAppController {
* 【首页】【已报名项目】 已报名项目·项目详情
*/
@ApiOperation("【首页】【已报名项目】 已报名项目·项目详情")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userCancelRegistrationProjectDetails')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userCancelRegistrationProjectDetails')")
@GetMapping("/WgzAppUserCancelRegistrationProjectDetails/{recruitId}")
public AjaxResult<WgzAppCancelRegistrationProjectDetailsRes> userCancelRegistrationProjectDetails(@NotEmpty(message = "招工主键不能为空") @PathVariable Long recruitId) {
return AjaxResult.success(iBgtProjectRecruitService.userCancelRegistrationProjectDetails(recruitId));
@ -371,7 +371,7 @@ public class WgzAppController {
* 【首页】【已完成项目】 已完成项目
*/
@ApiOperation("【首页】【项目进行中|已完成项目】 项目进行中")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userUnderway')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userUnderway')")
@GetMapping("/WgzAppUserUnderway")
public TableDataInfo<WgzAppUnderwayRes> userUnderway(@Validated WgzAppUnderwayReq req) {
return iBgtProjectRecruitApplyService.userUnderway(req);
@ -382,7 +382,7 @@ public class WgzAppController {
* 【首页】【已完成项目】 已完成项目·详情
*/
@ApiOperation("【首页】【项目进行中|已完成项目】 详情")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userProjectInProgressDetails')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userProjectInProgressDetails')")
@GetMapping("/WgzAppUserProjectInProgressDetails/{id}")
public AjaxResult<WgzApplyForPayrollSettlementAddRes> userProjectInProgressDetails(@NotNull(message = "主键不能为空") @PathVariable("id") Long id) {
WgzApplyForPayrollSettlementAddRes res = new WgzApplyForPayrollSettlementAddRes();
@ -427,7 +427,7 @@ public class WgzAppController {
* 【首页】【已完成项目】 已完成项目·申请工资结算(新增)
*/
@ApiOperation("【首页】【项目进行中|已完成项目】 申请工资结算(新增)")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForPayrollSettlementAdd')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForPayrollSettlementAdd')")
@PostMapping("/WgzAppUserApplyForPayrollSettlementAdd")
public AjaxResult<Boolean> userApplyForPayrollSettlementAdd(@Validated @RequestBody WgzApplyForPayrollSettlementAddReq req) {
return AjaxResult.success(iWgzPayCalculationService.userApplyForPayrollSettlementAdd(req));
@ -437,7 +437,7 @@ public class WgzAppController {
* 【首页】【项目进行中】 项目进行中·申请工资结算(列表)
*/
@ApiOperation("【首页】【项目进行中】 项目进行中·申请工资结算(列表)")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForPayrollSettlementList')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForPayrollSettlementList')")
@GetMapping("/WgzAppUserApplyForPayrollSettlementList")
public TableDataInfo<WgzAppApplyForPayrollSettlementListRes> userApplyForPayrollSettlementList(@Validated WgzAppApplyForPayrollSettlementListReq req) {
return iWgzPayCalculationService.userApplyForPayrollSettlementList(req);
@ -447,7 +447,7 @@ public class WgzAppController {
* 【消息】消息类型统计
*/
@ApiOperation("【消息】消息类型统计")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userMessageTypeStatistics')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userMessageTypeStatistics')")
@GetMapping("/WgzAppUserMessageTypeStatistics")
public AjaxResult<WgzAppMessageTypeStatisticsRes> userMessageTypeStatistics() {
Long appUserId = SecurityUtils.getAppUserId();
@ -459,11 +459,10 @@ public class WgzAppController {
* 【消息】获取消息列表-0全部 1报名 2工资 3其他 (打卡、系统)
*/
@ApiOperation("【消息】获取消息列表")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userGetMessageList')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userGetMessageList')")
@GetMapping("/WgzAppUserGetMessageList")
public AjaxResult<WgzAppGetMessageListRes> userGetMessageList() {
Long appUserId = SecurityUtils.getAppUserId();
return null;
public TableDataInfo<WgzAppGetMessageListRes> userGetMessageList(@Validated WgzAppGetMessageListReq req) {
return iWgzMessageService.userGetMessageList(req);
}
@ -485,7 +484,7 @@ public class WgzAppController {
1-劳动合同
*/
@ApiOperation("通用·附件获取(仅限和务工者直接关联的)")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userAttachmentAcquisition')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userAttachmentAcquisition')")
@GetMapping("/wgzUserAttachmentAcquisition")
public AjaxResult<WgzAppAttachmentAcquisitionRes> userAttachmentAcquisition(@Validated WgzAppAttachmentAcquisitionReq req) {
//返回对象
@ -526,7 +525,7 @@ public class WgzAppController {
* 【考勤打卡】【打卡】 获取上下班时间
*/
@ApiOperation("通用·获取上下班时间")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userGetCommutingTime')")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userGetCommutingTime')")
@GetMapping("/WgzAppUserGetCommutingTime")//PageReq
public AjaxResult<Map<String, LocalTime>> userGetCommutingTime() {
//1、获取当前人、当前工的上下班时间范围
@ -570,7 +569,7 @@ public class WgzAppController {
* 【我的】【实名认证】实名认证·删除附件
*/
// @ApiOperation("APP务工者-实名认证·删除附件")
// @PreAuthorize("@ss.hasPermi('wgzApp:user:userDeleteAttachment')")
// //@PreAuthorize("@ss.hasPermi('wgzApp:user:userDeleteAttachment')")
// @DeleteMapping("/WgzUserDeleteAttachment/{attachmentId}")
// public AjaxResult<Boolean> userDeleteAttachment(@NotEmpty(message = "主键不能为空") @PathVariable Long attachmentId) {
// return AjaxResult.success(iAnnexService.deleteByIds(attachmentId));
@ -581,7 +580,7 @@ public class WgzAppController {
* 【首页】【项目进行中】 项目进行中·申请工资结算(查询)
*/
// @ApiOperation("【首页】【项目进行中】 项目进行中·申请工资结算(查询)")
// @PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForPayrollSettlementFind')")
// //@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForPayrollSettlementFind')")
// @GetMapping("/WgzAppUserApplyForPayrollSettlementFind")
// public AjaxResult<WgzApplyForPayrollSettlementFindRes> userApplyForPayrollSettlementFind(@Validated WgzApplyForPayrollSettlementFindReq req) {
// Long appUserId = SecurityUtils.getAppUserId();

View File

@ -4,6 +4,7 @@ import com.ruoyi.bgt.domain.BgtMessage;
import com.ruoyi.bgt.bo.BgtMessageQueryBo;
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.wgz.domain.WgzMessage;
import java.util.Collection;
import java.util.List;
@ -52,4 +53,17 @@ public interface IBgtMessageService extends IServicePlus<BgtMessage> {
* @return
*/
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
/**
* LC-APP相关
* =================================================================================================================
* =================================================================================================================
* =================================================================================================================
*/
/**
* 发送消息
*/
Boolean sendAMessage(BgtMessage bo);
}

View File

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.core.page.PagePlus;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.wgz.domain.WgzMessage;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@ -91,4 +92,16 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt
}
return removeByIds(ids);
}
/**
* LC-APP相关
* =================================================================================================================
* =================================================================================================================
* =================================================================================================================
*/
@Override
public Boolean sendAMessage(BgtMessage bo) {
return save(bo);
}
}

View File

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
import com.ruoyi.bgt.bo.BgtProjectRecruitApplyQueryBo;
import com.ruoyi.bgt.domain.BgtMessage;
import com.ruoyi.bgt.domain.BgtProjectRecruit;
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
import com.ruoyi.bgt.domain.dto.BgtAttendanceDayDTO;
@ -15,6 +16,7 @@ import com.ruoyi.bgt.domain.dto.BgtProjectRecruitApplyQueryDTO;
import com.ruoyi.bgt.domain.dto.BgtScoreDTO;
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO;
import com.ruoyi.bgt.mapper.BgtProjectRecruitApplyMapper;
import com.ruoyi.bgt.service.IBgtMessageService;
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
import com.ruoyi.common.constants.WgzAndBgtMessageConstant;
@ -64,6 +66,8 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
private IBgtProjectRecruitService iBgtProjectRecruitService;
@Autowired
private IWgzMessageService iWgzMessageService;
@Autowired
private IBgtMessageService iBgtMessageService;
@Override
public BgtProjectRecruitApply queryById(Long id){
@ -216,15 +220,17 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
throw new RuntimeException("系统消息发送失败!");
}
//4-2、当前用户发送消息给包工头
wgzMessage.
BgtMessage bgtMessage = new BgtMessage().
setSenderType(USERTYPE_WGZ).
setSenderId(appUserId).
setRecipientType(USERTYPE_BGT).
setRecipientId(appById.getUserId()).
setHeadline(WgzAndBgtMessageConstant.wgzMessage(mp,"3")).
setSubheading(WgzAndBgtMessageConstant.wgzMessage(mp,"4")).
setTableId(bgtProjectRecruitApply.getId()).
setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()).
setMessageLargeType(LARGE_APPLY);
if (!iWgzMessageService.sendAMessage(wgzMessage)){
if (!iBgtMessageService.sendAMessage(bgtMessage)){
throw new RuntimeException("发送消息失败!");
}
}

View File

@ -18,9 +18,10 @@ public class WgzAppGetMessageListReq extends PageReq {
@Hidden
private Long recipientId;
@ApiModelProperty("大类型(字典)")
private String messageLargeType;
@ApiModelProperty("0 全部 1报名 2工资 3其他")
@Hidden
private String largeType;
@ApiModelProperty("小类型(字典,大类型为【其它】才复制给它)")
private String messageSmallType;
@ApiModelProperty("largeType为3填写 (0补卡 1系统)")
private String smallType;
}

View File

@ -6,10 +6,11 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("首页-招工列表请求对象")
public class WgzAppJobListingReq extends BaseEntity {
public class WgzAppJobListingReq implements Serializable {
/** 分页大小 */
@ApiModelProperty("分页大小")
private Integer pageSize;

View File

@ -1,15 +1,68 @@
package com.ruoyi.wgz.bo.res;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
@Data
@NoArgsConstructor
@Accessors(chain = true)
@ApiModel("获取消息列表返回参数")
public class WgzAppGetMessageListRes implements Serializable {
//消息主表
@ApiModelProperty("消息主键自增ID")
private Long id;
@ApiModelProperty("主标题")
private String headline;
@ApiModelProperty("副标题")
private String subheading;
@ApiModelProperty("表ID")
private Long tableId;
@ApiModelProperty("表名")
private String tableName;
@ApiModelProperty("读状态0未读 1已读")
private String readStatus;
@ApiModelProperty("创建时间")
private LocalDateTime createTime;
//报名
@ApiModelProperty("报名·招工主键ID")
private Long recruitId;
@ApiModelProperty("报名·招工标题")
private String recruitName;
//工资
@ApiModelProperty("工资·结算主键ID")
private Long jsId;
@ApiModelProperty("工资·结算招工标题")
private String jsName;
//其它·补卡
@ApiModelProperty("其它·补卡·补卡ID")
private Long otherId;
@ApiModelProperty("其它·补卡·补卡时间")
private Long otherFillingTime;
@ApiModelProperty("其它·补卡·补卡理由")
private Long otherReason;
@ApiModelProperty("其它·补卡·申请人")
private Long otherApplicant;
@ApiModelProperty("其它·补卡·申请时间")
private Long otherApplicationDate;
}

View File

@ -43,6 +43,13 @@ public class WgzAppJobListingRes implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDateTime createTime;
@ApiModelProperty("工种")
private String typeOfWork;
@ApiModelProperty("申请者列表")
List<BgtProjectRecruitApplyVO> applylist;
}

View File

@ -8,6 +8,7 @@ import com.ruoyi.wgz.domain.WgzLeave;
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;
/**
* 请假Mapper接口
@ -24,6 +25,6 @@ public interface WgzLeaveMapper extends BaseMapperPlus<WgzLeave> {
* @param page 分页对象
* @return 分页查询结果
*/
Page<WgzAppLeaveHistoryListPageRes> userLeaveHistoryListPage(Page<WgzAppLeaveHistoryListPageReq> page);
Page<WgzAppLeaveHistoryListPageRes> userLeaveHistoryListPage(@Param("page") Page<WgzAppLeaveHistoryListPageReq> page);
}

View File

@ -1,5 +1,10 @@
package com.ruoyi.wgz.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.bgt.domain.dto.BgtDailyClockListDTO;
import com.ruoyi.bgt.domain.vo.BgtDailyClockListVO;
import com.ruoyi.wgz.bo.req.WgzAppGetMessageListReq;
import com.ruoyi.wgz.bo.res.WgzAppGetMessageListRes;
import com.ruoyi.wgz.domain.WgzMessage;
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
@ -18,8 +23,6 @@ import java.util.Map;
// 如使需切换数据源 请勿使用缓存 会造成数据不一致现象
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
public interface WgzMessageMapper extends BaseMapperPlus<WgzMessage> {
/**
* 消息类型统计(先分组再统计)
*/
List<Map<String, Object>> userMessageTypeStatistics(@Param("id") Long id);
Page<WgzAppGetMessageListRes> userGetMessageList(@Param("page") Page<WgzAppGetMessageListReq> page);
}

View File

@ -1,10 +1,13 @@
package com.ruoyi.wgz.service;
import com.ruoyi.wgz.bo.req.WgzAppGetMessageListReq;
import com.ruoyi.wgz.bo.res.WgzAppGetMessageListRes;
import com.ruoyi.wgz.bo.res.WgzAppMessageTypeStatisticsRes;
import com.ruoyi.wgz.domain.WgzMessage;
import com.ruoyi.wgz.bo.WgzMessageQueryBo;
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.validation.annotation.Validated;
import java.util.Collection;
import java.util.List;
@ -70,4 +73,9 @@ public interface IWgzMessageService extends IServicePlus<WgzMessage> {
* 消息类型统计
*/
WgzAppMessageTypeStatisticsRes userMessageTypeStatistics(Long id);
/**
* 消息列表
*/
TableDataInfo<WgzAppGetMessageListRes> userGetMessageList(@Validated WgzAppGetMessageListReq req);
}

View File

@ -7,7 +7,11 @@ import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.core.page.PagePlus;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.service.ISysDictTypeService;
import com.ruoyi.wgz.bo.req.WgzAppGetMessageListReq;
import com.ruoyi.wgz.bo.req.WgzAppLeaveHistoryListPageReq;
import com.ruoyi.wgz.bo.res.WgzAppGetMessageListRes;
import com.ruoyi.wgz.bo.res.WgzAppMessageTypeStatisticsRes;
import com.ruoyi.wgz.bo.rests.WgzAppMessageTypeStatisticsTwo;
import org.springframework.beans.factory.annotation.Autowired;
@ -135,4 +139,14 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
res.setList(list);
return res;
}
@Override
public TableDataInfo<WgzAppGetMessageListRes> userGetMessageList(WgzAppGetMessageListReq req) {
Long appUserId = SecurityUtils.getAppUserId();
req.setRecipientId(appUserId);
Page<WgzAppGetMessageListReq> queryDTOPage = new Page<>();
queryDTOPage.setCurrent(req.getPageNum());
queryDTOPage.setSize(req.getPageSize());
return PageUtils.buildDataInfo(baseMapper.userGetMessageList(queryDTOPage));
}
}

View File

@ -26,18 +26,62 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<!-- 消息类型统计(先分组再统计) -->
<select id="userMessageTypeStatistics" resultType="java.util.Map">
<select id="userGetMessageList" resultType="com.ruoyi.wgz.bo.res.WgzAppGetMessageListRes">
SELECT
message_large_type,
count( 1 ) as ct
a.id,
a.headline,
a.subheading,
a.table_id as tableId,
a.table_name as tableName,
a.read_status as readStatus,
a.create_time as createTime
<if test="page.largeType == '1'">
,c.recruit_name as recruitName
,c.id as recruitId
</if>
<if test="page.largeType == '2'">
,d.id as jsId
,d.recruit_name as jsName
</if>
<if test="page.largeType == '3' and page.smallType == '0'">
,e.id as otherId
,e.now_time as otherFillingTime
,e.reason as otherReason
,f.username as otherApplicant
,e.create_time as otherApplicationDate
</if>
FROM
wgz_message
WHERE
recipient_id = #{id}
AND recipient_type = "1"
AND read_status = "0"
GROUP BY
message_large_type
wgz_message as a
<if test="page.largeType == '1'">
LEFT JOIN bgt_project_recruit_apply as b ON b.id = a.table_id
LEFT JOIN bgt_project_recruit as c ON c.id = b.recruit_id
</if>
<if test="page.largeType == '2'">
LEFT JOIN wgz_pay_calculation as d ON d.id = a.table_id
</if>
<if test="page.largeType == '3' and page.smallType == '0'">
LEFT JOIN wgz_reissueacard as e ON e.id = a.table_id
LEFT JOIN wgz_user as f ON f.id = e.user_id
</if>
<where>
a.recipient_type = "1" AND
a.recipient_id = #{page.recipientId} AND
a.del_flag = "0"
<if test="page.largeType == '1'">
AND b.del_flag = "0"
AND c.del_flag = "0"
</if>
<if test="page.largeType == '2'">
AND d.del_flag = "0"
</if>
<if test="page.largeType == '3' and page.smallType == '0'">
AND e.del_flag = "0"
AND f.del_flag = "0"
</if>
<if test="page.largeType == '3' and page.smallType == '1'">
AND a.sender_type = "0"
</if>
</where>
</select>
</mapper>