feat: 全局数据隔离 + 响应结构统一 + 交接文档
1. 新增SysOrgService业务数据隔离工具方法(applyBusinessOrgScope/getUserOrgMpath) 2. 10个Controller接入组织数据隔离(设备/订单/退款/统计/定价/支付配置/激活码/用户) 3. 统一响应结构:写操作从R.ok()改为R.dataSuccess(data) 4. 修复5处data.data双层嵌套 5. 修复SysUserController.info()不一致 6. 修复循环依赖(@Lazy) 7. 新增交接文档HANDOVER.md
This commit is contained in:
@@ -5,6 +5,7 @@ import io.as.common.exception.ASException;
|
||||
import io.as.common.utils.R;
|
||||
import io.as.modules.daycard.entity.DayCardActivationCodeEntity;
|
||||
import io.as.modules.daycard.service.DayCardActivationCodeService;
|
||||
import io.as.modules.sys.controller.AbstractController;
|
||||
import io.as.modules.sys.entity.SysOrgEntity;
|
||||
import io.as.modules.sys.service.SysOrgService;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -27,7 +28,7 @@ import java.util.Map;
|
||||
@Api(tags = "天卡设备激活码")
|
||||
@RestController
|
||||
@RequestMapping("/manage/daycard/activation-code")
|
||||
public class DayCardActivationCodeController {
|
||||
public class DayCardActivationCodeController extends AbstractController {
|
||||
|
||||
@Autowired
|
||||
private DayCardActivationCodeService dayCardActivationCodeService;
|
||||
@@ -41,6 +42,9 @@ public class DayCardActivationCodeController {
|
||||
@ApiOperation("按门店查询激活码列表")
|
||||
@GetMapping("/list/{storeOrgId}")
|
||||
public R listByStore(@PathVariable("storeOrgId") Long storeOrgId) {
|
||||
if (!sysOrgService.isOrgInScope(storeOrgId, getUserId())) {
|
||||
throw new ASException("无权限操作该门店的数据");
|
||||
}
|
||||
List<DayCardActivationCodeEntity> list = dayCardActivationCodeService.listByStoreOrgId(storeOrgId);
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
for (DayCardActivationCodeEntity entity : list) {
|
||||
@@ -61,6 +65,9 @@ public class DayCardActivationCodeController {
|
||||
if (request.getStoreOrgId() == null) {
|
||||
throw new ASException("门店组织ID不能为空");
|
||||
}
|
||||
if (!sysOrgService.isOrgInScope(request.getStoreOrgId(), getUserId())) {
|
||||
throw new ASException("无权限操作该门店的数据");
|
||||
}
|
||||
// 校验门店存在
|
||||
SysOrgEntity storeOrg = sysOrgService.getById(request.getStoreOrgId());
|
||||
if (storeOrg == null) {
|
||||
@@ -70,9 +77,7 @@ public class DayCardActivationCodeController {
|
||||
Long channelOrgId = resolveChannelOrgId(storeOrg);
|
||||
DayCardActivationCodeEntity entity = dayCardActivationCodeService.generateForStore(
|
||||
request.getStoreOrgId(), channelOrgId, request.getRemark());
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("data", toMap(entity));
|
||||
return R.dataSuccess(data);
|
||||
return R.dataSuccess(toMap(entity));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -82,12 +87,17 @@ public class DayCardActivationCodeController {
|
||||
@AuditAction(value = "ACTCODE_REGENERATE", description = "重新生成激活码")
|
||||
@PostMapping("/{id}/regenerate")
|
||||
public R regenerate(@PathVariable("id") Long id) {
|
||||
DayCardActivationCodeEntity entity = dayCardActivationCodeService.getById(id);
|
||||
if (entity == null) {
|
||||
throw new ASException("激活码不存在");
|
||||
}
|
||||
if (!sysOrgService.isOrgInScope(entity.getStoreOrgId(), getUserId())) {
|
||||
throw new ASException("无权限操作该门店的数据");
|
||||
}
|
||||
String newCode = dayCardActivationCodeService.regenerateCode(id);
|
||||
Map<String, Object> item = new HashMap<>();
|
||||
item.put("code", newCode);
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("data", item);
|
||||
return R.dataSuccess(data);
|
||||
return R.dataSuccess(item);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,8 +107,15 @@ public class DayCardActivationCodeController {
|
||||
@AuditAction(value = "ACTCODE_UPDATE_STATUS", description = "修改激活码状态")
|
||||
@PutMapping("/{id}/status")
|
||||
public R updateStatus(@PathVariable("id") Long id, @RequestBody UpdateStatusRequest request) {
|
||||
DayCardActivationCodeEntity entity = dayCardActivationCodeService.getById(id);
|
||||
if (entity == null) {
|
||||
throw new ASException("激活码不存在");
|
||||
}
|
||||
if (!sysOrgService.isOrgInScope(entity.getStoreOrgId(), getUserId())) {
|
||||
throw new ASException("无权限操作该门店的数据");
|
||||
}
|
||||
dayCardActivationCodeService.updateStatus(id, request.getStatus());
|
||||
return R.ok();
|
||||
return R.dataSuccess(new HashMap<>());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -108,8 +125,15 @@ public class DayCardActivationCodeController {
|
||||
@AuditAction(value = "ACTCODE_DELETE", description = "删除激活码")
|
||||
@DeleteMapping("/{id}")
|
||||
public R delete(@PathVariable("id") Long id) {
|
||||
DayCardActivationCodeEntity entity = dayCardActivationCodeService.getById(id);
|
||||
if (entity == null) {
|
||||
throw new ASException("激活码不存在");
|
||||
}
|
||||
if (!sysOrgService.isOrgInScope(entity.getStoreOrgId(), getUserId())) {
|
||||
throw new ASException("无权限操作该门店的数据");
|
||||
}
|
||||
dayCardActivationCodeService.delete(id);
|
||||
return R.ok();
|
||||
return R.dataSuccess(new HashMap<>());
|
||||
}
|
||||
|
||||
// ==================== 内部方法 ====================
|
||||
|
||||
@@ -9,6 +9,10 @@ import io.as.modules.daycard.entity.DayCardPoolEntity;
|
||||
import io.as.modules.daycard.service.DayCardOrderService;
|
||||
import io.as.modules.daycard.service.DayCardPoolService;
|
||||
import io.as.modules.daycard.vo.DayCardPoolStatsVo;
|
||||
import io.as.modules.device.entity.DeviceEntity;
|
||||
import io.as.modules.device.service.DeviceService;
|
||||
import io.as.modules.sys.controller.AbstractController;
|
||||
import io.as.modules.sys.service.SysOrgService;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -24,7 +28,7 @@ import java.util.Map;
|
||||
@RestController
|
||||
@RequestMapping("/manage/daycard")
|
||||
@RequiresAuthentication
|
||||
public class DayCardManageController {
|
||||
public class DayCardManageController extends AbstractController {
|
||||
|
||||
@Autowired
|
||||
private DayCardPoolService dayCardPoolService;
|
||||
@@ -32,10 +36,17 @@ public class DayCardManageController {
|
||||
@Autowired
|
||||
private DayCardOrderService dayCardOrderService;
|
||||
|
||||
@Autowired
|
||||
private SysOrgService sysOrgService;
|
||||
|
||||
@Autowired
|
||||
private DeviceService deviceService;
|
||||
|
||||
// ===================== 天卡池 =====================
|
||||
|
||||
/**
|
||||
* 天卡池列表
|
||||
* <p>天卡池为平台级资源,不按组织隔离</p>
|
||||
*/
|
||||
@GetMapping("/pool/list")
|
||||
public R poolList(@RequestParam Map<String, Object> params) {
|
||||
@@ -94,8 +105,7 @@ public class DayCardManageController {
|
||||
*/
|
||||
@GetMapping("/order/list")
|
||||
public R orderList(@RequestParam Map<String, Object> params) {
|
||||
Long partnerId = parsePartnerId(params);
|
||||
PageUtils page = dayCardOrderService.queryPage(params, partnerId);
|
||||
PageUtils page = dayCardOrderService.queryPage(params, getUserId());
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("page", page);
|
||||
return R.dataSuccess(data);
|
||||
@@ -108,6 +118,10 @@ public class DayCardManageController {
|
||||
*/
|
||||
@GetMapping("/benefits/{deviceId}")
|
||||
public R deviceBenefits(@PathVariable Long deviceId) {
|
||||
DeviceEntity device = deviceService.getById(deviceId);
|
||||
if (device != null && !sysOrgService.isOrgInScope(device.getStoreOrgId(), getUserId())) {
|
||||
return R.error(403, "无权限查看该设备");
|
||||
}
|
||||
DayCardPoolEntity pool = dayCardOrderService.getDeviceBenefits(deviceId);
|
||||
Map<String, Object> item = new HashMap<>();
|
||||
if (pool != null) {
|
||||
@@ -118,9 +132,7 @@ public class DayCardManageController {
|
||||
} else {
|
||||
item.put("hasBenefits", false);
|
||||
}
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("data", item);
|
||||
return R.dataSuccess(data);
|
||||
return R.dataSuccess(item);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -130,8 +142,14 @@ public class DayCardManageController {
|
||||
@AuditAction(value = "DAYCARD_DEVICE_UNBIND", description = "解绑设备天卡权益")
|
||||
@PostMapping("/device/unbind")
|
||||
public R unbindDevice(@RequestParam Long deviceId) {
|
||||
DeviceEntity device = deviceService.getById(deviceId);
|
||||
if (device != null && !sysOrgService.isOrgInScope(device.getStoreOrgId(), getUserId())) {
|
||||
return R.error(403, "无权限操作该设备");
|
||||
}
|
||||
dayCardOrderService.unbindDevice(deviceId);
|
||||
return R.ok("设备解绑成功");
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("message", "设备解绑成功");
|
||||
return R.dataSuccess(data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -141,8 +159,14 @@ public class DayCardManageController {
|
||||
@AuditAction(value = "DAYCARD_DEVICE_UNBIND_ORG", description = "设备组织解绑")
|
||||
@PostMapping("/device/unbind-org")
|
||||
public R unbindDeviceOrg(@RequestParam Long deviceId) {
|
||||
DeviceEntity device = deviceService.getById(deviceId);
|
||||
if (device != null && !sysOrgService.isOrgInScope(device.getStoreOrgId(), getUserId())) {
|
||||
return R.error(403, "无权限操作该设备");
|
||||
}
|
||||
dayCardOrderService.unbindDeviceOrg(deviceId);
|
||||
return R.ok("设备组织解绑成功");
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("message", "设备组织解绑成功");
|
||||
return R.dataSuccess(data);
|
||||
}
|
||||
|
||||
// ===================== 内部方法 =====================
|
||||
|
||||
@@ -5,6 +5,7 @@ import io.as.common.utils.PageUtils;
|
||||
import io.as.common.utils.R;
|
||||
import io.as.modules.daycard.entity.DayCardOrderEntity;
|
||||
import io.as.modules.daycard.service.DayCardOrderService;
|
||||
import io.as.modules.sys.controller.AbstractController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -20,7 +21,7 @@ import java.util.Map;
|
||||
@Api(tags = "天卡订单")
|
||||
@RestController
|
||||
@RequestMapping("/manage/daycard")
|
||||
public class DayCardOrderController {
|
||||
public class DayCardOrderController extends AbstractController {
|
||||
|
||||
@Autowired
|
||||
private DayCardOrderService dayCardOrderService;
|
||||
@@ -31,8 +32,7 @@ public class DayCardOrderController {
|
||||
@ApiOperation("分页查询天卡订单")
|
||||
@GetMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params) {
|
||||
Long partnerId = parsePartnerId(params);
|
||||
PageUtils page = dayCardOrderService.queryPage(params, partnerId);
|
||||
PageUtils page = dayCardOrderService.queryPage(params, getUserId());
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("page", page);
|
||||
return R.dataSuccess(data);
|
||||
@@ -52,22 +52,4 @@ public class DayCardOrderController {
|
||||
data.put("order", order);
|
||||
return R.dataSuccess(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 从请求参数中解析 partnerId(兼容存量数据查询,新订单 partnerId 为 null)
|
||||
*/
|
||||
private Long parsePartnerId(Map<String, Object> params) {
|
||||
Object val = params.get("partnerId");
|
||||
if (val == null) {
|
||||
val = params.get("partner_id");
|
||||
}
|
||||
if (val == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return Long.parseLong(String.valueOf(val));
|
||||
} catch (NumberFormatException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import io.as.common.utils.R;
|
||||
import io.as.modules.daycard.constants.DayCardConstants;
|
||||
import io.as.modules.daycard.entity.DayCardPriceConfigEntity;
|
||||
import io.as.modules.daycard.service.DayCardPriceConfigService;
|
||||
import io.as.modules.sys.controller.AbstractController;
|
||||
import io.as.modules.sys.service.SysOrgService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -24,18 +26,21 @@ import java.util.Map;
|
||||
@Api(tags = "天卡定价策略管理")
|
||||
@RestController
|
||||
@RequestMapping("/manage/price")
|
||||
public class DayCardPriceConfigController {
|
||||
public class DayCardPriceConfigController extends AbstractController {
|
||||
|
||||
@Autowired
|
||||
private DayCardPriceConfigService dayCardPriceConfigService;
|
||||
|
||||
@Autowired
|
||||
private SysOrgService sysOrgService;
|
||||
|
||||
/**
|
||||
* 分页查询定价策略(支持 partnerId/status 筛选)
|
||||
*/
|
||||
@ApiOperation("分页查询定价策略")
|
||||
@GetMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params) {
|
||||
PageUtils page = dayCardPriceConfigService.queryPage(params);
|
||||
PageUtils page = dayCardPriceConfigService.queryPage(params, getUserId());
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("page", page);
|
||||
return R.dataSuccess(data);
|
||||
@@ -51,6 +56,7 @@ public class DayCardPriceConfigController {
|
||||
if (config == null) {
|
||||
throw new ASException("定价策略不存在");
|
||||
}
|
||||
checkPriceConfigOrgScope(config);
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("config", config);
|
||||
return R.dataSuccess(data);
|
||||
@@ -80,6 +86,7 @@ public class DayCardPriceConfigController {
|
||||
@AuditAction(value = "PRICE_SAVE", description = "新增定价策略")
|
||||
@PostMapping("/save")
|
||||
public R save(@RequestBody DayCardPriceConfigEntity config) {
|
||||
checkPriceConfigOrgScope(config);
|
||||
Date now = new Date();
|
||||
config.setDeleteFlag(DayCardConstants.DELETE_FLAG_UNDEL);
|
||||
config.setCreatedAt(now);
|
||||
@@ -88,7 +95,9 @@ public class DayCardPriceConfigController {
|
||||
config.setStatus("ACTIVE");
|
||||
}
|
||||
dayCardPriceConfigService.save(config);
|
||||
return R.ok();
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("id", config.getId());
|
||||
return R.dataSuccess(data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -101,9 +110,14 @@ public class DayCardPriceConfigController {
|
||||
if (config.getId() == null) {
|
||||
throw new ASException("id不能为空");
|
||||
}
|
||||
DayCardPriceConfigEntity existing = dayCardPriceConfigService.getById(config.getId());
|
||||
if (existing == null) {
|
||||
throw new ASException("定价策略不存在");
|
||||
}
|
||||
checkPriceConfigOrgScope(existing);
|
||||
config.setUpdatedAt(new Date());
|
||||
dayCardPriceConfigService.updateById(config);
|
||||
return R.ok();
|
||||
return R.dataSuccess(new HashMap<>());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -118,12 +132,28 @@ public class DayCardPriceConfigController {
|
||||
}
|
||||
List<DayCardPriceConfigEntity> list = dayCardPriceConfigService.listByIds(
|
||||
Arrays.asList(ids));
|
||||
for (DayCardPriceConfigEntity config : list) {
|
||||
checkPriceConfigOrgScope(config);
|
||||
}
|
||||
Date now = new Date();
|
||||
for (DayCardPriceConfigEntity config : list) {
|
||||
config.setDeleteFlag(DayCardConstants.DELETE_FLAG_DEL);
|
||||
config.setUpdatedAt(now);
|
||||
}
|
||||
dayCardPriceConfigService.updateBatchById(list);
|
||||
return R.ok();
|
||||
return R.dataSuccess(new HashMap<>());
|
||||
}
|
||||
|
||||
private void checkPriceConfigOrgScope(DayCardPriceConfigEntity config) {
|
||||
Long orgId = config.getStoreOrgId() != null ? config.getStoreOrgId() : config.getChannelOrgId();
|
||||
if (orgId != null) {
|
||||
if (!sysOrgService.isOrgInScope(orgId, getUserId())) {
|
||||
throw new ASException("无权限操作该组织的数据");
|
||||
}
|
||||
} else {
|
||||
if (sysOrgService.getUserOrgMpath(getUserId()) != null) {
|
||||
throw new ASException("无权限操作平台默认配置");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,12 @@ import io.as.common.annotation.AuditAction;
|
||||
import io.as.common.exception.ASException;
|
||||
import io.as.common.utils.PageUtils;
|
||||
import io.as.common.utils.R;
|
||||
import io.as.modules.daycard.entity.DayCardOrderEntity;
|
||||
import io.as.modules.daycard.entity.DayCardRefundEntity;
|
||||
import io.as.modules.daycard.service.DayCardOrderService;
|
||||
import io.as.modules.daycard.service.DayCardRefundService;
|
||||
import io.as.modules.sys.controller.AbstractController;
|
||||
import io.as.modules.sys.service.SysOrgService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@@ -21,18 +25,24 @@ import java.util.Map;
|
||||
@Api(tags = "天卡退款管理")
|
||||
@RestController
|
||||
@RequestMapping("/manage/refund")
|
||||
public class DayCardRefundController {
|
||||
public class DayCardRefundController extends AbstractController {
|
||||
|
||||
@Autowired
|
||||
private DayCardRefundService dayCardRefundService;
|
||||
|
||||
@Autowired
|
||||
private SysOrgService sysOrgService;
|
||||
|
||||
@Autowired
|
||||
private DayCardOrderService dayCardOrderService;
|
||||
|
||||
/**
|
||||
* 分页查询退款记录
|
||||
*/
|
||||
@ApiOperation("分页查询退款记录")
|
||||
@GetMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params) {
|
||||
PageUtils page = dayCardRefundService.queryPage(params);
|
||||
PageUtils page = dayCardRefundService.queryPage(params, getUserId());
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("page", page);
|
||||
return R.dataSuccess(data);
|
||||
@@ -48,6 +58,12 @@ public class DayCardRefundController {
|
||||
if (refund == null) {
|
||||
throw new ASException("退款记录不存在");
|
||||
}
|
||||
// 组织数据隔离:校验关联订单是否在操作人数据范围内
|
||||
DayCardOrderEntity order = dayCardOrderService.getByOrderNo(refund.getOrderNo());
|
||||
if (order != null && order.getStoreOrgId() != null
|
||||
&& !sysOrgService.isOrgInScope(order.getStoreOrgId(), getUserId())) {
|
||||
throw new ASException("无权限查看该退款记录");
|
||||
}
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("refund", refund);
|
||||
return R.dataSuccess(data);
|
||||
@@ -66,6 +82,15 @@ public class DayCardRefundController {
|
||||
if (StringUtils.isBlank(orderNo)) {
|
||||
throw new ASException("orderNo不能为空");
|
||||
}
|
||||
// 组织数据隔离:校验订单是否在操作人数据范围内
|
||||
DayCardOrderEntity order = dayCardOrderService.getByOrderNo(orderNo);
|
||||
if (order == null) {
|
||||
throw new ASException("订单不存在: " + orderNo);
|
||||
}
|
||||
if (order.getStoreOrgId() != null
|
||||
&& !sysOrgService.isOrgInScope(order.getStoreOrgId(), getUserId())) {
|
||||
throw new ASException("无权限操作该订单的退款");
|
||||
}
|
||||
String reason = params.get("reason");
|
||||
DayCardRefundEntity refund = dayCardRefundService.refund(orderNo, reason);
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
|
||||
@@ -96,7 +96,7 @@ public class DayCardSettleController {
|
||||
throw new ASException("id不能为空");
|
||||
}
|
||||
dayCardSettleRuleService.update(rule);
|
||||
return R.ok();
|
||||
return R.dataSuccess(new HashMap<>());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -106,7 +106,7 @@ public class DayCardSettleController {
|
||||
@PostMapping("/rule/delete")
|
||||
public R ruleDelete(@RequestBody Long[] ids) {
|
||||
dayCardSettleRuleService.delete(ids);
|
||||
return R.ok();
|
||||
return R.dataSuccess(new HashMap<>());
|
||||
}
|
||||
|
||||
// ==================== 分账记录 ====================
|
||||
@@ -185,8 +185,6 @@ public class DayCardSettleController {
|
||||
throw new ASException("totalAmount必须大于0");
|
||||
}
|
||||
Map<String, Object> result = profitCalcService.calculate(partnerId, channelOrgId, storeOrgId, totalAmount);
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("data", result);
|
||||
return R.dataSuccess(data);
|
||||
return R.dataSuccess(result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ public class OrgSettlementAccountController {
|
||||
@PostMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids) {
|
||||
orgSettlementAccountService.delete(ids);
|
||||
return R.ok();
|
||||
return R.dataSuccess(new HashMap<>());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,6 +93,6 @@ public class OrgSettlementAccountController {
|
||||
@PostMapping("/sync/{id}")
|
||||
public R sync(@PathVariable("id") Long id) {
|
||||
orgSettlementAccountService.syncToWechat(id);
|
||||
return R.ok();
|
||||
return R.dataSuccess(new HashMap<>());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ public class ProfitSharingRuleController {
|
||||
throw new ASException("id不能为空");
|
||||
}
|
||||
profitSharingRuleService.updateRule(rule);
|
||||
return R.ok();
|
||||
return R.dataSuccess(new HashMap<>());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -106,7 +106,7 @@ public class ProfitSharingRuleController {
|
||||
public R delete(@RequestBody Map<String, Object> body) {
|
||||
Long id = Long.parseLong(body.get("id").toString());
|
||||
profitSharingRuleService.delete(id);
|
||||
return R.ok();
|
||||
return R.dataSuccess(new HashMap<>());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -245,8 +245,6 @@ public class ProfitSharingRuleController {
|
||||
result.put("details", details);
|
||||
result.put("nonPlatformTotalRatio", nonPlatformTotalRatio);
|
||||
result.put("warning", warning);
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("data", result);
|
||||
return R.dataSuccess(data);
|
||||
return R.dataSuccess(result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user