Commit f6c2e2dd by zhuyajie

技能查询

parent 1b07c9e9
...@@ -10,7 +10,7 @@ public interface PcloudSkillBiz { ...@@ -10,7 +10,7 @@ public interface PcloudSkillBiz {
PcloudSkill getPcloudSkill(Long id); PcloudSkill getPcloudSkill(Long id);
PageBeanNew<PcloudSkill> getPcloudSkillList(Integer skillType, Integer currentPage, Integer numPerPage); PageBeanNew<PcloudSkill> getPcloudSkillList(Integer skillType, Integer currentPage, Integer numPerPage, String name);
void deletePcloudSkill(Long id); void deletePcloudSkill(Long id);
......
...@@ -122,7 +122,7 @@ public class PcloudSkillBizImpl implements PcloudSkillBiz { ...@@ -122,7 +122,7 @@ public class PcloudSkillBizImpl implements PcloudSkillBiz {
@ParamLog("获取技能列表") @ParamLog("获取技能列表")
@Override @Override
public PageBeanNew<PcloudSkill> getPcloudSkillList(Integer skillType, Integer currentPage, Integer numPerPage) { public PageBeanNew<PcloudSkill> getPcloudSkillList(Integer skillType, Integer currentPage, Integer numPerPage, String name) {
if (currentPage == null || currentPage < 0) { if (currentPage == null || currentPage < 0) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "当前页不能为空且不能小于0!"); throw new BookBizException(BookBizException.PARAM_IS_ERROR, "当前页不能为空且不能小于0!");
} }
...@@ -131,6 +131,7 @@ public class PcloudSkillBizImpl implements PcloudSkillBiz { ...@@ -131,6 +131,7 @@ public class PcloudSkillBizImpl implements PcloudSkillBiz {
} }
Map<String ,Object> map=new HashMap<>(); Map<String ,Object> map=new HashMap<>();
map.put("skillType",skillType); map.put("skillType",skillType);
map.put("name", name);
PageBeanNew<PcloudSkill> page = pcloudSkillDao.listPageNew(new PageParam(currentPage, numPerPage), map, "getPcloudSkillList"); PageBeanNew<PcloudSkill> page = pcloudSkillDao.listPageNew(new PageParam(currentPage, numPerPage), map, "getPcloudSkillList");
if (ListUtils.isEmpty(page.getRecordList())){ if (ListUtils.isEmpty(page.getRecordList())){
return page; return page;
......
...@@ -58,10 +58,11 @@ public class PcloudSkillFacade { ...@@ -58,10 +58,11 @@ public class PcloudSkillFacade {
@RequestHeader("token") @ApiParam("token信息") String token, @RequestHeader("token") @ApiParam("token信息") String token,
@RequestParam(value = "skillType", required = false) @ApiParam("技能类型:1时间管理,2共读活动,3配套资料,4教辅书单,5配套老师,6音乐") Integer skillType, @RequestParam(value = "skillType", required = false) @ApiParam("技能类型:1时间管理,2共读活动,3配套资料,4教辅书单,5配套老师,6音乐") Integer skillType,
@RequestParam("currentPage") @ApiParam("当前页") Integer currentPage, @RequestParam("currentPage") @ApiParam("当前页") Integer currentPage,
@RequestParam("numPerPage") @ApiParam("每页条数") Integer numPerPage @RequestParam("numPerPage") @ApiParam("每页条数") Integer numPerPage,
@RequestParam(value = "name", required = false) @ApiParam("名称搜索")String name
) throws BizException, PermissionException { ) throws BizException, PermissionException {
SessionUtil.getVlaue(token, SessionUtil.PARTY_ID); SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
return new ResponseDto<>(pcloudSkillBiz.getPcloudSkillList(skillType,currentPage,numPerPage)); return new ResponseDto<>(pcloudSkillBiz.getPcloudSkillList(skillType,currentPage,numPerPage,name));
} }
@ApiOperation("获取技能列表-关联关键词选择") @ApiOperation("获取技能列表-关联关键词选择")
......
...@@ -68,13 +68,33 @@ ...@@ -68,13 +68,33 @@
</update> </update>
<select id="getPcloudSkillList" parameterType="map" resultMap="BaseResultMap"> <select id="getPcloudSkillList" parameterType="map" resultMap="BaseResultMap">
select <include refid="Base_Column_List"/> SELECT
from pcloud_skill s.id,
where 1=1 s.skill_type,
<if test="skillType!=null"> s.rel_skill_id,
and skill_type = #{skillType} s.skill_fuse_reply,
s.seq_num,
s.create_time
FROM
pcloud_skill s
LEFT JOIN time_control_task t ON s.rel_skill_id = t.task_id
AND s.skill_type = 1
LEFT JOIN pcloud_group_activity a ON s.rel_skill_id = a.id
AND s.skill_type = 2
LEFT JOIN pcloud_resource r ON s.rel_skill_id = r.id
AND s.skill_type = 3
WHERE 1=1
<if test="skillType != null">
and s.skill_type=#{skillType}
</if>
<if test="name != null">
and (
t.task_name like concat('%', #{name}, '%') or
a.`name` like concat('%', #{name}, '%') or
r.`name` like concat('%', #{name}, '%')
)
</if> </if>
order by seq_num order by s.seq_num
</select> </select>
<update id="updateSeqNum" parameterType="map"> <update id="updateSeqNum" parameterType="map">
......
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