febs-server/febs-server-generator/src/main/java/cc/mrbird/febs/server/generator/helper/GeneratorHelper.java
@@ -53,7 +53,8 @@ data.put("hasDate", false); data.put("hasBigDecimal", false); columns.forEach(c -> { c.setField(FebsUtil.underscoreToCamel(StringUtils.lowerCase(c.getName()))); // c.setField(FebsUtil.underscoreToCamel(StringUtils.lowerCase(c.getName()))); c.setField(c.getName()); if (StringUtils.containsAny(c.getType(), FieldType.DATE, FieldType.DATETIME, FieldType.TIMESTAMP)) { data.put("hasDate", true); } febs-server/febs-server-generator/src/main/resources/generator/templates/controller.ftl
@@ -16,10 +16,14 @@ import java.util.Map; /** * ${tableComment} Controller * * name:${className} * package:${basePackage}.${controllerPackage} * description:${tableComment}控制器 * * @author ${author} * @date ${date} * @since JDK1.8 */ @Slf4j @Validated febs-server/febs-server-generator/src/main/resources/generator/templates/entity.ftl
@@ -13,10 +13,14 @@ import com.baomidou.mybatisplus.annotation.TableName; /** * ${tableComment} Entity * * name:${className} * package:${basePackage}.${controllerPackage} * description:${tableComment}数据表映射实体 * * @author ${author} * @date ${date} * @since JDK1.8 */ @Data @TableName("${tableName}") @@ -42,7 +46,7 @@ private Date ${column.field?uncap_first}; </#if> <#if column.type = 'int' || column.type = 'smallint'> <#if column.type = 'int' || column.type = 'smallint'|| column.type = 'bit'> private Integer ${column.field?uncap_first}; </#if> febs-server/febs-server-generator/src/main/resources/generator/templates/mapper.ftl
@@ -4,10 +4,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * ${tableComment} Mapper * * name:${className} * package:${basePackage}.${controllerPackage} * description:${tableComment}实体Mapper * * @author ${author} * @date ${date} * @since JDK1.8 */ public interface ${className}Mapper extends BaseMapper<${className}> { febs-server/febs-server-generator/src/main/resources/generator/templates/service.ftl
@@ -9,10 +9,14 @@ import java.util.List; /** * ${tableComment} Service接口 * * name:${className} * package:${basePackage}.${controllerPackage} * description:${tableComment}服务接口 * * @author ${author} * @date ${date} * @since JDK1.8 */ public interface I${className}Service extends IService<${className}> { /** febs-server/febs-server-generator/src/main/resources/generator/templates/serviceImpl.ftl
@@ -16,15 +16,20 @@ import java.util.List; /** * ${tableComment} Service实现 * * name:${className} * package:${basePackage}.${controllerPackage} * description:${tableComment}服务接口实现 * * @author ${author} * @date ${date} * @since JDK1.8 */ @Service @RequiredArgsConstructor @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public class ${className}ServiceImpl extends ServiceImpl<${className}Mapper, ${className}> implements I${className}Service { public class ${className}ServiceImpl extends ServiceImpl <${className}Mapper, ${className}> implements I${className}Service { private final ${className}Mapper ${className?uncap_first}Mapper; febs-server/febs-server-generator/src/main/resources/mapper/GeneratorMapper.xml
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/FebsServerHrApplication.java
New file @@ -0,0 +1,28 @@ package cc.mrbird.febs.server.hr; import cc.mrbird.febs.common.security.starter.annotation.EnableFebsCloudResourceServer; import com.codingapi.txlcn.tc.config.EnableDistributedTransaction; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.WebApplicationType; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.transaction.annotation.EnableTransactionManagement; /** * @author MrBird */ @EnableAsync @SpringBootApplication @EnableFebsCloudResourceServer @EnableTransactionManagement @EnableDistributedTransaction @MapperScan("cc.mrbird.febs.server.hr.mapper") public class FebsServerHrApplication { public static void main(String[] args) { new SpringApplicationBuilder(FebsServerHrApplication.class) .web(WebApplicationType.SERVLET) .run(args); } } febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/runner/StartedUpRunner.java
New file @@ -0,0 +1,27 @@ package cc.mrbird.febs.server.hr.runner; import cc.mrbird.febs.common.core.utils.FebsUtil; import lombok.RequiredArgsConstructor; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.core.env.Environment; import org.springframework.stereotype.Component; /** * @author MrBird */ @Component @RequiredArgsConstructor public class StartedUpRunner implements ApplicationRunner { private final ConfigurableApplicationContext context; private final Environment environment; @Override public void run(ApplicationArguments args) { if (context.isActive()) { FebsUtil.printSystemUpBanner(environment); } } } febs-server/febs-server-hr/src/main/resources/ValidationMessages.properties
New file @@ -0,0 +1,6 @@ required=\u4E0D\u80FD\u4E3A\u7A7A range=\u6709\u6548\u957f\u5ea6{min}\u5230{max}\u4e2a\u5b57\u7b26 email=\u90ae\u7bb1\u683c\u5f0f\u4e0d\u5408\u6cd5 mobile=\u624b\u673a\u53f7\u4e0d\u5408\u6cd5 noMoreThan=\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7{max}\u4e2a\u5b57\u7b26 invalid=\u503c\u4e0d\u5408\u6cd5 febs-server/febs-server-hr/src/main/resources/banner.txt
New file @@ -0,0 +1,8 @@ |------------------------------| | ____ ____ ___ __ | | | |_ | |_ | |_) ( (` | | |_| |_|__ |_|_) _)_) | | | | ${spring.application.name} | | Spring-Boot: ${spring-boot.version} | |------------------------------| febs-server/febs-server-hr/src/main/resources/bootstrap.yml
New file @@ -0,0 +1,28 @@ spring: application: name: FEBS-Server-Hr cloud: nacos: config: server-addr: ${nacos.url}:8848 group: DEFAULT_GROUP prefix: febs-server-Hr file-extension: yaml discovery: server-addr: ${nacos.url}:8848 logging: level: org: springframework: boot: actuate: endpoint: EndpointId: error com: alibaba: cloud: nacos: client: NacosPropertySourceBuilder: error febs-server/febs-server-job/src/main/java/cc/mrbird/febs/server/job/entity/Job.java
@@ -59,6 +59,7 @@ private Date createTime; private transient String createTimeFrom; private transient String createTimeTo; public enum ScheduleStatus { /** * 正常 febs-server/febs-server-job/src/main/resources/mapper/JobMapper.xml
febs-server/febs-server-system/src/main/resources/mapper/LoginLogMapper.xml
@@ -10,7 +10,8 @@ </select> <select id="findTodayIp" resultType="long"> SELECT count(DISTINCT(ip)) FROM t_login_log WHERE login_time between CURDATE() and DATE_ADD(CURDATE(), INTERVAL 1 DAY) SELECT count(DISTINCT(ip)) FROM t_login_log WHERE login_time between CURDATE() and DATE_ADD(CURDATE(), INTERVAL 1 DAY) </select> <select id="findLastTenDaysVisitCount" resultType="map" parameterType="string"> febs-server/febs-server-system/src/main/resources/mapper/MenuMapper.xml
febs-server/febs-server-system/src/main/resources/mapper/RoleMapper.xml
febs-server/pom.xml
@@ -22,6 +22,7 @@ <module>febs-server-test</module> <module>febs-server-generator</module> <module>febs-server-job</module> <module>febs-server-hr</module> </modules> <dependencies>