叫号报错不返回错误码
This commit is contained in:
parent
e3d2a9d891
commit
e3a1b5bdf9
|
|
@ -10,6 +10,7 @@ import org.springframework.validation.annotation.Validated;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* 叫号
|
||||
|
|
@ -79,7 +80,13 @@ public class TbCallTableController {
|
|||
public ResponseEntity<?> call(
|
||||
@Validated @RequestBody CallQueueDTO callQueueDTO
|
||||
) {
|
||||
return ResponseEntity.ok(tbCallService.call(callQueueDTO));
|
||||
try {
|
||||
return ResponseEntity.ok(tbCallService.call(callQueueDTO));
|
||||
}catch (BadRequestException e) {
|
||||
HashMap<String, Object> data = new HashMap<>();
|
||||
data.put("message", e.getMessage());
|
||||
return ResponseEntity.badRequest().body(data);
|
||||
}
|
||||
}
|
||||
|
||||
@AnonymousAccess
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ public class TbCallServiceImpl implements TbCallService {
|
|||
callQueue = BeanUtil.copyProperties(takeNumberDTO, TbCallQueue.class);
|
||||
callQueue.setPhone(takeNumberDTO.getPhone());
|
||||
// callQueue.setOpenId(takeNumberDTO.getOpenId());
|
||||
callQueue.setSubState(1);
|
||||
callQueue.setSubState(0);
|
||||
}
|
||||
|
||||
callQueue.setCreateDay(DateUtil.today());
|
||||
|
|
|
|||
Loading…
Reference in New Issue