main
黄海 2 years ago
parent 9af48fd02b
commit 27f6f1f891

@ -161,6 +161,7 @@ public class YpModel {
//是不是满了呢?
int applyCount = applyCount(task_id, bx_id);
int limit_count = limitCount(task_id, bx_id);
if (limit_count == 0) break;
if (applyCount >= limit_count) {
kv.set("bx_id", -3);
kv.set("bx_name", "人数已满!");
@ -182,6 +183,7 @@ public class YpModel {
/**
* +
*
* @param task_id
* @param bx_id
* @return
@ -194,13 +196,16 @@ public class YpModel {
/**
* +
*
* @param task_id
* @param bx_id
* @return
*/
public int limitCount(int task_id, int bx_id) {
String sql = "select * from t_yp_task_bx_limit where task_id=? and bx_id=?";
int limit_count = Db.findFirst(sql, task_id, bx_id).getInt("limit");
List<Record> list = Db.find(sql, task_id, bx_id);
if (list.size() == 0) return 0;
int limit_count = list.get(0).getInt("limit");
return limit_count;
}
@ -293,6 +298,7 @@ public class YpModel {
/**
*
*
* @param page
* @param limit
* @return

@ -7,3 +7,44 @@ http://10.10.21.20:9000/FengHuang/admin
# 业务管理员
admin 123456
# 2019年出生的学生测试用身份证号
110101201903077278
110101201903078457
110101201903074990
110101201903077219
110101201903074659
110101201903072936
110101201903073031
110101201903073955
110101201903072936
110101201903073517
# 2020年出生的学生测试用身份证号
110101202003074439
110101202003074412
110101202003071115
110101202003074295
110101202003079053
110101202003071174
110101202003078595
110101202003070518
110101202003078536
110101202003072951
# 2021年出生的学生测试用身份证号
110101202103077311
110101202103074858
110101202103076132
110101202103078031
11010120210307003X
11010120210307927X
11010120210307425X
110101202103075535
110101202103077397
110101202103076212
# 清库脚本
truncate table t_yp_task;
truncate table t_yp_record;
truncate table t_yp_task_bx_limit;

Loading…
Cancel
Save