Commit e0fe1f97 authored by shiyu's avatar shiyu

类目新增字段

parent be9309db
......@@ -14,6 +14,7 @@ import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
@Service
......@@ -94,7 +95,7 @@ public class CategoryDaoImpl implements CategoryDao {
}
public int updateById(Category category) {
category.setUpdated(LocalDateTime.now());
category.setUpdated(new Date());
return categoryMapper.updateByPrimaryKeySelective(category);
}
......@@ -103,8 +104,8 @@ public class CategoryDaoImpl implements CategoryDao {
}
public void add(Category category) {
category.setCreated(LocalDateTime.now());
category.setUpdated(LocalDateTime.now());
category.setCreated(new Date());
category.setUpdated(new Date());
categoryMapper.insertSelective(category);
}
......
......@@ -6,46 +6,17 @@ import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface CategoryMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
*/
long countByExample(CategoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
*/
int deleteByExample(CategoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
*/
int insert(Category record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
*/
int insertSelective(Category record);
/**
......@@ -73,14 +44,19 @@ public interface CategoryMapper {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<Category> selectByExampleSelective(@Param("example") CategoryExample example, @Param("selective") Category.Column ... selective);
Category selectOneByExampleWithBLOBs(CategoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<Category> selectByExampleSelective(@Param("example") CategoryExample example, @Param("selective") Category.Column ... selective);
List<Category> selectByExampleWithBLOBs(CategoryExample example);
List<Category> selectByExample(CategoryExample example);
/**
......@@ -92,44 +68,18 @@ public interface CategoryMapper {
*/
Category selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") Category.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
*/
Category selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") Category record, @Param("example") CategoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
*/
int updateByExampleWithBLOBs(@Param("record") Category record, @Param("example") CategoryExample example);
int updateByExample(@Param("record") Category record, @Param("example") CategoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(Category record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
*/
int updateByPrimaryKeyWithBLOBs(Category record);
int updateByPrimaryKey(Category record);
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment