新增时间工具,前端显示的时间不要秒
This commit is contained in:
parent
bcfcef4395
commit
cd2c8248f8
|
@ -47,6 +47,10 @@ public class IPOController {
|
|||
@Value("${logo_link.id}")
|
||||
private Integer linkId;
|
||||
|
||||
/**
|
||||
* 查询数据库中所有的ipo
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/ipos/all")
|
||||
public Result allIPOs(){
|
||||
|
||||
|
@ -57,6 +61,10 @@ public class IPOController {
|
|||
return Result.success(ipos);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ipo 的listing_date查询ipo,要求now<listingDate,并添加logo的链接
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/ipos/listv1")
|
||||
@Cacheable(cacheNames = "todayIpos")
|
||||
@Transactional
|
||||
|
@ -81,6 +89,7 @@ public class IPOController {
|
|||
iporedata.setLogoLink(logoLink);
|
||||
iporedata.setDateTime(TimeUtil.formatTime(lasttime));
|
||||
iporedata.setListingDate(TimeUtil.formatTime(listingtime));
|
||||
|
||||
iporedata.setGraph(dataForGraph);
|
||||
|
||||
|
||||
|
@ -92,7 +101,11 @@ public class IPOController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据前端传给后端的日期值来查询listingDate,返回给前端listingDate是那一天的所有IPO
|
||||
* @param dateString
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/ipos/listingData")
|
||||
@Cacheable(cacheNames = "onedayIpos",key="#dateString")
|
||||
public Result onedayIpos(String dateString) {
|
||||
|
|
|
@ -49,6 +49,11 @@ public class IPOReferenceDataController {
|
|||
@Value("${logo_link.id}")
|
||||
private Integer linkId;
|
||||
|
||||
/**
|
||||
*根据ipoID查询相对应的IPO的详细信息,并附上logo链接和PDF下载链接,还有Dashbord的public的图graph
|
||||
* @param ipoID
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/ipo/refdata/v1")
|
||||
@Cacheable(cacheNames = "homepage",key="#ipoID")
|
||||
public Result result(String ipoID){
|
||||
|
@ -82,6 +87,11 @@ public class IPOReferenceDataController {
|
|||
return Result.success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据前端要求,通过ipoID筛选companyInformation字段信息返回
|
||||
* @param ipoID
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/ipo/refdata/companyInformation")
|
||||
@Cacheable(cacheNames = "CI",key="#ipoID")
|
||||
public Result resultCI(String ipoID){
|
||||
|
@ -99,7 +109,11 @@ public class IPOReferenceDataController {
|
|||
|
||||
return Result.success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据前端要求,通过ipoID筛选typeOfListing字段信息返回
|
||||
* @param ipoID
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/ipo/refdata/typeOfListing")
|
||||
@Cacheable(cacheNames = "TOL",key="#ipoID")
|
||||
public Result resultTOL(String ipoID){
|
||||
|
@ -113,6 +127,11 @@ public class IPOReferenceDataController {
|
|||
return Result.success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据前端要求,通过ipoID筛选offering字段信息返回
|
||||
* @param ipoID
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/ipo/refdata/offering")
|
||||
@Cacheable(cacheNames = "OFF",key="#ipoID")
|
||||
public Result resultOffering(String ipoID){
|
||||
|
@ -126,7 +145,11 @@ public class IPOReferenceDataController {
|
|||
return Result.success(data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据前端传入的关键字,使用sql进行模糊查询
|
||||
* @param keyword
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/ipo/refdata/search")
|
||||
public Result search(String keyword){
|
||||
|
||||
|
@ -135,6 +158,11 @@ public class IPOReferenceDataController {
|
|||
return Result.success(search);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ipoID查询字段,给前端的Dashboard里的日历提供数据
|
||||
* @param ipoID
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/ipo/refdata/calendar")
|
||||
@Cacheable(cacheNames = "calendar",key="#ipoID")
|
||||
public Result calendar(String ipoID){
|
||||
|
@ -145,15 +173,30 @@ public class IPOReferenceDataController {
|
|||
return Result.success(ipoReferenceData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 主页的帅选功能,根据前端传回的字段,筛选相应的内容,支持多条件筛选
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/ipo/refdata/filter")
|
||||
public Result getData(@RequestBody Map<String, Object> params) {
|
||||
|
||||
List<IPOReferenceData> data = ipoReferenceDataService.selectByConditions(params);
|
||||
LogoLink link = logoLinkService.link(linkId);
|
||||
|
||||
|
||||
for (IPOReferenceData ipo : data) {
|
||||
|
||||
ipo.setListingDate(TimeUtil.formatTime(ipo.getListingDate()));
|
||||
|
||||
try {
|
||||
String logoLink= link.getLogoLinkPre()+ipo.getIpoID()+link.getLogoLinkSuf();
|
||||
|
||||
ipo.setLogoLink(logoLink);
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (Objects.isNull(data)){
|
||||
|
|
Loading…
Reference in New Issue