Commit 8afc8020 by 郑勇

feat-1002599 qq定制服务

parent 8d3d7e74
...@@ -222,6 +222,12 @@ ...@@ -222,6 +222,12 @@
<version>${wxgroup-sdk.version}</version> <version>${wxgroup-sdk.version}</version>
</dependency> </dependency>
<!--qq发消息接口-->
<dependency>
<groupId>com.dcg</groupId>
<artifactId>CoolQSDK</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!--ES相关--> <!--ES相关-->
<dependency> <dependency>
<groupId>org.springframework.data</groupId> <groupId>org.springframework.data</groupId>
......
...@@ -575,9 +575,24 @@ public class WechatGroupConsr { ...@@ -575,9 +575,24 @@ public class WechatGroupConsr {
return list; return list;
} }
@ParamLog("根据qq用户id或昵称模糊查询")
public List<String> getByQqUserQuery(String userQuery) {
List<String> list = new ArrayList<>();
try {
list = ResponseHandleUtil.parseListResponse(groupMemberService.getByQqUserQuery(userQuery), String.class);
} catch (Exception e) {
log.error("根据qq用户id或昵称模糊查询.[getByQqUserQuery]失败" + e.getMessage(), e);
}
return list;
}
@ParamLog("批量获取用户信息") @ParamLog("批量获取用户信息")
public Map<String, GroupUserDTO> mapWxUserInfoByWxIdList(List<String> wxUserIds) { public Map<String, GroupUserDTO> mapWxUserInfoByWxIdList(List<String> wxUserIds) {
Map<String, GroupUserDTO> map = new HashMap<>(); Map<String, GroupUserDTO> map = new HashMap<>();
if(ListUtils.isEmpty(wxUserIds)){
return new HashMap<>();
}
try { try {
map = ResponseHandleUtil.parseMapResponse(groupMemberService.mapWxUserInfoByWxIdList(wxUserIds), String.class, GroupUserDTO.class); map = ResponseHandleUtil.parseMapResponse(groupMemberService.mapWxUserInfoByWxIdList(wxUserIds), String.class, GroupUserDTO.class);
...@@ -587,6 +602,21 @@ public class WechatGroupConsr { ...@@ -587,6 +602,21 @@ public class WechatGroupConsr {
return map; return map;
} }
@ParamLog("批量获取qq用户信息")
public Map<String, GroupUserDTO> mapQqUserInfoByWxIdList(List<String> qqUserIds) {
Map<String, GroupUserDTO> map = new HashMap<>();
if(ListUtils.isEmpty(qqUserIds)){
return new HashMap<>();
}
try {
map = ResponseHandleUtil.parseMapResponse(groupMemberService.mapQqUserInfoByQqIdList(qqUserIds), String.class, GroupUserDTO.class);
} catch (Exception e) {
log.error("批量获取qq用户信息.[mapQqUserInfoByWxIdList]失败" + e.getMessage(), e);
}
return map;
}
@ParamLog("批量获取小号信息") @ParamLog("批量获取小号信息")
public Map<String, GroupUserDTO> mapRobotInfoByIdList(List<String> wxIdList){ public Map<String, GroupUserDTO> mapRobotInfoByIdList(List<String> wxIdList){
Map<String, GroupUserDTO> map = new HashMap<>(); Map<String, GroupUserDTO> map = new HashMap<>();
......
package com.pcloud.book.custom.biz; package com.pcloud.book.custom.biz;
import com.pcloud.book.custom.entity.CustomPlan; import com.pcloud.book.custom.entity.CustomPlan;
import com.pcloud.book.custom.vo.AddBookNameVO; import com.pcloud.book.custom.vo.*;
import com.pcloud.book.custom.vo.AddCustomPlan4UserVO;
import com.pcloud.book.custom.vo.AddSuggestionVO;
import com.pcloud.book.custom.vo.CustomPlanModuleVO;
import com.pcloud.book.custom.vo.CustomPlanPaperVO;
import com.pcloud.book.custom.vo.EditCustomPlanModuleVO;
import com.pcloud.book.custom.vo.ModuleSuggestionVO;
import com.pcloud.book.custom.vo.SuggestionListVO;
import com.pcloud.book.custom.vo.UserBookServiceVO;
import com.pcloud.common.page.PageBeanNew; import com.pcloud.common.page.PageBeanNew;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -39,7 +30,7 @@ public interface CustomPlanBiz { ...@@ -39,7 +30,7 @@ public interface CustomPlanBiz {
Map<String, Object> getShortLinkUrl(Long appId, Long productId, String linkUrl); Map<String, Object> getShortLinkUrl(Long appId, Long productId, String linkUrl);
PageBeanNew<SuggestionListVO> listSuggestion4Plan(Integer currentPage, Integer numPerPage, String startTime, String endTime, String search, Integer planId); PageBeanNew<SuggestionListVO> listSuggestion4Plan(Integer currentPage, Integer numPerPage, String startTime, String endTime, String search, Integer planId,Integer userType);
List<ModuleSuggestionVO> getSuggestionInfo(Integer batchId, Integer planId); List<ModuleSuggestionVO> getSuggestionInfo(Integer batchId, Integer planId);
......
...@@ -29,4 +29,9 @@ public class CustomPlanModuleSuggestion { ...@@ -29,4 +29,9 @@ public class CustomPlanModuleSuggestion {
private Integer moduleType; private Integer moduleType;
/**
* 用户类型 1-微信用户 2-qq用户
*/
private Integer userType;
} }
\ No newline at end of file
...@@ -143,8 +143,8 @@ public class CustomPlanFacade { ...@@ -143,8 +143,8 @@ public class CustomPlanFacade {
@ApiOperation(value = "获取方案满意度记录", httpMethod = "GET") @ApiOperation(value = "获取方案满意度记录", httpMethod = "GET")
ResponseDto<?> listSuggestion4Plan(@RequestHeader String token, @RequestParam Integer currentPage, @RequestParam Integer numPerPage, ResponseDto<?> listSuggestion4Plan(@RequestHeader String token, @RequestParam Integer currentPage, @RequestParam Integer numPerPage,
@RequestParam(value = "startTime", required = false) String startTime, @RequestParam(value = "endTime", required = false) String endTime, @RequestParam(value = "startTime", required = false) String startTime, @RequestParam(value = "endTime", required = false) String endTime,
@RequestParam(value = "search", required = false) String search, @RequestParam Integer planId) { @RequestParam(value = "search", required = false) String search, @RequestParam Integer planId,@RequestParam(value = "userType", required = false) Integer userType) {
PageBeanNew<SuggestionListVO> page = customPlanBiz.listSuggestion4Plan(currentPage, numPerPage, startTime, endTime, search, planId); PageBeanNew<SuggestionListVO> page = customPlanBiz.listSuggestion4Plan(currentPage, numPerPage, startTime, endTime, search, planId,userType);
return new ResponseDto<>(page); return new ResponseDto<>(page);
} }
......
...@@ -16,11 +16,11 @@ import java.util.List; ...@@ -16,11 +16,11 @@ import java.util.List;
public interface CustomPlanModuleSuggestionMapper { public interface CustomPlanModuleSuggestionMapper {
Integer getSuggestionCount(@Param("startTime") String startTime, @Param("endTime") String endTime, Integer getSuggestionCount(@Param("startTime") String startTime, @Param("endTime") String endTime,
@Param("wxIdList") List<String> wxIdList, @Param("planId") Integer planId); @Param("wxIdList") List<String> wxIdList, @Param("planId") Integer planId, @Param("userType") Integer userType);
List<SuggestionListVO> listSuggestion4Plan(@Param("pageNum") int pageNum, @Param("numPerPage") int numPerPage, List<SuggestionListVO> listSuggestion4Plan(@Param("pageNum") int pageNum, @Param("numPerPage") int numPerPage,
@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("startTime") String startTime, @Param("endTime") String endTime,
@Param("wxIdList") List<String> wxIdList, @Param("planId") Integer planId); @Param("wxIdList") List<String> wxIdList, @Param("planId") Integer planId, @Param("userType") Integer userType);
List<ModuleSuggestionVO> getSuggestionInfo(@Param("batchId") Integer batchId, @Param("planId") Integer planId); List<ModuleSuggestionVO> getSuggestionInfo(@Param("batchId") Integer batchId, @Param("planId") Integer planId);
......
...@@ -15,5 +15,10 @@ public class AddSuggestionVO { ...@@ -15,5 +15,10 @@ public class AddSuggestionVO {
private String robotWxId; private String robotWxId;
/**
* 用户类型 1-微信用户 2-qq用户
*/
private Integer userType;
private List<AddSuggestionListVO> suggestionList; private List<AddSuggestionListVO> suggestionList;
} }
...@@ -29,4 +29,9 @@ public class SuggestionListVO implements Serializable { ...@@ -29,4 +29,9 @@ public class SuggestionListVO implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime; private Date createTime;
/**
* 用户类型 1-微信用户 2-qq用户
*/
private Integer userType;
} }
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<result column="suggestion_level" jdbcType="INTEGER" property="suggestionLevel" /> <result column="suggestion_level" jdbcType="INTEGER" property="suggestionLevel" />
<result column="suggestion" jdbcType="VARCHAR" property="suggestion" /> <result column="suggestion" jdbcType="VARCHAR" property="suggestion" />
<result column="create_time" jdbcType="TIMESTAMP" property="planId" /> <result column="create_time" jdbcType="TIMESTAMP" property="planId" />
<result column="user_type" jdbcType="INTEGER" property="userType" />
</resultMap> </resultMap>
<select id="getSuggestionCount" resultType="int"> <select id="getSuggestionCount" resultType="int">
...@@ -23,6 +24,9 @@ ...@@ -23,6 +24,9 @@
<if test="startTime != null and endTime != null"> <if test="startTime != null and endTime != null">
and a.create_time between #{startTime} and #{endTime} and a.create_time between #{startTime} and #{endTime}
</if> </if>
<if test="userType!=null">
and a.user_type=#{userType}
</if>
<if test="wxIdList != null"> <if test="wxIdList != null">
and wx_id in and wx_id in
<foreach collection="wxIdList" open="(" close=")" separator="," item="item"> <foreach collection="wxIdList" open="(" close=")" separator="," item="item">
...@@ -39,7 +43,8 @@ ...@@ -39,7 +43,8 @@
SUM(suggestion_level = 1) goodCount, SUM(suggestion_level = 1) goodCount,
SUM(suggestion_level = 2) badCount, SUM(suggestion_level = 2) badCount,
a.create_time createTime, a.create_time createTime,
a.plan_id planId a.plan_id planId,
a.user_type userType
FROM FROM
custom_plan_module_suggestion a custom_plan_module_suggestion a
LEFT JOIN custom_plan b ON a.plan_id = b.id LEFT JOIN custom_plan b ON a.plan_id = b.id
...@@ -48,6 +53,9 @@ ...@@ -48,6 +53,9 @@
<if test="startTime != null and endTime != null"> <if test="startTime != null and endTime != null">
and a.create_time between #{startTime} and #{endTime} and a.create_time between #{startTime} and #{endTime}
</if> </if>
<if test="userType!=null">
and a.user_type=#{userType}
</if>
<if test="wxIdList != null"> <if test="wxIdList != null">
and wx_id in and wx_id in
<foreach collection="wxIdList" open="(" close=")" separator="," item="item"> <foreach collection="wxIdList" open="(" close=")" separator="," item="item">
...@@ -78,11 +86,11 @@ ...@@ -78,11 +86,11 @@
<insert id="batchInsert" parameterType="com.pcloud.book.custom.entity.CustomPlanModuleSuggestion"> <insert id="batchInsert" parameterType="com.pcloud.book.custom.entity.CustomPlanModuleSuggestion">
insert into custom_plan_module_suggestion(batch_id, wx_id, plan_id, module_Id, suggestion_Level, suggestion, create_time, insert into custom_plan_module_suggestion(batch_id, wx_id, plan_id, module_Id, suggestion_Level, suggestion, create_time,
module_type, open_feedback) module_type, open_feedback,user_type)
values values
<foreach collection="list" separator="," item="item"> <foreach collection="list" separator="," item="item">
(#{item.batchId}, #{item.wxId}, #{item.planId}, #{item.moduleId}, #{item.suggestionLevel}, #{item.suggestion}, now(), (#{item.batchId}, #{item.wxId}, #{item.planId}, #{item.moduleId}, #{item.suggestionLevel}, #{item.suggestion}, now(),
#{item.moduleType}, #{item.openFeedback}) #{item.moduleType}, #{item.openFeedback},#{item.userType})
</foreach> </foreach>
</insert> </insert>
......
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