mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-13 11:49:49 +08:00
update 预约启动
This commit is contained in:
@@ -177,6 +177,8 @@ public enum ReturnCodeEnum {
|
|||||||
|
|
||||||
CODE_UPDATE_RESERVED_STATUS_REFUSED("00400016", "时间与现有预订重叠"),
|
CODE_UPDATE_RESERVED_STATUS_REFUSED("00400016", "时间与现有预订重叠"),
|
||||||
|
|
||||||
|
CODE_RESERVATION_ALREADY_EXISTS_ERROR("00400017", "已经存在生效中的预约,请关闭后再试"),
|
||||||
|
|
||||||
/* 个人桩 end */
|
/* 个人桩 end */
|
||||||
|
|
||||||
CODE_THIS_CARNO_HAS_BEEN_BINDING("00500001", "当前车牌号已经绑定,请检查!"),
|
CODE_THIS_CARNO_HAS_BEEN_BINDING("00500001", "当前车牌号已经绑定,请检查!"),
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import com.jsowell.pile.service.PileBasicInfoService;
|
|||||||
import com.jsowell.pile.service.PileRemoteService;
|
import com.jsowell.pile.service.PileRemoteService;
|
||||||
import com.jsowell.pile.vo.uniapp.MemberPlateNumberVO;
|
import com.jsowell.pile.vo.uniapp.MemberPlateNumberVO;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -111,6 +112,12 @@ public class PileReservationInfoServiceImpl implements PileReservationInfoServic
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void activateReserved(PileReservationDTO dto) {
|
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()));
|
PileReservationInfo pileReservationInfo = pileReservationInfoMapper.selectByPrimaryKey(Integer.parseInt(dto.getReservedId()));
|
||||||
if (pileReservationInfo == null) {
|
if (pileReservationInfo == null) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user