Merge remote-tracking branch 'origin/master'
This commit is contained in:
@ -0,0 +1,131 @@
|
||||
package com.ruoyi.web.controller.bgt;
|
||||
|
||||
import com.ruoyi.bgt.bo.BgtMessageQueryBo;
|
||||
import com.ruoyi.bgt.domain.BgtMessage;
|
||||
import com.ruoyi.bgt.domain.dto.BgtMessageMyListDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtMessageOtherDTO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtMessageCountVO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtMessageOtherVO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtMessageVO;
|
||||
import com.ruoyi.bgt.service.IBgtMessageService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 消息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Api(value = "App包工头消息控制器", tags = {"App包工头消息管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/app/bgt/message")
|
||||
public class AppBgtMessageController extends BaseController {
|
||||
|
||||
private final IBgtMessageService iBgtMessageService;
|
||||
|
||||
@ApiOperation("未读消息统计")
|
||||
@GetMapping("/countUnread")
|
||||
public AjaxResult<BgtMessageCountVO> count() {
|
||||
return AjaxResult.success(iBgtMessageService.countUnread());
|
||||
}
|
||||
|
||||
@ApiOperation("我的消息列表")
|
||||
@GetMapping("/myList")
|
||||
public TableDataInfo<BgtMessageVO> myList(BgtMessageMyListDTO dto) {
|
||||
return iBgtMessageService.queryMyPageList(dto);
|
||||
}
|
||||
|
||||
@ApiOperation("其他消息列表")
|
||||
@GetMapping("/otherList")
|
||||
public TableDataInfo<BgtMessageOtherVO> otherList(BgtMessageOtherDTO dto) {
|
||||
return iBgtMessageService.queryOtherPageList(dto);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询消息列表
|
||||
*/
|
||||
@ApiOperation("查询消息列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BgtMessage> list(@Validated BgtMessageQueryBo bo) {
|
||||
return iBgtMessageService.queryPageList(bo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出消息列表
|
||||
*/
|
||||
@ApiOperation("导出消息列表")
|
||||
@Log(title = "消息", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult<BgtMessage> export(@Validated BgtMessageQueryBo bo) {
|
||||
List<BgtMessage> list = iBgtMessageService.queryList(bo);
|
||||
ExcelUtil<BgtMessage> util = new ExcelUtil<BgtMessage>(BgtMessage.class);
|
||||
return util.exportExcel(list, "消息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取消息详细信息
|
||||
*/
|
||||
@ApiOperation("获取消息详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('bgt:message:query')")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult<BgtMessage> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(iBgtMessageService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增消息
|
||||
*/
|
||||
@ApiOperation("新增消息")
|
||||
@PreAuthorize("@ss.hasPermi('bgt:message:add')")
|
||||
@Log(title = "消息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit
|
||||
@PostMapping()
|
||||
public AjaxResult<Void> add(@Validated @RequestBody BgtMessage bo) {
|
||||
return toAjax(iBgtMessageService.insert(bo) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改消息
|
||||
*/
|
||||
@ApiOperation("修改消息")
|
||||
@PreAuthorize("@ss.hasPermi('bgt:message:edit')")
|
||||
@Log(title = "消息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
@PutMapping()
|
||||
public AjaxResult<Void> edit(@Validated @RequestBody BgtMessage bo) {
|
||||
return toAjax(iBgtMessageService.update(bo) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除消息
|
||||
*/
|
||||
@ApiOperation("删除消息")
|
||||
@PreAuthorize("@ss.hasPermi('bgt:message:remove')")
|
||||
@Log(title = "消息" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(iBgtMessageService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
|
||||
}
|
||||
}
|
@ -42,6 +42,11 @@ public class AppBgtProjectRecruitApplyController extends BaseController {
|
||||
|
||||
private final IWgzUserService wgzUserService;
|
||||
|
||||
/**
|
||||
* 务工者申请列表 状态 为报名(0)和通过(1)
|
||||
*
|
||||
*
|
||||
*/
|
||||
@ApiOperation("App务工者列表(分页)")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BgtProjectRecruitApplyVO> listPage(@Validated BgtProjectRecruitApplyQueryDTO dto) {
|
||||
|
@ -35,9 +35,9 @@ public class AppBgtProjectRecruitController extends BaseController {
|
||||
private final IBgtProjectRecruitService iBgtProjectRecruitService;
|
||||
|
||||
/**
|
||||
* 查询包工头招工列表
|
||||
* 查询包工头招工列表 状态为通过和报名
|
||||
*/
|
||||
@ApiOperation("App我的招工")
|
||||
@ApiOperation("我的招工")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BgtProjectRecruitVO> list(@Validated BgtProjectRecruitQueryDTO dto) {
|
||||
return iBgtProjectRecruitService.appQueryPageList(dto);
|
||||
@ -46,7 +46,7 @@ public class AppBgtProjectRecruitController extends BaseController {
|
||||
/**
|
||||
* 获取包工头招工详细信息
|
||||
*/
|
||||
@ApiOperation("App我的招工任务详情")
|
||||
@ApiOperation("我的招工任务详情")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult<BgtProjectRecruitDetailVO> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
|
@ -33,9 +33,11 @@ public class AppFbsProjectTaskController extends BaseController {
|
||||
|
||||
private final IFbsProjectTaskService iFbsProjectTaskService;
|
||||
|
||||
/**
|
||||
* app项目任务列表
|
||||
*/
|
||||
/**
|
||||
* 首页任务列表 任务状态 申请(0) 是否我的任务 false
|
||||
* 我的任务列表 任务状态 申请(0) 进行(1) 完成(2) 是否我的任务 true
|
||||
*
|
||||
*/
|
||||
@ApiOperation("App包工头任务列表/我的任务")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<AppTaskVO> list(@Validated AppTaskDTO dto) {
|
||||
@ -49,7 +51,7 @@ public class AppFbsProjectTaskController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("App获取项目任务详细信息")
|
||||
@ApiOperation("项目任务详细信息-基本信息")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult<AppTaskDetailVO> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
|
Reference in New Issue
Block a user