优化商品分类展示

This commit is contained in:
wushaochuan 2023-02-17 13:58:29 +08:00
parent aa58336d17
commit a94364d195
4 changed files with 13 additions and 9 deletions

View file

@ -44,8 +44,6 @@ public class DealerServiceImpl implements DealerService {
dealer.setDealerCode(UUID.randomUUID().toString().replace("-", ""));
}
CustomUserDetails userDetails = DetailsHelper.getUserDetails();
logger.info("获取当前用户==============》" + userDetails);
logger.info("获取当前用户租户ID==============》" + userDetails.getTenantId());
Long tenantId = userDetails.getTenantId();
dealer.setTenantId(tenantId);
return dealerRepository.insert(dealer) > 0;

View file

@ -135,6 +135,9 @@ public class ShopServiceImpl implements ShopService {
@Override
@ProcessLovValue
public List<ChannelSaleOrderVO> queryChannelOrderSaleReport(ChannelSaleOrderDTO dto) {
if (dto == null) {
log.info("ChannelSaleOrderDTO 为空");
}
List<ChannelSaleOrderVO> channelSaleOrderVOS = shopRepository.queryChannelOrderSaleReport(dto);
//调用订单中心获取订单金额等数据
if (CollectionUtils.isEmpty(channelSaleOrderVOS)) {

View file

@ -50,13 +50,13 @@ public class CategoryController extends BaseController {
return Results.success();
}
// @ApiOperation(value = "修改商品分类表")
// @Permission(level = ResourceLevel.ORGANIZATION)
// @PostMapping("/update")
// public ResponseEntity<Category> update(@RequestBody Category category) {
// categoryRepository.updateByPrimaryKeySelective(category);
// return Results.success(category);
// }
@ApiOperation(value = "修改商品分类表")
@Permission(level = ResourceLevel.ORGANIZATION)
@PostMapping("/update")
public ResponseEntity<Category> update(@RequestBody Category category) {
categoryRepository.updateByPrimaryKeySelective(category);
return Results.success(category);
}
@ApiOperation(value = "修改商品状态")
@Permission(level = ResourceLevel.ORGANIZATION, permissionLogin = true)
@PostMapping("/update/status")

View file

@ -277,6 +277,9 @@ public class SpuInstallServiceServiceImpl implements SpuInstallServiceService {
@Override
public Boolean update(SpuInstallServiceDTO spuInstallServiceDTO) {
if (spuInstallServiceDTO == null) {
throw new CommonException("spu为null请重新设置!");
}
if (!spuInstallServiceDTO.getIsAllStore() && CollUtil.isEmpty(spuInstallServiceDTO.getSpuStoreIds())) {
// 如果不是适用于所有店铺且店铺没有设置值返回错误
throw new CommonException("没有设置店铺!");