Commit 6a0a77ae authored by jiaorz's avatar jiaorz

Merge remote-tracking branch 'origin/base-modify' into base-modify

parents 51f1b75a 7bed896d
package com.github.wxiaoqi.security.admin.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
/**
* 支付宝账号表
*/
@Table(name = "app_user_alipay")
@Data
public class AppUserAlipay {
@Id
@GeneratedValue(generator = "JDBC")//此处加上注解
private Integer id;
@ApiModelProperty("用户id")
@Column(name = "user_id")
private Integer userId;
@ApiModelProperty("支付宝账号")
@Column(name = "tx_alipay")
private String txAlipay;
@ApiModelProperty("0-否;1-是")
@Column(name = "is_default")
private Integer isDefault;
@ApiModelProperty("创建时间")
@Column(name = "crt_time")
private Long crtTime;
@ApiModelProperty("是否删除;0-正常;1-删除")
@Column(name = "is_del")
private Integer isDel;
}
\ No newline at end of file
...@@ -19,8 +19,8 @@ import lombok.Data; ...@@ -19,8 +19,8 @@ import lombok.Data;
@Table(name = "my_wallet") @Table(name = "my_wallet")
public class MyWallet implements Serializable { public class MyWallet implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* id * id
*/ */
@Column(name = "id") @Column(name = "id")
...@@ -34,15 +34,23 @@ public class MyWallet implements Serializable { ...@@ -34,15 +34,23 @@ public class MyWallet implements Serializable {
@GeneratedValue(generator = "JDBC") @GeneratedValue(generator = "JDBC")
@ApiModelProperty("用户ID") @ApiModelProperty("用户ID")
private Integer userId; private Integer userId;
/**
* 余额(分)
*/
@Column(name = "balance")
@ApiModelProperty(value = "余额(元)")
private BigDecimal balance;
/** /**
* 余额(分) * 支付密码
*/ */
@Column(name = "balance") @Column(name = "pay_password")
@ApiModelProperty(value = "余额(元)") @ApiModelProperty(value = "支付密码")
private BigDecimal balance; private String payPassword;
/** /**
* 已提现金额 * 已提现金额
*/ */
@Column(name = "withdrawals") @Column(name = "withdrawals")
......
...@@ -12,6 +12,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; ...@@ -12,6 +12,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.vo.PageDataVO; import com.github.wxiaoqi.security.common.vo.PageDataVO;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.aop.framework.AopContext; import org.springframework.aop.framework.AopContext;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -46,6 +47,9 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel ...@@ -46,6 +47,9 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
@Value("${temamember.failureTime:60}") @Value("${temamember.failureTime:60}")
private Long failureTime; private Long failureTime;
@Autowired
private AppUserDetailBiz appUserDetailBiz;
/** /**
* 关系绑定 * 关系绑定
* @param userId * @param userId
...@@ -76,6 +80,23 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel ...@@ -76,6 +80,23 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
} }
} }
} }
//首页关系绑定
public ObjectRestResponse appBindRelation(Integer userId,String code){
Integer parentId=0;
if (StringUtils.isNotBlank(code)){
//判断处理活动关键字
String[] codes = code.split("_");
if(codes.length > 1) {
code = codes[0];
}
parentId=appUserDetailBiz.getUserByCode(code);
}
if (parentId!=null&&parentId>0&&userId!=null&&userId>0){
getMyBiz().bindRelation(userId,parentId,1);
}
return ObjectRestResponse.succ();
}
//永久稳定关系 //永久稳定关系
public void foreverBind(Integer user_id ){ public void foreverBind(Integer user_id ){
AppUserRelation relation=getMyBiz().getRelationByUserId(user_id); AppUserRelation relation=getMyBiz().getRelationByUserId(user_id);
......
...@@ -9,12 +9,14 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; ...@@ -9,12 +9,14 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController; import com.github.wxiaoqi.security.common.rest.BaseController;
import com.github.wxiaoqi.security.admin.biz.AppUserRelationBiz; import com.github.wxiaoqi.security.admin.biz.AppUserRelationBiz;
import com.github.wxiaoqi.security.admin.entity.AppUserRelation; import com.github.wxiaoqi.security.admin.entity.AppUserRelation;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.HashSet;
@RestController @RestController
@RequestMapping("relation") @RequestMapping("relation")
...@@ -37,7 +39,21 @@ public class AppUserRelationController extends BaseController<AppUserRelationBiz ...@@ -37,7 +39,21 @@ public class AppUserRelationController extends BaseController<AppUserRelationBiz
return baseBiz.shareParentByUserId(userid,pid,platform_userid); return baseBiz.shareParentByUserId(userid,pid,platform_userid);
} }
@ApiOperation("查询邀请的成员") @RequestMapping(value = "/bind",method = RequestMethod.POST)
@ApiModelProperty("app分享绑定")
public ObjectRestResponse bind(
@RequestParam(value = "code",defaultValue = "")String code,
HttpServletRequest request){
try {
Integer userid = Integer.parseInt(userAuthUtil.getInfoFromToken(userAuthConfig.getToken(request)).getId());
return baseBiz.appBindRelation(userid,code);
} catch (Exception e) {
e.printStackTrace();
throw new BaseException(e);
}
}
@ApiOperation("查询邀请的成员")
@GetMapping("/pages") @GetMapping("/pages")
public ObjectRestResponse<InviteMemberVo> findInviteMemberByActivitState(@RequestParam(value = "state",required = false) Integer state, public ObjectRestResponse<InviteMemberVo> findInviteMemberByActivitState(@RequestParam(value = "state",required = false) Integer state,
@RequestParam("page") Integer page, @RequestParam("page") Integer page,
......
...@@ -273,20 +273,14 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> { ...@@ -273,20 +273,14 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
if (StringUtils.isEmpty(userCouponFindDTO.getPhone())) { if (StringUtils.isEmpty(userCouponFindDTO.getPhone())) {
List<Integer> userIds = data.stream().map(UserCouponDTO::getUserId).distinct().collect(Collectors.toList()); List<Integer> userIds = data.stream().map(UserCouponDTO::getUserId).distinct().collect(Collectors.toList());
if (log.isDebugEnabled()){
log.debug("查询的用户ids【{}】",userIds);
}
userIdAndAppuserLoginMap = userFeign.findAppUsersByUserIds(userIds); userIdAndAppuserLoginMap = userFeign.findAppUsersByUserIds(userIds);
if (log.isDebugEnabled()){
log.debug("查询的用户信息【{}】",userIdAndAppuserLoginMap);
}
} }
List<UserCouponPageVo> userCouponPageVos = new ArrayList<>(); List<UserCouponPageVo> userCouponPageVos = new ArrayList<>();
UserCouponPageVo userCouponPageVo; UserCouponPageVo userCouponPageVo;
for (UserCouponDTO userCouponDTO : data) { for (UserCouponDTO userCouponDTO : data) {
userCouponPageVo = new UserCouponPageVo(); userCouponPageVo = new UserCouponPageVo();
BeanUtils.copyProperties(userCouponDTO, userCouponPageVo); BeanUtils.copyProperties(userCouponDTO, userCouponPageVo);
if (Objects.nonNull(userCouponFindDTO.getPhone())) { if (StringUtils.isNotEmpty(userCouponFindDTO.getPhone())) {
userCouponPageVo.setPhone(userCouponFindDTO.getPhone()); userCouponPageVo.setPhone(userCouponFindDTO.getPhone());
} else { } else {
userCouponPageVo.setPhone(userIdAndAppuserLoginMap.get(userCouponDTO.getUserId()) == null ? "" : userIdAndAppuserLoginMap.get(userCouponDTO.getUserId()).getUsername()); userCouponPageVo.setPhone(userIdAndAppuserLoginMap.get(userCouponDTO.getUserId()) == null ? "" : userIdAndAppuserLoginMap.get(userCouponDTO.getUserId()).getUsername());
......
...@@ -65,5 +65,6 @@ public class Cofig implements Serializable { ...@@ -65,5 +65,6 @@ public class Cofig implements Serializable {
@ApiModelProperty(value = "标题") @ApiModelProperty(value = "标题")
private String title; private String title;
@Column(name = "params")
private String params; private String params;
} }
...@@ -14,14 +14,39 @@ import java.math.BigDecimal; ...@@ -14,14 +14,39 @@ import java.math.BigDecimal;
public class WithDrawRuleVo { public class WithDrawRuleVo {
/** /**
* 提现金额 * 最低提现金额
*/ */
private BigDecimal amount; private BigDecimal minAmount;
/** /**
* 手续费率 * 提现手续费率
*/ */
private double proceduReates; private BigDecimal proceduReates;
/**
* 月额度
*/
private BigDecimal amountOfMonth;
/**
* 日额度
*/
private BigDecimal amountOfDay;
/**
* 最多提现次数(月)
*/
private Integer maxNumberOfWithdraw;
/**
* 最多提现次数(日)
*/
private Integer maxNumberOfDay;
/**
* 1. 线上 2.线下
*/
private Integer withdrawWay;
/** /**
* 规则说明 * 规则说明
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment