| | |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springblade.modules.system.vo.UserVO; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpStatus; |
| | |
| | | public class QrCodeController { |
| | | |
| | | private final IUserService userService; |
| | | |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 二维码生成-字节流 |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/getUserInfo") |
| | | public UserVO getUserInfo(String securityNumber){ |
| | | public UserVO getUserInfo(String securityNumber,String cardid){ |
| | | //根据保安员编码查询保安员信息 |
| | | return userService.getUserInfoBySecurityNumber(securityNumber); |
| | | return userService.getUserInfoBySecurityNumber(securityNumber,cardid); |
| | | } |
| | | |
| | | /** |
| | | * test |
| | | * 异步调用测试 |
| | | */ |
| | | @GetMapping("/test") |
| | | public void test(){ |
| | | //根据保安员编码查询保安员信息 |
| | | for (int i = 0; i < 500; i++) { |
| | | User user = new User(); |
| | | user.setCardid("cardid"+i); |
| | | myAsyncService.test(user); |
| | | } |
| | | } |
| | | |
| | | } |