本文整理匯總了Java中slender.services.core.tasks.TasksProgressService.addProgress方法的典型用法代碼示例。如果您正苦於以下問題:Java TasksProgressService.addProgress方法的具體用法?Java TasksProgressService.addProgress怎麽用?Java TasksProgressService.addProgress使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類slender.services.core.tasks.TasksProgressService
的用法示例。
在下文中一共展示了TasksProgressService.addProgress方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: addProgress
import slender.services.core.tasks.TasksProgressService; //導入方法依賴的package包/類
@POST
@Path("addProgress")
@Override
public Response addProgress(@FormParam("id") Integer taskId, @FormParam("userId") Integer userId, @FormParam("hours") int hours) {
TasksProgressService service = new TasksProgressServiceImpl();
service.addProgress(taskId, userId, hours);
return Response.ok(new SuccessResponse(true, "Successfully allocated time for task")).build();
}
示例2: addAdditional
import slender.services.core.tasks.TasksProgressService; //導入方法依賴的package包/類
@Test(dependsOnMethods = {"addMainEntities"})
public void addAdditional() {
TasksProgressService service = new TasksProgressServiceImpl();
service.addProgress(TestVal.taskID, TestVal.user1ID, 4);
service.addProgress(TestVal.taskID, TestVal.user2ID, 2);
UsersService userService = new UsersServiceImpl();
userService.addUserToProject(TestVal.user1ID, TestVal.projectID);
userService.addUserToProject(TestVal.user2ID, TestVal.projectID);
userService.addUserToTask(TestVal.user1ID, TestVal.taskID);
userService.addUserToTask(TestVal.user2ID, TestVal.taskID);
}