Commit 71da5cb9 by 朱亚洁

1002933书刊分类针对k12新增上下册标识的支持

parent 0820ebe9
...@@ -5,12 +5,15 @@ package com.pcloud.book.book.dto; ...@@ -5,12 +5,15 @@ package com.pcloud.book.book.dto;
import com.pcloud.common.dto.BaseDto; import com.pcloud.common.dto.BaseDto;
import lombok.Data;
/** /**
* @描述: * @描述:
* @作者:songx * @作者:songx
* @创建时间:2016年12月30日,上午11:44:11 * @创建时间:2016年12月30日,上午11:44:11
* @版本:1.0 * @版本:1.0
*/ */
@Data
public class BookAdviserDto extends BaseDto { public class BookAdviserDto extends BaseDto {
/** /**
...@@ -113,205 +116,10 @@ public class BookAdviserDto extends BaseDto { ...@@ -113,205 +116,10 @@ public class BookAdviserDto extends BaseDto {
private Integer isOpenRobotProcess; private Integer isOpenRobotProcess;
public Integer getIsOpenRobotProcess() { /**
return isOpenRobotProcess; * 上下册标签id
} */
private Long volLabelId;
public void setIsOpenRobotProcess(Integer isOpenRobotProcess) {
this.isOpenRobotProcess = isOpenRobotProcess;
}
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
public String getAdviserName() {
return adviserName;
}
public void setAdviserName(String adviserName) {
this.adviserName = adviserName;
}
public String getChannelName() {
return channelName;
}
public void setChannelName(String channelName) {
this.channelName = channelName;
}
public Long getBookAdviserId() {
return bookAdviserId;
}
public void setBookAdviserId(Long bookAdviserId) {
this.bookAdviserId = bookAdviserId;
}
public Long getBookId() {
return bookId;
}
public void setBookId(Long bookId) {
this.bookId = bookId;
}
public Long getAdviserId() {
return adviserId;
}
public void setAdviserId(Long adviserId) {
this.adviserId = adviserId;
}
public Long getChannelId() {
return channelId;
}
public void setChannelId(Long channelId) {
this.channelId = channelId;
}
public Boolean getIsMainEditor() {
return isMainEditor;
}
public void setIsMainEditor(Boolean isMainEditor) {
this.isMainEditor = isMainEditor;
}
public Long getAgentId() {
return agentId;
}
public void setAgentId(Long agentId) {
this.agentId = agentId;
}
public String getAgentName() {
return agentName;
}
public void setAgentName(String agentName) {
this.agentName = agentName;
}
public BookDto getBookDto() {
return bookDto;
}
public void setBookDto(BookDto bookDto) {
this.bookDto = bookDto;
}
public Integer getIsDelete() {
return isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public String getIsbn() {
return isbn;
}
public void setIsbn(String isbn) {
this.isbn = isbn;
}
public Boolean getMainEditor() {
return isMainEditor;
}
public void setMainEditor(Boolean mainEditor) {
isMainEditor = mainEditor;
}
public String getCoverImg() {
return coverImg;
}
public void setCoverImg(String coverImg) {
this.coverImg = coverImg;
}
public Long getTempletId() {
return templetId;
}
public void setTempletId(Long templetId) {
this.templetId = templetId;
}
public Long getSecondTempletId() {
return secondTempletId;
}
public void setSecondTempletId(Long secondTempletId) {
this.secondTempletId = secondTempletId;
}
public Long getGraLabelId() {
return graLabelId;
}
public void setGraLabelId(Long graLabelId) {
this.graLabelId = graLabelId;
}
public Long getSubLabelId() {
return subLabelId;
}
public void setSubLabelId(Long subLabelId) {
this.subLabelId = subLabelId;
}
public Long getVerLabelId() {
return verLabelId;
}
public void setVerLabelId(Long verLabelId) {
this.verLabelId = verLabelId;
}
public Long getAreaLabelId() {
return areaLabelId;
}
public void setAreaLabelId(Long areaLabelId) {
this.areaLabelId = areaLabelId;
}
@Override
public String toString() {
return "BookAdviserDto{" +
"bookAdviserId=" + bookAdviserId +
", bookId=" + bookId +
", isbn='" + isbn + '\'' +
", coverImg='" + coverImg + '\'' +
", adviserId=" + adviserId +
", adviserName='" + adviserName + '\'' +
", channelId=" + channelId +
", templetId=" + templetId +
", channelName='" + channelName + '\'' +
", count=" + count +
", isMainEditor=" + isMainEditor +
", agentId=" + agentId +
", agentName='" + agentName + '\'' +
", bookDto=" + bookDto +
", isDelete=" + isDelete +
", secondTempletId=" + secondTempletId +
", graLabelId=" + graLabelId +
", subLabelId=" + subLabelId +
", verLabelId=" + verLabelId +
", areaLabelId=" + areaLabelId +
'}';
}
} }
...@@ -665,6 +665,19 @@ public class BookDto extends BaseDto { ...@@ -665,6 +665,19 @@ public class BookDto extends BaseDto {
@ApiModelProperty("小睿分类编号") @ApiModelProperty("小睿分类编号")
private Integer classifyId; private Integer classifyId;
/**
* 上下册标签id
*/
private Long volLabelId;
public Long getVolLabelId() {
return volLabelId;
}
public void setVolLabelId(Long volLabelId) {
this.volLabelId = volLabelId;
}
public Integer getClassifyId() { public Integer getClassifyId() {
return classifyId; return classifyId;
} }
...@@ -1917,6 +1930,7 @@ public class BookDto extends BaseDto { ...@@ -1917,6 +1930,7 @@ public class BookDto extends BaseDto {
", allBookIncome=" + allBookIncome + ", allBookIncome=" + allBookIncome +
", isOpenRobotProcess=" + isOpenRobotProcess + ", isOpenRobotProcess=" + isOpenRobotProcess +
", classifyId=" + classifyId + ", classifyId=" + classifyId +
"} " + super.toString(); ", volLabelId=" + volLabelId +
'}';
} }
} }
...@@ -236,6 +236,18 @@ public class Book extends BaseEntity { ...@@ -236,6 +236,18 @@ public class Book extends BaseEntity {
* 目的标签ID * 目的标签ID
*/ */
private Long purLabelId; private Long purLabelId;
/**
* 上下册标签id
*/
private Long volLabelId;
public Long getVolLabelId() {
return volLabelId;
}
public void setVolLabelId(Long volLabelId) {
this.volLabelId = volLabelId;
}
public Long getBookId() { public Long getBookId() {
return bookId; return bookId;
...@@ -636,6 +648,7 @@ public class Book extends BaseEntity { ...@@ -636,6 +648,7 @@ public class Book extends BaseEntity {
", proLabelId=" + proLabelId + ", proLabelId=" + proLabelId +
", depLabelId=" + depLabelId + ", depLabelId=" + depLabelId +
", purLabelId=" + purLabelId + ", purLabelId=" + purLabelId +
", volLabelId=" + volLabelId +
'}'; '}';
} }
} }
...@@ -5,12 +5,15 @@ package com.pcloud.book.book.entity; ...@@ -5,12 +5,15 @@ package com.pcloud.book.book.entity;
import com.pcloud.common.entity.BaseEntity; import com.pcloud.common.entity.BaseEntity;
import lombok.Data;
/** /**
* @描述: * @描述:
* *
* @作者:songx * @作者:songx
* @创建时间:2016年12月30日,上午11:44:11 @版本:1.0 * @创建时间:2016年12月30日,上午11:44:11 @版本:1.0
*/ */
@Data
public class BookAdviser extends BaseEntity { public class BookAdviser extends BaseEntity {
/** /**
...@@ -109,180 +112,8 @@ public class BookAdviser extends BaseEntity { ...@@ -109,180 +112,8 @@ public class BookAdviser extends BaseEntity {
private Long purLabelId; private Long purLabelId;
private Integer isOpenRobotProcess; private Integer isOpenRobotProcess;
/**
public Integer getIsOpenRobotProcess() { * 上下册标签id
return isOpenRobotProcess; */
} private Long volLabelId;
public void setIsOpenRobotProcess(Integer isOpenRobotProcess) {
this.isOpenRobotProcess = isOpenRobotProcess;
}
public Long getTempletId() {
return templetId;
}
public void setTempletId(Long templetId) {
this.templetId = templetId;
}
public Long getBookAdviserId() {
return bookAdviserId;
}
public void setBookAdviserId(Long bookAdviserId) {
this.bookAdviserId = bookAdviserId;
}
public Long getBookId() {
return bookId;
}
public void setBookId(Long bookId) {
this.bookId = bookId;
}
public Long getAdviserId() {
return adviserId;
}
public void setAdviserId(Long adviserId) {
this.adviserId = adviserId;
}
public Long getChannelId() {
return channelId;
}
public void setChannelId(Long channelId) {
this.channelId = channelId;
}
public Long getCreatedUser() {
return createdUser;
}
public void setCreatedUser(Long createdUser) {
this.createdUser = createdUser;
}
public String getSerialNumber() {
return serialNumber;
}
public void setSerialNumber(String serialNumber) {
this.serialNumber = serialNumber;
}
public Boolean getIsMainEditor() {
return isMainEditor;
}
public void setIsMainEditor(Boolean isMainEditor) {
this.isMainEditor = isMainEditor;
}
public Integer getIsDelete() {
return isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public Long getSecondTempletId() {
return secondTempletId;
}
public void setSecondTempletId(Long secondTempletId) {
this.secondTempletId = secondTempletId;
}
public Long getGraLabelId() {
return graLabelId;
}
public void setGraLabelId(Long graLabelId) {
this.graLabelId = graLabelId;
}
public Long getSubLabelId() {
return subLabelId;
}
public void setSubLabelId(Long subLabelId) {
this.subLabelId = subLabelId;
}
public Long getVerLabelId() {
return verLabelId;
}
public void setVerLabelId(Long verLabelId) {
this.verLabelId = verLabelId;
}
public Long getAreaLabelId() {
return areaLabelId;
}
public void setAreaLabelId(Long areaLabelId) {
this.areaLabelId = areaLabelId;
}
public Boolean getIsPrint() {
return isPrint;
}
public void setIsPrint(Boolean isPrint) {
this.isPrint = isPrint;
}
public Long getProLabelId() {
return proLabelId;
}
public void setProLabelId(Long proLabelId) {
this.proLabelId = proLabelId;
}
public Long getDepLabelId() {
return depLabelId;
}
public void setDepLabelId(Long depLabelId) {
this.depLabelId = depLabelId;
}
public Long getPurLabelId() {
return purLabelId;
}
public void setPurLabelId(Long purLabelId) {
this.purLabelId = purLabelId;
}
@Override
public String toString() {
return "BookAdviser{" +
"bookAdviserId=" + bookAdviserId +
", bookId=" + bookId +
", adviserId=" + adviserId +
", channelId=" + channelId +
", templetId=" + templetId +
", createdUser=" + createdUser +
", serialNumber='" + serialNumber + '\'' +
", isMainEditor=" + isMainEditor +
", isDelete=" + isDelete +
", secondTempletId=" + secondTempletId +
", graLabelId=" + graLabelId +
", subLabelId=" + subLabelId +
", verLabelId=" + verLabelId +
", areaLabelId=" + areaLabelId +
", isPrint=" + isPrint +
", proLabelId=" + proLabelId +
", depLabelId=" + depLabelId +
", purLabelId=" + purLabelId +
'}';
}
} }
...@@ -157,6 +157,7 @@ public class AppletGroupSearchRecordBizImpl implements AppletGroupSearchRecordBi ...@@ -157,6 +157,7 @@ public class AppletGroupSearchRecordBizImpl implements AppletGroupSearchRecordBi
baseTempletClassify.setSecondClassify(adviserDto.getSecondTempletId()); baseTempletClassify.setSecondClassify(adviserDto.getSecondTempletId());
baseTempletClassify.setGradeLabelId(adviserDto.getGraLabelId()); baseTempletClassify.setGradeLabelId(adviserDto.getGraLabelId());
baseTempletClassify.setSubjectLabelId(adviserDto.getSubLabelId()); baseTempletClassify.setSubjectLabelId(adviserDto.getSubLabelId());
baseTempletClassify.setVolLabelId(adviserDto.getVolLabelId());
rightsSettingBiz.setClassifyAndLabel(baseTempletClassify); rightsSettingBiz.setClassifyAndLabel(baseTempletClassify);
} }
List<GroupActivity4AppletDTO> tishBookSchoolList = new ArrayList<>(); List<GroupActivity4AppletDTO> tishBookSchoolList = new ArrayList<>();
......
...@@ -583,6 +583,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz { ...@@ -583,6 +583,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
bookAdviser.setProLabelId(book.getProLabelId()); bookAdviser.setProLabelId(book.getProLabelId());
bookAdviser.setDepLabelId(book.getDepLabelId()); bookAdviser.setDepLabelId(book.getDepLabelId());
bookAdviser.setPurLabelId(book.getPurLabelId()); bookAdviser.setPurLabelId(book.getPurLabelId());
bookAdviser.setVolLabelId(book.getVolLabelId());
bookAdviserDao.updateBookTemplet(bookAdviser); bookAdviserDao.updateBookTemplet(bookAdviser);
esBookAndAdviserBiz.updateBookAndAdviserToES(Collections.singletonList(bookAdviser.getBookId())); esBookAndAdviserBiz.updateBookAndAdviserToES(Collections.singletonList(bookAdviser.getBookId()));
} }
...@@ -861,7 +862,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz { ...@@ -861,7 +862,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
BookAdviserDto adviserDto = bookAdviserDao.getBase(bookId,channelId,adviserId); BookAdviserDto adviserDto = bookAdviserDao.getBase(bookId,channelId,adviserId);
if (null!=adviserDto){ if (null!=adviserDto){
RightsSettingDto rightsSettingDto = rightsSettingBiz.getByLabel(adviserDto.getTempletId(), RightsSettingDto rightsSettingDto = rightsSettingBiz.getByLabel(adviserDto.getTempletId(),
adviserDto.getSecondTempletId(),adviserDto.getGraLabelId(),adviserDto.getSubLabelId()); adviserDto.getSecondTempletId(),adviserDto.getGraLabelId(),adviserDto.getSubLabelId(), adviserDto.getVolLabelId());
if (null!= rightsSettingDto){ if (null!= rightsSettingDto){
bookRightsSettingDTO.setRightsSettingDetail(rightsSettingDto.getDetail()); bookRightsSettingDTO.setRightsSettingDetail(rightsSettingDto.getDetail());
bookRightsSettingDTO.setRightsSettingIntroduce(rightsSettingDto.getIntroduce()); bookRightsSettingDTO.setRightsSettingIntroduce(rightsSettingDto.getIntroduce());
......
...@@ -1578,6 +1578,7 @@ public class BookBizImpl implements BookBiz { ...@@ -1578,6 +1578,7 @@ public class BookBizImpl implements BookBiz {
bookAdviser.setProLabelId(book.getProLabelId()); bookAdviser.setProLabelId(book.getProLabelId());
bookAdviser.setDepLabelId(book.getDepLabelId()); bookAdviser.setDepLabelId(book.getDepLabelId());
bookAdviser.setPurLabelId(book.getPurLabelId()); bookAdviser.setPurLabelId(book.getPurLabelId());
bookAdviser.setVolLabelId(book.getVolLabelId());
if(book.getIsBookGroup()!=null&&book.getIsBookGroup()){ if(book.getIsBookGroup()!=null&&book.getIsBookGroup()){
bookAdviser.setIsOpenRobotProcess(1); bookAdviser.setIsOpenRobotProcess(1);
}else{ }else{
......
...@@ -25,7 +25,7 @@ public interface RightsSettingBiz { ...@@ -25,7 +25,7 @@ public interface RightsSettingBiz {
PageBeanNew<RightsSettingDto> listRightsSettingPage(Integer currentPage, Integer numPerPage, RightsSetting rightsSetting); PageBeanNew<RightsSettingDto> listRightsSettingPage(Integer currentPage, Integer numPerPage, RightsSetting rightsSetting);
RightsSettingDto getByLabel(Long firstClassify,Long secondClassify,Long gradeLabelId,Long subjectLabelId); RightsSettingDto getByLabel(Long firstClassify,Long secondClassify,Long gradeLabelId,Long subjectLabelId, Long volLabelId);
Integer getUserCount(); Integer getUserCount();
...@@ -115,4 +115,12 @@ public interface RightsSettingBiz { ...@@ -115,4 +115,12 @@ public interface RightsSettingBiz {
void deleteRightsNowPic(Long rightsNowPicId); void deleteRightsNowPic(Long rightsNowPicId);
RightsSettingDto getReadType4Book(Long wechatUserId, Long bookId, Long channelId, Long adviserId); RightsSettingDto getReadType4Book(Long wechatUserId, Long bookId, Long channelId, Long adviserId);
/**
* 增加上下册分类权益
* @author:zhuyajie
* @date:2020/5/20 19:09
* * @param null
*/
void copyRightsSetting(List<Long> volLabelIds);
} }
...@@ -86,6 +86,7 @@ import com.pcloud.resourcecenter.product.dto.ProductDto; ...@@ -86,6 +86,7 @@ import com.pcloud.resourcecenter.product.dto.ProductDto;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -209,6 +210,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -209,6 +210,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if (!contain4K12) { if (!contain4K12) {
baseTempletClassify.setGradeLabelId(null); baseTempletClassify.setGradeLabelId(null);
baseTempletClassify.setSubjectLabelId(null); baseTempletClassify.setSubjectLabelId(null);
baseTempletClassify.setVolLabelId(null);
} }
} }
...@@ -230,6 +232,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -230,6 +232,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
paramMap.put("secondClassify", rightsSetting.getSecondClassify()); paramMap.put("secondClassify", rightsSetting.getSecondClassify());
paramMap.put("gradeLabelId", rightsSetting.getGradeLabelId()); paramMap.put("gradeLabelId", rightsSetting.getGradeLabelId());
paramMap.put("subjectLabelId", rightsSetting.getSubjectLabelId()); paramMap.put("subjectLabelId", rightsSetting.getSubjectLabelId());
paramMap.put("volLabelId", rightsSetting.getVolLabelId());
} }
List<RightsSettingDto> list = rightsSettingDAO.listRightsSettingPage(paramMap); List<RightsSettingDto> list = rightsSettingDAO.listRightsSettingPage(paramMap);
count = list.size(); count = list.size();
...@@ -410,6 +413,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -410,6 +413,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if (null != rightsSetting.getOnlineRightsSettingTitle() && null == rightsSetting.getOnlineRightsSettingTitle().getId()) { if (null != rightsSetting.getOnlineRightsSettingTitle() && null == rightsSetting.getOnlineRightsSettingTitle().getId()) {
rightsSettingTitleMapper.deleteByRightSettingId(rightsSettingId); rightsSettingTitleMapper.deleteByRightSettingId(rightsSettingId);
if (!ListUtils.isEmpty(rightsSettingTitles)) { if (!ListUtils.isEmpty(rightsSettingTitles)) {
rightsSettingTitles.forEach(rightsSettingTitle -> {rightsSettingTitle.setId(null);});
rightsSettingTitleMapper.batchInsert(rightsSettingTitles); rightsSettingTitleMapper.batchInsert(rightsSettingTitles);
} }
} else if (!ListUtils.isEmpty(rightsSettingTitles)) { } else if (!ListUtils.isEmpty(rightsSettingTitles)) {
...@@ -1033,6 +1037,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -1033,6 +1037,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
paramMap.put("secondClassify", rightsSetting.getSecondClassify()); paramMap.put("secondClassify", rightsSetting.getSecondClassify());
paramMap.put("gradeLabelId", rightsSetting.getGradeLabelId()); paramMap.put("gradeLabelId", rightsSetting.getGradeLabelId());
paramMap.put("subjectLabelId", rightsSetting.getSubjectLabelId()); paramMap.put("subjectLabelId", rightsSetting.getSubjectLabelId());
paramMap.put("volLabelId", rightsSetting.getVolLabelId());
rightsSettingDtoPageBeanNew = rightsSettingDAO.listPageNew(new PageParam(currentPage, numPerPage), paramMap, "listRightsSettingPage"); rightsSettingDtoPageBeanNew = rightsSettingDAO.listPageNew(new PageParam(currentPage, numPerPage), paramMap, "listRightsSettingPage");
} }
if (null != rightsSettingDtoPageBeanNew && !ListUtils.isEmpty(rightsSettingDtoPageBeanNew.getRecordList())) { if (null != rightsSettingDtoPageBeanNew && !ListUtils.isEmpty(rightsSettingDtoPageBeanNew.getRecordList())) {
...@@ -1095,7 +1100,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -1095,7 +1100,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
} }
@Override @Override
public RightsSettingDto getByLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId) { public RightsSettingDto getByLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId,Long volLabelId) {
//医疗保健分类校验 //医疗保健分类校验
if (ArrayUtils.contains(RightsSettingConstant.MEDICAL_INSURANCE_TEMPLET_ID, firstClassify)) { if (ArrayUtils.contains(RightsSettingConstant.MEDICAL_INSURANCE_TEMPLET_ID, firstClassify)) {
subjectLabelId = null; subjectLabelId = null;
...@@ -1110,8 +1115,9 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -1110,8 +1115,9 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
secondClassify = null; secondClassify = null;
subjectLabelId = null; subjectLabelId = null;
gradeLabelId = null; gradeLabelId = null;
volLabelId = null;
} }
RightsSettingDto dto = rightsSettingDAO.getByLabel(firstClassify, secondClassify, gradeLabelId, subjectLabelId); RightsSettingDto dto = rightsSettingDAO.getByLabel(firstClassify, secondClassify, gradeLabelId, subjectLabelId, volLabelId);
return dto; return dto;
} }
...@@ -1170,7 +1176,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -1170,7 +1176,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
//根据分类获取权益 //根据分类获取权益
BookAdviserDto adviserDto = bookAdviserBiz.getBase(bookId, channelId, adviserId); BookAdviserDto adviserDto = bookAdviserBiz.getBase(bookId, channelId, adviserId);
if (null != adviserDto) { if (null != adviserDto) {
rightsSettingDto = getByLabel(adviserDto.getTempletId(), adviserDto.getSecondTempletId(), adviserDto.getGraLabelId(), adviserDto.getSubLabelId()); rightsSettingDto = getByLabel(adviserDto.getTempletId(), adviserDto.getSecondTempletId(), adviserDto.getGraLabelId(), adviserDto.getSubLabelId(), adviserDto.getVolLabelId());
} }
} }
if (null == rightsSettingDto) { if (null == rightsSettingDto) {
...@@ -1253,6 +1259,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -1253,6 +1259,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
baseTempletClassify.setSecondClassify(bookAdviserDto.getSecondTempletId()); baseTempletClassify.setSecondClassify(bookAdviserDto.getSecondTempletId());
baseTempletClassify.setGradeLabelId(bookAdviserDto.getGraLabelId()); baseTempletClassify.setGradeLabelId(bookAdviserDto.getGraLabelId());
baseTempletClassify.setSubjectLabelId(bookAdviserDto.getSubLabelId()); baseTempletClassify.setSubjectLabelId(bookAdviserDto.getSubLabelId());
baseTempletClassify.setVolLabelId(bookAdviserDto.getVolLabelId());
setClassifyAndLabel(baseTempletClassify); setClassifyAndLabel(baseTempletClassify);
if(NumberUtil.isNumber(baseTempletClassify.getFirstClassify())){ if(NumberUtil.isNumber(baseTempletClassify.getFirstClassify())){
// 通过书刊分类拿群 // 通过书刊分类拿群
...@@ -1465,23 +1472,27 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -1465,23 +1472,27 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
Long secondClassify = rightsSetting.getSecondClassify(); Long secondClassify = rightsSetting.getSecondClassify();
Long gradeLabelId = rightsSetting.getGradeLabelId(); Long gradeLabelId = rightsSetting.getGradeLabelId();
Long subjectLabelId = rightsSetting.getSubjectLabelId(); Long subjectLabelId = rightsSetting.getSubjectLabelId();
Long volLabelId = rightsSetting.getVolLabelId();
if (rightsSetting.getRightsSettingType() == 2) {//书刊权益,分类标签从编辑书刊取 if (rightsSetting.getRightsSettingType() == 2) {//书刊权益,分类标签从编辑书刊取
BookAdviserDto adviserDto = bookAdviserBiz.getOneMainBook(rightsSetting.getBookId()); BookAdviserDto adviserDto = bookAdviserBiz.getOneMainBook(rightsSetting.getBookId());
firstClassify = adviserDto.getTempletId(); firstClassify = adviserDto.getTempletId();
secondClassify = adviserDto.getSecondTempletId(); secondClassify = adviserDto.getSecondTempletId();
gradeLabelId = adviserDto.getGraLabelId(); gradeLabelId = adviserDto.getGraLabelId();
subjectLabelId = adviserDto.getSubLabelId(); subjectLabelId = adviserDto.getSubLabelId();
volLabelId = adviserDto.getVolLabelId();
} }
BaseTempletClassify classify = new BaseTempletClassify(); BaseTempletClassify classify = new BaseTempletClassify();
classify.setFirstClassify(firstClassify); classify.setFirstClassify(firstClassify);
classify.setSecondClassify(secondClassify); classify.setSecondClassify(secondClassify);
classify.setGradeLabelId(gradeLabelId); classify.setGradeLabelId(gradeLabelId);
classify.setSubjectLabelId(subjectLabelId); classify.setSubjectLabelId(subjectLabelId);
classify.setVolLabelId(volLabelId);
setClassifyAndLabel(classify); setClassifyAndLabel(classify);
firstClassify = classify.getFirstClassify(); firstClassify = classify.getFirstClassify();
secondClassify = classify.getSecondClassify(); secondClassify = classify.getSecondClassify();
gradeLabelId = classify.getGradeLabelId(); gradeLabelId = classify.getGradeLabelId();
subjectLabelId = classify.getSubjectLabelId(); subjectLabelId = classify.getSubjectLabelId();
volLabelId = classify.getVolLabelId();
if (Objects.isNull(rightsClassifyId)) { if (Objects.isNull(rightsClassifyId)) {
fill.setFillServes(getAppletItems(firstClassify, secondClassify, gradeLabelId, subjectLabelId, 1L, 4)); fill.setFillServes(getAppletItems(firstClassify, secondClassify, gradeLabelId, subjectLabelId, 1L, 4));
fill.setFillOnlineCourses(getAppletItems(firstClassify, secondClassify, gradeLabelId, subjectLabelId, 2L, 3)); fill.setFillOnlineCourses(getAppletItems(firstClassify, secondClassify, gradeLabelId, subjectLabelId, 2L, 3));
...@@ -1617,7 +1628,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -1617,7 +1628,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
BookAdviserDto adviserDto = bookAdviserBiz.getBase(bookId, channelId, adviserId); BookAdviserDto adviserDto = bookAdviserBiz.getBase(bookId, channelId, adviserId);
if (null != adviserDto) { if (null != adviserDto) {
rightsSettingDto = getByLabel(adviserDto.getTempletId(), adviserDto.getSecondTempletId(), adviserDto.getGraLabelId(), rightsSettingDto = getByLabel(adviserDto.getTempletId(), adviserDto.getSecondTempletId(), adviserDto.getGraLabelId(),
adviserDto.getSubLabelId()); adviserDto.getSubLabelId(),adviserDto.getVolLabelId());
if (null == rightsSettingDto) { if (null == rightsSettingDto) {
log.error("该书没有匹配的分类权益,bookId=" + bookId); log.error("该书没有匹配的分类权益,bookId=" + bookId);
return new RightsSettingDto(); return new RightsSettingDto();
...@@ -1753,6 +1764,51 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -1753,6 +1764,51 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
public RightsSettingDto getRightSettingByBookId(Long bookId, Long adviserId, Long channelId){ public RightsSettingDto getRightSettingByBookId(Long bookId, Long adviserId, Long channelId){
//根据分类获取权益 //根据分类获取权益
BookAdviserDto adviserDto = bookAdviserBiz.getBase(bookId, channelId, adviserId); BookAdviserDto adviserDto = bookAdviserBiz.getBase(bookId, channelId, adviserId);
return getByLabel(adviserDto.getTempletId(), adviserDto.getSecondTempletId(), adviserDto.getGraLabelId(), adviserDto.getSubLabelId()); return getByLabel(adviserDto.getTempletId(), adviserDto.getSecondTempletId(), adviserDto.getGraLabelId(), adviserDto.getSubLabelId(), adviserDto.getVolLabelId());
} }
@Override
@Transactional(rollbackFor = Exception.class)
public void copyRightsSetting(List<Long> volLabelIds) {
if (ListUtils.isEmpty(volLabelIds) ||volLabelIds.size()>5){
return;
}
//所有分类权益
Map<String,Object>map = new HashMap<>();
map.put("rightsSettingType",1);
List<RightsSettingDto> list = rightsSettingDAO.listRightsSettingPage(map);
if (ListUtils.isEmpty(list)){
return;
}
for (RightsSettingDto rightsSettingDto :list){
RightsSetting base = this.getRightsSetting(rightsSettingDto.getId());
RightsSetting rightsSetting = new RightsSetting();
rightsSetting.setIntroduce(rightsSettingDto.getIntroduce());
rightsSetting.setDetail(rightsSettingDto.getDetail());
rightsSetting.setCount(rightsSettingDto.getCount());
rightsSetting.setFirstClassify(rightsSettingDto.getFirstClassify());
rightsSetting.setSecondClassify(rightsSettingDto.getSecondClassify());
rightsSetting.setGradeLabelId(rightsSettingDto.getGradeLabelId());
rightsSetting.setSubjectLabelId(rightsSettingDto.getSubjectLabelId());
rightsSetting.setEnableGroupService(rightsSettingDto.getEnableGroupService());
rightsSetting.setRightsSettingType(rightsSettingDto.getRightsSettingType());
rightsSetting.setOnlineCourseOpen(rightsSettingDto.getOnlineCourseOpen());
rightsSetting.setLearningToolOpen(rightsSettingDto.getLearningToolOpen());
rightsSetting.setDrawNowOpen(rightsSettingDto.getDrawNowOpen());
rightsSetting.setReadTypeTitle(rightsSettingDto.getReadTypeTitle());
for (Long volLabelId : volLabelIds){
rightsSetting.setVolLabelId(volLabelId);
if (existCheck(rightsSetting) > 0) {
continue;
}
this.addRightsSetting(rightsSetting);
Long newId = rightsSetting.getId();
//复制
base.setId(newId);
base.setVolLabelId(volLabelId);
this.updateRightsSetting(base);
}
}
}
} }
...@@ -134,7 +134,7 @@ public class RightsSettingCheck { ...@@ -134,7 +134,7 @@ public class RightsSettingCheck {
if (StringUtil.isEmpty(item.getServeType())) { if (StringUtil.isEmpty(item.getServeType())) {
throw new BookBizException(BookBizException.PARAM_IS_NULL, "作品或应用类型为空!"); throw new BookBizException(BookBizException.PARAM_IS_NULL, "作品或应用类型为空!");
} }
if (StringUtil.isEmpty(item.getLinkUrl())) { if (("APP".equals(item.getServeType()) || "PRODUCT".equals(item.getServeType())) && StringUtil.isEmpty(item.getLinkUrl())) {
throw new BookBizException(BookBizException.PARAM_IS_NULL, "作品或应用链接为空!"); throw new BookBizException(BookBizException.PARAM_IS_NULL, "作品或应用链接为空!");
} }
} }
......
...@@ -16,7 +16,7 @@ public interface RightsSettingDAO extends BaseDao<RightsSetting> { ...@@ -16,7 +16,7 @@ public interface RightsSettingDAO extends BaseDao<RightsSetting> {
int updateByPrimaryKey(RightsSetting record); int updateByPrimaryKey(RightsSetting record);
RightsSettingDto getByLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId); RightsSettingDto getByLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Long volLabelId);
RightsSettingDto getByBookId(Long bookId); RightsSettingDto getByBookId(Long bookId);
......
...@@ -33,12 +33,13 @@ public class RightsSettingDAOImpl extends BaseDaoImpl<RightsSetting> implement ...@@ -33,12 +33,13 @@ public class RightsSettingDAOImpl extends BaseDaoImpl<RightsSetting> implement
} }
@Override @Override
public RightsSettingDto getByLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId) { public RightsSettingDto getByLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Long volLabelId) {
Map<String,Object> paramMap = new HashMap<>(); Map<String,Object> paramMap = new HashMap<>();
paramMap.put("firstClassify",firstClassify); paramMap.put("firstClassify",firstClassify);
paramMap.put("secondClassify",secondClassify); paramMap.put("secondClassify",secondClassify);
paramMap.put("gradeLabelId",gradeLabelId); paramMap.put("gradeLabelId",gradeLabelId);
paramMap.put("subjectLabelId",subjectLabelId); paramMap.put("subjectLabelId",subjectLabelId);
paramMap.put("volLabelId", volLabelId);
return getSessionTemplate().selectOne(getStatement("getByLabel"),paramMap); return getSessionTemplate().selectOne(getStatement("getByLabel"),paramMap);
} }
......
...@@ -19,5 +19,6 @@ public class BaseTempletClassify extends BaseEntity { ...@@ -19,5 +19,6 @@ public class BaseTempletClassify extends BaseEntity {
private Long gradeLabelId; private Long gradeLabelId;
@ApiModelProperty("科目标签id") @ApiModelProperty("科目标签id")
private Long subjectLabelId; private Long subjectLabelId;
@ApiModelProperty("上下册标签id")
private Long volLabelId;
} }
...@@ -101,6 +101,11 @@ public class RightsSetting extends BaseTempletClassify { ...@@ -101,6 +101,11 @@ public class RightsSetting extends BaseTempletClassify {
@Valid @Valid
private List<RightsReadType> rightsReadTypes; private List<RightsReadType> rightsReadTypes;
/**
* 上下册标签id
*/
private Long volLabelId;
public RightsSetting() { public RightsSetting() {
} }
......
...@@ -11,6 +11,7 @@ import com.pcloud.book.rightsSetting.entity.RightsSettingItem; ...@@ -11,6 +11,7 @@ import com.pcloud.book.rightsSetting.entity.RightsSettingItem;
import com.pcloud.common.dto.ResponseDto; import com.pcloud.common.dto.ResponseDto;
import com.pcloud.common.page.PageBeanNew; import com.pcloud.common.page.PageBeanNew;
import com.pcloud.common.permission.PermissionException; import com.pcloud.common.permission.PermissionException;
import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.SessionUtil; import com.pcloud.common.utils.SessionUtil;
import com.pcloud.common.utils.cookie.Cookie; import com.pcloud.common.utils.cookie.Cookie;
import com.pcloud.common.utils.string.StringUtil; import com.pcloud.common.utils.string.StringUtil;
...@@ -78,7 +79,8 @@ public class RightsSettingFacede { ...@@ -78,7 +79,8 @@ public class RightsSettingFacede {
@RequestParam(value = "secondClassify", required = false) Long secondClassify, @RequestParam(value = "secondClassify", required = false) Long secondClassify,
@RequestParam(value = "gradeLabelId", required = false) Long gradeLabelId, @RequestParam(value = "gradeLabelId", required = false) Long gradeLabelId,
@RequestParam(value = "subjectLabelId", required = false) Long subjectLabelId, @RequestParam(value = "rightsSettingType", required = false, defaultValue = "1") Integer rightsSettingType, @RequestParam(value = "subjectLabelId", required = false) Long subjectLabelId, @RequestParam(value = "rightsSettingType", required = false, defaultValue = "1") Integer rightsSettingType,
@RequestParam(value = "bookQuery", required = false) String bookQuery @RequestParam(value = "bookQuery", required = false) String bookQuery,
@RequestParam(value = "volLabelId", required = false) Long volLabelId
) throws PermissionException { ) throws PermissionException {
SessionUtil.getToken4Redis(token); SessionUtil.getToken4Redis(token);
...@@ -89,6 +91,7 @@ public class RightsSettingFacede { ...@@ -89,6 +91,7 @@ public class RightsSettingFacede {
rightsSetting.setSubjectLabelId(subjectLabelId); rightsSetting.setSubjectLabelId(subjectLabelId);
rightsSetting.setRightsSettingType(rightsSettingType); rightsSetting.setRightsSettingType(rightsSettingType);
rightsSetting.setBookQuery(bookQuery); rightsSetting.setBookQuery(bookQuery);
rightsSetting.setVolLabelId(volLabelId);
return new ResponseDto<PageBeanNew<RightsSettingDto>>(rightsSettingBiz.listRightsSettingPage(currentPage, numPerPage, rightsSetting)); return new ResponseDto<PageBeanNew<RightsSettingDto>>(rightsSettingBiz.listRightsSettingPage(currentPage, numPerPage, rightsSetting));
} }
...@@ -269,6 +272,13 @@ public class RightsSettingFacede { ...@@ -269,6 +272,13 @@ public class RightsSettingFacede {
return new ResponseDto<>(); return new ResponseDto<>();
} }
@ApiOperation("增加上下册分类权益")
@PostMapping("copyRightsSetting")
public ResponseDto<?> copyRightsSetting(@RequestBody List<Long> volLabelIds){
rightsSettingBiz.copyRightsSetting(volLabelIds);
return new ResponseDto<>();
}
@ApiOperation("获取当前图书的阅读方式") @ApiOperation("获取当前图书的阅读方式")
@GetMapping("getReadType4Book") @GetMapping("getReadType4Book")
public ResponseDto<RightsSettingDto> getReadType4Book( public ResponseDto<RightsSettingDto> getReadType4Book(
......
...@@ -299,6 +299,7 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz { ...@@ -299,6 +299,7 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
baseTempletClassify.setSecondClassify(dto.getSecondTempletId()); baseTempletClassify.setSecondClassify(dto.getSecondTempletId());
baseTempletClassify.setGradeLabelId(dto.getGraLabelId()); baseTempletClassify.setGradeLabelId(dto.getGraLabelId());
baseTempletClassify.setSubjectLabelId(dto.getSubLabelId()); baseTempletClassify.setSubjectLabelId(dto.getSubLabelId());
baseTempletClassify.setVolLabelId(dto.getVolLabelId());
rightsSettingBiz.setClassifyAndLabel(baseTempletClassify); rightsSettingBiz.setClassifyAndLabel(baseTempletClassify);
GroupActivity4AppletDTO groupActivity4AppletDTO = pcloudGroupActivityDao.getGroupActivity4Applet(baseTempletClassify.getFirstClassify(),baseTempletClassify.getSecondClassify(),baseTempletClassify.getGradeLabelId(),baseTempletClassify.getSubjectLabelId()); GroupActivity4AppletDTO groupActivity4AppletDTO = pcloudGroupActivityDao.getGroupActivity4Applet(baseTempletClassify.getFirstClassify(),baseTempletClassify.getSecondClassify(),baseTempletClassify.getGradeLabelId(),baseTempletClassify.getSubjectLabelId());
......
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
<result column="dep_label_id" property="depLabelId" jdbcType="BIGINT"/> <result column="dep_label_id" property="depLabelId" jdbcType="BIGINT"/>
<result column="pur_label_id" property="purLabelId" jdbcType="BIGINT"/> <result column="pur_label_id" property="purLabelId" jdbcType="BIGINT"/>
<result column="is_open_robot_process" property="isOpenRobotProcess" jdbcType="INTEGER" /> <result column="is_open_robot_process" property="isOpenRobotProcess" jdbcType="INTEGER" />
<result column="vol_label_id" property="volLabelId" jdbcType="BIGINT" />
</resultMap> </resultMap>
<resultMap id="bookListPageMap" type="bookDto" extends ="bookMap"> <resultMap id="bookListPageMap" type="bookDto" extends ="bookMap">
...@@ -296,8 +297,8 @@ ...@@ -296,8 +297,8 @@
B.PUBLISH_DATE, B.COVER_IMG, B.AD_IMG, B.DETAIL, B.`VERSION`,B.BOOK_PRICE,B.ISSN,B.SERIAL_NUMBER,BA.IS_MAIN_EDITOR, B.PUBLISH_DATE, B.COVER_IMG, B.AD_IMG, B.DETAIL, B.`VERSION`,B.BOOK_PRICE,B.ISSN,B.SERIAL_NUMBER,BA.IS_MAIN_EDITOR,
IF(ISNULL(BF.BOOK_FUND_ID),0,1) IS_FUND_SUPPORT,START_TIME,END_TIME,BA.TEMPLET_ID,BA.SECOND_TEMPLET_ID, IF(ISNULL(BF.BOOK_FUND_ID),0,1) IS_FUND_SUPPORT,START_TIME,END_TIME,BA.TEMPLET_ID,BA.SECOND_TEMPLET_ID,
BA.GRA_LABEL_ID,BA.SUB_LABEL_ID,BA.VER_LABEL_ID,BA.AREA_LABEL_ID, BA.IS_PRINT isPrint, BA.GRA_LABEL_ID,BA.SUB_LABEL_ID,BA.VER_LABEL_ID,BA.AREA_LABEL_ID, BA.IS_PRINT isPrint,
BA.pro_label_id, BA.dep_label_id,BA.pur_label_id,if(G.ID IS NULL, 0, 1) isBookGroup, G.id BOOK_GROUP_ID,G.join_group_type, BA.pro_label_id, BA.dep_label_id,BA.pur_label_id,BA.vol_label_id,if(G.ID IS NULL, 0, 1) isBookGroup, G.id BOOK_GROUP_ID,G.join_group_type,
BA.is_open_robot_process BA.is_open_robot_process,BA.vol_label_id
FROM FROM
BOOK_ADVISER BA BOOK_ADVISER BA
INNER JOIN INNER JOIN
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
<result column="VER_LABEL_ID" property="verLabelId" jdbcType="BIGINT" /> <result column="VER_LABEL_ID" property="verLabelId" jdbcType="BIGINT" />
<result column="AREA_LABEL_ID" property="areaLabelId" jdbcType="BIGINT" /> <result column="AREA_LABEL_ID" property="areaLabelId" jdbcType="BIGINT" />
<result column="is_open_robot_process" property="isOpenRobotProcess" jdbcType="BIT" /> <result column="is_open_robot_process" property="isOpenRobotProcess" jdbcType="BIT" />
<result column="vol_label_id" property="volLabelId" jdbcType="BIGINT" />
</resultMap> </resultMap>
<resultMap id="manageAdviserMap" type="adviserManageDto" > <resultMap id="manageAdviserMap" type="adviserManageDto" >
...@@ -40,14 +41,16 @@ ...@@ -40,14 +41,16 @@
<insert id="insert" parameterType="bookAdviser" useGeneratedKeys="true" keyProperty="bookAdviserId" flushCache="true"> <insert id="insert" parameterType="bookAdviser" useGeneratedKeys="true" keyProperty="bookAdviserId" flushCache="true">
INSERT INTO BOOK_ADVISER ( INSERT INTO BOOK_ADVISER (
BOOK_ID, ADVISER_ID, CHANNEL_ID, CREATED_USER, CREATED_DATE,IS_MAIN_EDITOR, TEMPLET_ID, SECOND_TEMPLET_ID, BOOK_ID, ADVISER_ID, CHANNEL_ID, CREATED_USER, CREATED_DATE,IS_MAIN_EDITOR, TEMPLET_ID, SECOND_TEMPLET_ID,
GRA_LABEL_ID,SUB_LABEL_ID,VER_LABEL_ID,AREA_LABEL_ID,pro_label_id, dep_label_id,pur_label_id,is_open_robot_process GRA_LABEL_ID,SUB_LABEL_ID,VER_LABEL_ID,AREA_LABEL_ID,pro_label_id, dep_label_id,pur_label_id,is_open_robot_process,
vol_label_id
) )
VALUES ( VALUES (
#{bookId, jdbcType=VARCHAR}, #{adviserId, jdbcType=VARCHAR}, #{channelId, jdbcType=VARCHAR}, #{bookId, jdbcType=VARCHAR}, #{adviserId, jdbcType=VARCHAR}, #{channelId, jdbcType=VARCHAR},
#{adviserId, jdbcType=BIGINT}, NOW(),#{isMainEditor, jdbcType=BIT},#{templetId, jdbcType=BIGINT}, #{adviserId, jdbcType=BIGINT}, NOW(),#{isMainEditor, jdbcType=BIT},#{templetId, jdbcType=BIGINT},
#{secondTempletId, jdbcType=BIGINT},#{graLabelId, jdbcType=BIGINT},#{subLabelId, jdbcType=BIGINT}, #{secondTempletId, jdbcType=BIGINT},#{graLabelId, jdbcType=BIGINT},#{subLabelId, jdbcType=BIGINT},
#{verLabelId, jdbcType=BIGINT},#{areaLabelId, jdbcType=BIGINT},#{proLabelId,jdbcType=BIGINT}, #{verLabelId, jdbcType=BIGINT},#{areaLabelId, jdbcType=BIGINT},#{proLabelId,jdbcType=BIGINT},
#{depLabelId,jdbcType=BIGINT},#{purLabelId,jdbcType=BIGINT},#{isOpenRobotProcess,jdbcType=BIT} #{depLabelId,jdbcType=BIGINT},#{purLabelId,jdbcType=BIGINT},#{isOpenRobotProcess,jdbcType=BIT},
#{volLabelId}
) )
ON ON
DUPLICATE KEY UPDATE IS_DELETE = 0, IS_MAIN_EDITOR = #{isMainEditor, jdbcType=BIT} DUPLICATE KEY UPDATE IS_DELETE = 0, IS_MAIN_EDITOR = #{isMainEditor, jdbcType=BIT}
...@@ -121,7 +124,7 @@ ...@@ -121,7 +124,7 @@
SELECT SELECT
BOOK_ADVISER_ID, BOOK_ID, TEMPLET_ID, CHANNEL_ID, ADVISER_ID, IS_DELETE, BOOK_ADVISER_ID, BOOK_ID, TEMPLET_ID, CHANNEL_ID, ADVISER_ID, IS_DELETE,
TEMPLET_ID,SECOND_TEMPLET_ID, TEMPLET_ID,SECOND_TEMPLET_ID,
GRA_LABEL_ID,SUB_LABEL_ID,VER_LABEL_ID,AREA_LABEL_ID,is_open_robot_process GRA_LABEL_ID,SUB_LABEL_ID,VER_LABEL_ID,AREA_LABEL_ID,is_open_robot_process,vol_label_id
FROM FROM
BOOK_ADVISER BOOK_ADVISER
WHERE WHERE
...@@ -410,6 +413,9 @@ ...@@ -410,6 +413,9 @@
<if test="purLabelId!=null"> <if test="purLabelId!=null">
,pur_label_id = #{purLabelId, jdbcType=BIGINT} ,pur_label_id = #{purLabelId, jdbcType=BIGINT}
</if> </if>
<if test="volLabelId!=null">
,vol_label_id = #{volLabelId, jdbcType=BIGINT}
</if>
, LAST_MODIFIED_DATE = NOW() , LAST_MODIFIED_DATE = NOW()
WHERE WHERE
BOOK_ID = #{bookId, jdbcType=BIGINT} BOOK_ID = #{bookId, jdbcType=BIGINT}
...@@ -487,6 +493,9 @@ ...@@ -487,6 +493,9 @@
<if test="purLabelId!=null"> <if test="purLabelId!=null">
,pur_label_id = #{purLabelId, jdbcType=BIGINT} ,pur_label_id = #{purLabelId, jdbcType=BIGINT}
</if> </if>
<if test="volLabelId!=null">
,vol_label_id = #{volLabelId, jdbcType=BIGINT}
</if>
,LAST_MODIFIED_DATE = NOW() ,LAST_MODIFIED_DATE = NOW()
WHERE WHERE
BOOK_ID = #{bookId, jdbcType=BIGINT} BOOK_ID = #{bookId, jdbcType=BIGINT}
...@@ -647,7 +656,7 @@ ...@@ -647,7 +656,7 @@
SELECT SELECT
BOOK_ADVISER_ID, BOOK_ID, TEMPLET_ID, CHANNEL_ID, ADVISER_ID, IS_DELETE, BOOK_ADVISER_ID, BOOK_ID, TEMPLET_ID, CHANNEL_ID, ADVISER_ID, IS_DELETE,
TEMPLET_ID,SECOND_TEMPLET_ID, TEMPLET_ID,SECOND_TEMPLET_ID,
GRA_LABEL_ID,SUB_LABEL_ID,VER_LABEL_ID,AREA_LABEL_ID GRA_LABEL_ID,SUB_LABEL_ID,VER_LABEL_ID,AREA_LABEL_ID,vol_label_id
FROM book_adviser FROM book_adviser
WHERE BOOK_ID=#{bookId} WHERE BOOK_ID=#{bookId}
AND IS_MAIN_EDITOR=1 AND IS_DELETE=0 AND IS_MAIN_EDITOR=1 AND IS_DELETE=0
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
<result column="learning_tool_open" property="learningToolOpen" jdbcType="BOOLEAN" /> <result column="learning_tool_open" property="learningToolOpen" jdbcType="BOOLEAN" />
<result column="draw_open" property="drawNowOpen" jdbcType="BOOLEAN" /> <result column="draw_open" property="drawNowOpen" jdbcType="BOOLEAN" />
<result column="read_type_title" property="readTypeTitle" jdbcType="VARCHAR" /> <result column="read_type_title" property="readTypeTitle" jdbcType="VARCHAR" />
<result column="vol_label_id" property="volLabelId" jdbcType="BIGINT" />
</resultMap> </resultMap>
<resultMap id="DtoResultMap" type="com.pcloud.book.rightsSetting.dto.RightsSettingDto"> <resultMap id="DtoResultMap" type="com.pcloud.book.rightsSetting.dto.RightsSettingDto">
...@@ -40,11 +41,12 @@ ...@@ -40,11 +41,12 @@
<result column="learning_tool_open" property="learningToolOpen" jdbcType="BOOLEAN" /> <result column="learning_tool_open" property="learningToolOpen" jdbcType="BOOLEAN" />
<result column="draw_open" property="drawNowOpen" jdbcType="BOOLEAN" /> <result column="draw_open" property="drawNowOpen" jdbcType="BOOLEAN" />
<result column="read_type_title" property="readTypeTitle" jdbcType="VARCHAR" /> <result column="read_type_title" property="readTypeTitle" jdbcType="VARCHAR" />
<result column="vol_label_id" property="volLabelId" jdbcType="BIGINT" />
</resultMap> </resultMap>
<sql id="Base_Column_List" > <sql id="Base_Column_List" >
id, introduce, detail, count, first_classify, second_classify, grade_label_id, subject_label_id, id, introduce, detail, count, first_classify, second_classify, grade_label_id, subject_label_id,
create_time, update_time, enable_group_service, rights_setting_type, book_id create_time, update_time, enable_group_service, rights_setting_type, book_id
,online_course_open,learning_tool_open,draw_open,read_type_title ,online_course_open,learning_tool_open,draw_open,read_type_title, vol_label_id
</sql> </sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" > <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
select select
...@@ -61,12 +63,12 @@ ...@@ -61,12 +63,12 @@
count, first_classify, second_classify, count, first_classify, second_classify,
grade_label_id, subject_label_id, create_time, grade_label_id, subject_label_id, create_time,
update_time, enable_group_service, rights_setting_type, book_id, update_time, enable_group_service, rights_setting_type, book_id,
online_course_open,learning_tool_open,draw_open,read_type_title) online_course_open,learning_tool_open,draw_open,read_type_title, vol_label_id)
values ( #{introduce,jdbcType=VARCHAR}, #{detail,jdbcType=VARCHAR}, values ( #{introduce,jdbcType=VARCHAR}, #{detail,jdbcType=VARCHAR},
#{count,jdbcType=INTEGER}, #{firstClassify,jdbcType=BIGINT}, #{secondClassify,jdbcType=BIGINT}, #{count,jdbcType=INTEGER}, #{firstClassify,jdbcType=BIGINT}, #{secondClassify,jdbcType=BIGINT},
#{gradeLabelId,jdbcType=BIGINT}, #{subjectLabelId,jdbcType=BIGINT}, now(), #{gradeLabelId,jdbcType=BIGINT}, #{subjectLabelId,jdbcType=BIGINT}, now(),
#{updateTime,jdbcType=TIMESTAMP}, #{enableGroupService}, #{rightsSettingType}, #{bookId}, #{updateTime,jdbcType=TIMESTAMP}, #{enableGroupService}, #{rightsSettingType}, #{bookId},
#{onlineCourseOpen},#{learningToolOpen},#{drawNowOpen},#{readTypeTitle}) #{onlineCourseOpen},#{learningToolOpen},#{drawNowOpen},#{readTypeTitle}, #{volLabelId})
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.pcloud.book.rightsSetting.entity.RightsSetting" > <update id="updateByPrimaryKeySelective" parameterType="com.pcloud.book.rightsSetting.entity.RightsSetting" >
update rights_setting update rights_setting
...@@ -116,6 +118,9 @@ ...@@ -116,6 +118,9 @@
<if test="drawNowOpen != null" > <if test="drawNowOpen != null" >
draw_open = #{drawNowOpen} draw_open = #{drawNowOpen}
</if> </if>
<if test="volLabelId != null" >
vol_label_id = #{volLabelId,jdbcType=BIGINT},
</if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
...@@ -134,7 +139,8 @@ ...@@ -134,7 +139,8 @@
online_course_open = #{onlineCourseOpen}, online_course_open = #{onlineCourseOpen},
learning_tool_open = #{learningToolOpen}, learning_tool_open = #{learningToolOpen},
draw_open = #{drawNowOpen}, draw_open = #{drawNowOpen},
read_type_title = #{readTypeTitle} read_type_title = #{readTypeTitle},
vol_label_id = #{volLabelId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
...@@ -165,6 +171,9 @@ ...@@ -165,6 +171,9 @@
<if test="exceptId!=null"> <if test="exceptId!=null">
and id != #{exceptId} and id != #{exceptId}
</if> </if>
<if test="volLabelId != null" >
and vol_label_id = #{volLabelId}
</if>
</where> </where>
order by create_time desc order by create_time desc
</select> </select>
...@@ -172,7 +181,7 @@ ...@@ -172,7 +181,7 @@
<select id="listBookRightsSettingPage" parameterType="map" resultMap="DtoResultMap"> <select id="listBookRightsSettingPage" parameterType="map" resultMap="DtoResultMap">
select select
r.id, r.introduce, r.detail, r.count, r.first_classify, r.second_classify, r.grade_label_id, r.subject_label_id, r.id, r.introduce, r.detail, r.count, r.first_classify, r.second_classify, r.grade_label_id, r.subject_label_id,
r.create_time, r.update_time, r.enable_group_service, r.rights_setting_type, r.book_id, b.BOOK_NAME r.create_time, r.update_time, r.enable_group_service, r.rights_setting_type, r.book_id, b.BOOK_NAME, r.vol_label_id
from from
rights_setting r LEFT JOIN book b ON r.book_id=b.BOOK_ID rights_setting r LEFT JOIN book b ON r.book_id=b.BOOK_ID
WHERE WHERE
...@@ -202,6 +211,9 @@ ...@@ -202,6 +211,9 @@
<if test="subjectLabelId != null"> <if test="subjectLabelId != null">
and subject_label_id = #{subjectLabelId} and subject_label_id = #{subjectLabelId}
</if> </if>
<if test="volLabelId != null" >
and vol_label_id = #{volLabelId}
</if>
limit 1 limit 1
</select> </select>
......
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