管理员功能

This commit is contained in:
peihaoyu 2020-09-29 08:43:11 +08:00
parent 9b5a81ba11
commit 9125904cda
10 changed files with 87 additions and 5 deletions

View File

@ -107,4 +107,17 @@ public class AdminHSController {
return result;
}
/**
* 获取文我的页面未操作数字
* @param param
* @return
*/
@PostMapping("/getMyPageNumber")
@ResponseBody
public Map<String, Object> getMyPageNumber(@RequestBody Map<String,Object> param){
Map<String, Object> result = new HashMap<>();
result = AdminhsService.getMyPageNumber(param);
return result;
}
}

View File

@ -444,13 +444,12 @@ public class HSController {
}
/**
* 测试接口
* 获取首页tabBar标记数字
*/
@PostMapping("/test")
@PostMapping("/getTabBarNumber")
@ResponseBody
public Map<String, Object> test(String page, String limit){
Map<String, Object> result = new HashMap<>();
public Map<String, Object> getTabBarNumber(@RequestBody Map<String,Object> param){
Map<String,Object> result = hsService.getTabBarNumber(param);
return result;
}

View File

@ -52,4 +52,11 @@ public interface AdminHSMapper {
* @return
*/
int answerHelp(Map<String, Object> param);
/**
* 获取文我的页面未操作数字
* @param param
* @return
*/
Map<String, Object> getMyPageNumber(Map<String, Object> param);
}

View File

@ -294,4 +294,11 @@ public interface HSLinkMapper {
* @return
*/
int updateReadNumber(Map<String, Object> param);
/**
* 获取tabBar数字(未读消息)
* @param param
* @return
*/
int getTabBarUnreadNumber(Map<String, Object> param);
}

View File

@ -69,4 +69,11 @@
ORDER BY create_time desc
</select>
<!--获取文我的页面未操作数字-->
<select id="getMyPageNumber" resultType="map" parameterType="map">
SELECT
( SELECT count( * ) FROM hs_notice WHERE STATUS = '1' AND is_pass = '0' AND type != "班级通知" ) articleManagementNumber,
( SELECT count( * ) FROM hs_help h WHERE answer_id IS NULL ) helpAnswerNumber
</select>
</mapper>

View File

@ -551,4 +551,10 @@
release_time DESC
</select>
<!--获取tabBar数字(未读消息)-->
<select id="getTabBarUnreadNumber" resultType="int" parameterType="map">
select count(*) unreadNumber from hs_private_letter
where receive_id = #{userId} and already_read = '0'
</select>
</mapper>

View File

@ -48,4 +48,11 @@ public interface AdminHSService {
* @return
*/
Map<String, Object> answerHelp(Map<String, Object> param);
/**
* 获取文我的页面未操作数字
* @param param
* @return
*/
Map<String, Object> getMyPageNumber(Map<String, Object> param);
}

View File

@ -258,4 +258,11 @@ public interface HSService {
* @return
*/
Map<String, Object> updateReadNumber(Map<String, Object> param);
/**
* 获取首页tabBar标记数字
* @param param
* @return
*/
Map<String, Object> getTabBarNumber(Map<String, Object> param);
}

View File

@ -126,4 +126,18 @@ public class AdminHSServiceImpl implements AdminHSService {
result.put("success",true);
return result;
}
/**
* 获取文我的页面未操作数字
* @param param
* @return
*/
@Override
public Map<String, Object> getMyPageNumber(Map<String, Object> param) {
Map<String, Object> result = new HashMap<>();
Map<String, Object> res = adminHSMapper.getMyPageNumber(param);
result.put("data",res);
result.put("success",true);
return result;
}
}

View File

@ -700,6 +700,21 @@ public class HSServiceImpl implements HSService {
return result;
}
/**
* 获取tabBar数字
* @param param
* @return
*/
@Override
public Map<String, Object> getTabBarNumber(Map<String, Object> param) {
Map<String, Object> result = new HashMap<>();
Map<String, Object> res = new HashMap<>();
res.put("unreadNumber",hsLinkMapper.getTabBarUnreadNumber(param));
result.put("data",res);
result.put("success",true);
return result;
}
/**
* 返回参数
* @param flag