mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-24 04:55:08 +08:00
update 预约启动
This commit is contained in:
@@ -15,6 +15,7 @@ import com.jsowell.pile.service.PileBasicInfoService;
|
||||
import com.jsowell.pile.service.PileRemoteService;
|
||||
import com.jsowell.pile.vo.uniapp.MemberPlateNumberVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -111,6 +112,12 @@ public class PileReservationInfoServiceImpl implements PileReservationInfoServic
|
||||
*/
|
||||
@Override
|
||||
public void activateReserved(PileReservationDTO dto) {
|
||||
// 查询其他生效中的预约
|
||||
List<PileReservationInfo> infoList = pileReservationInfoMapper.findByMemberIdAndPileSnAndStatus(dto.getMemberId(), dto.getPileSn(), "1");
|
||||
if (CollectionUtils.isNotEmpty(infoList)) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_RESERVATION_ALREADY_EXISTS_ERROR);
|
||||
}
|
||||
|
||||
PileReservationInfo pileReservationInfo = pileReservationInfoMapper.selectByPrimaryKey(Integer.parseInt(dto.getReservedId()));
|
||||
if (pileReservationInfo == null) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user