Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dm_project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姚本章
dm_project
Commits
2e756f4b
Commit
2e756f4b
authored
Dec 06, 2020
by
zhangc
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dm_dev' of gitlab.ioubuy.cn:yaobenzhang/dm_project into dm_dev
parents
0dec75c4
32cfec23
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
115 additions
and
36 deletions
+115
-36
MybatisPlusConfig.java
...jz/manage/config/mybatisPlusConfig/MybatisPlusConfig.java
+10
-1
SwaggerConfiguration.java
.../jz/manage/config/swaggerConfig/SwaggerConfiguration.java
+1
-1
OrderCountInfoDto.java
...moduls/controller/finance/platForm/OrderCountInfoDto.java
+29
-16
TradeDetilDto.java
...age/moduls/controller/finance/platForm/TradeDetilDto.java
+3
-5
TradeDetilRequest.java
...moduls/controller/finance/platForm/TradeDetilRequest.java
+3
-5
PlatformTradeFlowInfoServiceImpl.java
...moduls/service/impl/PlatformTradeFlowInfoServiceImpl.java
+27
-3
PlatformTradeFlowInfoDao.xml
...ain/resources/mapper/finance/PlatformTradeFlowInfoDao.xml
+39
-2
pom.xml
pom.xml
+3
-3
No files found.
jz-dm-manage/src/main/java/com/jz/manage/config/mybatisPlusConfig/MybatisPlusConfig.java
View file @
2e756f4b
package
com
.
jz
.
manage
.
config
.
mybatisPlusConfig
;
import
com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer
;
import
com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.optimize.JsqlParserCountOptimize
;
import
org.mybatis.spring.annotation.MapperScan
;
...
...
@@ -29,6 +30,14 @@ public class MybatisPlusConfig {
paginationInterceptor
.
setCountSqlParser
(
new
JsqlParserCountOptimize
(
true
));
return
paginationInterceptor
;
}
@Bean
ConfigurationCustomizer
mybatisConfigurationCustomizer
()
{
return
new
ConfigurationCustomizer
()
{
@Override
public
void
customize
(
org
.
apache
.
ibatis
.
session
.
Configuration
configuration
)
{
configuration
.
addInterceptor
(
new
com
.
github
.
pagehelper
.
PageInterceptor
());
}
};
}
}
jz-dm-manage/src/main/java/com/jz/manage/config/swaggerConfig/SwaggerConfiguration.java
View file @
2e756f4b
...
...
@@ -33,7 +33,7 @@ public class SwaggerConfiguration {
private
ApiInfo
apiInfo
()
{
return
new
ApiInfoBuilder
()
.
title
(
"数据
商城
平台 RESTful APIs"
)
.
title
(
"数据平台 RESTful APIs"
)
.
description
(
"swagger-bootstrap-ui"
)
.
termsOfServiceUrl
(
"http://localhost:5050/"
)
.
contact
(
"Bellamy"
)
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/finance/platForm/OrderCountInfoDto.java
View file @
2e756f4b
...
...
@@ -6,38 +6,51 @@ import io.swagger.annotations.ApiModelProperty;
import
java.math.BigDecimal
;
/**
* 平台利润中心--
累计收入和企业总数
* 平台利润中心--
我的订单--返回对象
*
* @author Bellamy
* @since 2020-12-01 10:41:43
*/
@ApiModel
(
value
=
"
累计收入和企业总数返回对象"
,
description
=
"累计收入和企业总数
返回对象"
)
@ApiModel
(
value
=
"
我的订单--返回对象"
,
description
=
"我的订单--
返回对象"
)
public
class
OrderCountInfoDto
{
/**
*
累计收入
*
订单金额
*/
@ApiModelProperty
(
value
=
"
累计收入
"
)
private
BigDecimal
platformReceive
Money
;
@ApiModelProperty
(
value
=
"
订单金额
"
)
private
BigDecimal
order
Money
;
/**
*
企业总数
*
订单时间
*/
@ApiModelProperty
(
value
=
"企业总数"
)
private
String
departTotal
;
@ApiModelProperty
(
value
=
"订单时间"
)
private
String
orderTime
;
/**
* 订单总数
*/
@ApiModelProperty
(
value
=
"订单总数"
)
private
String
orderTotal
;
public
BigDecimal
getOrderMoney
()
{
return
orderMoney
;
}
public
void
setOrderMoney
(
BigDecimal
orderMoney
)
{
this
.
orderMoney
=
orderMoney
;
}
public
BigDecimal
getPlatformReceiveMoney
()
{
return
platformReceiveMoney
;
public
String
getOrderTime
()
{
return
orderTime
;
}
public
void
set
PlatformReceiveMoney
(
BigDecimal
platformReceiveMoney
)
{
this
.
platformReceiveMoney
=
platformReceiveMoney
;
public
void
set
OrderTime
(
String
orderTime
)
{
this
.
orderTime
=
orderTime
;
}
public
String
get
Depart
Total
()
{
return
depart
Total
;
public
String
get
Order
Total
()
{
return
order
Total
;
}
public
void
set
DepartTotal
(
String
depart
Total
)
{
this
.
departTotal
=
depart
Total
;
public
void
set
OrderTotal
(
String
order
Total
)
{
this
.
orderTotal
=
order
Total
;
}
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/finance/platForm/TradeDetilDto.java
View file @
2e756f4b
...
...
@@ -4,8 +4,6 @@ import com.jz.common.bean.BasePageBean;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.math.BigDecimal
;
/**
* 平台利润中心--财务管理交易明细返回对象
*
...
...
@@ -19,7 +17,7 @@ public class TradeDetilDto extends BasePageBean {
* 企业名
*/
@ApiModelProperty
(
value
=
"企业名"
)
private
BigDecimal
departmentName
;
private
String
departmentName
;
/**
* 数据名称
*/
...
...
@@ -38,11 +36,11 @@ public class TradeDetilDto extends BasePageBean {
@ApiModelProperty
(
value
=
"订单方式"
)
private
String
orderMethod
;
public
BigDecimal
getDepartmentName
()
{
public
String
getDepartmentName
()
{
return
departmentName
;
}
public
void
setDepartmentName
(
BigDecimal
departmentName
)
{
public
void
setDepartmentName
(
String
departmentName
)
{
this
.
departmentName
=
departmentName
;
}
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/finance/platForm/TradeDetilRequest.java
View file @
2e756f4b
...
...
@@ -4,8 +4,6 @@ import com.jz.common.bean.BasePageBean;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.math.BigDecimal
;
/**
* 平台利润中心--财务管理交易明细参数对象
*
...
...
@@ -19,7 +17,7 @@ public class TradeDetilRequest extends BasePageBean {
* 企业名
*/
@ApiModelProperty
(
value
=
"企业名"
)
private
BigDecimal
departmentName
;
private
String
departmentName
;
/**
* 数据名称
*/
...
...
@@ -38,11 +36,11 @@ public class TradeDetilRequest extends BasePageBean {
@ApiModelProperty
(
value
=
"订单方式"
)
private
String
orderMethod
;
public
BigDecimal
getDepartmentName
()
{
public
String
getDepartmentName
()
{
return
departmentName
;
}
public
void
setDepartmentName
(
BigDecimal
departmentName
)
{
public
void
setDepartmentName
(
String
departmentName
)
{
this
.
departmentName
=
departmentName
;
}
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/impl/PlatformTradeFlowInfoServiceImpl.java
View file @
2e756f4b
...
...
@@ -11,6 +11,7 @@ import com.jz.manage.moduls.controller.finance.platForm.TradeDetilDto;
import
com.jz.manage.moduls.controller.finance.platForm.TradeDetilRequest
;
import
com.jz.manage.moduls.mapper.PlatformTradeFlowInfoDao
;
import
com.jz.manage.moduls.service.PlatformTradeFlowInfoService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -38,6 +39,9 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe
return
platformTradeFlowInfoDao
.
queryPlatFormMoneyAndDepart
(
map
);
}
/*
* 财务管理---我的订单
* */
@Override
public
PageInfoResponse
<
OrderCountInfoDto
>
findListOrderCount
(
BasePageBean
pageBean
,
HttpServletRequest
httpRequest
)
throws
Exception
{
PageInfoResponse
<
OrderCountInfoDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
...
...
@@ -45,8 +49,9 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe
Map
param
=
new
HashMap
();
//从session中获取平台用户id
//SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser");
//map.put("userId", user.getUserId());
//param.put("userId", user.getUserId());
//param.put("pageNum", pageBean.getPageNum());
//param.put("pageSize", pageBean.getPageSize());
PageHelper
.
startPage
(
pageBean
.
getPageNum
(),
pageBean
.
getPageSize
());
List
<
OrderCountInfoDto
>
list
=
platformTradeFlowInfoDao
.
findListOrderCount
(
param
);
PageInfo
<
OrderCountInfoDto
>
pageInfo
=
new
PageInfo
<>(
list
);
...
...
@@ -57,6 +62,9 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe
return
pageInfoResponse
;
}
/*
* 财务管理--交易明细
* */
@Override
public
PageInfoResponse
<
TradeDetilDto
>
findListFinanceTradeDetil
(
TradeDetilRequest
tradeDetilRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
PageInfoResponse
<
TradeDetilDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
...
...
@@ -64,7 +72,23 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe
Map
param
=
new
HashMap
();
//从session中获取平台用户id
//SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser");
//map.put("userId", user.getUserId());
//param.put("userId", user.getUserId());
//数据行业
if
(
StringUtils
.
isNotEmpty
(
tradeDetilRequest
.
getCategoryId
()))
{
param
.
put
(
"categoryId"
,
tradeDetilRequest
.
getCategoryId
());
}
//订单方式
if
(
StringUtils
.
isNotEmpty
(
tradeDetilRequest
.
getOrderMethod
()))
{
param
.
put
(
"orderMethod"
,
tradeDetilRequest
.
getOrderMethod
());
}
//企业名
if
(
StringUtils
.
isNotEmpty
(
tradeDetilRequest
.
getDepartmentName
()))
{
param
.
put
(
"departmentName"
,
tradeDetilRequest
.
getDepartmentName
());
}
//数据名称
if
(
StringUtils
.
isNotEmpty
(
tradeDetilRequest
.
getDataName
()))
{
param
.
put
(
"dataName"
,
tradeDetilRequest
.
getDataName
());
}
PageHelper
.
startPage
(
tradeDetilRequest
.
getPageNum
(),
tradeDetilRequest
.
getPageSize
());
List
<
TradeDetilDto
>
list
=
platformTradeFlowInfoDao
.
findListFinanceTradeDetil
(
param
);
...
...
jz-dm-manage/src/main/resources/mapper/finance/PlatformTradeFlowInfoDao.xml
View file @
2e756f4b
...
...
@@ -137,12 +137,49 @@
)t2
</select>
<!--平台利润中心,我的订单-->
<select
id=
"findListOrderCount"
resultType=
"com.jz.manage.moduls.controller.finance.platForm.OrderCountInfoDto"
parameterType=
"map"
>
select
t1.orderTime,
ifnull(sum(t1.orderMoney),'0') as orderMoney,
count(t1.orderId) as orderTotal
from(
select
date_format(order_time,'%Y-%m-%d') as orderTime,
order_money as orderMoney,
order_id as orderId
from t_order
where 1=1 and order_status='02' and del_flag='N'
<if
test=
"sellerId != null"
>
seller_id=#{sellerId}
</if>
) t1
group by t1.orderTime
order by t1.orderTime desc
</select>
<!--平台利润中心,订单交易明细-->
<select
id=
"findListFinanceTradeDetil"
resultType=
"com.jz.manage.moduls.controller.finance.platForm.TradeDetilDto"
parameterType=
"map"
>
select
t1.order_id,
t1.order_number as orderNumber,
t1.order_time as orderTime,
t1.order_money as orderMoney,
(case when t1.payment_method ='01' then '余额' else '其他' end) as paymentMethod,
(case when t1.purchase_method ='01' then '年' when t1.purchase_method ='02' then '季' when t1.purchase_method ='03' then '月'
when t1.purchase_method ='04' then '次' end) as purchaseMethod,
t3.data_name as dataName,
t3.category_id as categoryId,
t5.department_name as departmentName
from t_order t1
inner join t_order_goods_info t2 on t1.order_id=t2.order_id
inner join t_data_goods t3 on t2.data_goods_id=t3.data_goods_id
left join t_mall_customer t4 on t4.customer_id=t1.customer_id and t4.del_flag='N'
left join t_department t5 on t5.department_id=t4.department_id and t5.del_flag='N'
where 1=1 and t1.order_status='02' and t1.del_flag='N'
<if
test=
"creTime != null"
>
and date_format(t1.cre_time,'%Y-%m-%d')= #{creTime}
</if>
<if
test=
"departmentName != null"
>
and t5.department_name like concat('%',#{departmentName},'%')
</if>
<if
test=
"dataName != null"
>
and t3.data_name like concat('%',#{dataName},'%')
</if>
<if
test=
"categoryId != null"
>
and t3.category_id = #{categoryId}
</if>
<if
test=
"orderMethod != null"
>
and t1.purchase_method = #{orderMethod}
</if>
</select>
</mapper>
\ No newline at end of file
pom.xml
View file @
2e756f4b
...
...
@@ -15,7 +15,7 @@
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<alibaba.fastjson.version>
1.2.47
</alibaba.fastjson.version>
<mybatis-pagehelper.version>
4.2.0
</mybatis-pagehelper.version>
<mybatis-pagehelper.version>
5.1.6
</mybatis-pagehelper.version>
<mysql-connector.version>
5.1.48
</mysql-connector.version>
<druid.version>
1.1.12
</druid.version>
<mybatis-spring.version>
1.3.1
</mybatis-spring.version>
...
...
@@ -73,11 +73,11 @@
</dependency>
<!-- spring boot 和mybatis -->
<dependency>
<
!--<
dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis-spring.version}</version>
</dependency>
</dependency>
-->
<!-- mybatis plus -->
<dependency>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment