xie.kaifeng 7 mēneši atpakaļ
vecāks
revīzija
6460b6dc2c

+ 7 - 0
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/CommonController.java

@@ -395,6 +395,13 @@ public class CommonController {
         return iCommonService.queryAccountId(userid, request);
     }
 
+    @RequestMapping(method = RequestMethod.GET, value = "queryAccountIdForMarket")
+    @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
+    @ApiOperation("做市会员获取资金账户信息")
+    public AjaxResult<Taaccount> queryAccountIdForMarket(Long userid, HttpServletRequest request) {
+        return iCommonService.queryAccountIdForMarket(userid, request);
+    }
+
     @RequestMapping(method = RequestMethod.GET, value = "queryUserinfoByUserId")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     @ApiOperation("获取用户信息")

+ 2 - 0
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ICommonService.java

@@ -82,4 +82,6 @@ public interface ICommonService {
     AjaxResult<OrganSelectResult> queryExchSonOrgin(OrganSelectParam vo, HttpServletRequest request);
 
     AjaxResult<WskhOpenaccountconfig> queryConfig(Long configid, HttpServletRequest request);
+
+    AjaxResult<Taaccount> queryAccountIdForMarket(Long userid, HttpServletRequest request);
 }

+ 19 - 9
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/CommonServiceImpl.java

@@ -50,6 +50,7 @@ import java.nio.file.Paths;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.*;
+import java.util.stream.Collectors;
 
 @Service
 public class CommonServiceImpl implements ICommonService {
@@ -389,22 +390,22 @@ public class CommonServiceImpl implements ICommonService {
 
         if (checkType == 1) {
             wskhUserinfoList = iWskhUserinfoMapper.selectCount(new QueryWrapper<WskhUserinfo>()
-                    .eq(checkField == 1,"cardnum", message)
-                    .eq(checkField == 2,"mobile", message)
+                    .eq(checkField == 1, "cardnum", message)
+                    .eq(checkField == 2, "mobile", message)
                     .ne(userid != null, "userid", userid));
         } else if (checkType == 2) {
             userinfoList = iUserinfoMapper.selectCount(new QueryWrapper<Userinfo>()
-                    .eq(checkField == 1,"cardnum", message)
-                    .eq(checkField == 2,"mobile", message)
+                    .eq(checkField == 1, "cardnum", message)
+                    .eq(checkField == 2, "mobile", message)
                     .ne(userid != null, "userid", userid));
         } else if (checkType == 3) {
             wskhUserinfoList = iWskhUserinfoMapper.selectCount(new QueryWrapper<WskhUserinfo>()
-                    .eq(checkField == 1,"cardnum", message)
-                    .eq(checkField == 2,"mobile", message)
+                    .eq(checkField == 1, "cardnum", message)
+                    .eq(checkField == 2, "mobile", message)
                     .ne(userid != null, "userid", userid));
             userinfoList = iUserinfoMapper.selectCount(new QueryWrapper<Userinfo>()
-                    .eq(checkField == 1,"cardnum", message)
-                    .eq(checkField == 2,"mobile", message)
+                    .eq(checkField == 1, "cardnum", message)
+                    .eq(checkField == 2, "mobile", message)
                     .ne(userid != null, "userid", userid));
         }
         return wskhUserinfoList + userinfoList == 0;
@@ -798,13 +799,22 @@ public class CommonServiceImpl implements ICommonService {
     @Override
     public AjaxResult<WskhOpenaccountconfig> queryConfig(Long configid, HttpServletRequest request) {
         // 获取网上开户参数54:手持证件照是否显示
-        WskhOpenaccountconfig config = iWskhOpenaccountconfigMapper.selectOne(new QueryWrapper<WskhOpenaccountconfig>().eq("configid",configid));
+        WskhOpenaccountconfig config = iWskhOpenaccountconfigMapper.selectOne(new QueryWrapper<WskhOpenaccountconfig>().eq("configid", configid));
         if (config != null && StringUtils.isNotBlank(config.getConfigvalue())) {
             return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), config);
         }
         return AjaxResult.error(Constants.Success_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
     }
 
+    @Override
+    public AjaxResult<Taaccount> queryAccountIdForMarket(Long userid, HttpServletRequest request) {
+        List<Enumdicitem> eiList = iEnumdicitemMapper.selectList(new QueryWrapper<Enumdicitem>().eq("enumdiccode", "currency"));
+        List<Integer> integers = eiList.stream().map(Enumdicitem::getEnumitemname).collect(Collectors.toList());
+        List<Taaccount> list = iTaaccountMapper.selectList(new QueryWrapper<Taaccount>()
+                .eq("userid", userid).in("currencyid", integers));
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), list);
+    }
+
 
     public List<TaAccountQueryResult> queryTAAccount(TaAccountReportParam param) {
         return iTaaccountMapper.queryTAAccount(param);