mirror of
https://gitee.com/elegant_wings/dbd-meeting.git
synced 2025-06-21 17:09:36 +08:00
工单提醒增加已读未读列表
This commit is contained in:
parent
da8890a2ab
commit
e68c607069
@ -30,13 +30,15 @@ public class RepairRemindController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询工单提醒列表
|
* 查询工单提醒列表
|
||||||
|
*
|
||||||
|
* @isRead 不传则读取全部工单提醒,new 读取未读列表, already 读取已读列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions(value = {"repair:manage:operator", "member:center:view"}, logical = Logical.OR)
|
@RequiresPermissions(value = {"repair:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||||
@RequestMapping("list")
|
@RequestMapping("list")
|
||||||
public R list() {
|
public R list(String isRead) {
|
||||||
startPage();
|
startPage();
|
||||||
Long userId = getLoginStaffId();
|
Long userId = getLoginStaffId();
|
||||||
return result(repairRemindService.getRepairRemindList(userId));
|
return result(repairRemindService.getRepairRemindList(userId, isRead));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -81,7 +81,7 @@ public class RepairStatsController extends BaseController {
|
|||||||
* 人员绩效,楼层管理员
|
* 人员绩效,楼层管理员
|
||||||
*
|
*
|
||||||
* 支持查询参数:
|
* 支持查询参数:
|
||||||
* username 姓名
|
* name 姓名
|
||||||
* mobile 手机号
|
* mobile 手机号
|
||||||
* adr 地址名称,地点,楼层等
|
* adr 地址名称,地点,楼层等
|
||||||
* startDate 工单创建日期范围;开始时间;格式示例 2024-08-22;成对出现
|
* startDate 工单创建日期范围;开始时间;格式示例 2024-08-22;成对出现
|
||||||
|
@ -37,7 +37,7 @@ public interface RepairRemindMapper {
|
|||||||
* @param userId 用户id
|
* @param userId 用户id
|
||||||
* @return 工单提醒集合
|
* @return 工单提醒集合
|
||||||
*/
|
*/
|
||||||
List<RepairRemind> getRepairRemindByUserId(Long userId);
|
List<RepairRemind> getRepairRemindByUserId(@Param("userId") Long userId, @Param("read") Integer read);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取最新几条未读提醒
|
* 获取最新几条未读提醒
|
||||||
|
@ -25,7 +25,7 @@ public interface IRepairRemindService {
|
|||||||
* @param userId 用户id
|
* @param userId 用户id
|
||||||
* @return 工单提醒
|
* @return 工单提醒
|
||||||
*/
|
*/
|
||||||
List<RepairRemind> getRepairRemindList(Long userId);
|
List<RepairRemind> getRepairRemindList(Long userId, String isRead);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取最新几条未读提醒
|
* 获取最新几条未读提醒
|
||||||
|
@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.ics.admin.domain.RepairRemind;
|
import com.ics.admin.domain.RepairRemind;
|
||||||
import com.ics.admin.mapper.RepairRemindMapper;
|
import com.ics.admin.mapper.RepairRemindMapper;
|
||||||
import com.ics.admin.service.IRepairRemindService;
|
import com.ics.admin.service.IRepairRemindService;
|
||||||
|
import com.ics.common.utils.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@ -40,8 +41,13 @@ public class RepairRemindServiceImpl implements IRepairRemindService {
|
|||||||
* @return 工单提醒
|
* @return 工单提醒
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<RepairRemind> getRepairRemindList(Long userId) {
|
public List<RepairRemind> getRepairRemindList(Long userId, String isRead) {
|
||||||
return repairRemindMapper.getRepairRemindByUserId(userId);
|
Integer read = null;
|
||||||
|
if (StringUtils.isNotBlank(isRead)) {
|
||||||
|
if ("new".equals(isRead)) read = 0;
|
||||||
|
if ("already".equals(isRead)) read = 1;
|
||||||
|
}
|
||||||
|
return repairRemindMapper.getRepairRemindByUserId(userId, read);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -30,7 +30,11 @@
|
|||||||
|
|
||||||
<select id="getRepairRemindByUserId" parameterType="RepairRemind" resultMap="RepairRemindResult">
|
<select id="getRepairRemindByUserId" parameterType="RepairRemind" resultMap="RepairRemindResult">
|
||||||
<include refid="selectRepairRemindVo"/>
|
<include refid="selectRepairRemindVo"/>
|
||||||
where user_id=#{userId} and delete_flag=0 order by `read` asc,create_time desc
|
where user_id=#{userId} and delete_flag=0
|
||||||
|
<if test="read != null">
|
||||||
|
AND `read` = #{read}
|
||||||
|
</if>
|
||||||
|
order by `read` asc,create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getLatestRepairRemind" parameterType="RepairRemind" resultMap="RepairRemindResult">
|
<select id="getLatestRepairRemind" parameterType="RepairRemind" resultMap="RepairRemindResult">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user