Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-dj-pe-analysis
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 62321fdb
authored
Dec 04, 2025
by
zhouhaibao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]bi配置
1 parent
afe0a41c
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1343 additions
and
3 deletions
rpc-dj-pe-analysis-api/src/main/java/cn/com/glsx/dj/peanalysis/dto/req/MerchantBiMatterSearchReq.java
rpc-dj-pe-analysis-api/src/main/java/cn/com/glsx/dj/peanalysis/dto/req/ProvinceUpdateReq.java
rpc-dj-pe-analysis-api/src/main/java/cn/com/glsx/dj/peanalysis/dto/res/ProvinceListRes.java
rpc-dj-pe-analysis-api/src/main/java/cn/com/glsx/dj/peanalysis/model/MerchantBiMatter.java
rpc-dj-pe-analysis-api/src/main/java/cn/com/glsx/dj/peanalysis/model/MerchantProfitOpeLog.java
rpc-dj-pe-analysis-api/src/main/java/cn/com/glsx/dj/peanalysis/model/MerchantProfitRecord.java
rpc-dj-pe-analysis-api/src/main/java/cn/com/glsx/dj/peanalysis/model/ProvinceRganization.java
rpc-dj-pe-analysis/pom.xml
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/mapper/MerchantBiMatterMapper.java
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/mapper/MerchantProfitOpeLogMapper.java
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/mapper/MerchantProfitRecordMapper.java
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/mapper/ProvinceRganizationMapper.java
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/service/MerchantBiMatterService.java
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/service/MerchantProfitRecordService.java
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/service/ProvinceRganizationService.java
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/util/package-info.java
rpc-dj-pe-analysis/src/main/resources/META-INF/orm/MerchantBiMatterMapper.xml
rpc-dj-pe-analysis/src/main/resources/META-INF/orm/MerchantProfitOpeLogMapper.xml
rpc-dj-pe-analysis/src/main/resources/META-INF/orm/MerchantProfitRecordMapper.xml
rpc-dj-pe-analysis/src/main/resources/META-INF/orm/ProvinceRganizationMapper.xml
rpc-dj-pe-analysis/src/main/resources/templates/merchant_profit_template.xlsx
rpc-dj-pe-analysis/src/test/resources/generatorConfig.xml
rpc-dj-pe-analysis-api/src/main/java/cn/com/glsx/dj/peanalysis/dto/req/MerchantBiMatterSearchReq.java
0 → 100644
View file @
62321fd
package
cn
.
com
.
glsx
.
dj
.
peanalysis
.
dto
.
req
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
lombok.Data
;
/**
* @author zhouhb
* @version V1.0
* @Title MerchantBiMatterSearchReq
* @Description:
* @date 2025/12/4 14:06
* @Company:didihu.com.cn
*/
@Data
public
class
MerchantBiMatterSearchReq
implements
Serializable
{
@ApiModelProperty
(
value
=
"员工staffUUid"
)
private
String
staffUUid
;
}
rpc-dj-pe-analysis-api/src/main/java/cn/com/glsx/dj/peanalysis/dto/req/ProvinceUpdateReq.java
0 → 100644
View file @
62321fd
package
cn
.
com
.
glsx
.
dj
.
peanalysis
.
dto
.
req
;
import
cn.com.glsx.dj.peanalysis.model.ProvinceRganization
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.util.List
;
import
lombok.Data
;
/**
* @author zhouhb
* @version V1.0
* @Title MerchantBiMatterSearchReq
* @Description:
* @date 2025/12/4 14:06
* @Company:didihu.com.cn
*/
@Data
public
class
ProvinceUpdateReq
implements
Serializable
{
@ApiModelProperty
(
value
=
"省份id"
)
private
Integer
provinceId
;
@ApiModelProperty
(
value
=
"更新人"
)
private
String
updatedBy
;
@ApiModelProperty
(
value
=
"省份管理员信息"
)
private
List
<
ProvinceRganization
>
provinceRganizationList
;
}
rpc-dj-pe-analysis-api/src/main/java/cn/com/glsx/dj/peanalysis/dto/res/ProvinceListRes.java
0 → 100644
View file @
62321fd
package
cn
.
com
.
glsx
.
dj
.
peanalysis
.
dto
.
res
;
import
cn.com.glsx.dj.peanalysis.model.ProvinceRganization
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
import
lombok.Data
;
/**
* @author zhouhb
* @version V1.0
* @Title MerchantBiMatterSearchReq
* @Description:
* @date 2025/12/4 14:06
* @Company:didihu.com.cn
*/
@Data
public
class
ProvinceListRes
implements
Serializable
{
@ApiModelProperty
(
value
=
"省份id"
)
private
Integer
provinceId
;
@ApiModelProperty
(
value
=
"省名称"
)
private
String
provinceName
;
@ApiModelProperty
(
value
=
"区域大区经理"
)
private
String
provinceRganizationList1
;
@ApiModelProperty
(
value
=
"区域运营"
)
private
String
provinceRganizationList2
;
@ApiModelProperty
(
value
=
"创建日期"
)
private
Date
createdDate
;
}
rpc-dj-pe-analysis-api/src/main/java/cn/com/glsx/dj/peanalysis/model/MerchantBiMatter.java
0 → 100644
View file @
62321fd
package
cn
.
com
.
glsx
.
dj
.
peanalysis
.
model
;
import
java.util.Date
;
import
javax.persistence.*
;
import
lombok.Data
;
@Table
(
name
=
"dj_merchant_bi_matter"
)
@Data
public
class
MerchantBiMatter
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
/**
* 门店名称
*/
@Column
(
name
=
"store_no"
)
private
String
storeNo
;
/**
* 门店名称
*/
@Column
(
name
=
"store_name"
)
private
String
storeName
;
/**
* 线上运营人员,若有多个则用“/”区分
*/
@Column
(
name
=
"online_operator"
)
private
String
onlineOperator
;
/**
* 区域运营人员,若有多个则用“/”区分
*/
@Column
(
name
=
"area_operator"
)
private
String
areaOperator
;
/**
* 创建人
*/
private
String
creator
;
/**
* 创建时间
*/
@Column
(
name
=
"created_at"
)
private
Date
createdAt
;
/**
* 1.代处理 2.已处理
*/
private
Integer
status
;
/**
* 处理人
*/
private
String
handler
;
/**
* 处理时间
*/
@Column
(
name
=
"handled_at"
)
private
Date
handledAt
;
@Column
(
name
=
"description"
)
private
String
description
;
@Column
(
name
=
"handling_Strategy"
)
private
String
handlingStrategy
;
@Transient
private
String
startTime
;
@Transient
private
String
endTime
;
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-pe-analysis-api/src/main/java/cn/com/glsx/dj/peanalysis/model/MerchantProfitOpeLog.java
0 → 100644
View file @
62321fd
package
cn
.
com
.
glsx
.
dj
.
peanalysis
.
model
;
import
java.util.Date
;
import
javax.persistence.*
;
@Table
(
name
=
"dj_merchant_profit_operation_log"
)
public
class
MerchantProfitOpeLog
implements
java
.
io
.
Serializable
{
@Id
@Column
(
name
=
"log_id"
)
private
Long
logId
;
/**
* 操作类型:IMPORT/ADD/UPDATE/DELETE
*/
@Column
(
name
=
"action_type"
)
private
String
actionType
;
/**
* 操作人账号
*/
private
String
operator
;
/**
* 关联记录ID(删除后仍保留)
*/
@Column
(
name
=
"record_id"
)
private
Long
recordId
;
@Column
(
name
=
"created_at"
)
private
Date
createdAt
;
/**
* 操作详情(如失败原因、旧值新值等)
*/
private
String
details
;
/**
* @return log_id
*/
public
Long
getLogId
()
{
return
logId
;
}
/**
* @param logId
*/
public
void
setLogId
(
Long
logId
)
{
this
.
logId
=
logId
;
}
/**
* 获取操作类型:IMPORT/ADD/UPDATE/DELETE
*
* @return action_type - 操作类型:IMPORT/ADD/UPDATE/DELETE
*/
public
String
getActionType
()
{
return
actionType
;
}
/**
* 设置操作类型:IMPORT/ADD/UPDATE/DELETE
*
* @param actionType 操作类型:IMPORT/ADD/UPDATE/DELETE
*/
public
void
setActionType
(
String
actionType
)
{
this
.
actionType
=
actionType
==
null
?
null
:
actionType
.
trim
();
}
/**
* 获取操作人账号
*
* @return operator - 操作人账号
*/
public
String
getOperator
()
{
return
operator
;
}
/**
* 设置操作人账号
*
* @param operator 操作人账号
*/
public
void
setOperator
(
String
operator
)
{
this
.
operator
=
operator
==
null
?
null
:
operator
.
trim
();
}
/**
* 获取关联记录ID(删除后仍保留)
*
* @return record_id - 关联记录ID(删除后仍保留)
*/
public
Long
getRecordId
()
{
return
recordId
;
}
/**
* 设置关联记录ID(删除后仍保留)
*
* @param recordId 关联记录ID(删除后仍保留)
*/
public
void
setRecordId
(
Long
recordId
)
{
this
.
recordId
=
recordId
;
}
/**
* @return created_at
*/
public
Date
getCreatedAt
()
{
return
createdAt
;
}
/**
* @param createdAt
*/
public
void
setCreatedAt
(
Date
createdAt
)
{
this
.
createdAt
=
createdAt
;
}
/**
* 获取操作详情(如失败原因、旧值新值等)
*
* @return details - 操作详情(如失败原因、旧值新值等)
*/
public
String
getDetails
()
{
return
details
;
}
/**
* 设置操作详情(如失败原因、旧值新值等)
*
* @param details 操作详情(如失败原因、旧值新值等)
*/
public
void
setDetails
(
String
details
)
{
this
.
details
=
details
==
null
?
null
:
details
.
trim
();
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-pe-analysis-api/src/main/java/cn/com/glsx/dj/peanalysis/model/MerchantProfitRecord.java
0 → 100644
View file @
62321fd
package
cn
.
com
.
glsx
.
dj
.
peanalysis
.
model
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
javax.persistence.*
;
import
lombok.Data
;
@Table
(
name
=
"dj_merchant_profit_record"
)
@Data
public
class
MerchantProfitRecord
{
/**
* 记录ID
*/
@Id
@Column
(
name
=
"record_id"
)
private
Long
recordId
;
/**
* 关联门店ID
*/
@Column
(
name
=
"store_id"
)
private
Long
storeId
;
/**
* 业务类型:延保/权益/轻改/二手车
*/
@Column
(
name
=
"business_type"
)
private
String
businessType
;
/**
* 所属月份,格式 YYYY-MM-01
*/
@Column
(
name
=
"month_year"
)
private
String
monthYear
;
/**
* 毛利额
*/
@Column
(
name
=
"profit_amount"
)
private
BigDecimal
profitAmount
;
/**
* 创建时间
*/
@Column
(
name
=
"created_at"
)
private
Date
createdAt
;
@Column
(
name
=
"updated_at"
)
private
Date
updatedAt
;
@Column
(
name
=
"del_flag"
)
private
Integer
delFlag
;
@Transient
private
String
storeName
;
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-pe-analysis-api/src/main/java/cn/com/glsx/dj/peanalysis/model/ProvinceRganization.java
0 → 100644
View file @
62321fd
package
cn
.
com
.
glsx
.
dj
.
peanalysis
.
model
;
import
java.util.Date
;
import
javax.persistence.*
;
@Table
(
name
=
"dj_car_life_province_organization"
)
public
class
ProvinceRganization
{
/**
* 主键ID
*/
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Integer
id
;
/**
* 省ID
*/
@Column
(
name
=
"province_id"
)
private
Integer
provinceId
;
/**
* 员工uuid
*/
@Column
(
name
=
"user_uuid"
)
private
String
userUuid
;
/**
* 员工名称
*/
@Column
(
name
=
"user_name"
)
private
String
userName
;
/**
* 角色类型 1-区域运营大区经理 2-区域运营
*/
@Column
(
name
=
"role_type"
)
private
Byte
roleType
;
/**
* 创建人
*/
@Column
(
name
=
"created_by"
)
private
String
createdBy
;
/**
* 创建时间
*/
@Column
(
name
=
"created_date"
)
private
Date
createdDate
;
/**
* 修改人
*/
@Column
(
name
=
"updated_by"
)
private
String
updatedBy
;
/**
* 修改时间
*/
@Column
(
name
=
"updated_date"
)
private
Date
updatedDate
;
/**
* 删除标识(D:已删除;N:未删除)
*/
@Column
(
name
=
"deleted_flag"
)
private
String
deletedFlag
;
/**
* 获取主键ID
*
* @return id - 主键ID
*/
public
Integer
getId
()
{
return
id
;
}
/**
* 设置主键ID
*
* @param id 主键ID
*/
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
/**
* 获取省ID
*
* @return province_id - 省ID
*/
public
Integer
getProvinceId
()
{
return
provinceId
;
}
/**
* 设置省ID
*
* @param provinceId 省ID
*/
public
void
setProvinceId
(
Integer
provinceId
)
{
this
.
provinceId
=
provinceId
;
}
/**
* 获取员工uuid
*
* @return user_uuid - 员工uuid
*/
public
String
getUserUuid
()
{
return
userUuid
;
}
/**
* 设置员工uuid
*
* @param userUuid 员工uuid
*/
public
void
setUserUuid
(
String
userUuid
)
{
this
.
userUuid
=
userUuid
==
null
?
null
:
userUuid
.
trim
();
}
/**
* 获取角色类型 1-区域运营大区经理 2-区域运营
*
* @return role_type - 角色类型 1-区域运营大区经理 2-区域运营
*/
public
Byte
getRoleType
()
{
return
roleType
;
}
/**
* 设置角色类型 1-区域运营大区经理 2-区域运营
*
* @param roleType 角色类型 1-区域运营大区经理 2-区域运营
*/
public
void
setRoleType
(
Byte
roleType
)
{
this
.
roleType
=
roleType
;
}
/**
* 获取创建人
*
* @return created_by - 创建人
*/
public
String
getCreatedBy
()
{
return
createdBy
;
}
/**
* 设置创建人
*
* @param createdBy 创建人
*/
public
void
setCreatedBy
(
String
createdBy
)
{
this
.
createdBy
=
createdBy
==
null
?
null
:
createdBy
.
trim
();
}
/**
* 获取创建时间
*
* @return created_date - 创建时间
*/
public
Date
getCreatedDate
()
{
return
createdDate
;
}
/**
* 设置创建时间
*
* @param createdDate 创建时间
*/
public
void
setCreatedDate
(
Date
createdDate
)
{
this
.
createdDate
=
createdDate
;
}
/**
* 获取修改人
*
* @return updated_by - 修改人
*/
public
String
getUpdatedBy
()
{
return
updatedBy
;
}
/**
* 设置修改人
*
* @param updatedBy 修改人
*/
public
void
setUpdatedBy
(
String
updatedBy
)
{
this
.
updatedBy
=
updatedBy
==
null
?
null
:
updatedBy
.
trim
();
}
/**
* 获取修改时间
*
* @return updated_date - 修改时间
*/
public
Date
getUpdatedDate
()
{
return
updatedDate
;
}
/**
* 设置修改时间
*
* @param updatedDate 修改时间
*/
public
void
setUpdatedDate
(
Date
updatedDate
)
{
this
.
updatedDate
=
updatedDate
;
}
/**
* 获取删除标识(D:已删除;N:未删除)
*
* @return deleted_flag - 删除标识(D:已删除;N:未删除)
*/
public
String
getDeletedFlag
()
{
return
deletedFlag
;
}
/**
* 设置删除标识(D:已删除;N:未删除)
*
* @param deletedFlag 删除标识(D:已删除;N:未删除)
*/
public
void
setDeletedFlag
(
String
deletedFlag
)
{
this
.
deletedFlag
=
deletedFlag
==
null
?
null
:
deletedFlag
.
trim
();
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-pe-analysis/pom.xml
View file @
62321fd
...
@@ -16,5 +16,10 @@
...
@@ -16,5 +16,10 @@
<artifactId>
rpc-dj-pe-analysis-api
</artifactId>
<artifactId>
rpc-dj-pe-analysis-api
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.oreframework.common
</groupId>
<artifactId>
ore-common-office
</artifactId>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
\ No newline at end of file
\ No newline at end of file
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/mapper/MerchantBiMatterMapper.java
0 → 100644
View file @
62321fd
package
cn
.
com
.
glsx
.
dj
.
peanalysis
.
mapper
;
import
cn.com.glsx.dj.peanalysis.dto.req.MerchantBiMatterSearchReq
;
import
cn.com.glsx.dj.peanalysis.model.MerchantBiMatter
;
import
com.github.pagehelper.Page
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.oreframework.datasource.mybatis.mapper.OreMapper
;
@Mapper
public
interface
MerchantBiMatterMapper
extends
OreMapper
<
MerchantBiMatter
>
{
Page
<
MerchantBiMatter
>
selectMerchantBiMatterPage
(
@Param
(
"condition"
)
MerchantBiMatter
condition
);
List
<
MerchantBiMatter
>
findMerchantBiMatter
(
@Param
(
"condition"
)
MerchantBiMatterSearchReq
req
);
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/mapper/MerchantProfitOpeLogMapper.java
0 → 100644
View file @
62321fd
package
cn
.
com
.
glsx
.
dj
.
peanalysis
.
mapper
;
import
cn.com.glsx.dj.peanalysis.model.MerchantProfitOpeLog
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.oreframework.datasource.mybatis.mapper.OreMapper
;
@Mapper
public
interface
MerchantProfitOpeLogMapper
extends
OreMapper
<
MerchantProfitOpeLog
>
{
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/mapper/MerchantProfitRecordMapper.java
0 → 100644
View file @
62321fd
package
cn
.
com
.
glsx
.
dj
.
peanalysis
.
mapper
;
import
cn.com.glsx.dj.peanalysis.model.MerchantProfitRecord
;
import
com.github.pagehelper.Page
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.oreframework.datasource.mybatis.mapper.OreMapper
;
@Mapper
public
interface
MerchantProfitRecordMapper
extends
OreMapper
<
MerchantProfitRecord
>
{
Page
<
MerchantProfitRecord
>
selectProfitRecordPage
(
@Param
(
"condition"
)
MerchantProfitRecord
condition
);
List
<
MerchantProfitRecord
>
selectProfitRecordList
(
@Param
(
"condition"
)
MerchantProfitRecord
condition
);
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/mapper/ProvinceRganizationMapper.java
0 → 100644
View file @
62321fd
package
cn
.
com
.
glsx
.
dj
.
peanalysis
.
mapper
;
import
cn.com.glsx.dj.peanalysis.dto.res.ProvinceListRes
;
import
cn.com.glsx.dj.peanalysis.model.MerchantBiMatter
;
import
cn.com.glsx.dj.peanalysis.model.ProvinceRganization
;
import
com.github.pagehelper.Page
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.oreframework.datasource.mybatis.mapper.OreMapper
;
@Mapper
public
interface
ProvinceRganizationMapper
extends
OreMapper
<
ProvinceRganization
>
{
List
<
ProvinceRganization
>
selectListByProvinceId
(
@Param
(
"provinceId"
)
Integer
provinceId
);
void
updateDelByProvinceId
(
@Param
(
"provinceId"
)
Integer
provinceId
,
@Param
(
"updatedBy"
)
String
updatedBy
);
Page
<
ProvinceListRes
>
selectProvinceListPage
(
MerchantBiMatter
condition
);
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/service/MerchantBiMatterService.java
0 → 100644
View file @
62321fd
package
cn
.
com
.
glsx
.
dj
.
peanalysis
.
service
;
import
cn.com.glsx.dj.peanalysis.dto.req.MerchantBiMatterSearchReq
;
import
cn.com.glsx.dj.peanalysis.listener.ImportResultVO
;
import
cn.com.glsx.dj.peanalysis.listener.MerchantProfitRecordExcelDTO
;
import
cn.com.glsx.dj.peanalysis.listener.MerchantProfitRecordExportDTO
;
import
cn.com.glsx.dj.peanalysis.listener.MerchantProfitRecordImportListener
;
import
cn.com.glsx.dj.peanalysis.mapper.MerchantBiMatterMapper
;
import
cn.com.glsx.dj.peanalysis.mapper.MerchantProfitOpeLogMapper
;
import
cn.com.glsx.dj.peanalysis.mapper.MerchantProfitRecordMapper
;
import
cn.com.glsx.dj.peanalysis.model.MerchantBiMatter
;
import
cn.com.glsx.dj.peanalysis.model.MerchantProfitOpeLog
;
import
cn.com.glsx.dj.peanalysis.model.MerchantProfitRecord
;
import
cn.com.glsx.dj.peanalysis.util.excel.EasyExcelUtil
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
com.alibaba.excel.EasyExcel
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
java.io.ByteArrayInputStream
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.time.format.DateTimeParseException
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
/**
* @author zhouhb
* @version V1.0
* @Title MerchantProfitRecordService
* @Description:
* @date 2025/12/3 14:27
* @Company:didihu.com.cn
*/
public
class
MerchantBiMatterService
{
@Autowired
private
MerchantBiMatterMapper
merchantBiMatterMapper
;
/**
* 查询
*
* @param rpcPagination 查询条件
* @return 结果
*/
public
Page
<
MerchantBiMatter
>
selectMerchantBiMatterPage
(
RpcPagination
<
MerchantBiMatter
>
rpcPagination
)
{
Page
<
MerchantBiMatter
>
page
=
PageHelper
.
startPage
(
rpcPagination
.
getPageNum
(),
rpcPagination
.
getPageSize
());
merchantBiMatterMapper
.
selectMerchantBiMatterPage
(
rpcPagination
.
getCondition
());
return
page
;
}
/**
* 新增
*
* @param merchantBiMatter 新增参数
*/
public
void
insertMerchantBiMatter
(
MerchantBiMatter
merchantBiMatter
)
{
merchantBiMatter
.
setCreatedAt
(
new
Date
());
merchantBiMatter
.
setStatus
(
1
);
merchantBiMatterMapper
.
insert
(
merchantBiMatter
);
}
/**
* 修改
*
* @param merchantBiMatter 修改参数
*/
public
void
updateMerchantBiMatter
(
MerchantBiMatter
merchantBiMatter
)
{
Long
id
=
merchantBiMatter
.
getId
();
if
(
id
==
null
){
throw
new
RpcServiceException
(
"id不能为空"
);
}
MerchantBiMatter
merchantBiMatternew
=
merchantBiMatterMapper
.
selectByPrimaryKey
(
id
);
if
(
merchantBiMatternew
==
null
){
throw
new
RpcServiceException
(
"记录不存在"
);
}
if
(
merchantBiMatternew
.
getStatus
()
!=
null
&&
merchantBiMatternew
.
getStatus
()
==
2
){
throw
new
RpcServiceException
(
"事项状态已处理,无法进行处理,请确认后重新操作"
);
}
merchantBiMatternew
.
setHandler
(
merchantBiMatter
.
getHandler
());
merchantBiMatternew
.
setHandledAt
(
new
Date
());
merchantBiMatternew
.
setStatus
(
2
);
merchantBiMatternew
.
setDescription
(
merchantBiMatter
.
getDescription
());
merchantBiMatterMapper
.
updateByPrimaryKeySelective
(
merchantBiMatternew
);
}
/**
* 查询关联自己的事项
*
* @param req 查询条件
* @return 结果
*/
public
List
<
MerchantBiMatter
>
findMerchantBiMatter
(
MerchantBiMatterSearchReq
req
)
{
return
merchantBiMatterMapper
.
findMerchantBiMatter
(
req
);
}
}
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/service/MerchantProfitRecordService.java
0 → 100644
View file @
62321fd
package
cn
.
com
.
glsx
.
dj
.
peanalysis
.
service
;
import
cn.com.glsx.dj.peanalysis.listener.ImportResultVO
;
import
cn.com.glsx.dj.peanalysis.listener.MerchantProfitRecordExcelDTO
;
import
cn.com.glsx.dj.peanalysis.listener.MerchantProfitRecordExportDTO
;
import
cn.com.glsx.dj.peanalysis.listener.MerchantProfitRecordImportListener
;
import
cn.com.glsx.dj.peanalysis.mapper.MerchantProfitOpeLogMapper
;
import
cn.com.glsx.dj.peanalysis.mapper.MerchantProfitRecordMapper
;
import
cn.com.glsx.dj.peanalysis.model.MerchantProfitOpeLog
;
import
cn.com.glsx.dj.peanalysis.model.MerchantProfitRecord
;
import
cn.com.glsx.dj.peanalysis.util.excel.EasyExcelUtil
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
com.alibaba.excel.EasyExcel
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
java.io.ByteArrayInputStream
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.time.format.DateTimeParseException
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
/**
* @author zhouhb
* @version V1.0
* @Title MerchantProfitRecordService
* @Description:
* @date 2025/12/3 14:27
* @Company:didihu.com.cn
*/
public
class
MerchantProfitRecordService
{
@Autowired
private
MerchantProfitRecordMapper
profitRecordMapper
;
@Autowired
private
MerchantProfitOpeLogMapper
storeInfoMapper
;
// 有效业务类型集合
// 不推荐!会产生匿名内部类,可能持有外部引用导致内存泄漏
private
static
final
Set
<
String
>
VALID_BUSINESS_TYPES
=
Collections
.
unmodifiableSet
(
new
HashSet
<
String
>()
{{
add
(
"延保"
);
add
(
"轻改"
);
add
(
"权益"
);
add
(
"二手车"
);
}});
/**
* 手动编辑
*
* @param record 记录
* @param operator 操作人
*/
@Transactional
public
void
saveOrUpdateRecord
(
MerchantProfitRecord
record
,
String
operator
)
{
validateRecord
(
record
,
false
);
// false 表示非导入场景,允许更新已有记录(但前端已限制不可改关键字段)
this
.
saveOrUpdate
(
record
);
this
.
logAction
(
"UPDATE"
,
operator
,
record
.
getRecordId
(),
"手动编辑"
);
}
/**
* 查询
*
* @param rpcPagination 查询条件
* @return 结果
*/
public
Page
<
MerchantProfitRecord
>
selectProfitRecordPage
(
RpcPagination
<
MerchantProfitRecord
>
rpcPagination
)
{
Page
<
MerchantProfitRecord
>
page
=
PageHelper
.
startPage
(
rpcPagination
.
getPageNum
(),
rpcPagination
.
getPageSize
());
profitRecordMapper
.
selectProfitRecordPage
(
rpcPagination
.
getCondition
());
return
page
;
}
private
void
logAction
(
String
update
,
String
operator
,
Long
recordId
,
String
detail
)
{
MerchantProfitOpeLog
log
=
new
MerchantProfitOpeLog
();
log
.
setLogId
(
null
);
log
.
setActionType
(
update
);
log
.
setOperator
(
operator
);
log
.
setRecordId
(
recordId
);
log
.
setDetails
(
detail
);
log
.
setCreatedAt
(
new
Date
());
storeInfoMapper
.
insert
(
log
);
}
/**
* 新增/更新
*
* @param record 记录
*/
private
void
saveOrUpdate
(
MerchantProfitRecord
record
)
{
if
(
record
.
getRecordId
()
==
null
)
{
record
.
setCreatedAt
(
new
Date
());
record
.
setDelFlag
(
0
);
profitRecordMapper
.
insert
(
record
);
}
else
{
record
.
setUpdatedAt
(
new
Date
());
profitRecordMapper
.
updateByPrimaryKeySelective
(
record
);
}
}
/**
* 删除
*
* @param recordId 记录ID
* @param operator 操作人
*/
@Transactional
public
void
deleteRecord
(
Long
recordId
,
String
operator
)
{
MerchantProfitRecord
record
=
profitRecordMapper
.
selectByPrimaryKey
(
recordId
);
if
(
record
==
null
)
throw
new
RpcServiceException
(
"记录不存在"
);
record
.
setUpdatedAt
(
new
Date
());
record
.
setDelFlag
(-
1
);
profitRecordMapper
.
updateByPrimaryKeySelective
(
record
);
logAction
(
"DELETE"
,
operator
,
recordId
,
"手动删除"
);
}
// ==================== 导入逻辑 ====================
@Transactional
public
ImportResultVO
importFromExcel
(
byte
[]
content
,
String
operator
)
{
MerchantProfitRecordImportListener
listener
=
new
MerchantProfitRecordImportListener
(
this
,
operator
);
// 使用 ByteArrayInputStream 包装 byte[]
EasyExcel
.
read
(
new
ByteArrayInputStream
(
content
),
MerchantProfitRecordExcelDTO
.
class
,
listener
)
.
sheet
()
.
headRowNumber
(
6
)
// 前6行为非数据行,第7行开始是数据
.
doRead
();
return
listener
.
getResult
();
// 如果你在 listener 里收集了数据
}
// ==================== 校验(用于新增/编辑)====================
private
void
validateRecord
(
MerchantProfitRecord
record
,
boolean
isImport
)
{
// 月份不能晚于当前月
if
(
checkDate
(
record
.
getMonthYear
()))
{
throw
new
IllegalArgumentException
(
"月份异常"
);
}
if
(!
VALID_BUSINESS_TYPES
.
contains
(
record
.
getBusinessType
()))
{
throw
new
IllegalArgumentException
(
"无效的业务类型"
);
}
if
(
record
.
getProfitAmount
().
compareTo
(
new
BigDecimal
(
"-99999999.99"
))
<
0
||
record
.
getProfitAmount
().
compareTo
(
new
BigDecimal
(
"99999999.99"
))
>
0
)
{
throw
new
IllegalArgumentException
(
"毛利额超出范围"
);
}
}
private
boolean
checkDate
(
String
monthYearStr
)
{
if
(
monthYearStr
==
null
||
monthYearStr
.
trim
().
isEmpty
())
{
// 处理空值
return
true
;
}
try
{
// 将 "2024-05" 解析为 LocalDate(默认1号)
LocalDate
monthDate
=
LocalDate
.
parse
(
monthYearStr
+
"-01"
,
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
// 当前月份的第一天
LocalDate
currentMonthFirstDay
=
LocalDate
.
now
().
withDayOfMonth
(
1
);
// 判断是否晚于当前月
if
(
monthDate
.
isAfter
(
currentMonthFirstDay
))
{
return
true
;
}
return
false
;
}
catch
(
DateTimeParseException
e
)
{
e
.
printStackTrace
();
// 处理解析异常
return
true
;
}
}
/**
* 导出
*
* @param condition 条件
* @return 文件路径
*/
public
String
exportRecords
(
MerchantProfitRecord
condition
)
{
List
<
MerchantProfitRecordExportDTO
>
exportList
=
new
ArrayList
<>();
List
<
MerchantProfitRecord
>
records
=
profitRecordMapper
.
selectProfitRecordList
(
condition
);
if
(
CollectionUtils
.
isNotEmpty
(
records
)){
exportList
=
records
.
stream
().
map
(
record
->
{
MerchantProfitRecordExportDTO
exportDTO
=
new
MerchantProfitRecordExportDTO
();
exportDTO
.
setBusinessType
(
record
.
getBusinessType
());
return
exportDTO
;
}).
collect
(
Collectors
.
toList
());
}
return
EasyExcelUtil
.
exportExcelMuliLevel
(
exportList
,
"门店毛利"
,
"yyyy-MM-dd"
,
Thread
.
currentThread
().
getContextClassLoader
()
.
getResourceAsStream
(
"templates/merchant_profit_template.xlsx"
),
1
);
}
/**
* 导入前校验
*
* @param storeName 门店名称
* @param storeCode 门店编号
* @param businessType 业务类型
* @param monthYear 所属月份
* @return 错误信息
*/
public
String
validateBeforeImport
(
String
storeName
,
String
storeCode
,
String
businessType
,
LocalDate
monthYear
)
{
return
"OK"
;
}
/**
* 根据门店名称和门店编号获取门店ID
*
* @param storeName 门店名称
* @param storeCode 门店编号
* @return 门店ID
*/
public
Long
getStoreId
(
String
storeName
,
String
storeCode
)
{
return
null
;
}
public
void
batchSaveProfitRecords
(
List
<
MerchantProfitRecord
>
successList
,
String
operator
)
{
for
(
MerchantProfitRecord
r
:
successList
){
this
.
saveOrUpdateRecord
(
r
,
operator
);
}
}
}
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/service/ProvinceRganizationService.java
0 → 100644
View file @
62321fd
package
cn
.
com
.
glsx
.
dj
.
peanalysis
.
service
;
import
cn.com.glsx.dj.peanalysis.dto.req.ProvinceUpdateReq
;
import
cn.com.glsx.dj.peanalysis.dto.res.ProvinceListRes
;
import
cn.com.glsx.dj.peanalysis.mapper.ProvinceRganizationMapper
;
import
cn.com.glsx.dj.peanalysis.model.MerchantBiMatter
;
import
cn.com.glsx.dj.peanalysis.model.ProvinceRganization
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
java.util.Date
;
import
java.util.List
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
/**
* @author zhouhb
* @version V1.0
* @Title ProvinceRganizationService
* @Description:
* @date 2025/12/4 17:28
* @Company:didihu.com.cn
*/
@Service
public
class
ProvinceRganizationService
{
@Autowired
private
ProvinceRganizationMapper
provinceRganizationMapper
;
/**
* 更新省管理员信息
*
* @param provinceUpdateReq 更新信息
*/
@Transactional
private
void
update
(
ProvinceUpdateReq
provinceUpdateReq
)
{
Integer
provinceId
=
provinceUpdateReq
.
getProvinceId
();
if
(
provinceId
==
null
){
throw
new
RpcServiceException
(
"省id不能为空"
);
}
List
<
ProvinceRganization
>
provinceRganizationnew
=
provinceRganizationMapper
.
selectListByProvinceId
(
provinceId
);
if
(
CollectionUtils
.
isNotEmpty
(
provinceRganizationnew
)){
throw
new
RpcServiceException
(
"记录不存在"
);
}
provinceRganizationMapper
.
updateDelByProvinceId
(
provinceId
,
provinceUpdateReq
.
getUpdatedBy
());
List
<
ProvinceRganization
>
provinceRganizationList
=
provinceUpdateReq
.
getProvinceRganizationList
();
if
(
CollectionUtils
.
isEmpty
(
provinceRganizationList
)){
throw
new
RpcServiceException
(
"记录不能为空"
);
}
for
(
ProvinceRganization
provinceRganization
:
provinceRganizationList
)
{
provinceRganization
.
setProvinceId
(
provinceId
);
provinceRganization
.
setCreatedBy
(
provinceUpdateReq
.
getUpdatedBy
());
provinceRganization
.
setCreatedDate
(
new
Date
());
}
provinceRganizationMapper
.
insertList
(
provinceRganizationList
);
}
/**
* 查询
*
* @param rpcPagination 查询条件
* @return 结果
*/
public
Page
<
ProvinceListRes
>
selectProvinceListPage
(
RpcPagination
<
MerchantBiMatter
>
rpcPagination
)
{
Page
<
ProvinceListRes
>
page
=
PageHelper
.
startPage
(
rpcPagination
.
getPageNum
(),
rpcPagination
.
getPageSize
());
provinceRganizationMapper
.
selectProvinceListPage
(
rpcPagination
.
getCondition
());
return
page
;
}
}
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/util/package-info.java
deleted
100644 → 0
View file @
afe0a41
package
cn
.
com
.
glsx
.
dj
.
peanalysis
.
util
;
\ No newline at end of file
\ No newline at end of file
rpc-dj-pe-analysis/src/main/resources/META-INF/orm/MerchantBiMatterMapper.xml
0 → 100644
View file @
62321fd
<?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=
"cn.com.glsx.dj.peanalysis.mapper.MerchantBiMatterMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.dj.peanalysis.model.MerchantBiMatter"
>
<!--
WARNING - @mbg.generated
-->
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"store_no"
property=
"storeNo"
jdbcType=
"VARCHAR"
/>
<result
column=
"store_name"
property=
"storeName"
jdbcType=
"VARCHAR"
/>
<result
column=
"online_operator"
property=
"onlineOperator"
jdbcType=
"VARCHAR"
/>
<result
column=
"area_operator"
property=
"areaOperator"
jdbcType=
"VARCHAR"
/>
<result
column=
"creator"
property=
"creator"
jdbcType=
"VARCHAR"
/>
<result
column=
"created_at"
property=
"createdAt"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"status"
property=
"status"
jdbcType=
"INTEGER"
/>
<result
column=
"handler"
property=
"handler"
jdbcType=
"VARCHAR"
/>
<result
column=
"handled_at"
property=
"handledAt"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"description"
property=
"description"
jdbcType=
"LONGVARCHAR"
/>
<result
column=
"handling_strategy"
property=
"handlingStrategy"
jdbcType=
"LONGVARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbg.generated
-->
id, store_no, store_name, online_operator, area_operator, creator, created_at, status,
handler, handled_at, description, handling_strategy
</sql>
<select
id=
"selectMerchantBiMatterPage"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from dj_merchant_bi_matter
where 1=1
<if
test=
"condition.storeNo != null"
>
and store_no = #{condition.storeNo}
</if>
<if
test=
"condition.startTime != null"
>
and created_at
>
#{condition.startTime}
</if>
<if
test=
"condition.endTime != null"
>
and created_at
<
#{condition.endTime}
</if>
</select>
<select
id=
"findMerchantBiMatter"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from dj_merchant_bi_matter
where 1=1
<if
test=
"condition.staffUUid != null"
>
and find_in_set (#{condition.staffUUid},online_operator) or find_in_set (#{condition.staffUUid},area_operator) or creator=#{condition.staffUUid}
</if>
</select>
</mapper>
\ No newline at end of file
\ No newline at end of file
rpc-dj-pe-analysis/src/main/resources/META-INF/orm/MerchantProfitOpeLogMapper.xml
0 → 100644
View file @
62321fd
<?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=
"cn.com.glsx.dj.peanalysis.mapper.MerchantProfitOpeLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.dj.peanalysis.model.MerchantProfitOpeLog"
>
<!--
WARNING - @mbg.generated
-->
<id
column=
"log_id"
property=
"logId"
jdbcType=
"BIGINT"
/>
<result
column=
"action_type"
property=
"actionType"
jdbcType=
"VARCHAR"
/>
<result
column=
"operator"
property=
"operator"
jdbcType=
"VARCHAR"
/>
<result
column=
"record_id"
property=
"recordId"
jdbcType=
"BIGINT"
/>
<result
column=
"created_at"
property=
"createdAt"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"ResultMapWithBLOBs"
type=
"cn.com.glsx.dj.peanalysis.model.MerchantProfitOpeLog"
extends=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
-->
<result
column=
"details"
property=
"details"
jdbcType=
"LONGVARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbg.generated
-->
log_id, action_type, operator, record_id, created_at
</sql>
<sql
id=
"Blob_Column_List"
>
<!--
WARNING - @mbg.generated
-->
details
</sql>
</mapper>
\ No newline at end of file
\ No newline at end of file
rpc-dj-pe-analysis/src/main/resources/META-INF/orm/MerchantProfitRecordMapper.xml
0 → 100644
View file @
62321fd
<?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=
"cn.com.glsx.dj.peanalysis.mapper.MerchantProfitRecordMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.dj.peanalysis.model.MerchantProfitRecord"
>
<!--
WARNING - @mbg.generated
-->
<id
column=
"record_id"
property=
"recordId"
jdbcType=
"BIGINT"
/>
<result
column=
"store_id"
property=
"storeId"
jdbcType=
"BIGINT"
/>
<result
column=
"business_type"
property=
"businessType"
jdbcType=
"VARCHAR"
/>
<result
column=
"month_year"
property=
"monthYear"
jdbcType=
"DATE"
/>
<result
column=
"profit_amount"
property=
"profitAmount"
jdbcType=
"DECIMAL"
/>
<result
column=
"created_at"
property=
"createdAt"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"updated_at"
property=
"updatedAt"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbg.generated
-->
record_id, store_id, business_type, month_year, profit_amount, created_at, updated_at
</sql>
<!-- 公共 WHERE 条件片段 -->
<sql
id=
"whereClause"
>
<where>
p.del_flag = 0
<!-- 门店名称模糊匹配(需关联 store_info 表) -->
<if
test=
"query.storeName != null and query.storeName != ''"
>
AND s.store_name LIKE CONCAT('%', #{query.storeName}, '%')
</if>
<!-- 业务类型 -->
<if
test=
"query.businessType != null and query.businessType != '' and query.businessType != '全部'"
>
AND p.business_type = #{query.businessType}
</if>
<!-- 所属月份 -->
<if
test=
"query.monthYear != null and query.monthYear != '' and query.monthYear != '全部'"
>
<!-- 校验格式可由 Service 层处理,此处直接等值匹配 -->
AND p.month_year = #{query.monthYear}
</if>
<!-- 导入时间范围 -->
<if
test=
"query.importStartTime != null"
>
AND p.created_at >= #{query.importStartTime}
</if>
<if
test=
"query.importEndTime != null"
>
<![CDATA[
AND p.created_at <= DATE_ADD(#{query.importEndTime}, INTERVAL 1 DAY)
]]>
<!-- 或者在 Service 中将 endTime 设为 23:59:59 -->
</if>
</where>
</sql>
<!-- 分页查询 -->
<select
id=
"selectProfitRecordPage"
resultMap=
"BaseResultMap"
>
SELECT
p.record_id,
s.store_name,
p.business_type,
p.month_year,
p.profit_amount,
p.created_at
FROM profit_record p
INNER JOIN store_info s ON p.store_id = s.store_id
<include
refid=
"whereClause"
/>
ORDER BY p.created_at DESC
</select>
<!-- 导出用:全量查询 -->
<select
id=
"selectProfitRecordList"
resultMap=
"BaseResultMap"
>
SELECT
p.record_id,
s.store_name,
p.business_type,
p.month_year,
p.profit_amount,
p.created_at
FROM profit_record p
INNER JOIN store_info s ON p.store_id = s.store_id
<include
refid=
"whereClause"
/>
ORDER BY p.created_at DESC
</select>
</mapper>
\ No newline at end of file
\ No newline at end of file
rpc-dj-pe-analysis/src/main/resources/META-INF/orm/ProvinceRganizationMapper.xml
0 → 100644
View file @
62321fd
<?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=
"cn.com.glsx.dj.peanalysis.mapper.ProvinceRganizationMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.dj.peanalysis.model.ProvinceRganization"
>
<!--
WARNING - @mbg.generated
-->
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"province_id"
property=
"provinceId"
jdbcType=
"INTEGER"
/>
<result
column=
"user_uuid"
property=
"userUuid"
jdbcType=
"VARCHAR"
/>
<result
column=
"role_type"
property=
"roleType"
jdbcType=
"TINYINT"
/>
<result
column=
"created_by"
property=
"createdBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"created_date"
property=
"createdDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"updated_by"
property=
"updatedBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"updated_date"
property=
"updatedDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"deleted_flag"
property=
"deletedFlag"
jdbcType=
"CHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbg.generated
-->
id, province_id, user_uuid, role_type, created_by, created_date, updated_by, updated_date,
deleted_flag
</sql>
<update
id=
"updateDelByProvinceId"
>
update dj_car_life_province_organization
set deleted_flag = 'D',updated_by = #{updatedBy},updated_date = now ()
where province_id = #{provinceId}
and deleted_flag = 'N'
</update>
<select
id=
"selectListByProvinceId"
resultType=
"cn.com.glsx.dj.peanalysis.model.ProvinceRganization"
>
select
<include
refid=
"Base_Column_List"
/>
from dj_car_life_province_organization
where province_id = #{provinceId}
</select>
<select
id=
"selectProvinceListPage"
resultType=
"cn.com.glsx.dj.peanalysis.dto.res.ProvinceListRes"
>
select
province_id,
province_name,
GROUP_CONCAT(
CASE WHEN role_type = 1 THEN user_name END
ORDER BY created_date DESC
SEPARATOR ','
) AS province_organization_list1,
GROUP_CONCAT(
CASE WHEN role_type = 2 THEN user_name END
ORDER BY created_date DESC
SEPARATOR ','
) AS province_organization_list2,
created_date
from dj_car_life_province_organization
group by province_id
order by created_date desc
</select>
</mapper>
\ No newline at end of file
\ No newline at end of file
rpc-dj-pe-analysis/src/main/resources/templates/merchant_profit_template.xlsx
0 → 100644
View file @
62321fd
No preview for this file type
rpc-dj-pe-analysis/src/test/resources/generatorConfig.xml
View file @
62321fd
...
@@ -11,7 +11,8 @@
...
@@ -11,7 +11,8 @@
<!--<property name="beginningDelimiter" value="`"/>-->
<!--<property name="beginningDelimiter" value="`"/>-->
<!--<property name="endingDelimiter" value="`"/>-->
<!--<property name="endingDelimiter" value="`"/>-->
</plugin>
</plugin>
<jdbcConnection
driverClass=
"com.mysql.jdbc.Driver"
connectionURL=
"jdbc:mysql://192.168.3.227:3306/数据库名?characterEncoding=utf8"
userId=
"dev_admin"
password=
"1f7e1ed2"
/>
<jdbcConnection
driverClass=
"com.mysql.jdbc.Driver"
connectionURL=
"jdbc:mysql://192.168.3.227:3306/dj_smartcarlife?characterEncoding=utf8"
userId=
"dev_admin"
password=
"1f7e1ed2"
/>
<!-- <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://192.168.3.227:3306/agi?characterEncoding=utf8" userId="dev_admin" password="1f7e1ed2" />-->
<javaTypeResolver>
<javaTypeResolver>
<property
name=
"forceBigDecimals"
value=
"false"
/>
<property
name=
"forceBigDecimals"
value=
"false"
/>
</javaTypeResolver>
</javaTypeResolver>
...
@@ -26,8 +27,33 @@
...
@@ -26,8 +27,33 @@
<property
name=
"enableSubPackages"
value=
"true"
/>
<property
name=
"enableSubPackages"
value=
"true"
/>
</javaClientGenerator>
</javaClientGenerator>
<!-- 可配置多个 -->
<!-- 可配置多个 -->
<table
tableName=
"数据库表名"
domainObjectName=
"Java数据模型名"
enableSelectByExample=
"false"
enableCountByExample=
"false"
enableDeleteByExample=
"false"
enableUpdateByExample=
"false"
>
<table
tableName=
"dj_car_life_province_organization"
domainObjectName=
"ProvinceRganization"
enableSelectByExample=
"false"
enableCountByExample=
"false"
enableDeleteByExample=
"false"
enableUpdateByExample=
"false"
>
<generatedKey
column=
"id"
sqlStatement=
"MySql"
identity=
"true"
/>
<generatedKey
column=
"id"
sqlStatement=
"MySql"
identity=
"true"
/>
</table>
</table>
<!-- <table tableName="dj_merchant_profit_operation_log" domainObjectName="MerchantProfitOpeLog" enableSelectByExample="false" enableCountByExample="false" enableDeleteByExample="false" enableUpdateByExample="false">
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table>-->
<!-- <table tableName="sop_task_detail_info" domainObjectName="SopTaskDetailInfo" enableSelectByExample="false" enableCountByExample="false" enableDeleteByExample="false" enableUpdateByExample="false">-->
<!-- <generatedKey column="id" sqlStatement="MySql" identity="true"/>-->
<!-- </table>-->
<!-- <table tableName="inspection_badge_recordings" domainObjectName="BadgeRecordings" enableSelectByExample="false" enableCountByExample="false" enableDeleteByExample="false" enableUpdateByExample="false">-->
<!-- <generatedKey column="id" sqlStatement="MySql" identity="true"/>-->
<!-- </table>-->
<!-- <table tableName="inspection_conversation_batch" domainObjectName="ConversationBatch" enableSelectByExample="false" enableCountByExample="false" enableDeleteByExample="false" enableUpdateByExample="false">-->
<!-- <generatedKey column="id" sqlStatement="MySql" identity="true"/>-->
<!-- </table>-->
<!-- <table tableName="inspection_conversation_date" domainObjectName="ConversationDate" enableSelectByExample="false" enableCountByExample="false" enableDeleteByExample="false" enableUpdateByExample="false">-->
<!-- <generatedKey column="id" sqlStatement="MySql" identity="true"/>-->
<!-- </table>-->
<!-- <table tableName="inspection_conversation_detail" domainObjectName="ConversationDetail" enableSelectByExample="false" enableCountByExample="false" enableDeleteByExample="false" enableUpdateByExample="false">-->
<!-- <generatedKey column="id" sqlStatement="MySql" identity="true"/>-->
<!-- </table>-->
<!-- <table tableName="inspection_conversation_check_detail" domainObjectName="ConversationCheckDetail" enableSelectByExample="false" enableCountByExample="false" enableDeleteByExample="false" enableUpdateByExample="false">-->
<!-- <generatedKey column="id" sqlStatement="MySql" identity="true"/>-->
<!-- </table>-->
<!-- <table tableName="inspection_employee_badge" domainObjectName="EmployeeBadge" enableSelectByExample="false" enableCountByExample="false" enableDeleteByExample="false" enableUpdateByExample="false">-->
<!-- <generatedKey column="id" sqlStatement="MySql" identity="true"/>-->
<!-- </table>-->
</context>
</context>
</generatorConfiguration>
</generatorConfiguration>
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment