| | |
| | | import com.boying.service.ParkService; |
| | | import com.boying.service.WhiteListService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.catalina.security.SecurityUtil; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.security.Security; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | |
| | | |
| | | @PostMapping("/save") |
| | | public Object save(WhiteList whiteList) { |
| | | if(StringUtils.isBlank(whiteList.getCarNo())){ |
| | | return R.failed("请输入正确车牌号"); |
| | | } |
| | | whiteList.setCarNo(whiteList.getCarNo().replaceAll("\\s", "")); |
| | | if(whiteList.getCarNo().length()>7){ |
| | | return R.failed("请输入正确车牌号"); |
| | | } |
| | | whiteListService.saveOrUpdate(whiteList); |
| | | return R.ok("保存成功"); |
| | | } |