提交实体类

This commit is contained in:
2023-06-29 16:16:25 +08:00
parent e6993927fc
commit 199c73c66e
8 changed files with 282 additions and 13 deletions

View File

@@ -10,7 +10,9 @@ import com.jsowell.adapay.service.AdapayMemberService;
import com.jsowell.adapay.vo.AdapayAccountBalanceVO;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.core.domain.AjaxResult;
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.util.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -37,6 +39,9 @@ public class AdapayMemberController extends BaseController {
logger.info("创建结算账户接口 param:{}", JSON.toJSONString(dto));
AjaxResult result;
try {
if (StringUtils.isBlank(dto.getMerchantId())) {
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
}
adapayMemberService.createSettleAccount(dto);
result = AjaxResult.success();
} catch (BusinessException e) {
@@ -56,10 +61,16 @@ public class AdapayMemberController extends BaseController {
public AjaxResult selectAdapayMember(@RequestBody AdapayMemberInfoDTO dto) {
AjaxResult result;
try {
if (StringUtils.isBlank(dto.getMerchantId())) {
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
}
Map<String, Object> map = adapayMemberService.selectAdapayMember(dto.getMerchantId());
result = AjaxResult.success(map);
} catch (BusinessException e) {
logger.warn("查询汇付会员接口异常warn", e);
result = AjaxResult.error(e.getMessage());
} catch (Exception e) {
logger.error("查询汇付会员接口异常", e);
logger.error("查询汇付会员接口异常error", e);
result = AjaxResult.error("查询汇付会员接口异常");
}
return result;