Commit 1aa7c201 by 1244575290@qq.com

聚合页修改

parent 521f33f6
......@@ -6,6 +6,7 @@ import com.pcloud.common.core.constant.MQQueueConstant;
import com.pcloud.common.core.constant.MQTopicProducer;
import com.pcloud.common.core.mq.RabbitMQFactory;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.Queue;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -37,6 +38,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@PropertySource({"classpath:properties/book.properties", "classpath:public_system.properties"})
@Configuration
@EnableSwagger2
@MapperScan(basePackages = {"com.pcloud.book.*.mapper"})
public class BookApplication {
public static void main(String[] args) {
......
package com.pcloud.book.keywords.biz;
import com.pcloud.book.keywords.entity.SelfRobotKeyword;
import com.pcloud.book.keywords.vo.GuideWordVO;
import com.pcloud.book.keywords.vo.LabelVO;
import com.pcloud.book.keywords.vo.SelfRobotReplyVO;
import com.pcloud.common.page.PageBeanNew;
import java.util.List;
......@@ -18,4 +21,17 @@ public interface SelfRobotKeywordBiz {
String getAppOrProductServeUrl(Long bookGroupId, Long serveId, String serveType, String serveUrl);
List<LabelVO> listLabelByType(Integer type);
List<SelfRobotReplyVO> getReplyByLabel(Integer type, Long labelId, String robotId, String wxUserId);
List<SelfRobotReplyVO> getReplyByKeyWord(Integer type, String keyWord, String robotId, String wxUserId);
List<GuideWordVO> getGuideWordListByType(Integer type);
List<SelfRobotReplyVO> getReplyBuyGuide(Integer type, Integer id, String robotId, String wxUserId);
String getResource(Integer id, String robotId, String wxUserId);
String joinGroup(Integer id, String robotId, String wxUserId);
}
......@@ -6,27 +6,43 @@ import com.pcloud.book.consumer.app.AppConsr;
import com.pcloud.book.consumer.channel.QrcodeSceneConsr;
import com.pcloud.book.consumer.content.ResourceConsr;
import com.pcloud.book.consumer.resource.ProductConsr;
import com.pcloud.book.consumer.wechatgroup.WechatGroupConsr;
import com.pcloud.book.group.biz.BookGroupAppBiz;
import com.pcloud.book.group.dao.BookGroupDao;
import com.pcloud.book.group.dao.WeixinQrcodeGenerationDao;
import com.pcloud.book.group.dto.BookGroupDTO;
import com.pcloud.book.group.entity.WeixinQrcodeGeneration;
import com.pcloud.book.group.enums.AppAndProductTypeEnum;
import com.pcloud.book.group.tools.SendWeixinRequestTools;
import com.pcloud.book.keywords.biz.SelfRobotKeywordBiz;
import com.pcloud.book.keywords.dao.SelfRobotKeywordDao;
import com.pcloud.book.keywords.dao.SelfRobotKeywordReplyDao;
import com.pcloud.book.keywords.mapper.TempRobotSkillDao;
import com.pcloud.book.keywords.dto.MaxSeqNAndBGDTO;
import com.pcloud.book.keywords.entity.SelfRobotKeyword;
import com.pcloud.book.keywords.entity.SelfRobotKeywordReply;
import com.pcloud.book.keywords.entity.TempRobotSkill;
import com.pcloud.book.keywords.enums.ReplyTypeEnum;
import com.pcloud.book.keywords.vo.GuideWordVO;
import com.pcloud.book.keywords.vo.LabelVO;
import com.pcloud.book.keywords.vo.SelfRobotReplyVO;
import com.pcloud.channelcenter.wechat.dto.AccountSettingDto;
import com.pcloud.common.core.aspect.ParamLog;
import com.pcloud.common.page.PageBeanNew;
import com.pcloud.common.page.PageParam;
import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.ResponseHandleUtil;
import com.pcloud.common.utils.string.StringUtil;
import com.pcloud.contentcenter.resource.dto.ResourceDTO;
import com.pcloud.resourcecenter.product.dto.ProductDto;
import com.pcloud.resourcecenter.product.dto.ProductTypeDto;
import com.pcloud.wechatgroup.group.dto.GroupRobotDTO;
import com.pcloud.wechatgroup.timecontrol.dto.LabelDto;
import com.pcloud.wechatgroup.timecontrol.dto.TaskDto;
import com.pcloud.wechatgroup.timecontrol.service.TimeControlTaskService;
import com.sdk.wxgroup.*;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
......@@ -62,6 +78,14 @@ public class SelfRobotKeywordBizImpl implements SelfRobotKeywordBiz {
private QrcodeSceneConsr qrcodeSceneConsr;
@Autowired
private SelfRobotKeywordReplyDao selfRobotKeywordReplyDao;
@Autowired
private TimeControlTaskService timeControlTaskService;
@Autowired
private TempRobotSkillDao tempRobotSkillDao;
@Autowired
private WechatGroupConsr wechatGroupConsr;
@Autowired
private WeixinQrcodeGenerationDao weixinQrcodeGenerationDao;
@Transactional(rollbackFor = Exception.class)
@ParamLog("批量新增个人号关键词")
......@@ -208,6 +232,225 @@ public class SelfRobotKeywordBizImpl implements SelfRobotKeywordBiz {
}
@Override
public List<GuideWordVO> getGuideWordListByType(Integer type) {
List<GuideWordVO> list = new ArrayList<>();
List<TempRobotSkill> skillList = tempRobotSkillDao.getTempRobotSkillListByType(type);
for (TempRobotSkill skill : skillList) {
GuideWordVO guideWordVO = new GuideWordVO();
guideWordVO.setId(skill.getId());
guideWordVO.setType(type);
guideWordVO.setGuideWord(skill.getGuideWord());
guideWordVO.setKeyWord(skill.getKeyWord());
list.add(guideWordVO);
}
return list;
}
@Override
public List<LabelVO> listLabelByType(Integer type) {
List<LabelVO> list = new ArrayList<>();
if (type == 1) {
//时间管理
List<LabelDto> labelList = ResponseHandleUtil.parseList(timeControlTaskService.listMaxDepLabel(10), LabelDto.class);
if (!ListUtils.isEmpty(labelList)) {
for (LabelDto item : labelList) {
LabelVO labelVO = new LabelVO();
labelVO.setLabelId(item.getDepLabelId());
labelVO.setLabelName(item.getDepLabelName());
list.add(labelVO);
}
}
}
if(type == 2 || type == 3) {
list = tempRobotSkillDao.getLabelListByType(type);
}
return list;
}
@Override
public List<SelfRobotReplyVO> getReplyByLabel(Integer type, Long labelId, String robotId, String wxUserId) {
List<SelfRobotReplyVO> list = new ArrayList<>();
if (type == 1) {
List<TaskDto> taskDtoList = ResponseHandleUtil.parseList(timeControlTaskService.listTaskByLabelIds4User(wxUserId, labelId), TaskDto.class);
if (!ListUtils.isEmpty(taskDtoList)) {
taskDtoList.forEach(item -> {
SelfRobotReplyVO selfRobotReplyVO = new SelfRobotReplyVO();
BeanUtils.copyProperties(item, selfRobotReplyVO);
list.add(selfRobotReplyVO);
});
}
}
if (type == 2) {
List<TempRobotSkill> skillList = tempRobotSkillDao.getTempRobotSkillListByLabelId(type, labelId.intValue());
for (TempRobotSkill skill : skillList) {
SelfRobotReplyVO selfRobotReplyVO = new SelfRobotReplyVO();
selfRobotReplyVO.setId(skill.getId());
selfRobotReplyVO.setReplyContent(skill.getReplyContent());
selfRobotReplyVO.setKeyWord(skill.getKeyWord());
selfRobotReplyVO.setGuideWord(skill.getGuideWord());
}
}
if (type == 3) {
List<TempRobotSkill> skillList = tempRobotSkillDao.getTempRobotSkillListByLabelId(type, labelId.intValue());
for (TempRobotSkill skill : skillList) {
SelfRobotReplyVO selfRobotReplyVO = new SelfRobotReplyVO();
selfRobotReplyVO.setId(skill.getId());
selfRobotReplyVO.setReplyContent(skill.getReplyContent());
selfRobotReplyVO.setWxGroupId(skill.getGroupId());
selfRobotReplyVO.setWxGroupName(skill.getGroupName());
selfRobotReplyVO.setKeyWord(skill.getKeyWord());
selfRobotReplyVO.setGuideWord(skill.getGuideWord());
}
}
return list;
}
@Override
public List<SelfRobotReplyVO> getReplyByKeyWord(Integer type, String keyWord, String robotId, String wxUserId) {
List<SelfRobotReplyVO> list = new ArrayList<>();
if (type == 1) {
List<TaskDto> taskDtoList = ResponseHandleUtil.parseList(timeControlTaskService.listTaskByKey4User(wxUserId, keyWord), TaskDto.class);
if (!ListUtils.isEmpty(taskDtoList)) {
taskDtoList.forEach(item -> {
SelfRobotReplyVO selfRobotReplyVO = new SelfRobotReplyVO();
BeanUtils.copyProperties(item, selfRobotReplyVO);
list.add(selfRobotReplyVO);
});
}
}
if (type == 2) {
List<TempRobotSkill> skillList = tempRobotSkillDao.getTempRobotSkillListByKeyword(type, keyWord);
for (TempRobotSkill skill : skillList) {
SelfRobotReplyVO selfRobotReplyVO = new SelfRobotReplyVO();
selfRobotReplyVO.setId(skill.getId());
selfRobotReplyVO.setReplyContent(skill.getReplyContent());
selfRobotReplyVO.setKeyWord(skill.getKeyWord());
selfRobotReplyVO.setGuideWord(skill.getGuideWord());
}
}
if (type == 3) {
List<TempRobotSkill> skillList = tempRobotSkillDao.getTempRobotSkillListByKeyword(type, keyWord);
for (TempRobotSkill skill : skillList) {
SelfRobotReplyVO selfRobotReplyVO = new SelfRobotReplyVO();
selfRobotReplyVO.setId(skill.getId());
selfRobotReplyVO.setReplyContent(skill.getReplyContent());
selfRobotReplyVO.setWxGroupId(skill.getGroupId());
selfRobotReplyVO.setWxGroupName(skill.getGroupName());
selfRobotReplyVO.setKeyWord(skill.getKeyWord());
selfRobotReplyVO.setGuideWord(skill.getGuideWord());
}
}
return list;
}
@Override
public List<SelfRobotReplyVO> getReplyBuyGuide(Integer type, Integer id, String robotId, String wxUserId) {
List<SelfRobotReplyVO> list = new ArrayList<>();
if (type == 1) {
//todo 根据全平台关键词查id 找关联任务id集合
List<Integer> taskIds = new ArrayList<>();
if (id == 1) {
taskIds = Arrays.asList(5);
}else if (id == 2) {
taskIds = Arrays.asList(5, 6);
}else {
taskIds = Arrays.asList(5, 6, 7);
}
List<TaskDto> taskDtoList = ResponseHandleUtil.parseList(timeControlTaskService.listTaskByIds4User(wxUserId, taskIds), TaskDto.class);
if (!ListUtils.isEmpty(taskDtoList)) {
taskDtoList.forEach(item -> {
SelfRobotReplyVO selfRobotReplyVO = new SelfRobotReplyVO();
BeanUtils.copyProperties(item, selfRobotReplyVO);
list.add(selfRobotReplyVO);
});
}
}
if (type == 2 || type == 3) {
TempRobotSkill skill = tempRobotSkillDao.getById(id);
SelfRobotReplyVO replyVO = new SelfRobotReplyVO();
replyVO.setId(skill.getId());
replyVO.setReplyContent(skill.getReplyContent());
replyVO.setWxGroupId(skill.getGroupId());
replyVO.setWxGroupName(skill.getGroupName());
replyVO.setKeyWord(skill.getKeyWord());
replyVO.setGuideWord(skill.getGuideWord());
list.add(replyVO);
}
return list;
}
@Override
public String getResource(Integer id, String robotId, String wxUserId) {
TempRobotSkill skill = tempRobotSkillDao.getById(id);
if("text".equals(skill.getResourceType())) {
// 发送文本
SendTextMessageVO sendTextMessageVO = new SendTextMessageVO();
sendTextMessageVO.setContent(skill.getText());
sendTextMessageVO.setCode(SendMessageTypeEnum.SELF.getCode());
sendTextMessageVO.setWxId(robotId);
sendTextMessageVO.setAltId(robotId);
sendTextMessageVO.setWxGroupId(wxUserId);
sendTextMessageVO.setIp(getIpByRobot(robotId));
WxGroupSDK.sendTextMessage(sendTextMessageVO);
} else if ("file".equals(skill.getResourceType())) {
// 发送文件
SendFileVO sendFileVO = new SendFileVO();
sendFileVO.setFileUrl(skill.getFileUrl());
sendFileVO.setFileName(skill.getFileName());
sendFileVO.setIp(getIpByRobot(robotId));
sendFileVO.setAltId(robotId);
sendFileVO.setWxId(wxUserId);
WxGroupSDK.sendFile(sendFileVO);
} else if ("img".equals(skill.getResourceType())) {
// 发送图片
SendPicMessageVO sendPicMessageVO = new SendPicMessageVO();
sendPicMessageVO.setCode(SendMessageTypeEnum.SELF.getCode());
sendPicMessageVO.setAltId(robotId);
sendPicMessageVO.setWxGroupId(wxUserId);
sendPicMessageVO.setPicUrl(skill.getImgUrl());
sendPicMessageVO.setIp(getIpByRobot(robotId));
WxGroupSDK.sendPicMessage(sendPicMessageVO);
}
return skill.getReplyContent();
}
/**
* 获取ip
* @param altId
* @return
*/
private String getIpByRobot(String altId) {
String ip = null;
GroupRobotDTO groupRobotDTO = wechatGroupConsr.getGroupRobotByWxId(altId);
if (null != groupRobotDTO) {
WeixinQrcodeGeneration weixinQrcodeGeneration = weixinQrcodeGenerationDao.getByGeneration(groupRobotDTO.getVersion());
if (null != weixinQrcodeGeneration) {
ip = weixinQrcodeGeneration.getWechatGroupIp();
}
}
return ip;
}
@Override
public String joinGroup(Integer id, String robotId, String wxUserId) {
TempRobotSkill skill = tempRobotSkillDao.getById(id);
// 发送群二维码图片
SendPicMessageVO sendPicMessageVO = new SendPicMessageVO();
sendPicMessageVO.setCode(SendMessageTypeEnum.SELF.getCode());
sendPicMessageVO.setAltId(robotId);
sendPicMessageVO.setWxGroupId(wxUserId);
sendPicMessageVO.setPicUrl(skill.getImgUrl());
sendPicMessageVO.setIp(getIpByRobot(robotId));
WxGroupSDK.sendPicMessage(sendPicMessageVO);
return skill.getReplyContent();
}
@ParamLog("填充列表")
private void fillSelfRobotKeyword(List<SelfRobotKeyword> selfRobotKeywords) {
if (ListUtils.isEmpty(selfRobotKeywords)){
......
package com.pcloud.book.keywords.entity;
import lombok.Data;
import java.io.Serializable;
@Data
public class TempRobotSkill implements Serializable {
private Integer id;
private Integer type;
private String keyWord;
private String guideWord;
private Integer depthId;
private String depthLabel;
private String resourceType;
private String text;
private String imgUrl;
private Integer productId;
private String fileUrl;
private String fileName;
private String groupId;
private String groupName;
private String replyContent;
}
\ No newline at end of file
......@@ -78,4 +78,43 @@ public interface SelfRobotKeywordFacade {
@RequestParam("serveUrl") @ApiParam("作品或应用链接") String serveUrl
) throws BizException, PermissionException;
/* 个人号H5聚合页面 */
@ApiOperation("根据类型获取引导语列表")
@GetMapping("getGuideWordListByType")
ResponseDto<?> getGuideWordListByType(
@RequestParam("type") @ApiParam("技能类型") Integer type
) throws BizException, PermissionException;
@ApiOperation("根据类型获取标签列表")
@GetMapping("listLabelByType")
ResponseDto<?> listLabelByType(
@RequestParam("type") @ApiParam("技能类型") Integer type
) throws BizException, PermissionException;
@ApiOperation("根据标签获取引导语列表")
@GetMapping("getReplyByLabel")
ResponseDto<?> getReplyByLabel(
@RequestParam("type") @ApiParam("技能类型") Integer type, Long labelId, String robotId, String wxUserId
) throws BizException, PermissionException;
@ApiOperation("根据关键词获取回复")
@GetMapping("getReplyByKeyWord")
ResponseDto<?> getReplyByKeyWord(
@RequestParam("keyWord") @ApiParam("关键词") String keyWord,
@RequestParam("type") @ApiParam("技能类型") Integer type,
@RequestParam("robotId") @ApiParam("小号WXID") String robotId,
@RequestParam("wxUserId") @ApiParam("用户WXID") String wxUserId
) throws BizException, PermissionException;
@ApiOperation(value = "根据引导语获取任务列表", httpMethod = "GET")
@GetMapping("getReplyByGuide")
ResponseDto<?> getReplyByGuide(Integer type, Integer id, String robotId, String wxUserId);
@ApiOperation(value = "获取资料", httpMethod = "GET")
@GetMapping("getResource")
ResponseDto<?> getResource(Integer id, String robotId, String wxUserId);
@ApiOperation(value = "进群", httpMethod = "GET")
@GetMapping("joinGroup")
ResponseDto<?> joinGroup(Integer id, String robotId, String wxUserId);
}
......@@ -3,6 +3,8 @@ package com.pcloud.book.keywords.facade.impl;
import com.pcloud.book.keywords.biz.SelfRobotKeywordBiz;
import com.pcloud.book.keywords.entity.SelfRobotKeyword;
import com.pcloud.book.keywords.facade.SelfRobotKeywordFacade;
import com.pcloud.book.keywords.vo.LabelVO;
import com.pcloud.book.keywords.vo.SelfRobotReplyVO;
import com.pcloud.common.dto.ResponseDto;
import com.pcloud.common.exceptions.BizException;
import com.pcloud.common.permission.PermissionException;
......@@ -20,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -124,4 +127,55 @@ public class SelfRobotKeywordFacadeImpl implements SelfRobotKeywordFacade {
return new ResponseDto<>(selfRobotKeywordBiz.getAppOrProductServeUrl(bookGroupId,serveId,serveType,serveUrl));
}
@Override
@GetMapping("getGuideWordListByType")
public ResponseDto<?> getGuideWordListByType(@RequestParam("type") Integer type) throws BizException, PermissionException {
return new ResponseDto<>(selfRobotKeywordBiz.getGuideWordListByType(type));
}
@Override
@GetMapping("listLabelByType")
public ResponseDto<?> listLabelByType(@RequestParam("type") Integer type) throws BizException, PermissionException {
List<LabelVO> list = selfRobotKeywordBiz.listLabelByType(type);
return new ResponseDto<>(list);
}
@Override
@GetMapping("getReplyByLabel")
public ResponseDto<?> getReplyByLabel(@RequestParam("type") Integer type, @RequestParam Long labelId,@RequestParam String robotId, @RequestParam String wxUserId) throws BizException, PermissionException {
List<SelfRobotReplyVO> list = selfRobotKeywordBiz.getReplyByLabel(type, labelId, robotId, wxUserId);
return new ResponseDto<>(list);
}
@Override
@GetMapping("getReplyByKeyWord")
public ResponseDto<?> getReplyByKeyWord(@RequestParam("keyWord") String keyWord,
@RequestParam("type") Integer type,
@RequestParam("robotId") String robotId,
@RequestParam("wxUserId") String wxUserId) throws BizException, PermissionException {
List<SelfRobotReplyVO> list = selfRobotKeywordBiz.getReplyByKeyWord(type, keyWord, robotId, wxUserId);
return new ResponseDto<>(list);
}
@Override
@GetMapping("getReplyByGuide")
public ResponseDto<?> getReplyByGuide(@RequestParam Integer type, @RequestParam Integer id, @RequestParam String robotId, @RequestParam String wxUserId) {
List<SelfRobotReplyVO> list = selfRobotKeywordBiz.getReplyBuyGuide(type, id, robotId, wxUserId);
return new ResponseDto<>(list);
}
@Override
@GetMapping("getResource")
public ResponseDto<?> getResource(@RequestParam Integer id, @RequestParam String robotId, @RequestParam String wxUserId) {
return new ResponseDto<>(selfRobotKeywordBiz.getResource(id, robotId, wxUserId));
}
@Override
@GetMapping("joinGroup")
public ResponseDto<?> joinGroup(@RequestParam Integer id, @RequestParam String robotId, @RequestParam String wxUserId) {
return new ResponseDto<>(selfRobotKeywordBiz.joinGroup(id, robotId, wxUserId));
}
}
package com.pcloud.book.keywords.mapper;
import com.pcloud.book.keywords.entity.TempRobotSkill;
import com.pcloud.book.keywords.vo.LabelVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import java.util.List;
@Component("tempRobotSkillDao")
public interface TempRobotSkillDao {
List<TempRobotSkill> getTempRobotSkillListByType(@Param("type") Integer type);
List<TempRobotSkill> getTempRobotSkillListByKeyword(@Param("type") Integer type, @Param("keyword") String keyword);
List<TempRobotSkill> getTempRobotSkillListByLabelId(@Param("type") Integer type, @Param("labelId") Integer labelId);
List<LabelVO> getLabelListByType(@Param("type") Integer type);
TempRobotSkill getById(@Param("id") Integer id);
}
package com.pcloud.book.keywords.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@Data
@ApiModel
@JsonInclude(JsonInclude.Include.NON_NULL)
public class GuideWordVO implements Serializable {
private Integer id;
private Integer type;
private String keyWord;
private String guideWord;
}
package com.pcloud.book.keywords.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class LabelVO implements Serializable {
private static final long serialVersionUID = 1437986453453219619L;
@ApiModelProperty("标签ID")
private Long labelId;
@ApiModelProperty("标签名称")
private String labelName;
}
package com.pcloud.book.keywords.vo;
import java.io.Serializable;
import lombok.Data;
/**
* @Description:TODO
* @Author:zcy
* @Date:2020-02-04
* @Version:1.0
*/
@Data
public class SelfRobotReplyVO implements Serializable {
private Integer id;
private String keyWord;
private String guideWord;
private Integer taskId;
private String taskName;
private String taskIntroduce;
private Integer subscribeState;
private String replyContent;
private String wxGroupId;
private String wxGroupName;
private String wxGroupUserCount;
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "mybatis-3-mapper.dtd" >
<mapper namespace="com.pcloud.book.keywords.mapper.TempRobotSkillDao">
<resultMap id="BaseResultMap" type="tempRobotSkill">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="key_word" jdbcType="VARCHAR" property="keyWord" />
<result column="guide_word" jdbcType="VARCHAR" property="guideWord" />
<result column="depth_id" jdbcType="INTEGER" property="depthId" />
<result column="depth_label" jdbcType="VARCHAR" property="depthLabel" />
<result column="resource_type" jdbcType="VARCHAR" property="resourceType" />
<result column="text" jdbcType="VARCHAR" property="text" />
<result column="img_url" jdbcType="VARCHAR" property="imgUrl" />
<result column="product_id" jdbcType="INTEGER" property="productId" />
<result column="file_url" jdbcType="VARCHAR" property="fileUrl" />
<result column="file_name" jdbcType="VARCHAR" property="fileName" />
<result column="group_id" jdbcType="VARCHAR" property="groupId" />
<result column="group_name" jdbcType="VARCHAR" property="groupName" />
<result column="reply_content" jdbcType="VARCHAR" property="replyContent" />
</resultMap>
<sql id="Base_Column_List">
id, type, key_word, guide_word, depth_id, depth_label, resource_type, text, img_url,
product_id, file_url, file_name, group_id, group_name, reply_content
</sql>
<select id="getById" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List" />
FROM temp_robot_skill
WHERE id = #{id}
</select>
<select id="getTempRobotSkillListByType" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List" />
FROM temp_robot_skill
WHERE type = #{type}
</select>
<select id="getTempRobotSkillListByKeyword" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List" />
FROM temp_robot_skill
WHERE type = #{type}
and key_word = #{keyword}
</select>
<select id="getTempRobotSkillListByLabelId" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List" />
FROM temp_robot_skill
WHERE type = #{type}
and depth_id = #{labelId}
</select>
<select id="getLabelListByType" resultType="LabelVO">
SELECT
depth_id labelId, depth_label labelName
FROM temp_robot_skill
WHERE type = #{type}
group by depth_id
</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