|
@@ -18,6 +18,7 @@ import com.github.pagehelper.PageInfo;
|
|
|
import com.txz.cif.web.bo.RechargeRecordBO;
|
|
|
import com.txz.cif.web.bo.WithdrawRecordBO;
|
|
|
import com.txz.cif.web.para.RecordParam;
|
|
|
+import com.txz.cif.web.para.ReviewParam;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -86,7 +87,37 @@ public class WithdrawRecordController {
|
|
|
|
|
|
}
|
|
|
|
|
|
- @PostMapping("/list")
|
|
|
+ @PostMapping("/review")
|
|
|
+ @ApiOperation(value = "审核",httpMethod = "POST")
|
|
|
+ public Result review(@RequestBody ReviewParam param) {
|
|
|
+ if (param == null){
|
|
|
+ return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
|
|
|
+ }
|
|
|
+ if (param.getId() == null){
|
|
|
+ return ResultGenerator.genFailResult(ResultCode.ID_IS_NULL);
|
|
|
+ }
|
|
|
+ if (param.getType() == null){
|
|
|
+ return ResultGenerator.genFailResult(ResultCode.TYPE_IS_NULL);
|
|
|
+ }
|
|
|
+ if (param.getType() == 2){
|
|
|
+ if (StrUtil.isNotBlank(param.getReview())){
|
|
|
+ return ResultGenerator.genFailResult(ResultCode.REVIEW_IS_NULL);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ WithdrawRecord w = withdrawRecordService.findById(param.getId());
|
|
|
+ if (w == null){
|
|
|
+ return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
|
|
|
+ }
|
|
|
+ if (w.getStatus() != 1){
|
|
|
+ return ResultGenerator.genFailResult(ResultCode.STATUS_IS_NULL);
|
|
|
+ }
|
|
|
+
|
|
|
+ withdrawRecordService.review(WithdrawRecord.builder().id(param.getId())
|
|
|
+ .review(param.getReview()).status(param.getType() == 1?2:3).build());
|
|
|
+ return ResultGenerator.genSuccessResult();
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/list")
|
|
|
@ApiOperation(value = "withdrawRecord获取列表",httpMethod = "POST")
|
|
|
public Result<List<WithdrawRecord>> list(@RequestBody RecordParam param) {
|
|
|
|