代码生成器的代码进行调整
This commit is contained in:
+3
-3
@@ -5,7 +5,7 @@ import ${bussiPackage}.${entityPackage}.mapper.${entityName}Mapper;
|
||||
import ${bussiPackage}.${entityPackage}.service.I${entityName}Service;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
@@ -25,7 +25,7 @@ public class ${entityName}ServiceImpl extends ServiceImpl<${entityName}Mapper, $
|
||||
*/
|
||||
@Override
|
||||
public void add(${entityName} ${entityName?uncap_first}) {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
Date now = new Date();
|
||||
${entityName?uncap_first}.setCreateTime(now);
|
||||
${entityName?uncap_first}.setUpdateTime(now);
|
||||
save(${entityName?uncap_first});
|
||||
@@ -39,7 +39,7 @@ public class ${entityName}ServiceImpl extends ServiceImpl<${entityName}Mapper, $
|
||||
*/
|
||||
@Override
|
||||
public void editById(${entityName} ${entityName?uncap_first}) {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
Date now = new Date();
|
||||
${entityName?uncap_first}.setUpdateTime(now);
|
||||
saveOrUpdate(${entityName?uncap_first});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user