mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2025-03-03 19:03:11 +08:00
Merge branch 'company_server' of https://gitee.com/doc_wei01/skyeye into company_server
This commit is contained in:
commit
5cbf7c47ae
12 changed files with 184 additions and 14 deletions
|
@ -46,17 +46,15 @@ public class BrandController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 根据启用状态获取品牌列表
|
||||
* 根据已启用的品牌列表
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "queryBrandListByEnabled", value = "根据启用状态获取品牌列表", method = "POST", allUse = "1")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "enabled", name = "enabled", value = "商品状态", required = "required")})
|
||||
@RequestMapping("/post/BrandController/queryBrandListByEnabled")
|
||||
public void queryBrandListByEnabled(InputObject inputObject, OutputObject outputObject) {
|
||||
brandService.queryBrandListByEnabled(inputObject, outputObject);
|
||||
@ApiOperation(id = "queryEnabledBrandList", value = "根据已启用的品牌列表", method = "POST", allUse = "0")
|
||||
@RequestMapping("/post/BrandController/queryEnabledBrandList")
|
||||
public void queryEnabledBrandList(InputObject inputObject, OutputObject outputObject) {
|
||||
brandService.queryEnabledBrandList(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,5 +18,5 @@ import com.skyeye.common.object.OutputObject;
|
|||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
public interface BrandService extends SkyeyeBusinessService<Brand> {
|
||||
void queryBrandListByEnabled(InputObject inputObject, OutputObject outputObject);
|
||||
void queryEnabledBrandList(InputObject inputObject, OutputObject outputObject);
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl;
|
|||
import com.skyeye.brand.dao.BrandDao;
|
||||
import com.skyeye.brand.entity.Brand;
|
||||
import com.skyeye.brand.service.BrandService;
|
||||
import com.skyeye.common.enumeration.EnableEnum;
|
||||
import com.skyeye.common.object.InputObject;
|
||||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.common.util.mybatisplus.MybatisPlusUtil;
|
||||
|
@ -30,10 +31,9 @@ import java.util.List;
|
|||
public class BrandServiceImpl extends SkyeyeBusinessServiceImpl<BrandDao, Brand> implements BrandService {
|
||||
|
||||
@Override
|
||||
public void queryBrandListByEnabled(InputObject inputObject, OutputObject outputObject) {
|
||||
String enable = inputObject.getParams().get("enabled").toString();
|
||||
public void queryEnabledBrandList(InputObject inputObject, OutputObject outputObject) {
|
||||
QueryWrapper<Brand> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(MybatisPlusUtil.toColumns(Brand::getEnabled), enable);
|
||||
queryWrapper.eq(MybatisPlusUtil.toColumns(Brand::getEnabled), EnableEnum.ENABLE_USING.getKey());
|
||||
List<Brand> brandList = list(queryWrapper);
|
||||
outputObject.setBeans(brandList);
|
||||
outputObject.settotal(brandList.size());
|
||||
|
|
|
@ -13,6 +13,7 @@ import com.skyeye.annotation.api.ApiModelProperty;
|
|||
import com.skyeye.annotation.api.Property;
|
||||
import com.skyeye.annotation.cache.RedisCacheField;
|
||||
import com.skyeye.annotation.unique.UniqueField;
|
||||
import com.skyeye.brand.entity.Brand;
|
||||
import com.skyeye.common.constans.CacheConstants;
|
||||
import com.skyeye.common.entity.features.BaseGeneralInfo;
|
||||
import com.skyeye.material.entity.unit.MaterialUnit;
|
||||
|
@ -120,4 +121,8 @@ public class Material extends BaseGeneralInfo {
|
|||
@ApiModelProperty(value = "品牌id")
|
||||
private String brandId;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "品牌信息")
|
||||
private Brand brandMation;
|
||||
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import com.github.pagehelper.Page;
|
|||
import com.github.pagehelper.PageHelper;
|
||||
import com.skyeye.annotation.service.SkyeyeService;
|
||||
import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl;
|
||||
import com.skyeye.brand.service.BrandService;
|
||||
import com.skyeye.common.constans.CommonCharConstants;
|
||||
import com.skyeye.common.constans.CommonConstants;
|
||||
import com.skyeye.common.entity.search.CommonPageInfo;
|
||||
|
@ -74,6 +75,9 @@ public class MaterialServiceImpl extends SkyeyeBusinessServiceImpl<MaterialDao,
|
|||
@Autowired
|
||||
private ErpDepotService erpDepotService;
|
||||
|
||||
@Autowired
|
||||
private BrandService brandService;
|
||||
|
||||
@Override
|
||||
public void validatorEntity(Material entity) {
|
||||
QueryWrapper<Material> queryWrapper = new QueryWrapper<>();
|
||||
|
@ -167,6 +171,8 @@ public class MaterialServiceImpl extends SkyeyeBusinessServiceImpl<MaterialDao,
|
|||
}
|
||||
});
|
||||
}
|
||||
// 品牌信息
|
||||
brandService.setDataMation(material, Material::getBrandId);
|
||||
|
||||
return material;
|
||||
}
|
||||
|
@ -239,6 +245,8 @@ public class MaterialServiceImpl extends SkyeyeBusinessServiceImpl<MaterialDao,
|
|||
});
|
||||
});
|
||||
}
|
||||
// 品牌信息
|
||||
brandService.setDataMation(materialList, Material::getBrandId);
|
||||
|
||||
return materialList;
|
||||
}
|
||||
|
|
|
@ -108,8 +108,8 @@ public class ServiceBeanServiceImpl extends SkyeyeBusinessServiceImpl<ServiceBea
|
|||
}
|
||||
|
||||
private String getKey(ServiceBean bean) {
|
||||
return String.format(Locale.ROOT, "%s_%s_%s_%s_%s_%s", bean.getAppId(), bean.getClassName(), bean.getManageShow(),
|
||||
bean.getTeamAuth(), bean.getTenant(), bean.getFlowable());
|
||||
return String.format(Locale.ROOT, "%s_%s_%s_%s_%s_%s_%s_%s", bean.getAppId(), bean.getClassName(), bean.getManageShow(),
|
||||
bean.getTeamAuth(), bean.getTenant(), bean.getFlowable(), bean.getName(), bean.getGroupName());
|
||||
}
|
||||
|
||||
private void saveAttrDefinition(String appId, List<ServiceBean> classNameList) {
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
package com.skyeye.delivery.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.entity.search.CommonPageInfo;
|
||||
import com.skyeye.common.object.InputObject;
|
||||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.delivery.entity.Delivery;
|
||||
import com.skyeye.delivery.service.DeliveryService;
|
||||
import com.skyeye.level.entity.ShopMemberLevel;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@Api(value = "快递公司管理", tags = "快递公司管理", modelName = "快递公司管理")
|
||||
public class DeliveryController {
|
||||
|
||||
@Autowired
|
||||
private DeliveryService deliveryService;
|
||||
|
||||
@ApiOperation(id = "queryDeliveryList", value = "获取快递公司信息", method = "POST", allUse = "2")
|
||||
@ApiImplicitParams(classBean = CommonPageInfo.class)
|
||||
@RequestMapping("/post/DeliveryController/queryDeliveryList")
|
||||
public void queryMemberLevelList(InputObject inputObject, OutputObject outputObject) {
|
||||
deliveryService.queryPageList(inputObject, outputObject);
|
||||
}
|
||||
|
||||
@ApiOperation(id = "writeDelivery", value = "添加/编辑快递公司", method = "POST", allUse = "2")
|
||||
@ApiImplicitParams(classBean = Delivery.class)
|
||||
@RequestMapping("/post/DeliveryController/writeDelivery")
|
||||
public void writeDelivery(InputObject inputObject, OutputObject outputObject) {
|
||||
deliveryService.saveOrUpdateEntity(inputObject, outputObject);
|
||||
}
|
||||
|
||||
@ApiOperation(id = "deleteDeliveryById", value = "根据id删除快递公司信息", method = "DELETE", allUse = "2")
|
||||
@ApiImplicitParams({@ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")})
|
||||
@RequestMapping("/post/DeliveryController/deleteDeliveryById")
|
||||
public void deleteDeliveryById(InputObject inputObject, OutputObject outputObject) {
|
||||
deliveryService.deleteById(inputObject, outputObject);
|
||||
}
|
||||
|
||||
@ApiOperation(id = "getDelivery", value = "根据ID获取快递公司", method = "GET", allUse = "2")
|
||||
@ApiImplicitParams({@ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")})
|
||||
@RequestMapping("/post/DeliveryController/getDelivery")
|
||||
public void queryDeliveryByIds(InputObject inputObject, OutputObject outputObject) {
|
||||
deliveryService.selectById(inputObject, outputObject);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(id = "deliveryListAllSimple",value = "获取精简的快递公司信息,主要用于下拉列表",method = "GET",allUse = "2")
|
||||
@RequestMapping("/post/ShopDeliveryController/deliveryListAllSimple")
|
||||
public void streamlineDeliveryList(InputObject inputObject, OutputObject outputObject) {
|
||||
deliveryService.streamlineDeliveryList(inputObject,outputObject);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.skyeye.delivery.dao;
|
||||
|
||||
|
||||
import com.skyeye.delivery.entity.Delivery;
|
||||
import com.skyeye.eve.dao.SkyeyeBaseMapper;
|
||||
|
||||
public interface DeliveryDao extends SkyeyeBaseMapper<Delivery> {
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package com.skyeye.delivery.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.unique.UniqueField;
|
||||
import com.skyeye.common.entity.features.OperatorUserInfo;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@UniqueField
|
||||
//@RedisCacheField(name = CacheConstants.SHOP_STORE_CACHE_KEY) //开启缓存
|
||||
@TableName(value = "shop_delivery_company")
|
||||
@ApiModel("快递公司管理")
|
||||
public class Delivery extends OperatorUserInfo {
|
||||
|
||||
@TableId("id")
|
||||
@ApiModelProperty(value = "主键id。为空时新增,不为空时编辑")
|
||||
private String id;
|
||||
|
||||
@TableField(value = "`code_num`")
|
||||
@ApiModelProperty(value = "快递公司 code",required = "required")
|
||||
private String codeNum;
|
||||
|
||||
@TableField(value = "`name`")
|
||||
@ApiModelProperty(value = "快递公司名称", required = "required")
|
||||
private String name;
|
||||
|
||||
@TableField(value = "`logo`")
|
||||
@ApiModelProperty(value = "快递公司 logo",required = "required")
|
||||
private String logo;
|
||||
|
||||
@TableField(value = "`remark`")
|
||||
@ApiModelProperty(value = "快递公司 code")
|
||||
private String remark;
|
||||
|
||||
@TableField(value = "`enabled`")
|
||||
@ApiModelProperty(value = "状态",required = "required")
|
||||
private String enabled;
|
||||
|
||||
@TableField(value = "`order_by`")
|
||||
@ApiModelProperty(value = "排序",required = "required")
|
||||
private String orderBy;
|
||||
|
||||
@TableField(value = "`store_id`")
|
||||
@ApiModelProperty(value = "门店id",required = "required")
|
||||
private String storeId;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.skyeye.delivery.service;
|
||||
|
||||
import com.skyeye.base.business.service.SkyeyeBusinessService;
|
||||
import com.skyeye.common.object.InputObject;
|
||||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.delivery.entity.Delivery;
|
||||
|
||||
|
||||
public interface DeliveryService extends SkyeyeBusinessService<Delivery> {
|
||||
|
||||
void streamlineDeliveryList(InputObject inputObject, OutputObject outputObject);
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package com.skyeye.delivery.service.impl;
|
||||
|
||||
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.delivery.dao.DeliveryDao;
|
||||
import com.skyeye.delivery.entity.Delivery;
|
||||
import com.skyeye.delivery.service.DeliveryService;
|
||||
import com.skyeye.level.entity.ShopMemberLevel;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@SkyeyeService(name = "快递公司管理", groupName = "快递公司管理")
|
||||
public class DeliveryServiceImpl extends SkyeyeBusinessServiceImpl<DeliveryDao , Delivery > implements DeliveryService {
|
||||
|
||||
|
||||
@Override
|
||||
public void streamlineDeliveryList(InputObject inputObject, OutputObject outputObject) {
|
||||
QueryWrapper<Delivery> queryWrapper = new QueryWrapper<>();
|
||||
// 添加查询条件 enabled = "2"
|
||||
queryWrapper.eq(MybatisPlusUtil.toColumns(Delivery::getEnabled), "2");
|
||||
List<Delivery> list = list(queryWrapper);
|
||||
outputObject.setBeans(list);
|
||||
outputObject.settotal(list.size());
|
||||
}
|
||||
}
|
|
@ -32,7 +32,6 @@ public class ShopMemberLevelServiceImpl extends SkyeyeBusinessServiceImpl<ShopMe
|
|||
*/
|
||||
@Override
|
||||
public void streamlineMemberLevelList(InputObject inputObject, OutputObject outputObject) {
|
||||
|
||||
QueryWrapper<ShopMemberLevel> queryWrapper = new QueryWrapper<>();
|
||||
// 添加查询条件 enabled = "2"
|
||||
queryWrapper.eq(MybatisPlusUtil.toColumns(ShopMemberLevel::getEnabled), "2");
|
||||
|
|
Loading…
Reference in a new issue