kongdeqiang
2022-09-26 18087f533cd48ddb9f972c0848ffe920ec58ee8e
src/main/java/com/boying/controller/BarrierController.java
@@ -12,12 +12,14 @@
import com.boying.service.EnterParkService;
import com.boying.service.OutParkService;
import com.boying.service.ParkService;
import io.netty.util.internal.ObjectUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -142,8 +144,10 @@
               if(type == null || type == 0){
                   //取消计费
                   OutPark outPark = outParkService.findByCarNoAndBarrierId(b.getCarNo(), b.getId());
                   outPark.setPrice(0d);
                   outParkService.save(outPark);
                   if(outPark != null){
                       outPark.setPrice(0);
                       outParkService.save(outPark);
                   }
                   b.setType2(1);
                   barrierService.save(b);
                   return success("请求成功");