提交 7ed87653 作者: zhenjie

参与活动修改

上级 7baa169c
......@@ -72,11 +72,4 @@ public class ActivityController extends BaseController {
return activityService.inviteDetail(activityQO);
}
@ApiOperation(value = "测试参与活动")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("test")
public ResultBody test(@RequestParam Integer activityType, @RequestParam("userAccountId") Integer userAccountId, @RequestParam("pUserAccountId") Integer pUserAccountId) {
return activityService.participateActivity(activityType, userAccountId, pUserAccountId);
}
}
......@@ -200,4 +200,6 @@ public interface UserServiceDao {
UserAccountMessageVo userMessages(Integer userAccountId);
List<String> userMessagesPilot(Integer pilotId);
List<UserAccountDO> listAllUserAccountByIds(@Param("userIds") List<Integer> ids);
}
......@@ -93,6 +93,14 @@ public interface UserAccountService {
List<UserAccountSimpleDTO> feignListUserAccountByIds(List<Integer> ids);
/**
* 根据id获取用户信息,包括已删除的
*
* @param ids
* @return
*/
List<UserAccountSimpleDTO> feignListAllUserAccountByIds(List<Integer> ids);
/**
* 根据用户id获取推荐人信息
*
* @param userIds
......
......@@ -141,8 +141,8 @@ public class ActivityServiceImpl implements ActivityService {
List<Integer> userIds = activityPartDTOS.stream().map(ActivityPartDTO::getUserAccountId).collect(Collectors.toList());
// 被邀请人id
List<Integer> pUserIds = activityPartDTOS.stream().map(ActivityPartDTO::getPUserAccountId).collect(Collectors.toList());
List<UserAccountSimpleDTO> userAccountSimpleDTOS = userAccountService.feignListUserAccountByIds(userIds);
List<UserAccountSimpleDTO> pUserAccountDTOS = userAccountService.feignListUserAccountByIds(pUserIds);
List<UserAccountSimpleDTO> userAccountSimpleDTOS = userAccountService.feignListAllUserAccountByIds(userIds);
List<UserAccountSimpleDTO> pUserAccountDTOS = userAccountService.feignListAllUserAccountByIds(pUserIds);
if (!CollectionUtils.isEmpty(userAccountSimpleDTOS)) {
Map<Integer, UserAccountSimpleDTO> userMap = userAccountSimpleDTOS.stream().collect(Collectors.toMap(UserAccountSimpleDTO::getId, k1 -> k1, (k1, k2) -> k2));
for (ActivityPartDTO activityPartDTO : activityPartDTOS) {
......
......@@ -313,6 +313,18 @@ public class UserAccountServiceImpl implements UserAccountService {
}
@Override
public List<UserAccountSimpleDTO> feignListAllUserAccountByIds(List<Integer> ids) {
List<UserAccountDO> userAccountDOS = userServiceDao.listAllUserAccountByIds(ids);
if (!CollectionUtils.isEmpty(userAccountDOS)) {
List<UserAccountSimpleDTO> userAccountSimpleDTOS = userAccountDOS.stream().map(UserAccountDO::buildUserAccountSimpleDTO).collect(Collectors.toList());
//设置用户的渠道等级
buildCooperationTagVO(userAccountSimpleDTOS);
return userAccountSimpleDTOS;
}
return null;
}
@Override
public List<UserAccountSimpleDTO> feignListRcdUserInfo(List<Integer> userIds) {
List<UserAccountDO> userAccountDOS = userServiceDao.feignListRcdUserInfo(userIds);
if (!CollectionUtils.isEmpty(userAccountDOS)) {
......
......@@ -637,4 +637,18 @@
pilot_certification_id = #{pilotId}
</select>
<select id="listAllUserAccountByIds" resultType="com.mmc.iuav.user.entity.UserAccountDO">
select ua.id, ua.phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id,
ua.union_id, ua.user_sex, ua.email, ua.source, ua.account_status, ua.remark,
ua.port_type, ua.disable, ua.create_time, ua.update_time, ca.auth_status as companyAuthStatus,
ca.company_name
from user_account ua left join company_auth ca on ua.id = ca.user_account_id
where 1 = 1
<if test=" userIds != null ">
<foreach collection="userIds" item="id" open="and ua.id in (" close=")" separator=",">
#{id}
</foreach>
</if>
</select>
</mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论