use of com.cas.sim.tis.vo.ResourceInfo in project TeachingInSimulation by ScOrPiOzzy.
the class ResourceViewer method loadResourceInfo.
/**
* 加载资源信息
*/
private void loadResourceInfo() {
ResourceInfo info = SpringUtil.getBean(ResourceAction.class).findResourceInfoByID(resource.getId());
if (info != null) {
this.creator.setText(MsgUtil.getMessage("resource.creator", info.getCreator()));
this.createDate.setText(MsgUtil.getMessage("resource.create.date", DateUtil.date2Str(info.getCreateDate(), DateUtil.DATE_SHT_PAT_10_)));
this.browsedTimes.setText(MsgUtil.getMessage("resource.browse.times", String.valueOf(info.getBrowsedTimes())));
this.collectedTimes.setText(MsgUtil.getMessage("resource.collection.times", String.valueOf(info.getCollectedTimes())));
}
collected = SpringUtil.getBean(CollectionAction.class).checkCollected(resource.getId());
if (collected) {
this.collectedBtn.setGraphic(new SVGGlyph("iconfont.svg.collected", Color.web("#ff9e2c"), 25));
this.collectedBtn.setText(MsgUtil.getMessage("resource.collection.done"));
} else {
this.collectedBtn.setGraphic(new SVGGlyph("iconfont.svg.uncollect", Color.web("#ff9e2c"), 25));
this.collectedBtn.setText(MsgUtil.getMessage("resource.collection.todo"));
}
}
use of com.cas.sim.tis.vo.ResourceInfo in project TeachingInSimulation by ScOrPiOzzy.
the class ResourceServiceImpl method findResourceInfoByID.
@Override
public ResourceInfo findResourceInfoByID(int id) {
ResourceMapper resourceMapper = (ResourceMapper) mapper;
ResourceInfo result = resourceMapper.selectResourceInfoByID(id);
return result;
}
Aggregations