Commit b4418eed authored by shiyu's avatar shiyu

后台新增用户

parent 535f55bf
......@@ -11,6 +11,7 @@ import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
@Service
......@@ -57,7 +58,7 @@ public class DtsAdminDaoImpl implements DtsAdminDao {
@Override
public int updateById(Admin admin) {
admin.setUpdateTime(LocalDateTime.now());
admin.setUpdateTime(new Date());
return adminMapper.updateByPrimaryKeySelective(admin);
}
......@@ -68,8 +69,9 @@ public class DtsAdminDaoImpl implements DtsAdminDao {
@Override
public void add(Admin admin) {
admin.setAddTime(LocalDateTime.now());
admin.setUpdateTime(LocalDateTime.now());
Date now = new Date();
admin.setAddTime(now);
admin.setUpdateTime(now);
adminMapper.insertSelective(admin);
}
......
......@@ -6,49 +6,19 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface AdminMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_admin
*
* @mbg.generated
*/
long countByExample(AdminExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_admin
*
* @mbg.generated
*/
int deleteByExample(AdminExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_admin
*
* @mbg.generated
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_admin
*
* @mbg.generated
*/
int insert(Admin record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_admin
*
* @mbg.generated
*/
int insertSelective(Admin record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_admin
* This method corresponds to the database table admin
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -57,7 +27,7 @@ public interface AdminMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_admin
* This method corresponds to the database table admin
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -66,82 +36,46 @@ public interface AdminMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_admin
* This method corresponds to the database table admin
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<Admin> selectByExampleSelective(@Param("example") AdminExample example, @Param("selective") Admin.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_admin
*
* @mbg.generated
*/
List<Admin> selectByExample(AdminExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_admin
* This method corresponds to the database table admin
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Admin selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") Admin.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_admin
*
* @mbg.generated
*/
Admin selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_admin
* This method corresponds to the database table admin
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Admin selectByPrimaryKeyWithLogicalDelete(@Param("id") Integer id, @Param("andLogicalDeleted") boolean andLogicalDeleted);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_admin
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") Admin record, @Param("example") AdminExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_admin
*
* @mbg.generated
*/
int updateByExample(@Param("record") Admin record, @Param("example") AdminExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_admin
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(Admin record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_admin
*
* @mbg.generated
*/
int updateByPrimaryKey(Admin record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_admin
* This method corresponds to the database table admin
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......@@ -150,7 +84,7 @@ public interface AdminMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_admin
* This method corresponds to the database table admin
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
......
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