Commit 09fefaa2 by 阮思源

1002716书刊标签优化

parent 9ff5e365
......@@ -484,7 +484,7 @@ public class BookDto extends BaseDto {
/**
* 社群码深度标签
*/
private Long depLabelId;
private Long bookGroupDepLabelId;
/**
* 群分类数量
......@@ -631,6 +631,25 @@ public class BookDto extends BaseDto {
*/
private Boolean hasRobotKeyword;
@ApiModelProperty("专业标签ID")
private Long proLabelId;
@ApiModelProperty("深度标签ID")
private Long depLabelId;
@ApiModelProperty("目的标签ID")
private Long purLabelId;
@ApiModelProperty("专业标签名称")
private String proLabelName;
@ApiModelProperty("深度标签名称")
private String depLabelName;
@ApiModelProperty("目的标签名称")
private String purLabelName;
public String getQrRemark() {
return qrRemark;
}
......@@ -1491,12 +1510,12 @@ public class BookDto extends BaseDto {
this.advertisingSpaceNum = advertisingSpaceNum;
}
public Long getDepLabelId() {
return depLabelId;
public Long getBookGroupDepLabelId() {
return bookGroupDepLabelId;
}
public void setDepLabelId(Long depLabelId) {
this.depLabelId = depLabelId;
public void setBookGroupDepLabelId(Long bookGroupDepLabelId) {
this.bookGroupDepLabelId = bookGroupDepLabelId;
}
public Long getRegisterNum() {
......@@ -1683,6 +1702,54 @@ public class BookDto extends BaseDto {
this.resourceCount = resourceCount;
}
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;
}
public String getProLabelName() {
return proLabelName;
}
public void setProLabelName(String proLabelName) {
this.proLabelName = proLabelName;
}
public String getDepLabelName() {
return depLabelName;
}
public void setDepLabelName(String depLabelName) {
this.depLabelName = depLabelName;
}
public String getPurLabelName() {
return purLabelName;
}
public void setPurLabelName(String purLabelName) {
this.purLabelName = purLabelName;
}
@Override
public String toString() {
return "BookDto{" +
......@@ -1779,7 +1846,7 @@ public class BookDto extends BaseDto {
", bookGroupId=" + bookGroupId +
", groupQrcodeUrl='" + groupQrcodeUrl + '\'' +
", groupQrcodeName='" + groupQrcodeName + '\'' +
", depLabelId=" + depLabelId +
", bookGroupDepLabelId=" + bookGroupDepLabelId +
", classifyCount=" + classifyCount +
", groupPersonCount=" + groupPersonCount +
", groupCount=" + groupCount +
......@@ -1810,6 +1877,12 @@ public class BookDto extends BaseDto {
", adviserIncome=" + adviserIncome +
", isPrint=" + isPrint +
", hasRobotKeyword=" + hasRobotKeyword +
", proLabelId=" + proLabelId +
", depLabelId=" + depLabelId +
", purLabelId=" + purLabelId +
", proLabelName='" + proLabelName + '\'' +
", depLabelName='" + depLabelName + '\'' +
", purLabelName='" + purLabelName + '\'' +
'}';
}
}
......@@ -222,6 +222,21 @@ public class Book extends BaseEntity {
*/
private Long areaLabelId;
/**
* 专业标签ID
*/
private Long proLabelId;
/**
* 深度标签ID
*/
private Long depLabelId;
/**
* 目的标签ID
*/
private Long purLabelId;
public Long getBookId() {
return bookId;
}
......@@ -550,6 +565,30 @@ public class Book extends BaseEntity {
this.areaLabelId = areaLabelId;
}
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 "Book{" +
......@@ -594,6 +633,9 @@ public class Book extends BaseEntity {
", subLabelId=" + subLabelId +
", verLabelId=" + verLabelId +
", areaLabelId=" + areaLabelId +
"} " + super.toString();
", proLabelId=" + proLabelId +
", depLabelId=" + depLabelId +
", purLabelId=" + purLabelId +
'}';
}
}
......@@ -93,6 +93,22 @@ public class BookAdviser extends BaseEntity {
*/
private Boolean isPrint;
/**
* 专业标签ID
*/
private Long proLabelId;
/**
* 深度标签ID
*/
private Long depLabelId;
/**
* 目的标签ID
*/
private Long purLabelId;
public Long getTempletId() {
return templetId;
}
......@@ -213,6 +229,30 @@ public class BookAdviser extends BaseEntity {
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{" +
......@@ -230,6 +270,10 @@ public class BookAdviser extends BaseEntity {
", subLabelId=" + subLabelId +
", verLabelId=" + verLabelId +
", areaLabelId=" + areaLabelId +
"} " + super.toString();
", isPrint=" + isPrint +
", proLabelId=" + proLabelId +
", depLabelId=" + depLabelId +
", purLabelId=" + purLabelId +
'}';
}
}
......@@ -555,6 +555,9 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
bookAdviser.setSubLabelId(book.getSubLabelId());
bookAdviser.setAreaLabelId(book.getAreaLabelId());
bookAdviser.setVerLabelId(book.getVerLabelId());
bookAdviser.setProLabelId(book.getProLabelId());
bookAdviser.setDepLabelId(book.getDepLabelId());
bookAdviser.setPurLabelId(book.getPurLabelId());
bookAdviserDao.updateBookTemplet(bookAdviser);
}
......
......@@ -511,6 +511,8 @@ public class BookBizImpl implements BookBiz {
bookSet.setFreezeStatus(bookDto);
// 设置模板名字
bookSet.setTemplateName(bookDto);
// 设置专业深度目的标签
bookSet.setProDepPurLabelName(bookDto);
// 设置唯一编号
bookDto.setUniqueNumber("BK" + bookDto.getBookId());
// 设置二维码个数
......@@ -1522,6 +1524,9 @@ public class BookBizImpl implements BookBiz {
bookAdviser.setGraLabelId(book.getGraLabelId());
bookAdviser.setAreaLabelId(book.getAreaLabelId());
bookAdviser.setVerLabelId(book.getVerLabelId());
bookAdviser.setProLabelId(book.getProLabelId());
bookAdviser.setDepLabelId(book.getDepLabelId());
bookAdviser.setPurLabelId(book.getPurLabelId());
bookAdviserBiz.create(bookAdviser);
}
......
......@@ -72,6 +72,7 @@ import com.pcloud.common.utils.ResponseHandleUtil;
import com.pcloud.common.utils.number.AmountUtil;
import com.pcloud.common.utils.string.StringUtil;
import com.pcloud.contentcenter.resource.dto.ResourceDTO;
import com.pcloud.labelcenter.label.service.LabelService;
import com.pcloud.resourcecenter.product.dto.ProductDto;
import com.pcloud.resourcecenter.product.dto.ProductTypeDto;
import com.pcloud.resourcecenter.product.dto.SpecificationDto;
......@@ -171,6 +172,8 @@ public class BookSet {
private BookGroupClassifyDao bookGroupClassifyDao;
@Autowired
private SettlementConsr settlementConsr;
@Autowired
private LabelService labelService;
/**
* 检验书号是否合法,包括ISSN,ISBN,CSSN
......@@ -1706,4 +1709,37 @@ public class BookSet {
}
}
}
@ParamLog("设置标签名称")
public void setProDepPurLabelName(BookDto bookDto) {
List<Long> labelIds = new ArrayList<>();
if (bookDto.getProLabelId() != null) {
labelIds.add(bookDto.getProLabelId());
}
if (bookDto.getPurLabelId() != null) {
labelIds.add(bookDto.getPurLabelId());
}
if (bookDto.getDepLabelId() != null) {
labelIds.add(bookDto.getDepLabelId());
}
Map<Long, String> labelMap = new HashMap<>();
if (!ListUtils.isEmpty(labelIds)) {
labelMap = ResponseHandleUtil.parseMap(labelService.getLabelName(labelIds), Long.class, String.class);
}
if (!MapUtils.isEmpty(labelMap)) {
Long proLabelId = bookDto.getProLabelId();
Long purLabelId = bookDto.getPurLabelId();
Long depLabelId = bookDto.getDepLabelId();
if (proLabelId != null) {
bookDto.setProLabelName(labelMap.get(proLabelId));
}
if (purLabelId != null) {
bookDto.setPurLabelName(labelMap.get(purLabelId));
}
if (depLabelId != null) {
bookDto.setDepLabelName(labelMap.get(depLabelId));
}
}
}
}
......@@ -61,6 +61,9 @@
<result column="SUB_LABEL_ID" property="subLabelId" jdbcType="BIGINT" />
<result column="VER_LABEL_ID" property="verLabelId" jdbcType="BIGINT" />
<result column="AREA_LABEL_ID" property="areaLabelId" jdbcType="BIGINT" />
<result column="pro_label_id" property="proLabelId" jdbcType="BIGINT"/>
<result column="dep_label_id" property="depLabelId" jdbcType="BIGINT"/>
<result column="pur_label_id" property="purLabelId" jdbcType="BIGINT"/>
</resultMap>
<resultMap id="bookListPageMap" type="bookDto" extends ="bookMap">
......@@ -290,7 +293,8 @@
B.BOOK_ID, B.TYPE_CODE,B.ISBN, B.BOOK_NAME,T.TYPE_NAME, B.REMARK, B.AUTHOR, B.PUBLISH,
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.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
FROM
BOOK_ADVISER BA
INNER JOIN
......@@ -558,7 +562,7 @@
A.BOOK_ID, A.CHANNEL_ID, A.ADVISER_ID, A.IS_MAIN_EDITOR, B.ISBN, B.BOOK_NAME, B.TYPE_CODE,
B.AUTHOR, B.PUBLISH, B.PUBLISH_DATE, B.COVER_IMG, B.ORIGIN_NAME, B.BOOK_PRICE, B.ISSN, B.BOOK_NUM, B.SERIAL_NUMBER,
A.TEMPLET_ID,A.SECOND_TEMPLET_ID, A.LAST_MODIFIED_DATE, A.BOOK_ADVISER_ID, CONCAT('BK',A.BOOK_ID) uniqueNumber,
A.GRA_LABEL_ID,A.SUB_LABEL_ID,A.VER_LABEL_ID,A.AREA_LABEL_ID
A.GRA_LABEL_ID,A.SUB_LABEL_ID,A.VER_LABEL_ID,A.AREA_LABEL_ID,A.pro_label_id, A.dep_label_id,A.pur_label_id
FROM
BOOK_ADVISER A
INNER JOIN BOOK B ON A.BOOK_ID = B.BOOK_ID AND B.IS_DELETE = 0
......@@ -581,7 +585,7 @@
B.AUTHOR, B.PUBLISH, B.PUBLISH_DATE, B.COVER_IMG, B.ORIGIN_NAME, B.BOOK_PRICE, B.ISSN, B.BOOK_NUM, B.SERIAL_NUMBER,
IF(ISNULL(BF.BOOK_FUND_ID),0,1) IS_FUND_SUPPORT, A.TEMPLET_ID, A.BOOK_ADVISER_ID, CONCAT('BK',A.BOOK_ID) uniqueNumber,
G.update_time LAST_MODIFIED_DATE, G.create_time CREATED_DATE, G.id BOOK_GROUP_ID, G.group_qrcode_url groupQrcodeUrl,
G.group_qrcode_name groupQrcodeName, G.dep_label_id depLabelId, G.join_group_type, G.book_group_cipher, G.short_book_name
G.group_qrcode_name groupQrcodeName, G.dep_label_id bookGroupDepLabelId, G.join_group_type, G.book_group_cipher, G.short_book_name
, if(IFNULL(case G.join_group_type
WHEN 1 then bk.id
WHEN 2 THEN bgs.id
......
......@@ -39,13 +39,14 @@
<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
GRA_LABEL_ID,SUB_LABEL_ID,VER_LABEL_ID,AREA_LABEL_ID,pro_label_id, dep_label_id,pur_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}
#{verLabelId, jdbcType=BIGINT},#{areaLabelId, jdbcType=BIGINT},#{proLabelId,jdbcType=BIGINT},
#{depLabelId,jdbcType=BIGINT},#{purLabelId,jdbcType=BIGINT}
)
ON
DUPLICATE KEY UPDATE IS_DELETE = 0, IS_MAIN_EDITOR = #{isMainEditor, jdbcType=BIT}
......@@ -399,6 +400,15 @@
<if test="areaLabelId!=null">
,AREA_LABEL_ID = #{areaLabelId, jdbcType=BIGINT}
</if>
<if test="proLabelId!=null">
,pro_label_id = #{proLabelId, jdbcType=BIGINT}
</if>
<if test="depLabelId!=null">
,dep_label_id = #{depLabelId, jdbcType=BIGINT}
</if>
<if test="purLabelId!=null">
,pur_label_id = #{purLabelId, jdbcType=BIGINT}
</if>
, LAST_MODIFIED_DATE = NOW()
WHERE
BOOK_ID = #{bookId, jdbcType=BIGINT}
......@@ -467,6 +477,15 @@
<if test="areaLabelId!=null">
,AREA_LABEL_ID = #{areaLabelId, jdbcType=BIGINT}
</if>
<if test="proLabelId!=null">
,pro_label_id = #{proLabelId, jdbcType=BIGINT}
</if>
<if test="depLabelId!=null">
,dep_label_id = #{depLabelId, jdbcType=BIGINT}
</if>
<if test="purLabelId!=null">
,pur_label_id = #{purLabelId, jdbcType=BIGINT}
</if>
,LAST_MODIFIED_DATE = NOW()
WHERE
BOOK_ID = #{bookId, jdbcType=BIGINT}
......
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