Commit 47ee3261 by 吴博

feat: [1004158] 229新分类

parent 68ef24dd
......@@ -140,6 +140,31 @@ public class BookAppealDto extends BaseEntity{
private Long secondTempletId;
/**
* 三级分类id
*/
private Long thirdTempletId;
/**
* 三级分类名称
*/
private String thirdTempletName;
public Long getThirdTempletId() {
return thirdTempletId;
}
public void setThirdTempletId(Long thirdTempletId) {
this.thirdTempletId = thirdTempletId;
}
public String getThirdTempletName() {
return thirdTempletName;
}
public void setThirdTempletName(String thirdTempletName) {
this.thirdTempletName = thirdTempletName;
}
public Long getSecondTempletId() {
return secondTempletId;
}
......
......@@ -26,6 +26,11 @@ public class AppletNewsCategoryDTO extends BaseDto {
private Long secondClassify;
private String secondClassifyName;
@ApiModelProperty("第三级类型标识")
private Long thirdClassify;
private String thirdClassifyName;
@ApiModelProperty("年级标签id")
private Long gradeLabelId;
private String gradeLabelName;
......
......@@ -70,6 +70,9 @@ public class AppletNewsDTO extends BaseDto {
private Long firstClassify;
@ApiModelProperty("第二级类型标识")
private Long secondClassify;
@ApiModelProperty("第三级类型标识")
private Long thirdClassify;
@ApiModelProperty("年级标签id")
private Long gradeLabelId;
@ApiModelProperty("科目标签id")
......@@ -81,6 +84,8 @@ public class AppletNewsDTO extends BaseDto {
private String secondClassifyContent;
private String thirdClassifyContent;
private String gradeLabelIdContent;
private String subjectLabelIdContent;
......
......@@ -59,6 +59,12 @@ public class AppletNewsVO extends BaseDto {
private Long firstClassify;
@ApiModelProperty("第二级类型标识")
private Long secondClassify;
@ApiModelProperty("第三级类型标识")
private Long thirdClassify;
@ApiModelProperty("第三级类型标识名称")
private String thirdClassifyName;
@ApiModelProperty("年级标签id")
private Long gradeLabelId;
@ApiModelProperty("科目标签id")
......
......@@ -95,6 +95,10 @@ public class BookAdviserDto extends BaseDto {
*/
private Long secondTempletId;
/**
* 第三级分类
*/
private Long thirdTempletId;
/**
* 年级标签id
*/
private Long graLabelId;
......
......@@ -522,6 +522,17 @@ public class BookDto extends BaseDto {
*/
private String secondTempletName;
/**
* 第三级类型
*/
private Long thirdTempletId;
/**
* 第三类型名称
*/
private String thirdTempletName;
/**
* 第二级类型typeCode
*/
......@@ -786,6 +797,22 @@ public class BookDto extends BaseDto {
this.bookMinimumSupports = bookMinimumSupports;
}
public Long getThirdTempletId() {
return thirdTempletId;
}
public void setThirdTempletId(Long thirdTempletId) {
this.thirdTempletId = thirdTempletId;
}
public String getThirdTempletName() {
return thirdTempletName;
}
public void setThirdTempletName(String thirdTempletName) {
this.thirdTempletName = thirdTempletName;
}
public Long getRightsSettingId() {
return rightsSettingId;
}
......
......@@ -48,6 +48,9 @@ public class CreateBookVO {
@ApiModelProperty("第二级类型")
private Long secondTempletId;
@ApiModelProperty("第三级类型")
private Long thirdTempletId;
@ApiModelProperty("年级标签id")
private Long graLabelId;
......
......@@ -198,6 +198,11 @@ public class Book extends BaseEntity {
private Long secondTempletId;
/**
* 第三级类型
*/
private Long thirdTempletId;
/**
* 第二级类型typeCode
*/
private String secondTypeCode;
......@@ -261,6 +266,14 @@ public class Book extends BaseEntity {
*/
private String edition;
public Long getThirdTempletId() {
return thirdTempletId;
}
public void setThirdTempletId(Long thirdTempletId) {
this.thirdTempletId = thirdTempletId;
}
public String getEdition() {
return edition;
}
......
......@@ -71,6 +71,8 @@ public class BookAdviser extends BaseEntity {
*/
private Long secondTempletId;
private Long thirdTempletId;
/**
* 年级标签id
*/
......
......@@ -69,6 +69,11 @@ public class BookAdviserErp extends BaseEntity {
private Long secondTempletId;
/**
* 第三级类型
*/
private Long thirdTempletId;
/**
* 年级标签id
*/
private Long graLabelId;
......
......@@ -43,6 +43,8 @@ public class BookBrowseRecord extends BaseEntity {
private Long secondClassifyId;
private Long thirdClassifyId;
private Long bookClassifyId;
private String ip;
......
......@@ -40,7 +40,8 @@ public interface TimesBookService {
@RequestParam(value = "numPerPage") Integer numPerPage,
@RequestParam(value = "isFundSupport", required = false) Integer isFundSupport,
@RequestParam(value = "templetId", required = false) Long templetId,
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId);
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId,
@RequestParam(value = "thirdTempletId", required = false) Long thirdTempletId);
@GetMapping("exportBookIncomeDetail")
@ApiOperation(value = "书刊分析 导出书刊收益列表", httpMethod = "GET")
......@@ -50,7 +51,8 @@ public interface TimesBookService {
@RequestParam(value = "typeCode", required = false) String typeCode,
@RequestParam(value = "isFundSupport", required = false) Integer isFundSupport,
@RequestParam(value = "templetId", required = false) Long templetId,
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId);
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId,
@RequestParam(value = "thirdTempletId", required = false) Long thirdTempletId);
@ApiOperation("获取个人号累计加好友人数")
......
......@@ -183,7 +183,8 @@ public class BookAppealBizImpl implements BookAppealBiz {
List<BookAdviserDto> adviserBooks = bookAdviserDao.getAdvisers(bookAppealDto.getBookId());
//审核通过
if (AppealStateEnum.APPEAL_STATE_PASS.value.equals(bookAppeal.getAppealState())) {
setOnlyOneAdviser(bookAppealDto.getBookId(), bookAppealDto.getDeclarant(), bookAppealDto.getChannelId(), bookAppealDto.getTempletId(), bookAppealDto.getSecondTempletId(), adviserBooks);
setOnlyOneAdviser(bookAppealDto.getBookId(), bookAppealDto.getDeclarant(), bookAppealDto.getChannelId(), bookAppealDto.getTempletId(),
bookAppealDto.getSecondTempletId(), adviserBooks, bookAppealDto.getThirdTempletId());
}
// 设置被诉方
List<BookDefendant> defendants = bookSet.setDefendant(adviserBooks, bookAppeal.getBookAppealId());
......@@ -298,7 +299,8 @@ public class BookAppealBizImpl implements BookAppealBiz {
Long mainAdviserId = null;
Boolean isOnlyOneAdviser = bookMainAdviserDto.getBookAdviserList().size() == 1;
if (isOnlyOneAdviser) {//唯一拥有
setOnlyOneAdviser(bookId, appealAdviserId, bookAppealDto.getChannelId(), bookAppealDto.getTempletId(), bookAppealDto.getSecondTempletId(), adviserBooks);
setOnlyOneAdviser(bookId, appealAdviserId, bookAppealDto.getChannelId(), bookAppealDto.getTempletId(), bookAppealDto.getSecondTempletId(),
adviserBooks, bookAppealDto.getThirdTempletId());
mainAdviserId = bookMainAdviserDto.getBookAdviserList().get(0).getAdviserId();
} else {
for (BookAdviser bookAdviser : bookMainAdviserDto.getBookAdviserList()) {
......@@ -314,6 +316,7 @@ public class BookAppealBizImpl implements BookAppealBiz {
if (bookAdviser.getAdviserId().equals(appealAdviserId) && channelId.equals(bookAdviser.getChannelId())) {
bookAdviser.setTempletId(bookAppealDto.getTempletId());
bookAdviser.setSecondTempletId(bookAppealDto.getSecondTempletId());
bookAdviser.setThirdTempletId(bookAppealDto.getThirdTempletId());
}
}
// 批量修改图书编辑关联关系
......@@ -348,8 +351,9 @@ public class BookAppealBizImpl implements BookAppealBiz {
* @param declarant 申诉方
* @param channelId 运营标识
* @param templetId 模板标识
* @param thirdTempletId
*/
public void setOnlyOneAdviser(Long bookId, Long declarant, Long channelId, Long templetId, Long secondTempletId, List<BookAdviserDto> adviserBooks) {
public void setOnlyOneAdviser(Long bookId, Long declarant, Long channelId, Long templetId, Long secondTempletId, List<BookAdviserDto> adviserBooks, Long thirdTempletId) {
//删除其余编辑与图书关联关系
bookAdviserBiz.deleteByBook(bookId);
ThreadPoolUtils.OTHER_THREAD_POOL.execute(() -> {
......@@ -372,6 +376,7 @@ public class BookAppealBizImpl implements BookAppealBiz {
bookAdviser.setTempletId(templetId);
bookAdviser.setIsMainEditor(true);
bookAdviser.setSecondTempletId(secondTempletId);
bookAdviser.setThirdTempletId(thirdTempletId);
bookAdviserDao.insert(bookAdviser);
esBookAndAdviserBiz.updateBookAndAdviserToES(Collections.singletonList(bookId));
// 恢复申诉编辑图书与二维码关联关系
......
......@@ -76,7 +76,7 @@ public interface AppletBooklistBiz {
* @return
*/
PageBeanNew<AppletBooklistDTO> listBooklist(Integer currentPage, Integer numPerPage, String name, Long classifyId, Long agentId,
Long firstClassify,Long secondClassify,Long gradeLabelId, Long subjectLabelId, Long relateAgentId);
Long firstClassify,Long secondClassify,Long thirdClassify, Long gradeLabelId, Long subjectLabelId, Long relateAgentId);
/**
* 书单添加图书
......
......@@ -84,7 +84,7 @@ public interface AppletNewsBiz {
* @return
*/
PageBeanNew<AppletNewsDTO> listAppletNews(Integer currentPage, Integer numPerPage, String name,
Long firstClassify, Long secondClassify, Long gradeLabelId,
Long firstClassify, Long secondClassify, Long thirdClassify, Long gradeLabelId,
Long subjectLabelId, Long rightsClassifyId, String source, Integer showState, Long newsClassifyId,
Long customTagId, String cityCode,Long agentId);
......@@ -137,9 +137,10 @@ public interface AppletNewsBiz {
* @param gradeLabelId
* @param subjectLabelId
* @param rightsType
* @param thirdClassify
* @return
*/
List<AppletNewsDTO> getNewsByTempletLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, String rightsType, Long agentId);
List<AppletNewsDTO> getNewsByTempletLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, String rightsType, Long agentId, Long thirdClassify);
/**
* 批量修改分类
......@@ -212,9 +213,9 @@ public interface AppletNewsBiz {
* * @param null
*/
PageBeanNew<AppletNewsDTO> listAppletNews4Analysis(Integer currentPage, Integer numPerPage, String name,
Long firstClassify,Long secondClassify,Long gradeLabelId,
Long subjectLabelId,Integer linkOnly,Long rightsClassifyId,
String source,Integer browseQty,Integer clickQty, Long agentId);
Long firstClassify, Long secondClassify, Long gradeLabelId,
Long subjectLabelId, Integer linkOnly, Long rightsClassifyId,
String source, Integer browseQty, Integer clickQty, Long agentId, Long thirdClassify);
/**
*
......
......@@ -174,7 +174,7 @@ public class AppletBooklistBizImpl implements AppletBooklistBiz {
@Override
public PageBeanNew<AppletBooklistDTO> listBooklist(Integer currentPage, Integer numPerPage, String name, Long classifyId, Long agentId,
Long firstClassify,Long secondClassify,Long gradeLabelId, Long subjectLabelId,
Long firstClassify,Long secondClassify,Long thirdClassify, Long gradeLabelId, Long subjectLabelId,
Long relateAgentId) {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("name", name);
......@@ -185,11 +185,13 @@ public class AppletBooklistBizImpl implements AppletBooklistBiz {
BaseTempletClassify classify = new BaseTempletClassify();
classify.setFirstClassify(firstClassify);
classify.setSecondClassify(secondClassify);
classify.setThirdClassify(thirdClassify);
classify.setGradeLabelId(gradeLabelId);
classify.setSubjectLabelId(subjectLabelId);
rightsSettingBiz.setClassifyAndLabel(classify);
paramMap.put("firstClassify", classify.getFirstClassify());
paramMap.put("secondClassify", classify.getSecondClassify());
paramMap.put("thirdClassify", classify.getThirdClassify());
paramMap.put("gradeLabelId", classify.getGradeLabelId());
paramMap.put("subjectLabelId", classify.getSubjectLabelId());
}else {
......@@ -214,6 +216,9 @@ public class AppletBooklistBizImpl implements AppletBooklistBiz {
if (null != appletBooklistDTO.getSecondClassify()){
classifyIds.add(appletBooklistDTO.getSecondClassify());
}
if (null != appletBooklistDTO.getThirdClassify()){
classifyIds.add(appletBooklistDTO.getThirdClassify());
}
if (null != appletBooklistDTO.getGradeLabelId()) {
labelIds.add(appletBooklistDTO.getGradeLabelId());
}
......@@ -252,6 +257,9 @@ public class AppletBooklistBizImpl implements AppletBooklistBiz {
if (!MapUtils.isEmpty(classifyMap) && classifyMap.containsKey(booklistDTO.getSecondClassify())){
booklistDTO.setSecondClassifyContent(classifyMap.get(booklistDTO.getSecondClassify()).getTempletName());
}
if (!MapUtils.isEmpty(classifyMap) && classifyMap.containsKey(booklistDTO.getThirdClassify())){
booklistDTO.setThirdClassifyContent(classifyMap.get(booklistDTO.getThirdClassify()).getTempletName());
}
if (!MapUtils.isEmpty(labelMap) && labelMap.containsKey(booklistDTO.getGradeLabelId())){
booklistDTO.setGradeLabelIdContent(labelMap.get(booklistDTO.getGradeLabelId()).getName());
}
......@@ -304,11 +312,15 @@ public class AppletBooklistBizImpl implements AppletBooklistBiz {
if (Objects.nonNull(dto4Booklist.getSecondTempletId())) {
templetIds.add(dto4Booklist.getSecondTempletId());
}
if (Objects.nonNull(dto4Booklist.getThirdTempletId())) {
templetIds.add(dto4Booklist.getThirdTempletId());
}
});
Map<Long, AssistTempletDTO> assistTempletDTOMap = assistTempletConsr.mapByIds(templetIds);
for (BookDTO4Booklist dto4Booklist : list) {
Long secondTempletId = dto4Booklist.getSecondTempletId();
Long templetId = dto4Booklist.getTempletId();
Long thirdTempletId = dto4Booklist.getThirdTempletId();
if (secondTempletId!=null&&assistTempletDTOMap!=null) {
AssistTempletDTO templetDTO = assistTempletDTOMap.get(secondTempletId);
dto4Booklist.setSecondTempletName(Optional.ofNullable(templetDTO).map(AssistTempletDTO::getTempletName).orElse(null));
......@@ -317,6 +329,10 @@ public class AppletBooklistBizImpl implements AppletBooklistBiz {
AssistTempletDTO templetDTO = assistTempletDTOMap.get(templetId);
dto4Booklist.setTempletName(Optional.ofNullable(templetDTO).map(AssistTempletDTO::getTempletName).orElse(null));
}
if (thirdTempletId!=null && assistTempletDTOMap!=null) {
AssistTempletDTO templetDTO = assistTempletDTOMap.get(thirdTempletId);
dto4Booklist.setThirdTempletName(Optional.ofNullable(templetDTO).map(AssistTempletDTO::getTempletName).orElse(null));
}
Long adviserId=dto4Booklist.getAdviserId();
if (!MapUtils.isEmpty(infoDtoMap)){
AdviserBaseInfoDto infoDto = infoDtoMap.get(adviserId);
......@@ -690,10 +706,12 @@ public class AppletBooklistBizImpl implements AppletBooklistBiz {
BaseTempletClassify classify = new BaseTempletClassify();
classify.setFirstClassify(bookAdviserDto.getTempletId());
classify.setSecondClassify(bookAdviserDto.getSecondTempletId());
classify.setThirdClassify(bookAdviserDto.getThirdTempletId());
classify.setGradeLabelId(bookAdviserDto.getGraLabelId());
classify.setSubjectLabelId(bookAdviserDto.getSubLabelId());
rightsSettingBiz.setClassifyAndLabel(classify);
List<AppletBooklistDTO> list = appletBooklistDao.getByLabel(classify.getFirstClassify(), classify.getSecondClassify(), classify.getGradeLabelId(), classify.getSubjectLabelId(), 3, relateAgentId);
List<AppletBooklistDTO> list = appletBooklistDao.getByLabel(classify.getFirstClassify(), classify.getSecondClassify(), classify.getGradeLabelId(),
classify.getSubjectLabelId(), 3, relateAgentId, classify.getThirdClassify());
if (!ListUtils.isEmpty(list)){
//带3本书
for (AppletBooklistDTO booklistDTO : list) {
......@@ -755,6 +773,7 @@ public class AppletBooklistBizImpl implements AppletBooklistBiz {
appletBooklist.setUserName("小编推荐");
appletBooklist.setFirstClassify(templetIds.get(0));
appletBooklist.setSecondClassify(ListUtils.isEmpty(secondTempletIds)?null:secondTempletIds.get(0));
appletBooklist.setThirdClassify(null);
appletBooklist.setGradeLabelId(ListUtils.isEmpty(graLabelIds)?null:graLabelIds.get(0));
appletBooklist.setSubjectLabelId(ListUtils.isEmpty(subLabelIds)?null:subLabelIds.get(0));
appletBooklist.setDigest(esPage.getContent().size()+"本"+assistTempletDTO.getTempletName()+"书单推荐");
......
......@@ -241,6 +241,7 @@ public class AppletGroupSearchRecordBizImpl implements AppletGroupSearchRecordBi
BaseTempletClassify baseTempletClassify = new BaseTempletClassify();
baseTempletClassify.setFirstClassify(bookAdviser.getTempletId());
baseTempletClassify.setSecondClassify(bookAdviser.getSecondTempletId());
baseTempletClassify.setThirdClassify(bookAdviser.getThirdTempletId());
baseTempletClassify.setGradeLabelId(bookAdviser.getGraLabelId());
baseTempletClassify.setSubjectLabelId(bookAdviser.getSubLabelId());
// 部分分类需要忽略二级分类
......@@ -249,6 +250,7 @@ public class AppletGroupSearchRecordBizImpl implements AppletGroupSearchRecordBi
Map<String, Object> paraMap = Maps.newHashMap();
paraMap.put("firstClassify", baseTempletClassify.getFirstClassify());
paraMap.put("secondClassify", baseTempletClassify.getSecondClassify());
paraMap.put("thirdClassify", baseTempletClassify.getThirdClassify());
paraMap.put("gradeLabelId", baseTempletClassify.getGradeLabelId());
paraMap.put("subjectLabelId", baseTempletClassify.getSubjectLabelId());
paraMap.put("agentId", agentId);
......@@ -356,7 +358,8 @@ public class AppletGroupSearchRecordBizImpl implements AppletGroupSearchRecordBi
return new PageBeanNew<>(currentPage, numPerPage, 0, new ArrayList<>());
}
Long agentId = appletNewsBiz.getAgentIdByAccountId(officialAccountsId);
PageBeanNew<AppletGroupManageDTO> pageBeanNew = pcloudGroupActivityBiz.getGroupListByBookTemplet(wechatUserId, bookcaseDTO.getTempletId(), bookcaseDTO.getSecondTempletId(), bookcaseDTO.getGradeLabelId(), bookcaseDTO.getSubjectLabelId(), currentPage, numPerPage, agentId);
PageBeanNew<AppletGroupManageDTO> pageBeanNew = pcloudGroupActivityBiz.getGroupListByBookTemplet(wechatUserId, bookcaseDTO.getTempletId(), bookcaseDTO.getSecondTempletId(),
bookcaseDTO.getGradeLabelId(), bookcaseDTO.getSubjectLabelId(), currentPage, numPerPage, agentId, bookcaseDTO.getThirdTempletId());
return pageBeanNew;
}
......
......@@ -66,7 +66,6 @@ import com.pcloud.common.page.PageParam;
import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.cache.redis.JedisClusterUtils;
import com.pcloud.common.utils.string.StringUtil;
import com.pcloud.readercenter.common.enums.YesOrNoNumEnum;
import com.pcloud.readercenter.wechat.entity.WechatUser;
import org.apache.commons.collections.MapUtils;
import org.springframework.beans.BeanUtils;
......@@ -337,7 +336,7 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
@Override
public PageBeanNew<AppletNewsDTO> listAppletNews(Integer currentPage, Integer numPerPage, String name,
Long firstClassify, Long secondClassify, Long gradeLabelId,
Long firstClassify, Long secondClassify, Long thirdClassify, Long gradeLabelId,
Long subjectLabelId, Long rightsClassifyId, String source, Integer showState, Long newsClassifyId,
Long customTagId, String cityCode,Long agentId) {
Map<String, Object> paramMap = new HashMap<>();
......@@ -356,11 +355,13 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
BaseTempletClassify classify = new BaseTempletClassify();
classify.setFirstClassify(firstClassify);
classify.setSecondClassify(secondClassify);
classify.setThirdClassify(thirdClassify);
classify.setGradeLabelId(gradeLabelId);
classify.setSubjectLabelId(subjectLabelId);
rightsSettingBiz.setClassifyAndLabel(classify);
paramMap.put("firstClassify", classify.getFirstClassify());
paramMap.put("secondClassify", classify.getSecondClassify());
paramMap.put("thirdClassify", classify.getThirdClassify());
paramMap.put("gradeLabelId", classify.getGradeLabelId());
paramMap.put("subjectLabelId", classify.getSubjectLabelId());
} else {
......@@ -456,6 +457,7 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
}
List<Long> firstClassifyIds = new ArrayList<>(appletNewsDTOS.size());
List<Long> secondClassifyIds = new ArrayList<>(appletNewsDTOS.size());
List<Long> thirdClassifyIds = new ArrayList<>(appletNewsDTOS.size());
List<Long> classifyIds = new ArrayList<>();
List<Long> gradeLabelIds = new ArrayList<>(appletNewsDTOS.size());
List<Long> subjectLabelIds = new ArrayList<>(appletNewsDTOS.size());
......@@ -463,6 +465,7 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
for (AppletNewsDTO appletNewsDTO : appletNewsDTOS){
firstClassifyIds.add(appletNewsDTO.getFirstClassify());
secondClassifyIds.add(appletNewsDTO.getSecondClassify());
thirdClassifyIds.add(appletNewsDTO.getThirdClassify());
gradeLabelIds.add(appletNewsDTO.getGradeLabelId());
subjectLabelIds.add(appletNewsDTO.getSubjectLabelId());
}
......@@ -472,6 +475,9 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
if (!ListUtils.isEmpty(secondClassifyIds)){
classifyIds.addAll(secondClassifyIds);
}
if (!ListUtils.isEmpty(thirdClassifyIds)){
classifyIds.addAll(thirdClassifyIds);
}
if (!ListUtils.isEmpty(gradeLabelIds)){
labelIds.addAll(gradeLabelIds);
}
......@@ -493,6 +499,9 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
if (!MapUtils.isEmpty(classifyMap) && classifyMap.containsKey(appletNewsDTO.getSecondClassify())){
appletNewsDTO.setSecondClassifyContent(classifyMap.get(appletNewsDTO.getSecondClassify()).getTempletName());
}
if (!MapUtils.isEmpty(classifyMap) && classifyMap.containsKey(appletNewsDTO.getThirdClassify())){
appletNewsDTO.setThirdClassifyContent(classifyMap.get(appletNewsDTO.getThirdClassify()).getTempletName());
}
if (!MapUtils.isEmpty(labelMap) && labelMap.containsKey(appletNewsDTO.getGradeLabelId())){
appletNewsDTO.setGradeLabelIdContent(labelMap.get(appletNewsDTO.getGradeLabelId()).getName());
}
......@@ -709,6 +718,9 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
if (classifyMap.containsKey(categoryDTO.getSecondClassify())) {
categoryDTO.setSecondClassifyName(classifyMap.get(categoryDTO.getSecondClassify()).getTempletName());
}
if (classifyMap.containsKey(categoryDTO.getThirdClassify())) {
categoryDTO.setThirdClassifyName(classifyMap.get(categoryDTO.getThirdClassify()).getTempletName());
}
}
}
}
......@@ -802,15 +814,16 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
}
@Override
public List<AppletNewsDTO> getNewsByTempletLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, String rightsType, Long agentId) {
public List<AppletNewsDTO> getNewsByTempletLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, String rightsType, Long agentId, Long thirdClassify) {
BaseTempletClassify classify = new BaseTempletClassify();
classify.setFirstClassify(firstClassify);
classify.setSecondClassify(secondClassify);
classify.setThirdClassify(thirdClassify);
classify.setGradeLabelId(gradeLabelId);
classify.setSubjectLabelId(subjectLabelId);
rightsSettingBiz.setClassifyAndLabel(classify);
List<AppletNewsDTO> list = new ArrayList<>();
list=appletNewsDao.getByNewsByTempletLabel(classify.getFirstClassify(),classify.getSecondClassify(),classify.getGradeLabelId(),classify.getSubjectLabelId(),rightsType, agentId);
list=appletNewsDao.getByNewsByTempletLabel(classify.getFirstClassify(),classify.getSecondClassify(),classify.getGradeLabelId(),classify.getSubjectLabelId(),rightsType, agentId, classify.getThirdClassify());
return list;
}
......@@ -947,8 +960,8 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
}
@Override
public PageBeanNew<AppletNewsDTO> listAppletNews4Analysis(Integer currentPage, Integer numPerPage, String name, Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Integer linkOnly,Long rightsClassifyId,
String source,Integer browseQty,Integer clickQty,Long agentId) {
public PageBeanNew<AppletNewsDTO> listAppletNews4Analysis(Integer currentPage, Integer numPerPage, String name, Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Integer linkOnly, Long rightsClassifyId,
String source, Integer browseQty, Integer clickQty, Long agentId, Long thirdClassify) {
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("name", name);
paramMap.put("linkOnly", linkOnly);
......@@ -959,11 +972,13 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
BaseTempletClassify classify = new BaseTempletClassify();
classify.setFirstClassify(firstClassify);
classify.setSecondClassify(secondClassify);
classify.setThirdClassify(thirdClassify);
classify.setGradeLabelId(gradeLabelId);
classify.setSubjectLabelId(subjectLabelId);
rightsSettingBiz.setClassifyAndLabel(classify);
paramMap.put("firstClassify", classify.getFirstClassify());
paramMap.put("secondClassify", classify.getSecondClassify());
paramMap.put("thirdClassify", classify.getThirdClassify());
paramMap.put("gradeLabelId", classify.getGradeLabelId());
paramMap.put("subjectLabelId", classify.getSubjectLabelId());
}else {
......
......@@ -359,6 +359,9 @@ public class AppletUserBookcaseBizImpl implements AppletUserBookcaseBiz {
if (Objects.nonNull(dto.getSecondTempletId())) {
templetIds.add(dto.getSecondTempletId());
}
if (Objects.nonNull(dto.getThirdTempletId())) {
templetIds.add(dto.getThirdTempletId());
}
});
List<Long> classifyTempletIds = recordList.stream().filter(s -> s.getJoinGroupType() != null && JoinGroupTypeEnum.XIAORUI.getCode().equals(s.getJoinGroupType())).map(s -> s.getTempletId()).distinct().collect(Collectors.toList());
Map<Integer, Integer> classifyMap = new HashMap<>();
......@@ -372,6 +375,7 @@ public class AppletUserBookcaseBizImpl implements AppletUserBookcaseBiz {
for (AppletUserBookcaseDTO bookcaseDTO : recordList) {
Long secondTempletId = bookcaseDTO.getSecondTempletId();
Long templetId = bookcaseDTO.getTempletId();
Long thirdTempletId = bookcaseDTO.getThirdTempletId();
if (secondTempletId != null && assistTempletDTOMap != null) {
AssistTempletDTO templetDTO = assistTempletDTOMap.get(secondTempletId);
bookcaseDTO.setSecondTempletName(Optional.ofNullable(templetDTO).map(AssistTempletDTO::getTempletName).orElse(null));
......@@ -380,6 +384,10 @@ public class AppletUserBookcaseBizImpl implements AppletUserBookcaseBiz {
AssistTempletDTO templetDTO = assistTempletDTOMap.get(templetId);
bookcaseDTO.setTempletName(Optional.ofNullable(templetDTO).map(AssistTempletDTO::getTempletName).orElse(null));
}
if (thirdTempletId != null && assistTempletDTOMap != null) {
AssistTempletDTO templetDTO = assistTempletDTOMap.get(thirdTempletId);
bookcaseDTO.setThirdTempletName(Optional.ofNullable(templetDTO).map(AssistTempletDTO::getTempletName).orElse(null));
}
if (!MapUtils.isEmpty(classifyMap) && null != bookcaseDTO.getTempletId() && classifyMap.containsKey(bookcaseDTO.getTempletId().intValue())) {
bookcaseDTO.setClassifyId(classifyMap.get(bookcaseDTO.getTempletId().intValue()));
}
......
......@@ -74,7 +74,7 @@ public interface AppletBooklistDao extends BaseDao<AppletBooklist> {
* @date:2020/8/10 10:37
* * @param null
*/
List<AppletBooklistDTO> getByLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Integer limit, Long relateAgentId);
List<AppletBooklistDTO> getByLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Integer limit, Long relateAgentId, Long thirdClassify);
......
......@@ -8,7 +8,6 @@ import com.pcloud.book.applet.vo.AppletNewsClassifyVO;
import com.pcloud.book.applet.vo.AppletNewsShowStateVO;
import com.pcloud.common.core.dao.BaseDao;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
......@@ -46,12 +45,13 @@ public interface AppletNewsDao extends BaseDao<AppletNews> {
* @param gradeLabelId
* @param subjectLabelId
* @param rightsType
* @param thirdClassify
* @return
*/
List<AppletNewsDTO> getByNewsByTempletLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, String rightsType, Long agentId);
List<AppletNewsDTO> getByNewsByTempletLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, String rightsType, Long agentId, Long thirdClassify);
List<AppletNews> getByTempletAndClassify(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Long rightsClassifyId, Integer top,
Long agentId);
Long agentId, Long thirdClassify);
/**
*新增资讯来源
......
......@@ -73,10 +73,11 @@ public class AppletBooklistDaoImpl extends BaseDaoImpl<AppletBooklist> implement
@Override
public List<AppletBooklistDTO> getByLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Integer limit,
Long relateAgentId) {
Long relateAgentId, Long thirdClassify) {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("firstClassify", firstClassify);
paramMap.put("secondClassify", secondClassify);
paramMap.put("thirdClassify", thirdClassify);
paramMap.put("gradeLabelId", gradeLabelId);
paramMap.put("subjectLabelId", subjectLabelId);
paramMap.put("limit", limit);
......
......@@ -10,7 +10,6 @@ import com.pcloud.book.applet.vo.AppletNewsShowStateVO;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -41,10 +40,11 @@ public class AppletNewsDaoImpl extends BaseDaoImpl<AppletNews> implements Applet
}
@Override
public List<AppletNewsDTO> getByNewsByTempletLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, String rightsType, Long agentId) {
public List<AppletNewsDTO> getByNewsByTempletLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, String rightsType, Long agentId, Long thirdClassify) {
Map<String,Object> map = new HashMap<>();
map.put("firstClassify", firstClassify);
map.put("secondClassify", secondClassify);
map.put("thirdClassify", thirdClassify);
map.put("gradeLabelId",gradeLabelId);
map.put("subjectLabelId", subjectLabelId);
map.put("rightsType",rightsType);
......@@ -58,10 +58,11 @@ public class AppletNewsDaoImpl extends BaseDaoImpl<AppletNews> implements Applet
@Override
public List<AppletNews> getByTempletAndClassify(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Long rightsClassifyId, Integer top,
Long agentId) {
Long agentId, Long thirdClassify) {
Map<String,Object> map = new HashMap<>();
map.put("firstClassify", firstClassify);
map.put("secondClassify", secondClassify);
map.put("thirdClassify", thirdClassify);
map.put("gradeLabelId",gradeLabelId);
map.put("subjectLabelId", subjectLabelId);
map.put("rightsClassifyId",rightsClassifyId);
......@@ -124,6 +125,7 @@ public class AppletNewsDaoImpl extends BaseDaoImpl<AppletNews> implements Applet
map.put("ids", appletNewsClassifyVO.getAppletNewsIds());
map.put("firstClassify", appletNewsClassifyVO.getFirstClassify());
map.put("secondClassify", appletNewsClassifyVO.getSecondClassify());
map.put("thirdClassify", appletNewsClassifyVO.getThirdClassify());
map.put("gradeLabelId", appletNewsClassifyVO.getGradeLabelId());
map.put("subjectLabelId", appletNewsClassifyVO.getSubjectLabelId());
map.put("rightsClassifyId", appletNewsClassifyVO.getRightsClassifyId());
......
......@@ -59,6 +59,10 @@ public class AppletBooklistDTO extends BaseDto {
private String firstClassifyContent;
@ApiModelProperty("第二级类型")
private String secondClassifyContent;
@ApiModelProperty("第三级类型标识")
private Long thirdClassify;
@ApiModelProperty("第三级类型标识名称")
private String thirdClassifyContent;
@ApiModelProperty("年级标签")
private String gradeLabelIdContent;
@ApiModelProperty("科目标签")
......
......@@ -52,6 +52,12 @@ public class AppletUserBookcaseDTO extends BaseDto {
@ApiModelProperty("二级分类id")
private Long secondTempletId;
@ApiModelProperty("三级分类id")
private Long thirdTempletId;
@ApiModelProperty("三级分类名称")
private String thirdTempletName;
@ApiModelProperty("二级分类名")
private String secondTempletName;
@ApiModelProperty("社群码类型")
......
......@@ -46,6 +46,14 @@ public class BookDTO4Booklist extends BaseDto {
private Long secondTempletId;
@ApiModelProperty("二级分类名")
private String secondTempletName;
/**
* 三级分类id
*/
private Long thirdTempletId;
/**
* 三级分类名称
*/
private String thirdTempletName;
@ApiModelProperty("排序值")
private Integer seq;
@ApiModelProperty("isbn")
......
......@@ -238,6 +238,7 @@ public class AppletHomeFacade {
@RequestParam(value = "classifyId", required = false) @ApiParam("书单栏目id") Long classifyId,
@RequestParam(value = "firstClassify", required = false) @ApiParam("一级书刊分类") Long firstClassify,
@RequestParam(value = "secondClassify", required = false) @ApiParam("二级书刊分类")Long secondClassify,
@RequestParam(value = "thirdClassify", required = false) Long thirdClassify,
@RequestParam(value = "gradeLabelId", required = false) @ApiParam("年级标签")Long gradeLabelId,
@RequestParam(value = "subjectLabelId", required = false) @ApiParam("科目标签")Long subjectLabelId,
@RequestParam(value = "relateAgentId", required = false) @ApiParam("书单所属出版")Long relateAgentId
......@@ -247,7 +248,7 @@ public class AppletHomeFacade {
if (null==currentPage || null == numPerPage){
throw new BookBizException(BookBizException.PARAM_IS_NULL,"缺少分页参数");
}
return new ResponseDto<>(appletBooklistBiz.listBooklist(currentPage, numPerPage, name, classifyId, agentId, firstClassify,secondClassify,
return new ResponseDto<>(appletBooklistBiz.listBooklist(currentPage, numPerPage, name, classifyId, agentId, firstClassify,secondClassify,thirdClassify,
gradeLabelId,subjectLabelId, relateAgentId));
}
......@@ -533,6 +534,7 @@ public class AppletHomeFacade {
@RequestParam(value = "name", required = false) @ApiParam("名称查询") String name,
@RequestParam(value = "firstClassify", required = false) @ApiParam("一级书刊分类") Long firstClassify,
@RequestParam(value = "secondClassify", required = false) @ApiParam("二级书刊分类")Long secondClassify,
@RequestParam(value = "thirdClassify", required = false) @ApiParam("二级书刊分类")Long thirdClassify,
@RequestParam(value = "gradeLabelId", required = false) @ApiParam("年级标签")Long gradeLabelId,
@RequestParam(value = "subjectLabelId", required = false) @ApiParam("科目标签")Long subjectLabelId,
@RequestParam(value = "rightsClassifyId", required = false) @ApiParam("权益分类") Long rightsClassifyId,
......@@ -547,7 +549,7 @@ public class AppletHomeFacade {
if (null==currentPage || null == numPerPage){
throw new BookBizException(BookBizException.PARAM_IS_NULL,"缺少分页参数");
}
return new ResponseDto<>(appletNewsBiz.listAppletNews(currentPage, numPerPage, name, firstClassify,secondClassify,gradeLabelId,
return new ResponseDto<>(appletNewsBiz.listAppletNews(currentPage, numPerPage, name, firstClassify,secondClassify, thirdClassify, gradeLabelId,
subjectLabelId,rightsClassifyId,source,showState,newsClassifyId,customTagId, cityCode,agentId));
}
......@@ -811,6 +813,7 @@ public class AppletHomeFacade {
@RequestParam(value = "name", required = false) @ApiParam("名称/外链编号查询") String name,
@RequestParam(value = "firstClassify", required = false) @ApiParam("一级书刊分类") Long firstClassify,
@RequestParam(value = "secondClassify", required = false) @ApiParam("二级书刊分类") Long secondClassify,
@RequestParam(value = "thirdClassify", required = false) Long thirdClassify,
@RequestParam(value = "gradeLabelId", required = false) @ApiParam("年级标签") Long gradeLabelId,
@RequestParam(value = "subjectLabelId", required = false) @ApiParam("科目标签") Long subjectLabelId,
@RequestParam(value = "linkOnly", required = false) @ApiParam("只看第三方") Integer linkOnly,
......@@ -825,7 +828,7 @@ public class AppletHomeFacade {
throw new BookBizException(BookBizException.PARAM_IS_NULL, "缺少分页参数");
}
return new ResponseDto<>(appletNewsBiz.listAppletNews4Analysis(currentPage, numPerPage, name, firstClassify, secondClassify, gradeLabelId,
subjectLabelId, linkOnly,rightsClassifyId,source,browseQty,clickQty, agentId));
subjectLabelId, linkOnly,rightsClassifyId,source,browseQty,clickQty, agentId, thirdClassify));
}
......
......@@ -195,7 +195,8 @@ public interface BookAdviserBiz {
* @param templetId 模板标识
* @param secondTempletId 模板第二阶级标识
*/
public void recoverBook4Adviser(Long bookId, Long adviserId, Long channelId, Long templetId,Long secondTempletId, Long graLabelId, Long subLabelId, Long verLabelId, Long areaLabelId, Boolean recoverScene);
public void recoverBook4Adviser(Long bookId, Long adviserId, Long channelId, Long templetId,Long secondTempletId, Long graLabelId, Long subLabelId,
Long verLabelId, Long areaLabelId, Boolean recoverScene, Long thirdTempletId);
/**
* 获取编辑的图书总数
......
......@@ -649,12 +649,12 @@ public interface BookBiz {
/**
* 平台端获取编辑书刊
*/
PageBeanNew<BookDto> getAdviserBooks4Pcloud(String keyword, Long agentId, Long templetId, Long secondTempletId, String typeCode, Integer currentPage, Integer numPerPage);
PageBeanNew<BookDto> getAdviserBooks4Pcloud(String keyword, Long agentId, Long templetId, Long secondTempletId, Long thirdTempletId, String typeCode, Integer currentPage, Integer numPerPage);
/**
* 获取编辑书刊H5
*/
PageBeanNew<BookDto> getAdviserBooks4H5(String grayStatus, String keyword, Long templetId, Long secondTempletId, Integer currentPage,
PageBeanNew<BookDto> getAdviserBooks4H5(String grayStatus, String keyword, Long templetId, Long secondTempletId, Long thirdTempletId, Integer currentPage,
Integer numPerPage);
/**
......@@ -683,7 +683,7 @@ public interface BookBiz {
void updateIsOpenRobotProcess4Now(Long adviserId, UpdateBookRobotProcessDto robotProcessDto);
PageBeanNew<BookDto> getAdviserBooks4Rights(String keyword, Long agentId, Long templetId, Long secondTempletId, String typeCode, Integer currentPage, Integer numPerPage, Integer isIgnore);
PageBeanNew<BookDto> getAdviserBooks4Rights(String keyword, Long agentId, Long templetId, Long secondTempletId, String typeCode, Integer currentPage, Integer numPerPage, Integer isIgnore, Long thirdTempletId);
void createBookGroupAppletUrl(Long bookId, Long channelId, Long adviserId,List<Long> sceneIds);
/**
......
......@@ -9,7 +9,6 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.pcloud.analysisengine.browse.dto.BookBrowseAndScanStatsDTO;
import com.pcloud.analysisengine.browse.dto.BrowseCacheRecordDto;
import com.pcloud.appcenter.app.dto.AppCountDto;
import com.pcloud.book.base.dto.CountDto;
import com.pcloud.book.base.exception.BookBizException;
import com.pcloud.book.book.biz.BookAdviserBiz;
......@@ -241,7 +240,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
recoverBook4Adviser(bookAdviser.getBookId(), bookAdviser.getAdviserId(), bookAdviser.getChannelId(),
bookAdviser.getTempletId(), bookAdviser.getSecondTempletId(),
bookAdviser.getGraLabelId(), bookAdviser.getSubLabelId(), bookAdviser.getVerLabelId(), bookAdviser.getAreaLabelId(),
false);
false,bookAdviser.getThirdTempletId());
bookAdviser.setBookAdviserId(bookAdviserDto.getBookAdviserId());
} else {
// 判断是否配置过该书籍推广信息
......@@ -679,6 +678,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
bookAdviser.setAdviserId(book.getLastModifiedUser());
bookAdviser.setChannelId(book.getChannelId());
bookAdviser.setSecondTempletId(book.getSecondTempletId());
bookAdviser.setThirdTempletId(book.getThirdTempletId());
bookAdviser.setGraLabelId(book.getGraLabelId());
bookAdviser.setSubLabelId(book.getSubLabelId());
bookAdviser.setAreaLabelId(book.getAreaLabelId());
......@@ -809,7 +809,8 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
// 删除图书关联二维码
qrcodeSceneConsr.deleteByBook(bookId, channelId, null);
// 删除书籍编辑的状态
updateBookAdviserStatus(bookId, null, channelId, null,null, null, null, null, null, BookConstant.BOOK_ADVISER_DELETE, null);
updateBookAdviserStatus(bookId, null, channelId, null,null, null, null,
null, null, BookConstant.BOOK_ADVISER_DELETE, null, null);
// 删除读者端的书架的书籍
bookcaseConsr.deleteBookForAdviser(bookId, channelId, adviserId);
}
......@@ -831,7 +832,8 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
// 删除图书关联二维码
qrcodeSceneConsr.deleteByBook(bookId, channelId, adviserId);
// 删除书籍编辑的状态
updateBookAdviserStatus(bookId, adviserId, channelId, null,null, null, null, null, null, BookConstant.BOOK_ADVISER_DELETE, null);
updateBookAdviserStatus(bookId, adviserId, channelId, null,null, null, null, null,
null, BookConstant.BOOK_ADVISER_DELETE, null, null);
// 删除读者端的书架的书籍
bookcaseConsr.deleteBookForAdviser(bookId, channelId, adviserId);
}
......@@ -843,11 +845,11 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
@Transactional(rollbackFor = Exception.class)
public void recoverBook4Adviser(Long bookId, Long adviserId, Long channelId, Long templetId,Long secondTempletId,
Long graLabelId, Long subLabelId, Long verLabelId, Long areaLabelId,
Boolean recoverScene) {
Boolean recoverScene, Long thirdTempletId) {
LOGGER.info("恢复书籍-编辑 <START>.[bookId]=" + bookId + ",adviserId=" + adviserId + ",channelId=" + channelId + " templetId= " + templetId + "secondTempletId=" + secondTempletId);
checkIsHaveOtherAdviser(bookId, channelId, adviserId);
// 恢复书籍编辑的状态
updateBookAdviserStatus(bookId, adviserId, channelId, templetId, secondTempletId, graLabelId, subLabelId, verLabelId, areaLabelId, BookConstant.BOOK_ADVISER_NO_DELETE,BookConstant.MAIN_ADVISER);
updateBookAdviserStatus(bookId, adviserId, channelId, templetId, secondTempletId, graLabelId, subLabelId, verLabelId, areaLabelId, BookConstant.BOOK_ADVISER_NO_DELETE,BookConstant.MAIN_ADVISER, thirdTempletId);
// 恢复图书关联的二维码 20190723-刘娜【ID1001264】社群书删除后,再创建时不要自动恢复
if (recoverScene) {
bookGroupBiz.recoverByBookId(bookId, channelId, adviserId);
......@@ -861,13 +863,14 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
* @param bookId 圖書標識
* @param adviserId 编辑标识
* @param channelId 运营标识
* @param secondTempletId 第二级标题id
* @param deleteStatus 删除状态
* @param isMainAdviser
* @param secondTempletId 第二级标题id
* @param thirdTempletId
*/
private void updateBookAdviserStatus(Long bookId, Long adviserId, Long channelId, Long templetId,Long secondTempletId,
private void updateBookAdviserStatus(Long bookId, Long adviserId, Long channelId, Long templetId, Long secondTempletId,
Long graLabelId, Long subLabelId, Long verLabelId, Long areaLabelId,
Integer deleteStatus, Integer isMainAdviser) {
Integer deleteStatus, Integer isMainAdviser, Long thirdTempletId) {
LOGGER.info("修改书籍编辑的状态(删除或者恢复) <START>.[bookId]=" + bookId + ",adviserId=" + adviserId + ",channelId="
+ channelId + ",deleteStatus=" + deleteStatus+",isMainAdviser="+isMainAdviser+"templetId"+templetId);
Map<String, Object> paramMap = new HashMap<>();
......@@ -878,6 +881,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
paramMap.put("status", deleteStatus);
paramMap.put("templetId", templetId);
paramMap.put("secondTempletId",secondTempletId);
paramMap.put("thirdTempletId",thirdTempletId);
paramMap.put("graLabelId",graLabelId);
paramMap.put("subLabelId",subLabelId);
paramMap.put("verLabelId",verLabelId);
......@@ -1023,7 +1027,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.getVolLabelId(), adviserDto.getVerLabelId());
adviserDto.getSecondTempletId(),adviserDto.getGraLabelId(),adviserDto.getSubLabelId(), adviserDto.getVolLabelId(), adviserDto.getVerLabelId(), adviserDto.getThirdTempletId());
if (null!= rightsSettingDto){
bookRightsSettingDTO.setRightsSettingDetail(rightsSettingDto.getDetail());
bookRightsSettingDTO.setRightsSettingIntroduce(rightsSettingDto.getIntroduce());
......
......@@ -343,6 +343,7 @@ public class BookBizImpl implements BookBiz {
bookDto.setBookId(book.getBookId());
bookDto.setTempletId(book.getTempletId());
bookDto.setSecondTempletId(book.getSecondTempletId());
bookDto.setThirdTempletId(book.getThirdTempletId());
// 如果是编辑创建的书籍、默认建立编辑与书籍的推广关系
if (SystemCode.adviser.code.equalsIgnoreCase(systemCode)) {
setBookAdviserRelation(book);
......@@ -484,6 +485,7 @@ public class BookBizImpl implements BookBiz {
bookDto.setBookId(book.getBookId());
bookDto.setTempletId(book.getTempletId());
bookDto.setSecondTempletId(book.getSecondTempletId());
bookDto.setThirdTempletId(book.getThirdTempletId());
// 清除redis中数据
bookCache.clearRedisByBook(book.getBookId(), book.getIsbn(), book.getSerialNumber());
checkIsUpdateCoverImgAndSendTopic(bookDto, book.getCoverImg());
......@@ -1213,6 +1215,7 @@ public class BookBizImpl implements BookBiz {
bookAdviser.setSerialNumber(book.getSerialNumber());// 设置刊物序号
bookAdviser.setTempletId(book.getTempletId());
bookAdviser.setSecondTempletId(book.getSecondTempletId());
bookAdviser.setThirdTempletId(book.getThirdTempletId());
bookAdviserBiz.create(bookAdviser);
}
......@@ -1778,6 +1781,7 @@ public class BookBizImpl implements BookBiz {
bookAdviser.setCreatedUser(book.getCreatedUser());
bookAdviser.setTempletId(book.getTempletId());
bookAdviser.setSecondTempletId(book.getSecondTempletId());
bookAdviser.setThirdTempletId(book.getThirdTempletId());
bookAdviser.setSubLabelId(book.getSubLabelId());
bookAdviser.setGraLabelId(book.getGraLabelId());
bookAdviser.setAreaLabelId(book.getAreaLabelId());
......@@ -1950,6 +1954,7 @@ public class BookBizImpl implements BookBiz {
paramMap.put("typeCode", listNoAuthBookParam.getTypeCode() != null && "".equals(listNoAuthBookParam.getTypeCode().trim()) ? null : listNoAuthBookParam.getTypeCode());
paramMap.put("templetId", listNoAuthBookParam.getTempletId());
paramMap.put("secondTempletIds", Optional.ofNullable(listNoAuthBookParam.getSecondTempletId()).map(Lists::newArrayList).orElse(Lists.newArrayList()));
paramMap.put("thirdTempletIds", Optional.ofNullable(listNoAuthBookParam.getThirdTempletId()).map(Lists::newArrayList).orElse(Lists.newArrayList()));
PageParam pageParam = new PageParam(listNoAuthBookParam.getCurrentPage(), listNoAuthBookParam.getNumPerPage());
PageBeanNew pageBean = bookDao.listPageNew(pageParam, paramMap, "listNoAuthBook");
if (pageBean == null || ListUtils.isEmpty(pageBean.getRecordList())) {
......@@ -2255,7 +2260,7 @@ public class BookBizImpl implements BookBiz {
@ParamLog("平台端获取编辑书刊")
@Override
public PageBeanNew<BookDto> getAdviserBooks4Pcloud(String keyword, Long agentId, Long templetId, Long secondTempletId, String typeCode, Integer currentPage, Integer numPerPage) {
public PageBeanNew<BookDto> getAdviserBooks4Pcloud(String keyword, Long agentId, Long templetId, Long secondTempletId, Long thirdTempletId, String typeCode, Integer currentPage, Integer numPerPage) {
String redisKey=BookConstant.ADVISER_BOOK_CACHE + "_" + keyword + "_" + agentId + "_" + templetId
+ "_" + secondTempletId + "_" + typeCode + "_" + currentPage + "_" + numPerPage;
String data = JedisClusterUtils.get(redisKey);
......@@ -2270,6 +2275,7 @@ public class BookBizImpl implements BookBiz {
map.put("keyword",keyword);
map.put("templetId",templetId);
map.put("secondTempletId",secondTempletId);
map.put("thirdTempletId",thirdTempletId);
map.put("typeCode",typeCode);
if (agentId != null){
List<Long> adviserIds = adviserConsr.getIdsByNameAndAgentId(agentId, null);
......@@ -2295,9 +2301,9 @@ public class BookBizImpl implements BookBiz {
@ParamLog("获取编辑书刊H5")
@Override
public PageBeanNew<BookDto> getAdviserBooks4H5(String grayStatus, String keyword, Long templetId, Long secondTempletId,
Integer currentPage, Integer numPerPage) {
Long thirdTempletId, Integer currentPage, Integer numPerPage) {
Page<ESBookAndAdviser> esPage = esBookAndAdviserBiz.getAdviserBooks4ES(StringUtils.isEmpty(grayStatus) ? "0" : grayStatus,keyword
, templetId, secondTempletId, currentPage, numPerPage);
, templetId, secondTempletId, thirdTempletId, currentPage, numPerPage);
List<ESBookAndAdviser> esBookAndAdvisers=esPage.getContent();
if (ListUtils.isEmpty(esBookAndAdvisers)){
return new PageBeanNew<>();
......@@ -2438,9 +2444,17 @@ public class BookBizImpl implements BookBiz {
if(bookDto.getSecondTempletId()!=null) {
templetIds.add(bookDto.getSecondTempletId());
}
if(bookDto.getThirdTempletId()!=null) {
templetIds.add(bookDto.getThirdTempletId());
}
Map<Long, AssistTempletDTO> assistTempletDTOMap = assistTempletConsr.mapByIds(templetIds);
Long thirdTempletId = bookDto.getThirdTempletId();
Long secondTempletId = bookDto.getSecondTempletId();
Long templetId = bookDto.getTempletId();
if (thirdTempletId != null && assistTempletDTOMap != null) {
AssistTempletDTO templetDTO = assistTempletDTOMap.get(thirdTempletId);
bookDto.setThirdTempletName(Optional.ofNullable(templetDTO).map(AssistTempletDTO::getTempletName).orElse(null));
}
if (secondTempletId!=null&&assistTempletDTOMap!=null) {
AssistTempletDTO templetDTO = assistTempletDTOMap.get(secondTempletId);
bookDto.setSecondTempletName(Optional.ofNullable(templetDTO).map(AssistTempletDTO::getTempletName).orElse(null));
......@@ -2468,9 +2482,13 @@ public class BookBizImpl implements BookBiz {
if (Objects.nonNull(BookDto.getSecondTempletId())) {
templetIds.add(BookDto.getSecondTempletId());
}
if (Objects.nonNull(BookDto.getThirdTempletId())) {
templetIds.add(BookDto.getThirdTempletId());
}
});
Map<Long, AssistTempletDTO> assistTempletDTOMap = assistTempletConsr.mapByIds4Classify(templetIds);
list.forEach(bookDto -> {
Long thirdTempletId = bookDto.getThirdTempletId();
Long secondTempletId = bookDto.getSecondTempletId();
Long templetId = bookDto.getTempletId();
if (secondTempletId!=null&&assistTempletDTOMap!=null) {
......@@ -2481,6 +2499,10 @@ public class BookBizImpl implements BookBiz {
AssistTempletDTO templetDTO = assistTempletDTOMap.get(templetId);
bookDto.setTempletName(Optional.ofNullable(templetDTO).map(AssistTempletDTO::getTempletName).orElse(null));
}
if (thirdTempletId!=null&&assistTempletDTOMap!=null) {
AssistTempletDTO templetDTO = assistTempletDTOMap.get(thirdTempletId);
bookDto.setThirdTempletName(Optional.ofNullable(templetDTO).map(AssistTempletDTO::getTempletName).orElse(null));
}
Long adviserId=bookDto.getAdviserId();
if (infoDtoMap!=null){
AdviserBaseInfoDto infoDto = infoDtoMap.get(adviserId);
......@@ -2568,11 +2590,12 @@ public class BookBizImpl implements BookBiz {
@Override
public PageBeanNew<BookDto> getAdviserBooks4Rights(String keyword, Long agentId, Long templetId, Long secondTempletId, String typeCode,
Integer currentPage, Integer numPerPage, Integer isIgnore) {
Integer currentPage, Integer numPerPage, Integer isIgnore, Long thirdTempletId) {
Map<String,Object> map=new HashMap<>();
map.put("keyword",keyword);
map.put("templetId",templetId);
map.put("secondTempletId",secondTempletId);
map.put("thirdTempletId", thirdTempletId);
map.put("typeCode",typeCode);
if (agentId != null){
List<Long> adviserIds = adviserConsr.getIdsByNameAndAgentId(agentId, null);
......
......@@ -15,7 +15,9 @@ import com.pcloud.book.book.dto.ErpBookInfoDTO;
import com.pcloud.book.book.entity.BookAdviser;
import com.pcloud.book.book.vo.AgentBookStatsDetailVO;
import com.pcloud.book.book.vo.ErpAdviserBookVO;
import com.pcloud.book.es.entity.ESBookAndAdviser;
import com.pcloud.common.core.dao.BaseDao;
import org.apache.ibatis.session.ResultHandler;
import java.util.List;
import java.util.Map;
......@@ -303,4 +305,6 @@ public interface BookAdviserDao extends BaseDao<BookAdviser> {
List<AgentBookStatsDetailVO> getAgentBookStatsDetail(List<ErpBookInfoDTO> raysBookIds, Integer isRay, String name, List<Long> advisers);
void updateBookTempletAndLabel(BookAdviser bookAdviser);
void syncTempletId4ES(ResultHandler<ESBookAndAdviser> resultHandler);
}
......@@ -20,7 +20,9 @@ import com.pcloud.book.book.dto.ErpBookInfoDTO;
import com.pcloud.book.book.entity.BookAdviser;
import com.pcloud.book.book.vo.AgentBookStatsDetailVO;
import com.pcloud.book.book.vo.ErpAdviserBookVO;
import com.pcloud.book.es.entity.ESBookAndAdviser;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.apache.ibatis.session.ResultHandler;
import org.springframework.stereotype.Repository;
import java.util.HashMap;
......@@ -362,4 +364,9 @@ public class BookAdviserDaoImpl extends BaseDaoImpl<BookAdviser> implements Book
super.getSqlSession().update(this.getStatement("updateBookTempletAndLabel"), bookAdviser);
}
@Override
public void syncTempletId4ES(ResultHandler<ESBookAndAdviser> resultHandler) {
super.getSqlSession().select(getStatement("syncTempletId4ES"), resultHandler);
}
}
......@@ -174,6 +174,7 @@ public interface BookFacade {
@RequestParam(value = "templetId", required = false) Long templetId,
@RequestParam(value = "bookStatus", required = false) Integer bookStatus,
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId,
@RequestParam(value = "thirdTempletId", required = false) Long thirdTempletId,
@RequestParam(value = "hasQrcode",required = false) Integer hasQrcode,
@RequestParam(value = "isPrint", required = false) Boolean isPrint,
@RequestParam(value = "minimumSupport", required = false) Integer minimumSupport)
......@@ -399,6 +400,7 @@ public interface BookFacade {
@RequestParam(value = "isbn", required = false) String isbn,
@RequestParam(value = "templetId", required = false) Long templetId,
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId,
@RequestParam(value = "thirdTempletId", required = false) Long thirdTempletId,
@RequestParam(value = "isPrint", required = false) Boolean isPrint,
@RequestParam(value = "minimumSupport", required = false) Integer minimumSupport)
throws BizException, PermissionException, JsonParseException;
......@@ -508,6 +510,7 @@ public interface BookFacade {
@RequestParam(value = "currentPage") Integer currentPage,
@RequestParam(value = "numPerPage") Integer numPerPage,
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId,
@RequestParam(value = "thirdTempletId", required = false) Long thirdTempletId,
@RequestParam(value = "isPrint", required = false) Boolean isPrint)
throws BizException, PermissionException, JsonParseException;
......@@ -525,7 +528,8 @@ public interface BookFacade {
@RequestParam(value = "endDate", required = false) String endDate,
@RequestParam(value = "bookName", required = false) String bookName,
@RequestParam(value = "publish", required = false) String publish,
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId,
@RequestParam(value = "thirdTempletId", required = false) Long thirdTempletId
) throws BizException, PermissionException, JsonParseException;
@ApiOperation(value = "导出平台下所有书刊excel表(平台端)", httpMethod = "GET")
......@@ -657,6 +661,7 @@ public interface BookFacade {
@RequestParam(value = "isFundSupport", required = false) Integer isFundSupport,
@RequestParam(value = "templetId", required = false) Long templetId,
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId,
@RequestParam(value = "thirdTempletId", required = false) Long thirdTempletId,
@RequestParam(value = "minimumSupport", required = false) Integer minimumSupport)
throws BizException, PermissionException, JsonParseException;
......@@ -676,7 +681,8 @@ public interface BookFacade {
@RequestParam(value = "typeCode", required = false) String typeCode,
@RequestParam(value = "isFundSupport", required = false) Integer isFundSupport,
@RequestParam(value = "templetId", required = false) Long templetId,
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId)
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId,
@RequestParam(value = "thirdTempletId", required = false) Long thirdTempletId)
throws PermissionException, BizException;
@ApiOperation("编辑端 获取1v1社群书书刊列表")
......@@ -701,6 +707,7 @@ public interface BookFacade {
@RequestParam(value = "agentId", required = false) Long agentId,
@RequestParam(value = "templetId", required = false) Long templetId,
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId,
@RequestParam(value = "thirdTempletId", required = false) Long thirdTempletId,
@RequestParam(value = "typeCode", required = false) String typeCode,
@RequestParam(value = "currentPage") Integer currentPage,
@RequestParam(value = "numPerPage") Integer numPerPage
......@@ -713,6 +720,7 @@ public interface BookFacade {
@RequestParam(value = "keyword", required = false) String keyword,
@RequestParam(value = "templetId", required = false) Long templetId,
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId,
@RequestParam(value = "thirdTempletId", required = false) Long thirdTempletId,
@RequestParam(value = "currentPage") Integer currentPage,
@RequestParam(value = "numPerPage") Integer numPerPage
) throws BizException, PermissionException;
......
......@@ -173,7 +173,7 @@ public class BookAdviserFacadeImpl implements BookAdviserFacade {
@RequestParam(value = "channelId", required = false) Long channelId)
throws BizException, PermissionException, JsonParseException {
Long adviserId = (Long) SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
bookAdviserBiz.recoverBook4Adviser(bookId, adviserId, channelId, null,null, null, null, null, null, true);
bookAdviserBiz.recoverBook4Adviser(bookId, adviserId, channelId, null,null, null, null, null, null, true, null);
return new ResponseDto<>();
}
......
......@@ -1882,6 +1882,9 @@ public class BookSet {
if (null!=bookDto.getSecondTempletId() && !classifyIds.contains(bookDto.getSecondTempletId())) {
classifyIds.add(bookDto.getSecondTempletId());
}
if (null!=bookDto.getThirdTempletId() && !classifyIds.contains(bookDto.getThirdTempletId())) {
classifyIds.add(bookDto.getThirdTempletId());
}
}
Map<Long, AssistTempletDTO> classifyMap = new HashMap<>();
if (!ListUtils.isEmpty(classifyIds)){
......@@ -1895,6 +1898,9 @@ public class BookSet {
if (!MapUtils.isEmpty(classifyMap) && classifyMap.containsKey(bookDto.getSecondTempletId())){
bookDto.setSecondTempletName(classifyMap.get(bookDto.getSecondTempletId()).getTempletName());
}
if (!MapUtils.isEmpty(classifyMap) && classifyMap.containsKey(bookDto.getThirdTempletId())){
bookDto.setThirdTempletName(classifyMap.get(bookDto.getThirdTempletId()).getTempletName());
}
}
}
......
......@@ -26,6 +26,9 @@ public class ListNoAuthBookParam implements Serializable {
@ApiModelProperty("图书类型标识")
private Long secondTempletId;
@ApiModelProperty("图书类型标识")
private Long thirdTempletId;
@ApiModelProperty("当前页")
private Integer currentPage;
......@@ -41,6 +44,14 @@ public class ListNoAuthBookParam implements Serializable {
@ApiModelProperty("类型")
private String typeCode;
public Long getThirdTempletId() {
return thirdTempletId;
}
public void setThirdTempletId(Long thirdTempletId) {
this.thirdTempletId = thirdTempletId;
}
public String getName() {
return name;
}
......
......@@ -27,6 +27,9 @@ public class ListNoAuthGroupBookParam implements Serializable {
@ApiModelProperty("图书类型标识")
private Long secondTempletId;
@ApiModelProperty("图书类型标识")
private Long thirdTempletId;
@ApiModelProperty("当前页")
private Integer currentPage;
......@@ -36,6 +39,14 @@ public class ListNoAuthGroupBookParam implements Serializable {
@ApiModelProperty("类型")
private String typeCode;
public Long getThirdTempletId() {
return thirdTempletId;
}
public void setThirdTempletId(Long thirdTempletId) {
this.thirdTempletId = thirdTempletId;
}
public String getName() {
return name;
}
......
......@@ -50,6 +50,15 @@ public class SearchBookVO {
private String secondTempletName;
/**
* 三级分类id
*/
private Long thirdTempletId;
/**
* 三级分类名称
*/
private String thirdTempletName;
private String coverImg;
@ApiModelProperty("是否展示质检信息0 否 1是")
......
......@@ -3,7 +3,6 @@ package com.pcloud.book.es.biz;
import com.pcloud.book.es.entity.ESBookAndAdviser;
import org.springframework.data.domain.Page;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -17,7 +16,7 @@ public interface ESBookAndAdviserBiz {
void updateBookAndAdviserToES(List<Long> bookIds);
Page<ESBookAndAdviser> getAdviserBooks4ES(String grayStatus, String keyword, Long templetId, Long secondTempletId, Integer currentPage, Integer numPerPage);
Page<ESBookAndAdviser> getAdviserBooks4ES(String grayStatus, String keyword, Long templetId, Long secondTempletId, Long thirdTempletId, Integer currentPage, Integer numPerPage);
Page<ESBookAndAdviser> getESAdviserBooks4Applet(String grayStatus, String keyword, List<Long> templetIds, List<Long> graLabelIds, List<Long> subLabelIds, Integer currentPage, Integer numPerPage, List<Long> scecondTempletIds, Integer isAdviserBook, List<Long> adviserIds, Long agentId);
......@@ -44,4 +43,6 @@ public interface ESBookAndAdviserBiz {
Map<String, Object> getNotFoundBookId(String lastBookId)throws Exception;
void stopNotFoundBookId();
void updateTempletId();
}
package com.pcloud.book.es.biz.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.map.MapUtil;
import com.google.common.collect.Lists;
import com.pcloud.analysisengine.browse.dto.BrowseCacheRecordDto;
import com.pcloud.book.applet.biz.AppletUserBookcaseBiz;
import com.pcloud.book.book.biz.BookBiz;
import com.pcloud.book.book.constant.BookConstant;
import com.pcloud.book.book.dao.BookAdviserDao;
import com.pcloud.book.book.dao.BookDao;
import com.pcloud.book.book.dto.ErpBookApprovalDTO;
import com.pcloud.book.consumer.analysisengine.BrowseRecordConsr;
......@@ -29,6 +31,7 @@ import com.pcloud.common.enums.AppTypeEnum;
import com.pcloud.common.exceptions.BizException;
import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.cache.redis.JedisClusterUtils;
import com.pcloud.common.utils.robot.WeWorkWebHookRobotUtils;
import com.pcloud.common.utils.string.StringUtil;
import com.pcloud.facade.tradecenter.dto.BookIncomeQueryVo;
import com.pcloud.facade.tradecenter.dto.IncomeBackDto;
......@@ -51,7 +54,6 @@ import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
......@@ -94,6 +96,8 @@ public class ESBookAndAdviserBizImpl implements ESBookAndAdviserBiz {
private RightsSettingBiz rightsSettingBiz;
@Autowired
private BookBiz bookBiz;
@Autowired
private BookAdviserDao bookAdviserDao;
@ParamLog("导入全部book和bookAdviser")
@Transactional(rollbackFor = Exception.class)
......@@ -264,11 +268,12 @@ public class ESBookAndAdviserBizImpl implements ESBookAndAdviserBiz {
}
@Override
public Page<ESBookAndAdviser> getAdviserBooks4ES(String grayStatus, String keyword, Long templetId, Long secondTempletId, Integer currentPage, Integer numPerPage) {
public Page<ESBookAndAdviser> getAdviserBooks4ES(String grayStatus, String keyword, Long templetId, Long secondTempletId, Long thirdTempletId, Integer currentPage, Integer numPerPage) {
BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery()
.filter(QueryBuilders.termQuery("isBookDelete", 0))
.filter(Objects.isNull(templetId) ? QueryBuilders.boolQuery() : QueryBuilders.termQuery("templetId", templetId))
.filter(Objects.isNull(secondTempletId) ? QueryBuilders.boolQuery() : QueryBuilders.termQuery("secondTempletId", secondTempletId));
.filter(Objects.isNull(secondTempletId) ? QueryBuilders.boolQuery() : QueryBuilders.termQuery("secondTempletId", secondTempletId))
.filter(Objects.isNull(thirdTempletId) ? QueryBuilders.boolQuery() : QueryBuilders.termQuery("thirdTempletId", thirdTempletId));
BoolQueryBuilder should1 = QueryBuilders.boolQuery()
.should(QueryBuilders.termQuery("isBookAdviserDelete", 0))
......@@ -550,4 +555,52 @@ public class ESBookAndAdviserBizImpl implements ESBookAndAdviserBiz {
public void stopNotFoundBookId() {
JedisClusterUtils.set(NOT_FOUND_BOOK_ID_STATUS_SELECT_KEY, "stop", 3600);
}
@Override
public void updateTempletId() {
try {
WeWorkWebHookRobotUtils.sendTextMsg("e99da8d0-62b9-4352-a196-d1f20b01960f",
"开始同步BookAdviser分类信息", null, CollUtil.toList("13035118598"));
final List<ESBookAndAdviser> bookList = new ArrayList<>();
bookAdviserDao.syncTempletId4ES(resultContext -> {
ESBookAndAdviser esBookAndAdviser = resultContext.getResultObject();
bookList.add(esBookAndAdviser);
if (bookList.size() == 1000) {
saveToES(bookList, resultContext.getResultCount());
bookList.clear();
}
});
saveToES(bookList, bookList.size());
} catch (Exception e) {
WeWorkWebHookRobotUtils.sendTextMsg("e99da8d0-62b9-4352-a196-d1f20b01960f",
String.format("ESBookAdviser同步失败\nERR:%s", Arrays.toString(e.getStackTrace())),
null, CollUtil.toList("13035118598"));
}
}
private void saveToES(List<ESBookAndAdviser> bookList, int resultCount) {
if (CollUtil.isEmpty(bookList)) {
return;
}
List<String> idList = bookList.stream().map(ESBookAndAdviser::getBookId).collect(Collectors.toList());
BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
boolQueryBuilder.must(QueryBuilders.termsQuery("bookId", idList));
Iterable<ESBookAndAdviser> search = bookAndAdviserRepository.search(boolQueryBuilder);
List<ESBookAndAdviser> list = new ArrayList<>();
Map<String, ESBookAndAdviser> map = bookList.stream().filter(Objects::nonNull).filter(x -> Objects.nonNull(x.getBookId())).collect(Collectors.toMap(ESBookAndAdviser::getBookId, x -> x));
for (ESBookAndAdviser bookAndAdviser : search) {
ESBookAndAdviser esBookAndAdviser = map.get(bookAndAdviser.getBookId());
if(Objects.isNull(esBookAndAdviser)) continue;
bookAndAdviser.setTempletId(esBookAndAdviser.getTempletId());
bookAndAdviser.setSecondTempletId(esBookAndAdviser.getSecondTempletId());
bookAndAdviser.setThirdTempletId(esBookAndAdviser.getThirdTempletId());
list.add(bookAndAdviser);
}
if (CollUtil.isNotEmpty(list)) {
bookAndAdviserRepository.save(list);
WeWorkWebHookRobotUtils.sendTextMsg("e99da8d0-62b9-4352-a196-d1f20b01960f",
String.format("ESBookAdviser同步中\n当前同步数量: %d\n存入ES数量:%d", resultCount, list.size()),
null, CollUtil.toList("13035118598"));
}
}
}
......@@ -54,6 +54,11 @@ public class ESBookAndAdviser {
private String secondTempletId;
/**
* 第二级类型
*/
private String thirdTempletId;
/**
* 是否是主编辑
*/
private Boolean isMainEditor;
......
package com.pcloud.book.es.facade;
import cn.hutool.core.util.StrUtil;
import com.pcloud.book.base.exception.BookBizException;
import com.pcloud.book.es.biz.ESBookAndAdviserBiz;
import com.pcloud.book.es.entity.ESBookAndAdviser;
......@@ -42,13 +43,14 @@ public class ESBookAndAdviserFacade {
@RequestParam(value = "keyword", required = false) String keyword,
@RequestParam(value = "templetId", required = false) Long templetId,
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId,
@RequestParam(value = "thirdTempletId", required = false) Long thirdTempletId,
@RequestParam(value = "currentPage") Integer currentPage,
@RequestParam(value = "numPerPage") Integer numPerPage
) throws BizException {
if (currentPage == null || numPerPage == null || currentPage < 0 || numPerPage < 0) {
throw BookBizException.PAGE_PARAM_DELETION;
}
return esBookAndAdviserBiz.getAdviserBooks4ES("0", keyword,templetId,secondTempletId,currentPage,numPerPage).getContent();
return esBookAndAdviserBiz.getAdviserBooks4ES("0", keyword,templetId,secondTempletId,thirdTempletId,currentPage,numPerPage).getContent();
}
@ApiOperation("es中删除部分测试图书")
......@@ -77,4 +79,13 @@ public class ESBookAndAdviserFacade {
esBookAndAdviserBiz.stopNotFoundBookId();
return new ResponseDto<>();
}
@ApiOperation("ES同步图书分类信息 - 慎点 参数为接口名")
@GetMapping("/syncBookAdviserTemplet4ES")
public ResponseDto<Void> syncBookAdviserTemplet4ES(@RequestParam("conten") String content){
if (StrUtil.equals(content,"syncBookAdviserTemplet4ES")){
esBookAndAdviserBiz.updateTempletId();
}
return new ResponseDto<>();
}
}
......@@ -306,6 +306,9 @@ public class GiftCouponPackageBizImpl implements GiftCouponPackageBiz {
if(MapUtils.isNotEmpty(classifyMap) && classifyMap.containsKey(categoryDTO.getSecondClassify())){
categoryDTO.setSecondClassifyName(classifyMap.get(categoryDTO.getSecondClassify()).getTempletName());
}
if(MapUtils.isNotEmpty(classifyMap) && classifyMap.containsKey(categoryDTO.getThirdClassify())){
categoryDTO.setThirdClassifyName(classifyMap.get(categoryDTO.getThirdClassify()).getTempletName());
}
if (MapUtils.isNotEmpty(labelMap) && labelMap.containsKey(categoryDTO.getSubjectLabelId())) {
categoryDTO.setSubjectLabelName(labelMap.get(categoryDTO.getSubjectLabelId()));
}
......@@ -582,6 +585,7 @@ public class GiftCouponPackageBizImpl implements GiftCouponPackageBiz {
Map<String, Object> map = new HashMap<>();
map.put("firstClassify", null!=baseTempletClassify ? baseTempletClassify.getFirstClassify() : null);
map.put("secondClassify", null!=baseTempletClassify ? baseTempletClassify.getSecondClassify() : null);
map.put("thirdClassify", null!=baseTempletClassify ? baseTempletClassify.getThirdClassify() : null);
map.put("gradeLabelId", null!=baseTempletClassify ? baseTempletClassify.getGradeLabelId() : null);
map.put("subjectLabelId", null!=baseTempletClassify ? baseTempletClassify.getSubjectLabelId() : null);
List<Long> resultIds = setSelectIds(map);
......
......@@ -33,4 +33,10 @@ public class GiftCategoryDTO extends BaseDto {
private Long giftPackageId;
@ApiModelProperty("第三级类型标识")
private Long thirdClassify;
@ApiModelProperty("第三级类型标识名称")
private String thirdClassifyName;
}
......@@ -289,7 +289,7 @@ public interface BookGroupClassifyBiz {
List<BookGroupClassifyDTO> getBookGroupClassifyByClassifyIds(List<Long> classifyIds);
PageBeanNew<BookGroupClassifyAnalysisVO> listGroupClassify4Analysis(String name, Long proLabelId, Long depLabelId, Long purLabelId, Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Integer linkOnly, Integer browseQty, Integer clickQty, Integer currentPage, Integer numPerPage, String cityCode);
PageBeanNew<BookGroupClassifyAnalysisVO> listGroupClassify4Analysis(String name, Long proLabelId, Long depLabelId, Long purLabelId, Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Integer linkOnly, Integer browseQty, Integer clickQty, Integer currentPage, Integer numPerPage, String cityCode, Long thirdClassify);
Map<Long, GroupDetailDTO> getGroupMap(List<Long> groupIds, Integer groupType);
}
......@@ -1569,11 +1569,12 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
}
@Override
public PageBeanNew<BookGroupClassifyAnalysisVO> listGroupClassify4Analysis(String name, Long proLabelId, Long depLabelId, Long purLabelId, Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Integer linkOnly, Integer browseQty, Integer clickQty, Integer currentPage, Integer numPerPage, String cityCode) {
public PageBeanNew<BookGroupClassifyAnalysisVO> listGroupClassify4Analysis(String name, Long proLabelId, Long depLabelId, Long purLabelId, Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Integer linkOnly, Integer browseQty, Integer clickQty, Integer currentPage, Integer numPerPage, String cityCode, Long thirdClassify) {
PageParam pageParam = new PageParam(currentPage, numPerPage);
BaseTempletClassify baseTempletClassify =new BaseTempletClassify();
baseTempletClassify.setFirstClassify(firstClassify);
baseTempletClassify.setSecondClassify(secondClassify);
baseTempletClassify.setThirdClassify(thirdClassify);
baseTempletClassify.setSubjectLabelId(subjectLabelId);
baseTempletClassify.setGradeLabelId(gradeLabelId);
if (null != baseTempletClassify.getFirstClassify()){
......@@ -1589,6 +1590,7 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
map.put("firstClassify", baseTempletClassify.getFirstClassify());
map.put("secondClassify", baseTempletClassify.getSecondClassify());
map.put("thirdClassify", baseTempletClassify.getThirdClassify());
map.put("gradeLabelId", baseTempletClassify.getGradeLabelId());
map.put("subjectLabelId", baseTempletClassify.getSubjectLabelId());
PageBeanNew<BookGroupClassifyAnalysisVO> pageBeanNew = bookGroupClassifyDao.listPageNew(pageParam, map, "listGroupClassify4Analysis");
......@@ -1697,6 +1699,7 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
}
List<Long> firstClassifyIds = new ArrayList<>();
List<Long> secondClassifyIds = new ArrayList<>();
List<Long> thirdClassifyIds = new ArrayList<>();
List<Long> classifyIds = new ArrayList<>();
List<Long> gradeLabelIds = new ArrayList<>();
List<Long> subjectLabelIds = new ArrayList<>();
......@@ -1704,6 +1707,7 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
for (BookGroupClassifyAnalysisVO vo : recordList) {
firstClassifyIds.add(vo.getFirstClassify());
secondClassifyIds.add(vo.getSecondClassify());
thirdClassifyIds.add(vo.getThirdClassify());
gradeLabelIds.add(vo.getGradeLabelId());
subjectLabelIds.add(vo.getSubjectLabelId());
}
......@@ -1713,6 +1717,9 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
if (!ListUtils.isEmpty(secondClassifyIds)){
classifyIds.addAll(secondClassifyIds);
}
if (!ListUtils.isEmpty(thirdClassifyIds)){
classifyIds.addAll(thirdClassifyIds);
}
if (!ListUtils.isEmpty(gradeLabelIds)){
labelIds.addAll(gradeLabelIds);
}
......@@ -1734,6 +1741,9 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
if (!MapUtils.isEmpty(classifyMap) && classifyMap.containsKey(vo.getSecondClassify())){
vo.setSecondClassifyName(classifyMap.get(vo.getSecondClassify()).getTempletName());
}
if (!MapUtils.isEmpty(classifyMap) && classifyMap.containsKey(vo.getThirdClassify())){
vo.setThirdClassifyName(classifyMap.get(vo.getThirdClassify()).getTempletName());
}
if (!MapUtils.isEmpty(labelMap) && labelMap.containsKey(vo.getGradeLabelId())){
vo.setGradeLabelName(labelMap.get(vo.getGradeLabelId()).getName());
}
......
......@@ -299,6 +299,7 @@ public interface BookGroupClassifyFacade {
@RequestParam(value = "purLabelId", required = false) @ApiParam("目的") Long purLabelId,
@RequestParam(value = "firstClassify", required = false) @ApiParam("一级分类") Long firstClassify,
@RequestParam(value = "secondClassify", required = false) @ApiParam("二级分类") Long secondClassify,
@RequestParam(value = "thirdClassify", required = false) Long thirdClassify,
@RequestParam(value = "gradeLabelId", required = false) @ApiParam("年级") Long gradeLabelId,
@RequestParam(value = "subjectLabelId", required = false) @ApiParam("科目") Long subjectLabelId,
@RequestParam(value = "linkOnly", required = false) @ApiParam("只看第三方") Integer linkOnly,
......
......@@ -360,6 +360,7 @@ public class BookGroupClassifyFacadeImpl implements BookGroupClassifyFacade {
@RequestParam(value = "purLabelId", required = false) @ApiParam("目的") Long purLabelId,
@RequestParam(value = "firstClassify", required = false) @ApiParam("一级分类") Long firstClassify,
@RequestParam(value = "secondClassify", required = false) @ApiParam("二级分类") Long secondClassify,
@RequestParam(value = "thirdClassify", required = false) Long thirdClassify,
@RequestParam(value = "gradeLabelId", required = false) @ApiParam("年级") Long gradeLabelId,
@RequestParam(value = "subjectLabelId", required = false) @ApiParam("科目") Long subjectLabelId,
@RequestParam(value = "linkOnly", required = false) @ApiParam("只看第三方") Integer linkOnly,
......@@ -371,7 +372,7 @@ public class BookGroupClassifyFacadeImpl implements BookGroupClassifyFacade {
) throws BizException, PermissionException {
SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
return new ResponseDto<>(bookGroupClassifyBiz.listGroupClassify4Analysis(name, proLabelId, depLabelId, purLabelId,
firstClassify, secondClassify, gradeLabelId, subjectLabelId, linkOnly,browseQty,clickQty,currentPage, numPerPage,cityCode));
firstClassify, secondClassify, gradeLabelId, subjectLabelId, linkOnly,browseQty,clickQty,currentPage, numPerPage,cityCode, thirdClassify));
}
@Override
......
......@@ -59,6 +59,14 @@ public class BookGroupAnalysisVO extends BaseDto {
*/
private String secondTempletName;
/**
* 三级分类id
*/
private Long thirdTempletId;
/**
* 三级分类名称
*/
private String thirdTempletName;
/**
* 编辑标识
*/
private Long adviserId;
......@@ -160,6 +168,21 @@ public class BookGroupAnalysisVO extends BaseDto {
*/
private BigDecimal avgSaleAmount;
public Long getThirdTempletId() {
return thirdTempletId;
}
public void setThirdTempletId(Long thirdTempletId) {
this.thirdTempletId = thirdTempletId;
}
public String getThirdTempletName() {
return thirdTempletName;
}
public void setThirdTempletName(String thirdTempletName) {
this.thirdTempletName = thirdTempletName;
}
public Long getBookGroupId() {
return bookGroupId;
......
......@@ -73,4 +73,10 @@ public class BookGroupClassifyAnalysisVO {
private Long subjectLabelId;
@ApiModelProperty("科目标签名称")
private String subjectLabelName;
@ApiModelProperty("第三级类型标识")
private Long thirdClassify;
@ApiModelProperty("第三级类型标识名称")
private String thirdClassifyName;
}
......@@ -136,6 +136,7 @@ public class BookBrowseRecordBizImpl implements BookBrowseRecordBiz {
bookBrowseRecord.setAgentId(agentId);
Long firstClassifyId = null == bookAdviserDto.getTempletId() ? 0 : bookAdviserDto.getTempletId();
Long secondClassifyId = null == bookAdviserDto.getSecondTempletId() ? 0 : bookAdviserDto.getSecondTempletId();
Long thirdClassifyId = null == bookAdviserDto.getThirdTempletId() ? 0 : bookAdviserDto.getThirdTempletId();
Long graLabelId = null == bookAdviserDto.getGraLabelId() ? 0 : bookAdviserDto.getGraLabelId();
Long subLabelId = null == bookAdviserDto.getSubLabelId() ? 0 : bookAdviserDto.getSubLabelId();
Long bookClassifyId = null;
......@@ -147,6 +148,7 @@ public class BookBrowseRecordBizImpl implements BookBrowseRecordBiz {
}
bookBrowseRecord.setFirstClassifyId(firstClassifyId);
bookBrowseRecord.setSecondClassifyId(secondClassifyId);
bookBrowseRecord.setThirdClassifyId(thirdClassifyId);
bookBrowseRecord.setGraLabelId(graLabelId);
bookBrowseRecord.setSubLabelId(subLabelId);
bookBrowseRecord.setBookClassifyId(bookClassifyId);
......
......@@ -35,7 +35,7 @@ public interface RightsSettingBiz {
PageBeanNew<RightsSettingDto> listRightsSettingPage(Integer currentPage, Integer numPerPage, RightsSetting rightsSetting);
RightsSettingDto getByLabel(Long firstClassify,Long secondClassify,Long gradeLabelId,Long subjectLabelId, Long volLabelId, Long verLabelId);
RightsSettingDto getByLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Long volLabelId, Long verLabelId, Long thirdTempletId);
Integer getUserCount();
......
......@@ -72,4 +72,9 @@ public class RightsSettingConstant {
* </p>
*/
public static final Long[] K12_TEMPLATE_IDS = {48L, 59L, 46L, 40L, 65L};
/**
* 教辅一级分类
*/
public static final Long[] K12_TEMPLET_ID_NEW = {534L};
}
......@@ -22,7 +22,7 @@ public interface RightsSettingDAO extends BaseDao<RightsSetting> {
int updateByPrimaryKey(RightsSetting record);
RightsSettingDto getByLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Long volLabelId, Long verLabelId);
RightsSettingDto getByLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Long volLabelId, Long verLabelId, Long thirdTempletId);
RightsSettingDto getByBookId(Long bookId);
......
package com.pcloud.book.rightsSetting.dao;
import com.pcloud.book.applet.dto.AppletNewsDTO;
import com.pcloud.book.rightsSetting.dto.ReadTypeCountDTO;
import com.pcloud.book.rightsSetting.entity.RightsSettingClassify;
import com.pcloud.book.rightsSetting.entity.RightsSettingItem;
......@@ -50,7 +49,7 @@ public interface RightsSettingItemDao extends BaseDao<RightsSettingItem>{
Map<Long, RightsSettingClassify> getRightsClassifyMap(ArrayList<Long> longs);
List<RightsSettingItem> getItemsByClassify(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Long volLabelId, String rightsType, Integer readType, Long rightsClassifyId);
List<RightsSettingItem> getItemsByClassify(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Long volLabelId, String rightsType, Integer readType, Long rightsClassifyId, Long thirdClassify);
List<RightsSettingItem> getRightSettingInfo(String serveType, String rightsType, Long rightsSettingId);
}
\ No newline at end of file
......@@ -51,10 +51,11 @@ public class RightsSettingDAOImpl extends BaseDaoImpl<RightsSetting> implement
}
@Override
public RightsSettingDto getByLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Long volLabelId, Long verLabelId) {
public RightsSettingDto getByLabel(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Long volLabelId, Long verLabelId, Long thirdTempletId) {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("firstClassify",firstClassify);
paramMap.put("secondClassify",secondClassify);
paramMap.put("thirdClassify",thirdTempletId);
paramMap.put("gradeLabelId",gradeLabelId);
paramMap.put("subjectLabelId",subjectLabelId);
paramMap.put("volLabelId", volLabelId);
......
package com.pcloud.book.rightsSetting.dao.impl;
import cn.hutool.core.collection.CollUtil;
import com.pcloud.book.applet.dto.AppletNewsDTO;
import com.pcloud.book.rightsSetting.dao.RightsSettingItemDao;
import com.pcloud.book.rightsSetting.dto.ReadTypeCountDTO;
import com.pcloud.book.rightsSetting.entity.RightsSettingClassify;
......@@ -73,10 +71,11 @@ public class RightsSettingItemDaoImpl extends BaseDaoImpl<RightsSettingItem> imp
}
@Override
public List<RightsSettingItem> getItemsByClassify(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Long volLabelId, String rightsType, Integer readType, Long rightsClassifyId) {
public List<RightsSettingItem> getItemsByClassify(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Long volLabelId, String rightsType, Integer readType, Long rightsClassifyId, Long thirdClassify) {
Map<String,Object> map = new HashMap<>();
map.put("firstClassify",firstClassify);
map.put("secondClassify",secondClassify);
map.put("thirdClassify",thirdClassify);
map.put("gradeLabelId",gradeLabelId);
map.put("subjectLabelId",subjectLabelId);
map.put("volLabelId",volLabelId);
......
......@@ -15,6 +15,8 @@ public class BaseTempletClassify extends BaseEntity {
private Long firstClassify;
@ApiModelProperty("第二级类型标识")
private Long secondClassify;
@ApiModelProperty("第三级类型标识")
private Long thirdClassify;
@ApiModelProperty("年级标签id")
private Long gradeLabelId;
@ApiModelProperty("科目标签id")
......
......@@ -32,6 +32,8 @@ public class RightsSetting extends BaseTempletClassify {
private Long secondClassify;
private Long thirdClassify;
private Long gradeLabelId;
private Long subjectLabelId;
......@@ -210,6 +212,8 @@ public class RightsSetting extends BaseTempletClassify {
private String secondClassifyContent;
private String thridClassifyContent;
private String gradeLabelIdContent;
private String subjectLabelIdContent;
......
......@@ -64,6 +64,16 @@ public class RightsSettingBookRelation {
private String secondTempletName;
/**
* 第三级标签
*/
private Long thirdTempletId;
/**
* 第三级标签名称
*/
private String thirdTempletName;
/**
* 年级标签id
*/
private Long graLabelId;
......
......@@ -87,6 +87,7 @@ public class RightsSettingFacede {
@RequestParam("numPerPage") Integer numPerPage,
@RequestParam(value = "firstClassify", required = false) Long firstClassify,
@RequestParam(value = "secondClassify", required = false) Long secondClassify,
@RequestParam(value = "thirdClassify", required = false) Long thirdClassify,
@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,
......@@ -109,6 +110,7 @@ public class RightsSettingFacede {
rightsSetting.setVolLabelId(volLabelId);
rightsSetting.setAgentId(agentId);
rightsSetting.setVerLabelId(verLabelId);
rightsSetting.setThirdClassify(thirdClassify);
return new ResponseDto<PageBeanNew<RightsSettingDto>>(rightsSettingBiz.listRightsSettingPage(currentPage, numPerPage, rightsSetting));
}
......
......@@ -64,7 +64,7 @@ public interface PcloudGroupActivityBiz {
* 获取共读活动列表(分页)
*/
PageBeanNew<QueryGroupActivityResponseVO> queryGroupActivity(String name, Long proLabelId, Long purLabelId, Long depLabelId, Integer joinType, Long firstClassify,
Long secondClassify,
Long secondClassify, Long thirdClassify,
Long gradeLabelId,
Long subjectLabelId, Integer numPerPage, Integer currentPage, String cityCode, Long agentId, Integer isChoose);
......@@ -95,7 +95,7 @@ public interface PcloudGroupActivityBiz {
* @date:2020/6/8 10:49
* * @param null
*/
PageBeanNew<AppletGroupManageDTO> getGroupListByBookTemplet(Long wechatUserId, Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Integer currentPage, Integer numPerPage, Long agentId);
PageBeanNew<AppletGroupManageDTO> getGroupListByBookTemplet(Long wechatUserId, Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Integer currentPage, Integer numPerPage, Long agentId, Long thirdClassify);
List<GroupActivity4AppletDTO> getTishBookSchoolListWrap(BaseTempletClassify baseTempletClassify, Integer limit);
......
......@@ -305,7 +305,7 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
@Override
public PageBeanNew<QueryGroupActivityResponseVO> queryGroupActivity(String name, Long proLabelId, Long purLabelId, Long depLabelId, Integer joinType, Long firstClassify,
Long secondClassify,
Long secondClassify, Long thirdClassify,
Long gradeLabelId,
Long subjectLabelId, Integer numPerPage, Integer currentPage, String cityCode, Long agentId, Integer isChoose) {
......@@ -313,6 +313,7 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
BaseTempletClassify baseTempletClassify =new BaseTempletClassify();
baseTempletClassify.setFirstClassify(firstClassify);
baseTempletClassify.setSecondClassify(secondClassify);
baseTempletClassify.setThirdClassify(thirdClassify);
baseTempletClassify.setSubjectLabelId(subjectLabelId);
baseTempletClassify.setGradeLabelId(gradeLabelId);
if (null != baseTempletClassify.getFirstClassify()){
......@@ -326,6 +327,7 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
paraMap.put("joinType", joinType);
paraMap.put("firstClassify", baseTempletClassify.getFirstClassify());
paraMap.put("secondClassify", baseTempletClassify.getSecondClassify());
paraMap.put("thirdClassify", baseTempletClassify.getThirdClassify());
paraMap.put("gradeLabelId", baseTempletClassify.getGradeLabelId());
paraMap.put("subjectLabelId", baseTempletClassify.getSubjectLabelId());
paraMap.put("cityCode", cityCode);
......@@ -390,6 +392,7 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
}
List<Long> firstClassifyIds = new ArrayList<>();
List<Long> secondClassifyIds = new ArrayList<>();
List<Long> thirdClassifyIds = new ArrayList<>();
List<Long> classifyIds = new ArrayList<>();
List<Long> gradeLabelIds = new ArrayList<>();
List<Long> subjectLabelIds = new ArrayList<>();
......@@ -397,6 +400,7 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
for (QueryGroupActivityResponseVO queryGroupActivityResponseVO:rightsSettingDtos) {
firstClassifyIds.add(queryGroupActivityResponseVO.getFirstClassify());
secondClassifyIds.add(queryGroupActivityResponseVO.getSecondClassify());
thirdClassifyIds.add(queryGroupActivityResponseVO.getThirdClassify());
gradeLabelIds.add(queryGroupActivityResponseVO.getGradeLabelId());
subjectLabelIds.add(queryGroupActivityResponseVO.getSubjectLabelId());
}
......@@ -406,6 +410,9 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
if (!ListUtils.isEmpty(secondClassifyIds)){
classifyIds.addAll(secondClassifyIds);
}
if (!ListUtils.isEmpty(thirdClassifyIds)){
classifyIds.addAll(thirdClassifyIds);
}
if (!ListUtils.isEmpty(gradeLabelIds)){
labelIds.addAll(gradeLabelIds);
}
......@@ -427,6 +434,9 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
if (!MapUtils.isEmpty(classifyMap) && classifyMap.containsKey(rightsSettingDto.getSecondClassify())){
rightsSettingDto.setSecondClassifyName(classifyMap.get(rightsSettingDto.getSecondClassify()).getTempletName());
}
if (!MapUtils.isEmpty(classifyMap) && classifyMap.containsKey(rightsSettingDto.getThirdClassify())){
rightsSettingDto.setThirdClassifyName(classifyMap.get(rightsSettingDto.getThirdClassify()).getTempletName());
}
if (!MapUtils.isEmpty(labelMap) && labelMap.containsKey(rightsSettingDto.getGradeLabelId())){
rightsSettingDto.setGradeLabelName(labelMap.get(rightsSettingDto.getGradeLabelId()).getName());
}
......@@ -475,12 +485,14 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
BaseTempletClassify baseTempletClassify = new BaseTempletClassify();
baseTempletClassify.setFirstClassify(dto.getTempletId());
baseTempletClassify.setSecondClassify(dto.getSecondTempletId());
baseTempletClassify.setThirdClassify(dto.getThirdTempletId());
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());
GroupActivity4AppletDTO groupActivity4AppletDTO = pcloudGroupActivityDao.getGroupActivity4Applet(baseTempletClassify.getFirstClassify(),
baseTempletClassify.getSecondClassify(),baseTempletClassify.getGradeLabelId(),baseTempletClassify.getSubjectLabelId(), baseTempletClassify.getThirdClassify());
if(groupActivity4AppletDTO == null){
return new GroupActivity4AppletDTO();
}
......@@ -569,20 +581,22 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
}
@Override
public PageBeanNew<AppletGroupManageDTO> getGroupListByBookTemplet(Long wechatUserId, Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Integer currentPage, Integer numPerPage, Long agentId) {
public PageBeanNew<AppletGroupManageDTO> getGroupListByBookTemplet(Long wechatUserId, Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Integer currentPage, Integer numPerPage, Long agentId, Long thirdClassify) {
// 处理分类和标签
if (null == firstClassify && null == secondClassify && null == gradeLabelId && null == subjectLabelId) {
if (null == firstClassify && null == secondClassify && null == thirdClassify && null == gradeLabelId && null == subjectLabelId) {
return new PageBeanNew<>(currentPage, numPerPage, 0, new ArrayList<>());
}
BaseTempletClassify baseTempletClassify = new BaseTempletClassify();
baseTempletClassify.setFirstClassify(firstClassify);
baseTempletClassify.setSecondClassify(secondClassify);
baseTempletClassify.setThirdClassify(thirdClassify);
baseTempletClassify.setGradeLabelId(gradeLabelId);
baseTempletClassify.setSubjectLabelId(subjectLabelId);
rightsSettingBiz.setClassifyAndLabel(baseTempletClassify);
Map<String, Object> map = new HashMap<>();
map.put("firstClassify", baseTempletClassify.getFirstClassify());
map.put("secondClassify", baseTempletClassify.getSecondClassify());
map.put("thirdClassify", baseTempletClassify.getThirdClassify());
map.put("gradeLabelId", baseTempletClassify.getGradeLabelId());
map.put("subjectLabelId", baseTempletClassify.getSubjectLabelId());
map.put("agentId", agentId);
......
......@@ -25,7 +25,7 @@ public interface PcloudGroupActivityDao extends BaseDao<PcloudGroupActivity> {
void updateByPrimaryKeySelective(PcloudGroupActivity entity);
GroupActivity4AppletDTO getGroupActivity4Applet(Long firstClassify,Long secondClassify,Long gradeLabelId,Long subjectLabelId);
GroupActivity4AppletDTO getGroupActivity4Applet(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Long thirdClassify);
List<GroupActivity4AppletDTO> getTishBookSchoolList(BaseTempletClassify baseTempletClassify, Integer limit);
......
......@@ -32,6 +32,7 @@ public class PcloudGroupActivityDaoImpl extends BaseDaoImpl<PcloudGroupActivity>
map.put("ids", groupActivityClassifyVO.getIds());
map.put("firstClassify", groupActivityClassifyVO.getFirstClassify());
map.put("secondClassify", groupActivityClassifyVO.getSecondClassify());
map.put("thirdClassify", groupActivityClassifyVO.getThirdClassify());
map.put("gradeLabelId", groupActivityClassifyVO.getGradeLabelId());
map.put("subjectLabelId", groupActivityClassifyVO.getSubjectLabelId());
getSessionTemplate().update(getStatement("batchUpdateClassify"), map);
......@@ -61,10 +62,11 @@ public class PcloudGroupActivityDaoImpl extends BaseDaoImpl<PcloudGroupActivity>
}
@Override
public GroupActivity4AppletDTO getGroupActivity4Applet(Long firstClassify,Long secondClassify,Long gradeLabelId,Long subjectLabelId) {
public GroupActivity4AppletDTO getGroupActivity4Applet(Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Long thirdClassify) {
Map<String, Object> map = new HashMap<>();
map.put("firstClassify", firstClassify);
map.put("secondClassify", secondClassify);
map.put("thirdClassify", thirdClassify);
map.put("gradeLabelId", gradeLabelId);
map.put("subjectLabelId", subjectLabelId);
return super.getSqlSession().selectOne(getStatement("getGroupActivity4Applet"), map);
......@@ -75,6 +77,7 @@ public class PcloudGroupActivityDaoImpl extends BaseDaoImpl<PcloudGroupActivity>
Map<String, Object> map = new HashMap<>();
map.put("firstClassify", baseTempletClassify.getFirstClassify());
map.put("secondClassify", baseTempletClassify.getSecondClassify());
map.put("thirdClassify", baseTempletClassify.getThirdClassify());
map.put("gradeLabelId", baseTempletClassify.getGradeLabelId());
map.put("subjectLabelId", baseTempletClassify.getSubjectLabelId());
map.put("limit", (limit != null ? limit :10));
......
......@@ -105,6 +105,7 @@ public class PcloudGroupActivityFacade {
@RequestParam(value = "joinType", required = false) Integer joinType,
@RequestParam(value = "firstClassify", required = false) Long firstClassify,
@RequestParam(value = "secondClassify", required = false) Long secondClassify,
@RequestParam(value = "thirdClassify", required = false) Long thirdClassify,
@RequestParam(value = "gradeLabelId", required = false) Long gradeLabelId,
@RequestParam(value = "subjectLabelId", required = false) Long subjectLabelId,
@RequestParam(value = "cityCode", required = false) String cityCode,
......@@ -114,7 +115,7 @@ public class PcloudGroupActivityFacade {
Map<String, Object> map = SessionUtil.getToken4Redis(token);
Long agentId = (Long) map.get(SessionUtil.RAY_AGENT_ID);
return new ResponseDto<>(pcloudGroupActivityBiz.queryGroupActivity(name, proLabelId, purLabelId, depLabelId, joinType,firstClassify,
secondClassify, gradeLabelId,subjectLabelId,numPerPage, currentPage,cityCode, agentId, isChoose));
secondClassify, thirdClassify, gradeLabelId,subjectLabelId,numPerPage, currentPage,cityCode, agentId, isChoose));
}
@ApiOperation("获取共读活动列表(弹窗)")
......
......@@ -68,6 +68,12 @@ public class QueryGroupActivityResponseVO {
@ApiModelProperty("第二级类型标识名称")
private String secondClassifyName;
@ApiModelProperty("第三级类型标识")
private Long thirdClassify;
@ApiModelProperty("第三级类型标识名称")
private String thirdClassifyName;
@ApiModelProperty("年级标签id")
private Long gradeLabelId;
@ApiModelProperty("年级标签名称")
......
......@@ -67,7 +67,8 @@ public class TimesBookServiceImpl implements TimesBookService {
@RequestParam(value = "numPerPage") Integer numPerPage,
@RequestParam(value = "isFundSupport", required = false) Integer isFundSupport,
@RequestParam(value = "templetId", required = false) Long templetId,
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId) {
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId,
@RequestParam(value = "thirdTempletId", required = false) Long thirdTempletId) {
if (currentPage == null || numPerPage == null || currentPage < 0 || numPerPage < 0) {
throw BookBizException.PAGE_PARAM_DELETION;
}
......@@ -79,6 +80,8 @@ public class TimesBookServiceImpl implements TimesBookService {
paramMap.put("templetId", templetId);
paramMap.put("secondTempletId", secondTempletId);
paramMap.put("secondTempletIds", Optional.ofNullable(paramMap.get("secondTempletId")).map(Lists::newArrayList).orElse(Lists.newArrayList()));
paramMap.put("thirdTempletId", thirdTempletId);
paramMap.put("thirdTempletIds", Optional.ofNullable(paramMap.get("thirdTempletId")).map(Lists::newArrayList).orElse(Lists.newArrayList()));
return ResponseHandleUtil.toResponse(bookBiz.listPageIncomeDetail4Times(new PageParam(currentPage, numPerPage), paramMap, agentId));
}
......@@ -90,7 +93,8 @@ public class TimesBookServiceImpl implements TimesBookService {
@RequestParam(value = "typeCode", required = false) String typeCode,
@RequestParam(value = "isFundSupport", required = false) Integer isFundSupport,
@RequestParam(value = "templetId", required = false) Long templetId,
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId) {
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId,
@RequestParam(value = "thirdTempletId", required = false) Long thirdTempletId) {
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("keyWord", keyWord != null && "".equals(keyWord.trim()) ? null : keyWord);
paramMap.put("channelId", channelId);
......@@ -99,6 +103,8 @@ public class TimesBookServiceImpl implements TimesBookService {
paramMap.put("templetId", templetId);
paramMap.put("secondTempletId", secondTempletId);
paramMap.put("secondTempletIds", Optional.ofNullable(paramMap.get("secondTempletId")).map(Lists::newArrayList).orElse(Lists.newArrayList()));
paramMap.put("thirdTempletId", thirdTempletId);
paramMap.put("thirdTempletIds", Optional.ofNullable(paramMap.get("thirdTempletId")).map(Lists::newArrayList).orElse(Lists.newArrayList()));
return ResponseHandleUtil.toResponse(bookBiz.exportBookIncomeDetail4Times(paramMap, agentId));
}
......
......@@ -9,6 +9,7 @@
<result column="CHANNEL_ID" property="channelId" jdbcType="BIGINT" />
<result column="TEMPLET_ID" property="templetId" jdbcType="BIGINT" />
<result column="SECOND_TEMPLET_ID" property="secondTempletId" jdbcType="BIGINT" />
<result column="third_TEMPLET_ID" property="thirdTempletId" jdbcType="BIGINT" />
<result column="REASON" property="reason" jdbcType="VARCHAR" />
<result column="DECLARANT" property="declarant" jdbcType="BIGINT" />
<result column="PHONE" property="phone" jdbcType="VARCHAR" />
......@@ -34,13 +35,13 @@
<insert id="insert" parameterType="bookAppeal" useGeneratedKeys="true" keyProperty="bookAppealId" flushCache="true">
INSERT INTO `BOOK_APPEAL` (
BOOK_ID, CHANNEL_ID, TEMPLET_ID,SECOND_TEMPLET_ID,REASON,DECLARANT, PHONE, APPEAL_SUBMIT_DATE, APPEAL_STATE, AUDIT_REASON, AUDIT_USER,add_type,
CREATED_USER,CREATED_DATE,LAST_MODIFIED_USER, LAST_MODIFIED_DATE, IS_BOOK_GROUP
CREATED_USER,CREATED_DATE,LAST_MODIFIED_USER, LAST_MODIFIED_DATE, IS_BOOK_GROUP, third_TEMPLET_ID
)
VALUES (
#{bookId, jdbcType=BIGINT}, #{channelId, jdbcType=BIGINT}, #{templetId, jdbcType=BIGINT}, #{secondTempletId, jdbcType=BIGINT},#{reason, jdbcType=VARCHAR}, #{declarant, jdbcType=BIGINT},
#{phone, jdbcType=VARCHAR}, #{appealSubmitDate, jdbcType=TIMESTAMP}, #{appealState, jdbcType=BIGINT}, #{auditReason, jdbcType=VARCHAR},
#{auditUser, jdbcType=BIGINT},#{addType, jdbcType=BIT}, #{createdUser, jdbcType=BIGINT}, NOW(),
#{lastModifiedUser, jdbcType=BIGINT}, NOW(), #{isBookGroup, jdbcType=BIT}
#{lastModifiedUser, jdbcType=BIGINT}, NOW(), #{isBookGroup, jdbcType=BIT}, #{thirdTempletId}
)
</insert>
......@@ -85,7 +86,7 @@
<!-- 获取申诉详情 -->
<select id="getById" resultMap="bookAppealMap" parameterType="long">
SELECT
BOOK_APPEAL_ID, PHONE,CHANNEL_ID, DECLARANT,REASON,BOOK_ID,VERSION,APPEAL_STATE,AUDIT_REASON,TEMPLET_ID,CREATED_USER,IS_BOOK_GROUP,ADD_TYPE,SECOND_TEMPLET_ID
BOOK_APPEAL_ID, PHONE,CHANNEL_ID, DECLARANT,REASON,BOOK_ID,VERSION,APPEAL_STATE,AUDIT_REASON,TEMPLET_ID,CREATED_USER,IS_BOOK_GROUP,ADD_TYPE,SECOND_TEMPLET_ID, third_TEMPLET_ID
FROM
BOOK_APPEAL A
WHERE
......
......@@ -15,6 +15,7 @@
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
<result column="first_classify" property="firstClassify" jdbcType="BIGINT" />
<result column="second_classify" property="secondClassify" jdbcType="BIGINT" />
<result column="third_classify" property="thirdClassify" jdbcType="BIGINT"/>
<result column="grade_label_id" property="gradeLabelId" jdbcType="BIGINT" />
<result column="subject_label_id" property="subjectLabelId" jdbcType="BIGINT" />
<result column="relate_agent_id" property="relateAgentId" jdbcType="BIGINT" />
......@@ -32,24 +33,25 @@
<result column="classify_id" property="classifyId" jdbcType="BIGINT" />
<result column="first_classify" property="firstClassify" jdbcType="BIGINT" />
<result column="second_classify" property="secondClassify" jdbcType="BIGINT" />
<result column="third_classify" property="thirdClassify" jdbcType="BIGINT"/>
<result column="grade_label_id" property="gradeLabelId" jdbcType="BIGINT" />
<result column="subject_label_id" property="subjectLabelId" jdbcType="BIGINT" />
</resultMap>
<sql id="Base_Column_List" >
id, booklist_name, user_name, digest, display_pic, introduce_type, introduce_content, introduce_url,
classify_id, create_time, update_time, first_classify, second_classify, grade_label_id, subject_label_id, relate_agent_id
classify_id, create_time, update_time, first_classify, second_classify, third_classify, grade_label_id, subject_label_id, relate_agent_id
</sql>
<insert id="insert" parameterType="com.pcloud.book.applet.entity.AppletBooklist" useGeneratedKeys="true" keyProperty="id">
insert into applet_booklist (
booklist_name, user_name, digest, display_pic, introduce_type, introduce_content, introduce_url,
classify_id, create_time, update_time, first_classify, second_classify, grade_label_id, subject_label_id,
classify_id, create_time, update_time, first_classify, second_classify, third_classify, grade_label_id, subject_label_id,
relate_agent_id
)
values (
#{booklistName}, #{userName}, #{digest}, #{displayPic}, #{introduceType}, #{introduceContent}, #{introduceUrl},
#{classifyId}, NOW(), NOW(), #{firstClassify,jdbcType=BIGINT}, #{secondClassify,jdbcType=BIGINT},
#{classifyId}, NOW(), NOW(), #{firstClassify,jdbcType=BIGINT}, #{secondClassify,jdbcType=BIGINT},#{thirdClassify},
#{gradeLabelId,jdbcType=BIGINT}, #{subjectLabelId,jdbcType=BIGINT}, #{relateAgentId}
)
</insert>
......@@ -83,6 +85,7 @@
</if>
first_classify = #{firstClassify,jdbcType=BIGINT},
second_classify = #{secondClassify,jdbcType=BIGINT},
third_classify = #{thirdClassify},
grade_label_id = #{gradeLabelId,jdbcType=BIGINT},
subject_label_id = #{subjectLabelId,jdbcType=BIGINT},
relate_agent_id = #{relateAgentId},
......@@ -126,6 +129,7 @@
a.classify_name classifyName,
b.first_classify firstClassify,
b.second_classify secondClassify,
b.third_classify thirdClassify,
b.grade_label_id gradeLabelId,
b.subject_label_id subjectLabelId,
b.relate_agent_id relateAgentId
......@@ -145,6 +149,9 @@
<if test="secondClassify!=null">
AND b.second_classify =#{secondClassify}
</if>
<if test="thirdClassify != null">
and b.third_classify = #{thirdClassify}
</if>
<if test="gradeLabelId != null">
AND b.grade_label_id = #{gradeLabelId}
</if>
......@@ -190,6 +197,7 @@
B.COVER_IMG coverImg,
A.TEMPLET_ID templetId,
A.SECOND_TEMPLET_ID secondTempletId,
A.third_TEMPLET_ID thirdTempletId,
c.seq seq,
B.ISBN isbn,
CONCAT('BK',A.BOOK_ID) uniqueNumber,
......@@ -275,6 +283,7 @@
B.COVER_IMG coverImg,
A.TEMPLET_ID templetId,
A.SECOND_TEMPLET_ID secondTempletId,
A.third_TEMPLET_ID thirdTempletId,
B.ISBN isbn,
CONCAT('BK',A.BOOK_ID) uniqueNumber
FROM
......@@ -304,6 +313,9 @@
<if test="secondClassify!=null">
AND b.second_classify =#{secondClassify}
</if>
<if test="thirdClassify != null">
and b.third_classify = #{thirdClassify}
</if>
<if test="gradeLabelId != null">
AND b.grade_label_id = #{gradeLabelId}
</if>
......
......@@ -41,6 +41,7 @@
c.join_group_type joinGroupType,
g.TEMPLET_ID templetId,
g.SECOND_TEMPLET_ID secondTempletId,
g.third_TEMPLET_ID thirdTempletId,
IF(c.join_group_type=1 OR c.related_book_group_id>0,1,0) hasGroup,
c.related_book_group_id relatedBookGroupId
FROM applet_group_search_record a
......
......@@ -222,6 +222,9 @@
<if test="secondClassify!=null">
AND category.second_classify =#{secondClassify}
</if>
<if test="thirdClassify!=null">
AND category.third_classify =#{thirdClassify}
</if>
<if test="gradeLabelId != null">
AND category.grade_label_id = #{gradeLabelId}
</if>
......@@ -303,6 +306,9 @@
<if test="secondClassify!=null">
AND category.second_classify =#{secondClassify}
</if>
<if test="thirdClassify!=null">
AND category.third_classify =#{thirdClassify}
</if>
<if test="gradeLabelId != null">
AND category.grade_label_id = #{gradeLabelId}
</if>
......@@ -369,6 +375,9 @@
<if test="secondClassify != null">
and category.second_classify = #{secondClassify}
</if>
<if test="thirdClassify!=null">
AND category.third_classify =#{thirdClassify}
</if>
<if test="gradeLabelId != null">
and category.grade_label_id = #{gradeLabelId}
</if>
......@@ -408,6 +417,9 @@
<if test="secondClassify!=null">
AND category.second_classify =#{secondClassify}
</if>
<if test="thirdClassify!=null">
AND category.third_classify =#{thirdClassify}
</if>
<if test="gradeLabelId != null">
AND category.grade_label_id = #{gradeLabelId}
</if>
......@@ -574,6 +586,7 @@
n.create_time createTime,
n.first_classify firstClassify,
n.second_classify secondClassify,
n.third_classify thirdClassify,
n.grade_label_id gradeLabelId,
n.subject_label_id subjectLabelId,
n.rights_classify_id rightsClassifyId,
......@@ -601,6 +614,9 @@
<if test="secondClassify!=null">
AND category.second_classify =#{secondClassify}
</if>
<if test="thirdClassify!=null">
AND category.third_classify =#{thirdClassify}
</if>
<if test="gradeLabelId != null">
AND category.grade_label_id = #{gradeLabelId}
</if>
......@@ -842,6 +858,9 @@
<if test="secondClassify != null">
and category.second_classify = #{secondClassify}
</if>
<if test="thirdClassify!=null">
AND category.third_classify =#{thirdClassify}
</if>
<if test="gradeLabelId != null">
and category.grade_label_id = #{gradeLabelId}
</if>
......
......@@ -8,6 +8,7 @@
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="first_classify" property="firstClassify" jdbcType="BIGINT"/>
<result column="second_classify" property="secondClassify" jdbcType="BIGINT"/>
<result column="third_classify" property="thirdClassify" jdbcType="BIGINT"/>
<result column="grade_label_id" property="gradeLabelId" jdbcType="BIGINT"/>
<result column="subject_label_id" property="subjectLabelId" jdbcType="BIGINT"/>
</resultMap>
......@@ -19,19 +20,19 @@
<insert id="insert" parameterType="com.pcloud.book.applet.entity.AppletNewsCategory" useGeneratedKeys="true"
keyProperty="id">
insert into applet_news_category (
applet_news_id, creator, create_time, first_classify,second_classify, grade_label_id, subject_label_id
applet_news_id, creator, create_time, first_classify,second_classify, third_classify, grade_label_id, subject_label_id
)
values (
#{appletNewId}, #{creator}, NOW(), #{firstClassify}, #{secondClassify}, #{gradeLabelId}, #{subjectLabelId}
#{appletNewId}, #{creator}, NOW(), #{firstClassify}, #{secondClassify}, #{thirdClassify}, #{gradeLabelId}, #{subjectLabelId}
)
</insert>
<insert id="batchCreate" parameterType="list" keyProperty="id" useGeneratedKeys="true">
insert into applet_news_category (
applet_news_id, creator, create_time, first_classify,second_classify, grade_label_id, subject_label_id)
applet_news_id, creator, create_time, first_classify,second_classify, third_classify, grade_label_id, subject_label_id)
values
<foreach collection="list" item="item" index="index" separator=",">
( #{item.appletNewId}, #{item.creator}, NOW(), #{item.firstClassify}, #{item.secondClassify},
( #{item.appletNewId}, #{item.creator}, NOW(), #{item.firstClassify}, #{item.secondClassify}, #{item.thirdClassify},
#{item.gradeLabelId}, #{item.subjectLabelId} )
</foreach>
</insert>
......@@ -45,6 +46,9 @@
<if test="secondClassify != null">
second_classify = #{secondClassify,jdbcType=BIGINT},
</if>
<if test="thirdClassify != null">
third_classify = #{thirdClassify,jdbcType=BIGINT},
</if>
<if test="gradeLabelId != null">
grade_label_id = #{gradeLabelId,jdbcType=BIGINT},
</if>
......@@ -61,6 +65,7 @@
category.applet_news_id,
category.first_classify firstClassify,
category.second_classify secondClassify,
category.third_classify thirdClassify,
category.grade_label_id gradeLabelId,
category.subject_label_id subjectLabelId,
label.name gradeLabelName,
......
......@@ -234,6 +234,7 @@
b.COVER_IMG coverImg,
b.AUTHOR author,
b.PUBLISH publish,
a.third_TEMPLET_ID thirdTempletId,
a.SECOND_TEMPLET_ID secondTempletId,
a.TEMPLET_ID templetId,
d.join_group_type joinGroupType,
......
......@@ -190,6 +190,7 @@
b.COVER_IMG coverImg,
b.AUTHOR author,
b.PUBLISH publish,
a.third_TEMPLET_ID thirdTempletId,
a.SECOND_TEMPLET_ID secondTempletId,
a.TEMPLET_ID templetId,
d.join_group_type joinGroupType,
......
......@@ -192,6 +192,7 @@
b.PUBLISH publish,
a.SECOND_TEMPLET_ID secondTempletId,
a.TEMPLET_ID templetId,
a.third_TEMPLET_ID thirdTempletId,
d.join_group_type joinGroupType,
d.id bookGroupId,
b.ISBN isbn,
......
......@@ -62,6 +62,7 @@
b.AUTHOR author,
b.PUBLISH publish,
a.SECOND_TEMPLET_ID secondTempletId,
a.third_TEMPLET_ID thirdTempletId,
a.TEMPLET_ID templetId,
d.join_group_type joinGroupType,
d.id bookGroupId,
......@@ -268,6 +269,7 @@
b.AUTHOR author,
b.PUBLISH publish,
a.SECOND_TEMPLET_ID secondTempletId,
a.third_TEMPLET_ID thirdTempletId,
a.TEMPLET_ID templetId,
d.join_group_type joinGroupType,
d.id bookGroupId,
......@@ -299,6 +301,7 @@
<select id="getBookClassifyInfo" parameterType="map" resultType="com.pcloud.book.rightsSetting.entity.BaseTempletClassify">
SELECT b.TEMPLET_ID firstClassify,
b.SECOND_TEMPLET_ID secondClassify,
b.third_TEMPLET_ID thirdClassify,
b.GRA_LABEL_ID gradeLabelId,
b.SUB_LABEL_ID subjectLabelId,
b.vol_label_id volLabelId
......@@ -317,6 +320,7 @@
<select id="getLastReadBookInfo" parameterType="map" resultType="com.pcloud.book.rightsSetting.entity.BaseTempletClassify">
SELECT b.TEMPLET_ID firstClassify,
b.SECOND_TEMPLET_ID secondClassify,
b.third_TEMPLET_ID thirdClassify,
b.GRA_LABEL_ID gradeLabelId,
b.SUB_LABEL_ID subjectLabelId,
b.vol_label_id volLabelId
......
......@@ -70,6 +70,7 @@
<result column="unique_number" property="bookUniqueNumber" jdbcType="VARCHAR" />
<result column="edition" property="edition" jdbcType="VARCHAR" />
<result column="minimumSupport" property="minimumSupport" jdbcType="BIT" />
<result column="third_templet_id" property="thirdTempletId" jdbcType="BIGINT" />
</resultMap>
<resultMap id="bookListPageMap" type="bookDto" extends ="bookMap">
......@@ -310,7 +311,7 @@
SELECT
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,
IF(ISNULL(BF.BOOK_FUND_ID),0,1) IS_FUND_SUPPORT,START_TIME,END_TIME,BA.TEMPLET_ID,BA.SECOND_TEMPLET_ID,BA.third_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,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,b.unique_number,BA.CREATED_DATE,b.edition
......@@ -586,6 +587,13 @@
${item}
</foreach>
</if>
<if test="thirdTempletIds!=null and thirdTempletIds.size()>0">
AND
A.third_TEMPLET_ID in
<foreach collection="thirdTempletIds" item="item" open="(" separator="," close=")">
${item}
</foreach>
</if>
<if test="isbns != null">
AND
B.ISBN <![CDATA[ <> ]]> ${isbns}
......@@ -1237,6 +1245,13 @@
${item}
</foreach>
</if>
<if test="thirdTempletIds!=null and thirdTempletIds.size()>0">
AND
A.third_TEMPLET_ID in
<foreach collection="thirdTempletIds" item="item" open="(" separator="," close=")">
${item}
</foreach>
</if>
<if test="isFundSupport != null">
AND
BF.BOOK_FUND_ID IS NOT NULL
......@@ -1375,7 +1390,8 @@
ba.ADVISER_ID, ba.TEMPLET_ID, ba.CHANNEL_ID, ba.CREATED_DATE,
bt.TYPE_NAME, ba.IS_PRINT isPrint,
ba.SECOND_TEMPLET_ID, ba.GRA_LABEL_ID,ba.SUB_LABEL_ID,ba.VER_LABEL_ID,ba.AREA_LABEL_ID,ba.vol_label_id,
la1.`name` graLabelName,la2.`name` subLabelName,la3.`name` verLabelName,la4.`name` areaLabelName,la5.`name` volLabelName
la1.`name` graLabelName,la2.`name` subLabelName,la3.`name` verLabelName,la4.`name` areaLabelName,la5.`name` volLabelName,
ba.third_TEMPLET_ID
FROM
BOOK_ADVISER ba
JOIN
......@@ -1408,6 +1424,13 @@
${item}
</foreach>
</if>
<if test="thirdTempletIds!=null and thirdTempletIds.size()>0">
AND
ba.third_TEMPLET_ID in
<foreach collection="thirdTempletIds" item="item" open="(" separator="," close=")">
${item}
</foreach>
</if>
<if test="startDate!=null">
AND ba.CREATED_DATE <![CDATA[ > ]]> #{startDate} AND ba.CREATED_DATE <![CDATA[ < ]]> #{endDate}
</if>
......@@ -1460,6 +1483,13 @@
${item}
</foreach>
</if>
<if test="thirdTempletIds!=null and thirdTempletIds.size()>0">
AND
A.third_TEMPLET_ID in
<foreach collection="thirdTempletIds" item="item" open="(" separator="," close=")">
${item}
</foreach>
</if>
<if test="startDate!=null">
AND ba.CREATED_DATE <![CDATA[ > ]]> #{startDate} AND ba.CREATED_DATE <![CDATA[ < ]]> #{endDate}
</if>
......@@ -1855,6 +1885,13 @@
${item}
</foreach>
</if>
<if test="thirdTempletIds!=null and thirdTempletIds.size()>0">
AND
A.third_TEMPLET_ID in
<foreach collection="thirdTempletIds" item="item" open="(" separator="," close=")">
${item}
</foreach>
</if>
GROUP BY A.BOOK_ID, A.CHANNEL_ID
ORDER BY
A.LAST_MODIFIED_DATE DESC , A.BOOK_ADVISER_ID DESC
......@@ -1924,6 +1961,13 @@
${item}
</foreach>
</if>
<if test="thirdTempletIds!=null and thirdTempletIds.size()>0">
AND
A.third_TEMPLET_ID in
<foreach collection="thirdTempletIds" item="item" open="(" separator="," close=")">
${item}
</foreach>
</if>
GROUP BY G.book_id, G.channel_id
ORDER BY
G.update_time DESC , G.id DESC
......@@ -2038,6 +2082,13 @@
${item}
</foreach>
</if>
<if test="thirdTempletIds!=null and thirdTempletIds.size()>0">
AND
A.third_TEMPLET_ID in
<foreach collection="thirdTempletIds" item="item" open="(" separator="," close=")">
${item}
</foreach>
</if>
<if test="isFundSupport != null">
AND
BF.BOOK_FUND_ID IS NOT NULL
......@@ -2107,6 +2158,13 @@
${item}
</foreach>
</if>
<if test="thirdTempletIds!=null and thirdTempletIds.size()>0">
AND
A.third_TEMPLET_ID in
<foreach collection="thirdTempletIds" item="item" open="(" separator="," close=")">
${item}
</foreach>
</if>
<if test="isFundSupport != null">
AND
BF.BOOK_FUND_ID IS NOT NULL
......@@ -2127,7 +2185,8 @@
SELECT
A.BOOK_ID, A.CHANNEL_ID, A.ADVISER_ID, A.IS_MAIN_EDITOR, T.TYPE_CODE, T.TYPE_NAME, B.ISBN, B.BOOK_NAME, B.REMARK,
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 LAST_MODIFIED_DATE,A.BOOK_ADVISER_ID,CONCAT('BK',A.BOOK_ID) uniqueNumber
A.TEMPLET_ID,A.SECOND_TEMPLET_ID,A.LAST_MODIFIED_DATE LAST_MODIFIED_DATE,A.BOOK_ADVISER_ID,CONCAT('BK',A.BOOK_ID) uniqueNumber,
A.THIRD_TEMPLET_ID
FROM
BOOK_ADVISER A
INNER JOIN BOOK B ON A.BOOK_ID = B.BOOK_ID AND A.IS_DELETE = 0 AND B.IS_DELETE = 0
......@@ -2159,6 +2218,10 @@
AND
A.SECOND_TEMPLET_ID=#{secondTempletId}
</if>
<if test="thirdTempletId!=null ">
AND
A.third_TEMPLET_ID=#{thirdTempletId}
</if>
<if test="adviserIds!=null and adviserIds.size()>0">
AND
A.ADVISER_ID in
......@@ -2203,6 +2266,10 @@
AND
A.SECOND_TEMPLET_ID=#{secondTempletId}
</if>
<if test="thirdTempletId!=null ">
AND
A.third_TEMPLET_ID=#{thirdTempletId}
</if>
<if test="adviserIds!=null and adviserIds.size()>0">
AND
A.ADVISER_ID in
......@@ -2235,6 +2302,10 @@
AND
A.SECOND_TEMPLET_ID=#{secondTempletId}
</if>
<if test="thirdTempletId!=null ">
AND
A.third_TEMPLET_ID=#{thirdTempletId}
</if>
GROUP BY A.BOOK_ID, A.CHANNEL_ID
ORDER BY
A.LAST_MODIFIED_DATE DESC
......@@ -2385,6 +2456,7 @@
IF(A.IS_MAIN_EDITOR is NULL, "", A.IS_MAIN_EDITOR) isMainEditor,
IF(A.TEMPLET_ID is NULL, 0, A.TEMPLET_ID) templetId,
IF(A.SECOND_TEMPLET_ID is NULL, 0, A.SECOND_TEMPLET_ID) secondTempletId,
IF(A.third_TEMPLET_ID is NULL, 0, A.third_TEMPLET_ID) thirdTempletId,
IF(A.LAST_MODIFIED_DATE is NULL, "2001-01-01 00:00:00", A.LAST_MODIFIED_DATE) lastModifiedDate,
IF(A.BOOK_ADVISER_ID is NULL, 0, A.BOOK_ADVISER_ID) bookAdviserId,
IF(A.BOOK_ADVISER_ID is NULL, 0, 1) isAdviserBook,
......@@ -2490,7 +2562,8 @@
A.pro_label_id,
A.dep_label_id,
A.pur_label_id,
A.vol_label_id
A.vol_label_id,
A.third_TEMPLET_ID
FROM
BOOK_ADVISER A
INNER JOIN BOOK B ON A.BOOK_ID = B.BOOK_ID AND A.IS_DELETE = 0 AND B.IS_DELETE = 0
......@@ -2522,6 +2595,10 @@
AND
A.SECOND_TEMPLET_ID=#{secondTempletId}
</if>
<if test="thirdTempletId!=null ">
AND
A.third_TEMPLET_ID=#{thirdTempletId}
</if>
<if test="adviserIds!=null and adviserIds.size()>0">
AND
A.ADVISER_ID in
......
......@@ -3,7 +3,7 @@
<mapper namespace="com.pcloud.book.book.dao.impl.BookAdviserDaoImpl">
<!-- 书籍编辑实体DTO -->
<resultMap id="bookAdviserMap" type="bookAdviserDto">
<resultMap id="bookAdviserMap" type="com.pcloud.book.book.dto.BookAdviserDto">
<id column="BOOK_ADVISER_ID" property="bookAdviserId" jdbcType="BIGINT" />
<result column="BOOK_ID" property="bookId" jdbcType="BIGINT" />
<result column="ADVISER_ID" property="adviserId" jdbcType="BIGINT" />
......@@ -16,6 +16,7 @@
<result column="IS_MAIN_EDITOR" property="isMainEditor" jdbcType="BIT" />
<result column="IS_DELETE" property="isDelete" jdbcType="BIT" />
<result column="SECOND_TEMPLET_ID" property="secondTempletId" jdbcType="BIGINT" />
<result column="third_TEMPLET_ID" property="thirdTempletId" jdbcType="BIGINT" />
<result column="GRA_LABEL_ID" property="graLabelId" jdbcType="BIGINT" />
<result column="SUB_LABEL_ID" property="subLabelId" jdbcType="BIGINT" />
<result column="VER_LABEL_ID" property="verLabelId" jdbcType="BIGINT" />
......@@ -43,14 +44,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,
BOOK_ID, ADVISER_ID, CHANNEL_ID, CREATED_USER, CREATED_DATE,IS_MAIN_EDITOR, TEMPLET_ID, SECOND_TEMPLET_ID,third_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,
vol_label_id,LAST_MODIFIED_DATE
)
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},
#{secondTempletId, jdbcType=BIGINT},#{thirdTempletId},#{graLabelId, jdbcType=BIGINT},#{subLabelId, jdbcType=BIGINT},
#{verLabelId, jdbcType=BIGINT},#{areaLabelId, jdbcType=BIGINT},#{proLabelId,jdbcType=BIGINT},
#{depLabelId,jdbcType=BIGINT},#{purLabelId,jdbcType=BIGINT},#{isOpenRobotProcess,jdbcType=BIT},
#{volLabelId},now()
......@@ -63,30 +64,22 @@
<if test="secondTempletId!=null">
,SECOND_TEMPLET_ID=#{secondTempletId, jdbcType=BIGINT}
</if>
<if test="secondTempletId!=null">
,SECOND_TEMPLET_ID=#{secondTempletId, jdbcType=BIGINT}
</if>
<if test="secondTempletId!=null">
,SECOND_TEMPLET_ID=#{secondTempletId, jdbcType=BIGINT}
</if>
<if test="secondTempletId!=null">
,SECOND_TEMPLET_ID=#{secondTempletId, jdbcType=BIGINT}
</if>
<if test="secondTempletId!=null">
,SECOND_TEMPLET_ID=#{secondTempletId, jdbcType=BIGINT}
<if test="thirdTempletId!=null">
,third_templet_id=#{thirdTempletId, jdbcType=BIGINT}
</if>
</insert>
<!-- 批量新增书籍和编辑关联信息-->
<insert id="batchInsert" parameterType="bookAdviser" useGeneratedKeys="true" keyProperty="bookAdviserId" flushCache="true">
<foreach collection="list" item="item" index="index" separator=";">
INSERT INTO BOOK_ADVISER (
BOOK_ID, ADVISER_ID, CHANNEL_ID, CREATED_USER, CREATED_DATE,IS_MAIN_EDITOR, TEMPLET_ID,SECOND_TEMPLET_ID,LAST_MODIFIED_DATE
BOOK_ID, ADVISER_ID, CHANNEL_ID, CREATED_USER, CREATED_DATE,IS_MAIN_EDITOR, TEMPLET_ID,SECOND_TEMPLET_ID,LAST_MODIFIED_DATE,third_TEMPLET_ID
)
VALUES
(
#{item.bookId, jdbcType=VARCHAR}, #{item.adviserId, jdbcType=VARCHAR}, #{item.channelId, jdbcType=VARCHAR},
#{item.adviserId, jdbcType=BIGINT}, NOW(),#{item.isMainEditor, jdbcType=BIT},#{item.templetId, jdbcType=BIGINT},#{item.secondTempletId, jdbcType=BIGINT},now()
#{item.adviserId, jdbcType=BIGINT}, NOW(),#{item.isMainEditor, jdbcType=BIT},#{item.templetId, jdbcType=BIGINT},#{item.secondTempletId, jdbcType=BIGINT},now(), #{item.thirdTempletId}
) ON DUPLICATE KEY UPDATE IS_DELETE = 0,LAST_MODIFIED_DATE=now(),IS_MAIN_EDITOR=#{item.isMainEditor, jdbcType=BIT}
<if test="item.templetId!=null">
,TEMPLET_ID=#{item.templetId, jdbcType=BIGINT}
......@@ -94,6 +87,9 @@
<if test="item.secondTempletId!=null">
,SECOND_TEMPLET_ID=#{item.secondTempletId, jdbcType=BIGINT}
</if>
<if test="item.thirdTempletId!=null">
,third_TEMPLET_ID=#{item.thirdTempletId, jdbcType=BIGINT}
</if>
</foreach>
</insert>
......@@ -126,7 +122,7 @@
<select id="getBase" resultMap="bookAdviserMap" parameterType="map">
SELECT
BOOK_ADVISER_ID, BOOK_ID, TEMPLET_ID, CHANNEL_ID, ADVISER_ID, IS_DELETE,
TEMPLET_ID,SECOND_TEMPLET_ID,
TEMPLET_ID,SECOND_TEMPLET_ID,third_templet_id,
GRA_LABEL_ID,SUB_LABEL_ID,VER_LABEL_ID,AREA_LABEL_ID,is_open_robot_process,vol_label_id
FROM
BOOK_ADVISER
......@@ -475,6 +471,9 @@
<if test="secondTempletId != null">
,SECOND_TEMPLET_ID = #{secondTempletId}
</if>
<if test="thirdTempletId != null">
,third_TEMPLET_ID = #{thirdTempletId}
</if>
<if test="graLabelId!=null">
,GRA_LABEL_ID = #{graLabelId, jdbcType=BIGINT}
</if>
......@@ -691,7 +690,7 @@
<select id="getOneMainBook" parameterType="long" resultMap="bookAdviserMap">
SELECT
BOOK_ADVISER_ID, BOOK_ID, TEMPLET_ID, CHANNEL_ID, ADVISER_ID, IS_DELETE,
TEMPLET_ID,SECOND_TEMPLET_ID,
TEMPLET_ID,SECOND_TEMPLET_ID,third_templet_id,
GRA_LABEL_ID,SUB_LABEL_ID,VER_LABEL_ID,AREA_LABEL_ID,vol_label_id
FROM book_adviser
WHERE BOOK_ID=#{bookId}
......@@ -702,7 +701,7 @@
<select id="getByBookGroupId" parameterType="long" resultMap="bookAdviserMap">
SELECT
a.BOOK_ADVISER_ID, a.BOOK_ID, a.TEMPLET_ID, a.CHANNEL_ID, a.ADVISER_ID, a.IS_DELETE,
a.TEMPLET_ID,a.SECOND_TEMPLET_ID,
a.TEMPLET_ID,a.SECOND_TEMPLET_ID,a.third_TEMPLET_ID,
a.GRA_LABEL_ID,a.SUB_LABEL_ID,a.VER_LABEL_ID,a.AREA_LABEL_ID,a.vol_label_id
FROM
book_adviser a
......@@ -986,6 +985,7 @@
SET
TEMPLET_ID = #{templetId, jdbcType=BIGINT}
,SECOND_TEMPLET_ID = #{secondTempletId, jdbcType=BIGINT}
,third_TEMPLET_ID = #{thirdTempletId, jdbcType=BIGINT}
,GRA_LABEL_ID = #{graLabelId, jdbcType=BIGINT}
,SUB_LABEL_ID = #{subLabelId, jdbcType=BIGINT}
,VER_LABEL_ID = #{verLabelId, jdbcType=BIGINT}
......@@ -1003,5 +1003,13 @@
CHANNEL_ID = #{channelId, jdbcType=BIGINT}
</update>
<select id="syncTempletId4ES" resultType="com.pcloud.book.es.entity.ESBookAndAdviser">
select BOOK_ID AS bookId,
TEMPLET_ID AS templetId,
SECOND_TEMPLET_ID AS secondTempletId,
third_templet_id AS thirdTempletId
from book_adviser
group by BOOK_ID
</select>
</mapper>
......@@ -121,6 +121,13 @@
${item}
</foreach>
</if>
<if test="thirdTempletIds!=null and thirdTempletIds.size()>0">
AND
A.third_TEMPLET_ID in
<foreach collection="thirdTempletIds" item="item" open="(" separator="," close=")">
${item}
</foreach>
</if>
GROUP BY A.BOOK_ID, A.CHANNEL_ID
ORDER BY
I.LAST_MODIFIED_DATE DESC
......@@ -180,6 +187,13 @@
${item}
</foreach>
</if>
<if test="thirdTempletIds!=null and thirdTempletIds.size()>0">
AND
A.third_TEMPLET_ID in
<foreach collection="thirdTempletIds" item="item" open="(" separator="," close=")">
${item}
</foreach>
</if>
GROUP BY A.BOOK_ID, A.CHANNEL_ID
ORDER BY
I.LAST_MODIFIED_DATE DESC
......
......@@ -118,7 +118,8 @@
</select>
<select id="getBookSearchRecord" parameterType="map" resultType="com.pcloud.book.book.vo.SearchBookVO">
select a.id,a.content,a.book_id bookId ,b.book_name bookName,a.agent_id agentId,c.SECOND_TEMPLET_ID secondTempletId,b.publish ,c.ADVISER_ID adviserId,c.channel_id channelId
select a.id,a.content,a.book_id bookId ,b.book_name bookName,a.agent_id agentId,c.SECOND_TEMPLET_ID secondTempletId,c.third_TEMPLET_ID thirdTempletId,
b.publish ,c.ADVISER_ID adviserId,c.channel_id channelId
,a.create_time createTime,b.author,b.COVER_IMG coverImg, b.ISBN isbn
from search_record a,book b ,book_adviser c
where a.book_id=b.book_id
......
......@@ -8,31 +8,32 @@
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="first_classify" property="firstClassify" jdbcType="BIGINT"/>
<result column="second_classify" property="secondClassify" jdbcType="BIGINT"/>
<result column="third_classify" property="thirdClassify" jdbcType="BIGINT"/>
<result column="grade_label_id" property="gradeLabelId" jdbcType="BIGINT"/>
<result column="subject_label_id" property="subjectLabelId" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
id, gift_package_id, creator, create_time, first_classify,second_classify, grade_label_id, subject_label_id
id, gift_package_id, creator, create_time, first_classify,second_classify, third_classify, grade_label_id, subject_label_id
</sql>
<insert id="insert" parameterType="com.pcloud.book.giftcoupon.entity.GiftCategory" useGeneratedKeys="true"
keyProperty="id">
insert into gift_category (
gift_package_id, creator, create_time, first_classify,second_classify, grade_label_id, subject_label_id
gift_package_id, creator, create_time, first_classify,second_classify, grade_label_id, subject_label_id,third_classify
)
values (
#{giftPackageId}, #{creator}, NOW(), #{firstClassify}, #{secondClassify}, #{gradeLabelId}, #{subjectLabelId}
#{giftPackageId}, #{creator}, NOW(), #{firstClassify}, #{secondClassify}, #{gradeLabelId}, #{subjectLabelId}, #{thirdClassify}
)
</insert>
<insert id="batchCreate" parameterType="list" keyProperty="id" useGeneratedKeys="true">
insert into gift_category (
gift_package_id, creator, create_time, first_classify,second_classify, grade_label_id, subject_label_id)
gift_package_id, creator, create_time, first_classify,second_classify, grade_label_id, subject_label_id, third_classify)
values
<foreach collection="list" item="item" index="index" separator=",">
( #{item.giftPackageId}, #{item.creator}, NOW(), #{item.firstClassify}, #{item.secondClassify},
#{item.gradeLabelId}, #{item.subjectLabelId} )
#{item.gradeLabelId}, #{item.subjectLabelId},#{item.thirdClassify})
</foreach>
</insert>
......@@ -42,6 +43,7 @@
category.gift_package_id,
category.first_classify firstClassify,
category.second_classify secondClassify,
category.third_classify thirdClassify,
category.grade_label_id gradeLabelId,
category.subject_label_id subjectLabelId,
label.name gradeLabelName,
......@@ -58,6 +60,7 @@
category.gift_package_id giftPackageId,
category.first_classify firstClassify,
category.second_classify secondClassify,
category.third_classify thirdClassify,
category.grade_label_id gradeLabelId,
category.subject_label_id subjectLabelId
from gift_category category
......@@ -88,6 +91,14 @@
${item}
</foreach>
and second_classify>0
union
select third_classify from
gift_category
where gift_package_id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
${item}
</foreach>
and third_classify>0
</select>
<select id="getLabels" parameterType="list" resultType="Long">
......
......@@ -1182,6 +1182,7 @@
c.pur_label_id AS purLabelId,
0 firstClassify,
0 secondClassify,
0 thirdClassify,
0 gradeLabelId,
0 subjectLabelId,
0 groupType,
......@@ -1198,6 +1199,9 @@
<if test="secondClassify != null">
AND 1=2
</if>
<if test="thirdClassify != null">
AND 1=2
</if>
<if test="gradeLabelId != null">
AND 1=2
</if>
......@@ -1218,6 +1222,7 @@
a.pur_label_id AS purLabelId,
a.first_classify AS firstClassify,
a.second_classify AS secondClassify,
a.third_classify AS thirdClassify,
a.grade_label_id AS gradeLabelId,
a.subject_label_id AS subjectLabelId,
a.group_type as groupType,
......@@ -1233,6 +1238,9 @@
<if test="secondClassify != null">
AND a.second_classify = #{secondClassify}
</if>
<if test="thirdClassify != null">
and a.third_classify = #{thirdClassify}
</if>
<if test="gradeLabelId != null">
AND a.grade_label_id = #{gradeLabelId}
</if>
......
......@@ -620,6 +620,7 @@
<result column="BOOK_NAME" property="bookName" jdbcType="VARCHAR" />
<result column="TEMPLET_ID" property="templetId" jdbcType="BIGINT" />
<result column="SECOND_TEMPLET_ID" property="secondTempletId" jdbcType="BIGINT" />
<result column="third_TEMPLET_ID" property="thirdTempletId" jdbcType="BIGINT" />
<result column="ADVISER_ID" property="adviserId" jdbcType="BIGINT" />
<result column="CHANNEL_ID" property="channelId" jdbcType="BIGINT"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
......
......@@ -16,6 +16,7 @@
<result column="sub_Label_Id" property="subLabelId" jdbcType="BIGINT" />
<result column="first_Classify_Id" property="firstClassifyId" jdbcType="BIGINT" />
<result column="second_Classify_Id" property="secondClassifyId" jdbcType="BIGINT" />
<result column="third_Classify_Id" property="thirdClassifyId" jdbcType="BIGINT" />
<result column="book_classify_id" property="bookClassifyId" jdbcType="BIGINT" />
<result column="ip" property="ip" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
......@@ -23,7 +24,7 @@
</resultMap>
<sql id="Base_Column_List" >
id, book_adviser_id, isbn, user_id, province, province_code, city, city_code, district,
district_code, gra_Label__id, sub_Label_Id, first_Classify_Id, second_Classify_Id,
district_code, gra_Label__id, sub_Label_Id, first_Classify_Id, second_Classify_Id, third_Classify_Id,
book_classify_id, ip, create_time, update_time
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
......@@ -120,14 +121,16 @@
user_id, province, province_code,
city, city_code, district,
district_code, gra_Label__id, sub_Label_Id,
first_Classify_Id, second_Classify_Id, book_classify_id,
first_Classify_Id, second_Classify_Id, third_Classify_Id,
book_classify_id,
ip, create_time, update_time, book_name, agent_id, book_id, adviser_id
)
values (#{id,jdbcType=BIGINT}, #{bookAdviserId,jdbcType=BIGINT}, #{isbn,jdbcType=VARCHAR},
#{userId,jdbcType=BIGINT}, #{province,jdbcType=VARCHAR}, #{provinceCode,jdbcType=VARCHAR},
#{city,jdbcType=VARCHAR}, #{cityCode,jdbcType=VARCHAR}, #{district,jdbcType=VARCHAR},
#{districtCode,jdbcType=VARCHAR}, #{graLabelId,jdbcType=BIGINT}, #{subLabelId,jdbcType=BIGINT},
#{firstClassifyId,jdbcType=BIGINT}, #{secondClassifyId,jdbcType=BIGINT}, #{bookClassifyId,jdbcType=BIGINT},
#{firstClassifyId,jdbcType=BIGINT}, #{secondClassifyId,jdbcType=BIGINT}, #{thirdClassifyId},
#{bookClassifyId,jdbcType=BIGINT},
#{ip,jdbcType=VARCHAR}, now(), now(), #{bookName}, #{agentId}, #{bookId}, #{adviserId}
)
on duplicate key
......@@ -140,6 +143,7 @@
sub_Label_Id = #{subLabelId,jdbcType=BIGINT},
first_Classify_Id = #{firstClassifyId,jdbcType=BIGINT},
second_Classify_Id = #{secondClassifyId,jdbcType=BIGINT},
third_Classify_Id = #{thirdClassifyId,jdbcType=BIGINT},
book_classify_id = #{bookClassifyId,jdbcType=BIGINT},
ip = #{ip,jdbcType=VARCHAR},
book_name = #{bookName},
......@@ -191,6 +195,9 @@
<if test="secondClassifyId != null" >
second_Classify_Id,
</if>
<if test="thirdClassifyId != null" >
third_Classify_Id,
</if>
<if test="bookClassifyId != null" >
book_classify_id,
</if>
......@@ -247,6 +254,9 @@
<if test="secondClassifyId != null" >
#{secondClassifyId,jdbcType=BIGINT},
</if>
<if test="thirdClassifyId != null" >
#{thirdClassifyId,jdbcType=BIGINT},
</if>
<if test="bookClassifyId != null" >
#{bookClassifyId,jdbcType=BIGINT},
</if>
......@@ -303,6 +313,9 @@
<if test="secondClassifyId != null" >
second_Classify_Id = #{secondClassifyId,jdbcType=BIGINT},
</if>
<if test="thirdClassifyId != null" >
third_Classify_Id = #{thirdClassifyId,jdbcType=BIGINT},
</if>
<if test="bookClassifyId != null" >
book_classify_id = #{bookClassifyId,jdbcType=BIGINT},
</if>
......@@ -333,6 +346,7 @@
sub_Label_Id = #{subLabelId,jdbcType=BIGINT},
first_Classify_Id = #{firstClassifyId,jdbcType=BIGINT},
second_Classify_Id = #{secondClassifyId,jdbcType=BIGINT},
third_Classify_Id = #{thirdClassifyId,jdbcType=BIGINT},
book_classify_id = #{bookClassifyId,jdbcType=BIGINT},
ip = #{ip,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
......
......@@ -15,6 +15,7 @@
<result column="book_name" property="bookName" jdbcType="VARCHAR"/>
<result column="TEMPLET_ID" property="templetId" jdbcType="BIGINT"/>
<result column="SECOND_TEMPLET_ID" property="secondTempletId" jdbcType="BIGINT"/>
<result column="third_TEMPLET_ID" property="thirdTempletId" jdbcType="BIGINT"/>
<result column="GRA_LABEL_ID" property="graLabelId" jdbcType="BIGINT"/>
<result column="SUB_LABEL_ID" property="subLabelId" jdbcType="BIGINT"/>
<result column="VER_LABEL_ID" property="verLabelId" jdbcType="BIGINT"/>
......@@ -53,6 +54,7 @@
c.group_qrcode_url,
a.TEMPLET_ID,
a.SECOND_TEMPLET_ID,
a.third_TEMPLET_ID,
a.GRA_LABEL_ID,
a.SUB_LABEL_ID,
a.VER_LABEL_ID,
......@@ -196,6 +198,7 @@
c.group_qrcode_url,
a.TEMPLET_ID,
a.SECOND_TEMPLET_ID,
a.third_templet_id,
a.GRA_LABEL_ID,
a.SUB_LABEL_ID,
a.VER_LABEL_ID,
......
......@@ -77,6 +77,9 @@
<if test="secondClassify != null">
and c.second_classify = #{secondClassify}
</if>
<if test="thirdClassify != null">
and c.third_classify = #{thirdClassify}
</if>
<if test="gradeLabelId != null">
and c.grade_label_id = #{gradeLabelId}
</if>
......@@ -240,6 +243,7 @@
c.create_time AS createTime,
c.first_classify AS firstClassify,
c.second_classify AS secondClassify,
c.third_classify as thirdClassify,
c.grade_label_id AS gradeLabelId,
c.subject_label_id AS subjectLabelId,
c.rights_classify_id AS rightsClassifyId,
......
......@@ -9,6 +9,7 @@
<result column="count" property="count" jdbcType="INTEGER" />
<result column="first_classify" property="firstClassify" jdbcType="BIGINT" />
<result column="second_classify" property="secondClassify" jdbcType="BIGINT" />
<result column="third_classify" property="thirdClassify" jdbcType="BIGINT" />
<result column="grade_label_id" property="gradeLabelId" jdbcType="BIGINT" />
<result column="subject_label_id" property="subjectLabelId" jdbcType="BIGINT" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
......@@ -42,6 +43,7 @@
<result column="count" property="count" jdbcType="INTEGER" />
<result column="first_classify" property="firstClassify" jdbcType="BIGINT" />
<result column="second_classify" property="secondClassify" jdbcType="BIGINT" />
<result column="third_classify" property="thirdClassify" jdbcType="BIGINT" />
<result column="grade_label_id" property="gradeLabelId" jdbcType="BIGINT" />
<result column="subject_label_id" property="subjectLabelId" jdbcType="BIGINT" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
......@@ -69,7 +71,7 @@
</collection>
</resultMap>
<sql id="Base_Column_List" >
id,rights_number, introduce, detail, count, first_classify, second_classify, grade_label_id, subject_label_id,
id,rights_number, introduce, detail, count, first_classify, second_classify, third_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, vol_label_id,
reading_guide,guide_title,guide_type,guide_id,guide_pic,ver_label_id, show_state, agent_id, guide_link_url,
......@@ -77,14 +79,14 @@
</sql>
<sql id="Base_Column_List_own" >
r.id,r.rights_number, r.introduce, r.detail, r.count, r.first_classify, r.second_classify, r.grade_label_id, r.subject_label_id,
r.id,r.rights_number, r.introduce, r.detail, r.count, r.first_classify, r.second_classify, r.third_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
,r.online_course_open,r.learning_tool_open,r.draw_open,r.read_type_title,r.vol_label_id,r.ver_label_id, r.show_state,
r.update_user_id, r.update_user_id
</sql>
<sql id="Base_Column_List_1" >
r.id,r.rights_number, r.introduce, r.detail, r.count, r.first_classify, r.second_classify, r.grade_label_id, r.subject_label_id,
r.id,r.rights_number, r.introduce, r.detail, r.count, r.first_classify, r.second_classify,r.third_classify, r.grade_label_id, r.subject_label_id,
r.create_time, r.update_time, r.enable_group_service, r.rights_setting_type, b.book_id
,r.online_course_open,r.learning_tool_open,r.draw_open,r.read_type_title,r.vol_label_id,r.ver_label_id, r.update_user_id, r.update_user_id
</sql>
......@@ -101,13 +103,13 @@
</delete>
<insert id="insert" parameterType="com.pcloud.book.rightsSetting.entity.RightsSetting" useGeneratedKeys="true" keyProperty="id">
insert into rights_setting (rights_number,introduce, detail,
count, first_classify, second_classify,
count, first_classify, second_classify,third_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, vol_label_id,
reading_guide,guide_title,guide_type,guide_id,guide_pic,ver_label_id, agent_id, guide_link_url,create_user_id)
values ( #{rightsNumber,jdbcType=VARCHAR}, #{introduce,jdbcType=VARCHAR}, #{detail,jdbcType=VARCHAR},
#{count,jdbcType=INTEGER}, #{firstClassify,jdbcType=BIGINT}, #{secondClassify,jdbcType=BIGINT},
#{count,jdbcType=INTEGER}, #{firstClassify,jdbcType=BIGINT}, #{secondClassify,jdbcType=BIGINT},#{thirdClassify},
#{gradeLabelId,jdbcType=BIGINT}, #{subjectLabelId,jdbcType=BIGINT}, now(),
now(), #{enableGroupService}, #{rightsSettingType}, #{bookId},
#{onlineCourseOpen},#{learningToolOpen},#{drawNowOpen},#{readTypeTitle}, #{volLabelId},
......@@ -134,6 +136,9 @@
<if test="secondClassify != null" >
second_classify = #{secondClassify,jdbcType=BIGINT},
</if>
<if test="thirdClassify != null">
third_classify = #{thirdClassify}
</if>
<if test="gradeLabelId != null" >
grade_label_id = #{gradeLabelId,jdbcType=BIGINT},
</if>
......@@ -204,6 +209,7 @@
count = #{count,jdbcType=INTEGER},
first_classify = #{firstClassify,jdbcType=BIGINT},
second_classify = #{secondClassify,jdbcType=BIGINT},
third_classify = #{thirdClassify},
grade_label_id = #{gradeLabelId,jdbcType=BIGINT},
subject_label_id = #{subjectLabelId,jdbcType=BIGINT},
update_time = now(),
......@@ -238,6 +244,9 @@
<if test="secondClassify != null">
and second_classify = #{secondClassify}
</if>
<if test="thirdClassify != null">
and third_classify = #{thirdClassify}
</if>
<if test="gradeLabelId != null">
and grade_label_id = #{gradeLabelId}
</if>
......@@ -268,7 +277,7 @@
<select id="listBookRightsSettingPage" parameterType="map" resultMap="DtoResultMap4Book">
select
r.id,r.rights_number, r.introduce, r.detail, r.count, r.first_classify, r.second_classify, r.grade_label_id, r.subject_label_id,
r.id,r.rights_number, r.introduce, r.detail, r.count, r.first_classify, r.second_classify, r.third_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.vol_label_id,
r.ver_label_id, r.show_state,
b.isbn,
......@@ -297,6 +306,9 @@
<if test="secondClassify != null">
and a.SECOND_TEMPLET_ID = #{secondClassify}
</if>
<if test="thirdClassify != null">
and a.third_templet_id = #{thirdClassify}
</if>
<if test="gradeLabelId != null">
and a.GRA_LABEL_ID = #{gradeLabelId}
</if>
......@@ -326,6 +338,9 @@
<if test="secondClassify != null">
and second_classify = #{secondClassify}
</if>
<if test="thirdClassify != null">
and third_classify = #{thirdClassify}
</if>
<if test="gradeLabelId != null">
and grade_label_id = #{gradeLabelId}
</if>
......
......@@ -22,6 +22,7 @@
<result column="is_delete" property="isDelete" jdbcType="BIT" />
<result column="first_classify" property="firstClassify" jdbcType="BIGINT" />
<result column="second_classify" property="secondClassify" jdbcType="BIGINT" />
<result column="third_classify" property="thirdClassify" jdbcType="BIGINT" />
<result column="grade_label_id" property="gradeLabelId" jdbcType="BIGINT" />
<result column="subject_label_id" property="subjectLabelId" jdbcType="BIGINT" />
<result column="media_id" property="mediaId" jdbcType="VARCHAR"/>
......@@ -31,7 +32,7 @@
id, name, description, join_type, group_pic, pro_label_id, dep_label_id,
pur_label_id, book_group_classify_id,
create_time, create_user, update_time, update_user, is_delete,
first_classify, second_classify, grade_label_id, subject_label_id,media_id, agent_id
first_classify, second_classify, third_classify, grade_label_id, subject_label_id,media_id, agent_id
</sql>
<update id="batchUpdateClassify" parameterType="map">
......@@ -39,6 +40,7 @@
SET
first_classify = #{firstClassify,jdbcType=BIGINT},
second_classify = #{secondClassify,jdbcType=BIGINT},
third_classify = #{thirdClassify},
grade_label_id = #{gradeLabelId,jdbcType=BIGINT},
subject_label_id = #{subjectLabelId,jdbcType=BIGINT},
update_time=NOW()
......@@ -97,6 +99,9 @@
<if test="secondClassify != null">
and second_classify = #{secondClassify}
</if>
<if test="thirdClassify != null">
and third_classify = #{thirdClassify}
</if>
<if test="gradeLabelId != null">
and grade_label_id = #{gradeLabelId}
</if>
......@@ -127,6 +132,7 @@
b.classify AS classifyName,
a.first_classify AS firstClassify,
a.second_classify AS secondClassify,
a.third_classify AS thirdClassify,
a.grade_label_id AS gradeLabelId,
a.subject_label_id AS subjectLabelId,
a.number,
......@@ -164,6 +170,9 @@
<if test="secondClassify != null">
and a.second_classify = #{secondClassify}
</if>
<if test="thirdClassify != null">
and a.third_classify = #{thirdClassify}
</if>
<if test="gradeLabelId != null">
and a.grade_label_id = #{gradeLabelId}
</if>
......@@ -253,6 +262,7 @@
c.book_group_id bookGroupId,
a.first_classify AS firstClassify,
a.second_classify AS secondClassify,
a.third_classify as thirdClassify,
a.grade_label_id AS gradeLabelId,
a.subject_label_id AS subjectLabelId,
d.related_book_group_id AS relatedBookGroupId,
......@@ -276,6 +286,9 @@
<if test="secondClassify != null">
and a.second_classify = #{secondClassify}
</if>
<if test="thirdClassify != null">
and a.third_classify = #{thirdClassify}
</if>
<if test="gradeLabelId != null">
and a.grade_label_id = #{gradeLabelId}
</if>
......@@ -313,6 +326,7 @@
b.classify AS groupName,
a.first_classify,
a.second_classify,
a.third_classify,
a.grade_label_id,
a.subject_label_id,
a.is_show,
......@@ -339,6 +353,7 @@
c.book_group_id bookGroupId,
a.first_classify AS firstClassify,
a.second_classify AS secondClassify,
a.third_classify as thirdClassify,
a.grade_label_id AS gradeLabelId,
a.subject_label_id AS subjectLabelId,
'GROUP' as serveType,
......@@ -373,6 +388,7 @@
c.book_group_id bookGroupId,
a.first_classify AS firstClassify,
a.second_classify AS secondClassify,
a.third_classify as thirdClassify,
a.grade_label_id AS gradeLabelId,
a.subject_label_id AS subjectLabelId,
IFNULL(case c.price when a.group_type = 1 then 0 else c.price END, 0) price,
......@@ -412,6 +428,7 @@
null bookGroupId,
a.first_classify AS firstClassify,
a.second_classify AS secondClassify,
a.third_classify as thirdClassify,
a.grade_label_id AS gradeLabelId,
a.subject_label_id AS subjectLabelId,
c.price AS price,
......@@ -446,6 +463,7 @@
c.book_group_id bookGroupId,
a.first_classify AS firstClassify,
a.second_classify AS secondClassify,
a.third_classify as thirdClassify,
a.grade_label_id AS gradeLabelId,
a.subject_label_id AS subjectLabelId
FROM
......@@ -460,6 +478,9 @@
<if test="secondClassify != null">
and a.second_classify = #{secondClassify}
</if>
<if test="thirdClassify != null">
and a.third_classify = #{thirdClassify}
</if>
<if test="gradeLabelId != null">
and a.grade_label_id = #{gradeLabelId}
</if>
......@@ -476,13 +497,13 @@
description, join_type, group_pic, pro_label_id, dep_label_id,
pur_label_id, book_group_classify_id, create_time,
create_user, update_time, update_user,
is_delete, first_classify, second_classify, grade_label_id, subject_label_id,number,
is_delete, first_classify, second_classify, third_classify, grade_label_id, subject_label_id,number,
group_type,group_extLink, agent_id)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
#{desc,jdbcType=VARCHAR}, #{joinType,jdbcType=INTEGER}, #{groupPic,jdbcType=VARCHAR}, #{proLabelId,jdbcType=INTEGER}, #{depLabelId,jdbcType=INTEGER},
#{purLabelId,jdbcType=INTEGER}, #{bookGroupClassifyId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{createUser,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER},
#{isDelete,jdbcType=BIT}, #{firstClassify,jdbcType=BIGINT}, #{secondClassify,jdbcType=BIGINT},
#{isDelete,jdbcType=BIT}, #{firstClassify,jdbcType=BIGINT}, #{secondClassify,jdbcType=BIGINT}, #{thirdClassify},
#{gradeLabelId,jdbcType=BIGINT}, #{subjectLabelId,jdbcType=BIGINT}, #{number,jdbcType=BIGINT},
#{groupType,jdbcType=BIGINT}, #{groupExtLink,jdbcType=VARCHAR}, #{agentId})
</insert>
......@@ -545,6 +566,7 @@
</if>
first_classify = #{firstClassify,jdbcType=BIGINT},
second_classify = #{secondClassify,jdbcType=BIGINT},
third_classify = #{thirdClassify},
grade_label_id = #{gradeLabelId,jdbcType=BIGINT},
subject_label_id = #{subjectLabelId,jdbcType=BIGINT},
</set>
......@@ -567,6 +589,7 @@
is_delete = #{isDelete,jdbcType=BIT},
first_classify = #{firstClassify,jdbcType=BIGINT},
second_classify = #{secondClassify,jdbcType=BIGINT},
third_classify = #{thirdClassify},
grade_label_id = #{gradeLabelId,jdbcType=BIGINT},
subject_label_id = #{subjectLabelId,jdbcType=BIGINT},
is_show = #{isShow,jdbcType=BIT},
......@@ -600,6 +623,7 @@
c.book_group_id bookGroupId,
a.first_classify AS firstClassify,
a.second_classify AS secondClassify,
a.third_classify as thirdClassify,
a.grade_label_id AS gradeLabelId,
a.subject_label_id AS subjectLabelId,
c.price,
......@@ -620,6 +644,9 @@
<if test="secondClassify != null">
and a.second_classify = #{secondClassify}
</if>
<if test="thirdClassify != null">
and a.third_classify = #{thirdClassify}
</if>
<if test="gradeLabelId != null">
and a.grade_label_id = #{gradeLabelId}
</if>
......@@ -654,6 +681,7 @@
c.book_group_id bookGroupId,
a.first_classify AS firstClassify,
a.second_classify AS secondClassify,
a.third_classify as thirdClassify,
a.grade_label_id AS gradeLabelId,
a.subject_label_id AS subjectLabelId,
c.price,
......@@ -692,6 +720,7 @@
b.classify AS classifyName,
a.first_classify AS firstClassify,
a.second_classify AS secondClassify,
a.third_classify as thirdClassify,
a.grade_label_id AS gradeLabelId,
a.subject_label_id AS subjectLabelId,
a.number,
......
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