|
@@ -11,10 +11,7 @@ import com.ruoyi.common.enums.BusinessType;
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
import com.ruoyi.common.utils.bean.BeanUtils;
|
|
import com.ruoyi.common.utils.bean.BeanUtils;
|
|
-import com.ruoyi.system.mapper.SysUserMapper;
|
|
|
|
-import com.ruoyi.system.service.ISysUserService;
|
|
|
|
import com.ruoyi.web.domain.dto.event.EventAddRequest;
|
|
import com.ruoyi.web.domain.dto.event.EventAddRequest;
|
|
-import com.ruoyi.web.domain.dto.event.EventEditRequest;
|
|
|
|
import com.ruoyi.web.domain.dto.event.EventQueryRequest;
|
|
import com.ruoyi.web.domain.dto.event.EventQueryRequest;
|
|
import com.ruoyi.web.domain.entity.Event;
|
|
import com.ruoyi.web.domain.entity.Event;
|
|
import com.ruoyi.web.domain.entity.EventAssign;
|
|
import com.ruoyi.web.domain.entity.EventAssign;
|
|
@@ -25,6 +22,7 @@ import com.ruoyi.web.mapper.EventAssignMapper;
|
|
import com.ruoyi.web.mapper.EventMapper;
|
|
import com.ruoyi.web.mapper.EventMapper;
|
|
import com.ruoyi.web.service.EventAssignService;
|
|
import com.ruoyi.web.service.EventAssignService;
|
|
import com.ruoyi.web.service.EventService;
|
|
import com.ruoyi.web.service.EventService;
|
|
|
|
+import com.ruoyi.web.service.EventTypeAssigneeService;
|
|
import com.ruoyi.web.service.PersonInfoService;
|
|
import com.ruoyi.web.service.PersonInfoService;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -47,17 +45,14 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
|
|
private EventAssignMapper eventAssignMapper;
|
|
private EventAssignMapper eventAssignMapper;
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
- private ISysUserService sysUserService;
|
|
|
|
-
|
|
|
|
- @Resource
|
|
|
|
- private SysUserMapper sysUserMapper;
|
|
|
|
-
|
|
|
|
- @Resource
|
|
|
|
private PersonInfoService personInfoService;
|
|
private PersonInfoService personInfoService;
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
private EventAssignService eventAssignService;
|
|
private EventAssignService eventAssignService;
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ private EventTypeAssigneeService eventTypeAssigneeService;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 添加事件并分配给对应负责人
|
|
* 添加事件并分配给对应负责人
|
|
*
|
|
*
|
|
@@ -85,7 +80,7 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
|
|
PersonInfo personInfo = personInfoList.get(0);
|
|
PersonInfo personInfo = personInfoList.get(0);
|
|
event.setSubmitterId(personInfo.getId());
|
|
event.setSubmitterId(personInfo.getId());
|
|
} else {
|
|
} else {
|
|
- event.setSubmitterId(null);
|
|
|
|
|
|
+ throw new ServiceException("找不到申报人");
|
|
}
|
|
}
|
|
|
|
|
|
//数据校验
|
|
//数据校验
|
|
@@ -109,17 +104,17 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
|
|
*/
|
|
*/
|
|
private void assignEventToPersons(Integer eventId, Integer eventType) {
|
|
private void assignEventToPersons(Integer eventId, Integer eventType) {
|
|
// 根据事件类型查找对应的负责人 id 集合
|
|
// 根据事件类型查找对应的负责人 id 集合
|
|
- List<Integer> personIds = getPersonIdsByEventType(eventType);
|
|
|
|
|
|
+ List<Integer> userIds = getPersonIdsByEventType(eventType);
|
|
|
|
|
|
- if (personIds.isEmpty()) {
|
|
|
|
|
|
+ if (userIds.isEmpty()) {
|
|
throw new ServiceException("未找到事件类型对应的负责人");
|
|
throw new ServiceException("未找到事件类型对应的负责人");
|
|
}
|
|
}
|
|
|
|
|
|
Date now = new Date();
|
|
Date now = new Date();
|
|
- for (Integer personId : personIds) {
|
|
|
|
|
|
+ for (Integer userId : userIds) {
|
|
EventAssign eventAssign = new EventAssign();
|
|
EventAssign eventAssign = new EventAssign();
|
|
eventAssign.setEventId(eventId);
|
|
eventAssign.setEventId(eventId);
|
|
- eventAssign.setPersonId(personId);
|
|
|
|
|
|
+ eventAssign.setUserId(userId);
|
|
eventAssign.setStatus("0"); // 未完结
|
|
eventAssign.setStatus("0"); // 未完结
|
|
eventAssign.setIsReassign("0"); // 非重新分配
|
|
eventAssign.setIsReassign("0"); // 非重新分配
|
|
eventAssign.setCreateTime(now);
|
|
eventAssign.setCreateTime(now);
|
|
@@ -129,29 +124,17 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- /**
|
|
|
|
- * 根据事件类型获取负责人列表
|
|
|
|
- * @param eventType
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- @Override
|
|
|
|
- public List<PersonInfoVO> getPersonInfoVOByEventType(Integer eventType) {
|
|
|
|
- List<Integer> userIdsByEventType = getPersonIdsByEventType(eventType);
|
|
|
|
- List<PersonInfoVO> personInfoVOListByUserIds = personInfoService.getPersonInfoVOListByUserIds(userIdsByEventType);
|
|
|
|
- return personInfoVOListByUserIds;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
// /**
|
|
// /**
|
|
-// * 通过 id 获取负责人列表
|
|
|
|
-// * @param personIds
|
|
|
|
|
|
+// * 根据事件类型获取负责人列表
|
|
|
|
+// * @param eventType
|
|
// * @return
|
|
// * @return
|
|
// */
|
|
// */
|
|
-// //todo
|
|
|
|
-// private List<SysUser> getSysUserByIdList(List<Integer> personIds) {
|
|
|
|
-// return sysUserMapper.selectUserListForEvent(personIds);
|
|
|
|
|
|
+// @Override
|
|
|
|
+// public List<PersonInfoVO> getPersonInfoVOByEventType(Integer eventType) {
|
|
|
|
+// return eventTypeAssigneeService.getListEventPersonInfoVO(eventType);
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 根据事件类型获取负责人系统用户ID列表
|
|
* 根据事件类型获取负责人系统用户ID列表
|
|
*
|
|
*
|
|
@@ -159,24 +142,18 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
|
|
* @return 负责人ID列表
|
|
* @return 负责人ID列表
|
|
*/
|
|
*/
|
|
private List<Integer> getPersonIdsByEventType(Integer eventType) {
|
|
private List<Integer> getPersonIdsByEventType(Integer eventType) {
|
|
- // 约定基于角色来选择负责人:通用命名:event_type_{n}
|
|
|
|
- // 角色:event_type_0 -> 矛盾纠纷类 、 event_type_2 -> 消防隐患类
|
|
|
|
- String key = "event_type_" + eventType;
|
|
|
|
-
|
|
|
|
- // 使用专门的方法查询用户ID,避免数据权限问题
|
|
|
|
- List<String> roleKeys = Arrays.asList(key);
|
|
|
|
- List<Long> userIds = sysUserService.selectUserIdsByRoleKeysForEvent(roleKeys);
|
|
|
|
-
|
|
|
|
- List<Integer> matchedUserIds = userIds.stream()
|
|
|
|
- .map(Long::intValue)
|
|
|
|
- .distinct()
|
|
|
|
- .collect(Collectors.toList());
|
|
|
|
|
|
+ // 获取负责人列表
|
|
|
|
+ List<PersonInfoVO> listEventPersonInfoVO = eventTypeAssigneeService.getListEventPersonInfoVO(eventType);
|
|
|
|
+ List<Integer> userIds = listEventPersonInfoVO.stream().map(
|
|
|
|
+ personInfoVO -> {
|
|
|
|
+ return personInfoVO.getUserId();
|
|
|
|
+ }).collect(Collectors.toList());
|
|
|
|
|
|
// 同时包含超级管理员(user_id = 1)
|
|
// 同时包含超级管理员(user_id = 1)
|
|
- if (!matchedUserIds.contains(1)) {
|
|
|
|
- matchedUserIds.add(1);
|
|
|
|
|
|
+ if (!userIds.contains(1)) {
|
|
|
|
+ userIds.add(1);
|
|
}
|
|
}
|
|
- return matchedUserIds;
|
|
|
|
|
|
+ return userIds;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -206,36 +183,37 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
|
|
// 3. 构建删除条件
|
|
// 3. 构建删除条件
|
|
QueryWrapper<Event> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<Event> queryWrapper = new QueryWrapper<>();
|
|
queryWrapper.in("id", idList);
|
|
queryWrapper.in("id", idList);
|
|
|
|
+ // todo 同步删除 分配表 记录
|
|
|
|
|
|
// 4. 执行删除(返回是否删除成功)
|
|
// 4. 执行删除(返回是否删除成功)
|
|
return remove(queryWrapper);
|
|
return remove(queryWrapper);
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
- * 编辑
|
|
|
|
- *
|
|
|
|
- * @param eventEditRequest
|
|
|
|
- */
|
|
|
|
- @Override
|
|
|
|
- public void editEvent(EventEditRequest eventEditRequest) {
|
|
|
|
- // 判断是否存在
|
|
|
|
- Integer id = eventEditRequest.getId();
|
|
|
|
- Event oldEvent = this.getById(id);
|
|
|
|
- if (oldEvent == null) {
|
|
|
|
- throw new ServiceException("没有找到事件");
|
|
|
|
- }
|
|
|
|
- Event event = new Event();
|
|
|
|
- BeanUtil.copyProperties(eventEditRequest, event);
|
|
|
|
- event.setUpdateTime(new Date());
|
|
|
|
- // 数据校验
|
|
|
|
- validEvent(event, BusinessType.UPDATE);
|
|
|
|
-
|
|
|
|
- // 操作数据库
|
|
|
|
- boolean result = this.updateById(event);
|
|
|
|
- if (!result) {
|
|
|
|
- throw new ServiceException("修改事件操作失败");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+// /**
|
|
|
|
+// * 编辑
|
|
|
|
+// *
|
|
|
|
+// * @param eventEditRequest
|
|
|
|
+// */
|
|
|
|
+// @Override
|
|
|
|
+// public void editEvent(EventEditRequest eventEditRequest) {
|
|
|
|
+// // 判断是否存在
|
|
|
|
+// Integer id = eventEditRequest.getId();
|
|
|
|
+// Event oldEvent = this.getById(id);
|
|
|
|
+// if (oldEvent == null) {
|
|
|
|
+// throw new ServiceException("没有找到事件");
|
|
|
|
+// }
|
|
|
|
+// Event event = new Event();
|
|
|
|
+// BeanUtil.copyProperties(eventEditRequest, event);
|
|
|
|
+// event.setUpdateTime(new Date());
|
|
|
|
+// // 数据校验
|
|
|
|
+// validEvent(event, BusinessType.UPDATE);
|
|
|
|
+//
|
|
|
|
+// // 操作数据库
|
|
|
|
+// boolean result = this.updateById(event);
|
|
|
|
+// if (!result) {
|
|
|
|
+// throw new ServiceException("修改事件操作失败");
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
/**
|
|
* 校验数据
|
|
* 校验数据
|
|
@@ -280,7 +258,7 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
|
|
/**
|
|
/**
|
|
* 根据id查询
|
|
* 根据id查询
|
|
*
|
|
*
|
|
- * @param id
|
|
|
|
|
|
+ * @param id 事件id
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
@@ -290,7 +268,7 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
|
|
}
|
|
}
|
|
// 获取登录用户id
|
|
// 获取登录用户id
|
|
Long userId = SecurityUtils.getUserId();
|
|
Long userId = SecurityUtils.getUserId();
|
|
- Event event = new Event();
|
|
|
|
|
|
+ Event event;
|
|
// 若不是管理员 指定查询的 负责人id 为当前登录用户id (负责人只能查询自己的事件)
|
|
// 若不是管理员 指定查询的 负责人id 为当前登录用户id (负责人只能查询自己的事件)
|
|
if (SecurityUtils.isAdmin(userId)) {
|
|
if (SecurityUtils.isAdmin(userId)) {
|
|
// 管理员查询
|
|
// 管理员查询
|
|
@@ -299,7 +277,7 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
|
|
// 负责人查询
|
|
// 负责人查询
|
|
QueryWrapper<Event> wrapper = new QueryWrapper<>();
|
|
QueryWrapper<Event> wrapper = new QueryWrapper<>();
|
|
wrapper.eq("id", id)
|
|
wrapper.eq("id", id)
|
|
- .exists("SELECT 1 FROM event_assign ea WHERE ea.event_id = event.id AND ea.person_id = " + userId);
|
|
|
|
|
|
+ .exists("SELECT 1 FROM event_assign ea WHERE ea.event_id = event.id AND ea.user_id = " + userId);
|
|
event = this.getOne(wrapper);
|
|
event = this.getOne(wrapper);
|
|
}
|
|
}
|
|
return getEventVO(event);
|
|
return getEventVO(event);
|
|
@@ -326,10 +304,10 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
|
|
List<EventAssign> eventAssigns = eventAssignMapper.selectList(queryWrapper);
|
|
List<EventAssign> eventAssigns = eventAssignMapper.selectList(queryWrapper);
|
|
// 3. 提取负责人 系统用户ID列表
|
|
// 3. 提取负责人 系统用户ID列表
|
|
List<Integer> userIds = eventAssigns.stream()
|
|
List<Integer> userIds = eventAssigns.stream()
|
|
- .map(EventAssign::getPersonId)
|
|
|
|
|
|
+ .map(EventAssign::getUserId)
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
- // 4. 批量查询有效的负责人信息
|
|
|
|
|
|
+ // 4. 批量查询 有效的负责人信息
|
|
List<PersonInfoVO> chargeUserList ;
|
|
List<PersonInfoVO> chargeUserList ;
|
|
if (ObjectUtil.isNotEmpty(userIds)){
|
|
if (ObjectUtil.isNotEmpty(userIds)){
|
|
chargeUserList = personInfoService.getPersonInfoVOListByUserIds(userIds);
|
|
chargeUserList = personInfoService.getPersonInfoVOListByUserIds(userIds);
|
|
@@ -340,37 +318,34 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
|
|
|
|
|
|
// 5. 通过填报人id 查询村民姓名
|
|
// 5. 通过填报人id 查询村民姓名
|
|
Integer submitterId = event.getSubmitterId();
|
|
Integer submitterId = event.getSubmitterId();
|
|
-
|
|
|
|
-
|
|
|
|
PersonInfo personInfo = personInfoService.getById(submitterId);
|
|
PersonInfo personInfo = personInfoService.getById(submitterId);
|
|
eventVO.setSubmitterName(personInfo.getRealname());
|
|
eventVO.setSubmitterName(personInfo.getRealname());
|
|
|
|
|
|
// 6. 查询处理人
|
|
// 6. 查询处理人
|
|
QueryWrapper<EventAssign> wrapper = new QueryWrapper<>();
|
|
QueryWrapper<EventAssign> wrapper = new QueryWrapper<>();
|
|
- wrapper.select("person_id")
|
|
|
|
|
|
+ wrapper.select("user_id")
|
|
.eq("event_id", event.getId())
|
|
.eq("event_id", event.getId())
|
|
.eq("status", 1);
|
|
.eq("status", 1);
|
|
EventAssign eventAssign = eventAssignService.getOne(wrapper);
|
|
EventAssign eventAssign = eventAssignService.getOne(wrapper);
|
|
if (ObjectUtil.isNotEmpty(eventAssign)){
|
|
if (ObjectUtil.isNotEmpty(eventAssign)){
|
|
- Integer personId = eventAssign.getPersonId();
|
|
|
|
- if(personId == 1){
|
|
|
|
|
|
+ // 事件已经处理 有处理人
|
|
|
|
+ Integer userId = eventAssign.getUserId();
|
|
|
|
+ if (userId == 1) {
|
|
eventVO.setProcessUserName("超级管理员");
|
|
eventVO.setProcessUserName("超级管理员");
|
|
}else{
|
|
}else{
|
|
QueryWrapper<PersonInfo> queryWrapper2 = new QueryWrapper<>();
|
|
QueryWrapper<PersonInfo> queryWrapper2 = new QueryWrapper<>();
|
|
queryWrapper2.select("id", "realname")
|
|
queryWrapper2.select("id", "realname")
|
|
- .eq("user_id", personId);
|
|
|
|
-
|
|
|
|
- List<PersonInfo> personInfoList = personInfoService.list(queryWrapper2);
|
|
|
|
|
|
+ .eq("user_id", userId);
|
|
|
|
+ PersonInfo processPersonInfo = personInfoService.getOne(queryWrapper2);
|
|
|
|
|
|
- if (!personInfoList.isEmpty()) {
|
|
|
|
- PersonInfo personInfo2 = personInfoList.get(0);
|
|
|
|
- eventVO.setProcessUserName(personInfo2.getRealname());
|
|
|
|
|
|
+ if (processPersonInfo != null) {
|
|
|
|
+ eventVO.setProcessUserName(processPersonInfo.getRealname());
|
|
} else {
|
|
} else {
|
|
eventVO.setProcessUserName(null);
|
|
eventVO.setProcessUserName(null);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
} else {
|
|
} else {
|
|
|
|
+ // 事件还未处理 没有处理人
|
|
eventVO.setProcessUserName(null);
|
|
eventVO.setProcessUserName(null);
|
|
}
|
|
}
|
|
return eventVO;
|
|
return eventVO;
|
|
@@ -470,8 +445,8 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public boolean handleEvent(Integer eventId, String processResult,Date processTime) {
|
|
public boolean handleEvent(Integer eventId, String processResult,Date processTime) {
|
|
- Long personId = SecurityUtils.getUserId();
|
|
|
|
- if (eventId == null || personId == null) {
|
|
|
|
|
|
+ Long userId = SecurityUtils.getUserId();
|
|
|
|
+ if (eventId == null || userId == null) {
|
|
throw new ServiceException("参数不能为空");
|
|
throw new ServiceException("参数不能为空");
|
|
}
|
|
}
|
|
// 1. 事件主表CAS:尝试抢占锁,只能修改状态为 0 的事件
|
|
// 1. 事件主表CAS:尝试抢占锁,只能修改状态为 0 的事件
|
|
@@ -491,7 +466,7 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
|
|
// 抢到锁:当前负责人状态 -> 1;其他事件负责人状态 -> 2
|
|
// 抢到锁:当前负责人状态 -> 1;其他事件负责人状态 -> 2
|
|
UpdateWrapper<EventAssign> meDone = new UpdateWrapper<>();
|
|
UpdateWrapper<EventAssign> meDone = new UpdateWrapper<>();
|
|
meDone.eq("event_id", eventId)
|
|
meDone.eq("event_id", eventId)
|
|
- .eq("person_id", personId)
|
|
|
|
|
|
+ .eq("user_id", userId)
|
|
.eq("status", "0")
|
|
.eq("status", "0")
|
|
.set("status", "1")
|
|
.set("status", "1")
|
|
.set("update_time", new Date());
|
|
.set("update_time", new Date());
|
|
@@ -499,7 +474,7 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
|
|
|
|
|
|
UpdateWrapper<EventAssign> othersDone = new UpdateWrapper<>();
|
|
UpdateWrapper<EventAssign> othersDone = new UpdateWrapper<>();
|
|
othersDone.eq("event_id", eventId)
|
|
othersDone.eq("event_id", eventId)
|
|
- .ne("person_id", personId)
|
|
|
|
|
|
+ .ne("user_id", userId)
|
|
.eq("status", "0")
|
|
.eq("status", "0")
|
|
.set("status", "2")
|
|
.set("status", "2")
|
|
.set("update_time", new Date());
|
|
.set("update_time", new Date());
|
|
@@ -509,7 +484,7 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
|
|
// 抢锁失败:当前事件已经被其他负责人处理,将当前负责人状态 -> 2
|
|
// 抢锁失败:当前事件已经被其他负责人处理,将当前负责人状态 -> 2
|
|
UpdateWrapper<EventAssign> meLose = new UpdateWrapper<>();
|
|
UpdateWrapper<EventAssign> meLose = new UpdateWrapper<>();
|
|
meLose.eq("event_id", eventId)
|
|
meLose.eq("event_id", eventId)
|
|
- .eq("person_id", personId)
|
|
|
|
|
|
+ .eq("user_id", userId)
|
|
.eq("status", "0")
|
|
.eq("status", "0")
|
|
.set("status", "2")
|
|
.set("status", "2")
|
|
.set("update_time", new Date());
|
|
.set("update_time", new Date());
|
|
@@ -521,7 +496,7 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
|
|
/**
|
|
/**
|
|
* 再次派发:仅在事件未完结时允许;存在则重置为未完结并标记再派发,不存在则插入
|
|
* 再次派发:仅在事件未完结时允许;存在则重置为未完结并标记再派发,不存在则插入
|
|
*/
|
|
*/
|
|
- // todo 校验事件类型 与 负责人类型 是否匹配 personIds 为人口表 需要转换
|
|
|
|
|
|
+ // todo 校验事件类型 与 负责人类型 是否匹配
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public void reassignEvent(Integer eventId, List<Integer> personIds) {
|
|
public void reassignEvent(Integer eventId, List<Integer> personIds) {
|
|
@@ -544,7 +519,7 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
|
|
// 先尝试更新存在的数据
|
|
// 先尝试更新存在的数据
|
|
UpdateWrapper<EventAssign> reset = new UpdateWrapper<>();
|
|
UpdateWrapper<EventAssign> reset = new UpdateWrapper<>();
|
|
reset.eq("event_id", eventId)
|
|
reset.eq("event_id", eventId)
|
|
- .eq("person_id", uid)
|
|
|
|
|
|
+ .eq("user_id", uid)
|
|
.set("status", "0")
|
|
.set("status", "0")
|
|
.set("is_reassign", "1")
|
|
.set("is_reassign", "1")
|
|
.set("update_time", now);
|
|
.set("update_time", now);
|
|
@@ -554,7 +529,7 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
|
|
// 插入新记录
|
|
// 插入新记录
|
|
EventAssign add = new EventAssign();
|
|
EventAssign add = new EventAssign();
|
|
add.setEventId(eventId);
|
|
add.setEventId(eventId);
|
|
- add.setPersonId(uid);
|
|
|
|
|
|
+ add.setUserId(uid);
|
|
add.setStatus("0");
|
|
add.setStatus("0");
|
|
add.setIsReassign("1");
|
|
add.setIsReassign("1");
|
|
add.setCreateTime(now);
|
|
add.setCreateTime(now);
|