独联体-地区政策V2fixed

This commit is contained in:
2025-09-19 18:49:00 +08:00
parent 5c7035591c
commit 8b2fbc1b96
4 changed files with 19 additions and 12 deletions

View File

@@ -12,7 +12,7 @@ import lombok.NoArgsConstructor;
@Data
public class GuildSovietDateListVo {
@ApiModelProperty("1-个人tab2-公会tab")
private Integer dateType;
private Integer dataType;
@ApiModelProperty("当前周期")
private GuildSovietDateVo curCycle;
@ApiModelProperty("上一周期")

View File

@@ -82,7 +82,7 @@ public class GuildSovietIncomeService {
GuildSovietDateListVo diamondDateList = new GuildSovietDateListVo();
vo.setDiamondDateList(diamondDateList);
diamondDateList.setDateType(1);
diamondDateList.setDataType(1);
String lastBeginOfMonth = nowZoneDateTime.minusMonths(1).withDayOfMonth(1).format(DateTimeUtil.dateFormatter);
String endOfMonth = nowZoneDateTime.plusMonths(1).withDayOfMonth(1).minusDays(1).format(DateTimeUtil.dateFormatter);
@@ -103,7 +103,7 @@ public class GuildSovietIncomeService {
GuildSovietDateListVo diamondDateList = new GuildSovietDateListVo();
agencyVo.setDiamondDateList(diamondDateList);
diamondDateList.setDateType(2);
diamondDateList.setDataType(2);
String lastBeginOfMonth = nowZoneDateTime.minusMonths(1).withDayOfMonth(1).format(DateTimeUtil.dateFormatter);
String endOfMonth = nowZoneDateTime.plusMonths(1).withDayOfMonth(1).minusDays(1).format(DateTimeUtil.dateFormatter);
@@ -138,7 +138,7 @@ public class GuildSovietIncomeService {
.endDate(lastCycleEndDate)
.diamondNum(BigDecimal.ZERO)
.periodDateStr(lastBeginDateZdt.withHour(0).withMinute(0).withSecond(0).format(DateTimeUtil.datetimeReverseFormatter)
+ "~" + lastEndDateZdt.minusDays(1).withHour(23).withMinute(59).withSecond(59).format(DateTimeUtil.datetimeReverseFormatter))
+ "~" + lastEndDateZdt.withHour(23).withMinute(59).withSecond(59).format(DateTimeUtil.datetimeReverseFormatter))
.build();
diamondDateList.setLastCycle(lastCycle);
@@ -232,18 +232,18 @@ public class GuildSovietIncomeService {
}
}
public List<GuildSovietMemberVo> getDetailVo(Long uid, String beginDate, String endDate, Integer dateType,
public List<GuildSovietMemberVo> getDetailVo(Long uid, String beginDate, String endDate, Integer dataType,
Integer pageNo, Integer pageSize) {
GuildMember guildMember = guildMemberService.getVaildGuildMemberByUid(uid);
if (null == guildMember || dateType == null) {
if (null == guildMember || dataType == null) {
throw new ServiceException(BusiStatus.FAMILY_PERMISSION_DENIED);
}
if (dateType == 1) {
if (dataType == 1) {
return guildExtraDiamondDayService.listMemberDetailVo(guildMember.getPartitionId(), guildMember.getId(), beginDate, endDate,
pageNo, pageSize);
} else if (dateType == 2 && GuildConstant.RoleType.OWNER.equals(guildMember.getRoleType())) {
} else if (dataType == 2 && GuildConstant.RoleType.OWNER.equals(guildMember.getRoleType())) {
return guildExtraDiamondDayService.listGuildDetailVo(guildMember.getPartitionId(), guildMember.getGuildId(), beginDate, endDate,
pageNo, pageSize);
}

View File

@@ -81,7 +81,7 @@
where ge.guild_member_id = #{guildMemberId}
and ge.stat_date >= #{startDate}
and ge.stat_date &lt;= #{endDate}
group by ge.partition_id,ge.guild_id,ge.stat_date
group by ge.partition_id,ge.guild_member_id,ge.stat_date
order by statDate desc
</select>
</mapper>

View File

@@ -6,6 +6,7 @@ import com.accompany.business.vo.guild.GuildSovietMemberVo;
import com.accompany.common.annotation.Authorization;
import com.accompany.common.result.BusiResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -30,13 +31,19 @@ public class GuildSovietIncomeController {
return BusiResult.success(vo);
}
@ApiImplicitParams({
@io.swagger.annotations.ApiImplicitParam(name = "beginDate", value = "开始时间", required = true, dataType = "String"),
@io.swagger.annotations.ApiImplicitParam(name = "endDate", value = "结束时间", required = true, dataType = "String"),
@io.swagger.annotations.ApiImplicitParam(name = "dataType", value = "数据类型1-个人2-公会", required = true, dataType = "Integer"),
@io.swagger.annotations.ApiImplicitParam(name = "pageNo", value = "页码", required = true, dataType = "Integer"),
@io.swagger.annotations.ApiImplicitParam(name = "pageSize", value = "页大小", required = true, dataType = "Integer")
})
@ApiOperation(value = "获取明细收入情况", httpMethod = "GET")
@Authorization
@GetMapping("/getDetailVo")
public BusiResult<List<GuildSovietMemberVo>> getDetailVo(@RequestHeader(PUB_UID) Long uid, String beginDate, String endDate, Integer dateType,
public BusiResult<List<GuildSovietMemberVo>> getDetailVo(@RequestHeader(PUB_UID) Long uid, String beginDate, String endDate, Integer dataType,
@RequestParam(defaultValue = "1") Integer pageNo, @RequestParam(defaultValue = "20") Integer pageSize) {
List<GuildSovietMemberVo> vos = guildSovietIncomeService.getDetailVo(uid, beginDate, endDate, dateType, pageNo, pageSize);
List<GuildSovietMemberVo> vos = guildSovietIncomeService.getDetailVo(uid, beginDate, endDate, dataType, pageNo, pageSize);
return BusiResult.success(vos);
}
}