mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2025-03-03 10:53:20 +08:00
feat: 新增门店与商品的关系
This commit is contained in:
parent
b02cbc1f32
commit
9d7ddb957a
12 changed files with 329 additions and 54 deletions
|
@ -6,9 +6,12 @@ package com.skyeye.rest.shop.rest;
|
|||
|
||||
import com.skyeye.common.client.ClientConfiguration;
|
||||
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.RequestParam;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: IShopStoreRest
|
||||
* @Description: 门店信息管理公共的一些操作
|
||||
|
@ -28,4 +31,14 @@ public interface IShopStoreRest {
|
|||
@PostMapping("/queryStoreByIds")
|
||||
String queryStoreByIds(@RequestParam("ids") String ids);
|
||||
|
||||
/**
|
||||
* 获取门店列表信息
|
||||
*
|
||||
* @param params 查询参数
|
||||
* shopAreaId:门店所属区域id
|
||||
* enebled:是否启用
|
||||
*/
|
||||
@GetMapping("/queryStoreListByParams")
|
||||
String queryStoreListByParams(Map<String, Object> params);
|
||||
|
||||
}
|
||||
|
|
|
@ -6,6 +6,9 @@ package com.skyeye.rest.shop.service;
|
|||
|
||||
import com.skyeye.base.rest.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: IShopStoreService
|
||||
* @Description: 门店信息管理公共的一些操作
|
||||
|
@ -16,4 +19,6 @@ import com.skyeye.base.rest.service.IService;
|
|||
*/
|
||||
public interface IShopStoreService extends IService {
|
||||
|
||||
List<Map<String, Object>> queryStoreListByParams(String shopAreaId, Integer enabled);
|
||||
|
||||
}
|
||||
|
|
|
@ -46,4 +46,11 @@ public class IShopStoreServiceImpl extends IServiceImpl implements IShopStoreSer
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@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);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@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> {
|
||||
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@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;
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@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);
|
||||
}
|
|
@ -28,6 +28,7 @@ import com.skyeye.shopmaterial.entity.ShopMaterial;
|
|||
import com.skyeye.shopmaterial.entity.ShopMaterialNorms;
|
||||
import com.skyeye.shopmaterial.service.ShopMaterialNormsService;
|
||||
import com.skyeye.shopmaterial.service.ShopMaterialService;
|
||||
import com.skyeye.shopmaterial.service.ShopMaterialStoreService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -57,6 +58,9 @@ public class ShopMaterialServiceImpl extends SkyeyeBusinessServiceImpl<ShopMater
|
|||
@Autowired
|
||||
private ShopMaterialNormsService shopMaterialNormsService;
|
||||
|
||||
@Autowired
|
||||
private ShopMaterialStoreService shopMaterialStoreService;
|
||||
|
||||
@Override
|
||||
public void createPrepose(ShopMaterial entity) {
|
||||
entity.setRealSales(CommonNumConstants.NUM_ZERO.toString());
|
||||
|
@ -71,10 +75,13 @@ public class ShopMaterialServiceImpl extends SkyeyeBusinessServiceImpl<ShopMater
|
|||
Material material = materialService.selectById(entity.getMaterialId());
|
||||
if (CollectionUtil.isEmpty(entity.getShopMaterialNormsList())) {
|
||||
materialService.setShelvesState(material.getId(), MaterialShelvesState.NOT_ON_SHELVE.getKey());
|
||||
shopMaterialStoreService.deleteByMaterialId(entity.getMaterialId());
|
||||
} else if (material.getMaterialNorms().size() > entity.getShopMaterialNormsList().size()) {
|
||||
materialService.setShelvesState(material.getId(), MaterialShelvesState.PART_ON_SHELVE.getKey());
|
||||
shopMaterialStoreService.addAllStoreForMaterial(entity.getMaterialId());
|
||||
} else if (material.getMaterialNorms().size() == entity.getShopMaterialNormsList().size()) {
|
||||
materialService.setShelvesState(material.getId(), MaterialShelvesState.ON_SHELVE.getKey());
|
||||
shopMaterialStoreService.addAllStoreForMaterial(entity.getMaterialId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,123 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@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());
|
||||
}
|
||||
}
|
|
@ -22,4 +22,13 @@ public interface IShopMaterialNormsRest {
|
|||
|
||||
@PostMapping("/queryShopMaterialByNormsIdList")
|
||||
String queryShopMaterialByNormsIdList(@RequestParam("normsIds") String normsIds);
|
||||
|
||||
/**
|
||||
* 新增门店时,将所有商品同步到该门店
|
||||
*
|
||||
* @param storeId 门店id
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/saveShopMaterialStore")
|
||||
String saveShopMaterialStore(@RequestParam("storeId") String storeId);
|
||||
}
|
|
@ -32,12 +32,6 @@ public class ShopStoreController {
|
|||
@Autowired
|
||||
private ShopStoreService shopStoreService;
|
||||
|
||||
/**
|
||||
* 获取门店信息
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "store001", value = "获取门店信息", method = "POST", allUse = "2")
|
||||
@ApiImplicitParams(classBean = CommonPageInfo.class)
|
||||
@RequestMapping("/post/ShopStoreController/queryStoreList")
|
||||
|
@ -45,12 +39,6 @@ public class ShopStoreController {
|
|||
shopStoreService.queryPageList(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加/编辑门店
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "writeStore", value = "添加/编辑门店", method = "POST", allUse = "1")
|
||||
@ApiImplicitParams(classBean = ShopStore.class)
|
||||
@RequestMapping("/post/ShopStoreController/writeStore")
|
||||
|
@ -58,12 +46,6 @@ public class ShopStoreController {
|
|||
shopStoreService.saveOrUpdateEntity(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID查询门店信息
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "queryStoreById", value = "据ID查询门店信息", method = "GET", allUse = "2")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")})
|
||||
|
@ -72,12 +54,6 @@ public class ShopStoreController {
|
|||
shopStoreService.selectById(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID批量查询门店信息
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "queryStoreByIds", value = "根据ID批量查询门店信息", method = "POST", allUse = "2")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "ids", name = "ids", value = "主键id", required = "required")})
|
||||
|
@ -86,12 +62,6 @@ public class ShopStoreController {
|
|||
shopStoreService.selectByIds(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除门店信息
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "deleteStoreById", value = "根据id删除门店信息", method = "DELETE", allUse = "1")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")})
|
||||
|
@ -100,12 +70,6 @@ public class ShopStoreController {
|
|||
shopStoreService.deleteById(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取门店列表信息
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "queryStoreListByParams", value = "获取门店列表信息", method = "GET", allUse = "0")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "shopAreaId", name = "shopAreaId", value = "区域ID"),
|
||||
|
@ -115,12 +79,6 @@ public class ShopStoreController {
|
|||
shopStoreService.queryStoreListByParams(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据门店ID获取门店设置的线上预约信息(已结合当前登陆用户)
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "queryStoreOnlineById", value = "根据门店ID获取门店设置的线上预约信息(已结合当前登陆用户)", method = "GET", allUse = "2")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")})
|
||||
|
@ -129,12 +87,6 @@ public class ShopStoreController {
|
|||
shopStoreService.queryStoreOnlineById(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存门店线上预约信息
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "saveStoreOnlineMation", value = "保存门店线上预约信息", method = "POST", allUse = "1")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required"),
|
||||
|
@ -149,12 +101,6 @@ public class ShopStoreController {
|
|||
shopStoreService.saveStoreOnlineMation(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取门店指定日期的预约信息
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "store010", value = "获取门店指定日期的预约信息", method = "GET", allUse = "0")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "id", name = "id", value = "门店id", required = "required"),
|
||||
|
|
|
@ -9,12 +9,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.skyeye.annotation.service.SkyeyeService;
|
||||
import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl;
|
||||
import com.skyeye.common.client.ExecuteFeignClient;
|
||||
import com.skyeye.common.constans.CommonConstants;
|
||||
import com.skyeye.common.enumeration.WhetherEnum;
|
||||
import com.skyeye.common.object.InputObject;
|
||||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.common.util.CalculationUtil;
|
||||
import com.skyeye.common.util.mybatisplus.MybatisPlusUtil;
|
||||
import com.skyeye.rest.shopmaterialnorms.rest.IShopMaterialNormsRest;
|
||||
import com.skyeye.store.dao.ShopStoreDao;
|
||||
import com.skyeye.store.entity.ShopStore;
|
||||
import com.skyeye.store.entity.ShopStoreStaff;
|
||||
|
@ -46,6 +48,9 @@ public class ShopStoreServiceImpl extends SkyeyeBusinessServiceImpl<ShopStoreDao
|
|||
@Autowired
|
||||
private ShopStoreStaffService shopStoreStaffService;
|
||||
|
||||
@Autowired
|
||||
private IShopMaterialNormsRest iShopMaterialNormsRest;
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> queryPageDataList(InputObject inputObject) {
|
||||
List<Map<String, Object>> beans = super.queryPageDataList(inputObject);
|
||||
|
@ -53,6 +58,12 @@ public class ShopStoreServiceImpl extends SkyeyeBusinessServiceImpl<ShopStoreDao
|
|||
return beans;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createPostpose(ShopStore entity, String userId) {
|
||||
// 新增门店时,新增门店商品
|
||||
ExecuteFeignClient.get(() -> iShopMaterialNormsRest.saveShopMaterialStore(entity.getId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShopStore selectById(String id) {
|
||||
ShopStore shopStore = super.selectById(id);
|
||||
|
|
Loading…
Reference in a new issue