mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2025-02-01 04:00:54 +08:00
feat: 增加门店商品分类表,及其相关接口
This commit is contained in:
parent
5b02616e92
commit
61fec11025
5 changed files with 220 additions and 0 deletions
|
@ -0,0 +1,85 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.type.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.type.entity.StoreType;
|
||||
import com.skyeye.type.service.StoreTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
/**
|
||||
* @ClassName: StoreTypeController
|
||||
* @Description: 门店商品分类管理控制类
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2022/2/4 10:06
|
||||
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@RestController
|
||||
@Api(value = "门店商品分类管理", tags = "门店商品分类管理", modelName = "门店商品分类管理")
|
||||
public class StoreTypeController {
|
||||
|
||||
@Autowired
|
||||
private StoreTypeService storeTypeService;
|
||||
|
||||
/**
|
||||
* 新增/编辑门店商品分类信息
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "writeStoreType", value = "新增/编辑门店商品分类信息", method = "POST", allUse = "2")
|
||||
@ApiImplicitParams(classBean = StoreType.class)
|
||||
@RequestMapping("/post/StoreTypeController/writeStoreType")
|
||||
public void writeStoreType(InputObject inputObject, OutputObject outputObject) {
|
||||
storeTypeService.saveOrUpdateEntity(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除收件地址信息
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "deleteStoreTypeByIds", value = "批量删除门店商品分类信息", method = "DELETE", allUse = "2")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "ids", name = "ids", value = "主键id列表,多个id用逗号分隔", required = "required")})
|
||||
@RequestMapping("/post/StoreTypeController/deleteStoreTypeByIds")
|
||||
public void deleteStoreTypeByIds(InputObject inputObject, OutputObject outputObject) {
|
||||
storeTypeService.deleteById(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取门店商品分类信息
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "queryStoreTypeList", value = "获取门店商品分类信息", method = "POST", allUse = "2")
|
||||
@RequestMapping("/post/StoreTypeController/queryStoreTypeList")
|
||||
public void queryStoreTypeList(InputObject inputObject, OutputObject outputObject) {
|
||||
storeTypeService.queryList(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id获取门店商品分类信息
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "selectStoreTypeById", value = "根据id获取门店商品分类信息", method = "POST", allUse = "2")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")})
|
||||
@RequestMapping("/post/StoreTypeController/selectStoreTypeById")
|
||||
public void selectStoreTypeById(InputObject inputObject, OutputObject outputObject) {
|
||||
storeTypeService.selectById(inputObject, outputObject);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.type.dao;
|
||||
|
||||
import com.skyeye.eve.dao.SkyeyeBaseMapper;
|
||||
import com.skyeye.type.entity.StoreType;
|
||||
|
||||
/**
|
||||
* @ClassName: StoreTypeDao
|
||||
* @Description: 门店商品分类管理数据接口层
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2022/2/4 10:06
|
||||
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
public interface StoreTypeDao extends SkyeyeBaseMapper<StoreType> {
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.type.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.skyeye.annotation.api.ApiModel;
|
||||
import com.skyeye.annotation.api.ApiModelProperty;
|
||||
import com.skyeye.common.entity.features.BaseGeneralInfo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: StoreType
|
||||
* @Description: 门店商品分类实体类
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2022/2/4 10:06
|
||||
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "shop_store_type")
|
||||
@ApiModel("门店商品分类管理实体类")
|
||||
public class StoreType extends BaseGeneralInfo {
|
||||
|
||||
@TableField(value = "logo")
|
||||
@ApiModelProperty(value = "logo", required = "required")
|
||||
private String logo;
|
||||
|
||||
@TableField(value = "order_by")
|
||||
@ApiModelProperty(value = "排序", required = "required")
|
||||
private Integer orderBy;
|
||||
|
||||
@TableField(value = "store_id")
|
||||
@ApiModelProperty(value = "门店id")
|
||||
private String storeId;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "门店信息")
|
||||
private Map<String, Object> storeMation;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.type.service;
|
||||
|
||||
import com.skyeye.base.business.service.SkyeyeBusinessService;
|
||||
import com.skyeye.type.entity.StoreType;
|
||||
|
||||
/**
|
||||
* @ClassName: StoreTypeService
|
||||
* @Description: 门店商品分类管理服务接口层
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2022/2/4 10:06
|
||||
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
public interface StoreTypeService extends SkyeyeBusinessService<StoreType> {
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.type.service.impl;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
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.constans.CommonCharConstants;
|
||||
import com.skyeye.common.object.InputObject;
|
||||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.store.service.ShopStoreService;
|
||||
import com.skyeye.type.dao.StoreTypeDao;
|
||||
import com.skyeye.type.entity.StoreType;
|
||||
import com.skyeye.type.service.StoreTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: StoreTypeServiceImpl
|
||||
* @Description: 门店商品分类管理服务层
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2022/2/4 10:06
|
||||
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@Service
|
||||
@SkyeyeService
|
||||
public class StoreTypeServiceImpl extends SkyeyeBusinessServiceImpl<StoreTypeDao, StoreType> implements StoreTypeService {
|
||||
|
||||
@Autowired
|
||||
private ShopStoreService shopStoreService;
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> queryDataList(InputObject inputObject) {
|
||||
List<StoreType> beans = list(new QueryWrapper<StoreType>());
|
||||
shopStoreService.setDataMation(beans, StoreType::getStoreId);
|
||||
return JSONUtil.toList(JSONUtil.toJsonStr(beans), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteById(InputObject inputObject, OutputObject outputObject) {
|
||||
String ids = inputObject.getParams().get("ids").toString();
|
||||
List<String> idList = Arrays.asList(ids.split(CommonCharConstants.COMMA_MARK));
|
||||
super.deleteById(idList);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue