|
|
|
@ -12,9 +12,8 @@ import com.ibeetl.admin.core.util.PlatformException;
|
|
|
|
|
import com.ibeetl.admin.core.web.JsonResult;
|
|
|
|
|
import com.ibeetl.admin.core.web.JsonReturnCode;
|
|
|
|
|
import com.ibeetl.jlw.dao.StudentAccountAssetAllocationDao;
|
|
|
|
|
import com.ibeetl.jlw.entity.LoginTodo;
|
|
|
|
|
import com.ibeetl.jlw.entity.ResourcesApplication;
|
|
|
|
|
import com.ibeetl.jlw.entity.StudentAccountAssetAllocation;
|
|
|
|
|
import com.ibeetl.jlw.entity.*;
|
|
|
|
|
import com.ibeetl.jlw.web.query.ResourcesApplicationCourseQuery;
|
|
|
|
|
import com.ibeetl.jlw.web.query.StudentAccountAssetAllocationQuery;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.beetl.sql.core.SqlId;
|
|
|
|
@ -32,6 +31,8 @@ import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import static cn.hutool.core.collection.IterUtil.getFirst;
|
|
|
|
|
import static com.ibeetl.admin.core.util.StreamUtils.listJoin;
|
|
|
|
|
import static java.util.Collections.emptyList;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 资产账户管理 Service
|
|
|
|
@ -46,6 +47,10 @@ public class StudentAccountAssetAllocationService extends CoreBaseService<Studen
|
|
|
|
|
@Autowired private StudentAccountAssetAllocationDao studentAccountAssetAllocationDao;
|
|
|
|
|
@Autowired private LoginTodoService loginTodoService;
|
|
|
|
|
@Autowired private ResourcesApplicationService resourcesApplicationService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ResourcesApplicationCourseService resourcesApplicationCourseService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private CourseInfoService courseInfoService;
|
|
|
|
|
|
|
|
|
|
public PageQuery<StudentAccountAssetAllocation>queryByCondition(PageQuery query){
|
|
|
|
|
PageQuery ret = studentAccountAssetAllocationDao.queryByCondition(query);
|
|
|
|
@ -310,4 +315,30 @@ public class StudentAccountAssetAllocationService extends CoreBaseService<Studen
|
|
|
|
|
updateTemplate(updatePO);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 功能描述: <br>
|
|
|
|
|
* 通过token获取应用绑定的课程信息
|
|
|
|
|
*
|
|
|
|
|
* @param applicationToken 跳转时候,传递的token
|
|
|
|
|
* @return {@link List< CourseInfo>}
|
|
|
|
|
* @Author: lx
|
|
|
|
|
* @Date: 2023/3/22 21:24
|
|
|
|
|
*/
|
|
|
|
|
public List<CourseInfo> getApplicationBindCourseInfo(String applicationToken) {
|
|
|
|
|
LoginTodo loginTodo = validateAndGetLoginTodo(applicationToken);
|
|
|
|
|
|
|
|
|
|
String applicationId = loginTodo.getApplicationId();
|
|
|
|
|
|
|
|
|
|
if (StrUtil.isBlank(applicationId)) {
|
|
|
|
|
return emptyList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ResourcesApplicationCourseQuery query = new ResourcesApplicationCourseQuery();
|
|
|
|
|
query.setResourcesApplicationId(Long.valueOf(applicationId));
|
|
|
|
|
List<ResourcesApplicationCourse> list = resourcesApplicationCourseService.getValuesByQueryNotWithPermission(query);
|
|
|
|
|
|
|
|
|
|
String courseInfoIds = listJoin(list, ResourcesApplicationCourse::getCourseInfoId);
|
|
|
|
|
|
|
|
|
|
return courseInfoService.getByIds(courseInfoIds);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|