后台-公会钻石流水-增加地区

This commit is contained in:
khalil
2025-05-30 16:38:22 +08:00
parent ff2530e24e
commit 36efe2e11f
9 changed files with 25 additions and 15 deletions

View File

@@ -22,7 +22,7 @@ public class RegionInfoAdminService {
List<RegionInfo> regionInfos = regionInfoService.listByPartitionId(partitionId);
if (CollectionUtils.isNotEmpty(regionInfos) && containAll) {
RegionInfo regionInfo = new RegionInfo();
regionInfo.setId(regionInfoService.ALL_REGION);
regionInfo.setId(RegionInfoService.ALL_REGION);
regionInfo.setName("全部");
regionInfos.add(0, regionInfo);
}

View File

@@ -40,7 +40,8 @@ public class GuildDiamondStatisticsDayAdminService {
@Autowired
private GuildMemberRoomMicRecordService guildMemberRoomMicRecordService;
public Page<GuildDiamondStatisticsDayVo> list(String startDate, String endDate, Integer partitionId,
public Page<GuildDiamondStatisticsDayVo> list(String startDate, String endDate,
Integer partitionId, Integer regionId,
Integer guildId, Long ownerErbanNo,
Integer pageNo, Integer pageSize, Long inviteUid) {
if (StringUtils.isEmpty(startDate) || StringUtils.isEmpty(endDate)) {
@@ -61,7 +62,7 @@ public class GuildDiamondStatisticsDayAdminService {
guildId = guild.getId();
}
Page<GuildDiamondStatisticsDayVo> guildDiamondStatisticsDayPage =
guildDiamondStatisticsDayService.listByStatDate(startDate, endDate, partitionId, guildId, pageNo, pageSize, inviteUid);
guildDiamondStatisticsDayService.listByStatDate(startDate, endDate, partitionId, regionId, guildId, pageNo, pageSize, inviteUid);
if (!CollectionUtils.isEmpty(guildDiamondStatisticsDayPage.getRecords())) {
for (GuildDiamondStatisticsDayVo vo: guildDiamondStatisticsDayPage.getRecords()) {
vo.setPartitionDesc(PartitionEnum.getByPartitionId(vo.getPartitionId()).getDesc());

View File

@@ -266,7 +266,7 @@ public class GuildSuperAdminService {
if (inviteUid == null) {
return new Page<>();
}
return guildDiamondStatisticsDayAdminService.list(startDate, endDate, null, guildId, ownerErbanNo, pageNo, pageSize, inviteUid);
return guildDiamondStatisticsDayAdminService.list(startDate, endDate, null, null, guildId, ownerErbanNo, pageNo, pageSize, inviteUid);
}
}

View File

@@ -40,9 +40,11 @@ public class GuildDiamondStatisticsDayAdminController {
})
@ApiOperation(value = "公会钻石流水列表", httpMethod = "GET")
@GetMapping("")
public BaseResponseVO<Page<GuildDiamondStatisticsDayVo>> list(BasePageParams basePageParams, int partitionId, Integer guildId, Long ownerErbanNo) {
public BaseResponseVO<Page<GuildDiamondStatisticsDayVo>> list(BasePageParams basePageParams,
int partitionId, Integer regionId,
Integer guildId, Long ownerErbanNo) {
return new BaseResponseVO<>(guildDiamondStatisticsDayAdminService.list(basePageParams.getStartTime(), basePageParams.getEndTime(),
partitionId, guildId, ownerErbanNo, basePageParams.getPageNo(), basePageParams.getPageSize(), null));
partitionId, regionId, guildId, ownerErbanNo, basePageParams.getPageNo(), basePageParams.getPageSize(), null));
}
@ApiImplicitParams({
@@ -56,13 +58,15 @@ public class GuildDiamondStatisticsDayAdminController {
})
@ApiOperation(value = "公会钻石流水列表-导出", httpMethod = "GET")
@GetMapping("/export")
public void export(HttpServletResponse response, BasePageParams basePageParams, Integer guildId, Long ownerErbanNo) throws IOException {
public void export(HttpServletResponse response, BasePageParams basePageParams,
Integer regionId,
Integer guildId, Long ownerErbanNo) throws IOException {
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
// 这里URLEncoder.encode可以防止中文乱码
String excelName = URLEncoder.encode("公会钻石流水列表", StandardCharsets.UTF_8);
Page<GuildDiamondStatisticsDayVo> list = guildDiamondStatisticsDayAdminService.list(basePageParams.getStartTime(), basePageParams.getEndTime(),
basePageParams.getPartitionId(), guildId, ownerErbanNo, 1, -1, null);
basePageParams.getPartitionId(), regionId, guildId, ownerErbanNo, 1, -1, null);
response.setHeader("Content-disposition", "attachment;filename=" + excelName + ExcelTypeEnum.XLSX.getValue());
EasyExcel.write(response.getOutputStream(), GuildDiamondStatisticsDayVo.class).sheet("公会钻石流水列表").doWrite(list.getRecords());
}

View File

@@ -10,7 +10,7 @@ public class RegionInfo {
@TableId
private Integer id;
@I18n(className = "RegionInfo")
@I18n(className = "RegionInfo", adminSwitch = false)
private String name;
private Integer partitionId;
private Integer partitionFlag;

View File

@@ -27,7 +27,9 @@ public interface GuildDiamondStatisticsDayMapper extends BaseMapper<GuildDiamond
Page<GuildDiamondStatisticsDayVo> listByStatDate(@Param("ipage") Page<GuildDiamondStatisticsDayVo> ipage,
@Param("startDate")String startDate, @Param("endDate")String endDate,
@Param("guildId") Integer guildId, @Param("partitionId") Integer partitionId,
@Param("guildId") Integer guildId,
@Param("partitionId") Integer partitionId,
@Param("regionId") Integer regionId,
@Param("inviteUid") Long inviteUid);
IPage<GuildMemberDiamondStatisticsDayVo> listMemberByStatDate(@Param("ipage") IPage<GuildMemberDiamondStatisticsDayVo> ipage,

View File

@@ -23,7 +23,7 @@ public interface GuildDiamondStatisticsDayService extends IService<GuildDiamondS
int updateDayDiamondStatistics(String cycleDate, String statDate, GuildMember guildMember, double diamond);
Page<GuildDiamondStatisticsDayVo> listByStatDate(String statDate, String endDate, Integer partitionId,
Page<GuildDiamondStatisticsDayVo> listByStatDate(String statDate, String endDate, Integer partitionId, Integer regionId,
Integer guildId, Integer pageNo, Integer pageSize, Long inviteUid);
IPage<GuildMemberDiamondStatisticsDayVo> listMemberByStatDate(String statDate, String endDate, int partitionId, Integer guildId, Long uid, Integer pageNo, Integer pageSize);

View File

@@ -38,10 +38,10 @@ public class GuildDiamondStatisticsDayServiceImpl extends ServiceImpl<GuildDiamo
}
@Override
public Page<GuildDiamondStatisticsDayVo> listByStatDate(String statDate, String endDate, Integer partitionId,
public Page<GuildDiamondStatisticsDayVo> listByStatDate(String statDate, String endDate, Integer partitionId, Integer regionId,
Integer guildId, Integer pageNo, Integer pageSize, Long inviteUid) {
Page<GuildDiamondStatisticsDayVo> page = new Page<>(pageNo, pageSize);
return baseMapper.listByStatDate(page, statDate, endDate, guildId, partitionId, inviteUid);
return baseMapper.listByStatDate(page, statDate, endDate, guildId, partitionId, regionId, inviteUid);
}
@Override

View File

@@ -12,8 +12,8 @@
ifnull(a.memberNum, 0) memberNum,
gd.partition_id partitionId
from guild_diamond_statistics_day gd
left join guild g on g.id = gd.guild_id
left join users u on u.uid = g.owner_uid
inner join guild g on g.id = gd.guild_id
inner join users u on u.uid = g.owner_uid
left join region_info ri on ri.id = u.region_id
left join admin_user au on au.id = g.admin_id
left join (select guild_id, count(distinct uid) memberNum from guild_member where `enable` = 1 and role_type != 1 GROUP BY guild_id) a on a.guild_id = g.id
@@ -22,6 +22,9 @@
<if test="partitionId != null and partitionId != 0">
and gd.partition_id = ${partitionId}
</if>
<if test="regionId != null and regionId != 0">
and u.region_id = ${regionId}
</if>
<if test="guildId != null">
and gd.guild_id = #{guildId}
</if>