feat:离职自动转账
This commit is contained in:
1 parent
c3c41253d7
commit
80e859781b
22 files changed
+303
-11
No files matched your search
+35
@@ -0,0 +1,35 @@
|
||||
package com.bsd.pjcloud.wallet.api.constant.rule;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 用户转账类型
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WalletRuleTransationTypeEnum {
|
||||
|
||||
USER_CHANGE("10", "用户手动转账"),
|
||||
LEAVE_AUTO("20", "离职退休自动转账"),
|
||||
;
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
public static WalletRuleTransationTypeEnum valueOfByType(String code) {
|
||||
return Arrays.stream(WalletRuleTransationTypeEnum.values())
|
||||
.filter(v -> ObjectUtil.equal(v.getCode(), code))
|
||||
.findFirst().get();
|
||||
}
|
||||
|
||||
public static WalletRuleTransationTypeEnum descOf(String description) {
|
||||
return Arrays.stream(WalletRuleTransationTypeEnum.values())
|
||||
.filter(v -> ObjectUtil.equal(v.getDesc(), description))
|
||||
.findFirst().get();
|
||||
}
|
||||
|
||||
}
|
||||
+6
@@ -27,6 +27,12 @@ public class WalletRuleTransactionEntity extends Model<WalletRuleTransactionEnti
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 业务类型
|
||||
*/
|
||||
@Schema(description = "业务类型")
|
||||
private String bizType;
|
||||
|
||||
/**
|
||||
* 源钱包id
|
||||
*/
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.bsd.pjcloud.wallet.api.feign;
|
||||
|
||||
import com.bsd.pjcloud.common.core.constant.ServiceNameConstants;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.feign.annotation.NoToken;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
|
||||
@FeignClient(contextId = "remoteWalletRuleTransactionService", value = ServiceNameConstants.WALLET_SERVICE)
|
||||
public interface RemoteWalletRuleTransactionService {
|
||||
|
||||
/**
|
||||
* 离职退休自动转到消费钱包
|
||||
*/
|
||||
@NoToken
|
||||
@PostMapping("/wallet-rule-transaction/inner/auto-transation")
|
||||
R<Boolean> userAutoWalletTransation(@RequestParam Long userId);
|
||||
|
||||
}
|
||||
+1
@@ -2,6 +2,7 @@ com.bsd.pjcloud.wallet.api.feign.RemoteWalletService
|
||||
com.bsd.pjcloud.wallet.api.feign.RemoteMchRuleJoinService
|
||||
com.bsd.pjcloud.wallet.api.feign.RemoteCodeUseService
|
||||
com.bsd.pjcloud.wallet.api.feign.RemoteWalletRechargeService
|
||||
com.bsd.pjcloud.wallet.api.feign.RemoteWalletRuleTransactionService
|
||||
com.bsd.pjcloud.wallet.api.feign.RemoteMchService
|
||||
com.bsd.pjcloud.wallet.api.feign.RemoteWalletSettingService
|
||||
com.bsd.pjcloud.wallet.api.feign.RemoteWalletThirdZyService
|
||||
|
||||
Reference in new issue
Block a user