| | |
| | | public interface UserWithdrawMapper extends BaseMapper<UserWithdraw> { |
| | | int deleteByPrimaryKey(Integer paramInteger); |
| | | |
| | | int insertSelective(UserWithdraw paramUserWithdraw); |
| | | |
| | | UserWithdraw selectByPrimaryKey(Integer paramInteger); |
| | | |
| | | int updateByPrimaryKeySelective(UserWithdraw paramUserWithdraw); |
| | |
| | | |
| | | private Integer userId; |
| | | |
| | | //银行 |
| | | //银行名称 |
| | | private String bankName; |
| | | |
| | | //分支 |
| | | //开户支行 |
| | | private String branch; |
| | | |
| | | //分行号码 |
| | | private String branchNo; |
| | | |
| | | //账号 |
| | | //银行卡号 |
| | | private String bankNo; |
| | | |
| | | //姓名 |
| | |
| | | private Date transTime; |
| | | |
| | | private String withName; |
| | | @Excel(name = "银行卡号") |
| | | private String bankNo; |
| | | |
| | | //银行名称 |
| | | @Excel(name = "银行名称") |
| | | private String bankName; |
| | | |
| | | //开户支行 |
| | | @Excel(name = "开户支行") |
| | | private String branch; |
| | | |
| | | //分行号码 |
| | | @Excel(name = "分行号码") |
| | | private String branchNo; |
| | | |
| | | //银行卡号 |
| | | @Excel(name = "银行卡号") |
| | | private String bankNo; |
| | | |
| | | //姓名 |
| | | @Excel(name = "姓名") |
| | | private String payeeName; |
| | | |
| | | @Excel(name = "银行支行") |
| | | private String bankAddress; |
| | | |
| | |
| | | if(type == 0){ |
| | | userWithdraw.setBankNo(userBank.getBankNo()); |
| | | userWithdraw.setBankName(userBank.getBankName()); |
| | | userWithdraw.setBranch("银行卡"); |
| | | userWithdraw.setPayeeName(userBank.getPayeeName()); |
| | | userWithdraw.setBankAddress("银行卡"); |
| | | }else{ |
| | | userWithdraw.setBankNo(walletAddress); |
| | | userWithdraw.setPayeeName("加密货币"); |
| | | userWithdraw.setBankName("加密货币"); |
| | | userWithdraw.setBranch("加密货币"); |
| | | userWithdraw.setBankAddress("加密货币"); |
| | | } |
| | | |
| | | userWithdraw.setBranchNo(userBank.getBranchNo()); |
| | | |
| | | userWithdraw.setWithStatus(Integer.valueOf(0)); |
| | | BigDecimal withfee = siteSetting.getWithFeePercent().multiply(new BigDecimal(amt)).add(new BigDecimal(siteSetting.getWithFeeSingle().intValue())); |
| | | userWithdraw.setWithFee(withfee); |
| | | userWithdraw.setAssetsType(accsetType); |
| | | log.info("userWithdraw------------:"+userWithdraw.toString()); |
| | | log.info("userBank--------------:"+userBank.toString()); |
| | | int insertCount = this.userWithdrawMapper.insert(userWithdraw); |
| | | if (insertCount > 0) { |
| | | return ServerResponse.createBySuccessMsg("提现成功",request); |
| | | } |
| | | |
| | | log.error("保存提现记录失败"); |
| | | |
| | | throw new Exception("用户提现,保存提现记录失败"); |
| | | } else { |
| | | return ServerResponse.createByErrorMsg("提现密码不正确!",request); |
| | | } |
| | | |
| | | return ServerResponse.createBySuccessMsg("提现成功",request); |
| | | } |
| | | |
| | | |
| | |
| | | delete from user_withdraw |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.nq.pojo.UserWithdraw" > |
| | | insert into user_withdraw (id, user_id, nick_name, |
| | | agent_id, with_amt, apply_time, |
| | | trans_time, with_name, bank_no, |
| | | bank_name, bank_address, with_status, |
| | | with_fee, with_msg) |
| | | values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{nickName,jdbcType=VARCHAR}, |
| | | #{agentId,jdbcType=INTEGER}, #{withAmt,jdbcType=DECIMAL}, #{applyTime,jdbcType=TIMESTAMP}, |
| | | #{transTime,jdbcType=TIMESTAMP}, #{withName,jdbcType=VARCHAR}, #{bankNo,jdbcType=VARCHAR}, |
| | | #{bankName,jdbcType=VARCHAR}, #{bankAddress,jdbcType=VARCHAR}, #{withStatus,jdbcType=INTEGER}, |
| | | #{withFee,jdbcType=DECIMAL}, #{withMsg,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.nq.pojo.UserWithdraw" > |
| | | insert into user_withdraw |
| | | <trim prefix="(" suffix=")" suffixOverrides="," > |
| | |
| | | ORDER BY id DESC |
| | | </select> |
| | | |
| | | <select id="listByAdmin" resultMap="BaseResultMap" parameterType="map"> |
| | | <select id="listByAdmin" resultType="com.nq.pojo.UserWithdraw" parameterType="map"> |
| | | SELECT |
| | | <include refid="Base_Column_List"/> |
| | | * |
| | | FROM user_withdraw |
| | | where agent_id != 1 |
| | | <if test="agentId != null"> |