zyy
2025-07-10 61202ae3cb115ae13f3f646764c0f36f27f5392f
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
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.nq.controller;
 
import com.nq.common.ServerResponse;
import com.nq.pojo.ExchangeRate;
import com.nq.service.ExchangeRateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
 
import javax.servlet.http.HttpServletRequest;
 
/**
 * 汇率管理
 */
@Controller
@RequestMapping({"/stock/rate"})
public class ExchangeRateController {
 
    @Autowired
    ExchangeRateService exchangeRateService;
 
    //查询汇率列表
    @RequestMapping({"getInfo.do"})
    @ResponseBody
    public ServerResponse getInfo(@RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
                                  @RequestParam(value = "pageSize", defaultValue = "15") int pageSize) {
        return exchangeRateService.getInfo(pageNum, pageSize);
    }
 
    //修改汇率
    @RequestMapping({"updateRate.do"})
    @ResponseBody
    public ServerResponse updateRate(ExchangeRate model, HttpServletRequest request) {
        return exchangeRateService.updateRate(model, request);
    }
}