提交 2b04f792 authored 作者: renjiancai's avatar renjiancai

--no commit message

上级 962bbd00
......@@ -22,20 +22,12 @@ public interface CourseLibraryMapper extends BaseMapper<CourseLibrary> {
@Select("<script>"
+ "select DISTINCT a.id,a.sort,a.name,a.author,a.img,a.realPrice, DATE_FORMAT(a.uploadTime,'%Y-%m-%d %H:%i') uploadTime,a.status,a.resourceType "
+ "from res_Course_Library a left join res_Course_Library_Diy_Type ad "
+ "from res_course_library a left join res_course_library_diy_type ad "
+ "on a.id = ad.CourseLibraryId "
+ "where 1=1 "
+ " like(ad.code,form.diyTypeCode) "
+ " like(a.name,form.name) "
+ " eq(a.status,form.status) "
//+ "<if test = '" + NOTBLANK + "(form.beginTime)'>"
//+ "and a.uploadTime &gt;= concat(#{form.beginTime}, ' 00:00:00' )"
//+ "</if>"
//+ "<if test = '" + NOTBLANK + "(form.endTime)'>"
//+ "and a.uploadTime &lt;= concat(#{form.endTime}, ' 23:59:59')"
//+ "</if>"
+ MapperConstants.DATETIME_QUERY_CONDITION
+ "</script>")
List<CourseLibraryListVO> query(@Param("form")QueryCourseLibraryForm form);
......@@ -90,11 +82,11 @@ public interface CourseLibraryMapper extends BaseMapper<CourseLibrary> {
*/
@Select("<script>"
+ "select DISTINCT a.id,a.name,a.uploadTime,a.img cover,a.resourceType,browseNum, "
+ "(SELECT COUNT(*) FROM `szsy-order`.ord_orderinfo c LEFT JOIN `szsy-order`.ord_order b ON c.orderId = b.id WHERE b.status = 6 AND c.goodsid = a.id) tradeNum, "
+ " (SELECT COUNT(*) FROM `szsy-resource`.res_record WHERE goodsId = a.id) readersNum, "
+ "(SELECT COUNT(*) FROM `szsyxy-order`.ord_orderinfo c LEFT JOIN `szsyxy-order`.ord_order b ON c.orderId = b.id WHERE b.status = 6 AND c.goodsid = a.id) tradeNum, "
+ " (SELECT COUNT(*) FROM `szsyxy-resource`.res_record WHERE goodsId = a.id) readersNum, "
//+ "IFNULL((SELECT sum(clickNum) FROM `szsy-resource`.res_video_library WHERE courseId = a.id),0) readersNum, "
+ "IFNULL((SELECT count(*) FROM `szsy-resource`.res_video_library WHERE courseId = a.id),0) relatedNum "
+ "from `szsy-resource`.res_course_library a left join `szsy-resource`.res_course_library_Diy_Type ad "
+ "IFNULL((SELECT count(*) FROM `szsyxy-resource`.res_video_library WHERE courseId = a.id),0) relatedNum "
+ "from `szsxy-resource`.res_course_library a left join `szsyxy-resource`.res_course_library_diy_type ad "
+ "on a.id = ad.courseLibraryId "
+ "where 1=1 "
+ "<if test='"+ NOTBLANK +"(form.diyTypeName)'>"
......
......@@ -19,7 +19,7 @@ import com.zrqx.resource.commons.vo.bg.videolibrary.VideoLibraryListVO;
public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
@Select("<script>"
+ "select DISTINCT a.id,a.sort,a.name,a.realprice, DATE_FORMAT(a.uploadTime,'%Y-%m-%d %H:%i') uploadTime,a.status,a.img,a.defaultImg,a.author "
+ "from res_Video_Library a left join res_Video_Library_Diy_Type ad "
+ "from res_video_library a left join res_video_library_diy_type ad "
+ "on a.id = ad.vlid "
+ "where liveId is null "
+ " like(ad.code,form.diyTypeCode) "
......@@ -31,7 +31,7 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
@Select("<script>"
+ "select DISTINCT a.id,a.name,a.author,a.realprice,a.timeLength,a.size,a.uploadTime,a.status,a.img,a.defaultImg "
+ "from res_Video_Library a left join res_Video_Library_Diy_Type ad "
+ "from res_video_library a left join res_video_library_diy_type ad "
+ "on a.id = ad.vlid "
+ "where 1=1 and a.status = 1 and salesType = 1 "
+ " like(ad.code,form.diyTypeCode) "
......@@ -47,7 +47,7 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
@Select("<script>"
+ "select DISTINCT a.id,a.name,a.realprice, DATE_FORMAT(a.uploadTime,'%Y-%m-%d %H:%i') uploadTime,a.status,a.img,a.defaultImg,a.author,a.video,a.timeLength "
+ "from res_Video_Library a left join res_Video_Library_Diy_Type ad "
+ "from res_video_library a left join res_video_library_diy_type ad "
+ "on a.id = ad.vlid "
+ "where liveId = #{form.liveId}"
+ " like(ad.code,form.diyTypeCode) "
......@@ -78,7 +78,7 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
* @param courseId
* @return
*/
@Select("select max(sort) from res_Video_Library where courseId = #{courseId}")
@Select("select max(sort) from res_video_library where courseId = #{courseId}")
Integer selectMaxSort(String courseId);
......@@ -90,10 +90,10 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
*/
@Select("<script>"
+ "select DISTINCT a.id,a.name,a.uploadTime,a.img cover,a.resourceType,browseNum, "
+ "(SELECT COUNT(*) FROM `szsy-order`.ord_orderinfo c LEFT JOIN `szsy-order`.ord_order b ON c.orderId = b.id WHERE b.status = 6 AND c.goodsid = a.id) tradeNum, "
+ " (SELECT COUNT(*) FROM `szsy-resource`.res_record WHERE goodsId = a.id) readersNum ,"
+ "(SELECT COUNT(*) FROM `szsyxy-order`.ord_orderinfo c LEFT JOIN `szsyxy-order`.ord_order b ON c.orderId = b.id WHERE b.status = 6 AND c.goodsid = a.id) tradeNum, "
+ " (SELECT COUNT(*) FROM `szsyxy-resource`.res_record WHERE goodsId = a.id) readersNum ,"
+ " 0 relatedNum "
+ "from `szsy-resource`.res_Video_Library a left join `szsy-resource`.res_Video_Library_Diy_Type ad "
+ "from `szsyxy-resource`.res_video_library a left join `szsyxy-resource`.res_video_library_diy_type ad "
+ "on a.id = ad.vlId "
+ "where 1=1 "
+ "<if test='"+ NOTBLANK +"(form.diyTypeName)'>"
......@@ -107,7 +107,7 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
List<StatisticsResourceVo> getStatisticsResource(@Param("form")SearchForm form);
@Select("<script>"
+ "select * from res_Video_Library where 1 = 1"
+ "select * from res_video_library where 1 = 1"
+ " eq(name,name) "
+ "</script>")
VideoLibrary getName(@Param("name")String name);
......
......@@ -13,7 +13,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value="AnnexLibrary",description="附件库")
@Table(name = "res_Annex_Library")
@Table(name = "res_annex_library")
public class AnnexLibrary {
//封面、视频名称、评论人数、讲师、上传时间、资源大小、播放次数、时长
@Id
......
......@@ -10,7 +10,7 @@ import lombok.Data;
@Data
@ApiModel(value="AnnexLibraryLabelContentDiyType",description="附件与标签关系表")
@Table(name = "res_Annex_Library_Label_Content_Diy_Type")
@Table(name = "res_annex_library_Label_Content_Diy_Type")
public class AnnexLibraryLabelContentDiyType {
@Id
@GeneratedValue(generator="JDBC")
......
......@@ -12,7 +12,7 @@ import lombok.Data;
@Data
@ApiModel(value = "resAnnexResource", description = "附件关联资源")
@Table(name = "res_Annex_Resource")
@Table(name = "res_annex_resource")
public class AnnexResource {
@Id
@GeneratedValue(generator = "JDBC")
......
......@@ -10,7 +10,7 @@ import lombok.Data;
@Data
@ApiModel(value="ArticleLibraryLabelContentDiyType",description="文章与标签关系表")
@Table(name = "res_article_library_Label_Content_Diy_Type")
@Table(name = "res_article_library_label_content_diy_type")
public class ArticleLibraryLabelContentDiyType {
@Id
@GeneratedValue(generator="JDBC")
......
......@@ -11,7 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@Table(name = "res_Article_Resource")
@Table(name = "res_article_resource")
@ApiModel(value = "ArticleResource", description = "文章关联资源")
public class ArticleResource {
@Id
......
......@@ -24,7 +24,7 @@ import lombok.Data;
*/
@Data
@ApiModel(value="chapterLibrary",description="文章库")
@Table(name = "res_chapter_Library")
@Table(name = "res_chapter_library")
public class ChapterLibrary implements java.io.Serializable {
// Fields
......
......@@ -10,7 +10,7 @@ import lombok.Data;
@Data
@ApiModel(value="AudioLibraryLabelContentDiyType",description="音频与标签关系表")
@Table(name = "res_audio_library_Label_Content_Diy_Type")
@Table(name = "res_audio_library_label_content_diy_type")
public class AudioLibraryLabelContentDiyType {
@Id
@GeneratedValue(generator="JDBC")
......
......@@ -10,7 +10,7 @@ import lombok.Data;
@Data
@ApiModel(value="AuthorLibraryLabelContentDiyType",description="作者与标签关系表")
@Table(name = "res_author_library_Label_Content_Diy_Type")
@Table(name = "res_author_library_label_content_diy_type")
public class AuthorLibraryLabelContentDiyType {
@Id
@GeneratedValue(generator="JDBC")
......
......@@ -11,7 +11,7 @@ import lombok.Data;
@Data
@ApiModel(value="CourseLibraryLabelContentDiyType",description="课程与标签关系表")
@Table(name = "res_course_library_Label_Content_Diy_Type")
@Table(name = "res_course_library_label_content_diy_type")
public class CourseLibraryLabelContentDiyType {
@Id
@GeneratedValue(generator="JDBC")
......
......@@ -13,7 +13,7 @@ import javax.persistence.Table;
import lombok.Data;
@Data
@ApiModel(value="CoursewareLibrary",description="课件库")
@Table(name = "res_Courseware_Library")
@Table(name = "res_courseware_library")
public class CoursewareLibrary {
@Id
@GeneratedValue(generator="JDBC")
......
......@@ -10,7 +10,7 @@ import lombok.Data;
@Data
@ApiModel(value="CoursewareLibraryDiyType",description="课件与自定义分类关系表")
@Table(name = "res_Courseware_Library_Diy_Type")
@Table(name = "res_courseware_library_diy_type")
public class CoursewareLibraryDiyType {
@Id
@GeneratedValue(generator="JDBC")
......
......@@ -14,7 +14,7 @@ import lombok.Data;
@Data
@ApiModel(value="DocumentLibrary",description="文献库")
@Table(name = "res_Document_Library")
@Table(name = "res_document_library")
public class DocumentLibrary {
@Id
@GeneratedValue(strategy =GenerationType.IDENTITY, generator = "SELECT REPLACE (UUID(), '-', '')")
......
......@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@Table(name = "res_Ebook_Diy_type")
@Table(name = "res_ebook_diy_type")
@ApiModel(value="EbookDiytype",description="电子书与类别关系")
public class EbookDiyType {
@Id
......
......@@ -10,7 +10,7 @@ import lombok.Data;
@Data
@ApiModel(value="EbookLabelContentDiyType",description="电子书与标签关系表")
@Table(name = "res_Ebook_Label_Content_Diy_Type")
@Table(name = "res_ebook_label_content_diy_type")
public class EbookLabelContentDiyType {
@Id
@GeneratedValue(generator="JDBC")
......
......@@ -10,7 +10,7 @@ import lombok.Data;
@Data
@ApiModel(value="ImageLibraryLabelContentDiyType",description="图片与标签关系表")
@Table(name = "res_image_library_Label_Content_Diy_Type")
@Table(name = "res_image_library_label_content_diy_type")
public class ImageLibraryLabelContentDiyType {
@Id
@GeneratedValue(generator="JDBC")
......
......@@ -12,7 +12,7 @@ import lombok.Data;
@Data
@ApiModel(value = "ImageResource", description = "图片关联资源")
@Table(name = "res_Image_Resource")
@Table(name = "res_image_resource")
public class ImageResource {
@Id
@GeneratedValue(generator = "JDBC")
......
......@@ -11,7 +11,7 @@ import lombok.Data;
@Data
@ApiModel(value="ProjectLibraryDiyType",description="专题与自定义分类关系表")
@Table(name = "res_project_library_Diy_Type")
@Table(name = "res_project_library_diy_type")
public class ProjectLibraryDiyType {
@Id
@GeneratedValue(generator="JDBC")
......
......@@ -11,7 +11,7 @@ import lombok.Data;
@Data
@ApiModel(value="ProjectLibraryLabelContentDiyType",description="专题与标签关系表")
@Table(name = "res_course_library_Label_Content_Diy_Type")
@Table(name = "res_course_library_label_content_diy_type")
public class ProjectLibraryLabelContentDiyType {
@Id
@GeneratedValue(generator="JDBC")
......
......@@ -13,7 +13,7 @@ import javax.persistence.Table;
import lombok.Data;
@Data
@Table(name = "res_Record")
@Table(name = "res_record")
@ApiModel(value = "record", description = "浏览记录")
public class Record {
......
......@@ -10,7 +10,7 @@ import lombok.Data;
@Data
@ApiModel(value="VideoLibraryLabelContentDiyType",description="视频与标签关系表")
@Table(name = "res_video_library_Label_Content_Diy_Type")
@Table(name = "res_video_library_label_content_diy_type")
public class VideoLibraryLabelContentDiyType {
@Id
@GeneratedValue(generator="JDBC")
......
......@@ -12,7 +12,7 @@ import lombok.Data;
@Data
@ApiModel(value = "resVideoResource", description = "视频关联资源")
@Table(name = "res_Video_Resource")
@Table(name = "res_video_resource")
public class VideoResource {
@Id
@GeneratedValue(generator = "JDBC")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论