Commit a9806461 by huluobin

Merge branch 'master' into 3.8

# Conflicts:
#	src/main/resources/logback-spring.xml
parents 9bbc4a8e 9a97a874
package com.gogirl.application.xcx;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gogirl.domain.xcx.ScheduleLog;
/**
* <p>
* 服务类
* </p>
*
* @author robbendev
* @since 2020-07-08
*/
public interface IScheduleLogService extends IService<ScheduleLog> {
}
package com.gogirl.application.xcx.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gogirl.application.xcx.IScheduleLogService;
import com.gogirl.domain.xcx.ScheduleLog;
import com.gogirl.infrastructure.mapper.xcx.ScheduleLogMapper;
import org.springframework.stereotype.Service;
/**
* <p>
* 服务实现类
* </p>
*
* @author robbendev
* @since 2020-07-08
*/
@Service
public class ScheduleLogServiceImpl extends ServiceImpl<ScheduleLogMapper, ScheduleLog> implements IScheduleLogService {
}
package com.gogirl.domain.xcx;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.sql.Blob;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020-07-08
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="ScheduleLog对象", description="")
public class ScheduleLog implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Blob json;
private Integer technicianId;
private Integer customerId;
@ApiModelProperty(value = "类型 1-用户提交预约 2-用户修改预约 3-美甲师提交预约 4-美甲师修改预约")
private Integer type;
}
package com.gogirl.infrastructure.mapper.xcx;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gogirl.domain.xcx.ScheduleLog;
/**
* <p>
* Mapper 接口
* </p>
*
* @author robbendev
* @since 2020-07-08
*/
public interface ScheduleLogMapper extends BaseMapper<ScheduleLog> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gogirl.infrastructure.mapper.xcx.ScheduleLogMapper">
</mapper>
package com.gogirl; package com.gogirl;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException; import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException;
import com.baomidou.mybatisplus.core.toolkit.StringPool; import com.baomidou.mybatisplus.core.toolkit.StringPool;
import com.baomidou.mybatisplus.generator.AutoGenerator; import com.baomidou.mybatisplus.generator.AutoGenerator;
...@@ -45,6 +46,8 @@ public class CodeGenerator { ...@@ -45,6 +46,8 @@ public class CodeGenerator {
gc.setAuthor("robbendev"); gc.setAuthor("robbendev");
gc.setOpen(false); gc.setOpen(false);
gc.setSwagger2(true); gc.setSwagger2(true);
gc.setIdType(IdType.AUTO);
// 实体属性 Swagger2 注解 // 实体属性 Swagger2 注解
mpg.setGlobalConfig(gc); mpg.setGlobalConfig(gc);
...@@ -89,7 +92,7 @@ public class CodeGenerator { ...@@ -89,7 +92,7 @@ public class CodeGenerator {
@Override @Override
public String outputFile(TableInfo tableInfo) { public String outputFile(TableInfo tableInfo) {
// 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!! // 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
return projectPath + "/src/main/resources/mapper/" + s.replaceAll(".", "/") return projectPath + "/src/main/resources/mapper/" + s.replace(".", "/")
+ "/" + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML; + "/" + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML;
} }
}); });
...@@ -126,11 +129,9 @@ public class CodeGenerator { ...@@ -126,11 +129,9 @@ public class CodeGenerator {
// strategy.setSuperEntityClass("你自己的父类实体,没有就不用设置!"); // strategy.setSuperEntityClass("你自己的父类实体,没有就不用设置!");
strategy.setEntityLombokModel(true); strategy.setEntityLombokModel(true);
strategy.setRestControllerStyle(true); strategy.setRestControllerStyle(true);
// 公共父类 // 公共父类
// strategy.setSuperControllerClass("你自己的父类控制器,没有就不用设置!"); // strategy.setSuperControllerClass("你自己的父类控制器,没有就不用设置!");
// 写于父类中的公共字段 // 写于父类中的公共字段
strategy.setSuperEntityColumns("id");
strategy.setInclude(scanner("表名,多个英文逗号分割").split(",")); strategy.setInclude(scanner("表名,多个英文逗号分割").split(","));
strategy.setControllerMappingHyphenStyle(true); strategy.setControllerMappingHyphenStyle(true);
strategy.setTablePrefix(pc.getModuleName() + "_"); strategy.setTablePrefix(pc.getModuleName() + "_");
...@@ -139,4 +140,4 @@ public class CodeGenerator { ...@@ -139,4 +140,4 @@ public class CodeGenerator {
mpg.execute(); mpg.execute();
} }
} }
\ No newline at end of file
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