提交 57ceb0e2 authored 作者: liupengfei's avatar liupengfei

--no commit message

上级 07f5d082
...@@ -648,7 +648,7 @@ public class EbookController { ...@@ -648,7 +648,7 @@ public class EbookController {
EbookDiyType edt = new EbookDiyType(); EbookDiyType edt = new EbookDiyType();
edt.setEbookId(ev.getEbook().getId()); edt.setEbookId(ev.getEbook().getId());
edt.setCode(ev.getCode()); edt.setCode(ev.getCode());
edt.setDiyTypeId(ev.getDtId()); edt.setDtId(ev.getDtId());
dtservice.insert(edt); dtservice.insert(edt);
ev.getChapterSet().forEach(chapter -> { ev.getChapterSet().forEach(chapter -> {
chapter.setBookid(ev.getBook().getId()); chapter.setBookid(ev.getBook().getId());
...@@ -848,7 +848,7 @@ public class EbookController { ...@@ -848,7 +848,7 @@ public class EbookController {
EbookDiyType edt = new EbookDiyType(); EbookDiyType edt = new EbookDiyType();
edt.setEbookId(ev.getEbook().getId()); edt.setEbookId(ev.getEbook().getId());
edt.setCode(ev.getCode()); edt.setCode(ev.getCode());
edt.setDiyTypeId(ev.getDtId()); edt.setDtId(ev.getDtId());
dtservice.insert(edt); dtservice.insert(edt);
} }
if(ev.getChapterSet() != null && ev.getChapterSet().size() > 0) { if(ev.getChapterSet() != null && ev.getChapterSet().size() > 0) {
......
...@@ -586,8 +586,8 @@ public class ResourceLibraryController { ...@@ -586,8 +586,8 @@ public class ResourceLibraryController {
for (int i = 0; i < form.getDiyTypeId().size(); i++) { for (int i = 0; i < form.getDiyTypeId().size(); i++) {
AuthorLibraryDiytype obj = new AuthorLibraryDiytype(); AuthorLibraryDiytype obj = new AuthorLibraryDiytype();
obj.setAuthorLibraryId(objectId); obj.setAuthorLibraryId(objectId);
obj.setDiytypeId(Integer.parseInt(form.getDiyTypeId().get(i))); obj.setDtId(Integer.parseInt(form.getDiyTypeId().get(i)));
obj.setDiytypeCode(form.getDiyTypeCode().get(i)); obj.setCode(form.getDiyTypeCode().get(i));
list.add(obj); list.add(obj);
} }
}); });
...@@ -606,7 +606,7 @@ public class ResourceLibraryController { ...@@ -606,7 +606,7 @@ public class ResourceLibraryController {
for (int i = 0; i < form.getDiyTypeId().size(); i++) { for (int i = 0; i < form.getDiyTypeId().size(); i++) {
EbookDiyType obj = new EbookDiyType(); EbookDiyType obj = new EbookDiyType();
obj.setEbookId(objectId); obj.setEbookId(objectId);
obj.setDiyTypeId(Integer.parseInt(form.getDiyTypeId().get(i))); obj.setDtId(Integer.parseInt(form.getDiyTypeId().get(i)));
obj.setCode(form.getDiyTypeCode().get(i)); obj.setCode(form.getDiyTypeCode().get(i));
list.add(obj); list.add(obj);
} }
......
...@@ -21,7 +21,7 @@ public interface AuthorLibraryMapper extends BaseMapper<AuthorLibrary> { ...@@ -21,7 +21,7 @@ public interface AuthorLibraryMapper extends BaseMapper<AuthorLibrary> {
+ " like(a.name,form.name) " + " like(a.name,form.name) "
+ " like(a.title,form.title) " + " like(a.title,form.title) "
+ " like(a.institutionName,form.institutionName) " + " like(a.institutionName,form.institutionName) "
+ " like(t.diytypeCode,form.diyTypeCode) " + " like(t.code,form.diyTypeCode) "
/*+ "<if test='form.diyTypeId != null and form.diyTypeId.size > 0'>" /*+ "<if test='form.diyTypeId != null and form.diyTypeId.size > 0'>"
+ "and t.diytypeid in " + "and t.diytypeid in "
...@@ -46,7 +46,7 @@ public interface AuthorLibraryMapper extends BaseMapper<AuthorLibrary> { ...@@ -46,7 +46,7 @@ public interface AuthorLibraryMapper extends BaseMapper<AuthorLibrary> {
+ " where 1 = 1 and a.status = 1 " + " where 1 = 1 and a.status = 1 "
+ " like(a.name,form.title) " + " like(a.name,form.title) "
+ " like(t.diytypeCode,form.diyTypeCode) " + " like(t.code,form.diyTypeCode) "
+ "<if test='form.ids != null and form.ids.size > 0'>" + "<if test='form.ids != null and form.ids.size > 0'>"
+ "and a.id not in " + "and a.id not in "
......
...@@ -131,7 +131,7 @@ public class PromotionContentServiceImpl extends BaseServiceImpl<PromotionConten ...@@ -131,7 +131,7 @@ public class PromotionContentServiceImpl extends BaseServiceImpl<PromotionConten
List<EbookDiyType> dy = ebookDiyTypeMapper.select(eb); List<EbookDiyType> dy = ebookDiyTypeMapper.select(eb);
if(dy != null && dy.size() > 0){ if(dy != null && dy.size() > 0){
for(EbookDiyType d : dy){ for(EbookDiyType d : dy){
DiyType result = diyTypeMapper.selectByPrimaryKey(d.getDiyTypeId()); DiyType result = diyTypeMapper.selectByPrimaryKey(d.getDtId());
// 判断响应是否正确 // 判断响应是否正确
if (result != null) { if (result != null) {
diyType += result.getTypeName() + ","; diyType += result.getTypeName() + ",";
......
...@@ -20,7 +20,7 @@ public class AuthorLibraryDiytype { ...@@ -20,7 +20,7 @@ public class AuthorLibraryDiytype {
@ApiModelProperty("作者Id") @ApiModelProperty("作者Id")
private String authorLibraryId; private String authorLibraryId;
@ApiModelProperty("类别Id") @ApiModelProperty("类别Id")
private Integer diytypeId; private Integer dtId;
@ApiModelProperty("类别Code") @ApiModelProperty("类别Code")
private String diytypeCode; private String code;
} }
...@@ -19,7 +19,7 @@ public class EbookDiyType { ...@@ -19,7 +19,7 @@ public class EbookDiyType {
@ApiModelProperty("电子书Id") @ApiModelProperty("电子书Id")
private String ebookId; private String ebookId;
@ApiModelProperty("类别Id") @ApiModelProperty("类别Id")
private Integer diyTypeId; private Integer dtId;
@ApiModelProperty("类别Code") @ApiModelProperty("类别Code")
private String code; private String code;
} }
...@@ -14,7 +14,7 @@ public interface FgAuthorLibraryDiytypeMapper extends BaseMapper<AuthorLibraryDi ...@@ -14,7 +14,7 @@ public interface FgAuthorLibraryDiytypeMapper extends BaseMapper<AuthorLibraryDi
+ "select dt.id, dt.parentId, dt.sort, dt.showName, dt.code " + "select dt.id, dt.parentId, dt.sort, dt.showName, dt.code "
+ "from res_Author_Library a " + "from res_Author_Library a "
+ "left join res_Author_Library_Diy_Type ad on a.id = ad.authorlibraryid " + "left join res_Author_Library_Diy_Type ad on a.id = ad.authorlibraryid "
+ "left join res_Diy_Type dt on ad.diytypeCode = dt.code " + "left join res_Diy_Type dt on ad.code = dt.code "
+ "where 1=1 " + "where 1=1 "
+ "and a.status = 1 and dt.status = 1 " + "and a.status = 1 and dt.status = 1 "
+ "<if test='" +LIST_NOT_EMPTY + "(ids)'>" + "<if test='" +LIST_NOT_EMPTY + "(ids)'>"
......
...@@ -77,7 +77,7 @@ public interface FgAuthorLibraryMapper extends BaseMapper<AuthorLibrary> { ...@@ -77,7 +77,7 @@ public interface FgAuthorLibraryMapper extends BaseMapper<AuthorLibrary> {
+ "where 1 = 1 and a.status = 1 " + "where 1 = 1 and a.status = 1 "
+ " eq(a.nationsType,form.nationsType) " + " eq(a.nationsType,form.nationsType) "
+ "<if test='form.diyTypeCode != null and form.diyTypeCode.size > 0'>" + "<if test='form.diyTypeCode != null and form.diyTypeCode.size > 0'>"
+ " and t.diytypeCode like " + " and t.code like "
+ " <foreach collection=\"form.diyTypeCode\" index=\"index\" item=\"code\" open=\"(\" separator=\",\" close=\")\">" + " <foreach collection=\"form.diyTypeCode\" index=\"index\" item=\"code\" open=\"(\" separator=\",\" close=\")\">"
+ " concat(#{code},'%') " + " concat(#{code},'%') "
+ "</foreach>" + "</foreach>"
......
...@@ -130,14 +130,14 @@ public interface FgEbookMapper extends BaseMapper<Ebook>{ ...@@ -130,14 +130,14 @@ public interface FgEbookMapper extends BaseMapper<Ebook>{
*/ */
@Select("<script>" @Select("<script>"
+ "select bb.id, bb.name, bb.authorId, bb.author, bb.translatorId, bb.translator, " + "select bb.id, bb.name, bb.authorId, bb.author, bb.translatorId, bb.translator, "
+ "bb.publishTime, bb.status, bb.nationsType, be.realPrice, be.priceOption, be.price, be.bookCover, be.summary, be.bookStatus, be.browseNum, be.goodsType " + "bb.publishTime, bb.status, be.realPrice, be.priceOption, be.price, be.img, be.synopsis, be.bookStatus, be.browseNum, be.goodsType "
+ "FROM res_book bb " + "FROM res_book bb "
+ "LEFT JOIN res_ebook be ON bb.id = be.id " + "LEFT JOIN res_ebook be ON bb.id = be.id "
+ "LEFT JOIN res_ebook_diy_type bdt ON be.id = bdt.ebookId " + "LEFT JOIN res_ebook_diy_type bdt ON be.id = bdt.ebookId "
+ "LEFT JOIN res_ebook_label_content_diy_type blcdt on be.id = blcdt.ebookId " + "LEFT JOIN res_ebook_label_content_diy_type blcdt on be.id = blcdt.ebookId "
+ "WHERE be.bookStatus = 4 " + "WHERE be.bookStatus = 4 "
+ "<if test='diyTypeCode != null and diyTypeCode.size > 0'>" + "<if test='diyTypeCode != null and diyTypeCode.size > 0'>"
+ "and bdt.diytypeCode in " + "and bdt.code in "
+ " <foreach collection=\"diyTypeCode\" index=\"index\" item=\"code\" open=\"(\" separator=\",\" close=\")\">" + " <foreach collection=\"diyTypeCode\" index=\"index\" item=\"code\" open=\"(\" separator=\",\" close=\")\">"
+ " concat(#{code},'%') " + " concat(#{code},'%') "
+ "</foreach>" + "</foreach>"
...@@ -148,9 +148,6 @@ public interface FgEbookMapper extends BaseMapper<Ebook>{ ...@@ -148,9 +148,6 @@ public interface FgEbookMapper extends BaseMapper<Ebook>{
+ " concat(#{code},'%') " + " concat(#{code},'%') "
+ "</foreach>" + "</foreach>"
+ "</if>" + "</if>"
+ "<if test = 'nationsType != null' >"
+ "and bb.nationsType = #{nationsType} "
+ "</if>"
+ "<if test = 'authorId != null' >" + "<if test = 'authorId != null' >"
+ "and bb.authorId = #{authorId} " + "and bb.authorId = #{authorId} "
+ "</if>" + "</if>"
...@@ -166,7 +163,7 @@ public interface FgEbookMapper extends BaseMapper<Ebook>{ ...@@ -166,7 +163,7 @@ public interface FgEbookMapper extends BaseMapper<Ebook>{
*/ */
@Select("<script>" @Select("<script>"
+ "select bb.id, bb.name, bb.authorId, bb.author, bb.translatorId, bb.translator, " + "select bb.id, bb.name, bb.authorId, bb.author, bb.translatorId, bb.translator, "
+ "bb.publishTime, bb.status, bb.nationsType, be.price, be.priceOption, be.realPrice, be.bookCover, be.summary, be.bookStatus, be.browseNum, be.goodsType " + "bb.publishTime, bb.status, be.price, be.priceOption, be.realPrice, be.img, be.synopsis, be.bookStatus, be.browseNum, be.goodsType "
+ "FROM res_book bb " + "FROM res_book bb "
+ "LEFT JOIN res_ebook be ON bb.id = be.id " + "LEFT JOIN res_ebook be ON bb.id = be.id "
+ "WHERE be.bookStatus = 4 " + "WHERE be.bookStatus = 4 "
...@@ -178,7 +175,7 @@ public interface FgEbookMapper extends BaseMapper<Ebook>{ ...@@ -178,7 +175,7 @@ public interface FgEbookMapper extends BaseMapper<Ebook>{
@Select("<script>" @Select("<script>"
+ "select bb.id, bb.name, " + "select bb.id, bb.name, "
+ "bb.publishTime, bb.status, bb.nationsType,bb.author, be.priceOption, be.price, be.realPrice, be.bookCover, be.bookStatus, be.browseNum,bb.resourceType " + "bb.publishTime, bb.status,bb.author, be.priceOption, be.price, be.realPrice, be.img, be.bookStatus, be.browseNum,bb.resourceType "
+ "FROM res_book bb " + "FROM res_book bb "
+ "LEFT JOIN res_ebook be ON bb.id = be.id " + "LEFT JOIN res_ebook be ON bb.id = be.id "
+ "where be.bookStatus = 4 " + "where be.bookStatus = 4 "
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论