Commit b36f4dc0 by zx1234zxcv2022

feature[1009603] 抖音书店

parent 0865bb47
...@@ -29,16 +29,23 @@ public enum MofangBookTypeEnum { ...@@ -29,16 +29,23 @@ public enum MofangBookTypeEnum {
/** /**
* 山东新鑫 * 山东新鑫
*/ */
SDXX(6) SDXX(6),
; /**
* 浙江教育出版社
*/
ZHE_JIANG(7),
/**
* 青岛
*/
QING_DAO(8);
public final Integer value; public final Integer value;
private MofangBookTypeEnum(Integer value) { private MofangBookTypeEnum(Integer value) {
this.value = value; this.value = value;
} }
public static final List<Integer> bjxyType= CollUtil.toList(BJXY.value,SJHY.value); public static final List<Integer> bjxyType= CollUtil.toList(BJXY.value,SJHY.value);
public static final List<Integer> zmbType=CollUtil.toList(WYWH.value, ZMB.value, QING_DAO.value);
public static final List<Integer> zmbType=CollUtil.toList(ZMB.value,WYWH.value); public static final List<Integer> sdxxType= CollUtil.toList(SDXX.value, ZHE_JIANG.value);
} }
...@@ -359,6 +359,6 @@ public interface BookService { ...@@ -359,6 +359,6 @@ public interface BookService {
@GetMapping("getMoFangSceneIds") @GetMapping("getMoFangSceneIds")
ResponseEntity<ResponseDto<List<Long>>> getMoFangSceneIds (@RequestParam(value = "mofangId") Long mofangId); ResponseEntity<ResponseDto<List<Long>>> getMoFangSceneIds (@RequestParam(value = "mofangId") Long mofangId);
@GetMapping("getMoFangSceneIdsByType") @PostMapping("getOneServeMoFangSceneIds")
ResponseEntity<ResponseDto<List<Long>>> getMoFangSceneIdsByType (@RequestParam(value = "type") Integer type); ResponseEntity<ResponseDto<List<Long>>> getOneServeMoFangSceneIds();
} }
...@@ -866,5 +866,5 @@ public interface BookBiz { ...@@ -866,5 +866,5 @@ public interface BookBiz {
*/ */
PageBeanNew<MoFangBookStoreDto> listBookStore(String keyWords, Integer currentPage, Integer numPerPage, Integer type, String ip); PageBeanNew<MoFangBookStoreDto> listBookStore(String keyWords, Integer currentPage, Integer numPerPage, Integer type, String ip);
List<Long> getMoFangSceneIdsByType(Integer type); List<Long> getOneServeMoFangSceneIds();
} }
...@@ -408,7 +408,9 @@ public class BookBizImpl implements BookBiz { ...@@ -408,7 +408,9 @@ public class BookBizImpl implements BookBiz {
@Autowired @Autowired
private BookBrowseRecordBiz bookBrowseRecordBiz; private BookBrowseRecordBiz bookBrowseRecordBiz;
private static final List<Integer> zouMuBaiTypeList = CollUtil.toList(3,4,6); private static final List<Integer> zouMuBaiTypeList = CollUtil.toList(3,4,6,7);
private static final List<Integer> zhejiangTypeList = CollUtil.toList(3,4,6,8);
/** /**
* 创建书籍,同时建立与编辑的推广关系 * 创建书籍,同时建立与编辑的推广关系
...@@ -4820,7 +4822,7 @@ public class BookBizImpl implements BookBiz { ...@@ -4820,7 +4822,7 @@ public class BookBizImpl implements BookBiz {
if(MofangBookTypeEnum.zmbType.contains(type)){ if(MofangBookTypeEnum.zmbType.contains(type)){
dealZmb(list); dealZmb(list);
} }
if (MofangBookTypeEnum.SDXX.value.equals(type)) { if (MofangBookTypeEnum.sdxxType.contains(type)) {
dealSDXX(list); dealSDXX(list);
} }
} }
...@@ -4961,7 +4963,7 @@ public class BookBizImpl implements BookBiz { ...@@ -4961,7 +4963,7 @@ public class BookBizImpl implements BookBiz {
if(null==mofangBook){ if(null==mofangBook){
return new ArrayList<>(); return new ArrayList<>();
} }
if(null!=mofangBook.getType() && zouMuBaiTypeList.contains(mofangBook.getType())){ if(null!=mofangBook.getType() && zhejiangTypeList.contains(mofangBook.getType())){
return bookDao.getZmbBookIds(mofangId); return bookDao.getZmbBookIds(mofangId);
} }
if(null!=mofangBook.getBookId()){ if(null!=mofangBook.getBookId()){
...@@ -4999,9 +5001,7 @@ public class BookBizImpl implements BookBiz { ...@@ -4999,9 +5001,7 @@ public class BookBizImpl implements BookBiz {
} }
@Override @Override
public List<Long> getMoFangSceneIdsByType(Integer type) { public List<Long> getOneServeMoFangSceneIds() {
Map<String, Object> paramMap = new HashMap<>(); return bookDao.getOneServeMoFangSceneIds();
paramMap.put("type",type);
return bookDao.getMoFangSceneIdsByType(type);
} }
} }
...@@ -418,5 +418,5 @@ public interface BookDao extends BaseDao<Book> { ...@@ -418,5 +418,5 @@ public interface BookDao extends BaseDao<Book> {
List<Long> getZmbSceneIds(Long mofangId); List<Long> getZmbSceneIds(Long mofangId);
List<Long> getMoFangSceneIdsByType(Integer type); List<Long> getOneServeMoFangSceneIds();
} }
...@@ -25,7 +25,6 @@ import com.pcloud.common.page.PageBean; ...@@ -25,7 +25,6 @@ import com.pcloud.common.page.PageBean;
import com.pcloud.common.page.PageParam; import com.pcloud.common.page.PageParam;
import com.pcloud.common.utils.ListForInSQL; import com.pcloud.common.utils.ListForInSQL;
import com.pcloud.common.utils.ListUtils; import com.pcloud.common.utils.ListUtils;
import io.swagger.models.auth.In;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.HashMap; import java.util.HashMap;
...@@ -557,9 +556,7 @@ public class BookDaoImpl extends BaseDaoImpl<Book> implements BookDao { ...@@ -557,9 +556,7 @@ public class BookDaoImpl extends BaseDaoImpl<Book> implements BookDao {
} }
@Override @Override
public List<Long> getMoFangSceneIdsByType(Integer type) { public List<Long> getOneServeMoFangSceneIds() {
Map<String, Object> paramMap = Maps.newHashMap(); return getSessionTemplate().selectList(getStatement("getOneServeMoFangSceneIds"));
paramMap.put("type", type);
return getSessionTemplate().selectList(getStatement("getMoFangSceneIdsByType"), paramMap);
} }
} }
...@@ -343,7 +343,7 @@ public class BookServiceImpl implements BookService { ...@@ -343,7 +343,7 @@ public class BookServiceImpl implements BookService {
} }
@Override @Override
public ResponseEntity<ResponseDto<List<Long>>> getMoFangSceneIdsByType(Integer type) { public ResponseEntity<ResponseDto<List<Long>>> getOneServeMoFangSceneIds() {
return ResponseHandleUtil.toResponse(bookBiz.getMoFangSceneIdsByType(type)); return ResponseHandleUtil.toResponse(bookBiz.getOneServeMoFangSceneIds());
} }
} }
...@@ -3522,7 +3522,7 @@ ...@@ -3522,7 +3522,7 @@
select select
scene_id scene_id
from mofang_zmb from mofang_zmb
where mofang_id = #{mofangId} and scene_id != null where mofang_id = #{mofangId} and scene_id is not null
</select> </select>
<select id="listBookStore" resultType="com.pcloud.book.book.vo.MoFangBookStoreDto"> <select id="listBookStore" resultType="com.pcloud.book.book.vo.MoFangBookStoreDto">
...@@ -3540,10 +3540,9 @@ ...@@ -3540,10 +3540,9 @@
ORDER BY checked DESC,id ASC ORDER BY checked DESC,id ASC
</select> </select>
<select id="getMoFangSceneIdsByType" parameterType="map" resultType="Long"> <select id="getOneServeMoFangSceneIds" parameterType="map" resultType="Long">
select select
scene_id scene_id
from mofang_scene from mofang_scene
where type = #{type}
</select> </select>
</mapper> </mapper>
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