BackendController.java 703 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
package com.tanpu.fund.controller;

import com.tanpu.common.resp.CommonResp;
import com.tanpu.fund.job.FundNavCacheJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
public class BackendController  {

    @Resource
    private FundNavCacheJob fundNavCacheJob;

    @GetMapping("/cache/launch/nav")
    @ResponseBody
    public CommonResp launchFundNavReload() {
        this.fundNavCacheJob.execute();
        return CommonResp.success(System.currentTimeMillis());
    }
}