feat(oa): 添加项目客户关联字段并优化数据库配置
- 修改开发环境数据库端口从3306到13306 - 更新开发环境数据库密码为Root@12345 - 修改生产环境主从库地址统一指向新服务器- 更新生产环境数据库密码为Root@12345- 在SysOaProject实体类中添加customerId字段 - 在SysOaProjectBo业务对象中添加customerId和customerName字段 - 在SysOaProjectMapper.xml中关联查询客户信息- 优化项目查询SQL语句,明确指定表别名 - 在项目详情查询中添加客户信息关联查询 - 在SysOaProjectVo视图对象中添加客户相关字段
This commit is contained in:
@@ -49,9 +49,9 @@ spring:
|
|||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||||
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
||||||
url: jdbc:mysql://49.232.154.205:3306/fad_oa?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
url: jdbc:mysql://49.232.154.205:13306/fad_oa?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
||||||
username: root
|
username: root
|
||||||
password: WANGyu11!
|
password: Root@12345
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
lazy: true
|
lazy: true
|
||||||
|
|||||||
@@ -50,17 +50,17 @@ spring:
|
|||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||||
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
||||||
url: jdbc:mysql://110.41.139.73:3306/fad_oa?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
url: jdbc:mysql://49.232.154.205:13306/fad_oa?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
||||||
username: root
|
username: root
|
||||||
password: WANGyu11!
|
password: Root@12345
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
lazy: true
|
lazy: true
|
||||||
type: ${spring.datasource.type}
|
type: ${spring.datasource.type}
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://110.41.139.73:3306/fad_oa?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
url: jdbc:mysql://49.232.154.205:13306/fad_oa?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
||||||
username: root
|
username: root
|
||||||
password: 123456
|
password: Root@12345
|
||||||
# oracle:
|
# oracle:
|
||||||
# type: ${spring.datasource.type}
|
# type: ${spring.datasource.type}
|
||||||
# driverClassName: oracle.jdbc.OracleDriver
|
# driverClassName: oracle.jdbc.OracleDriver
|
||||||
|
|||||||
@@ -160,4 +160,8 @@ public class SysOaProject extends BaseEntity {
|
|||||||
private Date originalFinishTime;
|
private Date originalFinishTime;
|
||||||
//延期次数
|
//延期次数
|
||||||
private Integer postponeCount;
|
private Integer postponeCount;
|
||||||
|
|
||||||
|
//客户id
|
||||||
|
private Long customerId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -196,5 +196,10 @@ public class SysOaProjectBo extends BaseEntity {
|
|||||||
private Date originalFinishTime;
|
private Date originalFinishTime;
|
||||||
//延期次数
|
//延期次数
|
||||||
private Integer postponeCount;
|
private Integer postponeCount;
|
||||||
|
|
||||||
|
//客户id
|
||||||
|
private Long customerId;
|
||||||
|
//客户名称
|
||||||
|
private String customerName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -262,4 +262,9 @@ public class SysOaProjectVo {
|
|||||||
private Date originalFinishTime;
|
private Date originalFinishTime;
|
||||||
//延期次数
|
//延期次数
|
||||||
private Integer postponeCount;
|
private Integer postponeCount;
|
||||||
|
|
||||||
|
//客户id
|
||||||
|
private Long customerId;
|
||||||
|
//客户名称
|
||||||
|
private String customerName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -306,9 +306,11 @@
|
|||||||
p.signing_company,
|
p.signing_company,
|
||||||
p.postpone_count,
|
p.postpone_count,
|
||||||
p.original_finish_time,
|
p.original_finish_time,
|
||||||
TIMESTAMPDIFF(DAY, NOW(), p.postpone_time) AS remainTime
|
TIMESTAMPDIFF(DAY, NOW(), p.postpone_time) AS remainTime,
|
||||||
|
p.customer_id AS customerId,
|
||||||
|
c.name AS customerName
|
||||||
FROM sys_oa_project p
|
FROM sys_oa_project p
|
||||||
|
LEFT JOIN oa_customer c ON p.customer_id = c.customer_id
|
||||||
${ew.getCustomSqlSegment}
|
${ew.getCustomSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -557,28 +559,28 @@
|
|||||||
</select>
|
</select>
|
||||||
<select id="selectVoByIdPlus" resultMap="SysOaProjectVoResult">
|
<select id="selectVoByIdPlus" resultMap="SysOaProjectVoResult">
|
||||||
select sop.project_id,
|
select sop.project_id,
|
||||||
project_name,
|
sop.project_name,
|
||||||
project_num,
|
sop.project_num,
|
||||||
project_type,
|
sop.project_type,
|
||||||
address,
|
sop.address,
|
||||||
funds,
|
sop.funds,
|
||||||
functionary,
|
sop.functionary,
|
||||||
begin_time,
|
sop.begin_time,
|
||||||
finish_time,
|
sop.finish_time,
|
||||||
delivery,
|
sop.delivery,
|
||||||
guarantee,
|
sop.guarantee,
|
||||||
introduction,
|
sop.introduction,
|
||||||
project_grade,
|
sop.project_grade,
|
||||||
project_status,
|
sop.project_status,
|
||||||
contract_id,
|
sop.contract_id,
|
||||||
invoice_name,
|
sop.invoice_name,
|
||||||
invoice_number,
|
sop.invoice_number,
|
||||||
invoice_address,
|
sop.invoice_address,
|
||||||
invoice_bank,
|
sop.invoice_bank,
|
||||||
bail,
|
sop.bail,
|
||||||
closure_files,
|
sop.closure_files,
|
||||||
remark,
|
sop.remark,
|
||||||
accessory,
|
sop.accessory,
|
||||||
sop.create_by,
|
sop.create_by,
|
||||||
sop.create_time,
|
sop.create_time,
|
||||||
sop.update_by,
|
sop.update_by,
|
||||||
@@ -587,14 +589,17 @@
|
|||||||
sop.signing_company,
|
sop.signing_company,
|
||||||
sop.original_finish_time,
|
sop.original_finish_time,
|
||||||
sop.postpone_count,
|
sop.postpone_count,
|
||||||
is_postpone,
|
sop.is_postpone,
|
||||||
postpone_reason,
|
sop.postpone_reason,
|
||||||
postpone_time,
|
sop.postpone_time,
|
||||||
color,
|
sop.color,
|
||||||
trade_type,
|
sop.trade_type,
|
||||||
pre_pay,
|
sop.pre_pay,
|
||||||
|
sop.customer_id AS customerId,
|
||||||
|
c.name AS customerName,
|
||||||
TIMESTAMPDIFF(DAY, NOW(), sop.postpone_time) AS remainTime
|
TIMESTAMPDIFF(DAY, NOW(), sop.postpone_time) AS remainTime
|
||||||
from sys_oa_project sop
|
from sys_oa_project sop
|
||||||
|
left join oa_customer c on c.customer_id = sop.customer_id
|
||||||
where sop.project_id = #{projectId}
|
where sop.project_id = #{projectId}
|
||||||
</select>
|
</select>
|
||||||
<!-- 本月合同总额 -->
|
<!-- 本月合同总额 -->
|
||||||
|
|||||||
Reference in New Issue
Block a user