提交 efe56615 作者: xiaowang

法大大认证信息、钱包优化

上级 6eb9c8c6
......@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
/**
......@@ -79,7 +80,7 @@ public class UserFddAuthController extends BaseController {
@ApiOperation(value = "获取认证信息")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = UserFddDTO.class)})
@GetMapping("getAppUserFddInfo")
public ResultBody<UserFddDTO> getAppUserFddInfo(@ApiParam(value = "端口:0小程序 1后台") @RequestParam Integer port, HttpServletRequest request) {
public ResultBody<List<UserFddDTO>> getAppUserFddInfo(@ApiParam(value = "端口:0小程序 1后台") @RequestParam Integer port, HttpServletRequest request) {
return userFddAuthService.getAppUserFddInfo(port, this.getUserLoginInfoFromRedis(request));
}
......
......@@ -11,6 +11,7 @@ import com.mmc.iuav.user.model.vo.wallet.WalletFlowVO;
import com.mmc.iuav.user.service.wallet.PayWalletService;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
......@@ -57,6 +58,14 @@ public class PayWalletController extends BaseController {
return payWalletService.feignWalletFlow(walletFlowVO);
}
@ApiOperation(value = "feign-钱包流水记录(优化版)")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("optimizeWalletFlow")
@ApiIgnore
public ResultBody optimizeWalletFlow(@RequestBody WalletFlowVO walletFlowVO) {
return payWalletService.optimizeWalletFlow(walletFlowVO);
}
@ApiOperation(value = "feign-钱包流水记录不带token")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("feignWalletFlowNO")
......
......@@ -2,6 +2,7 @@ package com.mmc.iuav.user.dao;
import com.mmc.iuav.user.entity.UserAccountDO;
import com.mmc.iuav.user.entity.UserRcdDO;
import com.mmc.iuav.user.entity.fdd.UserFddDO;
import com.mmc.iuav.user.model.qo.UserAccountQO;
import com.mmc.iuav.user.model.qo.UserRcdQO;
import org.apache.ibatis.annotations.Mapper;
......@@ -168,4 +169,5 @@ public interface UserServiceDao {
UserAccountDO getUserAccountInfoByOpenId(String openid);
List<UserFddDO> listUserFddInfo(@Param(value = "unionId") String unionId, @Param(value = "openid") String openid);
}
......@@ -5,6 +5,7 @@ import com.mmc.iuav.response.ResultBody;
import com.mmc.iuav.user.model.dto.LoginSuccessDTO;
import com.mmc.iuav.user.model.fdd.dto.UserFddDTO;
import java.util.List;
import java.util.Map;
/**
......@@ -25,7 +26,7 @@ public interface UserFddAuthService {
String replaceUnableString(String uid);
ResultBody<UserFddDTO> getAppUserFddInfo(Integer port, LoginSuccessDTO loginSuccessDTO);
ResultBody<List<UserFddDTO>> getAppUserFddInfo(Integer port, LoginSuccessDTO loginSuccessDTO);
ResultBody getFileByUuid(String uuid, String docType);
......
......@@ -15,6 +15,7 @@ import com.mmc.iuav.user.entity.UserAccountDO;
import com.mmc.iuav.user.entity.fdd.FddVerifyInfoDO;
import com.mmc.iuav.user.entity.fdd.UserFddDO;
import com.mmc.iuav.user.model.dto.LoginSuccessDTO;
import com.mmc.iuav.user.model.fdd.dto.UserFddDTO;
import com.mmc.iuav.user.model.fdd.resp.CompanyVerifyResp;
import com.mmc.iuav.user.model.fdd.resp.PersonVerifyResp;
import com.mmc.iuav.user.service.fdd.FddService;
......@@ -23,7 +24,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* author:zhenjie
......@@ -242,16 +245,19 @@ public class UserFddAuthServiceImpl implements UserFddAuthService {
@Override
public ResultBody getAppUserFddInfo(Integer port, LoginSuccessDTO loginSuccessDTO) {
public ResultBody<List<UserFddDTO>> getAppUserFddInfo(Integer port, LoginSuccessDTO loginSuccessDTO) {
String uId;
String openid;
if (port == 0) {
UserAccountDO userInfo = userServiceDao.getUserAccountById(loginSuccessDTO.getUserAccountId());
uId = this.replaceUnableString(userInfo.getUnionId());
openid = this.replaceUnableString(userInfo.getOpenId());
} else {
uId = loginSuccessDTO.getUserAccountId().toString();
openid = null;
}
UserFddDO appUserFddDO = userFddAuthDao.getAppUserFddInfo(uId);
return ResultBody.success(appUserFddDO == null ? null : appUserFddDO.buildUserFddDTO());
List<UserFddDO> userFddDO = userServiceDao.listUserFddInfo(uId, openid);
return ResultBody.success(userFddDO == null ? null : userFddDO.stream().map(UserFddDO::buildUserFddDTO).collect(Collectors.toList()));
}
private CompanyVerifyResp reqCompanyVerifyUrl(String customerId) {
......
......@@ -25,5 +25,6 @@ public interface PayWalletService {
ResultBody billingDetails(Integer id, String detailType);
ResultBody payUavWallet(PayUavWalletVO payUavWalletVO);
ResultBody optimizeWalletFlow(WalletFlowVO walletFlowVO);
}
......@@ -462,5 +462,22 @@
where open_id = #{openid}
and disable = 0
</select>
<select id="listUserFddInfo" resultType="com.mmc.iuav.user.entity.fdd.UserFddDO">
select id,
customer_id,
union_id,
person_verify_status,
ent_verify_status,
account_type,
create_time,
update_time
from user_fdd
<where>
union_id = #{unionId}
<if test="openid != null">
or union_id = #{openid}
</if>
</where>
</select>
</mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论