Commit 6173fee0 authored by libin's avatar libin

Merge branch 'base-modify' of http://113.105.137.151:22280/youjj/cloud-platform into base-modify

parents 409bb684 8aaced63
......@@ -19,7 +19,12 @@ import lombok.Data;
@Table(name = "my_wallet_detail")
public class MyWalletDetail implements Serializable {
private static final long serialVersionUID = 1L;
public static final int TYPE_POPULARIZE = 1;
public static final int SOURCE_ACTIVITY = 0;
public static final int ITYPE_IN = 0;
/**
* 主键ID
*/
......
......@@ -79,7 +79,7 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
//永久稳定关系
public void foreverBind(Integer user_id ){
AppUserRelation relation=getMyBiz().getRelationByUserId(user_id);
if(relation!=null&&relation.getIsForever()==0){
if(relation!=null&&relation.getIsForever()==0&&relation.getParentId()!=null&&relation.getParentId()>0){
relation.setIsForever(1);
getMyBiz().updRelation(relation);
}
......
......@@ -76,7 +76,7 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>{
}
log.info("---我的钱包入账----userId==="+userId+"----balance===="+balance+"----totalAmount===="+totalAmount+"---todayAmount==="+todayAmount+"---unbooked=="+unbooked);
walletDetail.setItype(1);
walletDetail.setItype(0);
walletDetail.setBalance(oldBalance);
walletDetailBiz.insertSelective(walletDetail);
Long time=System.currentTimeMillis();
......
......@@ -28,14 +28,14 @@ public class RabbitAdminConfig extends RabbitCommonConfig {
static {
myQueue = new ArrayList<BindDTO>(){{
//支付完成后永久绑定关系
add(new BindDTO(ORDER_RELATION_QUEUE, ADMIN_TOPIC, KEY_ORDER_PAY));
add(new BindDTO(ORDER_RELATION_QUEUE, ORDER_TOPIC, KEY_ORDER_PAY));
//拥金计算
add(new BindDTO(ORDER_WATER_QUEUE, ORDER_TOPIC, KEY_ORDER_PAY));
add(new BindDTO(ORDER_WATER_QUEUE, ORDER_TOPIC, KEY_ORDER_FINLISH));
add(new BindDTO(ORDER_WATER_QUEUE, ORDER_TOPIC, KEY_ORDER_CANCEL));
add(new BindDTO(ORDER_FINLISH_USER_RE_QUEUE, ORDER_TOPIC, KEY_ORDER_FINLISH));
//钱包
add(new BindDTO(WALLET_ADD_QUEUE, ADMIN_TOPIC,KEY_WALLET_ADD ));
add(new BindDTO(WALLET_ADD_QUEUE, ADMIN_TOPIC, KEY_WALLET_ADD));
}};
}
}
......
......@@ -363,6 +363,7 @@ public class AppPermissionService {
* 自动登录type;1-app;2-小程序
*/
public JSONObject autoLogin(Integer userid, String username, String headimgurl, String nickname,String code,String activityCode,Integer type) {
log.info("-----------autoLogin----code==="+code+"----activityCode===="+activityCode);
JSONObject data = new JSONObject();
AppUserVo userVo = appUserDetailBiz.getUserInfoById(userid);
if (userVo != null) {
......@@ -389,6 +390,7 @@ public class AppPermissionService {
//更新登录时间 和 ip
String clientIp = getIp();
appUserLoginBiz.updateLoginInfo(userid, clientIp);
log.info("-----------autoLogin----type==="+type);
if(type!=null&&type==1){
try {
Integer parentId=0;
......@@ -401,6 +403,7 @@ public class AppPermissionService {
}
//活动消息
Integer state=userVo.getState();
log.info("-----------autoLogin----state==="+state);
if(state!=null&&state==1){
if(userVo.getInviterAccount()==null||userVo.getInviterAccount()==0){
userVo.setInviterAccount(parentId);
......
package com.xxfc.platform.activity.biz;
import cn.hutool.json.JSONUtil;
import com.github.wxiaoqi.security.admin.dto.RegisterQueueDTO;
import com.github.wxiaoqi.security.admin.entity.MyWalletDetail;
import com.github.wxiaoqi.security.admin.feign.UserFeign;
import com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO;
import com.github.wxiaoqi.security.common.config.rabbit.RabbitConstant;
import com.xxfc.platform.activity.entity.ActivityPopularizeLog;
import com.xxfc.platform.activity.entity.ActivityPopularizeRelation;
import com.xxfc.platform.activity.entity.ActivityPopularizeUser;
import com.xxfc.platform.universal.feign.MQSenderFeign;
import com.xxfc.platform.universal.feign.ThirdFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -13,6 +18,8 @@ import com.xxfc.platform.activity.entity.ActivityPopularize;
import com.xxfc.platform.activity.mapper.ActivityPopularizeMapper;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
import java.math.BigDecimal;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_FALSE;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_TRUE;
......@@ -41,10 +48,15 @@ public class ActivityPopularizeBiz extends BaseBiz<ActivityPopularizeMapper,Acti
@Autowired
UserFeign userFeign;
@Autowired
MQSenderFeign mqSenderFeign;
public static final String POPULARIZE_0101 = "0101";
public static final String PREFIX = "P";
public static final Integer INVITE_ITEMID = 3;
public void handleRegister(RegisterQueueDTO registerQueueDTO) {
String activityCode = registerQueueDTO.getInParamDTO().getActivityCode().replace(PREFIX, "");
......@@ -70,13 +82,13 @@ public class ActivityPopularizeBiz extends BaseBiz<ActivityPopularizeMapper,Acti
ActivityPopularizeLog popularizeLog = popularizeLogBiz.selectOne(new ActivityPopularizeLog(){{
setUserId(majorUserId);
setItemId(3);
setItemId(INVITE_ITEMID);
}});
//生成任务项
if(null == popularizeLog){
popularizeLogBiz.insertSelectiveRe(new ActivityPopularizeLog(){{
setItemId(3);
setItemId(INVITE_ITEMID);
setUserId(majorUserId);
setStatus(SYS_FALSE);
setPopularizeId(activityPopularize.getId());
......@@ -100,6 +112,15 @@ public class ActivityPopularizeBiz extends BaseBiz<ActivityPopularizeMapper,Acti
popularizeUserBiz.updateSelectiveById(activityPopularizeUser);
popularizeLog.setStatus(SYS_TRUE);
popularizeLogBiz.updateSelectiveById(popularizeLog);
mqSenderFeign.sendMessage(RabbitConstant.ADMIN_TOPIC, RabbitConstant.KEY_WALLET_ADD, JSONUtil.toJsonStr(new MyWalletDetail(){{
setAmount(new BigDecimal("50"));
setSource(SOURCE_ACTIVITY);
setUserId(appUserDTO.getUserid());
setActivityId(activityPopularize.getId());
setActivityName(activityPopularize.getName());
setType(TYPE_POPULARIZE);
setItype(ITYPE_IN);
}}));
}
}
}
......
......@@ -335,8 +335,10 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
RentVehicleBookDTO rentVehicleBookDTO = BeanUtil.toBean(detail.getBookVehicleVO(), RentVehicleBookDTO.class);
rentVehicleBookDTO.setModelId(detail.getModelId());
rentVehicleBookDTO.setUserName(BaseContextHandler.getName());
rentVehicleBookDTO.setLiftCompany(detail.getStartCompanyId());
rentVehicleBookDTO.setLiftAddr(detail.getStartAddr());
ObjectRestResponse<VehicleBookRecord> orr = vehicleFeign.rentApplyVehicle(rentVehicleBookDTO);
if(! CommonConstants.SYS_JSON_TRUE.equals(orr.getStatus())) {
if(!CommonConstants.SYS_JSON_TRUE.equals(orr.getStatus())) {
throw new BaseException(orr.getMessage(), orr.getStatus());
}
detail.setVehicleId(orr.getData().getVehicleId());
......
......@@ -67,7 +67,7 @@ public interface VehicleFeign {
@RequestMapping(value = "/user/license/company/getOne", method = RequestMethod.GET)
public RestResponse<VehicleUserLicense> getOne(
@RequestParam(value="id",defaultValue="0")Integer id) throws Exception ;
@RequestParam(value="id",defaultValue="0")Integer id) throws Exception;
/**
* 获取优质车型接口
......
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