Commit 71da5cb9 by 朱亚洁

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

parent 0820ebe9
......@@ -5,12 +5,15 @@ package com.pcloud.book.book.dto;
import com.pcloud.common.dto.BaseDto;
import lombok.Data;
/**
* @描述:
* @作者:songx
* @创建时间:2016年12月30日,上午11:44:11
* @版本:1.0
*/
@Data
public class BookAdviserDto extends BaseDto {
/**
......@@ -113,205 +116,10 @@ public class BookAdviserDto extends BaseDto {
private Integer isOpenRobotProcess;
public Integer getIsOpenRobotProcess() {
return isOpenRobotProcess;
}
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;
}
/**
* 上下册标签id
*/
private Long volLabelId;
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 {
@ApiModelProperty("小睿分类编号")
private Integer classifyId;
/**
* 上下册标签id
*/
private Long volLabelId;
public Long getVolLabelId() {
return volLabelId;
}
public void setVolLabelId(Long volLabelId) {
this.volLabelId = volLabelId;
}
public Integer getClassifyId() {
return classifyId;
}
......@@ -1917,6 +1930,7 @@ public class BookDto extends BaseDto {
", allBookIncome=" + allBookIncome +
", isOpenRobotProcess=" + isOpenRobotProcess +
", classifyId=" + classifyId +
"} " + super.toString();
", volLabelId=" + volLabelId +
'}';
}
}
......@@ -236,6 +236,18 @@ public class Book extends BaseEntity {
* 目的标签ID
*/
private Long purLabelId;
/**
* 上下册标签id
*/
private Long volLabelId;
public Long getVolLabelId() {
return volLabelId;
}
public void setVolLabelId(Long volLabelId) {
this.volLabelId = volLabelId;
}
public Long getBookId() {
return bookId;
......@@ -636,6 +648,7 @@ public class Book extends BaseEntity {
", proLabelId=" + proLabelId +
", depLabelId=" + depLabelId +
", purLabelId=" + purLabelId +
", volLabelId=" + volLabelId +
'}';
}
}
......@@ -5,12 +5,15 @@ package com.pcloud.book.book.entity;
import com.pcloud.common.entity.BaseEntity;
import lombok.Data;
/**
* @描述:
*
* @作者:songx
* @创建时间:2016年12月30日,上午11:44:11 @版本:1.0
*/
@Data
public class BookAdviser extends BaseEntity {
/**
......@@ -109,180 +112,8 @@ public class BookAdviser extends BaseEntity {
private Long purLabelId;
private Integer isOpenRobotProcess;
public Integer getIsOpenRobotProcess() {
return isOpenRobotProcess;
}
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 +
'}';
}
/**
* 上下册标签id
*/
private Long volLabelId;
}
......@@ -157,6 +157,7 @@ public class AppletGroupSearchRecordBizImpl implements AppletGroupSearchRecordBi
baseTempletClassify.setSecondClassify(adviserDto.getSecondTempletId());
baseTempletClassify.setGradeLabelId(adviserDto.getGraLabelId());
baseTempletClassify.setSubjectLabelId(adviserDto.getSubLabelId());
baseTempletClassify.setVolLabelId(adviserDto.getVolLabelId());
rightsSettingBiz.setClassifyAndLabel(baseTempletClassify);
}
List<GroupActivity4AppletDTO> tishBookSchoolList = new ArrayList<>();
......
......@@ -583,6 +583,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
bookAdviser.setProLabelId(book.getProLabelId());
bookAdviser.setDepLabelId(book.getDepLabelId());
bookAdviser.setPurLabelId(book.getPurLabelId());
bookAdviser.setVolLabelId(book.getVolLabelId());
bookAdviserDao.updateBookTemplet(bookAdviser);
esBookAndAdviserBiz.updateBookAndAdviserToES(Collections.singletonList(bookAdviser.getBookId()));
}
......@@ -861,7 +862,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
BookAdviserDto adviserDto = bookAdviserDao.getBase(bookId,channelId,adviserId);
if (null!=adviserDto){
RightsSettingDto rightsSettingDto = rightsSettingBiz.getByLabel(adviserDto.getTempletId(),
adviserDto.getSecondTempletId(),adviserDto.getGraLabelId(),adviserDto.getSubLabelId());
adviserDto.getSecondTempletId(),adviserDto.getGraLabelId(),adviserDto.getSubLabelId(), adviserDto.getVolLabelId());
if (null!= rightsSettingDto){
bookRightsSettingDTO.setRightsSettingDetail(rightsSettingDto.getDetail());
bookRightsSettingDTO.setRightsSettingIntroduce(rightsSettingDto.getIntroduce());
......
......@@ -1578,6 +1578,7 @@ public class BookBizImpl implements BookBiz {
bookAdviser.setProLabelId(book.getProLabelId());
bookAdviser.setDepLabelId(book.getDepLabelId());
bookAdviser.setPurLabelId(book.getPurLabelId());
bookAdviser.setVolLabelId(book.getVolLabelId());
if(book.getIsBookGroup()!=null&&book.getIsBookGroup()){
bookAdviser.setIsOpenRobotProcess(1);
}else{
......
......@@ -25,7 +25,7 @@ public interface RightsSettingBiz {
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();
......@@ -115,4 +115,12 @@ public interface RightsSettingBiz {
void deleteRightsNowPic(Long rightsNowPicId);
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);
}
......@@ -134,7 +134,7 @@ public class RightsSettingCheck {
if (StringUtil.isEmpty(item.getServeType())) {
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, "作品或应用链接为空!");
}
}
......
......@@ -16,7 +16,7 @@ public interface RightsSettingDAO extends BaseDao<RightsSetting> {
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);
......
......@@ -33,12 +33,13 @@ public class RightsSettingDAOImpl extends BaseDaoImpl<RightsSetting> implement
}
@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<>();
paramMap.put("firstClassify",firstClassify);
paramMap.put("secondClassify",secondClassify);
paramMap.put("gradeLabelId",gradeLabelId);
paramMap.put("subjectLabelId",subjectLabelId);
paramMap.put("volLabelId", volLabelId);
return getSessionTemplate().selectOne(getStatement("getByLabel"),paramMap);
}
......
......@@ -19,5 +19,6 @@ public class BaseTempletClassify extends BaseEntity {
private Long gradeLabelId;
@ApiModelProperty("科目标签id")
private Long subjectLabelId;
@ApiModelProperty("上下册标签id")
private Long volLabelId;
}
......@@ -101,6 +101,11 @@ public class RightsSetting extends BaseTempletClassify {
@Valid
private List<RightsReadType> rightsReadTypes;
/**
* 上下册标签id
*/
private Long volLabelId;
public RightsSetting() {
}
......
......@@ -11,6 +11,7 @@ import com.pcloud.book.rightsSetting.entity.RightsSettingItem;
import com.pcloud.common.dto.ResponseDto;
import com.pcloud.common.page.PageBeanNew;
import com.pcloud.common.permission.PermissionException;
import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.SessionUtil;
import com.pcloud.common.utils.cookie.Cookie;
import com.pcloud.common.utils.string.StringUtil;
......@@ -78,7 +79,8 @@ public class RightsSettingFacede {
@RequestParam(value = "secondClassify", required = false) Long secondClassify,
@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 = "bookQuery", required = false) String bookQuery
@RequestParam(value = "bookQuery", required = false) String bookQuery,
@RequestParam(value = "volLabelId", required = false) Long volLabelId
) throws PermissionException {
SessionUtil.getToken4Redis(token);
......@@ -89,6 +91,7 @@ public class RightsSettingFacede {
rightsSetting.setSubjectLabelId(subjectLabelId);
rightsSetting.setRightsSettingType(rightsSettingType);
rightsSetting.setBookQuery(bookQuery);
rightsSetting.setVolLabelId(volLabelId);
return new ResponseDto<PageBeanNew<RightsSettingDto>>(rightsSettingBiz.listRightsSettingPage(currentPage, numPerPage, rightsSetting));
}
......@@ -269,6 +272,13 @@ public class RightsSettingFacede {
return new ResponseDto<>();
}
@ApiOperation("增加上下册分类权益")
@PostMapping("copyRightsSetting")
public ResponseDto<?> copyRightsSetting(@RequestBody List<Long> volLabelIds){
rightsSettingBiz.copyRightsSetting(volLabelIds);
return new ResponseDto<>();
}
@ApiOperation("获取当前图书的阅读方式")
@GetMapping("getReadType4Book")
public ResponseDto<RightsSettingDto> getReadType4Book(
......
......@@ -299,6 +299,7 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
baseTempletClassify.setSecondClassify(dto.getSecondTempletId());
baseTempletClassify.setGradeLabelId(dto.getGraLabelId());
baseTempletClassify.setSubjectLabelId(dto.getSubLabelId());
baseTempletClassify.setVolLabelId(dto.getVolLabelId());
rightsSettingBiz.setClassifyAndLabel(baseTempletClassify);
GroupActivity4AppletDTO groupActivity4AppletDTO = pcloudGroupActivityDao.getGroupActivity4Applet(baseTempletClassify.getFirstClassify(),baseTempletClassify.getSecondClassify(),baseTempletClassify.getGradeLabelId(),baseTempletClassify.getSubjectLabelId());
......
......@@ -66,6 +66,7 @@
<result column="dep_label_id" property="depLabelId" jdbcType="BIGINT"/>
<result column="pur_label_id" property="purLabelId" jdbcType="BIGINT"/>
<result column="is_open_robot_process" property="isOpenRobotProcess" jdbcType="INTEGER" />
<result column="vol_label_id" property="volLabelId" jdbcType="BIGINT" />
</resultMap>
<resultMap id="bookListPageMap" type="bookDto" extends ="bookMap">
......@@ -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,
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.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.is_open_robot_process
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.vol_label_id
FROM
BOOK_ADVISER BA
INNER JOIN
......
......@@ -21,6 +21,7 @@
<result column="VER_LABEL_ID" property="verLabelId" jdbcType="BIGINT" />
<result column="AREA_LABEL_ID" property="areaLabelId" jdbcType="BIGINT" />
<result column="is_open_robot_process" property="isOpenRobotProcess" jdbcType="BIT" />
<result column="vol_label_id" property="volLabelId" jdbcType="BIGINT" />
</resultMap>
<resultMap id="manageAdviserMap" type="adviserManageDto" >
......@@ -40,14 +41,16 @@
<insert id="insert" parameterType="bookAdviser" useGeneratedKeys="true" keyProperty="bookAdviserId" flushCache="true">
INSERT INTO BOOK_ADVISER (
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 (
#{bookId, jdbcType=VARCHAR}, #{adviserId, jdbcType=VARCHAR}, #{channelId, jdbcType=VARCHAR},
#{adviserId, jdbcType=BIGINT}, NOW(),#{isMainEditor, jdbcType=BIT},#{templetId, jdbcType=BIGINT},
#{secondTempletId, jdbcType=BIGINT},#{graLabelId, jdbcType=BIGINT},#{subLabelId, 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
DUPLICATE KEY UPDATE IS_DELETE = 0, IS_MAIN_EDITOR = #{isMainEditor, jdbcType=BIT}
......@@ -121,7 +124,7 @@
SELECT
BOOK_ADVISER_ID, BOOK_ID, TEMPLET_ID, CHANNEL_ID, ADVISER_ID, IS_DELETE,
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
BOOK_ADVISER
WHERE
......@@ -410,6 +413,9 @@
<if test="purLabelId!=null">
,pur_label_id = #{purLabelId, jdbcType=BIGINT}
</if>
<if test="volLabelId!=null">
,vol_label_id = #{volLabelId, jdbcType=BIGINT}
</if>
, LAST_MODIFIED_DATE = NOW()
WHERE
BOOK_ID = #{bookId, jdbcType=BIGINT}
......@@ -487,6 +493,9 @@
<if test="purLabelId!=null">
,pur_label_id = #{purLabelId, jdbcType=BIGINT}
</if>
<if test="volLabelId!=null">
,vol_label_id = #{volLabelId, jdbcType=BIGINT}
</if>
,LAST_MODIFIED_DATE = NOW()
WHERE
BOOK_ID = #{bookId, jdbcType=BIGINT}
......@@ -647,7 +656,7 @@
SELECT
BOOK_ADVISER_ID, BOOK_ID, TEMPLET_ID, CHANNEL_ID, ADVISER_ID, IS_DELETE,
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
WHERE BOOK_ID=#{bookId}
AND IS_MAIN_EDITOR=1 AND IS_DELETE=0
......
......@@ -19,6 +19,7 @@
<result column="learning_tool_open" property="learningToolOpen" jdbcType="BOOLEAN" />
<result column="draw_open" property="drawNowOpen" jdbcType="BOOLEAN" />
<result column="read_type_title" property="readTypeTitle" jdbcType="VARCHAR" />
<result column="vol_label_id" property="volLabelId" jdbcType="BIGINT" />
</resultMap>
<resultMap id="DtoResultMap" type="com.pcloud.book.rightsSetting.dto.RightsSettingDto">
......@@ -40,11 +41,12 @@
<result column="learning_tool_open" property="learningToolOpen" jdbcType="BOOLEAN" />
<result column="draw_open" property="drawNowOpen" jdbcType="BOOLEAN" />
<result column="read_type_title" property="readTypeTitle" jdbcType="VARCHAR" />
<result column="vol_label_id" property="volLabelId" jdbcType="BIGINT" />
</resultMap>
<sql id="Base_Column_List" >
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
,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>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
select
......@@ -61,12 +63,12 @@
count, first_classify, second_classify,
grade_label_id, subject_label_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)
values ( #{introduce,jdbcType=VARCHAR}, #{detail,jdbcType=VARCHAR},
#{count,jdbcType=INTEGER}, #{firstClassify,jdbcType=BIGINT}, #{secondClassify,jdbcType=BIGINT},
#{gradeLabelId,jdbcType=BIGINT}, #{subjectLabelId,jdbcType=BIGINT}, now(),
#{updateTime,jdbcType=TIMESTAMP}, #{enableGroupService}, #{rightsSettingType}, #{bookId},
#{onlineCourseOpen},#{learningToolOpen},#{drawNowOpen},#{readTypeTitle})
#{onlineCourseOpen},#{learningToolOpen},#{drawNowOpen},#{readTypeTitle}, #{volLabelId})
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.pcloud.book.rightsSetting.entity.RightsSetting" >
update rights_setting
......@@ -116,6 +118,9 @@
<if test="drawNowOpen != null" >
draw_open = #{drawNowOpen}
</if>
<if test="volLabelId != null" >
vol_label_id = #{volLabelId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
......@@ -134,7 +139,8 @@
online_course_open = #{onlineCourseOpen},
learning_tool_open = #{learningToolOpen},
draw_open = #{drawNowOpen},
read_type_title = #{readTypeTitle}
read_type_title = #{readTypeTitle},
vol_label_id = #{volLabelId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
......@@ -165,6 +171,9 @@
<if test="exceptId!=null">
and id != #{exceptId}
</if>
<if test="volLabelId != null" >
and vol_label_id = #{volLabelId}
</if>
</where>
order by create_time desc
</select>
......@@ -172,7 +181,7 @@
<select id="listBookRightsSettingPage" parameterType="map" resultMap="DtoResultMap">
select
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
rights_setting r LEFT JOIN book b ON r.book_id=b.BOOK_ID
WHERE
......@@ -202,6 +211,9 @@
<if test="subjectLabelId != null">
and subject_label_id = #{subjectLabelId}
</if>
<if test="volLabelId != null" >
and vol_label_id = #{volLabelId}
</if>
limit 1
</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