Commit 6cddc5ec authored by hanfeng's avatar hanfeng

Merge branch 'master-modify-background-bug-hf' into dev

# Conflicts:
#	ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/feign/UserFeign.java
#	ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/mapper/AppUserDetailMapper.java
#	ace-modules/ace-admin/src/main/resources/mapper/AppUserDetailMapper.xml
parents 324534e0 0fd26450
...@@ -132,6 +132,14 @@ public interface UserFeign { ...@@ -132,6 +132,14 @@ public interface UserFeign {
@GetMapping("/app/user/finduserIdsByphones") @GetMapping("/app/user/finduserIdsByphones")
Map<String, Integer> findAppusersByUserNames(@RequestParam(value = "phones") List<String> phones); Map<String, Integer> findAppusersByUserNames(@RequestParam(value = "phones") List<String> phones);
/**
* 批量获取用户基本信息
* @param ids
* @return
*/
@GetMapping("/public/getUsersByUserIds")
ObjectRestResponse<List<AppUserVo>> getUsersByUserIds(@RequestParam("ids") List<Integer> ids);
@GetMapping("/member/user") @GetMapping("/member/user")
BaseUserMember findBaseUserMemberByUserId(@RequestParam(value = "userId") Integer userId); BaseUserMember findBaseUserMemberByUserId(@RequestParam(value = "userId") Integer userId);
......
...@@ -167,4 +167,8 @@ public class AppUserDetailBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail ...@@ -167,4 +167,8 @@ public class AppUserDetailBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail
criteria.andEqualTo("userid",userId); criteria.andEqualTo("userid",userId);
mapper.updateByExampleSelective(appUserDetail,example); mapper.updateByExampleSelective(appUserDetail,example);
} }
public List<AppUserVo> getUserByUserIds(List<Integer> ids) {
return mapper.getUserVo(ids);
}
} }
...@@ -22,6 +22,7 @@ public interface AppUserDetailMapper extends Mapper<AppUserDetail> { ...@@ -22,6 +22,7 @@ public interface AppUserDetailMapper extends Mapper<AppUserDetail> {
List<Integer> getUserIdByUsername(@Param("keywords") String keywords); List<Integer> getUserIdByUsername(@Param("keywords") String keywords);
List<AppUserVo> getUserVo(@Param("list") List<Integer> ids);
List<AppUserManageVo> selectAppUser(AppUserManageDTO appUserManageDTO); List<AppUserManageVo> selectAppUser(AppUserManageDTO appUserManageDTO);
} }
\ No newline at end of file
package com.github.wxiaoqi.security.admin.rest; package com.github.wxiaoqi.security.admin.rest;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.github.wxiaoqi.security.admin.biz.*; import com.github.wxiaoqi.security.admin.biz.*;
import com.github.wxiaoqi.security.admin.entity.*; import com.github.wxiaoqi.security.admin.entity.*;
...@@ -156,7 +157,20 @@ public class PublicController { ...@@ -156,7 +157,20 @@ public class PublicController {
AppUserVo userVo = detailBiz.getUserInfoById(id); AppUserVo userVo = detailBiz.getUserInfoById(id);
appUserVos.add(userVo); appUserVos.add(userVo);
} }
return ObjectRestResponse.succ(appUserVos);
}
@GetMapping("/getUsersByUserIds")
public ObjectRestResponse<List<AppUserVo>> getUsersByUserIds(@RequestParam("ids") List<Integer> ids) {
if(CollectionUtil.isEmpty(ids)) {
return ObjectRestResponse.createFailedResult(500, "参数id为空");
}
List<AppUserVo> appUserVos = detailBiz.getUserByUserIds(ids);
if(CollectionUtil.isEmpty(appUserVos)) {
return ObjectRestResponse.succ(new ArrayList<AppUserVo>());
}
return ObjectRestResponse.succ(appUserVos); return ObjectRestResponse.succ(appUserVos);
} }
......
...@@ -40,6 +40,15 @@ ...@@ -40,6 +40,15 @@
<!-- 获取用户信息 --> <!-- 获取用户信息 -->
<select id="getUserInfo" resultMap="AppUserVoMap"> <select id="getUserInfo" resultMap="AppUserVoMap">
select l.im_userid,l.username,l.wx_openid,l.unionid,l.openid,l.status,l.id_number,l.certification_status,d.* from app_user_login l
left join app_user_detail d
on d.userid = l.id
where d.userid = #{userId} limit 1
</select>
<!-- 获取用户信息 -->
<select id="getUserVo" resultMap="AppUserVoMap">
select l.im_userid,l.username,l.wx_openid,l.unionid,l.openid,l.status,l.id_number,l.certification_status,d.*,p.name as jobTitle,buml.name as memberName from app_user_login l select l.im_userid,l.username,l.wx_openid,l.unionid,l.openid,l.status,l.id_number,l.certification_status,d.*,p.name as jobTitle,buml.name as memberName from app_user_login l
left join app_user_detail d left join app_user_detail d
on d.userid = l.id on d.userid = l.id
...@@ -54,32 +63,13 @@ ...@@ -54,32 +63,13 @@
and and
buml.isdel=0 buml.isdel=0
and and
bum.is_del=0 d.userid in
and
d.userid = #{userId} limit 1
</select>
<foreach collection="list" item="userId" index="index" open="(" separator="," close=")" >
#{userId}
</foreach>
<!-- &lt;!&ndash; 获取用户信息 &ndash;&gt;--> </select>
<!-- <select id="getUserVo" resultMap="AppUserVoMap">-->
<!-- select l.im_userid,l.username,l.wx_openid,l.unionid,l.openid,l.status,l.id_number,l.certification_status,d.*,p.name as jobTitle,buml.name as memberName from app_user_login l-->
<!-- left join app_user_detail d-->
<!-- on d.userid = l.id-->
<!-- left join base_user_member bum-->
<!-- on bum.user_id=l.id-->
<!-- left join base_user_member_level buml-->
<!-- on bum.member_level = buml.level-->
<!-- left join app_user_position p-->
<!-- on d.position_id=p.id-->
<!-- where-->
<!-- p.is_del=0-->
<!-- and-->
<!-- buml.isdel=0-->
<!-- and-->
<!-- bum.is_del=0-->
<!-- and-->
<!-- d.userid = #{userId} limit 1-->
<!-- </select>-->
<select id="getUserIdByUsername" resultType="java.lang.Integer" parameterType="java.lang.String"> <select id="getUserIdByUsername" resultType="java.lang.Integer" parameterType="java.lang.String">
......
...@@ -51,6 +51,8 @@ public class OrderListVo extends BaseOrder { ...@@ -51,6 +51,8 @@ public class OrderListVo extends BaseOrder {
private List<OrderItem> items; private List<OrderItem> items;
@ApiModelProperty(value = "车辆编号")
private Integer vehicleCode;
@ApiModelProperty(value = "用户职位名称") @ApiModelProperty(value = "用户职位名称")
private String jobTitle; private String jobTitle;
......
...@@ -172,7 +172,7 @@ public class BackStageOrderController extends CommonBaseController implements Us ...@@ -172,7 +172,7 @@ public class BackStageOrderController extends CommonBaseController implements Us
List<OrderListVo> list = pageDataVO.getData(); List<OrderListVo> list = pageDataVO.getData();
List<Integer> userIds = list.stream().map(OrderListVo::getUserId).distinct().collect(Collectors.toList()); List<Integer> userIds = list.stream().map(OrderListVo::getUserId).distinct().collect(Collectors.toList());
if (userIds != null && userIds.size() > 0) { if (userIds != null && userIds.size() > 0) {
ObjectRestResponse<List<AppUserVo>> objectRestResponse = userFeign.getByUserIds(userIds); ObjectRestResponse<List<AppUserVo>> objectRestResponse = userFeign.getUsersByUserIds(userIds);
log.info("获取用户信息:objectRestResponse = {}", objectRestResponse.getData()); log.info("获取用户信息:objectRestResponse = {}", objectRestResponse.getData());
Map<Integer, AppUserVo> appvoMap = new HashMap<Integer, AppUserVo>(); Map<Integer, AppUserVo> appvoMap = new HashMap<Integer, AppUserVo>();
if (objectRestResponse.getData() != null) { if (objectRestResponse.getData() != null) {
...@@ -215,7 +215,6 @@ public class BackStageOrderController extends CommonBaseController implements Us ...@@ -215,7 +215,6 @@ public class BackStageOrderController extends CommonBaseController implements Us
String[] couponIds = orderPageVO.getCouponTickerNos().split(","); String[] couponIds = orderPageVO.getCouponTickerNos().split(",");
List<Coupon> couponList = activityFeign.couponsByTickerNoList(Lists.newArrayList(couponIds)); List<Coupon> couponList = activityFeign.couponsByTickerNoList(Lists.newArrayList(couponIds));
orderPageVO.setCouponList(couponList); orderPageVO.setCouponList(couponList);
} }
} }
...@@ -225,6 +224,7 @@ public class BackStageOrderController extends CommonBaseController implements Us ...@@ -225,6 +224,7 @@ public class BackStageOrderController extends CommonBaseController implements Us
log.info("获取车辆信息返回消息:{}", restResponse.getData()); log.info("获取车辆信息返回消息:{}", restResponse.getData());
if (restResponse.getData() != null) { if (restResponse.getData() != null) {
orderPageVO.setVehicleNumberPlat(restResponse.getData().getNumberPlate()); orderPageVO.setVehicleNumberPlat(restResponse.getData().getNumberPlate());
orderPageVO.setVehicleCode(restResponse.getData().getCode());
} }
if (StringUtils.isNotBlank(orderPageVO.getOrderRentVehicleDetail().getMyDriverIds())) { if (StringUtils.isNotBlank(orderPageVO.getOrderRentVehicleDetail().getMyDriverIds())) {
try { try {
......
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