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