diff --git a/skyeye-shop/shop-store/src/main/java/com/skyeye/type/controller/StoreTypeController.java b/skyeye-shop/shop-store/src/main/java/com/skyeye/type/controller/StoreTypeController.java index 93ce33ae..4fa56c07 100644 --- a/skyeye-shop/shop-store/src/main/java/com/skyeye/type/controller/StoreTypeController.java +++ b/skyeye-shop/shop-store/src/main/java/com/skyeye/type/controller/StoreTypeController.java @@ -15,6 +15,7 @@ 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: 门店商品分类管理控制类 @@ -65,7 +66,8 @@ public class StoreTypeController { */ @ApiOperation(id = "queryStoreTypeList", value = "获取门店商品分类信息", method = "POST", allUse = "2") @ApiImplicitParams({ - @ApiImplicitParam(id = "storeId", name = "storeId", value = "门店id")}) + @ApiImplicitParam(id = "storeId", name = "storeId", value = "门店id"), + @ApiImplicitParam(id = "enabled", name = "enabled", value = "状态1是0否")}) @RequestMapping("/post/StoreTypeController/queryStoreTypeList") public void queryStoreTypeList(InputObject inputObject, OutputObject outputObject) { storeTypeService.queryList(inputObject, outputObject); diff --git a/skyeye-shop/shop-store/src/main/java/com/skyeye/type/entity/StoreType.java b/skyeye-shop/shop-store/src/main/java/com/skyeye/type/entity/StoreType.java index 2d9571a3..c4d7ec9b 100644 --- a/skyeye-shop/shop-store/src/main/java/com/skyeye/type/entity/StoreType.java +++ b/skyeye-shop/shop-store/src/main/java/com/skyeye/type/entity/StoreType.java @@ -34,6 +34,10 @@ public class StoreType extends BaseGeneralInfo { @ApiModelProperty(value = "排序", required = "required") private Integer orderBy; + @TableField("enabled") + @ApiModelProperty(value = "启用状态1是0否,参考#WhetherEnum", required = "required") + private Integer enabled; + @TableField(value = "store_id") @ApiModelProperty(value = "门店id") private String storeId; diff --git a/skyeye-shop/shop-store/src/main/java/com/skyeye/type/service/impl/StoreTypeServiceImpl.java b/skyeye-shop/shop-store/src/main/java/com/skyeye/type/service/impl/StoreTypeServiceImpl.java index 71ac6977..55fe22c3 100644 --- a/skyeye-shop/shop-store/src/main/java/com/skyeye/type/service/impl/StoreTypeServiceImpl.java +++ b/skyeye-shop/shop-store/src/main/java/com/skyeye/type/service/impl/StoreTypeServiceImpl.java @@ -4,6 +4,7 @@ package com.skyeye.type.service.impl; +import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.skyeye.annotation.service.SkyeyeService; @@ -40,8 +41,13 @@ public class StoreTypeServiceImpl extends SkyeyeBusinessServiceImpl> queryDataList(InputObject inputObject) { + Map params = inputObject.getParams(); + System.out.println(params); QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq(MybatisPlusUtil.toColumns(StoreType::getStoreId), inputObject.getParams().get("storeId")); + queryWrapper.eq(MybatisPlusUtil.toColumns(StoreType::getStoreId), params.get("storeId").toString()); + if (params.containsKey("enabled") && StrUtil.isNotEmpty(params.get("enabled").toString())) { + queryWrapper.eq(MybatisPlusUtil.toColumns(StoreType::getEnabled), params.get("enabled").toString()); + } List beans = list(queryWrapper); shopStoreService.setDataMation(beans, StoreType::getStoreId); return JSONUtil.toList(JSONUtil.toJsonStr(beans), null);