feat: update console and other register reward flow
This commit is contained in:
parent
258e56ea45
commit
ed4a95da29
@ -59,9 +59,12 @@ public interface TeamBillCycleClientApi {
|
|||||||
ResultResponse<List<TeamBillAnchorStatisticsModelDTO>> queryTeamBillByCondition(
|
ResultResponse<List<TeamBillAnchorStatisticsModelDTO>> queryTeamBillByCondition(
|
||||||
@RequestBody TeamBillByConditionQryCmd cmd);
|
@RequestBody TeamBillByConditionQryCmd cmd);
|
||||||
|
|
||||||
@PostMapping("/resetUnpaidBillMemberTarget")
|
@PostMapping("/resetUnpaidBillMemberTarget")
|
||||||
ResultResponse<Void> resetUnpaidBillMemberTarget(@RequestBody TeamMemberTargetResetCmd param);
|
ResultResponse<Void> resetUnpaidBillMemberTarget(@RequestBody TeamMemberTargetResetCmd param);
|
||||||
|
|
||||||
@GetMapping("/getBillByTeamId")
|
@PostMapping("/refreshUnpaidBills")
|
||||||
ResultResponse<TeamBillCycleDTO> getBillByTeamId(@RequestParam("teamId") Long teamId);
|
ResultResponse<Void> refreshUnpaidBills(@RequestBody TeamBillCycleBackQryCmd query);
|
||||||
}
|
|
||||||
|
@GetMapping("/getBillByTeamId")
|
||||||
|
ResultResponse<TeamBillCycleDTO> getBillByTeamId(@RequestParam("teamId") Long teamId);
|
||||||
|
}
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
package com.red.circle.other.inner.model.dto.material;
|
package com.red.circle.other.inner.model.dto.material;
|
||||||
|
|
||||||
import com.red.circle.framework.dto.DTO;
|
import com.red.circle.framework.dto.DTO;
|
||||||
import com.red.circle.framework.dto.QuantityDTO;
|
import com.red.circle.framework.dto.QuantityDTO;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import lombok.experimental.FieldDefaults;
|
import lombok.experimental.FieldDefaults;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新用户奖励.
|
* 新用户奖励.
|
||||||
@ -24,9 +24,9 @@ public class NewUserRewardDTO extends DTO {
|
|||||||
*/
|
*/
|
||||||
QuantityDTO<GiftConfigDTO> gift;
|
QuantityDTO<GiftConfigDTO> gift;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 道具信息.
|
* 道具信息.
|
||||||
*/
|
*/
|
||||||
PropsDecorationDTO props;
|
PropsDecorationDTO props;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,43 @@
|
|||||||
|
package com.red.circle.console.adapter.app.activity;
|
||||||
|
|
||||||
|
import com.red.circle.console.app.dto.clienobject.app.activity.register.ResidentRegisterRewardConfigCO;
|
||||||
|
import com.red.circle.console.app.dto.cmd.app.activity.register.ResidentRegisterRewardConfigSaveCmd;
|
||||||
|
import com.red.circle.console.app.service.app.activity.ResidentRegisterRewardService;
|
||||||
|
import com.red.circle.console.infra.annotations.OpsOperationReqLog;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常驻注册奖励后台接口.
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/resident-activity/register-reward")
|
||||||
|
public class ResidentRegisterRewardRestController {
|
||||||
|
|
||||||
|
private final ResidentRegisterRewardService residentRegisterRewardService;
|
||||||
|
|
||||||
|
@GetMapping("/config")
|
||||||
|
public ResidentRegisterRewardConfigCO getConfig(String sysOrigin) {
|
||||||
|
return residentRegisterRewardService.getConfig(sysOrigin);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OpsOperationReqLog(value = "保存注册奖励配置")
|
||||||
|
@PostMapping("/config/save")
|
||||||
|
public void saveConfig(@RequestBody @Validated ResidentRegisterRewardConfigSaveCmd cmd) {
|
||||||
|
residentRegisterRewardService.saveConfig(cmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OpsOperationReqLog(value = "重置注册奖励配置")
|
||||||
|
@PostMapping("/config/reset")
|
||||||
|
public void resetConfig(@RequestParam("sysOrigin") String sysOrigin) {
|
||||||
|
residentRegisterRewardService.resetConfig(sysOrigin);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -59,12 +59,14 @@ public class TeamPolicyManagerRestController extends BaseController {
|
|||||||
param.setCreateTime(TimestampUtils.now());
|
param.setCreateTime(TimestampUtils.now());
|
||||||
teamPolicyManagerBackService.add(param);
|
teamPolicyManagerBackService.add(param);
|
||||||
|
|
||||||
// 发布完政策如果有团队是其他政策需要替换最新的政策,可能出现的情况:钻石->美元;美元->钻石;美元->美元;钻石->钻石
|
// 发布完政策如果有团队是其他政策需要替换最新的政策,可能出现的情况:钻石->美元;美元->钻石;美元->美元;钻石->钻石
|
||||||
if (Objects.equals(param.getRelease(), Boolean.TRUE)) {
|
if (Objects.equals(param.getRelease(), Boolean.TRUE)) {
|
||||||
// 如果政策是发布的状态,查询该区域所有的团队并改变团队政策。
|
// 发布后主动重算该系统、该区域下团队的未出账账单。
|
||||||
teamBillCycleClient.listBillTable(new TeamBillCycleBackQryCmd().setRegion(param.getRegion()));
|
teamBillCycleClient.refreshUnpaidBills(new TeamBillCycleBackQryCmd()
|
||||||
}
|
.setSysOrigin(param.getSysOrigin())
|
||||||
}
|
.setRegion(param.getRegion()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id删除策略.
|
* 根据id删除策略.
|
||||||
|
|||||||
@ -0,0 +1,116 @@
|
|||||||
|
package com.red.circle.console.app.service.app.activity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.red.circle.console.app.dto.clienobject.app.activity.register.ResidentRegisterRewardConfigCO;
|
||||||
|
import com.red.circle.console.app.dto.cmd.app.activity.register.ResidentRegisterRewardConfigSaveCmd;
|
||||||
|
import com.red.circle.console.app.service.app.props.PropsActivityRewardGroupService;
|
||||||
|
import com.red.circle.console.infra.database.rds.entity.app.register.ResidentRegisterRewardConfig;
|
||||||
|
import com.red.circle.console.infra.database.rds.service.app.register.ResidentRegisterRewardConfigService;
|
||||||
|
import com.red.circle.framework.core.asserts.ResponseAssert;
|
||||||
|
import com.red.circle.framework.core.response.CommonErrorCode;
|
||||||
|
import com.red.circle.framework.core.response.ResponseErrorCode;
|
||||||
|
import com.red.circle.other.inner.model.dto.material.PropsActivityRewardGroupDTO;
|
||||||
|
import com.red.circle.tool.core.sequence.IdWorkerUtils;
|
||||||
|
import java.util.Objects;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常驻注册奖励服务实现.
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class ResidentRegisterRewardServiceImpl implements ResidentRegisterRewardService {
|
||||||
|
|
||||||
|
private final ResidentRegisterRewardConfigService residentRegisterRewardConfigService;
|
||||||
|
private final PropsActivityRewardGroupService propsActivityRewardGroupService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResidentRegisterRewardConfigCO getConfig(String sysOrigin) {
|
||||||
|
String normalizedSysOrigin = normalizeSysOrigin(sysOrigin);
|
||||||
|
ResidentRegisterRewardConfig config = residentRegisterRewardConfigService.query()
|
||||||
|
.eq(ResidentRegisterRewardConfig::getSysOrigin, normalizedSysOrigin)
|
||||||
|
.getOne();
|
||||||
|
|
||||||
|
ResidentRegisterRewardConfigCO result = new ResidentRegisterRewardConfigCO()
|
||||||
|
.setSysOrigin(normalizedSysOrigin);
|
||||||
|
if (config == null) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.setConfigured(Boolean.TRUE)
|
||||||
|
.setEnabled(Boolean.TRUE.equals(config.getEnabled()))
|
||||||
|
.setGoldAmount(defaultGoldAmount(config.getGoldAmount()))
|
||||||
|
.setRewardGroupId(config.getRewardGroupId())
|
||||||
|
.setRewardGroupName(getRewardGroupName(config.getRewardGroupId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void saveConfig(ResidentRegisterRewardConfigSaveCmd cmd) {
|
||||||
|
validateConfig(cmd);
|
||||||
|
String normalizedSysOrigin = normalizeSysOrigin(cmd.getSysOrigin());
|
||||||
|
ResidentRegisterRewardConfig config = residentRegisterRewardConfigService.query()
|
||||||
|
.eq(ResidentRegisterRewardConfig::getSysOrigin, normalizedSysOrigin)
|
||||||
|
.getOne();
|
||||||
|
boolean exists = config != null;
|
||||||
|
if (!exists) {
|
||||||
|
config = new ResidentRegisterRewardConfig().setId(IdWorkerUtils.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
config.setSysOrigin(normalizedSysOrigin)
|
||||||
|
.setEnabled(Boolean.TRUE.equals(cmd.getEnabled()))
|
||||||
|
.setGoldAmount(defaultGoldAmount(cmd.getGoldAmount()))
|
||||||
|
.setRewardGroupId(cmd.getRewardGroupId());
|
||||||
|
|
||||||
|
if (exists) {
|
||||||
|
ResponseAssert.isTrue(CommonErrorCode.UPDATE_FAILURE,
|
||||||
|
residentRegisterRewardConfigService.updateSelectiveById(config));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ResponseAssert.isTrue(CommonErrorCode.SAVE_FAILURE,
|
||||||
|
residentRegisterRewardConfigService.save(config));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void resetConfig(String sysOrigin) {
|
||||||
|
String normalizedSysOrigin = normalizeSysOrigin(sysOrigin);
|
||||||
|
residentRegisterRewardConfigService.remove(
|
||||||
|
Wrappers.<ResidentRegisterRewardConfig>lambdaQuery()
|
||||||
|
.eq(ResidentRegisterRewardConfig::getSysOrigin, normalizedSysOrigin));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateConfig(ResidentRegisterRewardConfigSaveCmd cmd) {
|
||||||
|
long goldAmount = defaultGoldAmount(cmd.getGoldAmount());
|
||||||
|
if (Boolean.TRUE.equals(cmd.getEnabled())) {
|
||||||
|
ResponseAssert.isTrue(ResponseErrorCode.REQUEST_PARAMETER_ERROR,
|
||||||
|
"At least one reward is required when enabled.",
|
||||||
|
goldAmount > 0 || cmd.getRewardGroupId() != null);
|
||||||
|
}
|
||||||
|
ResponseAssert.isTrue(ResponseErrorCode.REQUEST_PARAMETER_ERROR,
|
||||||
|
"goldAmount must be greater than or equal to zero.",
|
||||||
|
goldAmount >= 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String normalizeSysOrigin(String sysOrigin) {
|
||||||
|
return Objects.toString(sysOrigin, "").trim().toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Long defaultGoldAmount(Long goldAmount) {
|
||||||
|
return goldAmount == null ? 0L : goldAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getRewardGroupName(Long rewardGroupId) {
|
||||||
|
if (rewardGroupId == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
PropsActivityRewardGroupDTO group = propsActivityRewardGroupService.getByGroupId(rewardGroupId);
|
||||||
|
return group == null ? null : group.getName();
|
||||||
|
} catch (Exception ignore) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package com.red.circle.console.app.dto.clienobject.app.activity.register;
|
||||||
|
|
||||||
|
import com.red.circle.framework.dto.ClientObject;
|
||||||
|
import java.io.Serial;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常驻注册奖励配置.
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class ResidentRegisterRewardConfigCO extends ClientObject {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private Boolean configured = Boolean.FALSE;
|
||||||
|
|
||||||
|
private String sysOrigin;
|
||||||
|
|
||||||
|
private Boolean enabled = Boolean.FALSE;
|
||||||
|
|
||||||
|
private Long goldAmount = 0L;
|
||||||
|
|
||||||
|
private Long rewardGroupId;
|
||||||
|
|
||||||
|
private String rewardGroupName;
|
||||||
|
}
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
package com.red.circle.console.app.dto.cmd.app.activity.register;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常驻注册奖励配置保存命令.
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ResidentRegisterRewardConfigSaveCmd implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@NotBlank(message = "sysOrigin required.")
|
||||||
|
private String sysOrigin;
|
||||||
|
|
||||||
|
@NotNull(message = "enabled required.")
|
||||||
|
private Boolean enabled;
|
||||||
|
|
||||||
|
private Long goldAmount;
|
||||||
|
|
||||||
|
private Long rewardGroupId;
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package com.red.circle.console.app.service.app.activity;
|
||||||
|
|
||||||
|
import com.red.circle.console.app.dto.clienobject.app.activity.register.ResidentRegisterRewardConfigCO;
|
||||||
|
import com.red.circle.console.app.dto.cmd.app.activity.register.ResidentRegisterRewardConfigSaveCmd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常驻注册奖励管理.
|
||||||
|
*/
|
||||||
|
public interface ResidentRegisterRewardService {
|
||||||
|
|
||||||
|
ResidentRegisterRewardConfigCO getConfig(String sysOrigin);
|
||||||
|
|
||||||
|
void saveConfig(ResidentRegisterRewardConfigSaveCmd cmd);
|
||||||
|
|
||||||
|
void resetConfig(String sysOrigin);
|
||||||
|
}
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
package com.red.circle.console.infra.database.rds.dao.app.register;
|
||||||
|
|
||||||
|
import com.red.circle.console.infra.database.rds.entity.app.register.ResidentRegisterRewardConfig;
|
||||||
|
import com.red.circle.framework.mybatis.dao.BaseDAO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常驻注册奖励配置 DAO.
|
||||||
|
*/
|
||||||
|
public interface ResidentRegisterRewardConfigDAO extends BaseDAO<ResidentRegisterRewardConfig> {
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
package com.red.circle.console.infra.database.rds.entity.app.register;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.red.circle.framework.mybatis.entity.TimestampBaseEntity;
|
||||||
|
import java.io.Serial;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常驻注册奖励配置.
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@TableName("resident_register_reward_config")
|
||||||
|
public class ResidentRegisterRewardConfig extends TimestampBaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.INPUT)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@TableField("sys_origin")
|
||||||
|
private String sysOrigin;
|
||||||
|
|
||||||
|
@TableField("enabled")
|
||||||
|
private Boolean enabled;
|
||||||
|
|
||||||
|
@TableField("gold_amount")
|
||||||
|
private Long goldAmount;
|
||||||
|
|
||||||
|
@TableField("reward_group_id")
|
||||||
|
private Long rewardGroupId;
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.red.circle.console.infra.database.rds.service.app.register;
|
||||||
|
|
||||||
|
import com.red.circle.console.infra.database.rds.entity.app.register.ResidentRegisterRewardConfig;
|
||||||
|
import com.red.circle.framework.mybatis.service.BaseService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常驻注册奖励配置服务.
|
||||||
|
*/
|
||||||
|
public interface ResidentRegisterRewardConfigService
|
||||||
|
extends BaseService<ResidentRegisterRewardConfig> {
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package com.red.circle.console.infra.database.rds.service.app.register.impl;
|
||||||
|
|
||||||
|
import com.red.circle.console.infra.database.rds.dao.app.register.ResidentRegisterRewardConfigDAO;
|
||||||
|
import com.red.circle.console.infra.database.rds.entity.app.register.ResidentRegisterRewardConfig;
|
||||||
|
import com.red.circle.console.infra.database.rds.service.app.register.ResidentRegisterRewardConfigService;
|
||||||
|
import com.red.circle.framework.mybatis.service.impl.BaseServiceImpl;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常驻注册奖励配置服务实现.
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ResidentRegisterRewardConfigServiceImpl extends
|
||||||
|
BaseServiceImpl<ResidentRegisterRewardConfigDAO, ResidentRegisterRewardConfig>
|
||||||
|
implements ResidentRegisterRewardConfigService {
|
||||||
|
}
|
||||||
@ -73,14 +73,9 @@ public class SecurityFilter implements Filter {
|
|||||||
responseFailureUnauthorized(res);
|
responseFailureUnauthorized(res);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ("154".equals(reqUserId)) {
|
request.setAttribute(RequestAttrConstant.REQ_UID, userId);
|
||||||
responseFailureUnauthorized(res);
|
chain.doFilter(request, res);
|
||||||
return;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
request.setAttribute(RequestAttrConstant.REQ_UID, userId);
|
|
||||||
chain.doFilter(request, res);
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isIgnoreMatcherPath(HttpServletRequest request) {
|
private boolean isIgnoreMatcherPath(HttpServletRequest request) {
|
||||||
for (String ignoreUrl : consoleSecurityProperties.getIgnoreUrls()) {
|
for (String ignoreUrl : consoleSecurityProperties.getIgnoreUrls()) {
|
||||||
|
|||||||
@ -29,14 +29,14 @@ public class TeamSalaryPaymentTask {
|
|||||||
private final TeamProfileService teamProfileService;
|
private final TeamProfileService teamProfileService;
|
||||||
private final TeamSalaryMqMessage teamSalaryMqMessage;
|
private final TeamSalaryMqMessage teamSalaryMqMessage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 每天凌晨0点过30秒执行一次,处理团队工资结算.
|
* 每天凌晨0点过30秒执行一次,处理团队工资结算.
|
||||||
*/
|
*/
|
||||||
// @Scheduled(cron = "30 1 0 * * ?", zone = "Asia/Riyadh")
|
@Scheduled(cron = "30 1 0 * * ?", zone = "Asia/Riyadh")
|
||||||
// @TaskCacheLock(key = "TEAM_SALARY_PAYMENT_TASK", expireSecond = 10800)
|
@TaskCacheLock(key = "TEAM_SALARY_PAYMENT_TASK", expireSecond = 10800)
|
||||||
public void teamSalaryPaymentTask() {
|
public void teamSalaryPaymentTask() {
|
||||||
long startTime = System.currentTimeMillis();
|
long startTime = System.currentTimeMillis();
|
||||||
log.warn("exec team_salary_payment_task start");
|
log.warn("exec team_salary_payment_task start");
|
||||||
|
|
||||||
log.warn("支付团队工资 start,时间:{}", TimestampUtils.now());
|
log.warn("支付团队工资 start,时间:{}", TimestampUtils.now());
|
||||||
|
|
||||||
|
|||||||
@ -10,15 +10,15 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.red.circle</groupId>
|
<groupId>com.red.circle</groupId>
|
||||||
<artifactId>other-domain</artifactId>
|
<artifactId>other-domain</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.red.circle</groupId>
|
<groupId>com.red.circle</groupId>
|
||||||
<artifactId>framework-cloud</artifactId>
|
<artifactId>framework-cloud</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.red.circle</groupId>
|
<groupId>com.red.circle</groupId>
|
||||||
|
|||||||
@ -17,11 +17,11 @@ import com.red.circle.other.infra.database.rds.service.user.device.ArchiveDevice
|
|||||||
import com.red.circle.other.infra.database.rds.service.user.user.AuthTypeService;
|
import com.red.circle.other.infra.database.rds.service.user.user.AuthTypeService;
|
||||||
import com.red.circle.other.inner.asserts.DynamicErrorCode;
|
import com.red.circle.other.inner.asserts.DynamicErrorCode;
|
||||||
import com.red.circle.other.inner.model.cmd.user.UserProfileCmd;
|
import com.red.circle.other.inner.model.cmd.user.UserProfileCmd;
|
||||||
import com.red.circle.tool.core.phone.PhoneNumberUtils;
|
import com.red.circle.tool.core.phone.PhoneNumberUtils;
|
||||||
import com.red.circle.tool.core.sequence.IdWorkerUtils;
|
import com.red.circle.tool.core.sequence.IdWorkerUtils;
|
||||||
import com.red.circle.tool.core.text.StringUtils;
|
import com.red.circle.tool.core.text.StringUtils;
|
||||||
import com.red.circle.other.inner.asserts.user.UserErrorCode;
|
import com.red.circle.other.inner.asserts.user.UserErrorCode;
|
||||||
import com.red.circle.other.inner.model.cmd.user.account.CreateAccountCmd;
|
import com.red.circle.other.inner.model.cmd.user.account.CreateAccountCmd;
|
||||||
import com.red.circle.other.inner.model.cmd.user.account.MobileAuthCmd;
|
import com.red.circle.other.inner.model.cmd.user.account.MobileAuthCmd;
|
||||||
import com.red.circle.other.inner.model.cmd.user.device.AllowDeviceRegisterCmd;
|
import com.red.circle.other.inner.model.cmd.user.device.AllowDeviceRegisterCmd;
|
||||||
import com.red.circle.other.inner.model.dto.user.account.UserAccountDTO;
|
import com.red.circle.other.inner.model.dto.user.account.UserAccountDTO;
|
||||||
@ -48,11 +48,11 @@ public class CreateAccountAspect {
|
|||||||
|
|
||||||
private final EnvProperties evnProperties;
|
private final EnvProperties evnProperties;
|
||||||
private final AuthTypeService authTypeService;
|
private final AuthTypeService authTypeService;
|
||||||
private final ArchiveDeviceService archiveDeviceService;
|
private final ArchiveDeviceService archiveDeviceService;
|
||||||
private final RegisterDeviceGateway registerDeviceGateway;
|
private final RegisterDeviceGateway registerDeviceGateway;
|
||||||
private final UserPropsRewardProcess userPropsRewardProcess;
|
private final RegisterRewardStreamProducer registerRewardStreamProducer;
|
||||||
private final CreateAccountExpandProcess createAccountExpandProcess;
|
private final CreateAccountExpandProcess createAccountExpandProcess;
|
||||||
private final CheckRegisterUserProfileProcess checkRegisterUserProfileProcess;
|
private final CheckRegisterUserProfileProcess checkRegisterUserProfileProcess;
|
||||||
|
|
||||||
@Pointcut("@annotation(com.red.circle.other.infra.annotation.CreateAccount)")
|
@Pointcut("@annotation(com.red.circle.other.infra.annotation.CreateAccount)")
|
||||||
public void userRegisterAspectPointCut() {
|
public void userRegisterAspectPointCut() {
|
||||||
@ -74,15 +74,14 @@ public class CreateAccountAspect {
|
|||||||
UserProfileCmd userProfile = new UserProfileCmd();
|
UserProfileCmd userProfile = new UserProfileCmd();
|
||||||
userProfile.setCountryId(result.getBody().getUserProfile().getCountryId());
|
userProfile.setCountryId(result.getBody().getUserProfile().getCountryId());
|
||||||
cmd.setProfile(userProfile);
|
cmd.setProfile(userProfile);
|
||||||
}
|
}
|
||||||
if (result.checkSuccess() && Objects.nonNull(result.getBody())) {
|
if (result.checkSuccess() && Objects.nonNull(result.getBody())) {
|
||||||
result.getBody().putRewardProps(
|
registerRewardStreamProducer.publish(
|
||||||
userPropsRewardProcess.newUserReward(
|
SysOriginPlatformEnum.valueOf(cmd.requireReqSysOrigin()),
|
||||||
SysOriginPlatformEnum.valueOf(cmd.requireReqSysOrigin()),
|
cmd.requiredReqUserId(),
|
||||||
cmd.requiredReqUserId(), cmd.getProfile().getCountryId()
|
cmd.getProfile().getCountryId()
|
||||||
)
|
);
|
||||||
);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
createAccountExpandProcess.process(cmd);
|
createAccountExpandProcess.process(cmd);
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@ -0,0 +1,51 @@
|
|||||||
|
package com.red.circle.other.infra.annotation.aspect;
|
||||||
|
|
||||||
|
import com.red.circle.common.business.core.enums.SysOriginPlatformEnum;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.data.redis.connection.stream.MapRecord;
|
||||||
|
import org.springframework.data.redis.connection.stream.StreamRecords;
|
||||||
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册成功后发送异步奖励事件.
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class RegisterRewardStreamProducer {
|
||||||
|
|
||||||
|
private final RedisTemplate<String, Object> redisTemplate;
|
||||||
|
|
||||||
|
@Value("${red-circle.activity.register-reward.stream-key:activity:register:reward}")
|
||||||
|
private String streamKey;
|
||||||
|
|
||||||
|
public void publish(SysOriginPlatformEnum sysOrigin, Long userId, Long countryId) {
|
||||||
|
Map<String, String> payload = new HashMap<>(8);
|
||||||
|
payload.put("eventId", buildEventId(sysOrigin, userId));
|
||||||
|
payload.put("sysOrigin", sysOrigin.name());
|
||||||
|
payload.put("userId", String.valueOf(userId));
|
||||||
|
if (countryId != null) {
|
||||||
|
payload.put("countryId", String.valueOf(countryId));
|
||||||
|
}
|
||||||
|
payload.put("publishedAt", String.valueOf(System.currentTimeMillis()));
|
||||||
|
|
||||||
|
try {
|
||||||
|
MapRecord<String, String, String> record = StreamRecords.newRecord()
|
||||||
|
.in(streamKey)
|
||||||
|
.ofMap(payload);
|
||||||
|
redisTemplate.opsForStream().add(record);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("publish register reward event failed. sysOrigin={} userId={} countryId={}",
|
||||||
|
sysOrigin, userId, countryId, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String buildEventId(SysOriginPlatformEnum sysOrigin, Long userId) {
|
||||||
|
return "REGISTER_REWARD:" + sysOrigin.name() + ":" + userId;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,28 +1,25 @@
|
|||||||
package com.red.circle.other.infra.annotation.aspect;
|
package com.red.circle.other.infra.annotation.aspect;
|
||||||
|
|
||||||
import com.red.circle.common.business.core.enums.SysOriginPlatformEnum;
|
import com.red.circle.common.business.core.enums.SysOriginPlatformEnum;
|
||||||
import com.red.circle.framework.dto.QuantityDTO;
|
import com.red.circle.framework.dto.QuantityDTO;
|
||||||
import com.red.circle.other.domain.gateway.props.PropsStoreGateway;
|
import com.red.circle.other.domain.gateway.props.PropsStoreGateway;
|
||||||
import com.red.circle.other.domain.gateway.user.ability.UserRegionGateway;
|
import com.red.circle.other.domain.gateway.user.ability.UserRegionGateway;
|
||||||
import com.red.circle.other.infra.convertor.game.GiftInfraConvertor;
|
import com.red.circle.other.infra.convertor.game.GiftInfraConvertor;
|
||||||
import com.red.circle.other.infra.convertor.material.PropsMaterialInfraConvertor;
|
import com.red.circle.other.infra.convertor.material.PropsMaterialInfraConvertor;
|
||||||
import com.red.circle.other.infra.database.rds.service.gift.GiftBackpackService;
|
import com.red.circle.other.infra.database.rds.service.gift.GiftBackpackService;
|
||||||
import com.red.circle.other.infra.database.rds.service.gift.GiftConfigService;
|
import com.red.circle.other.infra.database.rds.service.gift.GiftConfigService;
|
||||||
import com.red.circle.other.inner.enums.material.GiftCurrencyType;
|
import com.red.circle.other.inner.enums.material.GiftCurrencyType;
|
||||||
import com.red.circle.other.inner.model.dto.material.GiftConfigDTO;
|
import com.red.circle.other.inner.model.dto.material.GiftConfigDTO;
|
||||||
import com.red.circle.other.inner.model.dto.material.NewUserRewardDTO;
|
import com.red.circle.other.inner.model.dto.material.NewUserRewardDTO;
|
||||||
import com.red.circle.other.inner.model.dto.material.PropsDecorationDTO;
|
import com.red.circle.other.inner.model.dto.material.PropsDecorationDTO;
|
||||||
import com.red.circle.other.inner.model.dto.material.props.PropsResources;
|
import com.red.circle.other.inner.model.dto.material.props.UserBackpackProps;
|
||||||
import com.red.circle.other.inner.model.dto.material.props.UserBackpackProps;
|
import java.math.BigDecimal;
|
||||||
import java.math.BigDecimal;
|
import java.math.RoundingMode;
|
||||||
import java.math.RoundingMode;
|
import java.util.Objects;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
import lombok.RequiredArgsConstructor;
|
||||||
import java.util.Set;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author pengliang on 2024/2/28
|
* @author pengliang on 2024/2/28
|
||||||
@ -30,27 +27,27 @@ import org.springframework.stereotype.Component;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class UserPropsRewardProcess {
|
public class UserPropsRewardProcess {
|
||||||
|
|
||||||
private final GiftConfigService giftConfigService;
|
private final GiftConfigService giftConfigService;
|
||||||
private final GiftInfraConvertor giftInfraConvertor;
|
private final GiftInfraConvertor giftInfraConvertor;
|
||||||
private final PropsStoreGateway propsStoreGateway;
|
private final PropsStoreGateway propsStoreGateway;
|
||||||
private final GiftBackpackService giftBackpackService;
|
private final GiftBackpackService giftBackpackService;
|
||||||
private final PropsMaterialInfraConvertor propsMaterialInfraConvertor;
|
private final PropsMaterialInfraConvertor propsMaterialInfraConvertor;
|
||||||
private final UserRegionGateway userRegionGateway;
|
private final UserRegionGateway userRegionGateway;
|
||||||
|
|
||||||
public NewUserRewardDTO newUserReward(SysOriginPlatformEnum sysOrigin, Long userId, Long countryId) {
|
public NewUserRewardDTO newUserReward(SysOriginPlatformEnum sysOrigin, Long userId, Long countryId) {
|
||||||
|
|
||||||
// if (Objects.equals(sysOrigin.name(), SysOriginPlatformEnum.ASWAT.name())) {
|
// if (Objects.equals(sysOrigin.name(), SysOriginPlatformEnum.ASWAT.name())) {
|
||||||
// return aswatNewUserReward(userId);
|
// return aswatNewUserReward(userId);
|
||||||
// }
|
// }
|
||||||
// Long inCountryId = 1231833304232112130L;
|
// Long inCountryId = 1231833304232112130L;
|
||||||
// if (Objects.equals(inCountryId, countryId)) {
|
// if (Objects.equals(inCountryId, countryId)) {
|
||||||
// log.warn("2countryId {}", countryId);
|
// log.warn("2countryId {}", countryId);
|
||||||
// return inSystemNewUserReward(sysOrigin, userId);
|
// return inSystemNewUserReward(sysOrigin, userId);
|
||||||
// }
|
// }
|
||||||
return otherSystemNewUserReward(sysOrigin, userId);
|
return otherSystemNewUserReward(sysOrigin, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 20240919 印度用户注册赠送特殊头像框
|
* 20240919 印度用户注册赠送特殊头像框
|
||||||
@ -78,19 +75,19 @@ public class UserPropsRewardProcess {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private NewUserRewardDTO otherSystemNewUserReward(SysOriginPlatformEnum sysOrigin, Long userId) {
|
private NewUserRewardDTO otherSystemNewUserReward(SysOriginPlatformEnum sysOrigin, Long userId) {
|
||||||
int days = 7;
|
int days = 7;
|
||||||
// QuantityDTO<GiftConfigDTO> gift = sendGift(sysOrigin, userId);
|
// QuantityDTO<GiftConfigDTO> gift = sendGift(sysOrigin, userId);
|
||||||
UserBackpackProps userPropsBackpack = propsStoreGateway.randomGiveawayCheapestProps(userId, 7);
|
UserBackpackProps userPropsBackpack = propsStoreGateway.randomGiveawayCheapestProps(userId, 7);
|
||||||
return new NewUserRewardDTO()
|
return new NewUserRewardDTO()
|
||||||
.setGift(null)
|
.setGift(null)
|
||||||
.setProps(new PropsDecorationDTO()
|
.setProps(new PropsDecorationDTO()
|
||||||
.setPropsResources(
|
.setPropsResources(
|
||||||
propsMaterialInfraConvertor.toPropsResourcesDTO(userPropsBackpack.getPropsResources()))
|
propsMaterialInfraConvertor.toPropsResourcesDTO(userPropsBackpack.getPropsResources()))
|
||||||
.setDays(days)
|
.setDays(days)
|
||||||
.setAmount(countAmount(days, userPropsBackpack))
|
.setAmount(countAmount(days, userPropsBackpack))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private BigDecimal countAmount(int days, UserBackpackProps userBackpackProps) {
|
private BigDecimal countAmount(int days, UserBackpackProps userBackpackProps) {
|
||||||
return userBackpackProps.getPropsResources().getAmount().multiply(BigDecimal.valueOf(days))
|
return userBackpackProps.getPropsResources().getAmount().multiply(BigDecimal.valueOf(days))
|
||||||
|
|||||||
@ -84,14 +84,20 @@ public class TeamBillCycleClientEndpoint implements TeamBillCycleClientApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResultResponse<Void> resetUnpaidBillMemberTarget(TeamMemberTargetResetCmd param) {
|
public ResultResponse<Void> resetUnpaidBillMemberTarget(TeamMemberTargetResetCmd param) {
|
||||||
teamBillCycleClientService.resetUnpaidBillMemberTarget(param);
|
teamBillCycleClientService.resetUnpaidBillMemberTarget(param);
|
||||||
return ResultResponse.success();
|
return ResultResponse.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResultResponse<TeamBillCycleDTO> getBillByTeamId(Long teamId) {
|
public ResultResponse<Void> refreshUnpaidBills(TeamBillCycleBackQryCmd query) {
|
||||||
return ResultResponse.success(teamBillCycleClientService.getBillByTeamId(teamId));
|
teamBillCycleClientService.refreshUnpaidBills(query);
|
||||||
}
|
return ResultResponse.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResultResponse<TeamBillCycleDTO> getBillByTeamId(Long teamId) {
|
||||||
|
return ResultResponse.success(teamBillCycleClientService.getBillByTeamId(teamId));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,7 +37,9 @@ public interface TeamBillCycleClientService {
|
|||||||
|
|
||||||
List<TeamBillAnchorStatisticsModelDTO> queryTeamBillByCondition(TeamBillByConditionQryCmd cmd);
|
List<TeamBillAnchorStatisticsModelDTO> queryTeamBillByCondition(TeamBillByConditionQryCmd cmd);
|
||||||
|
|
||||||
void resetUnpaidBillMemberTarget(TeamMemberTargetResetCmd param);
|
void resetUnpaidBillMemberTarget(TeamMemberTargetResetCmd param);
|
||||||
|
|
||||||
TeamBillCycleDTO getBillByTeamId(Long teamId);
|
void refreshUnpaidBills(TeamBillCycleBackQryCmd query);
|
||||||
}
|
|
||||||
|
TeamBillCycleDTO getBillByTeamId(Long teamId);
|
||||||
|
}
|
||||||
|
|||||||
@ -37,16 +37,17 @@ import com.red.circle.other.infra.database.rds.service.team.BusinessDevelopmentB
|
|||||||
import com.red.circle.other.infra.database.rds.service.team.BusinessDevelopmentTeamService;
|
import com.red.circle.other.infra.database.rds.service.team.BusinessDevelopmentTeamService;
|
||||||
import com.red.circle.other.infra.database.rds.service.team.UserHistoryIdentityService;
|
import com.red.circle.other.infra.database.rds.service.team.UserHistoryIdentityService;
|
||||||
import com.red.circle.other.infra.database.rds.service.user.device.LatestMobileDeviceService;
|
import com.red.circle.other.infra.database.rds.service.user.device.LatestMobileDeviceService;
|
||||||
import com.red.circle.other.inner.asserts.team.TeamErrorCode;
|
import com.red.circle.other.inner.asserts.team.TeamErrorCode;
|
||||||
import com.red.circle.other.inner.asserts.user.UserErrorCode;
|
import com.red.circle.other.inner.asserts.user.UserErrorCode;
|
||||||
import com.red.circle.other.inner.enums.team.TeamBillCycleStatus;
|
import com.red.circle.other.inner.enums.team.TeamBillCycleStatus;
|
||||||
import com.red.circle.other.inner.enums.team.TeamMemberTargetIndex;
|
import com.red.circle.other.inner.enums.team.TeamMemberTargetIndex;
|
||||||
import com.red.circle.other.inner.enums.team.TeamMemberTargetSettlementResult;
|
import com.red.circle.other.inner.enums.team.TeamMemberTargetSettlementResult;
|
||||||
import com.red.circle.other.inner.enums.team.TeamMemberTargetStatus;
|
import com.red.circle.other.inner.enums.team.TeamMemberTargetStatus;
|
||||||
import com.red.circle.other.inner.model.cmd.team.TeamBillByConditionQryCmd;
|
import com.red.circle.other.inner.model.dto.agency.agency.TeamStatus;
|
||||||
import com.red.circle.other.inner.model.cmd.team.TeamBillCycleBackQryCmd;
|
import com.red.circle.other.inner.model.cmd.team.TeamBillByConditionQryCmd;
|
||||||
import com.red.circle.other.inner.model.cmd.team.TeamCalculatorWorkCmd;
|
import com.red.circle.other.inner.model.cmd.team.TeamBillCycleBackQryCmd;
|
||||||
import com.red.circle.other.inner.model.cmd.team.TeamMemberTargetResetCmd;
|
import com.red.circle.other.inner.model.cmd.team.TeamCalculatorWorkCmd;
|
||||||
|
import com.red.circle.other.inner.model.cmd.team.TeamMemberTargetResetCmd;
|
||||||
import com.red.circle.other.inner.model.dto.agency.agency.*;
|
import com.red.circle.other.inner.model.dto.agency.agency.*;
|
||||||
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
|
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
|
||||||
import com.red.circle.tool.core.collection.CollectionUtils;
|
import com.red.circle.tool.core.collection.CollectionUtils;
|
||||||
@ -172,15 +173,41 @@ public class TeamBillCycleClientServiceImpl implements TeamBillCycleClientServic
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateStatus(Long billId, TeamBillCycleStatus status, Long updateUser) {
|
public void updateStatus(Long billId, TeamBillCycleStatus status, Long updateUser) {
|
||||||
teamBillCycleService.updateStatus(billId, status, updateUser);
|
teamBillCycleService.updateStatus(billId, status, updateUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TeamBillAnchorStatisticsModelDTO> queryTeamBillByCondition(
|
public void refreshUnpaidBills(TeamBillCycleBackQryCmd query) {
|
||||||
TeamBillByConditionQryCmd cmd) {
|
|
||||||
// 查询团队账单
|
if (Objects.isNull(query)
|
||||||
List<TeamBillCycleDTO> billCycleList = teamInfraConvertor.toListTeamBillCycleDTO(
|
|| StringUtils.isBlank(query.getSysOrigin())
|
||||||
|
|| StringUtils.isBlank(query.getRegion())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<TeamProfile> teamProfiles = Optional.ofNullable(teamProfileService.listRegionAll(query.getRegion()))
|
||||||
|
.orElse(Lists.newArrayList())
|
||||||
|
.stream()
|
||||||
|
.filter(teamProfile -> Objects.equals(TeamStatus.AVAILABLE, teamProfile.getStatus()))
|
||||||
|
.filter(teamProfile -> Objects.equals(query.getSysOrigin(), teamProfile.getSysOrigin()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
if (CollectionUtils.isEmpty(teamProfiles)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<List<TeamProfile>> teams = Lists.partition(teamProfiles, 200);
|
||||||
|
teams.forEach(teamList -> sendTeamSalaryCountMq(teamList.stream()
|
||||||
|
.map(TeamProfile::getId)
|
||||||
|
.collect(Collectors.toCollection(HashSet::new))));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TeamBillAnchorStatisticsModelDTO> queryTeamBillByCondition(
|
||||||
|
TeamBillByConditionQryCmd cmd) {
|
||||||
|
// 查询团队账单
|
||||||
|
List<TeamBillCycleDTO> billCycleList = teamInfraConvertor.toListTeamBillCycleDTO(
|
||||||
teamBillCycleService.queryTeamBillByCondition(cmd.getSysOrigin(), cmd.getBillStatus(),
|
teamBillCycleService.queryTeamBillByCondition(cmd.getSysOrigin(), cmd.getBillStatus(),
|
||||||
cmd.getRegion(), cmd.getMonthDate()));
|
cmd.getRegion(), cmd.getMonthDate()));
|
||||||
|
|
||||||
|
|||||||
@ -25,15 +25,15 @@
|
|||||||
<artifactId>live-inner-api</artifactId>
|
<artifactId>live-inner-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.red.circle</groupId>
|
<groupId>com.red.circle</groupId>
|
||||||
<artifactId>auth-inner-api</artifactId>
|
<artifactId>auth-inner-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.red.circle</groupId>
|
<groupId>com.red.circle</groupId>
|
||||||
<artifactId>other-inner-model</artifactId>
|
<artifactId>other-inner-model</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.red.circle</groupId>
|
<groupId>com.red.circle</groupId>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user