main
黄海 2 years ago
parent b9587f01eb
commit 3cbe646757

@ -41,7 +41,7 @@ public final class RedisUtil {
JedisPoolConfig config = new JedisPoolConfig(); JedisPoolConfig config = new JedisPoolConfig();
config.setMaxTotal(MAX_ACTIVE); config.setMaxTotal(MAX_ACTIVE);
config.setMaxIdle(MAX_IDLE); config.setMaxIdle(MAX_IDLE);
config.setMaxWaitMillis(MAX_WAIT); //config.setMaxWaitMillis(MAX_WAIT);
config.setTestOnBorrow(TEST_ON_BORROW); config.setTestOnBorrow(TEST_ON_BORROW);
jedisPool = new JedisPool(config, ADDR, PORT, TIMEOUT, null); jedisPool = new JedisPool(config, ADDR, PORT, TIMEOUT, null);
} catch (Exception e) { } catch (Exception e) {

@ -93,6 +93,16 @@ public class YpController extends Controller {
renderJson(kv); renderJson(kv);
} }
/**
*
* @param task_id
*/
@Before(GET.class)
@IsNumericInterface({"task_id"})
public void getTask(int task_id) {
Record record = model.getTask(task_id);
renderJson(record);
}
/** /**
* *
@ -291,7 +301,7 @@ public class YpController extends Controller {
} }
/** /**
*
*/ */
@Before(GET.class) @Before(GET.class)
@IsNumericInterface({"task_id"}) @IsNumericInterface({"task_id"})

@ -40,6 +40,15 @@ public class YpModel {
return r1.getInt("count"); return r1.getInt("count");
} }
/**
*
* @param task_id
*/
public Record getTask(int task_id) {
Record record = Db.findById("t_yp_task", "task_id", task_id);
return record;
}
/** /**
* *
*/ */

Loading…
Cancel
Save