init
This commit is contained in:
@@ -73,11 +73,6 @@ public class LoginManager {
|
||||
if(user == null){
|
||||
throw new ServiceException("用户不存在或密码错误");
|
||||
}
|
||||
/*String imei = ServletUtils.getImei();
|
||||
UserForbidManager.CheckForbid forbid = userForbidManager.checkForbid(user.getId(), user.getUsercode(), imei, ServletUtils.getClientIP());
|
||||
if(forbid != null && forbid.isForbid()){
|
||||
throw new ServiceException(forbid.getMessage());
|
||||
}*/
|
||||
if(user.getStatus() != 0){
|
||||
throw new ServiceException("用户已封禁,请联系客服");
|
||||
}
|
||||
@@ -180,6 +175,7 @@ public class LoginManager {
|
||||
add.setType(0);
|
||||
add.setPassword(BCrypt.hashpw(usercode+"用户手动滑稽安康黄鼠狼"));
|
||||
add.setMobile(mobile);
|
||||
add.setWxCode(mobile);
|
||||
add.setGender(UserGenderEnum.NONE.getCode());
|
||||
add.setAvatar(cos + UserGenderEnum.NONE.getDefaultAvatar());
|
||||
add.setImToken(IdUtil.simpleUUID());
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.xq.manager;
|
||||
|
||||
import com.ruoyi.xq.domain.VipPrice;
|
||||
import com.ruoyi.xq.dto.app.pay.ConsumeResp;
|
||||
import com.ruoyi.xq.enums.common.OrderTypeEnum;
|
||||
import com.ruoyi.xq.enums.pay.PlatformTypeEnum;
|
||||
@@ -7,6 +8,8 @@ import com.ruoyi.xq.mq.AmqpProducer;
|
||||
import com.ruoyi.xq.mq.handle.dto.CalculateSalesHandleDTO;
|
||||
import com.ruoyi.xq.service.UserExtendService;
|
||||
import com.ruoyi.xq.service.VipOrderService;
|
||||
import com.ruoyi.xq.service.VipPriceService;
|
||||
import com.ruoyi.xq.service.WxTransOrderService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -22,6 +25,12 @@ public class PayManager {
|
||||
private UserExtendService userExtendService;
|
||||
@Autowired
|
||||
private AmqpProducer amqpProducer;
|
||||
@Autowired
|
||||
private VipPriceService vipPriceService;
|
||||
@Autowired
|
||||
private WxTransOrderService wxTransOrderService;
|
||||
|
||||
|
||||
public void callBack(String orderNo, Map<String,String> params, String appId, PlatformTypeEnum payTypeEnum){
|
||||
OrderTypeEnum orderTypeEnum = OrderNoUtil.getType(orderNo);
|
||||
if(orderTypeEnum == null){
|
||||
@@ -47,6 +56,26 @@ public class PayManager {
|
||||
}catch (Exception e){
|
||||
log.error("RabbitMq 发送失败, 充值分销流程流转失败!",e);
|
||||
}
|
||||
try {
|
||||
if(vipResp.getVipId() != null){
|
||||
VipPrice vipPrice = vipPriceService.getById(vipResp.getVipId());
|
||||
if(vipPrice != null && vipPrice.getGiveWxTransNum() > 0){
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error("开通会员赠送次数失败",e);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case WX_TRANS:
|
||||
ConsumeResp consumeResp = wxTransOrderService.doSuccess(orderNo, params, appId, payTypeEnum);
|
||||
if(consumeResp.isSuccess()){
|
||||
try {
|
||||
// 用户消费统计
|
||||
userExtendService.incsConsumeTotal(consumeResp.getUserId(), consumeResp.getPrice());
|
||||
}catch (Exception e){
|
||||
log.error("用户微信交换次数消费统计",e);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user