|
@@ -0,0 +1,44 @@
|
|
|
|
+package com.fjhx.common.controller.currency;
|
|
|
|
+
|
|
|
|
+import com.fjhx.common.entity.currency.po.CurrencyRate;
|
|
|
|
+import com.fjhx.common.service.currency.CurrencyRateService;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
+
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * <p>
|
|
|
|
+ * 币种默认汇率 前端控制器
|
|
|
|
+ * </p>
|
|
|
|
+ *
|
|
|
|
+ * @author
|
|
|
|
+ * @since 2023-04-24
|
|
|
|
+ */
|
|
|
|
+@RestController
|
|
|
|
+@RequestMapping("/currencyRate")
|
|
|
|
+public class CurrencyRateController {
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private CurrencyRateService currencyRateService;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 币种默认汇率列表
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("/list")
|
|
|
|
+ public List<CurrencyRate> list() {
|
|
|
|
+ return currencyRateService.getList();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 币种默认汇率编辑
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("/edit")
|
|
|
|
+ public void edit(@RequestBody List<CurrencyRate> currencyRateList) {
|
|
|
|
+ currencyRateService.edit(currencyRateList);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|