예제 #1
0
 @Override
 public Long postCaptcha(byte[] data, String typeStr, Long taskId, Integer seq) {
   CaptchaType type = CaptchaType.valueOf(typeStr);
   // TODO type是自动处理类型的处理
   Captcha captcha = new Captcha();
   captcha.setData(data);
   captcha.setType(type.type);
   captcha.setExpireTime(new Date(System.currentTimeMillis() + EXPIRED_TIME));
   captcha.setPostClient(ClientContext.getCurrentContext().getClientId());
   captcha.setTaskId(taskId);
   captcha.setSeq(seq);
   return captchaService.save(captcha);
 }
예제 #2
0
 @Override
 public List<Map<String, Object>> queryInputStat(Date from, Date to) {
   ClientContext context = ClientContext.getCurrentContext();
   return captchaService.queryInputStat(context.getClientId(), from, to);
 }