Commit cc1ebdda authored by liuyuanjun's avatar liuyuanjun

修改课程标签查询bug

parent 9a93a2cc
package org.rcisoft.business.blabel.dao;
import org.apache.ibatis.annotations.*;
import org.rcisoft.business.blabel.dto.QueryLabelResDTO;
import org.rcisoft.business.blabel.entity.BLabel;
import org.rcisoft.core.base.BaseMapper;
import org.springframework.stereotype.Repository;
......@@ -32,4 +33,15 @@ public interface BLabelRepository extends BaseMapper<BLabel> {
@Update("UPDATE b_label SET del_flag='1' where business_id = #{businessId}")
int removeLabel(@Param("businessId") String id);
/**
* 查询课程push标签
* @return
*/
@Select("<script>" +
" select business_id businessId ,l_name lName " +
" from b_label where del_flag != 1 and flag = 1 " +
" and business_id in " +
"<foreach collection=\"list\" item=\"item\" open=\"(\" separator=\",\" close=\")\" > #{item} </foreach>" +
"</script>")
List<QueryLabelResDTO> queryPushLabel(@Param("list") String[] list);
}
......@@ -16,6 +16,7 @@ import org.rcisoft.business.bfile.dao.BPFileRepository;
import org.rcisoft.business.bfile.dao.BTrainFileRepository;
import org.rcisoft.business.bfile.entity.BFile;
import org.rcisoft.business.bfile.entity.BTrainFile;
import org.rcisoft.business.blabel.dao.BLabelRepository;
import org.rcisoft.business.blabel.dto.QueryLabelResDTO;
import org.rcisoft.business.blesson.dao.*;
import org.rcisoft.business.blesson.dto.*;
......@@ -163,6 +164,9 @@ public class BLessonServiceImpl implements BLessonService {
@Autowired
BFileRepository bFileRepository;
@Autowired
BLabelRepository bLabelRepository;
@Value("${upload.replaceHttp:false}")
private String replaceHttp;
......@@ -227,7 +231,12 @@ public class BLessonServiceImpl implements BLessonService {
if(LessonSycnEnum.OPEN.getCode().equals(flag))
bLessonRepository.hotNumberReCount2(bLesson.getBusinessId());
}
//添加 推送至企业信息 标签信息
if (StringUtils.isNotEmpty(bLesson.getPushLable())) {
String[] labels = bLesson.getPushLable().split(",");
List<QueryLabelResDTO> dto = bLabelRepository.queryPushLabel(labels);
bLesson.setLabelList(dto);
}
return bLesson;
}
......
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