feat:硬件核销相关

This commit is contained in:
dzc committed 2026-01-30 15:24:52 +08:00
1 parent 255b88a948
commit a2623df7e2
19 files changed
+455 -37

No files matched your search

@@ -15,6 +15,7 @@ public enum WalletCodeBizEnum {
SUPERMARKET_RESERVE("4", "超市线上预订"),
USER_WALLET("5", "用户钱包二维码"),
FARMER_RESERVE("6", "用户钱包二维码"),
ACT("6", "活动二维码"),
;
private final String code;
@@ -0,0 +1,31 @@
package com.bsd.pjcloud.wallet.api.dto.act;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
@Data
public class ActComCancelDto {
/**
* 活动子id
*/
@NotNull(message = "活动子id不能为空")
private Long actItemId;
/**
* 用户id
*/
@NotNull(message = "用户id不能为空")
private Long userId;
/**
* 订单id
*/
private Long orderId;
/**
* 活动提现金额
*/
private Integer useAmountPrice;
}
@@ -45,12 +45,6 @@ public interface RemoteCodeUseService {
/**
* 生成二维码
*
* @param id
* @param userId
* @param walletCodeBiz
* @param count
* @return
*/
@NoToken
@GetMapping("/wallet-code-use/generate-code")
@@ -0,0 +1,42 @@
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 com.bsd.pjcloud.wallet.api.dto.act.ActComCancelDto;
import com.bsd.pjcloud.wallet.api.entity.WalletCodeUseEntity;
import com.bsd.pjcloud.wallet.api.vo.act.ActComItemVo;
import org.springframework.cloud.openfeign.FeignClient;
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.RequestParam;
import java.util.List;
@FeignClient(contextId = "RemoteComActService", value = ServiceNameConstants.WALLET_SERVICE)
public interface RemoteComActService {
/**
* 根据公告id查询对应的活动
*/
@NoToken
@GetMapping("/act/com/remote/get-act")
R<ActComItemVo> remoteGetComAct(@RequestParam Long actItemId, @RequestParam Long userId);
/**
* 活动是否能够核销
*/
@NoToken
@GetMapping("/act/com/remote/is-can-cancel")
R<String> remoteIsCanCancel(@RequestParam Long actItemId, @RequestParam Long userId);
/**
* 核销活动
*/
@NoToken
@PostMapping("/act/com/remote/do-cancel")
R<Boolean> remoteDoCancel(@Validated @RequestBody ActComCancelDto body);
}
@@ -0,0 +1,21 @@
package com.bsd.pjcloud.wallet.api.vo.act;
import com.bsd.pjcloud.wallet.api.constant.act.ActTypeEnum;
import lombok.Data;
@Data
public class ActComItemVo<T> {
private String actType;
private Long actItemId;
private Long userId;
private String username;
private String userAvatar;
private T detail;
}