use of com.ctrip.platform.dal.daogen.entity.ApproveTask in project dal by ctripcorp.
the class ApproveTaskDao method processList.
private void processList(List<ApproveTask> list) {
if (list == null || list.size() == 0)
return;
for (ApproveTask entity : list) {
Date date = new Date(entity.getCreate_time().getTime());
entity.setStr_create_time(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date));
}
}
use of com.ctrip.platform.dal.daogen.entity.ApproveTask in project dal by ctripcorp.
the class ApproveTaskDao method getAllApproveTaskByApproverId.
public List<ApproveTask> getAllApproveTaskByApproverId(Integer approverId) throws SQLException {
FreeSelectSqlBuilder<List<ApproveTask>> builder = new FreeSelectSqlBuilder<>(dbCategory);
builder.setTemplate("SELECT id, task_id, task_type, create_time, create_user_id, approve_user_id FROM approve_task WHERE approve_user_id=?");
StatementParameters parameters = new StatementParameters();
int i = 1;
parameters.set(i++, "approve_user_id", Types.INTEGER, approverId);
builder.mapWith(approveTaskRowMapper);
DalHints hints = DalHints.createIfAbsent(null).allowPartial();
List<ApproveTask> list = queryDao.query(builder, parameters, hints);
processList(list);
return list;
}
Aggregations