Compare commits
5 Commits
f9f0ef73a3
...
4995ce5a99
Author | SHA1 | Date | |
---|---|---|---|
4995ce5a99 | |||
e3f656e730 | |||
7c01f75b7d | |||
a54fce3ab6 | |||
fbdb47091a |
@@ -0,0 +1,28 @@
|
|||||||
|
package com.accompany.admin.model.guild;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 后台超管【赠送座驾】权限表实体类
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2025-10-14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class GuildAdminCarRef implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "id" , type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
private Integer roleId;
|
||||||
|
private Integer carId;
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@@ -65,5 +65,8 @@ public class FamilyAdminVo {
|
|||||||
private String inviteCheck;
|
private String inviteCheck;
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Boolean enableEditInvite;
|
private Boolean enableEditInvite;
|
||||||
|
@ApiModelProperty("操作人")
|
||||||
|
@ExcelProperty("操作人")
|
||||||
|
private String operator;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,14 @@
|
|||||||
|
package com.accompany.admin.mapper.guild;
|
||||||
|
|
||||||
|
import com.accompany.admin.model.guild.GuildAdminCarRef;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 后台超管【赠送座驾】权限表 Mapper 接口
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2025-10-14
|
||||||
|
*/
|
||||||
|
public interface GuildAdminCarRefMapper extends BaseMapper<GuildAdminCarRef> {
|
||||||
|
|
||||||
|
}
|
@@ -5,7 +5,6 @@ import com.accompany.admin.vo.UsersAdminVo;
|
|||||||
import com.accompany.business.constant.SymbolConstants;
|
import com.accompany.business.constant.SymbolConstants;
|
||||||
import com.accompany.business.event.UsersChangePartitionEvent;
|
import com.accompany.business.event.UsersChangePartitionEvent;
|
||||||
import com.accompany.business.model.PrivatePhoto;
|
import com.accompany.business.model.PrivatePhoto;
|
||||||
import com.accompany.business.model.UserInviteCode;
|
|
||||||
import com.accompany.business.model.UserPurse;
|
import com.accompany.business.model.UserPurse;
|
||||||
import com.accompany.business.mybatismapper.PrivatePhotoMapper;
|
import com.accompany.business.mybatismapper.PrivatePhotoMapper;
|
||||||
import com.accompany.business.mybatismapper.UserInviteCodeMapper;
|
import com.accompany.business.mybatismapper.UserInviteCodeMapper;
|
||||||
@@ -134,7 +133,7 @@ public class UserCheckAdminService {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<UsersAdminVo> getUserListByErbanNoList(List<String> erbanNoList){
|
public List<UsersAdminVo> getUserListByErbanNoList(List<String> erbanNoList){
|
||||||
List<Long> newList = new ArrayList<>(erbanNoList.size());
|
List<Long> newList = new ArrayList<>(erbanNoList.size());
|
||||||
for(String myErbanNo: erbanNoList){
|
for(String myErbanNo: erbanNoList){
|
||||||
Long erbanNo = Long.valueOf(myErbanNo);
|
Long erbanNo = Long.valueOf(myErbanNo);
|
||||||
|
@@ -11,7 +11,10 @@ import com.accompany.business.constant.family.FamilyConstant;
|
|||||||
import com.accompany.business.event.FamilyMemberStatusChangeEvent;
|
import com.accompany.business.event.FamilyMemberStatusChangeEvent;
|
||||||
import com.accompany.business.event.NewGuildEvent;
|
import com.accompany.business.event.NewGuildEvent;
|
||||||
import com.accompany.business.message.NewGuildMessage;
|
import com.accompany.business.message.NewGuildMessage;
|
||||||
import com.accompany.business.model.family.*;
|
import com.accompany.business.model.family.Family;
|
||||||
|
import com.accompany.business.model.family.FamilyMember;
|
||||||
|
import com.accompany.business.model.family.FamilyOperateRecord;
|
||||||
|
import com.accompany.business.model.family.FamilyPayAccount;
|
||||||
import com.accompany.business.mybatismapper.family.FamilyMemberDiamondSettlementRecordMapper;
|
import com.accompany.business.mybatismapper.family.FamilyMemberDiamondSettlementRecordMapper;
|
||||||
import com.accompany.business.service.UploadAvatarService;
|
import com.accompany.business.service.UploadAvatarService;
|
||||||
import com.accompany.business.service.family.*;
|
import com.accompany.business.service.family.*;
|
||||||
@@ -87,7 +90,7 @@ public class FamilyManageAdminService {
|
|||||||
private FamilyMemberDiamondSettlementRecordMapper familyMemberDiamondSettlementRecordMapper;
|
private FamilyMemberDiamondSettlementRecordMapper familyMemberDiamondSettlementRecordMapper;
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Family createFamily(Long erbanNo, String referrer, Long inviteErbanNo) {
|
public Family createFamily(Long erbanNo, String referrer, Long inviteErbanNo, Integer adminId) {
|
||||||
Users u = usersService.getUserByErbanNo(erbanNo);
|
Users u = usersService.getUserByErbanNo(erbanNo);
|
||||||
if (null == u){
|
if (null == u){
|
||||||
throw new AdminServiceException(BusiStatus.USERNOTEXISTS);
|
throw new AdminServiceException(BusiStatus.USERNOTEXISTS);
|
||||||
@@ -126,6 +129,7 @@ public class FamilyManageAdminService {
|
|||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
|
|
||||||
Family family = new Family();
|
Family family = new Family();
|
||||||
|
family.setAdminId(adminId);
|
||||||
family.setPartitionId(u.getPartitionId());
|
family.setPartitionId(u.getPartitionId());
|
||||||
family.setOwnerUid(u.getUid());
|
family.setOwnerUid(u.getUid());
|
||||||
family.setName(u.getNick() + I18NMessageSourceUtil.getMessage(FamilyConstant.DefaultInfo.DEFAULT_NAME_SUFFIX_I18N_ID,
|
family.setName(u.getNick() + I18NMessageSourceUtil.getMessage(FamilyConstant.DefaultInfo.DEFAULT_NAME_SUFFIX_I18N_ID,
|
||||||
@@ -300,6 +304,7 @@ public class FamilyManageAdminService {
|
|||||||
.list().stream().collect(Collectors.toMap(FamilyPayAccount::getFamilyId, a->a));
|
.list().stream().collect(Collectors.toMap(FamilyPayAccount::getFamilyId, a->a));
|
||||||
|
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
|
Map<Integer, String> adminUserMap = adminUserService.adminUserMap();
|
||||||
for (Family family: poList){
|
for (Family family: poList){
|
||||||
FamilyAdminVo vo = new FamilyAdminVo();
|
FamilyAdminVo vo = new FamilyAdminVo();
|
||||||
vo.setId(family.getId());
|
vo.setId(family.getId());
|
||||||
@@ -314,6 +319,9 @@ public class FamilyManageAdminService {
|
|||||||
vo.setCreateTime(DateTimeUtil.convertDate(family.getCreateTime()));
|
vo.setCreateTime(DateTimeUtil.convertDate(family.getCreateTime()));
|
||||||
vo.setEnable(family.getEnable());
|
vo.setEnable(family.getEnable());
|
||||||
vo.setIdCard(family.getIdCard());
|
vo.setIdCard(family.getIdCard());
|
||||||
|
if (family.getAdminId() != null) {
|
||||||
|
vo.setOperator(adminUserMap.get(family.getAdminId()));
|
||||||
|
}
|
||||||
vo.setInviteCheck(family.getInviteCheck());
|
vo.setInviteCheck(family.getInviteCheck());
|
||||||
if (family.getInviteUid() != null) {
|
if (family.getInviteUid() != null) {
|
||||||
Users users = usersMap.get(family.getInviteUid());
|
Users users = usersMap.get(family.getInviteUid());
|
||||||
|
@@ -0,0 +1,44 @@
|
|||||||
|
package com.accompany.admin.service.guild;
|
||||||
|
|
||||||
|
import com.accompany.admin.mapper.guild.GuildAdminCarRefMapper;
|
||||||
|
import com.accompany.admin.model.guild.GuildAdminCarRef;
|
||||||
|
import com.accompany.admin.service.system.AdminUserService;
|
||||||
|
import com.accompany.admin.vo.AdminUserVo;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 后台超管【赠送座驾】权限表 服务实现类
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2025-10-14
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class GuildAdminCarRefService extends ServiceImpl<GuildAdminCarRefMapper, GuildAdminCarRef> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AdminUserService adminUserService;
|
||||||
|
|
||||||
|
public List<Integer> carIds(Integer adminId) {
|
||||||
|
AdminUserVo adminUserVo = adminUserService.getByAdminId(adminId);
|
||||||
|
if (adminUserVo == null || CollectionUtils.isEmpty(adminUserVo.getRoleIds())) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
LambdaQueryWrapper<GuildAdminCarRef> wrapper = Wrappers.lambdaQuery();
|
||||||
|
wrapper.in(GuildAdminCarRef::getRoleId, adminUserVo.getRoleIds());
|
||||||
|
List<GuildAdminCarRef> guildAdminHeadwearRefs = baseMapper.selectList(wrapper);
|
||||||
|
if (CollectionUtils.isEmpty(guildAdminHeadwearRefs)) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
return guildAdminHeadwearRefs.stream().map(GuildAdminCarRef::getCarId).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -1,5 +1,6 @@
|
|||||||
package com.accompany.admin.service.guild;
|
package com.accompany.admin.service.guild;
|
||||||
|
|
||||||
|
import com.accompany.admin.base.Pagination;
|
||||||
import com.accompany.admin.dto.NameplateDto;
|
import com.accompany.admin.dto.NameplateDto;
|
||||||
import com.accompany.admin.service.family.FamilyIncomeAdminService;
|
import com.accompany.admin.service.family.FamilyIncomeAdminService;
|
||||||
import com.accompany.admin.service.family.FamilyManageAdminService;
|
import com.accompany.admin.service.family.FamilyManageAdminService;
|
||||||
@@ -11,8 +12,11 @@ import com.accompany.admin.vo.AdminUserVo;
|
|||||||
import com.accompany.admin.vo.family.FamilyAdminVo;
|
import com.accompany.admin.vo.family.FamilyAdminVo;
|
||||||
import com.accompany.admin.vo.guild.GuildApplyAuditVo;
|
import com.accompany.admin.vo.guild.GuildApplyAuditVo;
|
||||||
import com.accompany.admin.vo.vip.VipSendRecordVo;
|
import com.accompany.admin.vo.vip.VipSendRecordVo;
|
||||||
|
import com.accompany.business.model.CarGoods;
|
||||||
import com.accompany.business.model.family.Family;
|
import com.accompany.business.model.family.Family;
|
||||||
import com.accompany.business.model.guild.GuildSuperAdminInfo;
|
import com.accompany.business.model.guild.GuildSuperAdminInfo;
|
||||||
|
import com.accompany.business.service.car.CarGoodsService;
|
||||||
|
import com.accompany.business.service.car.CarPayService;
|
||||||
import com.accompany.business.service.guild.GuildSuperAdminInfoService;
|
import com.accompany.business.service.guild.GuildSuperAdminInfoService;
|
||||||
import com.accompany.business.service.headwear.HeadwearService;
|
import com.accompany.business.service.headwear.HeadwearService;
|
||||||
import com.accompany.business.service.user.UsersService;
|
import com.accompany.business.service.user.UsersService;
|
||||||
@@ -21,7 +25,7 @@ import com.accompany.business.vo.guild.GuildDiamondStatisticsDayVo;
|
|||||||
import com.accompany.common.result.BusiResult;
|
import com.accompany.common.result.BusiResult;
|
||||||
import com.accompany.common.result.PageResult;
|
import com.accompany.common.result.PageResult;
|
||||||
import com.accompany.common.status.BusiStatus;
|
import com.accompany.common.status.BusiStatus;
|
||||||
import com.accompany.core.enumeration.PartitionEnum;
|
import com.accompany.common.utils.BlankUtil;
|
||||||
import com.accompany.core.exception.AdminServiceException;
|
import com.accompany.core.exception.AdminServiceException;
|
||||||
import com.accompany.core.model.Users;
|
import com.accompany.core.model.Users;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -31,10 +35,10 @@ import org.apache.commons.collections.CollectionUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.List;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.Map;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.Optional;
|
import java.util.concurrent.Executors;
|
||||||
|
|
||||||
import static java.util.Collections.EMPTY_LIST;
|
import static java.util.Collections.EMPTY_LIST;
|
||||||
|
|
||||||
@@ -70,6 +74,12 @@ public class GuildSuperAdminService {
|
|||||||
private GuildSuperAdminInfoService guildSuperAdminInfoService;
|
private GuildSuperAdminInfoService guildSuperAdminInfoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private GuildDiamondStatisticsDayAdminService guildDiamondStatisticsDayAdminService;
|
private GuildDiamondStatisticsDayAdminService guildDiamondStatisticsDayAdminService;
|
||||||
|
@Autowired
|
||||||
|
private GuildAdminCarRefService guildAdminCarRefService;
|
||||||
|
@Autowired
|
||||||
|
private CarGoodsService carGoodsService;
|
||||||
|
@Autowired
|
||||||
|
private CarPayService carPayService;
|
||||||
|
|
||||||
public void createFamily(Long erbanNo, Long inviteErbanNo, Integer adminId) {
|
public void createFamily(Long erbanNo, Long inviteErbanNo, Integer adminId) {
|
||||||
AdminUserVo adminUserVo = adminUserService.getByAdminId(adminId);
|
AdminUserVo adminUserVo = adminUserService.getByAdminId(adminId);
|
||||||
@@ -95,11 +105,13 @@ public class GuildSuperAdminService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Family family = familyManageAdminService.createFamily(erbanNo, adminUserVo.getUsername(), inviteErbanNo);
|
Family family = familyManageAdminService.createFamily(erbanNo, adminUserVo.getUsername(), inviteErbanNo, adminUserVo.getAdminId());
|
||||||
guildAdminRefService.bindAdminGuild(adminId, family.getId(), user.getPartitionId());
|
guildAdminRefService.bindAdminGuild(adminId, family.getId(), user.getPartitionId());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Page<FamilyAdminVo> pageFamily(Integer partitionId, Integer familyId, Long erbanNo,long pageNum, long pageSize, Integer adminId) {
|
public Page<FamilyAdminVo> pageFamily(Integer familyId, Long erbanNo,long pageNum, long pageSize, Integer adminId) {
|
||||||
|
AdminUserVo adminUserVo = adminUserService.getByAdminId(adminId);
|
||||||
|
Integer partitionId = adminUserVo.getPartitionIds().get(0);
|
||||||
List<Integer> guildIdsByAdminId = guildAdminRefService.getGuildIdsByAdminId(adminId, partitionId);
|
List<Integer> guildIdsByAdminId = guildAdminRefService.getGuildIdsByAdminId(adminId, partitionId);
|
||||||
if (CollectionUtils.isEmpty(guildIdsByAdminId)) {
|
if (CollectionUtils.isEmpty(guildIdsByAdminId)) {
|
||||||
return new Page<>(pageNum, pageSize);
|
return new Page<>(pageNum, pageSize);
|
||||||
@@ -117,12 +129,12 @@ public class GuildSuperAdminService {
|
|||||||
if (null == u){
|
if (null == u){
|
||||||
throw new AdminServiceException(BusiStatus.USERNOTEXISTS);
|
throw new AdminServiceException(BusiStatus.USERNOTEXISTS);
|
||||||
}
|
}
|
||||||
if (vipLevel > 3) {
|
if (vipLevel > 4) {
|
||||||
throw new AdminServiceException("vipLevel error");
|
throw new AdminServiceException("vipLevel error");
|
||||||
}
|
}
|
||||||
boolean partitionCheck = adminUserVo.getPartitionIds().contains(u.getPartitionId());
|
boolean partitionCheck = adminUserVo.getPartitionIds().contains(u.getPartitionId());
|
||||||
if (!partitionCheck) {
|
if (!partitionCheck) {
|
||||||
throw new AdminServiceException("会长ID Part Error");
|
throw new AdminServiceException("ID Part Error");
|
||||||
}
|
}
|
||||||
vipSendAdminService.send(uid, vipLevel, adminId, days, Boolean.FALSE);
|
vipSendAdminService.send(uid, vipLevel, adminId, days, Boolean.FALSE);
|
||||||
}
|
}
|
||||||
@@ -229,6 +241,90 @@ public class GuildSuperAdminService {
|
|||||||
return retMap;
|
return retMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Pagination<CarGoods> getCarGoodsList(Integer page, Integer pageSize, Integer adminId) {
|
||||||
|
|
||||||
|
List<Integer> carGoodsIds = guildAdminCarRefService.carIds(adminId);
|
||||||
|
if (CollectionUtils.isEmpty(carGoodsIds)) {
|
||||||
|
throw new AdminServiceException("CONFIG ERROR:");
|
||||||
|
}
|
||||||
|
Pagination<CarGoods> pagination = new Pagination<>();
|
||||||
|
pagination.setTotal(carGoodsService.countCarGoods((byte)2, null, null, null, null, carGoodsIds));
|
||||||
|
pagination.setRows(carGoodsService.getCarGoodsList(page, pageSize, (byte)2, null, null, null, null, null, carGoodsIds));
|
||||||
|
return pagination;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map carSend(String erbanNo, Integer carId, Integer days, String desc, Integer otherDay, Integer adminId) {
|
||||||
|
|
||||||
|
List<Integer> carGoodsIds = guildAdminCarRefService.carIds(adminId);
|
||||||
|
if (carGoodsIds == null || carGoodsIds.isEmpty() || !carGoodsIds.contains(carId)) {
|
||||||
|
throw new AdminServiceException("config ERROR:");
|
||||||
|
}
|
||||||
|
AdminUserVo adminUserVo = adminUserService.getByAdminId(adminId);
|
||||||
|
|
||||||
|
//赠送失败的平台号
|
||||||
|
List<String> failErban = new ArrayList<String>();
|
||||||
|
//赠送失败原因
|
||||||
|
List<String> failReason = new ArrayList<String>();
|
||||||
|
Map retMap = new HashMap();
|
||||||
|
//前台js换行符为'\n'
|
||||||
|
String[] erbanList = erbanNo.split("\n");
|
||||||
|
try {
|
||||||
|
if (erbanList == null || carId == null || days == null || BlankUtil.isBlank(desc)) {
|
||||||
|
throw new AdminServiceException(BusiStatus.PARAMETERILLEGAL);
|
||||||
|
}
|
||||||
|
if (days <= 0 || carId <= 0 || erbanList.length <= 0) {
|
||||||
|
throw new AdminServiceException(BusiStatus.PARAMETERILLEGAL);
|
||||||
|
}
|
||||||
|
if(otherDay != null && (otherDay <= 0 || otherDay >= 365)){
|
||||||
|
throw new AdminServiceException(BusiStatus.PARAMETERILLEGAL);
|
||||||
|
}
|
||||||
|
if(otherDay != null ){
|
||||||
|
log.info("超管赠送座驾 erbanNo:{},carId:{}, days:{} 更换为 otherDay:{}",erbanNo,carId,days,otherDay);
|
||||||
|
days = otherDay;
|
||||||
|
}
|
||||||
|
final CountDownLatch latch = new CountDownLatch(erbanList.length);
|
||||||
|
ExecutorService executors = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 4 - 1);
|
||||||
|
for (String erban : erbanList) {
|
||||||
|
Integer sendDays = days;
|
||||||
|
executors.execute(()->{
|
||||||
|
try {
|
||||||
|
Users users = usersService.getUserByErbanNo(Long.valueOf(erban));
|
||||||
|
if (users == null) {
|
||||||
|
throw new AdminServiceException(BusiStatus.USERNOTEXISTS);
|
||||||
|
}
|
||||||
|
Long uid = users.getUid();
|
||||||
|
CarGoods carGoods = carGoodsService.getCarGoods(carId);
|
||||||
|
if (carGoods == null) {
|
||||||
|
throw new AdminServiceException(BusiStatus.CARPORTNOTEXIST);
|
||||||
|
}
|
||||||
|
if (!adminUserVo.getPartitionIds().contains(users.getPartitionId())) {
|
||||||
|
throw new AdminServiceException("ID:"+ erban +" Part Error");
|
||||||
|
}
|
||||||
|
carPayService.experCarByOfficial(uid, carId, sendDays, desc, true);
|
||||||
|
} catch (AdminServiceException e) {
|
||||||
|
log.error("exper error:{}", e);
|
||||||
|
failErban.add(erban);
|
||||||
|
failReason.add(e.getMessage());
|
||||||
|
}finally {
|
||||||
|
latch.countDown();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
latch.await();
|
||||||
|
if (failErban.size() > 0) {
|
||||||
|
retMap.put("code", "200");
|
||||||
|
retMap.put("erban", failErban.toString());
|
||||||
|
retMap.put("message", failReason.toString());
|
||||||
|
} else {
|
||||||
|
retMap.put("code", "100");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("exper function error:{}", e);
|
||||||
|
retMap.put("code", "300");
|
||||||
|
retMap.put("message", e.getMessage());
|
||||||
|
}
|
||||||
|
return retMap;
|
||||||
|
}
|
||||||
|
|
||||||
public Page<FamilyIncomeAdminVo> pageFamilyIncome(Long erbanNo, Integer regionId, String familyName, String startDate, String endDate,
|
public Page<FamilyIncomeAdminVo> pageFamilyIncome(Long erbanNo, Integer regionId, String familyName, String startDate, String endDate,
|
||||||
long pageNum, long pageSize, Integer partitionId, Integer adminId) {
|
long pageNum, long pageSize, Integer partitionId, Integer adminId) {
|
||||||
@@ -266,7 +362,8 @@ public class GuildSuperAdminService {
|
|||||||
if (inviteUid == null) {
|
if (inviteUid == null) {
|
||||||
return new Page<>();
|
return new Page<>();
|
||||||
}
|
}
|
||||||
return guildDiamondStatisticsDayAdminService.list(startDate, endDate, null, null, guildId, ownerErbanNo, pageNo, pageSize, inviteUid);
|
AdminUserVo adminUserVo = adminUserService.getByAdminId(adminId);
|
||||||
|
return guildDiamondStatisticsDayAdminService.list(startDate, endDate, adminUserVo.getPartitionIds().get(0), null, guildId, ownerErbanNo, pageNo, pageSize, inviteUid);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -51,8 +51,8 @@ public class CarGoodsAdminController extends BaseController {
|
|||||||
enable = null;
|
enable = null;
|
||||||
}
|
}
|
||||||
Pagination<CarGoods> pagination = new Pagination<>();
|
Pagination<CarGoods> pagination = new Pagination<>();
|
||||||
pagination.setTotal(carGoodsService.countCarGoods(enable, carGoodsId, carGoodsName, carGoodsType, partitionId));
|
pagination.setTotal(carGoodsService.countCarGoods(enable, carGoodsId, carGoodsName, carGoodsType, partitionId, null));
|
||||||
pagination.setRows(carGoodsService.getCarGoodsList(page, pageSize, enable, null, carGoodsId, carGoodsName, carGoodsType, partitionId));
|
pagination.setRows(carGoodsService.getCarGoodsList(page, pageSize, enable, null, carGoodsId, carGoodsName, carGoodsType, partitionId, null));
|
||||||
return pagination;
|
return pagination;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4,8 +4,8 @@ import com.accompany.admin.controller.BaseController;
|
|||||||
import com.accompany.admin.service.family.FamilyManageAdminService;
|
import com.accompany.admin.service.family.FamilyManageAdminService;
|
||||||
import com.accompany.admin.service.system.AdminLogService;
|
import com.accompany.admin.service.system.AdminLogService;
|
||||||
import com.accompany.admin.vo.family.FamilyAdminVo;
|
import com.accompany.admin.vo.family.FamilyAdminVo;
|
||||||
import com.accompany.business.vo.family.FamilyMemberAdminVo;
|
|
||||||
import com.accompany.admin.vo.family.FamilyOperateRecordAdminVo;
|
import com.accompany.admin.vo.family.FamilyOperateRecordAdminVo;
|
||||||
|
import com.accompany.business.vo.family.FamilyMemberAdminVo;
|
||||||
import com.accompany.common.result.BusiResult;
|
import com.accompany.common.result.BusiResult;
|
||||||
import com.accompany.common.result.PageResult;
|
import com.accompany.common.result.PageResult;
|
||||||
import com.accompany.common.status.BusiStatus;
|
import com.accompany.common.status.BusiStatus;
|
||||||
@@ -51,7 +51,7 @@ public class FamilyManageAdminController extends BaseController {
|
|||||||
throw new AdminServiceException(BusiStatus.PARAMERROR);
|
throw new AdminServiceException(BusiStatus.PARAMERROR);
|
||||||
}
|
}
|
||||||
Integer adminId = getAdminId();
|
Integer adminId = getAdminId();
|
||||||
service.createFamily(erbanNo, referrer, inviteErbanNo);
|
service.createFamily(erbanNo, referrer, inviteErbanNo, adminId);
|
||||||
adminLogService.insertLog(adminId,getClass().getCanonicalName(),
|
adminLogService.insertLog(adminId,getClass().getCanonicalName(),
|
||||||
"create family","params===>>erbanNo:"+erbanNo + ",referrer:" + referrer + ",inviteErbanNo:"+ inviteErbanNo);
|
"create family","params===>>erbanNo:"+erbanNo + ",referrer:" + referrer + ",inviteErbanNo:"+ inviteErbanNo);
|
||||||
return BusiResult.success();
|
return BusiResult.success();
|
||||||
|
@@ -1,13 +1,22 @@
|
|||||||
package com.accompany.admin.controller.guild;
|
package com.accompany.admin.controller.guildsuper;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.accompany.admin.base.Pagination;
|
||||||
import com.accompany.admin.controller.BaseController;
|
import com.accompany.admin.controller.BaseController;
|
||||||
import com.accompany.admin.dto.NameplateDto;
|
import com.accompany.admin.dto.NameplateDto;
|
||||||
|
import com.accompany.admin.service.UserCheckAdminService;
|
||||||
|
import com.accompany.admin.service.firstpage.SecondPageBannerAdminService;
|
||||||
import com.accompany.admin.service.guild.GuildSuperAdminService;
|
import com.accompany.admin.service.guild.GuildSuperAdminService;
|
||||||
import com.accompany.admin.service.system.AdminLogService;
|
import com.accompany.admin.service.system.AdminLogService;
|
||||||
|
import com.accompany.admin.service.system.AdminUserService;
|
||||||
|
import com.accompany.admin.vo.AdminUserVo;
|
||||||
|
import com.accompany.admin.vo.UsersAdminVo;
|
||||||
import com.accompany.admin.vo.family.FamilyAdminVo;
|
import com.accompany.admin.vo.family.FamilyAdminVo;
|
||||||
import com.accompany.admin.vo.guild.GuildApplyAuditVo;
|
import com.accompany.admin.vo.guild.GuildApplyAuditVo;
|
||||||
import com.accompany.admin.vo.vip.VipSendRecordVo;
|
import com.accompany.admin.vo.vip.VipSendRecordVo;
|
||||||
|
import com.accompany.business.model.CarGoods;
|
||||||
import com.accompany.business.param.BasePageParams;
|
import com.accompany.business.param.BasePageParams;
|
||||||
|
import com.accompany.business.service.room.RoomService;
|
||||||
import com.accompany.business.vo.family.FamilyIncomeAdminVo;
|
import com.accompany.business.vo.family.FamilyIncomeAdminVo;
|
||||||
import com.accompany.business.vo.guild.GuildDiamondStatisticsDayVo;
|
import com.accompany.business.vo.guild.GuildDiamondStatisticsDayVo;
|
||||||
import com.accompany.common.result.BusiResult;
|
import com.accompany.common.result.BusiResult;
|
||||||
@@ -15,18 +24,24 @@ import com.accompany.common.result.PageResult;
|
|||||||
import com.accompany.common.status.BusiStatus;
|
import com.accompany.common.status.BusiStatus;
|
||||||
import com.accompany.core.enumeration.PartitionEnum;
|
import com.accompany.core.enumeration.PartitionEnum;
|
||||||
import com.accompany.core.exception.AdminServiceException;
|
import com.accompany.core.exception.AdminServiceException;
|
||||||
|
import com.accompany.core.service.region.RegionInfoService;
|
||||||
import com.accompany.core.vo.BaseResponseVO;
|
import com.accompany.core.vo.BaseResponseVO;
|
||||||
|
import com.accompany.core.vo.UserVo;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Api(tags = "超管中心")
|
@Api(tags = "超管中心")
|
||||||
@RestController
|
@RestController
|
||||||
@@ -36,6 +51,16 @@ public class GuildSuperAdminController extends BaseController {
|
|||||||
private AdminLogService adminLogService;
|
private AdminLogService adminLogService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private GuildSuperAdminService guildSuperAdminService;
|
private GuildSuperAdminService guildSuperAdminService;
|
||||||
|
@Autowired
|
||||||
|
private UserCheckAdminService userCheckAdminService;
|
||||||
|
@Autowired
|
||||||
|
private RegionInfoService regionInfoService;
|
||||||
|
@Autowired
|
||||||
|
private AdminUserService adminUserService;
|
||||||
|
@Autowired
|
||||||
|
private SecondPageBannerAdminService secondPageBannerAdminService;
|
||||||
|
@Autowired
|
||||||
|
private RoomService roomService;
|
||||||
|
|
||||||
@ApiOperation(value = "创建公会,对应前端页面GuildInfo,修改家族用已有接口:/admin/family/manage/update", httpMethod = "POST")
|
@ApiOperation(value = "创建公会,对应前端页面GuildInfo,修改家族用已有接口:/admin/family/manage/update", httpMethod = "POST")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@@ -56,16 +81,16 @@ public class GuildSuperAdminController extends BaseController {
|
|||||||
|
|
||||||
@ApiOperation(value = "查询公会信息",httpMethod = "GET")
|
@ApiOperation(value = "查询公会信息",httpMethod = "GET")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "partitionId", value = "分区id"),
|
// @ApiImplicitParam(name = "partitionId", value = "分区id"),
|
||||||
@ApiImplicitParam(name = "familyId", value = "家族id"),
|
@ApiImplicitParam(name = "familyId", value = "家族id"),
|
||||||
@ApiImplicitParam(name = "erbanNo", value = "家族长erbanNo"),
|
@ApiImplicitParam(name = "erbanNo", value = "家族长erbanNo"),
|
||||||
@ApiImplicitParam(name = "pageNum", value = "页码", required = true),
|
@ApiImplicitParam(name = "pageNum", value = "页码", required = true),
|
||||||
@ApiImplicitParam(name = "pageSize", value = "页长", required = true)
|
@ApiImplicitParam(name = "pageSize", value = "页长", required = true)
|
||||||
})
|
})
|
||||||
@GetMapping("/pageFamily")
|
@GetMapping("/pageFamily")
|
||||||
public BusiResult<PageResult<FamilyAdminVo>> pageFamily(Integer partitionId, Integer familyId, Long erbanNo,
|
public BusiResult<PageResult<FamilyAdminVo>> pageFamily(Integer familyId, Long erbanNo,
|
||||||
long pageNum, long pageSize){
|
long pageNum, long pageSize){
|
||||||
Page<FamilyAdminVo> page = guildSuperAdminService.pageFamily(partitionId, familyId, erbanNo, pageNum, pageSize, getAdminId());
|
Page<FamilyAdminVo> page = guildSuperAdminService.pageFamily(familyId, erbanNo, pageNum, pageSize, getAdminId());
|
||||||
return BusiResult.success(new PageResult<>(page));
|
return BusiResult.success(new PageResult<>(page));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,6 +161,19 @@ public class GuildSuperAdminController extends BaseController {
|
|||||||
writeJson(JSON.toJSONString(objectMap));
|
writeJson(JSON.toJSONString(objectMap));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "座驾列表(同原有接口页面", httpMethod = "GET")
|
||||||
|
@GetMapping(value = "/cars")
|
||||||
|
public Pagination<CarGoods> getCarGoodsList(Integer page, Integer pageSize) {
|
||||||
|
return guildSuperAdminService.getCarGoodsList(page, pageSize, getAdminId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "赠送座驾列表(同原有接口页面", httpMethod = "POST")
|
||||||
|
@RequestMapping(value = "/carSend", method = RequestMethod.POST)
|
||||||
|
public void experByOfficial(String erbanNo, Integer carId, Integer days, String desc, Integer otherDay) {
|
||||||
|
Map map = guildSuperAdminService.carSend(erbanNo, carId, days, desc, otherDay, getAdminId());
|
||||||
|
writeJson(JSON.toJSONString(map));
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation("查询家族流水")
|
@ApiOperation("查询家族流水")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "erbanNo", value = "家族长erbanNo"),
|
@ApiImplicitParam(name = "erbanNo", value = "家族长erbanNo"),
|
||||||
@@ -184,4 +222,25 @@ public class GuildSuperAdminController extends BaseController {
|
|||||||
getAdminId(), guildId, ownerErbanNo, basePageParams.getPageNo(), basePageParams.getPageSize()));
|
getAdminId(), guildId, ownerErbanNo, basePageParams.getPageNo(), basePageParams.getPageSize()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/userList")
|
||||||
|
public BusiResult<List<UsersAdminVo>> getList(String erbanNoList) {
|
||||||
|
if (StrUtil.isEmpty(erbanNoList)) {
|
||||||
|
return BusiResult.success();
|
||||||
|
}
|
||||||
|
List<String> oldList = Arrays.asList(erbanNoList.split(","));
|
||||||
|
List<UsersAdminVo> list = userCheckAdminService.getUserListByErbanNoList(oldList);
|
||||||
|
AdminUserVo adminUserVo = adminUserService.getByAdminId(getAdminId());
|
||||||
|
list = list.stream().filter(usersAdminVo -> adminUserVo.getPartitionIds().contains(usersAdminVo.getUsers().getPartitionId())).collect(Collectors.toList());
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
|
Map<Integer, String> regionName = regionInfoService.getRegionName();
|
||||||
|
for (UsersAdminVo usersAdminVo : list) {
|
||||||
|
UserVo users = usersAdminVo.getUsers();
|
||||||
|
if (users != null && users.getRegionId() != null) {
|
||||||
|
usersAdminVo.setRegionName(regionName.get(users.getRegionId()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return BusiResult.success(list);
|
||||||
|
}
|
||||||
}
|
}
|
@@ -0,0 +1,63 @@
|
|||||||
|
package com.accompany.admin.controller.guildsuper;
|
||||||
|
|
||||||
|
import com.accompany.admin.controller.BaseController;
|
||||||
|
import com.accompany.admin.dto.community.DynamicVerifyDto;
|
||||||
|
import com.accompany.admin.service.system.AdminUserService;
|
||||||
|
import com.accompany.admin.service.world.community.DynamicVerifyAdminService;
|
||||||
|
import com.accompany.admin.vo.AdminUserVo;
|
||||||
|
import com.accompany.admin.vo.community.DynamicVerifyVo;
|
||||||
|
import com.accompany.community.constant.DynamicStatusEnum;
|
||||||
|
import com.accompany.core.util.StringUtils;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@Api(tags = "超管中心")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/superCenter")
|
||||||
|
public class GuildSuperDynamicAdminController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private AdminUserService adminUserService;
|
||||||
|
@Autowired
|
||||||
|
private DynamicVerifyAdminService dynamicVerifyAdminService;
|
||||||
|
|
||||||
|
@RequestMapping("/dynamicList")
|
||||||
|
public void list(DynamicVerifyDto dto){
|
||||||
|
AdminUserVo adminUserVo = adminUserService.getByAdminId(getAdminId());
|
||||||
|
dto.setPartitionId(adminUserVo.getPartitionIds().get(0));
|
||||||
|
dto.setStatus(0);
|
||||||
|
PageInfo<DynamicVerifyVo> voPageInfo = dynamicVerifyAdminService.getPageList(dto);
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.put("total", voPageInfo.getTotal());
|
||||||
|
jsonObject.put("rows", voPageInfo.getList());
|
||||||
|
writeJson(jsonObject.toJSONString());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/dynamicChangeStatus")
|
||||||
|
public void changeStatus(Long dynamicId, Integer status, String reason){
|
||||||
|
if(dynamicId == null || dynamicId == 0 || status == null) {
|
||||||
|
writeJson(false, "参数有误");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (status.equals(DynamicStatusEnum.NOT_PASS.getValue()) || status.equals(DynamicStatusEnum.UNSHELVE.getValue())){
|
||||||
|
if (StringUtils.isEmpty(reason)){
|
||||||
|
writeJson(false, "参数有误");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
int result = dynamicVerifyAdminService.changeStatus(dynamicId, status, reason, getAdminId());
|
||||||
|
if(result>0) {
|
||||||
|
writeJson(true,String.valueOf(result));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("Failed to change dynamic status, Cause by {}", e.getCause().getMessage());
|
||||||
|
writeJson(false, e.getMessage());
|
||||||
|
}
|
||||||
|
writeJson(false, "操作失败");
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,78 @@
|
|||||||
|
package com.accompany.admin.controller.guildsuper;
|
||||||
|
|
||||||
|
import com.accompany.admin.base.Pagination;
|
||||||
|
import com.accompany.admin.controller.BaseController;
|
||||||
|
import com.accompany.admin.service.firstpage.SecondPageBannerAdminService;
|
||||||
|
import com.accompany.admin.service.system.AdminLogService;
|
||||||
|
import com.accompany.admin.service.system.AdminUserService;
|
||||||
|
import com.accompany.admin.vo.AdminUserVo;
|
||||||
|
import com.accompany.admin.vo.SecondPageBannerAdminVo;
|
||||||
|
import com.accompany.business.model.firstpage.SecondPageBanner;
|
||||||
|
import com.accompany.business.service.fillstrategy.strategy.FillConstant;
|
||||||
|
import com.accompany.business.service.user.UsersService;
|
||||||
|
import com.accompany.common.result.BusiResult;
|
||||||
|
import com.accompany.common.status.BusiStatus;
|
||||||
|
import com.accompany.core.exception.AdminServiceException;
|
||||||
|
import com.accompany.core.model.Users;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@Api(tags = "超管中心-banner")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/superCenter")
|
||||||
|
public class GuildSuperSecondBannerAdminController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private AdminLogService adminLogService;
|
||||||
|
@Autowired
|
||||||
|
private AdminUserService adminUserService;
|
||||||
|
@Autowired
|
||||||
|
private SecondPageBannerAdminService secondPageBannerAdminService;
|
||||||
|
@Autowired
|
||||||
|
private UsersService usersService;
|
||||||
|
|
||||||
|
@ApiOperation(value = "新增/修改banner", httpMethod = "POST")
|
||||||
|
@PostMapping(value = "/secondBannerSave")
|
||||||
|
public BusiResult<Void> saveOrUpdateSecondPageBanner(SecondPageBanner firstPageBanner) {
|
||||||
|
int adminId = getAdminId();
|
||||||
|
AdminUserVo adminUserVo = adminUserService.getByAdminId(adminId);
|
||||||
|
firstPageBanner.setOperator(adminUserVo.getUsername());
|
||||||
|
firstPageBanner.setPartitionIds(adminUserVo.getPartitionIds());
|
||||||
|
firstPageBanner.setPlatform("all");
|
||||||
|
firstPageBanner.setBannerType(1);
|
||||||
|
firstPageBanner.setBannerStatus(1);
|
||||||
|
if (firstPageBanner.getSkipType() == FillConstant.SkipType.room) {
|
||||||
|
if (com.accompany.common.utils.StringUtils.isEmpty(firstPageBanner.getSkipUri())) {
|
||||||
|
throw new AdminServiceException("请输入RoomID");
|
||||||
|
}
|
||||||
|
firstPageBanner.setSkipUri(firstPageBanner.getSkipUri().trim());
|
||||||
|
Users users = usersService.getUserByErbanNo(Long.valueOf(firstPageBanner.getSkipUri()));
|
||||||
|
if (users == null || !adminUserVo.getPartitionIds().contains(users.getPartitionId())) {
|
||||||
|
throw new AdminServiceException("请输入正确的RoomID");
|
||||||
|
}
|
||||||
|
} else if (firstPageBanner.getSkipType() != 100) {
|
||||||
|
throw new AdminServiceException("config error");
|
||||||
|
}
|
||||||
|
|
||||||
|
Boolean result = secondPageBannerAdminService.saveOrUpdateSecondPageBanner(firstPageBanner);
|
||||||
|
if(result) {
|
||||||
|
adminLogService.insertLog(adminId, getClass().getCanonicalName(), "superGuild.saveOrUpdateSecondPageBanner", "params===>>" + firstPageBanner.toString());
|
||||||
|
}
|
||||||
|
return new BusiResult<>(BusiStatus.SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("获取banner列表")
|
||||||
|
@GetMapping(value = "/bannelList")
|
||||||
|
public Pagination<SecondPageBannerAdminVo> getSecondPageBannerList(@RequestParam(defaultValue = "0") Byte bannerStatus,
|
||||||
|
@RequestParam(defaultValue = "0") Integer timeStatus,
|
||||||
|
@RequestParam(defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(defaultValue = "20") Integer pageSize) {
|
||||||
|
AdminUserVo adminUserById = adminUserService.getByAdminId(getAdminId());
|
||||||
|
IPage<SecondPageBannerAdminVo> pageInfo = secondPageBannerAdminService.getSecondPageBannerList(pageNo, pageSize,
|
||||||
|
(byte)0, bannerStatus, (byte)1, timeStatus,null, adminUserById.getPartitionIds().get(0), null, null);
|
||||||
|
return new Pagination<>(pageInfo);
|
||||||
|
}
|
||||||
|
}
|
@@ -39,4 +39,6 @@ public class Family {
|
|||||||
* 邀请人证明
|
* 邀请人证明
|
||||||
*/
|
*/
|
||||||
private String inviteCheck;
|
private String inviteCheck;
|
||||||
|
|
||||||
|
private Integer adminId;
|
||||||
}
|
}
|
@@ -56,7 +56,7 @@ public class CarGoodsService extends BaseService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<CarGoods> getCarGoodsList(Integer page, Integer pageSize, Byte status, Boolean goldSale,
|
public List<CarGoods> getCarGoodsList(Integer page, Integer pageSize, Byte status, Boolean goldSale,
|
||||||
Integer carGoodsId, String carGoodsName, Byte carGoodsType, Integer partitionId) {
|
Integer carGoodsId, String carGoodsName, Byte carGoodsType, Integer partitionId, List<Integer> carGoodsIds) {
|
||||||
page = (page == null || page <= 0) ? DEFAULT_PAGE : page;
|
page = (page == null || page <= 0) ? DEFAULT_PAGE : page;
|
||||||
pageSize = (pageSize == null || pageSize <= 0) ? DEFAULT_PAGE_SIZE : pageSize;
|
pageSize = (pageSize == null || pageSize <= 0) ? DEFAULT_PAGE_SIZE : pageSize;
|
||||||
int offSet = (page - 1) * pageSize;
|
int offSet = (page - 1) * pageSize;
|
||||||
@@ -65,6 +65,9 @@ public class CarGoodsService extends BaseService {
|
|||||||
if (null != carGoodsId){
|
if (null != carGoodsId){
|
||||||
criteria.andIdEqualTo(carGoodsId);
|
criteria.andIdEqualTo(carGoodsId);
|
||||||
}
|
}
|
||||||
|
if (!CollectionUtils.isEmpty(carGoodsIds)) {
|
||||||
|
criteria.andIdIn(carGoodsIds);
|
||||||
|
}
|
||||||
if (status != null) {
|
if (status != null) {
|
||||||
criteria.andEnableEqualTo(status);
|
criteria.andEnableEqualTo(status);
|
||||||
}
|
}
|
||||||
@@ -89,7 +92,7 @@ public class CarGoodsService extends BaseService {
|
|||||||
public List<UserCarGoodsVo> getUserCarGoodsList(Integer page, Integer pageSize, Long uid, Boolean goldSale) {
|
public List<UserCarGoodsVo> getUserCarGoodsList(Integer page, Integer pageSize, Long uid, Boolean goldSale) {
|
||||||
List<UserCarGoodsVo> userCarGoodsVoList = Lists.newArrayList();
|
List<UserCarGoodsVo> userCarGoodsVoList = Lists.newArrayList();
|
||||||
List<CarGoods> carGoodsList = this.getCarGoodsList(page, pageSize, Constant.CarGoodsEnable.ENABLE, goldSale,
|
List<CarGoods> carGoodsList = this.getCarGoodsList(page, pageSize, Constant.CarGoodsEnable.ENABLE, goldSale,
|
||||||
null, null, null, null);
|
null, null, null, null, null);
|
||||||
if (carGoodsList == null || carGoodsList.isEmpty()) {
|
if (carGoodsList == null || carGoodsList.isEmpty()) {
|
||||||
return userCarGoodsVoList;
|
return userCarGoodsVoList;
|
||||||
}
|
}
|
||||||
@@ -150,12 +153,15 @@ public class CarGoodsService extends BaseService {
|
|||||||
* @param carGoodsType
|
* @param carGoodsType
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Integer countCarGoods(Byte status, Integer carGoodsId, String carGoodsName, Byte carGoodsType, Integer partitionId) {
|
public Integer countCarGoods(Byte status, Integer carGoodsId, String carGoodsName, Byte carGoodsType, Integer partitionId, List<Integer> carGoodsIds) {
|
||||||
CarGoodsExample example = new CarGoodsExample();
|
CarGoodsExample example = new CarGoodsExample();
|
||||||
CarGoodsExample.Criteria criteria = example.createCriteria();
|
CarGoodsExample.Criteria criteria = example.createCriteria();
|
||||||
if (null != carGoodsId){
|
if (null != carGoodsId){
|
||||||
criteria.andIdEqualTo(carGoodsId);
|
criteria.andIdEqualTo(carGoodsId);
|
||||||
}
|
}
|
||||||
|
if (!CollectionUtils.isEmpty(carGoodsIds)) {
|
||||||
|
criteria.andIdIn(carGoodsIds);
|
||||||
|
}
|
||||||
if (status != null) {
|
if (status != null) {
|
||||||
criteria.andEnableEqualTo(status);
|
criteria.andEnableEqualTo(status);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user