Commit ff27c0cf by 田超

Merge branch 'fixbug/1029635' into 'master'

bug: [1029635] rays书刊信息同步没有同步封面

See merge request rays/pcloud-book!1324
parents f7c6dede 57dec6fd
...@@ -111,6 +111,7 @@ import com.pcloud.common.utils.cache.redis.JedisClusterUtils; ...@@ -111,6 +111,7 @@ import com.pcloud.common.utils.cache.redis.JedisClusterUtils;
import com.pcloud.common.utils.string.StringUtil; import com.pcloud.common.utils.string.StringUtil;
import com.pcloud.commoncenter.export.service.ExportService; import com.pcloud.commoncenter.export.service.ExportService;
import com.pcloud.labelcenter.label.service.LabelService; import com.pcloud.labelcenter.label.service.LabelService;
import com.pcloud.message.common.enums.YesNoEnums;
import com.pcloud.resourcecenter.product.dto.ProductDto; import com.pcloud.resourcecenter.product.dto.ProductDto;
import com.pcloud.resourcecenter.product.dto.SpecificationDto; import com.pcloud.resourcecenter.product.dto.SpecificationDto;
import com.pcloud.usercenter.party.adviser.dto.AdviserBaseInfoDto; import com.pcloud.usercenter.party.adviser.dto.AdviserBaseInfoDto;
...@@ -493,7 +494,7 @@ public class BookBizImpl implements BookBiz { ...@@ -493,7 +494,7 @@ public class BookBizImpl implements BookBiz {
if (StringUtil.isEmpty(book.getSerialNumber())) { if (StringUtil.isEmpty(book.getSerialNumber())) {
book.setSerialNumber(null); book.setSerialNumber(null);
} }
if (StringUtil.isEmpty(book.getCoverImg())) { if (StringUtil.isEmpty(book.getCoverImg()) && YesNoEnums.YES.code != book.getForceUpdateSerialNumber()) {
throw new BookBizException(BookBizException.PARAM_IS_NULL, "图书封面图不能为空"); throw new BookBizException(BookBizException.PARAM_IS_NULL, "图书封面图不能为空");
} }
if (BookConstant.DEFAULT_BOOK_ISBN.equals(book.getIsbn()) && StringUtils.isEmpty(book.getSerialNumber())) { if (BookConstant.DEFAULT_BOOK_ISBN.equals(book.getIsbn()) && StringUtils.isEmpty(book.getSerialNumber())) {
...@@ -4283,6 +4284,6 @@ public class BookBizImpl implements BookBiz { ...@@ -4283,6 +4284,6 @@ public class BookBizImpl implements BookBiz {
} }
Book book = BeanUtil.copyProperties(vo, Book.class); Book book = BeanUtil.copyProperties(vo, Book.class);
book.setForceUpdateSerialNumber(YesOrNoEnums.YES.getValue()); book.setForceUpdateSerialNumber(YesOrNoEnums.YES.getValue());
bookDao.updateByAdviser(book); this.updateBookAndBookType(book);
} }
} }
...@@ -27,5 +27,7 @@ public class SyncRelateDataToRaysVO { ...@@ -27,5 +27,7 @@ public class SyncRelateDataToRaysVO {
private String publish; private String publish;
private String coverImg;
private BigDecimal bookPrice; private BigDecimal bookPrice;
} }
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