弹出窗口修改

This commit is contained in:
daihh
2022-12-23 13:23:00 +08:00
parent 7cba56ae80
commit 8975558101
3 changed files with 13 additions and 13 deletions

View File

@@ -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);
// }
/**

View File

@@ -18,7 +18,7 @@ public interface IPopupService {
* @param aid
* @return
*/
List<Popup> findForUser(String aid);
List<Popup> findForUser(String aid,Integer device);
/**

View File

@@ -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()) {