Commit a174414d by 阮思源

Merge branch 'zyj-1002283' into 'master'

1002283

See merge request rays/pcloud-book!358
parents ce8e32ea f5320b36
...@@ -617,6 +617,10 @@ public class BookDto extends BaseDto { ...@@ -617,6 +617,10 @@ public class BookDto extends BaseDto {
* 是否已下印 * 是否已下印
*/ */
private Boolean isPrint; private Boolean isPrint;
/**
* 是否配置了个人号关键词
*/
private Boolean hasRobotKeyword;
public String getQrRemark() { public String getQrRemark() {
return qrRemark; return qrRemark;
...@@ -1646,6 +1650,14 @@ public class BookDto extends BaseDto { ...@@ -1646,6 +1650,14 @@ public class BookDto extends BaseDto {
this.isPrint = isPrint; this.isPrint = isPrint;
} }
public Boolean getHasRobotKeyword() {
return hasRobotKeyword;
}
public void setHasRobotKeyword(Boolean hasRobotKeyword) {
this.hasRobotKeyword = hasRobotKeyword;
}
@Override @Override
public String toString() { public String toString() {
return "BookDto{" + return "BookDto{" +
...@@ -1769,6 +1781,8 @@ public class BookDto extends BaseDto { ...@@ -1769,6 +1781,8 @@ public class BookDto extends BaseDto {
", areaLabelId=" + areaLabelId + ", areaLabelId=" + areaLabelId +
", agentIncome=" + agentIncome + ", agentIncome=" + agentIncome +
", adviserIncome=" + adviserIncome + ", adviserIncome=" + adviserIncome +
"} " + super.toString(); ", isPrint=" + isPrint +
", hasRobotKeyword=" + hasRobotKeyword +
'}';
} }
} }
...@@ -100,6 +100,7 @@ import com.pcloud.book.group.vo.UserBookInfoItemVO; ...@@ -100,6 +100,7 @@ import com.pcloud.book.group.vo.UserBookInfoItemVO;
import com.pcloud.book.group.vo.UserBookInfoVO; import com.pcloud.book.group.vo.UserBookInfoVO;
import com.pcloud.book.group.vo.WxGroupStatisticVO; import com.pcloud.book.group.vo.WxGroupStatisticVO;
import com.pcloud.book.keywords.biz.BookKeywordBiz; import com.pcloud.book.keywords.biz.BookKeywordBiz;
import com.pcloud.book.keywords.biz.SelfRobotKeywordBiz;
import com.pcloud.book.keywords.dao.BookKeywordDao; import com.pcloud.book.keywords.dao.BookKeywordDao;
import com.pcloud.book.keywords.dto.KeywordDTO; import com.pcloud.book.keywords.dto.KeywordDTO;
import com.pcloud.book.keywords.enums.ReplyTypeEnum; import com.pcloud.book.keywords.enums.ReplyTypeEnum;
...@@ -314,6 +315,8 @@ public class BookGroupBizImpl implements BookGroupBiz { ...@@ -314,6 +315,8 @@ public class BookGroupBizImpl implements BookGroupBiz {
private ResourceConsr resourceConsr; private ResourceConsr resourceConsr;
@Autowired @Autowired
private ReadingUserDao readingUserDao; private ReadingUserDao readingUserDao;
@Autowired
private SelfRobotKeywordBiz selfRobotKeywordBiz;
private static final ThreadPoolExecutor PLATFORM_STATISTICS_EXPORT_THREAD = new ThreadPoolExecutor(2, 2, private static final ThreadPoolExecutor PLATFORM_STATISTICS_EXPORT_THREAD = new ThreadPoolExecutor(2, 2,
0, TimeUnit.SECONDS, new LinkedBlockingQueue<>(), 0, TimeUnit.SECONDS, new LinkedBlockingQueue<>(),
...@@ -865,6 +868,8 @@ public class BookGroupBizImpl implements BookGroupBiz { ...@@ -865,6 +868,8 @@ public class BookGroupBizImpl implements BookGroupBiz {
//好友数量 //好友数量
Integer friendsCount = bookGroupCipherUserDao.getFriendsCountByBookGroup(bookGroupId); Integer friendsCount = bookGroupCipherUserDao.getFriendsCountByBookGroup(bookGroupId);
bookDto.setFriendsCount(friendsCount); bookDto.setFriendsCount(friendsCount);
Boolean hasRobotKeyword = selfRobotKeywordBiz.hasKeyword(bookGroupId);
bookDto.setHasRobotKeyword(hasRobotKeyword);
} }
return pageBean; return pageBean;
} }
......
...@@ -43,4 +43,8 @@ public interface SelfRobotKeywordBiz { ...@@ -43,4 +43,8 @@ public interface SelfRobotKeywordBiz {
PageBeanNew<SelfRobotBookRecordDTO> getSelfRobotBookRecordList(Integer currentPage, Integer numPerPage); PageBeanNew<SelfRobotBookRecordDTO> getSelfRobotBookRecordList(Integer currentPage, Integer numPerPage);
void exportSelfRobotBookRecord(Long partyId); void exportSelfRobotBookRecord(Long partyId);
Boolean hasKeyword (Long bookGroupId);
SelfRobotKeyword getById(Long id);
} }
...@@ -545,6 +545,26 @@ public class SelfRobotKeywordBizImpl implements SelfRobotKeywordBiz { ...@@ -545,6 +545,26 @@ public class SelfRobotKeywordBizImpl implements SelfRobotKeywordBiz {
return list; return list;
} }
@Override
public Boolean hasKeyword(Long bookGroupId) {
List<SelfRobotKeyword> list = selfRobotKeywordDao.getListByBookGroupId(bookGroupId);
if (ListUtils.isEmpty(list)){
return false;
}else {
return true;
}
}
@Override
public SelfRobotKeyword getById(Long id) {
SelfRobotKeyword keyword = selfRobotKeywordDao.getById(id);
if (null == keyword){
return new SelfRobotKeyword();
}
fillSelfRobotKeyword(Arrays.asList(keyword));
return keyword;
}
@ParamLog("填充列表") @ParamLog("填充列表")
private void fillSelfRobotKeyword(List<SelfRobotKeyword> selfRobotKeywords) { private void fillSelfRobotKeyword(List<SelfRobotKeyword> selfRobotKeywords) {
if (ListUtils.isEmpty(selfRobotKeywords)){ if (ListUtils.isEmpty(selfRobotKeywords)){
......
...@@ -133,4 +133,8 @@ public interface SelfRobotKeywordFacade { ...@@ -133,4 +133,8 @@ public interface SelfRobotKeywordFacade {
@ApiOperation("书刊信息收录导出") @ApiOperation("书刊信息收录导出")
@GetMapping("exportSelfRobotBookRecord") @GetMapping("exportSelfRobotBookRecord")
ResponseDto<?> exportSelfRobotBookRecord(@RequestHeader("token") String token) throws BizException, PermissionException; ResponseDto<?> exportSelfRobotBookRecord(@RequestHeader("token") String token) throws BizException, PermissionException;
@ApiOperation("getById")
@GetMapping("getById")
ResponseDto<?> getById(String token, Long id);
} }
...@@ -199,4 +199,11 @@ public class SelfRobotKeywordFacadeImpl implements SelfRobotKeywordFacade { ...@@ -199,4 +199,11 @@ public class SelfRobotKeywordFacadeImpl implements SelfRobotKeywordFacade {
selfRobotKeywordBiz.exportSelfRobotBookRecord(partyId); selfRobotKeywordBiz.exportSelfRobotBookRecord(partyId);
return new ResponseDto<>(); return new ResponseDto<>();
} }
@Override
@GetMapping("getById")
public ResponseDto<?> getById(@RequestHeader("token") String token, @RequestParam("id") Long id) {
return new ResponseDto<>(selfRobotKeywordBiz.getById(id));
}
} }
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