From eb6b6dbb35a9f029e0b7d269773685c19fd40976 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期四, 11 七月 2024 10:47:51 +0800 Subject: [PATCH] 玩湃微信商户认证代码 --- cloud-server-other/src/main/java/com/dsh/other/controller/SystemNoticeController.java | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/SystemNoticeController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/SystemNoticeController.java index 04c441b..5c91130 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/controller/SystemNoticeController.java +++ b/cloud-server-other/src/main/java/com/dsh/other/controller/SystemNoticeController.java @@ -8,13 +8,11 @@ import com.dsh.other.service.NoticeService; import com.dsh.other.service.PhoneService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; @@ -28,17 +26,17 @@ @Autowired private PhoneService phoneService; - private final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm"); + private final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm"); @PostMapping("/base/notice/queryNoticeDetails") - public List<SysNotice> getSysNoticeDetails(){ + public List<SysNotice> getSysNoticeDetails() { List<SysNotice> notices = new ArrayList<>(); List<Notice> list = noticeSers.list(new QueryWrapper<Notice>() .eq("state", 1) .eq("upOrDown", 1) .orderByDesc("insertTime")); - if (list.size() > 0 ){ + if (list.size() > 0) { list.forEach(noList -> { SysNotice notice = new SysNotice(); notice.setNoticeId(noList.getId()); @@ -53,10 +51,10 @@ @PostMapping("/base/notice/queryNotice") - public SysNotice getSysNoticeBuId(@RequestBody Integer noticeId){ + public SysNotice getSysNoticeBuId(@RequestParam("noticeId") Integer noticeId) { SysNotice sysNotice = new SysNotice(); Notice notice = noticeSers.getById(noticeId); - if (null != notice){ + if (null != notice) { sysNotice.setNoticeId(notice.getId()); sysNotice.setNoticeTitle(notice.getName()); sysNotice.setNoticeContents(notice.getContent()); @@ -67,11 +65,13 @@ @PostMapping("/base/notice/sysTell") - public List<String> queryCustomerTel(){ + public List<String> queryCustomerTel() { List<String> tellS = new ArrayList<>(); List<Phone> list = phoneService.list(); - if (list.size() > 0 ){ - tellS = list.stream().map(Phone::getPhone).collect(Collectors.toList()); + if (list.size() > 0) { + String phone = list.get(0).getPhone(); + String[] split = phone.split(","); + tellS = Arrays.asList(split); } return tellS; -- Gitblit v1.7.1