Commit 44476b08 authored by zhangfeng's avatar zhangfeng

Merge remote-tracking branch 'origin/feature_member_score' into feature_member_score

parents ce5c2e27 4f031428
......@@ -24,7 +24,9 @@ public interface ErrorCodeConstants {
ErrorCode REWARD_REDEEM_COUNT_NOT_ALLOW = new ErrorCode(1001011016, "批量兑换每次最多十条");
ErrorCode REWARD_REDEEM_ALLOW_COUNT_ERROR = new ErrorCode(1001011017, "超出允许兑换次数");
ErrorCode REWARD_REDEEM_NOT_EXIST = new ErrorCode(1001011018, "reward.redeem.not.exist");
ErrorCode REWARD_REDEEM_STATUS_ERROR = new ErrorCode(1001011018, "reward.redeem.status.error");
ErrorCode REWARD_REDEEM_VERIFY_NO_PARAM = new ErrorCode(1001011018, "reward.redeem.verify.no.param");
ErrorCode REWARD_REDEEM_STATUS_ERROR = new ErrorCode(1001011019, "reward.redeem.status.error");
ErrorCode REWARD_REDEEM_VERIFY_NO_PARAM = new ErrorCode(1001011020, "reward.redeem.verify.no.param");
ErrorCode REWARD_REDEEM_BATCH_VERIFY_ERROR = new ErrorCode(1001011021, "reward.redeem.batch.verify.error");
ErrorCode REWARD_REDEEM_VERIFY_BACK_STATUS = new ErrorCode(1001011021, "reward.redeem.verify.back.status");
}
......@@ -26,7 +26,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Validated
@RestController
@Api(tags = "管理后台 - 礼品管理")
@Api(tags = "管理后台 - 兑换记录管理")
@RequestMapping("/reward/redeem")
public class RedeemRewardController {
......@@ -37,29 +37,41 @@ public class RedeemRewardController {
private RewardRedeemService rewardRedeemService;
@PostMapping("record/page")
@ApiOperation("兑换记录列表")
@ApiOperation("列表")
public CommonResult<PageResult<RewardRedeemPageRespVO>> pageInfo(@Valid @RequestBody RewardRedeemPageReqVO reqVO) {
return success(rewardRedeemService.pageInfo(reqVO));
}
@PostMapping("record/detail")
@ApiOperation("兑换记录详情")
@ApiOperation("详情")
public CommonResult<RewardRedeemPageRespVO> detail(@Valid @RequestBody RewardRedeemBaseVO request) {
return success(rewardRedeemService.detail(request.getId()));
}
@PostMapping("record/update")
@ApiOperation("兑换记录更新")
public CommonResult<Boolean> update(@Valid @RequestBody RewardRedeemUpdateVO request) {
@ApiOperation("更新")
public CommonResult<Boolean> update(@Valid @RequestBody RewardRedeemUpdateReqVO request) {
return success(rewardRedeemService.updateRecord(request));
}
@PostMapping("record/verify")
@ApiOperation("兑换记录核销")
public CommonResult<Boolean> verify(@Valid @RequestBody RewardRedeemVerifyVO request) {
@ApiOperation("核销")
public CommonResult<Boolean> verify(@Valid @RequestBody RewardRedeemVerifyReqVO request) {
return success(rewardRedeemService.verify(request));
}
@PostMapping("record/batch/verify")
@ApiOperation("批量核销")
public CommonResult<Boolean> batchVerify(@Valid @RequestBody RewardRedeemBatchVerifyReqVO request) {
return success(rewardRedeemService.batchVerify(request));
}
@PostMapping("record/verify-back")
@ApiOperation("核销回退")
public CommonResult<Boolean> verifyBack(@Valid @RequestBody List<Long> redeemIds) {
return success(rewardRedeemService.verifyBack(redeemIds));
}
@PostMapping("/single")
@ApiOperation("兑换礼品")
......
package cn.iocoder.yudao.module.reward.dto;
import lombok.Builder;
import lombok.Data;
import java.util.Date;
@Data
@Builder
public class RewardRedeemVerifyDTO {
private Long id;
private Integer status;
private Integer redeemType;
private Integer courierCompany;
/**
* 收件人地址
*/
private String recipientAddress;
/**
* 快递单号
*/
private String expressNo;
/**
* 快递日期
*/
private Date expressDate;
/**
* 快递寄出人
*/
private String expressSender;
}
......@@ -3,10 +3,9 @@ package cn.iocoder.yudao.module.reward.service.redeem;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.service.IService;
import cn.iocoder.yudao.module.reward.dal.dataobject.redeem.RewardRedeemDO;
import cn.iocoder.yudao.module.reward.vo.reward.RewardRedeemPageReqVO;
import cn.iocoder.yudao.module.reward.vo.reward.RewardRedeemPageRespVO;
import cn.iocoder.yudao.module.reward.vo.reward.RewardRedeemUpdateVO;
import cn.iocoder.yudao.module.reward.vo.reward.RewardRedeemVerifyVO;
import cn.iocoder.yudao.module.reward.vo.reward.*;
import java.util.List;
/**
* 礼品兑换 Service 接口
......@@ -19,7 +18,11 @@ public interface RewardRedeemService extends IService<RewardRedeemDO> {
RewardRedeemPageRespVO detail(Long id);
Boolean updateRecord(RewardRedeemUpdateVO request);
Boolean updateRecord(RewardRedeemUpdateReqVO request);
Boolean verify(RewardRedeemVerifyReqVO request);
Boolean batchVerify(RewardRedeemBatchVerifyReqVO request);
Boolean verify(RewardRedeemVerifyVO request);
Boolean verifyBack(List<Long> redeemIds);
}
package cn.iocoder.yudao.module.reward.vo.reward;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;
@Data
public class RewardRedeemBatchVerifyReqVO {
@NotNull(message = "ids is not null")
@ApiModelProperty(value = "id")
private List<Long> ids;
@ApiModelProperty(value = "核销人")
@NotNull(message = "verifyUser is not null")
private String verifyUser;
/**
* 核销时间
*/
@NotNull(message = "verify time is not null")
@ApiModelProperty(value = "核销时间")
private Date verifyTime;
}
......@@ -8,7 +8,7 @@ import java.math.BigDecimal;
import java.util.Date;
@Data
public class RewardRedeemUpdateVO {
public class RewardRedeemUpdateReqVO {
@NotNull(message = "id is not null")
@ApiModelProperty(value = "id")
private Long id;
......
......@@ -7,7 +7,7 @@ import javax.validation.constraints.NotNull;
import java.util.Date;
@Data
public class RewardRedeemVerifyVO {
public class RewardRedeemVerifyReqVO {
@NotNull(message = "id is not null")
@ApiModelProperty(value = "id")
private Long id;
......
......@@ -1014,3 +1014,5 @@ get.lock.failed = The service is busy, please try again later
reward.redeem.not.exist = reward redeem record does not exist
reward.redeem.status.error = reward redeem record that is redeeming can edit or verify
reward.redeem.verify.no.param = In addition to collect at home, the delivery company/delivery number/delivery time/delivery sender/recipient address must be filled in
reward.redeem.batch.verify.error = reward redeem record verify failed, please check record data : {}
reward.redeem.verify.back.status = record status must be redeemed
\ No newline at end of file
......@@ -1018,3 +1018,5 @@ get.lock.failed = \u670D\u52A1\u7E41\u5FD9\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5
reward.redeem.not.exist = \u793C\u54C1\u5151\u6362\u8BB0\u5F55\u4E0D\u5B58\u5728
reward.redeem.status.error = \u53EA\u6709\u5151\u6362\u4E2D\u72B6\u6001\u7684\u8BB0\u5F55\u624D\u5141\u8BB8\u7F16\u8F91\u6216\u6838\u9500
reward.redeem.verify.no.param = \u9664\u4E0A\u95E8\u9886\u53D6\u5916\uFF0C\u5FEB\u9012\u516C\u53F8/\u5FEB\u9012\u5355\u53F7/\u5FEB\u9012\u65F6\u95F4/\u5FEB\u9012\u53D1\u9001\u4EBA/\u6536\u4EF6\u4EBA\u5730\u5740\uFF0C\u5FC5\u987B\u586B\u5199
reward.redeem.batch.verify.error = \u793C\u54C1\u8BB0\u5F55\u6279\u91CF\u6838\u9500\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u6570\u636E\u662F\u5426\u6B63\u786E:{}
reward.redeem.verify.back.status = \u56DE\u9000\u8BB0\u5F55\u72B6\u6001\u5FC5\u987B\u4E3A\u5DF2\u5151\u6362
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment