完成小程序帮助管理

This commit is contained in:
little-cat-sweet 2021-08-04 18:02:05 +08:00
parent 57a37b3ba7
commit ebd3a33a0f
4 changed files with 43 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import com.xhpc.general.domain.HelpEntity;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 帮助Mapper接口
@ -30,6 +31,10 @@ public interface XhpcHelpMapper {
HelpEntity selectHelpItem(@Param("helpId") Long helpId);
List<Map<String,Object>> selectTitleId(@Param("type") Integer type);
Map<String,Object> selectDetails(@Param("helpId") Long helpId);
}

View File

@ -4,6 +4,7 @@ import com.xhpc.common.core.web.domain.AjaxResult;
import com.xhpc.general.domain.HelpEntity;
import java.util.List;
import java.util.Map;
/**帮助service接口
* program: ruoyi
@ -34,4 +35,13 @@ public interface IXhpcHelpService {
List<HelpEntity> selectHelpItems(String title, String createBy, Integer type);
AjaxResult selectHelpItem(Long helpId);
List<Map<String,Object>> selectTitleId(Integer type);
/**
* Getting the title,content by its's helpId which will be used by small app.
* @param helpId
* @return
*/
Map<String,Object> selectDetails(Long helpId);
}

View File

@ -9,6 +9,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
/**
* 帮助Service业务层处理
@ -108,4 +109,17 @@ public class XhpcHelpServiceImpl implements IXhpcHelpService{
return AjaxResult.success(xhpcHelpMapper.selectHelpItem(helpId));
}
@Override
public List<Map<String, Object>> selectTitleId(Integer type) {
return xhpcHelpMapper.selectTitleId(type);
}
@Override
public Map<String, Object> selectDetails(Long helpId) {
return xhpcHelpMapper.selectDetails(helpId);
}
}

View File

@ -57,5 +57,19 @@
where help_id=#{helpId}
</select>
<select id="selectTitleId" resultType="map">
select help_id as helpId,title
from xhpc_help
where type=#{type}
</select>
<select id="selectDetails" resultType="map">
select title,content
from xhpc_help
where help_id=#{helpId}
</select>
</mapper>