Commit 7dd8a390 authored by liqin's avatar liqin 💬

bug fixed

parent 3f92ab88
......@@ -15,13 +15,16 @@ import org.apache.ibatis.annotations.Select;
*/
public interface AssetMapper extends BaseMapper<Asset> {
@Select("SELECT a.*, co.`name` AS video_content_copyright_owner_name, vcc.`name` AS video_content_cat_name " +
"FROM asset a, video_content vc, copyright_owner co, video_content_cat vcc" +
@Select("<script>" +
"SELECT a.*, co.`name` AS video_content_copyright_owner_name, vcc.`name` AS video_content_cat_name " +
"FROM asset a, video_content vc, copyright_owner co, video_content_cat vcc " +
"where a.ref_item_id = vc.id " +
"and vc.video_content_cat_id = vcc.id " +
"and vc.video_content_copyright_owner_id = vcc.co " +
"and vc.video_content_copyright_owner_id = co.id " +
"<if test='videoContentCatId != null'>and vcc.id = #{videoContentCatId} </if>" +
"<if test='videoContentCopyrightOwnerId != null'>and co.id = #{videoContentCopyrightOwnerId} </if>")
"<if test='videoContentCopyrightOwnerId != null'>and co.id = #{videoContentCopyrightOwnerId} </if>" +
"order by a.create_time desc" +
"</script>")
Page<Asset> selectPageByConditions(Page<Object> page, String videoContentCatId, String videoContentCopyrightOwnerId);
}
......@@ -55,20 +55,6 @@ public class AssetController extends BaseController {
}
// 设置排序规则
ew.orderByDesc(Asset::getCreateTime);
// 设置查询内容
ew.select(
Asset::getId,
Asset::getFileName,
Asset::getFileExtName,
Asset::getFileCat,
Asset::getFileSize,
Asset::getFileType,
Asset::getFileUrl,
Asset::getLanguage,
Asset::getVideoContentCopyrightOwnerName,
Asset::getVideoContentCatName,
Asset::getCreateTime,
Asset::getUpdateTime);
Page<Asset> page = this.assetService.pageByConditions(getPage(), videoContentCatId, videoContentCopyrightOwnerId);
return getResult(page);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment