Commit 4adc7d46 authored by jiaorz's avatar jiaorz

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

parents ac797e0b 0e5a177a
...@@ -3,12 +3,16 @@ package com.github.wxiaoqi.security.admin.biz; ...@@ -3,12 +3,16 @@ package com.github.wxiaoqi.security.admin.biz;
import com.ace.cache.annotation.Cache; import com.ace.cache.annotation.Cache;
import com.ace.cache.annotation.CacheClear; import com.ace.cache.annotation.CacheClear;
import com.github.wxiaoqi.security.admin.entity.AppUserDetail; import com.github.wxiaoqi.security.admin.entity.AppUserDetail;
import com.github.wxiaoqi.security.admin.entity.AppUserLogin;
import com.github.wxiaoqi.security.admin.mapper.AppUserDetailMapper; import com.github.wxiaoqi.security.admin.mapper.AppUserDetailMapper;
import com.github.wxiaoqi.security.admin.rpc.service.AppPermissionService; import com.github.wxiaoqi.security.admin.rpc.service.AppPermissionService;
import com.github.wxiaoqi.security.admin.vo.AppUserVo; import com.github.wxiaoqi.security.admin.vo.AppUserVo;
import com.github.wxiaoqi.security.common.biz.BaseBiz; import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.xxfc.platform.im.utils.StringUtil;
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.entity.Example; import tk.mybatis.mapper.entity.Example;
...@@ -32,6 +36,10 @@ import java.util.stream.Collectors; ...@@ -32,6 +36,10 @@ import java.util.stream.Collectors;
public class AppUserDetailBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail> { public class AppUserDetailBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail> {
@Autowired
AppUserLoginBiz userLoginBiz;
@Override @Override
@CacheClear(pre = "user{1.userid}") @CacheClear(pre = "user{1.userid}")
public void updateSelectiveById(AppUserDetail entity) { public void updateSelectiveById(AppUserDetail entity) {
...@@ -96,6 +104,21 @@ public class AppUserDetailBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail ...@@ -96,6 +104,21 @@ public class AppUserDetailBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail
entity.setUpdatetime(Instant.now().toEpochMilli() / 1000L); entity.setUpdatetime(Instant.now().toEpochMilli() / 1000L);
super.updateSelectiveById(entity); super.updateSelectiveById(entity);
} }
Integer userid=entity.getUserid();
AppUserLogin appUserLogin=new AppUserLogin();
if (StringUtils.isNotBlank(userVo.getWxOpenid())){
appUserLogin.setWxOpenid(userVo.getWxOpenid());
appUserLogin.setUnionid(userVo.getUnionid());
}
if (StringUtils.isNotBlank(userVo.getOpenid())){
appUserLogin.setOpenid(userVo.getOpenid());
}
if (appUserLogin!=null){
appUserLogin.setId(userid);
appUserLogin.setUsername(userVo.getUsername());
userLoginBiz.updateSelectiveById(appUserLogin);
}
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
......
...@@ -62,6 +62,7 @@ public class BaseUserMemberExportBiz extends BaseBiz<BaseUserMemberExportMapper, ...@@ -62,6 +62,7 @@ public class BaseUserMemberExportBiz extends BaseBiz<BaseUserMemberExportMapper,
userMemberDTO.setRentFreeDays(userMemberSaveDTO.getRentFreeDays()); userMemberDTO.setRentFreeDays(userMemberSaveDTO.getRentFreeDays());
userMemberDTO.setMemberName(userMemberSaveDTO.getMemberName()); userMemberDTO.setMemberName(userMemberSaveDTO.getMemberName());
userMemberDTO.setIsBind(1); userMemberDTO.setIsBind(1);
userMemberDTO.setBuyCount(0);
try { try {
baseUserMemberBiz.updUserMemberByUserId(userMemberDTO); baseUserMemberBiz.updUserMemberByUserId(userMemberDTO);
} catch (Exception e) { } catch (Exception e) {
...@@ -126,6 +127,7 @@ public class BaseUserMemberExportBiz extends BaseBiz<BaseUserMemberExportMapper, ...@@ -126,6 +127,7 @@ public class BaseUserMemberExportBiz extends BaseBiz<BaseUserMemberExportMapper,
userMemberDTO.setRentFreeDays(Integer.valueOf(rentFreeDays)); userMemberDTO.setRentFreeDays(Integer.valueOf(rentFreeDays));
userMemberDTO.setIsBind(1); userMemberDTO.setIsBind(1);
userMemberDTO.setMemberName(memberName); userMemberDTO.setMemberName(memberName);
userMemberDTO.setBuyCount(0);
try { try {
baseUserMemberBiz.updUserMemberByUserId(userMemberDTO); baseUserMemberBiz.updUserMemberByUserId(userMemberDTO);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -28,7 +28,7 @@ public class RefundMQHandler { ...@@ -28,7 +28,7 @@ public class RefundMQHandler {
OrderRefundBiz orderRefundBiz; OrderRefundBiz orderRefundBiz;
/** /**
* 佣金 * 退款
* @param * @param
*/ */
@RabbitListener(queues = ORDER_DEPOSIT_REFUND_QUEUE) @RabbitListener(queues = ORDER_DEPOSIT_REFUND_QUEUE)
......
...@@ -56,6 +56,7 @@ import javax.annotation.Resource; ...@@ -56,6 +56,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -192,16 +193,15 @@ public class BaseOrderController extends CommonBaseController implements UserRes ...@@ -192,16 +193,15 @@ public class BaseOrderController extends CommonBaseController implements UserRes
if(userIds != null && userIds.size() >0) { if(userIds != null && userIds.size() >0) {
ObjectRestResponse<List<AppUserVo>> objectRestResponse = userFeign.getByUserIds(userIds); ObjectRestResponse<List<AppUserVo>> objectRestResponse = userFeign.getByUserIds(userIds);
log.info("获取用户信息:objectRestResponse = {}", objectRestResponse.getMessage()); log.info("获取用户信息:objectRestResponse = {}", objectRestResponse.getMessage());
Map<String, AppUserVo> appUserVoMap = objectRestResponse.getData() == null? new HashMap<String, AppUserVo>()
: objectRestResponse.getData().parallelStream().collect(Collectors.toMap(v -> v.getUserid().toString(), v -> v));
for (OrderListVo orderPageVO : list) { for (OrderListVo orderPageVO : list) {
if (objectRestResponse.getData() != null && objectRestResponse.getData().size() > 0) { AppUserVo appUserVo = appUserVoMap.get(orderPageVO.getUserId().toString());
for (AppUserVo appUserVo : objectRestResponse.getData()) { if (null != appUserVo) {
if (appUserVo != null) {
orderPageVO.setTelephone(appUserVo.getUsername()); orderPageVO.setTelephone(appUserVo.getUsername());
orderPageVO.setUsername(appUserVo.getNickname()); orderPageVO.setUsername(appUserVo.getNickname());
} }
}
}
if (orderPageVO.getOrderRentVehicleDetail() != null && orderPageVO.getOrderRentVehicleDetail().getVehicleId() != null) { if (orderPageVO.getOrderRentVehicleDetail() != null && orderPageVO.getOrderRentVehicleDetail().getVehicleId() != null) {
RestResponse<Vehicle> restResponse = vehicleFeign.findById(orderPageVO.getOrderRentVehicleDetail().getVehicleId()); RestResponse<Vehicle> restResponse = vehicleFeign.findById(orderPageVO.getOrderRentVehicleDetail().getVehicleId());
log.info("获取车辆信息返回消息:{}", restResponse.getMessage()); log.info("获取车辆信息返回消息:{}", restResponse.getMessage());
......
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