首页>代码>ssm微信小程序物业管理系统,有网站后台管理系统>/SheQu/src/main/java/com/shequ/controller/api/MessageApi.java
01package com.shequ.controller.api;
02 
03import com.alibaba.fastjson.JSON;
04import com.shequ.pojo.Message;
05import com.shequ.service.MessageService;
06import com.shequ.service.RepairService;
07import org.springframework.beans.factory.annotation.Autowired;
08import org.springframework.stereotype.Controller;
09import org.springframework.web.bind.annotation.*;
10 
11import java.util.List;
12 
13 
14@Controller
15public class MessageApi {
16    @Autowired
17    MessageService messageService;
18    @Autowired
19    RepairService repairService;
20 
21    /*
22    微信小程序端提供json接口的。显示社区公告数据
23     */
24    @ResponseBody
25    @RequestMapping(value = "/getAllMessage",produces="application/json;charset=UTF-8")
26    public String findAllMessage(){
27        List<Message> messages = messageService.findAllMessage();
28        String result = JSON.toJSONString(messages);
29        return result;
30    }
31 
32}
最近下载更多
DFwang  LV5 3月14日
新哥新奇士橙  LV4 1月26日
zolscy  LV24 2024年11月27日
唐僧洗头爱飘柔  LV22 2024年9月13日
lo8lukoukoum  LV4 2024年4月9日
ningningnn  LV3 2024年2月24日
晴曛  LV6 2023年12月29日
阿狸哦  LV2 2023年12月2日
lzpsuifeng  LV3 2023年10月13日
348835269  LV11 2023年9月27日
最近浏览更多
xiaotao555555  LV3 6月22日
wahukkk  LV1 6月22日
yifeng868  LV9 6月10日
kele819  LV2 5月26日
sgm123456  LV14 5月26日
lkke23047  LV1 5月26日
chengguo123 4月2日
暂无贡献等级
哪里的完整版  LV8 4月1日
lipiao161  LV16 3月15日
DFwang  LV5 3月14日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友