mirror of
https://github.com/moshowgame/SpringBootCodeGenerator.git
synced 2025-12-26 05:48:33 +08:00
Merge pull request #78 from gaohanghang/master
去除 mybatis 模板中的方括号[]、修改模板里的类注释样式(感谢@gaohanghang的PR)
This commit is contained in:
commit
c94e0048ab
@ -7,9 +7,10 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${classInfo.classComment}
|
* @description ${classInfo.classComment}
|
||||||
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
|
* @author ${authorName}
|
||||||
*/
|
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
|
||||||
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/${classInfo.className?uncap_first}")
|
@RequestMapping("/${classInfo.className?uncap_first}")
|
||||||
public class ${classInfo.className}Controller {
|
public class ${classInfo.className}Controller {
|
||||||
|
|||||||
@ -4,9 +4,10 @@ import java.util.Date;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${classInfo.classComment}
|
* @description ${classInfo.classComment}
|
||||||
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
|
* @author ${authorName}
|
||||||
*/
|
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class ${classInfo.className} implements Serializable {
|
public class ${classInfo.className} implements Serializable {
|
||||||
|
|
||||||
|
|||||||
@ -6,8 +6,9 @@ import java.util.Date;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${classInfo.classComment}
|
* @description ${classInfo.classComment}
|
||||||
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
|
* @author ${authorName}
|
||||||
|
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ApiModel("${classInfo.classComment}")
|
@ApiModel("${classInfo.classComment}")
|
||||||
@ -23,4 +24,4 @@ public class ${classInfo.className}DTO {
|
|||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,9 +2,10 @@
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${classInfo.classComment}
|
* @description ${classInfo.classComment}
|
||||||
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
|
* @author ${authorName}
|
||||||
*/
|
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
|
||||||
|
*/
|
||||||
public interface I${classInfo.className}DAO {
|
public interface I${classInfo.className}DAO {
|
||||||
|
|
||||||
int add(${classInfo.className} ${classInfo.className?uncap_first});
|
int add(${classInfo.className} ${classInfo.className?uncap_first});
|
||||||
|
|||||||
@ -6,9 +6,10 @@ import org.springframework.stereotype.Repository;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${classInfo.classComment}
|
* @description ${classInfo.classComment}
|
||||||
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
|
* @author ${authorName}
|
||||||
*/
|
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
|
||||||
|
*/
|
||||||
@Repository
|
@Repository
|
||||||
public class ${classInfo.className}DaoImpl implements I${classInfo.className}Dao{
|
public class ${classInfo.className}DaoImpl implements I${classInfo.className}Dao{
|
||||||
|
|
||||||
|
|||||||
@ -13,9 +13,10 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${classInfo.classComment}
|
* @description ${classInfo.classComment}
|
||||||
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
|
* @author ${authorName}
|
||||||
*/
|
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
|
||||||
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Data
|
@Data
|
||||||
@Table(name="${classInfo.tableName}")<#if swagger?exists && swagger==true>
|
@Table(name="${classInfo.tableName}")<#if swagger?exists && swagger==true>
|
||||||
|
|||||||
@ -15,9 +15,10 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${classInfo.classComment}
|
* @description ${classInfo.classComment}
|
||||||
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
|
* @author ${authorName}
|
||||||
*/
|
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
|
||||||
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/${classInfo.className?uncap_first}")
|
@RequestMapping("/${classInfo.className?uncap_first}")
|
||||||
public class ${classInfo.className}Controller {
|
public class ${classInfo.className}Controller {
|
||||||
|
|||||||
@ -14,9 +14,10 @@ import org.springframework.data.jpa.repository.Query;
|
|||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${classInfo.classComment}
|
* @description ${classInfo.classComment}
|
||||||
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
|
* @author ${authorName}
|
||||||
*/
|
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
|
||||||
|
*/
|
||||||
@Repository
|
@Repository
|
||||||
public interface ${classInfo.className}Repository extends JpaRepository<${classInfo.className},Integer> {
|
public interface ${classInfo.className}Repository extends JpaRepository<${classInfo.className},Integer> {
|
||||||
|
|
||||||
|
|||||||
@ -11,9 +11,10 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${classInfo.classComment}
|
* @description ${classInfo.classComment}
|
||||||
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
|
* @author ${authorName}
|
||||||
*/
|
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
|
||||||
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/${classInfo.className?uncap_first}")
|
@RequestMapping("/${classInfo.className?uncap_first}")
|
||||||
public class ${classInfo.className}Controller {
|
public class ${classInfo.className}Controller {
|
||||||
|
|||||||
@ -3,9 +3,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${classInfo.classComment}
|
* @description ${classInfo.classComment}
|
||||||
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
|
* @author ${authorName}
|
||||||
*/
|
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
|
||||||
|
*/
|
||||||
@Repository
|
@Repository
|
||||||
public interface ${classInfo.className}Mapper extends BaseMapper<${classInfo.className}> {
|
public interface ${classInfo.className}Mapper extends BaseMapper<${classInfo.className}> {
|
||||||
|
|
||||||
|
|||||||
@ -9,10 +9,10 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${classInfo.classComment}
|
* @description ${classInfo.classComment}
|
||||||
* @author ${authorName}
|
* @author ${authorName}
|
||||||
* @date ${.now?string('yyyy/MM/dd')}
|
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/${classInfo.className}")
|
@RequestMapping(value = "/${classInfo.className}")
|
||||||
public class ${classInfo.className}Controller {
|
public class ${classInfo.className}Controller {
|
||||||
@ -21,7 +21,7 @@ public class ${classInfo.className}Controller {
|
|||||||
private ${classInfo.className}Service ${classInfo.className?uncap_first}Service;
|
private ${classInfo.className}Service ${classInfo.className?uncap_first}Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [新增]
|
* 新增
|
||||||
* @author ${authorName}
|
* @author ${authorName}
|
||||||
* @date ${.now?string('yyyy/MM/dd')}
|
* @date ${.now?string('yyyy/MM/dd')}
|
||||||
**/
|
**/
|
||||||
@ -31,7 +31,7 @@ public class ${classInfo.className}Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [刪除]
|
* 刪除
|
||||||
* @author ${authorName}
|
* @author ${authorName}
|
||||||
* @date ${.now?string('yyyy/MM/dd')}
|
* @date ${.now?string('yyyy/MM/dd')}
|
||||||
**/
|
**/
|
||||||
@ -41,7 +41,7 @@ public class ${classInfo.className}Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [更新]
|
* 更新
|
||||||
* @author ${authorName}
|
* @author ${authorName}
|
||||||
* @date ${.now?string('yyyy/MM/dd')}
|
* @date ${.now?string('yyyy/MM/dd')}
|
||||||
**/
|
**/
|
||||||
@ -51,7 +51,7 @@ public class ${classInfo.className}Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [查询] 根据主键 id 查询
|
* 查询 根据主键 id 查询
|
||||||
* @author ${authorName}
|
* @author ${authorName}
|
||||||
* @date ${.now?string('yyyy/MM/dd')}
|
* @date ${.now?string('yyyy/MM/dd')}
|
||||||
**/
|
**/
|
||||||
@ -61,7 +61,7 @@ public class ${classInfo.className}Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [查询] 分页查询
|
* 查询 分页查询
|
||||||
* @author ${authorName}
|
* @author ${authorName}
|
||||||
* @date ${.now?string('yyyy/MM/dd')}
|
* @date ${.now?string('yyyy/MM/dd')}
|
||||||
**/
|
**/
|
||||||
|
|||||||
@ -4,51 +4,51 @@ import org.springframework.stereotype.Repository;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${classInfo.classComment}
|
* @description ${classInfo.classComment}
|
||||||
* @author ${authorName}
|
* @author ${authorName}
|
||||||
* @date ${.now?string('yyyy/MM/dd')}
|
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
@Repository
|
@Repository
|
||||||
public interface ${classInfo.className}Mapper {
|
public interface ${classInfo.className}Mapper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [新增]
|
* 新增
|
||||||
* @author ${authorName}
|
* @author ${authorName}
|
||||||
* @date ${.now?string('yyyy/MM/dd')}
|
* @date ${.now?string('yyyy/MM/dd')}
|
||||||
**/
|
**/
|
||||||
int insert(${classInfo.className} ${classInfo.className?uncap_first});
|
int insert(${classInfo.className} ${classInfo.className?uncap_first});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [刪除]
|
* 刪除
|
||||||
* @author ${authorName}
|
* @author ${authorName}
|
||||||
* @date ${.now?string('yyyy/MM/dd')}
|
* @date ${.now?string('yyyy/MM/dd')}
|
||||||
**/
|
**/
|
||||||
int delete(int id);
|
int delete(int id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [更新]
|
* 更新
|
||||||
* @author ${authorName}
|
* @author ${authorName}
|
||||||
* @date ${.now?string('yyyy/MM/dd')}
|
* @date ${.now?string('yyyy/MM/dd')}
|
||||||
**/
|
**/
|
||||||
int update(${classInfo.className} ${classInfo.className?uncap_first});
|
int update(${classInfo.className} ${classInfo.className?uncap_first});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [查询] 根据主键 id 查询
|
* 查询 根据主键 id 查询
|
||||||
* @author ${authorName}
|
* @author ${authorName}
|
||||||
* @date ${.now?string('yyyy/MM/dd')}
|
* @date ${.now?string('yyyy/MM/dd')}
|
||||||
**/
|
**/
|
||||||
${classInfo.className} load(int id);
|
${classInfo.className} load(int id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [查询] 分页查询
|
* 查询 分页查询
|
||||||
* @author ${authorName}
|
* @author ${authorName}
|
||||||
* @date ${.now?string('yyyy/MM/dd')}
|
* @date ${.now?string('yyyy/MM/dd')}
|
||||||
**/
|
**/
|
||||||
List<${classInfo.className}> pageList(int offset,int pagesize);
|
List<${classInfo.className}> pageList(int offset,int pagesize);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [查询] 分页查询 count
|
* 查询 分页查询 count
|
||||||
* @author ${authorName}
|
* @author ${authorName}
|
||||||
* @date ${.now?string('yyyy/MM/dd')}
|
* @date ${.now?string('yyyy/MM/dd')}
|
||||||
**/
|
**/
|
||||||
|
|||||||
@ -3,9 +3,10 @@ import java.util.Date;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${classInfo.classComment}
|
* @description ${classInfo.classComment}
|
||||||
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
|
* @author ${authorName}
|
||||||
*/
|
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
|
||||||
|
*/
|
||||||
public class ${classInfo.className} implements Serializable {
|
public class ${classInfo.className} implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${classInfo.classComment}
|
* @description ${classInfo.classComment}
|
||||||
* @author ${authorName}
|
* @author ${authorName}
|
||||||
* @date ${.now?string('yyyy/MM/dd')}
|
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
|
||||||
*/
|
*/
|
||||||
public interface ${classInfo.className}Service {
|
public interface ${classInfo.className}Service {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -7,10 +7,10 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${classInfo.classComment}
|
* @description ${classInfo.classComment}
|
||||||
* @author ${authorName}
|
* @author ${authorName}
|
||||||
* @date ${.now?string('yyyy/MM/dd')}
|
* @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class ${classInfo.className}ServiceImpl implements ${classInfo.className}Service {
|
public class ${classInfo.className}ServiceImpl implements ${classInfo.className}Service {
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user