Commit 78409807 by 朱亚洁

feat:[1003780]背单词小程序

parent c4ef8dbf
......@@ -61,4 +61,10 @@ public interface AppletService {
*/
@PostMapping("getList4Collect")
ResponseEntity<ResponseDto<List<ServeCollectDTO>>> getList4Collect(@RequestBody List<ServeCollectDTO> serveCollects);
@ApiOperation("查弹窗弹出次数")
@GetMapping("getPopupCount")
ResponseEntity<ResponseDto<Integer>> getPopupCount(@RequestParam("wechatUserId") Long wechatUserId,
@RequestParam("bookId") Long bookId,
@RequestParam("popupType") Integer popupType);
}
......@@ -11,6 +11,7 @@ import com.pcloud.book.applet.dto.AppletOuterBookDTO;
import com.pcloud.book.applet.dto.PcloudGroupActivityDTO;
import com.pcloud.book.applet.dto.ServeCollectDTO;
import com.pcloud.book.applet.service.AppletService;
import com.pcloud.book.rightsSetting.biz.RightsSettingBiz;
import com.pcloud.book.skill.biz.PcloudGroupActivityBiz;
import com.pcloud.book.skill.entity.PcloudGroupActivity;
import com.pcloud.common.dto.ResponseDto;
......@@ -56,6 +57,8 @@ public class AppletServiceImpl implements AppletService {
private AppletThirdResourcesStaticBiz appletThirdResourcesStaticBiz;
@Autowired
private ServeCollectBiz serveCollectBiz;
@Autowired
private RightsSettingBiz rightsSettingBiz;
@Override
......@@ -108,4 +111,12 @@ public class AppletServiceImpl implements AppletService {
public ResponseEntity<ResponseDto<List<ServeCollectDTO>>> getList4Collect(@RequestBody List<ServeCollectDTO> serveCollects) {
return ResponseHandleUtil.toResponse(serveCollectBiz.getList4Collect(serveCollects));
}
@Override
@GetMapping("getPopupCount")
public ResponseEntity<ResponseDto<Integer>> getPopupCount(@RequestParam("wechatUserId") Long wechatUserId,
@RequestParam("bookId") Long bookId,
@RequestParam("popupType") Integer popupType){
return ResponseHandleUtil.toResponse(rightsSettingBiz.getPopupCount(wechatUserId, bookId, popupType));
}
}
......@@ -200,4 +200,12 @@ public interface RightsSettingBiz {
AppletNewsDTO getAppletNewsDTO4UserReadBook(AppletUserBookcase userReadBook);
QrcodeMessage4WechatVO getRightsItemGroupsByBookGroup(Long bookGroupId, Long wechatUserId);
/**
* 查弹窗弹出次数
* @author:zhuyajie
* @date:2020/11/20 16:58
* * @param null
*/
Integer getPopupCount(Long wechatUserId, Long bookId, Integer popupType);
}
......@@ -1732,6 +1732,11 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
return qrcodeMessage4WechatVO;
}
@Override
public Integer getPopupCount(Long wechatUserId, Long bookId, Integer popupType) {
return rightsNowPopupDao.getPopupCount(wechatUserId, bookId, popupType);
}
private void fillGiftCouponPack(RightsSetting rightsSetting, Integer readType) {
RightsSettingTitle rightsSettingTitle = getRightsSettingTitle(rightsSetting, RightsNowItemTypeNew.GIFT_COUPON_PACKAGE, readType);
if (null != rightsSettingTitle){
......
......@@ -26,4 +26,12 @@ public interface RightsNowPopupDao extends BaseDao<RightsNowPopup>{
* * @param null
*/
Integer getUserPopupClickCountByServe(RightsNowPopup rightsNowPopup);
/**
* 查弹出次数
* @author:zhuyajie
* @date:2020/11/20 16:58
* * @param null
*/
Integer getPopupCount(Long wechatUserId, Long bookId, Integer popupType);
}
\ No newline at end of file
......@@ -34,4 +34,13 @@ public class RightsNowPopupDaoImpl extends BaseDaoImpl<RightsNowPopup> implement
public Integer getUserPopupClickCountByServe(RightsNowPopup rightsNowPopup) {
return getSessionTemplate().selectOne(getStatement("getUserPopupClickCountByServe"), rightsNowPopup);
}
@Override
public Integer getPopupCount(Long wechatUserId, Long bookId, Integer popupType) {
Map<String, Object> map = new HashMap<>();
map.put("wechatUserId", wechatUserId);
map.put("bookId", bookId);
map.put("popupType", popupType);
return getSessionTemplate().selectOne(getStatement("getPopupCount"), map);
}
}
......@@ -16,7 +16,11 @@ public enum RightsNowPopupType {
/**
* 4十一假期期间弹窗
*/
NATIONAL_DAY_POPUP(4);
NATIONAL_DAY_POPUP(4),
/**
* 5背单词小程序
*/
WORD_APPLET(5);
public final Integer value;
......
......@@ -49,4 +49,13 @@
and serve_type = #{serveType}
</select>
<select id="getPopupCount" parameterType="map" resultType="integer">
SELECT COUNT(1) FROM book.rights_now_popup
WHERE wechat_user_id = #{wechatUserId}
and book_id = #{bookId}
and popup_type = #{popupType}
AND record_type = 1
</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