Authored by csgyoho

用户绑定银行卡

1 package com.yoho.unions.dal; 1 package com.yoho.unions.dal;
2 2
  3 +import com.yoho.service.model.union.request.UnionShareUserBankListReqBo;
  4 +import com.yoho.service.model.union.response.UnionShareUserBankListRspBO;
3 import com.yoho.unions.dal.model.UnionShareUserBank; 5 import com.yoho.unions.dal.model.UnionShareUserBank;
4 6
5 import java.util.List; 7 import java.util.List;
@@ -18,4 +20,6 @@ public interface UnionShareUserBankMapper { @@ -18,4 +20,6 @@ public interface UnionShareUserBankMapper {
18 int updateByPrimaryKeySelective(UnionShareUserBank record); 20 int updateByPrimaryKeySelective(UnionShareUserBank record);
19 21
20 int updateByPrimaryKey(UnionShareUserBank record); 22 int updateByPrimaryKey(UnionShareUserBank record);
  23 +
  24 + List<UnionShareUserBankListRspBO> selectByCondition(UnionShareUserBankListReqBo parm);
21 } 25 }
@@ -31,6 +31,33 @@ @@ -31,6 +31,33 @@
31 and status = #{status,jdbcType=INTEGER} 31 and status = #{status,jdbcType=INTEGER}
32 </if> 32 </if>
33 </select> 33 </select>
  34 + <select id="selectByCondition"
  35 + resultType="com.yoho.service.model.union.response.UnionShareUserBankListRspBO"
  36 + parameterType="com.yoho.service.model.union.request.UnionShareUserBankListReqBo">
  37 + select id, uid, id_card_no idCardNo, name, bank_card_no bankCardNo, bank_name bankName,
  38 + bank_code bankCode, status, create_time createTime, update_time updateTime
  39 + from union_share_user_bank
  40 + where 1=1
  41 + <if test="uid != null">
  42 + and uid=#{uid}
  43 + </if>
  44 + <if test="idCardNo != null">
  45 + and id_card_no=#{idCardNo}
  46 + </if>
  47 + <if test="name != null">
  48 + and name=#{name}
  49 + </if>
  50 + <if test="bankName != null">
  51 + and bank_name=#{bankName}
  52 + </if>
  53 + <if test="bankCode != null">
  54 + and bank_code=#{bankCode}
  55 + </if>
  56 + <if test="bankCardNo != null">
  57 + and bank_card_no=#{bankCardNo}
  58 + </if>
  59 + order by id desc limit #{start},#{size}
  60 + </select>
34 <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > 61 <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
35 delete from union_share_user_bank 62 delete from union_share_user_bank
36 where id = #{id,jdbcType=INTEGER} 63 where id = #{id,jdbcType=INTEGER}
@@ -4,14 +4,12 @@ import com.yoho.core.common.utils.JsonUtil; @@ -4,14 +4,12 @@ import com.yoho.core.common.utils.JsonUtil;
4 import com.yoho.service.model.union.bo.*; 4 import com.yoho.service.model.union.bo.*;
5 import com.yoho.service.model.union.request.UnionShareOrderReqBO; 5 import com.yoho.service.model.union.request.UnionShareOrderReqBO;
6 import com.yoho.service.model.union.request.UnionShareOrderSearchReqBO; 6 import com.yoho.service.model.union.request.UnionShareOrderSearchReqBO;
7 -import com.yoho.service.model.union.response.PageResponseBO;  
8 -import com.yoho.service.model.union.response.PageUnionShareOrderRspBO;  
9 -import com.yoho.service.model.union.response.UnionResponse; 7 +import com.yoho.service.model.union.request.UnionShareUserApplyListReqBo;
  8 +import com.yoho.service.model.union.request.UnionShareUserBankListReqBo;
  9 +import com.yoho.service.model.union.response.*;
10 import com.yoho.unions.common.ApiResponse; 10 import com.yoho.unions.common.ApiResponse;
11 import com.yoho.unions.dal.model.UnionShareOrders; 11 import com.yoho.unions.dal.model.UnionShareOrders;
12 import com.yoho.unions.dal.model.UnionShareSettlement; 12 import com.yoho.unions.dal.model.UnionShareSettlement;
13 -import com.yoho.unions.dal.model.UnionShareUser;  
14 -import com.yoho.unions.dal.model.UnionShareUserBank;  
15 import com.yoho.unions.server.service.IUnionShareService; 13 import com.yoho.unions.server.service.IUnionShareService;
16 import org.slf4j.Logger; 14 import org.slf4j.Logger;
17 import org.slf4j.LoggerFactory; 15 import org.slf4j.LoggerFactory;
@@ -145,6 +143,32 @@ public class UnionShareRest { @@ -145,6 +143,32 @@ public class UnionShareRest {
145 } 143 }
146 144
147 /** 145 /**
  146 + * 查询户绑定银行卡信息
  147 + * @param parm
  148 + * @return
  149 + */
  150 + @RequestMapping("/queryUnionShareUserBanks")
  151 + @ResponseBody
  152 + public UnionResponse queryUnionShareUserBanks(@RequestBody UnionShareUserBankListReqBo parm){
  153 + log.info("queryUnionShareUserBanks parm is {}", parm);
  154 + List<UnionShareUserBankListRspBO> result = unionShareService.queryUnionShareUserBanks(parm);
  155 + return new UnionResponse(200, "queryUnionShareUserBanks success",result);
  156 + }
  157 +
  158 + /**
  159 + * 查询申请记录
  160 + * @param parm
  161 + * @return
  162 + */
  163 + @RequestMapping("/queryUnionShareUserApplys")
  164 + @ResponseBody
  165 + public UnionResponse queryUnionShareUserApplys(@RequestBody UnionShareUserApplyListReqBo parm){
  166 + log.info("queryUnionShareUserApplys parm is {}", parm);
  167 + List<UnionShareUserApplyListRspBo> result = unionShareService.queryUnionShareUserApplys(parm);
  168 + return new UnionResponse(200, "queryUnionShareUserApplys success",result);
  169 + }
  170 +
  171 + /**
148 * 订单明细 172 * 订单明细
149 * Created by qing.zhao on 2018/5/15 173 * Created by qing.zhao on 2018/5/15
150 * @param unionShareOrderReqBO 174 * @param unionShareOrderReqBO
@@ -3,12 +3,14 @@ package com.yoho.unions.server.service; @@ -3,12 +3,14 @@ package com.yoho.unions.server.service;
3 import com.yoho.service.model.union.bo.*; 3 import com.yoho.service.model.union.bo.*;
4 import com.yoho.service.model.union.request.UnionShareOrderReqBO; 4 import com.yoho.service.model.union.request.UnionShareOrderReqBO;
5 import com.yoho.service.model.union.request.UnionShareOrderSearchReqBO; 5 import com.yoho.service.model.union.request.UnionShareOrderSearchReqBO;
  6 +import com.yoho.service.model.union.request.UnionShareUserApplyListReqBo;
  7 +import com.yoho.service.model.union.request.UnionShareUserBankListReqBo;
6 import com.yoho.service.model.union.response.PageResponseBO; 8 import com.yoho.service.model.union.response.PageResponseBO;
7 import com.yoho.service.model.union.response.PageUnionShareOrderRspBO; 9 import com.yoho.service.model.union.response.PageUnionShareOrderRspBO;
  10 +import com.yoho.service.model.union.response.UnionShareUserApplyListRspBo;
  11 +import com.yoho.service.model.union.response.UnionShareUserBankListRspBO;
8 import com.yoho.unions.dal.model.UnionShareOrders; 12 import com.yoho.unions.dal.model.UnionShareOrders;
9 import com.yoho.unions.dal.model.UnionShareSettlement; 13 import com.yoho.unions.dal.model.UnionShareSettlement;
10 -import com.yoho.unions.dal.model.UnionShareUser;  
11 -import com.yoho.unions.dal.model.UnionShareUserBank;  
12 14
13 import java.math.BigDecimal; 15 import java.math.BigDecimal;
14 import java.util.List; 16 import java.util.List;
@@ -101,4 +103,18 @@ public interface IUnionShareService { @@ -101,4 +103,18 @@ public interface IUnionShareService {
101 * @return 103 * @return
102 */ 104 */
103 PageResponseBO<UnionShareOrders> queryOrderList(UnionShareOrderReqBO unionShareOrderReqBO); 105 PageResponseBO<UnionShareOrders> queryOrderList(UnionShareOrderReqBO unionShareOrderReqBO);
  106 +
  107 + /**
  108 + * 查询用户绑定银行卡信息
  109 + * @param parm
  110 + * @return
  111 + */
  112 + List<UnionShareUserBankListRspBO> queryUnionShareUserBanks(UnionShareUserBankListReqBo parm);
  113 +
  114 + /**
  115 + * 查询申请记录
  116 + * @param parm
  117 + * @return
  118 + */
  119 + List<UnionShareUserApplyListRspBo> queryUnionShareUserApplys(UnionShareUserApplyListReqBo parm);
104 } 120 }
@@ -9,9 +9,9 @@ import com.yoho.error.exception.ServiceException; @@ -9,9 +9,9 @@ import com.yoho.error.exception.ServiceException;
9 import com.yoho.service.model.union.bo.*; 9 import com.yoho.service.model.union.bo.*;
10 import com.yoho.service.model.union.request.UnionShareOrderReqBO; 10 import com.yoho.service.model.union.request.UnionShareOrderReqBO;
11 import com.yoho.service.model.union.request.UnionShareOrderSearchReqBO; 11 import com.yoho.service.model.union.request.UnionShareOrderSearchReqBO;
12 -import com.yoho.service.model.union.response.PageResponseBO;  
13 -import com.yoho.service.model.union.response.PageUnionShareOrderRspBO;  
14 -import com.yoho.service.model.union.response.UnionShareOrderRspBO; 12 +import com.yoho.service.model.union.request.UnionShareUserApplyListReqBo;
  13 +import com.yoho.service.model.union.request.UnionShareUserBankListReqBo;
  14 +import com.yoho.service.model.union.response.*;
15 import com.yoho.unions.common.enums.BankEnum; 15 import com.yoho.unions.common.enums.BankEnum;
16 import com.yoho.unions.common.enums.ShareOrdersKeyEnum; 16 import com.yoho.unions.common.enums.ShareOrdersKeyEnum;
17 import com.yoho.unions.common.enums.ShareOrdersStatusEnum; 17 import com.yoho.unions.common.enums.ShareOrdersStatusEnum;
@@ -239,6 +239,16 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport @@ -239,6 +239,16 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
239 return flag; 239 return flag;
240 } 240 }
241 241
  242 + @Override
  243 + public List<UnionShareUserBankListRspBO> queryUnionShareUserBanks(UnionShareUserBankListReqBo parm) {
  244 + return this.unionShareUserBankMapper.selectByCondition(parm);
  245 + }
  246 +
  247 + @Override
  248 + public List<UnionShareUserApplyListRspBo> queryUnionShareUserApplys(UnionShareUserApplyListReqBo parm) {
  249 + return null;
  250 + }
  251 +
242 /** 252 /**
243 * 用户登录时获取对应的渠道号 253 * 用户登录时获取对应的渠道号
244 * @param uid 254 * @param uid