超管中心命名

This commit is contained in:
2025-05-27 11:51:12 +08:00
parent 2d89c05c88
commit d7329f7a52
2 changed files with 13 additions and 21 deletions

View File

@@ -15,12 +15,9 @@ import com.accompany.business.service.headwear.HeadwearService;
import com.accompany.business.service.user.UsersService;
import com.accompany.business.vo.family.FamilyIncomeAdminVo;
import com.accompany.common.status.BusiStatus;
import com.accompany.common.utils.DateTimeUtil;
import com.accompany.core.enumeration.PartitionEnum;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.core.model.PartitionInfo;
import com.accompany.core.model.Users;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j;
@@ -28,17 +25,15 @@ import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static java.util.Collections.EMPTY_LIST;
@Slf4j
@Service
public class SuperAdminService {
public class SuperCenterAdminService {
@Autowired
private UsersService usersService;

View File

@@ -2,8 +2,7 @@ package com.accompany.admin.controller.superadminrole;
import com.accompany.admin.controller.BaseController;
import com.accompany.admin.dto.NameplateDto;
import com.accompany.admin.service.family.FamilyIncomeAdminService;
import com.accompany.admin.service.superadminrole.SuperAdminService;
import com.accompany.admin.service.superadminrole.SuperCenterAdminService;
import com.accompany.admin.service.system.AdminLogService;
import com.accompany.admin.vo.family.FamilyAdminVo;
import com.accompany.admin.vo.vip.VipSendRecordVo;
@@ -23,18 +22,16 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Api(tags = "超管中心")
@RestController
@RequestMapping("/admin/super")
public class SuperAdminController extends BaseController {
public class SuperCenterAdminController extends BaseController {
@Autowired
private AdminLogService adminLogService;
@Autowired
private SuperAdminService superAdminService;
private SuperCenterAdminService superCenterAdminService;
@ApiOperation(value = "创建公会,对应前端页面GuildInfo修改家族用已有接口/admin/family/manage/update", httpMethod = "POST")
@ApiImplicitParams({
@@ -47,7 +44,7 @@ public class SuperAdminController extends BaseController {
throw new AdminServiceException(BusiStatus.PARAMERROR);
}
Integer adminId = getAdminId();
superAdminService.createFamily(erbanNo, inviteErbanNo, adminId);
superCenterAdminService.createFamily(erbanNo, inviteErbanNo, adminId);
adminLogService.insertLog(adminId,getClass().getCanonicalName(),
"create family","params===>>erbanNo:"+erbanNo + "inviteErbanNo:" + inviteErbanNo);
return BusiResult.success();
@@ -63,7 +60,7 @@ public class SuperAdminController extends BaseController {
@GetMapping("/pageFamily")
public BusiResult<PageResult<FamilyAdminVo>> pageFamily(Integer familyId, Long erbanNo,
long pageNum, long pageSize){
Page<FamilyAdminVo> page = superAdminService.pageFamily(familyId, erbanNo, pageNum, pageSize, getAdminId());
Page<FamilyAdminVo> page = superCenterAdminService.pageFamily(familyId, erbanNo, pageNum, pageSize, getAdminId());
return BusiResult.success(new PageResult<>(page));
}
@@ -77,7 +74,7 @@ public class SuperAdminController extends BaseController {
public BusiResult<Void> pageRecord(long uid, int vipLevel, Integer days) {
int adminId = getAdminId();
adminLogService.insertLog(adminId, getClass().getCanonicalName(),"send vip","params===>>uid:"+uid+",===>>vipLevel:"+vipLevel+",===>>days:"+days );
superAdminService.send(uid, vipLevel, adminId, days);
superCenterAdminService.send(uid, vipLevel, adminId, days);
return BusiResult.success();
}
@@ -90,7 +87,7 @@ public class SuperAdminController extends BaseController {
@GetMapping("/vipSendRecord")
public BusiResult<PageResult<VipSendRecordVo>> pageRecord(Long erbanNo,
int current, int size) {
Page<VipSendRecordVo> pageInfo = superAdminService.pageRecord(erbanNo, current, size, getAdminId());
Page<VipSendRecordVo> pageInfo = superCenterAdminService.pageRecord(erbanNo, current, size, getAdminId());
return BusiResult.success(new PageResult<>(pageInfo));
}
@@ -103,14 +100,14 @@ public class SuperAdminController extends BaseController {
@GetMapping("/headwearList")
public Map<String, Object> list(@RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "20") Integer pageSize) {
return superAdminService.headwearList(getAdminId(), page, pageSize);
return superCenterAdminService.headwearList(getAdminId(), page, pageSize);
}
@ApiOperation(value = "赠送头饰(同原有接口页面,不搜索项参,/html/headwear/headwear_admin.html", httpMethod = "POST")
@RequestMapping(value = "send", method = RequestMethod.POST)
public void sendHeadWear(Integer headwearId, String erbanNo, String sendDesc, Integer days) {
Map<String, Object> retMap = superAdminService.sendHeadWear(headwearId, erbanNo, sendDesc, days, getAdminId());
Map<String, Object> retMap = superCenterAdminService.sendHeadWear(headwearId, erbanNo, sendDesc, days, getAdminId());
writeJson(JSON.toJSONString(retMap));
}
@@ -124,13 +121,13 @@ public class SuperAdminController extends BaseController {
if (dto.getPageNumber() < 1) {
throw new AdminServiceException(BusiStatus.PARAMETERILLEGAL);
}
return superAdminService.getPageList(dto, getAdminId());
return superCenterAdminService.getPageList(dto, getAdminId());
}
@ApiOperation(value = "赠送名牌(同原有接口页面,不搜索项参,/html/nameplate/nameplate_info.html", httpMethod = "POST")
@PostMapping(value = "send")
public void sendNameplate(Long nameplateId, String erbanNo, String sendDesc, Integer days) {
Map<String, Object> objectMap = superAdminService.sendNameplate(nameplateId, erbanNo, sendDesc, days, getAdminId());
Map<String, Object> objectMap = superCenterAdminService.sendNameplate(nameplateId, erbanNo, sendDesc, days, getAdminId());
writeJson(JSON.toJSONString(objectMap));
}
@@ -151,7 +148,7 @@ public class SuperAdminController extends BaseController {
if (!StringUtils.hasText(startDate) || !StringUtils.hasText(endDate)){
throw new AdminServiceException(BusiStatus.PARAMERROR);
}
Page<FamilyIncomeAdminVo> page = superAdminService.pageFamilyIncome(erbanNo, regionId,
Page<FamilyIncomeAdminVo> page = superCenterAdminService.pageFamilyIncome(erbanNo, regionId,
familyName, startDate, endDate, pageNum, pageSize, PartitionEnum.ENGLISH.getId(), getAdminId());
return BusiResult.success(new PageResult<>(page));
}