feat: There is no way the, 动态消息库

This commit is contained in:
super_liu
2022-06-02 16:40:25 +08:00
parent 4ee85aed5b
commit 0215ed71ae
5 changed files with 196 additions and 4 deletions
@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
/**
@@ -38,13 +39,25 @@ public class NewsFeedController extends BaseController<NewsFeed> {
@GetMapping("/getNewsFeed")
public ResponseMessage<IPage<NewsFeed>> NewFeedPage(NewsFeedPage page){
IPage<NewsFeed> iPage = new Page<>();
iPage.setCurrent(page.getPage());
iPage.setSize(page.getPageSize());
iPage.setTotal(page.getPage());
List<String> list = new ArrayList<>();
if("GNWBZFG".equals(page.getMessageType())){
list.add("hc99551723c");
}else if("ZYBZFG".equals(page.getMessageType())){
list.add("hya6gay4vx");
list.add("8rjsx83ows");
list.add("ncb6osftj8");
list.add("3dx7oy5jff");
}else if("QYBZFB".equals(page.getMessageType())){
list.add("6jnqba2mby");
}
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq(StringUtils.isNotEmpty(page.getStandardId()),"STANDARD_ID",page.getStandardId());
queryWrapper.eq(StringUtils.isNotEmpty(page.getStandardName()),"STANDARD_NAME",page.getStandardName());
queryWrapper.eq("MESSAGE_TYPE",page.getMessageType());
queryWrapper.orderByDesc("UPDATE_TIME");
queryWrapper.in("TEXT_STATE",list);
queryWrapper.orderByDesc("RENEW_TIME");
IPage<NewsFeed> newsFeedList = newsFeedService.page(iPage,queryWrapper);
return Result.success(newsFeedList);
}
@@ -3,6 +3,7 @@ package com.adc.da.slrs.NewsFeed.entity;
import com.adc.da.base.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -59,5 +60,6 @@ public class NewsFeed extends BaseEntity {
@TableField("RENEW_TIME")
@ApiModelProperty(value = "更新时间")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date renewTime;
}
@@ -9,7 +9,6 @@ import org.springframework.stereotype.Service;
* @Date: 2022/5/23 0023 15:01
* @Version 1.0
*/
@Service
public interface INewsFeedService extends IService<NewsFeed> {
int insertNewsFeed(NewsFeed newsFeed);
}