zoujiajian пре 1 година
родитељ
комит
1514f52d8d

+ 6 - 7
netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupsRelationChangeServiceImpl.java

@@ -1,6 +1,5 @@
 package com.cyksj.service.relation.impl;
 
-import cn.hutool.core.bean.BeanUtil;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.cyksj.common.constant.Constant;
 import com.cyksj.dto.RedisKey;
@@ -68,7 +67,7 @@ public class GroupsRelationChangeServiceImpl implements GroupsRelationChangeServ
 		if (groupsTrips != null) {
 			relation = relationMapper.selectOne(Wrappers.lambdaQuery(GroupsRelation.class)
 					.eq(GroupsRelation::getGroupsId, groupsTrips.getId())
-					.eq(GroupsRelation::getUserId, 0)
+					.eq(GroupsRelation::getStatus, GroupsRelation.Status.none)
 					.last("limit 1"));
 		}
 		if (relation == null) {
@@ -119,11 +118,11 @@ public class GroupsRelationChangeServiceImpl implements GroupsRelationChangeServ
 
 	public void syncGroupsRelation(Long oriRelationId, GroupsRelation newRelation) {
 		GroupsRelation oriRelation = relationMapper.selectById(oriRelationId);
-		Long newRelationId = newRelation.getId();
-		BeanUtil.copyProperties(oriRelation, newRelation);
-		newRelation.setId(newRelationId);
-		newRelation.setCreatedTime(null);
-		newRelation.setUpdateTime(null);
+		newRelation.setStartTime(oriRelation.getStartTime());
+		newRelation.setExpiryTime(oriRelation.getExpiryTime());
+		newRelation.setStatus(oriRelation.getStatus());
+		newRelation.setUserId(oriRelation.getUserId());
+		newRelation.setYhsId(oriRelation.getYhsId());
 		relationMapper.updateById(newRelation);
 		relationClearService.clearTicket(oriRelation, UserTicketClearedRecord.Source.change_ticket);
 		OrderDon orderDon = orderDonMapper.selectOne(Wrappers.lambdaQuery(OrderDon.class)