1
zj
2024-09-10 1c6748cbef6bf2348106b27fb47a74efff8a8b2e
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
39
40
41
42
43
44
45
46
47
package com.nq.controller;
 
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.nq.common.ServerResponse;
import com.nq.dao.RechargeAddressMapper;
import com.nq.pojo.RechargeAddress;
import com.nq.service.IUserRechargeService;
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.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
 
import javax.servlet.http.HttpServletRequest;
 
/**
 * @program: dabaogp
 * @description:
 * @create: 2024-07-26 11:06
 **/
@Controller
@RequestMapping({"/api/rechargeAddress/"})
public class RechargeAddressController {
 
    @Autowired
    private RechargeAddressMapper mapper;
 
    @Autowired
    IUserRechargeService iUserRechargeService;
 
    @RequestMapping(value = {"select.do"})
    @ResponseBody
    public ServerResponse select(@RequestParam("currency") String currency) {
        return ServerResponse.createBySuccess(mapper.selectList(new LambdaQueryWrapper<RechargeAddress>().eq(RechargeAddress::getCurrency,currency)));
    }
 
 
    @RequestMapping(value = {"createUSDTOrder.do"})
    @ResponseBody
    public ServerResponse createUSDTOrder(@RequestParam("userId") Integer userId,
                                          @RequestParam("amt") Integer amt,
                                          @RequestParam("img") String img,
                                          HttpServletRequest request) {
        return ServerResponse.createBySuccess(iUserRechargeService.createUSDTOrder(userId,amt,img,request));
    }
}