commit
4b99ec5302
33 changed files with 591 additions and 95 deletions
@ -0,0 +1,26 @@ |
||||
package com.daqing.financial.guarantee.model.response; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @Author chen |
||||
* @DATE 2021/1/12 17:10 |
||||
* @Version 1.0 |
||||
*/ |
||||
@Data |
||||
public class ApprovalNum { |
||||
|
||||
@ApiModelProperty("已发起数") |
||||
private Integer initiateNum = 0; |
||||
|
||||
@ApiModelProperty("已同意数") |
||||
private Integer agreed = 0; |
||||
|
||||
@ApiModelProperty("已拒绝数") |
||||
private Integer rejected = 0; |
||||
|
||||
@ApiModelProperty("已驳回数") |
||||
private Integer turnDown = 0; |
||||
|
||||
} |
@ -0,0 +1,38 @@ |
||||
package com.daqing.financial.guarantee.model.response; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @Author chen |
||||
* @DATE 2021/1/12 14:19 |
||||
* @Version 1.0 |
||||
*/ |
||||
@Data |
||||
public class TodayApprovalRecordResponse { |
||||
|
||||
@ApiModelProperty("业务编号") |
||||
private String businessNumber; |
||||
|
||||
@ApiModelProperty("客户名称") |
||||
private String clientName; |
||||
|
||||
@ApiModelProperty("申请金额") |
||||
private BigDecimal applicationAmount; |
||||
|
||||
@ApiModelProperty("申请期限") |
||||
private String applicationDeadline; |
||||
|
||||
@ApiModelProperty("任务节点") |
||||
private String taskNode; |
||||
|
||||
@ApiModelProperty("处理时间") |
||||
private Date processingTime; |
||||
|
||||
@ApiModelProperty("状态") |
||||
private String status; |
||||
|
||||
} |
@ -0,0 +1,20 @@ |
||||
package com.daqing.financial.hrauth.controller; |
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
||||
import org.springframework.stereotype.Controller; |
||||
|
||||
/** |
||||
* <p> |
||||
* 访问记录表 前端控制器 |
||||
* </p> |
||||
* |
||||
* @author Qyq |
||||
* @since 2021-01-12 |
||||
*/ |
||||
@Controller |
||||
@RequestMapping("/hrms-access-records-log") |
||||
public class HrmsAccessRecordsLogController { |
||||
|
||||
} |
@ -0,0 +1,17 @@ |
||||
package com.daqing.financial.hrauth.dao; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.daqing.financial.hrauth.model.HrmsAccessRecordsLog; |
||||
import org.apache.ibatis.annotations.Mapper; |
||||
|
||||
/** |
||||
* <p> |
||||
* 访问记录表 Mapper 接口 |
||||
* </p> |
||||
* |
||||
* @author Qyq |
||||
* @since 2021-01-12 |
||||
*/ |
||||
@Mapper |
||||
public interface HrmsAccessRecordsLogMapper extends BaseMapper<HrmsAccessRecordsLog> { |
||||
} |
@ -0,0 +1,57 @@ |
||||
package com.daqing.financial.hrauth.model; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* <p> |
||||
* 访问记录表 |
||||
* </p> |
||||
* |
||||
* @author Qyq |
||||
* @since 2021-01-12 |
||||
*/ |
||||
@Data |
||||
@TableName("hrms_access_records_log") |
||||
public class HrmsAccessRecordsLog implements Serializable { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 主键id |
||||
*/ |
||||
@TableId(value = "id", type = IdType.AUTO) |
||||
private Integer id; |
||||
|
||||
/** |
||||
* 账号 |
||||
*/ |
||||
private String account; |
||||
|
||||
/** |
||||
* 姓名 |
||||
*/ |
||||
private String name; |
||||
|
||||
/** |
||||
* 部门名称 |
||||
*/ |
||||
@TableField("deptName") |
||||
private String deptName; |
||||
|
||||
/** |
||||
* 用户端类型:0->PC;1->小程序; |
||||
*/ |
||||
private Integer type; |
||||
|
||||
/** |
||||
* 登录时间 |
||||
*/ |
||||
private Date loginTime; |
||||
} |
@ -0,0 +1,16 @@ |
||||
package com.daqing.financial.hrauth.service; |
||||
|
||||
import com.daqing.financial.hrauth.model.HrmsAccessRecordsLog; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* <p> |
||||
* 访问记录表 服务类 |
||||
* </p> |
||||
* |
||||
* @author Qyq |
||||
* @since 2021-01-12 |
||||
*/ |
||||
public interface IHrmsAccessRecordsLogService extends IService<HrmsAccessRecordsLog> { |
||||
|
||||
} |
@ -0,0 +1,20 @@ |
||||
package com.daqing.financial.hrauth.service.impl; |
||||
|
||||
import com.daqing.financial.hrauth.model.HrmsAccessRecordsLog; |
||||
import com.daqing.financial.hrauth.dao.HrmsAccessRecordsLogMapper; |
||||
import com.daqing.financial.hrauth.service.IHrmsAccessRecordsLogService; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* <p> |
||||
* 访问记录表 服务实现类 |
||||
* </p> |
||||
* |
||||
* @author Qyq |
||||
* @since 2021-01-12 |
||||
*/ |
||||
@Service |
||||
public class HrmsAccessRecordsLogServiceImpl extends ServiceImpl<HrmsAccessRecordsLogMapper, HrmsAccessRecordsLog> implements IHrmsAccessRecordsLogService { |
||||
|
||||
} |
@ -0,0 +1,115 @@ |
||||
package com.daqing.financial.hrauth.util; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.core.toolkit.StringPool; |
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
||||
import com.baomidou.mybatisplus.generator.AutoGenerator; |
||||
import com.baomidou.mybatisplus.generator.InjectionConfig; |
||||
import com.baomidou.mybatisplus.generator.config.*; |
||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo; |
||||
import com.baomidou.mybatisplus.generator.config.rules.DateType; |
||||
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; |
||||
import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @Author: LvFang |
||||
* @Date: Created in 2019/6/11. |
||||
* @Description: |
||||
*/ |
||||
public class MyBatisPlusCodeGenerator { |
||||
|
||||
//包名
|
||||
public static final String PACKAGE_NAME = "com.daqing.financial.hrauth"; |
||||
|
||||
public static void main(String[] args) { |
||||
String[] tables = new String[] {"hrms_access_records_log"};//表名数组
|
||||
String[] tablePrefixs = new String[] {""};//去掉前缀
|
||||
executeCode(PACKAGE_NAME,tables,tablePrefixs); |
||||
} |
||||
|
||||
private static void executeCode(String pack,String[] tables,String[] tablePrefixs) { |
||||
// 代码生成器
|
||||
AutoGenerator mpg = new AutoGenerator(); |
||||
|
||||
// 全局配置
|
||||
GlobalConfig gc = new GlobalConfig(); |
||||
// 是否覆盖已有文件
|
||||
gc.setFileOverride(false); |
||||
// 生成文件的输出目录
|
||||
String projectPath = System.getProperty("user.dir");//user.dir 表示当前工程路径无需替换
|
||||
gc.setOutputDir(projectPath + "/dq-financial-hrms-auth/src/main/java"); |
||||
//设置bean命名规范
|
||||
gc.setEntityName("%s"); |
||||
// 开发人员
|
||||
gc.setAuthor("Qyq"); |
||||
// 是否打开输出目录
|
||||
gc.setOpen(false); |
||||
// 开启 BaseResultMap
|
||||
gc.setBaseResultMap(true); |
||||
// 指定生成的主键的ID类型
|
||||
gc.setIdType(IdType.ID_WORKER); |
||||
// 时间类型对应策略: 只使用 java.util.date 代替
|
||||
gc.setDateType(DateType.ONLY_DATE); |
||||
mpg.setGlobalConfig(gc); |
||||
|
||||
// 数据源配置
|
||||
DataSourceConfig config= new DataSourceConfig(); |
||||
// 从试图获取
|
||||
config.setUrl("jdbc:mysql://192.168.31.140:3306/dq_financial_hrms?serverTimezone=UTC"); |
||||
config.setDriverName("com.mysql.cj.jdbc.Driver"); |
||||
config.setUsername("root"); |
||||
config.setPassword("root"); |
||||
mpg.setDataSource(config); |
||||
|
||||
// 包配置
|
||||
PackageConfig pc = new PackageConfig(); |
||||
// 父包名。如果为空,将下面子包名必须写全部, 否则就只需写子包名
|
||||
pc.setParent(pack); |
||||
// Entity包名
|
||||
pc.setEntity("hrms"); |
||||
mpg.setPackageInfo(pc); |
||||
|
||||
// 自定义配置
|
||||
InjectionConfig cfg = new InjectionConfig() { |
||||
@Override |
||||
public void initMap() { |
||||
// to do nothing
|
||||
} |
||||
}; |
||||
List<FileOutConfig> focList = new ArrayList<>(); |
||||
focList.add(new FileOutConfig("/templates/mapper.xml.ftl") { |
||||
public String outputFile(TableInfo tableInfo) { |
||||
// 自定义输入文件名称
|
||||
if (StringUtils.isEmpty(pc.getModuleName())) { |
||||
return projectPath + "/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/" + tableInfo.getXmlName() + StringPool.DOT_XML; |
||||
}else { |
||||
return projectPath + "/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/" + pc.getModuleName() + "/" + tableInfo.getXmlName() + StringPool.DOT_XML; |
||||
} |
||||
} |
||||
}); |
||||
cfg.setFileOutConfigList(focList); |
||||
mpg.setCfg(cfg); |
||||
mpg.setTemplate(new TemplateConfig().setXml(null)); |
||||
|
||||
// 策略配置
|
||||
StrategyConfig strategy = new StrategyConfig(); |
||||
// 数据库表映射到实体的命名策略: 下划线转驼峰命名
|
||||
strategy.setNaming(NamingStrategy.underline_to_camel); |
||||
// 数据库表字段映射到实体的命名策略: 下划线转驼峰命名
|
||||
strategy.setColumnNaming(NamingStrategy.underline_to_camel); |
||||
// 【实体】是否为lombok模型(默认 false)
|
||||
strategy.setEntityLombokModel(false); |
||||
// 需要包含的表名,允许正则表达式(与exclude二选一配置)
|
||||
strategy.setInclude(tables); |
||||
// 驼峰转连字符
|
||||
strategy.setControllerMappingHyphenStyle(true); |
||||
// 表前缀
|
||||
strategy.setTablePrefix(tablePrefixs); |
||||
mpg.setStrategy(strategy); |
||||
mpg.setTemplateEngine(new FreemarkerTemplateEngine()); |
||||
mpg.execute(); |
||||
} |
||||
} |
@ -0,0 +1,15 @@ |
||||
<?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.daqing.financial.hrauth.dao.HrmsAccessRecordsLogMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="BaseResultMap" type="com.daqing.financial.hrauth.model.HrmsAccessRecordsLog"> |
||||
<id column="id" property="id" /> |
||||
<result column="account" property="account" /> |
||||
<result column="name" property="name" /> |
||||
<result column="deptName" property="deptName" /> |
||||
<result column="type" property="type" /> |
||||
<result column="login_time" property="loginTime" /> |
||||
</resultMap> |
||||
|
||||
</mapper> |
@ -0,0 +1,15 @@ |
||||
<?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.daqing.financial.hrauth.mapper.HrmsAccessRecordsLogMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="BaseResultMap" type="com.daqing.financial.hrauth.hrms.HrmsAccessRecordsLog"> |
||||
<id column="id" property="id" /> |
||||
<result column="account" property="account" /> |
||||
<result column="name" property="name" /> |
||||
<result column="deptName" property="deptName" /> |
||||
<result column="type" property="type" /> |
||||
<result column="login_time" property="loginTime" /> |
||||
</resultMap> |
||||
|
||||
</mapper> |
Loading…
Reference in new issue