feat: 新增门店与商品的关系

This commit is contained in:
weizhiqiang 2024-09-18 14:59:37 +08:00
parent b02cbc1f32
commit 9d7ddb957a
12 changed files with 329 additions and 54 deletions

View file

@ -6,9 +6,12 @@ package com.skyeye.rest.shop.rest;
import com.skyeye.common.client.ClientConfiguration; import com.skyeye.common.client.ClientConfiguration;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import java.util.Map;
/** /**
* @ClassName: IShopStoreRest * @ClassName: IShopStoreRest
* @Description: 门店信息管理公共的一些操作 * @Description: 门店信息管理公共的一些操作
@ -28,4 +31,14 @@ public interface IShopStoreRest {
@PostMapping("/queryStoreByIds") @PostMapping("/queryStoreByIds")
String queryStoreByIds(@RequestParam("ids") String ids); String queryStoreByIds(@RequestParam("ids") String ids);
/**
* 获取门店列表信息
*
* @param params 查询参数
* shopAreaId门店所属区域id
* enebled是否启用
*/
@GetMapping("/queryStoreListByParams")
String queryStoreListByParams(Map<String, Object> params);
} }

View file

@ -6,6 +6,9 @@ package com.skyeye.rest.shop.service;
import com.skyeye.base.rest.service.IService; import com.skyeye.base.rest.service.IService;
import java.util.List;
import java.util.Map;
/** /**
* @ClassName: IShopStoreService * @ClassName: IShopStoreService
* @Description: 门店信息管理公共的一些操作 * @Description: 门店信息管理公共的一些操作
@ -16,4 +19,6 @@ import com.skyeye.base.rest.service.IService;
*/ */
public interface IShopStoreService extends IService { public interface IShopStoreService extends IService {
List<Map<String, Object>> queryStoreListByParams(String shopAreaId, Integer enabled);
} }

View file

@ -46,4 +46,11 @@ public class IShopStoreServiceImpl extends IServiceImpl implements IShopStoreSer
return String.format(Locale.ROOT, "%s:%s", CacheConstants.SHOP_STORE_CACHE_KEY, id); return String.format(Locale.ROOT, "%s:%s", CacheConstants.SHOP_STORE_CACHE_KEY, id);
} }
@Override
public List<Map<String, Object>> queryStoreListByParams(String shopAreaId, Integer enabled) {
Map<String, Object> params = new HashMap<>();
params.put("shopAreaId", shopAreaId);
params.put("enabled", enabled);
return ExecuteFeignClient.get(() -> iShopStoreRest.queryStoreListByParams(params)).getRows();
}
} }

View file

@ -0,0 +1,41 @@
/*******************************************************************************
* Copyright 卫志强 QQ598748873@qq.com Inc. All rights reserved. 开源地址https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package com.skyeye.shopmaterial.controller;
import com.skyeye.annotation.api.Api;
import com.skyeye.annotation.api.ApiImplicitParam;
import com.skyeye.annotation.api.ApiImplicitParams;
import com.skyeye.annotation.api.ApiOperation;
import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject;
import com.skyeye.shopmaterial.service.ShopMaterialStoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @ClassName: ShopMaterialStoreController
* @Description: 商城商品上线的门店控制层
* @author: skyeye云系列--卫志强
* @date: 2024/9/18 14:32
* @Copyright: 2024 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
* 注意本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
*/
@RestController
@Api(value = "商城商品上线的门店", tags = "商城商品上线的门店", modelName = "商城商品上线的门店")
public class ShopMaterialStoreController {
@Autowired
private ShopMaterialStoreService shopMaterialStoreService;
@ApiOperation(id = "saveShopMaterialStore", value = "新增门店时,将所有商品同步到该门店", method = "POST", allUse = "2")
@ApiImplicitParams(value = {
@ApiImplicitParam(id = "storeId", name = "storeId", value = "门店id", required = "required")})
@RequestMapping("/post/ShopMaterialStoreController/saveShopMaterialStore")
public void saveShopMaterialStore(InputObject inputObject, OutputObject outputObject) {
shopMaterialStoreService.saveShopMaterialStore(inputObject, outputObject);
}
}

View file

@ -0,0 +1,20 @@
/*******************************************************************************
* Copyright 卫志强 QQ598748873@qq.com Inc. All rights reserved. 开源地址https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package com.skyeye.shopmaterial.dao;
import com.skyeye.eve.dao.SkyeyeBaseMapper;
import com.skyeye.shopmaterial.entity.ShopMaterialStore;
/**
* @ClassName: ShopMaterialStoreDao
* @Description: 商城商品上线的门店数据接口层
* @author: skyeye云系列--卫志强
* @date: 2024/9/18 12:10
* @Copyright: 2024 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
* 注意本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
*/
public interface ShopMaterialStoreDao extends SkyeyeBaseMapper<ShopMaterialStore> {
}

View file

@ -0,0 +1,52 @@
/*******************************************************************************
* Copyright 卫志强 QQ598748873@qq.com Inc. All rights reserved. 开源地址https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package com.skyeye.shopmaterial.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.skyeye.annotation.api.ApiModel;
import com.skyeye.annotation.api.ApiModelProperty;
import com.skyeye.annotation.api.Property;
import com.skyeye.common.entity.features.OperatorUserInfo;
import com.skyeye.material.entity.Material;
import lombok.Data;
import java.util.Map;
/**
* @ClassName: ShopMaterialNorms
* @Description: 商城商品上线的门店实体类
* @author: skyeye云系列--卫志强
* @date: 2024/9/4 16:29
* @Copyright: 2024 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
* 注意本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
*/
@Data
@TableName(value = "erp_shop_material_store", autoResultMap = true)
@ApiModel("商城商品上线的门店实体类")
public class ShopMaterialStore extends OperatorUserInfo {
@TableId("id")
@ApiModelProperty(value = "主键id。为空时新增不为空时编辑")
private String id;
@TableField(value = "material_id")
@Property(value = "产品id")
private String materialId;
@TableField(exist = false)
@Property(value = "商品信息")
private Material materialMation;
@TableField(value = "store_id")
@Property(value = "门店id")
private String storeId;
@TableField(exist = false)
@Property(value = "门店信息")
private Map<String, Object> storeMation;
}

View file

@ -0,0 +1,41 @@
/*******************************************************************************
* Copyright 卫志强 QQ598748873@qq.com Inc. All rights reserved. 开源地址https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package com.skyeye.shopmaterial.service;
import com.skyeye.base.business.service.SkyeyeBusinessService;
import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject;
import com.skyeye.shopmaterial.entity.ShopMaterialStore;
import java.util.List;
import java.util.Map;
/**
* @ClassName: ShopMaterialStoreService
* @Description: 商城商品上线的门店服务接口层
* @author: skyeye云系列--卫志强
* @date: 2024/9/18 14:10
* @Copyright: 2024 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
* 注意本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
*/
public interface ShopMaterialStoreService extends SkyeyeBusinessService<ShopMaterialStore> {
void deleteByMaterialId(String materialId);
List<ShopMaterialStore> selectByMaterialId(String materialId);
Map<String, List<ShopMaterialStore>> selectByMaterialId(List<String> materialId);
void saveList(String materialId, List<ShopMaterialStore> shopMaterialStoreList);
/**
* 添加指定商品到所有门店
*
* @param materialId 商品ID
*/
void addAllStoreForMaterial(String materialId);
void saveShopMaterialStore(InputObject inputObject, OutputObject outputObject);
}

View file

@ -28,6 +28,7 @@ import com.skyeye.shopmaterial.entity.ShopMaterial;
import com.skyeye.shopmaterial.entity.ShopMaterialNorms; import com.skyeye.shopmaterial.entity.ShopMaterialNorms;
import com.skyeye.shopmaterial.service.ShopMaterialNormsService; import com.skyeye.shopmaterial.service.ShopMaterialNormsService;
import com.skyeye.shopmaterial.service.ShopMaterialService; import com.skyeye.shopmaterial.service.ShopMaterialService;
import com.skyeye.shopmaterial.service.ShopMaterialStoreService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -57,6 +58,9 @@ public class ShopMaterialServiceImpl extends SkyeyeBusinessServiceImpl<ShopMater
@Autowired @Autowired
private ShopMaterialNormsService shopMaterialNormsService; private ShopMaterialNormsService shopMaterialNormsService;
@Autowired
private ShopMaterialStoreService shopMaterialStoreService;
@Override @Override
public void createPrepose(ShopMaterial entity) { public void createPrepose(ShopMaterial entity) {
entity.setRealSales(CommonNumConstants.NUM_ZERO.toString()); entity.setRealSales(CommonNumConstants.NUM_ZERO.toString());
@ -71,10 +75,13 @@ public class ShopMaterialServiceImpl extends SkyeyeBusinessServiceImpl<ShopMater
Material material = materialService.selectById(entity.getMaterialId()); Material material = materialService.selectById(entity.getMaterialId());
if (CollectionUtil.isEmpty(entity.getShopMaterialNormsList())) { if (CollectionUtil.isEmpty(entity.getShopMaterialNormsList())) {
materialService.setShelvesState(material.getId(), MaterialShelvesState.NOT_ON_SHELVE.getKey()); materialService.setShelvesState(material.getId(), MaterialShelvesState.NOT_ON_SHELVE.getKey());
shopMaterialStoreService.deleteByMaterialId(entity.getMaterialId());
} else if (material.getMaterialNorms().size() > entity.getShopMaterialNormsList().size()) { } else if (material.getMaterialNorms().size() > entity.getShopMaterialNormsList().size()) {
materialService.setShelvesState(material.getId(), MaterialShelvesState.PART_ON_SHELVE.getKey()); materialService.setShelvesState(material.getId(), MaterialShelvesState.PART_ON_SHELVE.getKey());
shopMaterialStoreService.addAllStoreForMaterial(entity.getMaterialId());
} else if (material.getMaterialNorms().size() == entity.getShopMaterialNormsList().size()) { } else if (material.getMaterialNorms().size() == entity.getShopMaterialNormsList().size()) {
materialService.setShelvesState(material.getId(), MaterialShelvesState.ON_SHELVE.getKey()); materialService.setShelvesState(material.getId(), MaterialShelvesState.ON_SHELVE.getKey());
shopMaterialStoreService.addAllStoreForMaterial(entity.getMaterialId());
} }
} }

View file

@ -0,0 +1,123 @@
/*******************************************************************************
* Copyright 卫志强 QQ598748873@qq.com Inc. All rights reserved. 开源地址https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package com.skyeye.shopmaterial.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.skyeye.annotation.service.SkyeyeService;
import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl;
import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject;
import com.skyeye.common.util.mybatisplus.MybatisPlusUtil;
import com.skyeye.rest.shop.service.IShopStoreService;
import com.skyeye.shopmaterial.dao.ShopMaterialStoreDao;
import com.skyeye.shopmaterial.entity.ShopMaterialStore;
import com.skyeye.shopmaterial.service.ShopMaterialStoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @ClassName: ShopMaterialStoreServiceImpl
* @Description: 商城商品上线的门店服务层
* @author: skyeye云系列--卫志强
* @date: 2024/9/18 14:10
* @Copyright: 2024 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
* 注意本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
*/
@Service
@SkyeyeService(name = "商城商品上线的门店", groupName = "商城商品上线的门店", manageShow = false)
public class ShopMaterialStoreServiceImpl extends SkyeyeBusinessServiceImpl<ShopMaterialStoreDao, ShopMaterialStore> implements ShopMaterialStoreService {
@Autowired
private IShopStoreService iShopStoreService;
@Override
public void deleteByMaterialId(String materialId) {
QueryWrapper<ShopMaterialStore> queryWrapper = new QueryWrapper<>();
queryWrapper.eq(MybatisPlusUtil.toColumns(ShopMaterialStore::getMaterialId), materialId);
remove(queryWrapper);
}
@Override
public List<ShopMaterialStore> selectByMaterialId(String materialId) {
QueryWrapper<ShopMaterialStore> queryWrapper = new QueryWrapper<>();
queryWrapper.eq(MybatisPlusUtil.toColumns(ShopMaterialStore::getMaterialId), materialId);
List<ShopMaterialStore> shopMaterialStoreList = list(queryWrapper);
return shopMaterialStoreList;
}
@Override
public Map<String, List<ShopMaterialStore>> selectByMaterialId(List<String> materialId) {
if (CollectionUtil.isEmpty(materialId)) {
return MapUtil.empty();
}
QueryWrapper<ShopMaterialStore> queryWrapper = new QueryWrapper<>();
queryWrapper.in(MybatisPlusUtil.toColumns(ShopMaterialStore::getMaterialId), materialId);
List<ShopMaterialStore> shopMaterialStoreList = list(queryWrapper);
Map<String, List<ShopMaterialStore>> collect = shopMaterialStoreList.stream().collect(Collectors.groupingBy(ShopMaterialStore::getMaterialId));
return collect;
}
@Override
public void saveList(String materialId, List<ShopMaterialStore> shopMaterialStoreList) {
deleteByMaterialId(materialId);
if (CollectionUtil.isNotEmpty(shopMaterialStoreList)) {
for (ShopMaterialStore shopMaterialStore : shopMaterialStoreList) {
shopMaterialStore.setMaterialId(materialId);
}
String userId = InputObject.getLogParamsStatic().get("id").toString();
createEntity(shopMaterialStoreList, userId);
}
}
@Override
public void addAllStoreForMaterial(String materialId) {
List<Map<String, Object>> storeList = iShopStoreService.queryStoreListByParams(StrUtil.EMPTY, null);
if (CollectionUtil.isEmpty(storeList)) {
return;
}
List<ShopMaterialStore> shopMaterialStoreList = storeList.stream().map(store -> {
ShopMaterialStore shopMaterialStore = new ShopMaterialStore();
shopMaterialStore.setStoreId(MapUtil.getStr(store, "id"));
return shopMaterialStore;
}).collect(Collectors.toList());
saveList(materialId, shopMaterialStoreList);
}
@Override
public void saveShopMaterialStore(InputObject inputObject, OutputObject outputObject) {
Map<String, Object> params = inputObject.getParams();
String storeId = MapUtil.getStr(params, "storeId");
// 查询商品id
QueryWrapper<ShopMaterialStore> queryWrapper = new QueryWrapper<>();
queryWrapper.select(MybatisPlusUtil.toColumns(ShopMaterialStore::getMaterialId));
queryWrapper.groupBy(MybatisPlusUtil.toColumns(ShopMaterialStore::getMaterialId));
List<ShopMaterialStore> shopMaterialStoreList = list(queryWrapper);
if (CollectionUtil.isEmpty(shopMaterialStoreList)) {
return;
}
// 构造新的门店商品数据进行保存
List<String> materialIdList = shopMaterialStoreList.stream().map(ShopMaterialStore::getMaterialId).collect(Collectors.toList());
List<ShopMaterialStore> newList = materialIdList.stream().map(materialId -> {
ShopMaterialStore shopMaterialStore = new ShopMaterialStore();
shopMaterialStore.setMaterialId(materialId);
shopMaterialStore.setStoreId(storeId);
return shopMaterialStore;
}).collect(Collectors.toList());
// 不管该门店之前有没有添加过商品都先进行删除
QueryWrapper<ShopMaterialStore> removeWrapper = new QueryWrapper<>();
removeWrapper.eq(MybatisPlusUtil.toColumns(ShopMaterialStore::getStoreId), storeId);
remove(removeWrapper);
// 保存门店商品数据
createEntity(newList, InputObject.getLogParamsStatic().get("id").toString());
}
}

View file

@ -22,4 +22,13 @@ public interface IShopMaterialNormsRest {
@PostMapping("/queryShopMaterialByNormsIdList") @PostMapping("/queryShopMaterialByNormsIdList")
String queryShopMaterialByNormsIdList(@RequestParam("normsIds") String normsIds); String queryShopMaterialByNormsIdList(@RequestParam("normsIds") String normsIds);
/**
* 新增门店时将所有商品同步到该门店
*
* @param storeId 门店id
* @return
*/
@PostMapping("/saveShopMaterialStore")
String saveShopMaterialStore(@RequestParam("storeId") String storeId);
} }

View file

@ -32,12 +32,6 @@ public class ShopStoreController {
@Autowired @Autowired
private ShopStoreService shopStoreService; private ShopStoreService shopStoreService;
/**
* 获取门店信息
*
* @param inputObject 入参以及用户信息等获取对象
* @param outputObject 出参以及提示信息的返回值对象
*/
@ApiOperation(id = "store001", value = "获取门店信息", method = "POST", allUse = "2") @ApiOperation(id = "store001", value = "获取门店信息", method = "POST", allUse = "2")
@ApiImplicitParams(classBean = CommonPageInfo.class) @ApiImplicitParams(classBean = CommonPageInfo.class)
@RequestMapping("/post/ShopStoreController/queryStoreList") @RequestMapping("/post/ShopStoreController/queryStoreList")
@ -45,12 +39,6 @@ public class ShopStoreController {
shopStoreService.queryPageList(inputObject, outputObject); shopStoreService.queryPageList(inputObject, outputObject);
} }
/**
* 添加/编辑门店
*
* @param inputObject 入参以及用户信息等获取对象
* @param outputObject 出参以及提示信息的返回值对象
*/
@ApiOperation(id = "writeStore", value = "添加/编辑门店", method = "POST", allUse = "1") @ApiOperation(id = "writeStore", value = "添加/编辑门店", method = "POST", allUse = "1")
@ApiImplicitParams(classBean = ShopStore.class) @ApiImplicitParams(classBean = ShopStore.class)
@RequestMapping("/post/ShopStoreController/writeStore") @RequestMapping("/post/ShopStoreController/writeStore")
@ -58,12 +46,6 @@ public class ShopStoreController {
shopStoreService.saveOrUpdateEntity(inputObject, outputObject); shopStoreService.saveOrUpdateEntity(inputObject, outputObject);
} }
/**
* 根据ID查询门店信息
*
* @param inputObject 入参以及用户信息等获取对象
* @param outputObject 出参以及提示信息的返回值对象
*/
@ApiOperation(id = "queryStoreById", value = "据ID查询门店信息", method = "GET", allUse = "2") @ApiOperation(id = "queryStoreById", value = "据ID查询门店信息", method = "GET", allUse = "2")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")}) @ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")})
@ -72,12 +54,6 @@ public class ShopStoreController {
shopStoreService.selectById(inputObject, outputObject); shopStoreService.selectById(inputObject, outputObject);
} }
/**
* 根据ID批量查询门店信息
*
* @param inputObject 入参以及用户信息等获取对象
* @param outputObject 出参以及提示信息的返回值对象
*/
@ApiOperation(id = "queryStoreByIds", value = "根据ID批量查询门店信息", method = "POST", allUse = "2") @ApiOperation(id = "queryStoreByIds", value = "根据ID批量查询门店信息", method = "POST", allUse = "2")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(id = "ids", name = "ids", value = "主键id", required = "required")}) @ApiImplicitParam(id = "ids", name = "ids", value = "主键id", required = "required")})
@ -86,12 +62,6 @@ public class ShopStoreController {
shopStoreService.selectByIds(inputObject, outputObject); shopStoreService.selectByIds(inputObject, outputObject);
} }
/**
* 根据id删除门店信息
*
* @param inputObject 入参以及用户信息等获取对象
* @param outputObject 出参以及提示信息的返回值对象
*/
@ApiOperation(id = "deleteStoreById", value = "根据id删除门店信息", method = "DELETE", allUse = "1") @ApiOperation(id = "deleteStoreById", value = "根据id删除门店信息", method = "DELETE", allUse = "1")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")}) @ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")})
@ -100,12 +70,6 @@ public class ShopStoreController {
shopStoreService.deleteById(inputObject, outputObject); shopStoreService.deleteById(inputObject, outputObject);
} }
/**
* 获取门店列表信息
*
* @param inputObject 入参以及用户信息等获取对象
* @param outputObject 出参以及提示信息的返回值对象
*/
@ApiOperation(id = "queryStoreListByParams", value = "获取门店列表信息", method = "GET", allUse = "0") @ApiOperation(id = "queryStoreListByParams", value = "获取门店列表信息", method = "GET", allUse = "0")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(id = "shopAreaId", name = "shopAreaId", value = "区域ID"), @ApiImplicitParam(id = "shopAreaId", name = "shopAreaId", value = "区域ID"),
@ -115,12 +79,6 @@ public class ShopStoreController {
shopStoreService.queryStoreListByParams(inputObject, outputObject); shopStoreService.queryStoreListByParams(inputObject, outputObject);
} }
/**
* 根据门店ID获取门店设置的线上预约信息(已结合当前登陆用户)
*
* @param inputObject 入参以及用户信息等获取对象
* @param outputObject 出参以及提示信息的返回值对象
*/
@ApiOperation(id = "queryStoreOnlineById", value = "根据门店ID获取门店设置的线上预约信息(已结合当前登陆用户)", method = "GET", allUse = "2") @ApiOperation(id = "queryStoreOnlineById", value = "根据门店ID获取门店设置的线上预约信息(已结合当前登陆用户)", method = "GET", allUse = "2")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")}) @ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")})
@ -129,12 +87,6 @@ public class ShopStoreController {
shopStoreService.queryStoreOnlineById(inputObject, outputObject); shopStoreService.queryStoreOnlineById(inputObject, outputObject);
} }
/**
* 保存门店线上预约信息
*
* @param inputObject 入参以及用户信息等获取对象
* @param outputObject 出参以及提示信息的返回值对象
*/
@ApiOperation(id = "saveStoreOnlineMation", value = "保存门店线上预约信息", method = "POST", allUse = "1") @ApiOperation(id = "saveStoreOnlineMation", value = "保存门店线上预约信息", method = "POST", allUse = "1")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required"), @ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required"),
@ -149,12 +101,6 @@ public class ShopStoreController {
shopStoreService.saveStoreOnlineMation(inputObject, outputObject); shopStoreService.saveStoreOnlineMation(inputObject, outputObject);
} }
/**
* 获取门店指定日期的预约信息
*
* @param inputObject 入参以及用户信息等获取对象
* @param outputObject 出参以及提示信息的返回值对象
*/
@ApiOperation(id = "store010", value = "获取门店指定日期的预约信息", method = "GET", allUse = "0") @ApiOperation(id = "store010", value = "获取门店指定日期的预约信息", method = "GET", allUse = "0")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(id = "id", name = "id", value = "门店id", required = "required"), @ApiImplicitParam(id = "id", name = "id", value = "门店id", required = "required"),

View file

@ -9,12 +9,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.skyeye.annotation.service.SkyeyeService; import com.skyeye.annotation.service.SkyeyeService;
import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl; import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl;
import com.skyeye.common.client.ExecuteFeignClient;
import com.skyeye.common.constans.CommonConstants; import com.skyeye.common.constans.CommonConstants;
import com.skyeye.common.enumeration.WhetherEnum; import com.skyeye.common.enumeration.WhetherEnum;
import com.skyeye.common.object.InputObject; import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject; import com.skyeye.common.object.OutputObject;
import com.skyeye.common.util.CalculationUtil; import com.skyeye.common.util.CalculationUtil;
import com.skyeye.common.util.mybatisplus.MybatisPlusUtil; import com.skyeye.common.util.mybatisplus.MybatisPlusUtil;
import com.skyeye.rest.shopmaterialnorms.rest.IShopMaterialNormsRest;
import com.skyeye.store.dao.ShopStoreDao; import com.skyeye.store.dao.ShopStoreDao;
import com.skyeye.store.entity.ShopStore; import com.skyeye.store.entity.ShopStore;
import com.skyeye.store.entity.ShopStoreStaff; import com.skyeye.store.entity.ShopStoreStaff;
@ -46,6 +48,9 @@ public class ShopStoreServiceImpl extends SkyeyeBusinessServiceImpl<ShopStoreDao
@Autowired @Autowired
private ShopStoreStaffService shopStoreStaffService; private ShopStoreStaffService shopStoreStaffService;
@Autowired
private IShopMaterialNormsRest iShopMaterialNormsRest;
@Override @Override
public List<Map<String, Object>> queryPageDataList(InputObject inputObject) { public List<Map<String, Object>> queryPageDataList(InputObject inputObject) {
List<Map<String, Object>> beans = super.queryPageDataList(inputObject); List<Map<String, Object>> beans = super.queryPageDataList(inputObject);
@ -53,6 +58,12 @@ public class ShopStoreServiceImpl extends SkyeyeBusinessServiceImpl<ShopStoreDao
return beans; return beans;
} }
@Override
public void createPostpose(ShopStore entity, String userId) {
// 新增门店时新增门店商品
ExecuteFeignClient.get(() -> iShopMaterialNormsRest.saveShopMaterialStore(entity.getId()));
}
@Override @Override
public ShopStore selectById(String id) { public ShopStore selectById(String id) {
ShopStore shopStore = super.selectById(id); ShopStore shopStore = super.selectById(id);