mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-09 19:06:49 +08:00
弹出窗口修改
This commit is contained in:
@@ -23,9 +23,9 @@ public class PopupApi extends ApiBaseController {
|
||||
* 前端查询,只是查询出对于当前用户来说需要弹出的
|
||||
* */
|
||||
@GetMapping("/user")
|
||||
public JsonResponse<List<Popup>> userList(){
|
||||
public JsonResponse<List<Popup>> userList(Integer device){
|
||||
String aid=getCurrent().getAccountId();
|
||||
List<Popup> list = service.findForUser(aid);
|
||||
List<Popup> list = service.findForUser(aid,device);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@@ -48,14 +48,14 @@ public class PopupApi extends ApiBaseController {
|
||||
|
||||
|
||||
|
||||
@GetMapping("/find-user")
|
||||
public JsonResponse<List<Popup>> findForUser(String aid){
|
||||
if(StringUtil.isBlank(aid)){
|
||||
aid=this.getCurrent().getAccountId();
|
||||
}
|
||||
List<Popup> forUser = service.findForUser(aid);
|
||||
return success(forUser);
|
||||
}
|
||||
// @GetMapping("/find-user")
|
||||
// public JsonResponse<List<Popup>> findForUser(String aid){
|
||||
// if(StringUtil.isBlank(aid)){
|
||||
// aid=this.getCurrent().getAccountId();
|
||||
// }
|
||||
// List<Popup> forUser = service.findForUser(aid);
|
||||
// return success(forUser);
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,7 +18,7 @@ public interface IPopupService {
|
||||
* @param aid
|
||||
* @return
|
||||
*/
|
||||
List<Popup> findForUser(String aid);
|
||||
List<Popup> findForUser(String aid,Integer device);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -80,10 +80,10 @@ public class PopupServiceImpl implements IPopupService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Popup> findForUser(String aid) {
|
||||
public List<Popup> findForUser(String aid,Integer nodevice) {
|
||||
//根据时间查询,查询出时间内需要弹出的内容
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
List<Popup> list=popupDao.findList(FieldFilters.le("p.startTime",now),FieldFilters.ge("p.endTime",now));
|
||||
List<Popup> list=popupDao.findList(FieldFilters.le("startTime",now),FieldFilters.ge("endTime",now),FieldFilters.ne("device",nodevice));
|
||||
List<Popup> rslist=new ArrayList<Popup>();
|
||||
for(Popup p: list) {
|
||||
if(p.getOnce()!=null && p.getOnce()) {
|
||||
|
||||
Reference in New Issue
Block a user