kgdxpr 2 years ago
commit 20a44457cf

@ -120,6 +120,19 @@ public class ExamController extends Controller {
renderJson(list);
}
/**
* ,
*/
@Before({GET.class})
public void getPersonUnFinishCount() {
String person_id = getCookie("person_id");
int count = em.getPersonUnFinishCount(person_id);
Kv kv = Kv.create();
kv.set("success", true);
kv.set("count", count);
renderJson(kv);
}
/**
* ()
*

@ -180,6 +180,14 @@ public class ExamModel {
return Db.find(sql, person_id);
}
/**
* ,
*/
public int getPersonUnFinishCount(String person_id) {
String sql = "select count(1) as count from t_exam_record where person_id=? and reply is null";
return Db.findFirst(sql, person_id).getInt("count");
}
/**
* ()+
*

Loading…
Cancel
Save