分销修改
This commit is contained in:
@@ -40,78 +40,78 @@ public class DistributionController {
|
||||
@Resource
|
||||
private AppWxServiceImpl appWxService;
|
||||
|
||||
/**
|
||||
* 配置信息详情
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "distribution:detail", name = "分销配置")
|
||||
@GetMapping
|
||||
public CzgResult<MkDistributionConfigVO> detail() {
|
||||
return CzgResult.success(configService.detail(StpKit.USER.getShopId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置信息修改
|
||||
*
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "distribution:edit", name = "分销修改")
|
||||
@SaCheckMainShop
|
||||
@PutMapping
|
||||
public CzgResult<Boolean> edit( @RequestBody MkDistributionConfigDTO dto) {
|
||||
return CzgResult.success(configService.edit(StpKit.USER.getShopId(), dto));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 现金充值
|
||||
* @param payParam 充值信息
|
||||
* @return 是否成功
|
||||
*/
|
||||
@PostMapping("/cashPay")
|
||||
public CzgResult<Boolean> cashPayOrder(@Validated @RequestBody MkDistributionPayDTO payParam) {
|
||||
AssertUtil.isNull(payParam.getShopId(), "店铺id不能为空");
|
||||
AssertUtil.isNull(payParam.getAmount(), "充值金额不能为空");
|
||||
AssertUtil.isTrue(payParam.getAmount().compareTo(BigDecimal.ZERO) == 0, "金额不为0");
|
||||
return CzgResult.success(distributionUserService.cashPayOrder(StpKit.USER.getLoginIdAsLong(), payParam));
|
||||
}
|
||||
|
||||
/**
|
||||
* 金额记录
|
||||
* @param type manual_recharge充值 self_recharge自助充值 refund退款 manual_sub手动扣减 sub统扣减
|
||||
* @param key 搜索
|
||||
*/
|
||||
@GetMapping("/flow")
|
||||
public CzgResult<Map<String, Object>> flow(@RequestParam(required = false) Long shopId, @RequestParam(required = false) String type, @RequestParam(required = false) String key) {
|
||||
return CzgResult.success(distributionAmountFlowService.pageInfo(StpKit.USER.isAdmin() ? shopId : StpKit.USER.getShopId(), type, key));
|
||||
}
|
||||
|
||||
/**
|
||||
* 开通记录
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param key 用户id昵称
|
||||
*/
|
||||
@GetMapping("openFlow")
|
||||
public CzgResult<Map<String, Object>> openFlow(@RequestParam(required = false) String startTime, @RequestParam(required = false) String endTime, @RequestParam(required = false) String key) {
|
||||
return CzgResult.success(distributionAmountFlowService.openPageInfo(StpKit.USER.getShopId(),
|
||||
StrUtil.isNotBlank(startTime) ? DateUtil.parseLocalDateTime(startTime) : null, StrUtil.isNotBlank(endTime) ? DateUtil.parseLocalDateTime(endTime) : null, key));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分销明细
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param key 用户id昵称
|
||||
* @param status pending待入账 success已入账
|
||||
*/
|
||||
@GetMapping("distributionFlow")
|
||||
public CzgResult<Map<String, Object>> distributionFlow(@RequestParam(required = false) String startTime, @RequestParam(required = false) String endTime,
|
||||
@RequestParam(required = false) String key, @RequestParam(required = false) String status,
|
||||
@RequestParam(required = false) Long id) {
|
||||
return CzgResult.success(distributionFlowService.pageInfo(StpKit.USER.getShopId(),
|
||||
StrUtil.isNotBlank(startTime) ? DateUtil.parseLocalDateTime(startTime) : null, StrUtil.isNotBlank(endTime) ? DateUtil.parseLocalDateTime(endTime) : null, key, status, id));
|
||||
}
|
||||
// /**
|
||||
// * 配置信息详情
|
||||
// */
|
||||
// @SaAdminCheckPermission(value = "distribution:detail", name = "分销配置")
|
||||
// @GetMapping
|
||||
// public CzgResult<MkDistributionConfigVO> detail() {
|
||||
// return CzgResult.success(configService.detail(StpKit.USER.getShopId()));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 配置信息修改
|
||||
// *
|
||||
// * @return 是否成功
|
||||
// */
|
||||
// @SaAdminCheckPermission(value = "distribution:edit", name = "分销修改")
|
||||
// @SaCheckMainShop
|
||||
// @PutMapping
|
||||
// public CzgResult<Boolean> edit( @RequestBody MkDistributionConfigDTO dto) {
|
||||
// return CzgResult.success(configService.edit(StpKit.USER.getShopId(), dto));
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 现金充值
|
||||
// * @param payParam 充值信息
|
||||
// * @return 是否成功
|
||||
// */
|
||||
// @PostMapping("/cashPay")
|
||||
// public CzgResult<Boolean> cashPayOrder(@Validated @RequestBody MkDistributionPayDTO payParam) {
|
||||
// AssertUtil.isNull(payParam.getShopId(), "店铺id不能为空");
|
||||
// AssertUtil.isNull(payParam.getAmount(), "充值金额不能为空");
|
||||
// AssertUtil.isTrue(payParam.getAmount().compareTo(BigDecimal.ZERO) == 0, "金额不为0");
|
||||
// return CzgResult.success(distributionUserService.cashPayOrder(StpKit.USER.getLoginIdAsLong(), payParam));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 金额记录
|
||||
// * @param type manual_recharge充值 self_recharge自助充值 refund退款 manual_sub手动扣减 sub统扣减
|
||||
// * @param key 搜索
|
||||
// */
|
||||
// @GetMapping("/flow")
|
||||
// public CzgResult<Map<String, Object>> flow(@RequestParam(required = false) Long shopId, @RequestParam(required = false) String type, @RequestParam(required = false) String key) {
|
||||
// return CzgResult.success(distributionAmountFlowService.pageInfo(StpKit.USER.isAdmin() ? shopId : StpKit.USER.getShopId(), type, key));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 开通记录
|
||||
// * @param startTime 开始时间
|
||||
// * @param endTime 结束时间
|
||||
// * @param key 用户id昵称
|
||||
// */
|
||||
// @GetMapping("openFlow")
|
||||
// public CzgResult<Map<String, Object>> openFlow(@RequestParam(required = false) String startTime, @RequestParam(required = false) String endTime, @RequestParam(required = false) String key) {
|
||||
// return CzgResult.success(distributionAmountFlowService.openPageInfo(StpKit.USER.getShopId(),
|
||||
// StrUtil.isNotBlank(startTime) ? DateUtil.parseLocalDateTime(startTime) : null, StrUtil.isNotBlank(endTime) ? DateUtil.parseLocalDateTime(endTime) : null, key));
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 分销明细
|
||||
// * @param startTime 开始时间
|
||||
// * @param endTime 结束时间
|
||||
// * @param key 用户id昵称
|
||||
// * @param status pending待入账 success已入账
|
||||
// */
|
||||
// @GetMapping("distributionFlow")
|
||||
// public CzgResult<Map<String, Object>> distributionFlow(@RequestParam(required = false) String startTime, @RequestParam(required = false) String endTime,
|
||||
// @RequestParam(required = false) String key, @RequestParam(required = false) String status,
|
||||
// @RequestParam(required = false) Long id) {
|
||||
// return CzgResult.success(distributionFlowService.pageInfo(StpKit.USER.getShopId(),
|
||||
// StrUtil.isNotBlank(startTime) ? DateUtil.parseLocalDateTime(startTime) : null, StrUtil.isNotBlank(endTime) ? DateUtil.parseLocalDateTime(endTime) : null, key, status, id));
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user