暂存
This commit is contained in:
@ -0,0 +1,83 @@
|
||||
package com.stdiet.custom.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.stdiet.common.annotation.Excel;
|
||||
import com.stdiet.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 菜品对象 sys_dishes
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
public class SysDishes extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 菜品名称 */
|
||||
@Excel(name = "菜品名称")
|
||||
private String name;
|
||||
|
||||
/** 菜品类型 */
|
||||
@Excel(name = "菜品类型")
|
||||
private String type;
|
||||
|
||||
/** 做法 */
|
||||
@Excel(name = "做法")
|
||||
private String methods;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setMethods(String methods)
|
||||
{
|
||||
this.methods = methods;
|
||||
}
|
||||
|
||||
public String getMethods()
|
||||
{
|
||||
return methods;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("type", getType())
|
||||
.append("methods", getMethods())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.stdiet.custom.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysDishes;
|
||||
|
||||
/**
|
||||
* 菜品Mapper接口
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
public interface SysDishesMapper
|
||||
{
|
||||
/**
|
||||
* 查询菜品
|
||||
*
|
||||
* @param id 菜品ID
|
||||
* @return 菜品
|
||||
*/
|
||||
public SysDishes selectSysDishesById(Long id);
|
||||
|
||||
/**
|
||||
* 查询菜品列表
|
||||
*
|
||||
* @param sysDishes 菜品
|
||||
* @return 菜品集合
|
||||
*/
|
||||
public List<SysDishes> selectSysDishesList(SysDishes sysDishes);
|
||||
|
||||
/**
|
||||
* 新增菜品
|
||||
*
|
||||
* @param sysDishes 菜品
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysDishes(SysDishes sysDishes);
|
||||
|
||||
/**
|
||||
* 修改菜品
|
||||
*
|
||||
* @param sysDishes 菜品
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysDishes(SysDishes sysDishes);
|
||||
|
||||
/**
|
||||
* 删除菜品
|
||||
*
|
||||
* @param id 菜品ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysDishesById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除菜品
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysDishesByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.stdiet.custom.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysDishes;
|
||||
|
||||
/**
|
||||
* 菜品Service接口
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
public interface ISysDishesService
|
||||
{
|
||||
/**
|
||||
* 查询菜品
|
||||
*
|
||||
* @param id 菜品ID
|
||||
* @return 菜品
|
||||
*/
|
||||
public SysDishes selectSysDishesById(Long id);
|
||||
|
||||
/**
|
||||
* 查询菜品列表
|
||||
*
|
||||
* @param sysDishes 菜品
|
||||
* @return 菜品集合
|
||||
*/
|
||||
public List<SysDishes> selectSysDishesList(SysDishes sysDishes);
|
||||
|
||||
/**
|
||||
* 新增菜品
|
||||
*
|
||||
* @param sysDishes 菜品
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysDishes(SysDishes sysDishes);
|
||||
|
||||
/**
|
||||
* 修改菜品
|
||||
*
|
||||
* @param sysDishes 菜品
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysDishes(SysDishes sysDishes);
|
||||
|
||||
/**
|
||||
* 批量删除菜品
|
||||
*
|
||||
* @param ids 需要删除的菜品ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysDishesByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除菜品信息
|
||||
*
|
||||
* @param id 菜品ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysDishesById(Long id);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.stdiet.custom.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.stdiet.custom.mapper.SysDishesMapper;
|
||||
import com.stdiet.custom.domain.SysDishes;
|
||||
import com.stdiet.custom.service.ISysDishesService;
|
||||
|
||||
/**
|
||||
* 菜品Service业务层处理
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2020-12-28
|
||||
*/
|
||||
@Service
|
||||
public class SysDishesServiceImpl implements ISysDishesService
|
||||
{
|
||||
@Autowired
|
||||
private SysDishesMapper sysDishesMapper;
|
||||
|
||||
/**
|
||||
* 查询菜品
|
||||
*
|
||||
* @param id 菜品ID
|
||||
* @return 菜品
|
||||
*/
|
||||
@Override
|
||||
public SysDishes selectSysDishesById(Long id)
|
||||
{
|
||||
return sysDishesMapper.selectSysDishesById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询菜品列表
|
||||
*
|
||||
* @param sysDishes 菜品
|
||||
* @return 菜品
|
||||
*/
|
||||
@Override
|
||||
public List<SysDishes> selectSysDishesList(SysDishes sysDishes)
|
||||
{
|
||||
return sysDishesMapper.selectSysDishesList(sysDishes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增菜品
|
||||
*
|
||||
* @param sysDishes 菜品
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSysDishes(SysDishes sysDishes)
|
||||
{
|
||||
sysDishes.setCreateTime(DateUtils.getNowDate());
|
||||
return sysDishesMapper.insertSysDishes(sysDishes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改菜品
|
||||
*
|
||||
* @param sysDishes 菜品
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSysDishes(SysDishes sysDishes)
|
||||
{
|
||||
sysDishes.setUpdateTime(DateUtils.getNowDate());
|
||||
return sysDishesMapper.updateSysDishes(sysDishes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除菜品
|
||||
*
|
||||
* @param ids 需要删除的菜品ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysDishesByIds(Long[] ids)
|
||||
{
|
||||
return sysDishesMapper.deleteSysDishesByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除菜品信息
|
||||
*
|
||||
* @param id 菜品ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysDishesById(Long id)
|
||||
{
|
||||
return sysDishesMapper.deleteSysDishesById(id);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user