Authored by csgyoho

用户绑定银行卡

package com.yoho.unions.dal;
import com.yoho.service.model.union.request.UnionShareUserBankListReqBo;
import com.yoho.service.model.union.response.UnionShareUserBankListRspBO;
import com.yoho.unions.dal.model.UnionShareUserBank;
import java.util.List;
... ... @@ -18,4 +20,6 @@ public interface UnionShareUserBankMapper {
int updateByPrimaryKeySelective(UnionShareUserBank record);
int updateByPrimaryKey(UnionShareUserBank record);
List<UnionShareUserBankListRspBO> selectByCondition(UnionShareUserBankListReqBo parm);
}
\ No newline at end of file
... ...
... ... @@ -31,6 +31,33 @@
and status = #{status,jdbcType=INTEGER}
</if>
</select>
<select id="selectByCondition"
resultType="com.yoho.service.model.union.response.UnionShareUserBankListRspBO"
parameterType="com.yoho.service.model.union.request.UnionShareUserBankListReqBo">
select id, uid, id_card_no idCardNo, name, bank_card_no bankCardNo, bank_name bankName,
bank_code bankCode, status, create_time createTime, update_time updateTime
from union_share_user_bank
where 1=1
<if test="uid != null">
and uid=#{uid}
</if>
<if test="idCardNo != null">
and id_card_no=#{idCardNo}
</if>
<if test="name != null">
and name=#{name}
</if>
<if test="bankName != null">
and bank_name=#{bankName}
</if>
<if test="bankCode != null">
and bank_code=#{bankCode}
</if>
<if test="bankCardNo != null">
and bank_card_no=#{bankCardNo}
</if>
order by id desc limit #{start},#{size}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from union_share_user_bank
where id = #{id,jdbcType=INTEGER}
... ...
... ... @@ -4,14 +4,12 @@ import com.yoho.core.common.utils.JsonUtil;
import com.yoho.service.model.union.bo.*;
import com.yoho.service.model.union.request.UnionShareOrderReqBO;
import com.yoho.service.model.union.request.UnionShareOrderSearchReqBO;
import com.yoho.service.model.union.response.PageResponseBO;
import com.yoho.service.model.union.response.PageUnionShareOrderRspBO;
import com.yoho.service.model.union.response.UnionResponse;
import com.yoho.service.model.union.request.UnionShareUserApplyListReqBo;
import com.yoho.service.model.union.request.UnionShareUserBankListReqBo;
import com.yoho.service.model.union.response.*;
import com.yoho.unions.common.ApiResponse;
import com.yoho.unions.dal.model.UnionShareOrders;
import com.yoho.unions.dal.model.UnionShareSettlement;
import com.yoho.unions.dal.model.UnionShareUser;
import com.yoho.unions.dal.model.UnionShareUserBank;
import com.yoho.unions.server.service.IUnionShareService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
... ... @@ -145,6 +143,32 @@ public class UnionShareRest {
}
/**
* 查询户绑定银行卡信息
* @param parm
* @return
*/
@RequestMapping("/queryUnionShareUserBanks")
@ResponseBody
public UnionResponse queryUnionShareUserBanks(@RequestBody UnionShareUserBankListReqBo parm){
log.info("queryUnionShareUserBanks parm is {}", parm);
List<UnionShareUserBankListRspBO> result = unionShareService.queryUnionShareUserBanks(parm);
return new UnionResponse(200, "queryUnionShareUserBanks success",result);
}
/**
* 查询申请记录
* @param parm
* @return
*/
@RequestMapping("/queryUnionShareUserApplys")
@ResponseBody
public UnionResponse queryUnionShareUserApplys(@RequestBody UnionShareUserApplyListReqBo parm){
log.info("queryUnionShareUserApplys parm is {}", parm);
List<UnionShareUserApplyListRspBo> result = unionShareService.queryUnionShareUserApplys(parm);
return new UnionResponse(200, "queryUnionShareUserApplys success",result);
}
/**
* 订单明细
* Created by qing.zhao on 2018/5/15
* @param unionShareOrderReqBO
... ...
... ... @@ -3,12 +3,14 @@ package com.yoho.unions.server.service;
import com.yoho.service.model.union.bo.*;
import com.yoho.service.model.union.request.UnionShareOrderReqBO;
import com.yoho.service.model.union.request.UnionShareOrderSearchReqBO;
import com.yoho.service.model.union.request.UnionShareUserApplyListReqBo;
import com.yoho.service.model.union.request.UnionShareUserBankListReqBo;
import com.yoho.service.model.union.response.PageResponseBO;
import com.yoho.service.model.union.response.PageUnionShareOrderRspBO;
import com.yoho.service.model.union.response.UnionShareUserApplyListRspBo;
import com.yoho.service.model.union.response.UnionShareUserBankListRspBO;
import com.yoho.unions.dal.model.UnionShareOrders;
import com.yoho.unions.dal.model.UnionShareSettlement;
import com.yoho.unions.dal.model.UnionShareUser;
import com.yoho.unions.dal.model.UnionShareUserBank;
import java.math.BigDecimal;
import java.util.List;
... ... @@ -101,4 +103,18 @@ public interface IUnionShareService {
* @return
*/
PageResponseBO<UnionShareOrders> queryOrderList(UnionShareOrderReqBO unionShareOrderReqBO);
/**
* 查询用户绑定银行卡信息
* @param parm
* @return
*/
List<UnionShareUserBankListRspBO> queryUnionShareUserBanks(UnionShareUserBankListReqBo parm);
/**
* 查询申请记录
* @param parm
* @return
*/
List<UnionShareUserApplyListRspBo> queryUnionShareUserApplys(UnionShareUserApplyListReqBo parm);
}
... ...
... ... @@ -9,9 +9,9 @@ import com.yoho.error.exception.ServiceException;
import com.yoho.service.model.union.bo.*;
import com.yoho.service.model.union.request.UnionShareOrderReqBO;
import com.yoho.service.model.union.request.UnionShareOrderSearchReqBO;
import com.yoho.service.model.union.response.PageResponseBO;
import com.yoho.service.model.union.response.PageUnionShareOrderRspBO;
import com.yoho.service.model.union.response.UnionShareOrderRspBO;
import com.yoho.service.model.union.request.UnionShareUserApplyListReqBo;
import com.yoho.service.model.union.request.UnionShareUserBankListReqBo;
import com.yoho.service.model.union.response.*;
import com.yoho.unions.common.enums.BankEnum;
import com.yoho.unions.common.enums.ShareOrdersKeyEnum;
import com.yoho.unions.common.enums.ShareOrdersStatusEnum;
... ... @@ -239,6 +239,16 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
return flag;
}
@Override
public List<UnionShareUserBankListRspBO> queryUnionShareUserBanks(UnionShareUserBankListReqBo parm) {
return this.unionShareUserBankMapper.selectByCondition(parm);
}
@Override
public List<UnionShareUserApplyListRspBo> queryUnionShareUserApplys(UnionShareUserApplyListReqBo parm) {
return null;
}
/**
* 用户登录时获取对应的渠道号
* @param uid
... ...