mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-10 03:16:48 +08:00
增加一个弹出用户记录
This commit is contained in:
@@ -17,6 +17,17 @@ public class PopupApi extends ApiBaseController {
|
||||
|
||||
@Resource
|
||||
IPopupService service;
|
||||
|
||||
|
||||
/**
|
||||
* 前端查询,只是查询出对于当前用户来说需要弹出的
|
||||
* */
|
||||
@PostMapping("/user")
|
||||
public JsonResponse<List<Popup>> userList(){
|
||||
String aid=getCurrent().getAccountId();
|
||||
List<Popup> list = service.findForUser(aid);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,10 +15,12 @@ import java.time.LocalDateTime;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Entity
|
||||
@Table(name = SysConstant.TABLE_PRE+"popup")
|
||||
public class Popup extends IdEntity {
|
||||
public class Popup extends IdEntity {
|
||||
|
||||
|
||||
/**
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
* */
|
||||
@Column(name = "start_time")
|
||||
@@ -81,10 +83,4 @@ public class Popup extends IdEntity {
|
||||
private String url;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.xboe.module.popup.entity;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import com.xboe.core.SysConstant;
|
||||
import com.xboe.core.orm.IdEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 弹出用户记录
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Entity
|
||||
@Table(name = SysConstant.TABLE_PRE+"popup_user")
|
||||
public class PopupUser extends IdEntity{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Column(name = "popup_id",length=20)
|
||||
private String popupId;
|
||||
|
||||
@Column(name = "aid",length=20)
|
||||
private String aid;
|
||||
|
||||
/**状态默认是1,表已弹出过*/
|
||||
@Column(name = "status",length=1)
|
||||
private Boolean status;
|
||||
|
||||
}
|
||||
@@ -12,6 +12,13 @@ public interface IPopupService {
|
||||
* 后台弹窗管理列表
|
||||
* */
|
||||
List<Popup> list(Popup popup);
|
||||
|
||||
/**
|
||||
* 查询当前用户需要弹出的
|
||||
* @param aid
|
||||
* @return
|
||||
*/
|
||||
List<Popup> findForUser(String aid);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -70,4 +70,11 @@ public class PopupServiceImpl implements IPopupService {
|
||||
public void delete(String id) {
|
||||
popupDao.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Popup> findForUser(String aid) {
|
||||
//根据时间查询,在时间内的。
|
||||
//如果一个用户只弹一次,还要结合 PopupUser 查询,
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user