mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2024-12-27 18:34:28 +08:00
feat: StoreType表增加enabled字敦
This commit is contained in:
parent
81d7860276
commit
d8ee6434f8
3 changed files with 14 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<StoreTypeDao
|
|||
|
||||
@Override
|
||||
public List<Map<String, Object>> queryDataList(InputObject inputObject) {
|
||||
Map<String, Object> params = inputObject.getParams();
|
||||
System.out.println(params);
|
||||
QueryWrapper<StoreType> 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<StoreType> beans = list(queryWrapper);
|
||||
shopStoreService.setDataMation(beans, StoreType::getStoreId);
|
||||
return JSONUtil.toList(JSONUtil.toJsonStr(beans), null);
|
||||
|
|
Loading…
Reference in a new issue