|
|
@ -254,51 +254,77 @@ public class ShopController { |
|
|
|
|
|
|
|
|
@RequestMapping(value = "/getShopRebateBalance", method = RequestMethod.POST) |
|
|
@RequestMapping(value = "/getShopRebateBalance", method = RequestMethod.POST) |
|
|
@ApiOperation("获取返佣余额及累计返佣") |
|
|
@ApiOperation("获取返佣余额及累计返佣") |
|
|
public Result getShopRebateBalance(){ |
|
|
public Result getShopRebateBalance() { |
|
|
final Map<String,String> shopRebateBalance = shopService.getShopRebateBalance(); |
|
|
final Map<String, String> shopRebateBalance = shopService.getShopRebateBalance(); |
|
|
return ResultUtil.data(shopRebateBalance); |
|
|
return ResultUtil.data(shopRebateBalance); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 根据店铺id获取店铺信息 |
|
|
* 根据店铺id获取店铺信息 |
|
|
* @author 王富康 |
|
|
* |
|
|
* @date 2024/7/27 |
|
|
|
|
|
* @param id |
|
|
* @param id |
|
|
* @return Result |
|
|
* @return Result |
|
|
|
|
|
* @author 王富康 |
|
|
|
|
|
* @date 2024/7/27 |
|
|
*/ |
|
|
*/ |
|
|
@RequestMapping(value = "/getShopInfoById", method = RequestMethod.POST) |
|
|
@RequestMapping(value = "/getShopInfoById", method = RequestMethod.POST) |
|
|
@ApiOperation("根据店铺id获取店铺信息") |
|
|
@ApiOperation("根据店铺id获取店铺信息") |
|
|
public Result getShopInfoById(String id){ |
|
|
public Result getShopInfoById(String id) { |
|
|
if(StringUtils.isEmpty(id)){ |
|
|
if (StringUtils.isEmpty(id)) { |
|
|
return ResultUtil.error("店铺id不能为空"); |
|
|
return ResultUtil.error("店铺id不能为空"); |
|
|
} |
|
|
} |
|
|
final Shop shop = shopService.findById(id); |
|
|
final Shop shop = shopService.findById(id); |
|
|
return ResultUtil.data(shop); |
|
|
return ResultUtil.data(shop); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 更新店铺图标及备注 |
|
|
* 更新店铺图标及备注 |
|
|
* @author 王富康 |
|
|
* |
|
|
* @date 2024/7/27 |
|
|
|
|
|
* @param shop |
|
|
* @param shop |
|
|
* @return Result |
|
|
* @return Result |
|
|
|
|
|
* @author 王富康 |
|
|
|
|
|
* @date 2024/7/27 |
|
|
*/ |
|
|
*/ |
|
|
@RequestMapping(value = "/updateShopIconAndRemark", method = RequestMethod.POST) |
|
|
@RequestMapping(value = "/updateShopIconAndRemark", method = RequestMethod.POST) |
|
|
@ApiOperation("更新店铺图标及备注") |
|
|
@ApiOperation("更新店铺图标及备注") |
|
|
public Result updateShopIconAndRemark(@RequestBody Shop shop) { |
|
|
public Result updateShopIconAndRemark(@RequestBody Shop shop) { |
|
|
final String id = shop.getId(); |
|
|
final String id = shop.getId(); |
|
|
if(StringUtils.isEmpty(id)){ |
|
|
if (StringUtils.isEmpty(id)) { |
|
|
return ResultUtil.error("店铺id不能为空"); |
|
|
return ResultUtil.error("店铺id不能为空"); |
|
|
} |
|
|
} |
|
|
final Shop oldShop = shopService.get(id); |
|
|
final Shop oldShop = shopService.get(id); |
|
|
// 20240803 不更新店铺图标,可更新店铺地址
|
|
|
// 20240803 不更新店铺图标,可更新店铺地址
|
|
|
if(shop.getShopAddress() != null){ |
|
|
if (shop.getShopAddress() != null) { |
|
|
oldShop.setShopAddress(shop.getShopAddress()); |
|
|
oldShop.setShopAddress(shop.getShopAddress()); |
|
|
} |
|
|
} |
|
|
if(shop.getRemark() != null){ |
|
|
if (shop.getRemark() != null) { |
|
|
oldShop.setRemark(shop.getRemark()); |
|
|
oldShop.setRemark(shop.getRemark()); |
|
|
} |
|
|
} |
|
|
shopService.update(oldShop); |
|
|
shopService.update(oldShop); |
|
|
return ResultUtil.success("更新成功"); |
|
|
return ResultUtil.success("更新成功"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 根据店铺id获取店铺shopIcon(二维码信息) |
|
|
|
|
|
* |
|
|
|
|
|
* @param id |
|
|
|
|
|
* @return Result |
|
|
|
|
|
* @author 王富康 |
|
|
|
|
|
* @date 2024/8/3 |
|
|
|
|
|
*/ |
|
|
|
|
|
@RequestMapping(value = "/getshopIconById", method = RequestMethod.POST) |
|
|
|
|
|
@ApiOperation("根据店铺id获取店铺shopIcon") |
|
|
|
|
|
public Result getshopIconById(String id) { |
|
|
|
|
|
if (StringUtils.isEmpty(id)) { |
|
|
|
|
|
return ResultUtil.error("店铺id不能为空"); |
|
|
|
|
|
} |
|
|
|
|
|
final Shop shop = shopService.findById(id); |
|
|
|
|
|
if (shop == null) { |
|
|
|
|
|
return ResultUtil.error("店铺不存在"); |
|
|
|
|
|
} |
|
|
|
|
|
if (StringUtils.isEmpty(shop.getShopIcon())) { |
|
|
|
|
|
return ResultUtil.error("店铺图标不存在"); |
|
|
|
|
|
} |
|
|
|
|
|
return ResultUtil.data(shop.getShopIcon()); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|