Commit 51129de7 by 郑勇

feat: [1005965] 编辑端新手引导

parent e2177025
......@@ -854,6 +854,23 @@ public class BookDto extends BaseDto {
*/
private Integer isJumpBook;
/**
* 是否案例书刊 1-案例书刊
*/
private Integer appointBook;
public Integer getAppointBook() {
return appointBook;
}
public void setAppointBook(Integer appointBook) {
this.appointBook = appointBook;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
public Integer getIsJumpBook() {
return isJumpBook;
}
......@@ -2588,6 +2605,7 @@ public class BookDto extends BaseDto {
", openCatalogPermission=" + openCatalogPermission +
", qrcodeType='" + qrcodeType + '\'' +
", bookAdviserDto=" + bookAdviserDto +
", appointBook=" + appointBook +
'}';
}
}
......@@ -286,6 +286,19 @@ public class Book extends BaseEntity {
*/
private Integer forceUpdateSerialNumber;
/**
* 是否新手引导创建书刊
*/
private Boolean guideCreate;
public Boolean getGuideCreate() {
return guideCreate;
}
public void setGuideCreate(Boolean guideCreate) {
this.guideCreate = guideCreate;
}
public String getServeType() {
return serveType;
}
......
......@@ -185,7 +185,7 @@ public interface BookBiz {
* @return
* @throws BizException
*/
PageBean getListPage4Adviser(Map<String, Object> paramMap, PageParam pageParam, Long adviserId, Integer hasQrcode) throws BizException;
PageBean getListPage4Adviser(Map<String, Object> paramMap, PageParam pageParam, Long adviserId, Integer hasQrcode,Integer appointBook) throws BizException;
/**
* 首页展示正在做的图书
......@@ -806,4 +806,19 @@ public interface BookBiz {
PageBean listAdviserBook(AviserBookInfoParam aviserBookInfoParam);
void exportListPage4Agent(Map<String, Object> paramMap, Long agentId, Long partyId, String systemCode);
/**
* 获取指定展示书刊(新手引导)
*/
List<Object> getAppointBooks(Long adviserId, Long channelId);
/**
* 移除展示书刊(新手引导)
*/
void removeGuideBook(Long adviserId, Long bookId);
/**
* 超过10人扫码书刊(新手引导)
*/
BookDto getOver10ScanBook(Long adviserId);
}
......@@ -79,6 +79,7 @@ import com.pcloud.book.rightsSetting.dao.RightsNowItemDao;
import com.pcloud.book.rightsSetting.mapper.RightsSettingBookRelationMapper;
import com.pcloud.book.util.common.ThreadPoolUtils;
import com.pcloud.book.util.common.YesOrNoEnums;
import com.pcloud.channelcenter.catalog.dto.NoviceGuideCreateDTO;
import com.pcloud.channelcenter.qrcode.dto.QrcodeLocationDto;
import com.pcloud.channelcenter.qrcode.dto.QrcodeSceneDto;
import com.pcloud.channelcenter.qrcode.entity.QrcodeLabel;
......@@ -277,6 +278,11 @@ public class BookBizImpl implements BookBiz {
private ResourcePageItemDao resourcePageItemDao;
@Autowired
private AdviserTaskConsr adviserTaskConsr;
@Value("${appointBookIds}")
private List<Long> appointBookIds;
@Autowired
private NoviceGuideDeleteDao noviceGuideDeleteDao;
/**
* 创建书籍,同时建立与编辑的推广关系
*/
......@@ -886,9 +892,32 @@ public class BookBizImpl implements BookBiz {
* 获取书籍列表(编辑)
*/
@Override
public PageBean getListPage4Adviser(Map<String, Object> paramMap, PageParam pageParam, Long adviserId, Integer hasQrcode) throws BizException {
public PageBean getListPage4Adviser(Map<String, Object> paramMap, PageParam pageParam, Long adviserId, Integer hasQrcode,Integer appointBook) throws BizException {
LOGGER.info("【书籍应用】获取书籍列表,<START>.[paramMap]=" + paramMap);
PageBean pageBean = bookDao.listPage(pageParam, paramMap, "getListPage4Adviser");
PageBean pageBean=bookDao.listPage(pageParam, paramMap, "getListPage4Adviser");
LOGGER.info("appointBook=" + appointBook);
if (null != appointBook) {
//全是案列书,编辑可以自行删除决定不展示
List<Long> selectBookIds=new ArrayList<>(appointBookIds);
LOGGER.info("【书籍应用】内置书刊列表,<START>.[selectBookIds]=" + selectBookIds);
if(CollUtil.isNotEmpty(selectBookIds)){
//编辑自行删除的案例书
List<Long> deleteBookIds=noviceGuideDeleteDao.getDeleteBookIds(adviserId);
//案列书确实属于改编辑的
List<Long> selfBookIds=bookAdviserDao.getSelfBookIds(adviserId,selectBookIds);
if(CollUtil.isNotEmpty(deleteBookIds)) {
selectBookIds.removeAll(deleteBookIds);
}
if(CollUtil.isNotEmpty(selectBookIds) && CollUtil.isNotEmpty(selfBookIds)) {
selectBookIds.removeAll(selfBookIds);
}
LOGGER.info("【书籍应用】内置书刊列表,<end>.[selectBookIds]=" + selectBookIds);
if (CollUtil.isNotEmpty(selectBookIds)){
paramMap.put("selectBookIds",selectBookIds);
pageBean = bookDao.listPage(pageParam, paramMap, "getListPage4AdviserAndAppoint");
}
}
}
if (pageBean == null || ListUtils.isEmpty(pageBean.getRecordList())) {
return new PageBean(0, 0, new ArrayList<>());
}
......@@ -1666,6 +1695,16 @@ public class BookBizImpl implements BookBiz {
book.setLastModifiedUser(book.getCreatedUser());
book.setBookId(bookDto.getBookId());
}
ThreadPoolUtils.OTHER_THREAD_POOL.execute(()->{
//新手引导创建的书。默认创建书刊目录和二维码
if(null!=book.getGuideCreate() && book.getGuideCreate()){
NoviceGuideCreateDTO noviceGuideCreateDTO=new NoviceGuideCreateDTO();
noviceGuideCreateDTO.setBookId(book.getBookId());
noviceGuideCreateDTO.setChannelId(book.getChannelId());
noviceGuideCreateDTO.setPartyId(book.getCreatedUser());
qrcodeSceneConsr.noviceGuideCreateQr(noviceGuideCreateDTO);
}
});
// 查看现代纸书是否存在
final BookGroupDTO dtoByBookId = bookGroupBiz.getDTOByBookId(book.getBookId(), book.getChannelId(), book.getCreatedUser());
// 新增图书与编辑关联关系
......@@ -4422,4 +4461,82 @@ public class BookBizImpl implements BookBiz {
}
return pageBean;
}
/**
* 获取指定展示书刊(新手引导)
*/
@Override
public List<Object> getAppointBooks(Long adviserId, Long channelId) {
//全是案列书,编辑可以自行删除决定不展示
List<Long> bookIds=appointBookIds;
if(CollUtil.isEmpty(bookIds)){
return new ArrayList<>();
}
List<Long> deleteBookIds=noviceGuideDeleteDao.getDeleteBookIds(adviserId);
if(CollUtil.isNotEmpty(deleteBookIds)) {
bookIds.removeAll(deleteBookIds);
}
List<Object> list = bookDao.getAppointBooks(channelId,bookIds);
if (CollUtil.isEmpty(list)) {
return new ArrayList<>();
}
// 填充渠道基础信息
bookSet.setChannelInfoList(list);
bookSet.setBookSvUvPv4Object(list, adviserId);
// 填充模板信息
bookSet.setTemplateName(list);
// 设置图书是否关联二维码
bookSet.setIsRelationQrcodeAndCount(list,adviserId);
//设置图书收益
bookSet.setBookIncome(list);
// 设置二维码相关信息
bookSet.setQrInfo(list);
//社群书相关信息
bookSet.setBookGroupInfo(list);
//设置书刊是否是小睿书(开启小睿流程)
bookSet.setOpenRobotProcess(list);
return list;
}
/**
* 移除展示书刊(新手引导)
*/
@Override
public void removeGuideBook(Long adviserId, Long bookId) {
NoviceGuideDelete build = NoviceGuideDelete.builder().adviserId(adviserId).bookId(bookId).build();
noviceGuideDeleteDao.insert(build);
}
@Override
public BookDto getOver10ScanBook(Long adviserId) {
int i=0;
while (true){
Map<String, Object> paramMap = Maps.newHashMap();
paramMap.put("adviserId", adviserId);
PageParam pageParam=new PageParam(i,10);
PageBean pageBean = bookDao.listPage(pageParam, paramMap, "getListPage4Adviser");
if (pageBean == null || ListUtils.isEmpty(pageBean.getRecordList())) {
return null;
}
// 设置图书扫码量读者量浏览量
bookSet.setBookSvUvPv4Object(pageBean.getRecordList(), adviserId);
List<Object> recordList = pageBean.getRecordList();
for (Object object : recordList) {
BookDto bookDto = (BookDto) object;
if(null!=bookDto.getScanCount() && bookDto.getScanCount()>10){
return bookDto;
}
}
i++;
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
if(i>10){
return null;
}
}
}
}
......@@ -348,4 +348,6 @@ public interface BookAdviserDao extends BaseDao<BookAdviser> {
void updateOpenRecommend(Long bookId, Long adviserId, Long channelId, Integer isOpenRecommend, Integer recommendFromType);
OpenRecommendVO getOpenRecommend(Long bookId, Long adviserId, Long channelId);
List<Long> getSelfBookIds(Long adviserId, List<Long> selectBookIds);
}
......@@ -386,4 +386,6 @@ public interface BookDao extends BaseDao<Book> {
boolean checkIsBookId(Long isbnNumber);
List<BookDto> listPage4Agent(Map<String, Object> paramMap);
List<Object> getAppointBooks(Long channelId, List<Long> bookIds);
}
package com.pcloud.book.book.dao;
import com.pcloud.book.book.entity.NoviceGuideDelete;
import com.pcloud.common.core.dao.BaseDao;
import java.util.List;
/**
* 新手引导案例书刊删除表(NoviceGuideDelete)表数据库访问层
*
* @author makejava
* @since 2021-11-22 11:50:51
*/
public interface NoviceGuideDeleteDao extends BaseDao<NoviceGuideDelete> {
List<Long> getDeleteBookIds(Long adviserId);
}
\ No newline at end of file
......@@ -524,4 +524,12 @@ public class BookAdviserDaoImpl extends BaseDaoImpl<BookAdviser> implements Book
paramMap.put("adviserId", adviserId);
return getSessionTemplate().selectOne(getStatement("getOpenRecommend"), paramMap);
}
@Override
public List<Long> getSelfBookIds(Long adviserId, List<Long> selectBookIds) {
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("adviserId",adviserId);
paramMap.put("selectBookIds", selectBookIds);
return getSessionTemplate().selectList(getStatement("getSelfBookIds"), paramMap);
}
}
......@@ -470,4 +470,12 @@ public class BookDaoImpl extends BaseDaoImpl<Book> implements BookDao {
public List<BookDto> listPage4Agent(Map<String, Object> paramMap) {
return getSessionTemplate().selectList(getStatement("listPage4Agent"), paramMap);
}
@Override
public List<Object> getAppointBooks(Long channelId, List<Long> bookIds) {
Map<String, Object> paramMap = Maps.newHashMap();
paramMap.put("channelId", channelId);
paramMap.put("bookIds", bookIds);
return getSessionTemplate().selectList(getStatement("getAppointBooks"), paramMap);
}
}
package com.pcloud.book.book.dao.impl;
import com.google.common.collect.Maps;
import com.pcloud.book.book.entity.NoviceGuideDelete;
import com.pcloud.book.book.dao.NoviceGuideDeleteDao;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Repository;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 新手引导案例书刊删除表(NoviceGuideDelete)表数据库访问层
*
* @author makejava
* @since 2021-11-22 11:50:51
*/
@Repository("noviceGuideDeleteDaoImpl")
public class NoviceGuideDeleteDaoImpl extends BaseDaoImpl<NoviceGuideDelete> implements NoviceGuideDeleteDao {
@Override
public List<Long> getDeleteBookIds(Long adviserId) {
Map<String, Object> map = Maps.newHashMap();
map.put("adviserId", adviserId);
return getSessionTemplate().selectList(getStatement("getDeleteBookIds"), map);
}
}
\ No newline at end of file
package com.pcloud.book.book.entity;
import java.util.Date;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.pcloud.common.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 新手引导案例书刊删除表(NoviceGuideDelete)实体类
*
* @author makejava
* @since 2021-11-22 11:50:51
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class NoviceGuideDelete extends BaseEntity {
private static final long serialVersionUID = 928702112675084581L;
@ApiModelProperty("主键id")
private Long id;
@ApiModelProperty("编辑id")
private Long adviserId;
@ApiModelProperty("书刊id")
private Long bookId;
@ApiModelProperty("创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
@ApiModelProperty("修改时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;
}
\ No newline at end of file
......@@ -179,7 +179,8 @@ public interface BookFacade {
@RequestParam(value = "areaLabelId", required = false) Integer areaLabelId,
@RequestParam(value = "graLabelId", required = false) Integer graLabelId,
@RequestParam(value = "subLabelId", required = false) Integer subLabelId,
@RequestParam(value = "verLabelId", required = false) Integer verLabelId)
@RequestParam(value = "verLabelId", required = false) Integer verLabelId,
@RequestParam(value = "appointBook", required = false) Integer appointBook)
throws BizException, PermissionException;
@ApiOperation(value = "首页获取正在做的图书", httpMethod = "GET")
......
......@@ -287,7 +287,8 @@ public class BookFacadeImpl implements BookFacade {
@RequestParam(value = "areaLabelId", required = false) Integer areaLabelId,
@RequestParam(value = "graLabelId", required = false) Integer graLabelId,
@RequestParam(value = "subLabelId", required = false) Integer subLabelId,
@RequestParam(value = "verLabelId", required = false) Integer verLabelId)
@RequestParam(value = "verLabelId", required = false) Integer verLabelId,
@RequestParam(value = "appointBook", required = false) Integer appointBook)
throws BizException, PermissionException {
Long adviserId = (Long) SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
if (currentPage == null || numPerPage == null || currentPage < 0 || numPerPage < 0) {
......@@ -331,7 +332,7 @@ public class BookFacadeImpl implements BookFacade {
paramMap.put("graLabelId", graLabelId);
paramMap.put("subLabelId", subLabelId);
paramMap.put("verLabelId", verLabelId);
PageBean pageBean = bookBiz.getListPage4Adviser(paramMap, new PageParam(currentPage, numPerPage), adviserId, hasQrcode);
PageBean pageBean = bookBiz.getListPage4Adviser(paramMap, new PageParam(currentPage, numPerPage), adviserId, hasQrcode,appointBook);
return new ResponseDto<>(pageBean);
}
......@@ -1452,4 +1453,38 @@ public class BookFacadeImpl implements BookFacade {
bookBiz.updateCoverImg(vo);
return new ResponseDto<>();
}
/**
* 获取指定展示书刊(新手引导)
*/
@RequestMapping(value = "getAppointBooks", method = RequestMethod.GET)
public ResponseDto<List<Object>> getAppointBooks( @RequestHeader("token") String token,
@RequestParam(value = "channelId", required = false) Long channelId)
throws BizException, PermissionException {
Long adviserId = (Long) SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
return new ResponseDto<>(bookBiz.getAppointBooks(adviserId, channelId));
}
/**
* 移除展示书刊(新手引导)
*/
@RequestMapping(value = "removeGuideBook", method = RequestMethod.GET)
public ResponseDto<?> removeGuideBook( @RequestHeader("token") String token,
@RequestParam(value = "bookId") Long bookId)
throws BizException, PermissionException {
Long adviserId = (Long) SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
bookBiz.removeGuideBook(adviserId, bookId);
return new ResponseDto<>();
}
/**
* 超过10人扫码书刊(新手引导)
*/
@RequestMapping(value = "getOver10ScanBook", method = RequestMethod.GET)
public ResponseDto<?> getOver10ScanBook( @RequestHeader("token") String token)
throws BizException, PermissionException {
Long adviserId = (Long) SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
return new ResponseDto<>(bookBiz.getOver10ScanBook(adviserId));
}
}
......@@ -1649,6 +1649,41 @@ public class BookSet {
}
}
/**
* 设置图书是否关联二维码和个数
*
* @param recordList (List<BookDto>)
*/
/* public void setIsRelationQrcodeAndCount(List<Object> recordList) {
LOGGER.info("设置图书关联二维码个数【START】");
if (ListUtils.isEmpty(recordList)) {
return;
}
List<Long> channelIds = BookTools.listChannelIds(recordList);
List<Long> bookIds = BookTools.listBookIds(recordList);
List<Long> adviserIds = BookTools.listAdviserIds(recordList);
Map<String, Long> bookQrCountMap = qrcodeSceneConsr.listBookQrCounts(bookIds, channelIds, adviserIds);
for (Object obj : recordList) {
BookDto bookDto = (BookDto) obj;
if (null != bookDto) {
String key = bookDto.getBookId() + "-" + bookDto.getChannelId() + "-" + bookDto.getAdviserId();
bookDto.setBookQrCount(0L);
bookDto.setRelationQrcode(false);
// 设置书籍二维码数
if (null != bookQrCountMap) {
Long count = bookQrCountMap.get(key);
if (count != null && count > 0) {
bookDto.setBookQrCount(count);
bookDto.setRelationQrcode(true);
}
}
LOGGER.info("设置图书关联二维码个数【END】");
}
}
}*/
@ParamLog(value = "设置父模板标识", isBefore = false)
public void setTempleParentId(BookDto bookDto) {
if (null != bookDto && null != bookDto.getTempletId()) {
......
......@@ -7,6 +7,8 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.pcloud.book.base.exception.BookBizException;
import com.pcloud.channelcenter.catalog.dto.NoviceGuideCreateDTO;
import com.pcloud.channelcenter.catalog.service.BookQrCatalogService;
import com.pcloud.channelcenter.qrcode.dto.BookDto;
import com.pcloud.channelcenter.qrcode.dto.BookSceneIdListDTO;
import com.pcloud.channelcenter.qrcode.dto.GroupQrcodeVO;
......@@ -77,6 +79,8 @@ public class QrcodeSceneConsr {
private QrcodeLocationAssocService qrcodeLocationAssocService;
@Autowired
private QrcodeTempService qrcodeTempService;
@Autowired
private BookQrCatalogService bookQrCatalogService;
/**
......@@ -649,6 +653,41 @@ public class QrcodeSceneConsr {
}
/**
* 获取书籍二维码个数
*/
public Map<String, Long> listBookQrCounts(List<Long> bookIds, List<Long> channelIds, List<Long> adviserIds)
throws BizException {
Map<String, Long> bookQrCount = new HashMap<>();
if (CollUtil.isEmpty(bookIds) || CollUtil.isEmpty(channelIds) || CollUtil.isEmpty(adviserIds)) {
return bookQrCount;
}
try {
Map<String, Object> idsMap = new HashMap<>();
idsMap.put("bookIds", bookIds);
idsMap.put("channelIds", channelIds);
idsMap.put("adviserIds", adviserIds);
ResponseEntity<ResponseDto<Map<String, Long>>> listBookQrCounts = qrcodeSceneService.listBookQrCounts(idsMap);
bookQrCount = ResponseHandleUtil.parseMap(listBookQrCounts, String.class, Long.class);
} catch (BizException e) {
LOGGER.warn("【二维码-渠道(消)】获取书籍二维码个数,<ERROR>.[qrcodeSceneService.deleteBook]:" + e.getMessage(), e);
throw new BizException(e.getCode(), e.getMessage());
} catch (Exception e) {
LOGGER.error("【二维码-渠道(消)】获取书籍二维码个数,<ERROR>.:" + e.getMessage(), e);
throw new BookBizException(BookBizException.INVOKE_CHANNEL_ERROR, "获取书籍二维码个数失败~!");
}
return bookQrCount;
}
public void noviceGuideCreateQr(NoviceGuideCreateDTO noviceGuideCreateDTO) {
LOGGER.info("新手引导创建书刊,noviceGuideCreateDTO={}",noviceGuideCreateDTO.toString());
try {
bookQrCatalogService.noviceGuideCreateQr(noviceGuideCreateDTO);
} catch (Exception e) {
LOGGER.error("新手引导创建书刊失败"+e.getMessage(), e);
}
}
/**
* 获取最近关联图书相关信息
* @param messageAssocBookAskInfoVOS
* @return
......
......@@ -1365,4 +1365,16 @@
limit 1
</select>
<select id="getSelfBookIds" parameterType="map" resultType="Long">
select distinct BOOK_ID
from book_adviser
where
adviser_id=#{adviserId}
and BOOK_ID in
<foreach collection="selectBookIds" separator="," open="(" close=")" index="index" item="item">
#{item}
</foreach>
and is_delete = 0
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pcloud.book.book.dao.impl.NoviceGuideDeleteDaoImpl">
<resultMap id="BaseResultMap" type="com.pcloud.book.book.entity.NoviceGuideDelete">
<id column="id" property="id" jdbcType="BIGINT"/>
<result column="adviser_id" property="adviserId" jdbcType="BIGINT"/>
<result column="book_id" property="bookId" jdbcType="BIGINT"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id, adviser_id, book_id, create_time, update_time
</sql>
<select id="getById" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM novice_guide_delete
WHERE id = #{id}
</select>
<select id="getList" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM novice_guide_delete
</select>
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
INSERT INTO novice_guide_delete(
adviser_id,
book_id,
create_time,
update_time
) VALUES (
#{adviserId, jdbcType=BIGINT},
#{bookId, jdbcType=BIGINT},
now(),
now()
)
</insert>
<insert id="batchInsert" keyProperty="id" useGeneratedKeys="true">
INSERT INTO novice_guide_delete (
adviser_id,
book_id,
create_time,
update_time
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.adviserId, jdbcType=BIGINT},
#{item.bookId, jdbcType=BIGINT},
now(),
now()
)
</foreach>
</insert>
<!--通过主键修改数据-->
<update id="update">
UPDATE novice_guide_delete
<set>
<if test="adviserId != null">
adviser_id = #{adviserId},
</if>
<if test="bookId != null">
book_id = #{bookId},
</if>
<if test="createTime != null">
create_time = #{createTime},
</if>
<if test="updateTime != null">
update_time = #{updateTime},
</if>
</set>
WHERE id = #{id}
</update>
<!--通过主键删除-->
<delete id="deleteById">
DELETE FROM novice_guide_delete WHERE id = #{id}
</delete>
<select id="getDeleteBookIds" parameterType="map" resultType="Long">
select distinct book_id
from novice_guide_delete
where adviser_id=#{adviserId}
</select>
</mapper>
\ No newline at end of file
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