Commit 98d3d97e by Administrator

Merge branch 'feature/1006197' into 'master'

feat:[1006197]资源上书查询

See merge request rays/pcloud-book!1484
parents f80070cc da8f499a
package com.pcloud.book.applet.biz; package com.pcloud.book.applet.biz;
import com.pcloud.book.applet.dto.AppletThirdResourcesDTO; import com.pcloud.book.applet.dto.AppletThirdResourcesDTO;
import com.pcloud.book.group.dto.ResourceOnBookDTO;
import com.pcloud.book.applet.dto.ThirdResourceRecordDTO; import com.pcloud.book.applet.dto.ThirdResourceRecordDTO;
import com.pcloud.book.applet.entity.AppletThirdResources; import com.pcloud.book.applet.entity.AppletThirdResources;
import com.pcloud.book.applet.entity.AppletThirdResourcesClick; import com.pcloud.book.applet.entity.AppletThirdResourcesClick;
...@@ -47,4 +48,24 @@ public interface AppletThirdResourcesBiz { ...@@ -47,4 +48,24 @@ public interface AppletThirdResourcesBiz {
*/ */
PageBeanNew<AppletThirdResources> getThirdResourcesByGradeLabel4ResourcePage(Long gradeLabelId, Integer currentPage, PageBeanNew<AppletThirdResources> getThirdResourcesByGradeLabel4ResourcePage(Long gradeLabelId, Integer currentPage,
Integer numPerPage); Integer numPerPage);
/**
* @Description 根据编号查第三方资源
* @Author zhuyajie
* @Date 17:59 2021/12/14
**/
AppletThirdResourcesDTO getThirdResourceByNumber(String number);
/**
* @Description 第三方资源上书情况
* @Author zhuyajie
* @Date 17:56 2021/12/14
**/
PageBeanNew<ResourceOnBookDTO> listThirdResourceOnBook(Integer currentPage, Integer numPerPage, Long thirdResourceId);
/**
* @Description 导出-第三方资源上书情况
* @Author zhuyajie
* @Date 19:42 2021/12/14
**/
void exportThirdResourceOnBook(Long thirdResourceId,Long partyId);
} }
...@@ -16,5 +16,12 @@ public interface AppletThirdResourcesClickDao extends BaseDao<AppletThirdResourc ...@@ -16,5 +16,12 @@ public interface AppletThirdResourcesClickDao extends BaseDao<AppletThirdResourc
* 趋势图数据 * 趋势图数据
*/ */
List<AppletChartDateDTO> mapPVUVByMonth(Integer recordType, Long newsId); List<AppletChartDateDTO> mapPVUVByMonth(Integer recordType, Long newsId);
/**
* @Description 资源上书数据统计
* @Author zhuyajie
* @Date 19:21 2021/12/14
**/
List<PvuvDTO> mapPVUV4BookByResourceId(Long thirdResourceId, Integer recordType);
} }
...@@ -21,4 +21,6 @@ public interface AppletThirdResourcesDao extends BaseDao<AppletThirdResources> { ...@@ -21,4 +21,6 @@ public interface AppletThirdResourcesDao extends BaseDao<AppletThirdResources> {
AppletThirdResources getByResourcesId(Long id); AppletThirdResources getByResourcesId(Long id);
Integer countResourceIdByGradeLabel(Integer crowdType); Integer countResourceIdByGradeLabel(Integer crowdType);
AppletThirdResources getThirdResourceByNumber(String number);
} }
...@@ -33,5 +33,13 @@ public class AppletThirdResourcesClickDaoImpl extends BaseDaoImpl<AppletThirdRes ...@@ -33,5 +33,13 @@ public class AppletThirdResourcesClickDaoImpl extends BaseDaoImpl<AppletThirdRes
map.put("recordType", recordType); map.put("recordType", recordType);
return getSessionTemplate().selectList(getStatement("mapPVUVByMonth"), map); return getSessionTemplate().selectList(getStatement("mapPVUVByMonth"), map);
} }
@Override
public List<PvuvDTO> mapPVUV4BookByResourceId(Long thirdResourceId, Integer recordType) {
Map<String, Object> map = new HashMap<>();
map.put("thirdResourcesId", thirdResourceId);
map.put("recordType", recordType);
return getSessionTemplate().selectList(getStatement("mapPVUV4BookByResourceId"), map);
}
} }
...@@ -54,4 +54,9 @@ public class AppletThirdResourcesDaoImpl extends BaseDaoImpl<AppletThirdResource ...@@ -54,4 +54,9 @@ public class AppletThirdResourcesDaoImpl extends BaseDaoImpl<AppletThirdResource
paramMap.put("crowdType", crowdType); paramMap.put("crowdType", crowdType);
return getSessionTemplate().selectOne(getStatement("countResourceIdByGradeLabel"), paramMap); return getSessionTemplate().selectOne(getStatement("countResourceIdByGradeLabel"), paramMap);
} }
@Override
public AppletThirdResources getThirdResourceByNumber(String number) {
return getSessionTemplate().selectOne(getStatement("getThirdResourceByNumber"), number);
}
} }
...@@ -15,13 +15,23 @@ import lombok.Data; ...@@ -15,13 +15,23 @@ import lombok.Data;
public class PvuvDTO extends BaseDto { public class PvuvDTO extends BaseDto {
private Long fromId; private Long fromId;
/**
* 次数
*/
private Integer pv; private Integer pv;
/**
* 人数
*/
private Integer uv; private Integer uv;
/** /**
* 数量 * 数量
*/ */
private Integer count; private Integer count;
private Long bookId;
private Long channelId;
private Long adviserId;
private Integer recordType;
} }
...@@ -19,12 +19,17 @@ import com.pcloud.book.applet.dto.AppletThirdResourcesDTO; ...@@ -19,12 +19,17 @@ import com.pcloud.book.applet.dto.AppletThirdResourcesDTO;
import com.pcloud.book.applet.entity.AppletThirdResources; import com.pcloud.book.applet.entity.AppletThirdResources;
import com.pcloud.book.applet.entity.AppletThirdResourcesClick; import com.pcloud.book.applet.entity.AppletThirdResourcesClick;
import com.pcloud.book.base.exception.BookBizException; import com.pcloud.book.base.exception.BookBizException;
import com.pcloud.book.group.dto.ResourceOnBookDTO;
import com.pcloud.common.dto.ResponseDto; import com.pcloud.common.dto.ResponseDto;
import com.pcloud.common.page.PageBeanNew; import com.pcloud.common.page.PageBeanNew;
import com.pcloud.common.permission.PermissionException; import com.pcloud.common.permission.PermissionException;
import com.pcloud.common.utils.SessionUtil; import com.pcloud.common.utils.SessionUtil;
import com.pcloud.common.utils.cookie.Cookie; import com.pcloud.common.utils.cookie.Cookie;
import com.pcloud.readercenter.wechat.exception.WechatUserException; import com.pcloud.readercenter.wechat.exception.WechatUserException;
import com.pcloud.settlementcenter.account.enums.IsSystem;
import java.util.Map;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
...@@ -179,4 +184,37 @@ public class AppletThirdResourcesFacade { ...@@ -179,4 +184,37 @@ public class AppletThirdResourcesFacade {
} }
return new ResponseDto<>(thirdResourcesBiz.getThirdResourcesByGradeLabel4ResourcePage(gradeLabelId, currentPage, numPerPage)); return new ResponseDto<>(thirdResourcesBiz.getThirdResourcesByGradeLabel4ResourcePage(gradeLabelId, currentPage, numPerPage));
} }
@ApiOperation("根据编号查第三方资源")
@GetMapping("getThirdResourceByNumber")
public ResponseDto<?> getThirdResourceByNumber(@RequestHeader("token") String token, @RequestParam("number") String number) {
SessionUtil.getInfoToken4Redis(token);
return new ResponseDto<>(thirdResourcesBiz.getThirdResourceByNumber(number));
}
@ApiOperation("第三方资源上书情况")
@GetMapping("listThirdResourceOnBook")
public ResponseDto<?> listThirdResourceOnBook(@RequestHeader("token") String token,
@RequestParam(value = "currentPage", defaultValue = "0") Integer currentPage,
@RequestParam(value = "numPerPage", defaultValue = "1000") Integer numPerPage,
@RequestParam("thirdResourceId") Long thirdResourceId) {
SessionUtil.getInfoToken4Redis(token);
return new ResponseDto<>(thirdResourcesBiz.listThirdResourceOnBook(currentPage, numPerPage, thirdResourceId));
}
@ApiOperation("导出-第三方资源上书情况")
@GetMapping("exportThirdResourceOnBook")
public ResponseDto<?> exportThirdResourceOnBook(@RequestHeader("token") String token, @RequestParam("thirdResourceId") Long thirdResourceId) {
Map<String,Object> map = SessionUtil.getToken4Redis(token);
String isSystem = (String)map.get(SessionUtil.IS_SYSTEM);
Long pcloudId = (Long) map.get(SessionUtil.PARTY_ID);
if (IsSystem.NOT_SYSTEM.code.equals(isSystem)){
pcloudId = (Long) map.get(SessionUtil.MEMBER_ID);
}
thirdResourcesBiz.exportThirdResourceOnBook(thirdResourceId, pcloudId);
return new ResponseDto<>();
}
} }
\ No newline at end of file
...@@ -2,9 +2,12 @@ package com.pcloud.book.consumer.data; ...@@ -2,9 +2,12 @@ package com.pcloud.book.consumer.data;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import com.pcloud.common.dto.ResponseDto; import com.pcloud.common.dto.ResponseDto;
import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.ResponseHandleUtil; import com.pcloud.common.utils.ResponseHandleUtil;
import com.pcloud.data.domain.dto.BookScanCountParamDTO; import com.pcloud.data.domain.dto.BookScanCountParamDTO;
import com.pcloud.data.domain.dto.BookStatisParamDTO; import com.pcloud.data.domain.dto.BookStatisParamDTO;
import com.pcloud.data.domain.dto.QrcodeStatisParamDTO;
import com.pcloud.data.domain.vo.AdsGroupbrowseSummaryVO;
import com.pcloud.data.domain.vo.AllAdviserBookStatisVO; import com.pcloud.data.domain.vo.AllAdviserBookStatisVO;
import com.pcloud.data.domain.vo.AllAdviserWorksStatisVO; import com.pcloud.data.domain.vo.AllAdviserWorksStatisVO;
import com.pcloud.data.domain.vo.AllQrcodeWorksStatisVO; import com.pcloud.data.domain.vo.AllQrcodeWorksStatisVO;
...@@ -233,4 +236,45 @@ public class DataConsr { ...@@ -233,4 +236,45 @@ public class DataConsr {
} }
return null; return null;
} }
/**
* 二维码统计(二维码扫码量、浏览量、读者量、平均浏览时长、销售额、购买次数)
*/
public Map<String, CalQrcodeTargetVO> mapQrcodeStatisByBookIds(List<Long> bookIds, List<Long> adviserIds, List<Long> channelIds, List<Long> sceneIds){
if (ListUtils.isEmpty(sceneIds)) {
return new HashMap<>();
}
QrcodeStatisParamDTO paramDTO = new QrcodeStatisParamDTO();
paramDTO.setBookIds(bookIds);
paramDTO.setAdviserIds(adviserIds);
paramDTO.setChannelIds(channelIds);
paramDTO.setQrcodeIds(sceneIds);
try {
ResponseEntity<ResponseDto<Map<String, CalQrcodeTargetVO>>> responseEntity = bookStatisService.mapQrcodeStatisByBookIds(paramDTO);
Map<String, CalQrcodeTargetVO> map = ResponseHandleUtil.parseMap(responseEntity, String.class, CalQrcodeTargetVO.class);
return map != null ? map : new HashMap<>();
} catch (Exception e){
LOGGER.warn("调用数据统计接口 [DataConsr.mapQrcodeStatisByQrcodeId] 失败", e);
}
return new HashMap<>();
}
/**
* @Description 第三方资源数据统计(浏览量浏览人数)
* @Author zhuyajie
* @Date 17:58 2021/12/15
**/
public Map<String, AdsGroupbrowseSummaryVO> mapQrcodeStatisByGroupId(Long groupId) {
if (null == groupId) {
return new HashMap<>();
}
try {
return ResponseHandleUtil.parseMapResponse(bookStatisService.mapQrcodeStatisByGroupId(groupId),String.class,AdsGroupbrowseSummaryVO.class);
} catch (Exception e) {
LOGGER.warn("调用数据统计接口 [DataConsr.mapQrcodeStatisByGroupId] 失败", e);
}
return new HashMap<>();
}
} }
package com.pcloud.book.group.dao; package com.pcloud.book.group.dao;
import com.pcloud.book.group.dto.ResourceOnBookDTO;
import com.pcloud.book.group.dto.BookGroupServeCountDTO; import com.pcloud.book.group.dto.BookGroupServeCountDTO;
import com.pcloud.book.group.dto.BookGroupServeDTO;
import com.pcloud.book.group.dto.BookServeDTO; import com.pcloud.book.group.dto.BookServeDTO;
import com.pcloud.book.group.dto.ResourcePageUrlDTO; import com.pcloud.book.group.dto.ResourcePageUrlDTO;
import com.pcloud.book.group.entity.BookGroupServe; import com.pcloud.book.group.entity.BookGroupServe;
import com.pcloud.book.group.entity.ResourcePageItem; import com.pcloud.book.group.entity.ResourcePageItem;
import com.pcloud.book.group.vo.ResourcePageItemVO; import com.pcloud.book.group.vo.ResourcePageItemVO;
import com.pcloud.common.core.dao.BaseDao; import com.pcloud.common.core.dao.BaseDao;
import com.pcloud.common.page.PageBeanNew;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -146,4 +147,11 @@ public interface ResourcePageItemDao extends BaseDao<ResourcePageItem>{ ...@@ -146,4 +147,11 @@ public interface ResourcePageItemDao extends BaseDao<ResourcePageItem>{
* * @param null * * @param null
*/ */
List<ResourcePageItemVO> getServeListBySceneId4QrUpdate(Long sceneId); List<ResourcePageItemVO> getServeListBySceneId4QrUpdate(Long sceneId);
/**
* @Description 资源上书情况
* @Author zhuyajie
* @Date 19:01 2021/12/14
**/
List<ResourceOnBookDTO> listResourceOnBook(Map<String,Object> paramMap);
} }
\ No newline at end of file
...@@ -2,6 +2,7 @@ package com.pcloud.book.group.dao.impl; ...@@ -2,6 +2,7 @@ package com.pcloud.book.group.dao.impl;
import com.pcloud.book.group.dao.ResourcePageItemDao; import com.pcloud.book.group.dao.ResourcePageItemDao;
import com.pcloud.book.group.dto.BookServeDTO; import com.pcloud.book.group.dto.BookServeDTO;
import com.pcloud.book.group.dto.ResourceOnBookDTO;
import com.pcloud.book.group.dto.ResourcePageUrlDTO; import com.pcloud.book.group.dto.ResourcePageUrlDTO;
import com.pcloud.book.group.dto.BookGroupServeCountDTO; import com.pcloud.book.group.dto.BookGroupServeCountDTO;
import com.pcloud.book.group.entity.BookGroupServe; import com.pcloud.book.group.entity.BookGroupServe;
...@@ -137,4 +138,9 @@ public class ResourcePageItemDaoImpl extends BaseDaoImpl<ResourcePageItem> imple ...@@ -137,4 +138,9 @@ public class ResourcePageItemDaoImpl extends BaseDaoImpl<ResourcePageItem> imple
public List<ResourcePageItemVO> getServeListBySceneId4QrUpdate(Long sceneId) { public List<ResourcePageItemVO> getServeListBySceneId4QrUpdate(Long sceneId) {
return getSessionTemplate().selectList(getStatement("getServeListBySceneId4QrUpdate"), sceneId); return getSessionTemplate().selectList(getStatement("getServeListBySceneId4QrUpdate"), sceneId);
} }
@Override
public List<ResourceOnBookDTO> listResourceOnBook(Map<String, Object> paramMap) {
return getSessionTemplate().selectList(getStatement("listResourceOnBook"), paramMap);
}
} }
package com.pcloud.book.group.dto;
import com.pcloud.common.dto.BaseDto;
import lombok.Data;
/**
* @ClassName com.pcloud.book.group.dto.ThirdResourceOnBookDTO
* @Author zhuyajie
* @Description 第三方资源上书
* @Date 2021/12/14 17:49
**/
@Data
public class ResourceOnBookDTO extends BaseDto {
private Long serveId;
private String serveType;
private Long sceneId;
private String sceneName;
private Long bookId;
private String bookName;
private String isbn;
private Long adviserId;
private String adviserName;
private String agentName;
private Long channelId;
/**
* 二维码扫码量 浏览量 读者量
**/
private Long scanNum = 0L;
private Long readerNum = 0L;
private Long browseNum = 0L;
/**
* 资源 点击量 点击人数
**/
private Integer resourceClickNum = 0;
private Integer resourceClickUserNum = 0;
}
package com.pcloud.book.skill.biz; package com.pcloud.book.skill.biz;
import com.pcloud.book.applet.dto.AppletGroupManageDTO; import com.pcloud.book.applet.dto.AppletGroupManageDTO;
import com.pcloud.book.group.dto.ResourceOnBookDTO;
import com.pcloud.book.rightsSetting.entity.BaseTempletClassify; import com.pcloud.book.rightsSetting.entity.BaseTempletClassify;
import com.pcloud.book.applet.dto.GroupActivity4AppletDTO; import com.pcloud.book.applet.dto.GroupActivity4AppletDTO;
import com.pcloud.book.skill.dto.UpdateActivityShowStateDTO; import com.pcloud.book.skill.dto.UpdateActivityShowStateDTO;
...@@ -125,4 +126,25 @@ public interface PcloudGroupActivityBiz { ...@@ -125,4 +126,25 @@ public interface PcloudGroupActivityBiz {
* * @param null * * @param null
*/ */
Map<Long, GroupActivity4AppletDTO> getGroupActivityMap(List<Long> activityGroupIds); Map<Long, GroupActivity4AppletDTO> getGroupActivityMap(List<Long> activityGroupIds);
/**
* @Description 根据编号查询
* @Author zhuyajie
* @Date 20:12 2021/12/14
**/
QueryGroupActivityResponseVO getByActivityNumber(String number);
/**
* @Description 第三方群上书情况
* @Author zhuyajie
* @Date 20:18 2021/12/14
**/
PageBeanNew<ResourceOnBookDTO> listGroupActivityOnBook(Integer currentPage, Integer numPerPage, Long groupActivityId);
/**
* @Description 导出-第三方群上书情况
* @Author zhuyajie
* @Date 20:21 2021/12/14
**/
void exportGroupActivityOnBook(Long groupActivityId, Long partyId);
} }
...@@ -42,4 +42,6 @@ public interface PcloudGroupActivityDao extends BaseDao<PcloudGroupActivity> { ...@@ -42,4 +42,6 @@ public interface PcloudGroupActivityDao extends BaseDao<PcloudGroupActivity> {
QueryGroupActivityResponseVO getByActivityId(Long id); QueryGroupActivityResponseVO getByActivityId(Long id);
Map<Long, GroupActivity4AppletDTO> getGroupClassifyByIds4Record(List<Long> bookGroupIds); Map<Long, GroupActivity4AppletDTO> getGroupClassifyByIds4Record(List<Long> bookGroupIds);
PcloudGroupActivity getByActivityNumber(String number);
} }
...@@ -123,5 +123,10 @@ public class PcloudGroupActivityDaoImpl extends BaseDaoImpl<PcloudGroupActivity> ...@@ -123,5 +123,10 @@ public class PcloudGroupActivityDaoImpl extends BaseDaoImpl<PcloudGroupActivity>
return super.getSqlSession().selectMap(getStatement("getGroupClassifyByIds4Record"), bookGroupIds,"id"); return super.getSqlSession().selectMap(getStatement("getGroupClassifyByIds4Record"), bookGroupIds,"id");
} }
@Override
public PcloudGroupActivity getByActivityNumber(String number) {
return getSessionTemplate().selectOne(getStatement("getByActivityNumber"), number);
}
} }
package com.pcloud.book.skill.facade; package com.pcloud.book.skill.facade;
import com.pcloud.book.group.dto.ResourceOnBookDTO;
import com.pcloud.book.skill.biz.PcloudGroupActivityBiz; import com.pcloud.book.skill.biz.PcloudGroupActivityBiz;
import com.pcloud.book.skill.dto.UpdateActivityShowStateDTO; import com.pcloud.book.skill.dto.UpdateActivityShowStateDTO;
import com.pcloud.book.skill.facade.request.GroupActivityClassifyVO; import com.pcloud.book.skill.facade.request.GroupActivityClassifyVO;
...@@ -12,6 +13,8 @@ import com.pcloud.common.dto.ResponseDto; ...@@ -12,6 +13,8 @@ import com.pcloud.common.dto.ResponseDto;
import com.pcloud.common.page.PageBeanNew; import com.pcloud.common.page.PageBeanNew;
import com.pcloud.common.permission.PermissionException; import com.pcloud.common.permission.PermissionException;
import com.pcloud.common.utils.SessionUtil; import com.pcloud.common.utils.SessionUtil;
import com.pcloud.settlementcenter.account.enums.IsSystem;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
...@@ -146,4 +149,34 @@ public class PcloudGroupActivityFacade { ...@@ -146,4 +149,34 @@ public class PcloudGroupActivityFacade {
SessionUtil.getToken4Redis(token); SessionUtil.getToken4Redis(token);
return new ResponseDto<>(pcloudGroupActivityBiz.getByActivityId(id)); return new ResponseDto<>(pcloudGroupActivityBiz.getByActivityId(id));
} }
@ApiOperation("根据编号查询")
@GetMapping("getByActivityNumber")
public ResponseDto<?> getByActivityNumber(@RequestHeader("token") String token, @RequestParam("number") String number){
SessionUtil.getToken4Redis(token);
return new ResponseDto<>(pcloudGroupActivityBiz.getByActivityNumber(number));
}
@ApiOperation("第三方群上书情况")
@GetMapping("listGroupActivityOnBook")
public ResponseDto<?> listGroupActivityOnBook(@RequestHeader("token") String token,
@RequestParam(value = "currentPage", defaultValue = "0") Integer currentPage,
@RequestParam(value = "numPerPage", defaultValue = "1000") Integer numPerPage,
@RequestParam("groupActivityId") Long groupActivityId) {
SessionUtil.getToken4Redis(token);
return new ResponseDto<>(pcloudGroupActivityBiz.listGroupActivityOnBook(currentPage, numPerPage, groupActivityId));
}
@ApiOperation("导出-第三方群上书情况")
@GetMapping("exportGroupActivityOnBook")
public ResponseDto<?> exportGroupActivityOnBook(@RequestHeader("token") String token, @RequestParam("groupActivityId") Long groupActivityId) {
Map<String,Object> map = SessionUtil.getToken4Redis(token);
String isSystem = (String)map.get(SessionUtil.IS_SYSTEM);
Long pcloudId = (Long) map.get(SessionUtil.PARTY_ID);
if (IsSystem.NOT_SYSTEM.code.equals(isSystem)){
pcloudId = (Long) map.get(SessionUtil.MEMBER_ID);
}
pcloudGroupActivityBiz.exportGroupActivityOnBook(groupActivityId, pcloudId);
return new ResponseDto<>();
}
} }
...@@ -341,4 +341,11 @@ ...@@ -341,4 +341,11 @@
</select> </select>
<select id="getThirdResourceByNumber" parameterType="string" resultMap="BaseResultMap">
select <include refid="Base_Column_List"/>
from applet_third_resources
where resource_number = #{number}
limit 1
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -139,7 +139,26 @@ ...@@ -139,7 +139,26 @@
</if> </if>
</where> </where>
order by a.create_time desc order by a.create_time desc
</select>
<select id="mapPVUV4BookByResourceId" parameterType="map" resultType="com.pcloud.book.applet.dto.PvuvDTO">
SELECT
third_resources_id fromId,
COUNT(1) pv,
COUNT(DISTINCT wechat_user_id) uv,
book_id bookId,
channel_id channelId,
adviser_id adviserId,
record_type recordType
FROM
applet_thirdresources_click_record
WHERE
third_resources_id = #{thirdResourcesId}
<if test="recordType != null">
and record_type = #{recordType}
</if>
GROUP BY
book_id,adviser_id,channel_id,record_type
</select> </select>
</mapper> </mapper>
...@@ -402,4 +402,25 @@ ...@@ -402,4 +402,25 @@
n.navigation_seq ASC, c.column_seq ASC, i.id ASC n.navigation_seq ASC, c.column_seq ASC, i.id ASC
</select> </select>
<select id="listResourceOnBook" parameterType="map" resultType="com.pcloud.book.group.dto.ResourceOnBookDTO">
SELECT
i.serve_id serveId,
i.serve_type serveType,
p.scene_id sceneId,
p.book_id bookId,
p.create_user adviserId,
p.channel_id channelId
FROM
resource_page_item i
LEFT JOIN resource_page p ON i.resource_page_id = p.id
WHERE
i.serve_id = #{serveId}
AND i.serve_type = #{serveType}
AND p.scene_id > 0
GROUP BY
p.scene_id
ORDER BY i.create_time DESC
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -771,4 +771,12 @@ ...@@ -771,4 +771,12 @@
GROUP BY c.id GROUP BY c.id
ORDER BY c.id DESC ORDER BY c.id DESC
</select> </select>
<select id="getByActivityNumber" parameterType="string" resultMap="BaseResultMap">
select <include refid="Base_Column_List"/>
from pcloud_group_activity
where number = #{number}
limit 1
</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