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
58e75822
Commit
58e75822
authored
Dec 04, 2020
by
ysongq
Browse files
Options
Browse Files
Download
Plain Diff
ggg
parents
9b9b4d30
4f2273ad
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
870 additions
and
111 deletions
+870
-111
update.sql
database/mcb/update.sql
+2
-1
pom.xml
jz-dm-apigateway/pom.xml
+7
-7
pom.xml
jz-dm-common/pom.xml
+5
-4
BasePageBean.java
...common/src/main/java/com/jz/common/bean/BasePageBean.java
+8
-2
CommonsUtil.java
...common/src/main/java/com/jz/common/utils/CommonsUtil.java
+11
-0
pom.xml
jz-dm-mall/pom.xml
+5
-5
CompanyAuthController.java
...mall/moduls/controller/company/CompanyAuthController.java
+8
-12
CompanyAddReq.java
...dm/mall/moduls/controller/company/bean/CompanyAddReq.java
+1
-1
CompanyUpdateReq.java
...mall/moduls/controller/company/bean/CompanyUpdateReq.java
+1
-1
FinanceTradeFlowController.java
...moduls/controller/finance/FinanceTradeFlowController.java
+46
-18
EveryTradeFlowDto.java
...all/moduls/controller/finance/bean/EveryTradeFlowDto.java
+124
-0
EveryTradeFlowRequest.java
...moduls/controller/finance/bean/EveryTradeFlowRequest.java
+30
-0
FinanceTradeFlowDto.java
...l/moduls/controller/finance/bean/FinanceTradeFlowDto.java
+99
-0
LogInfoController.java
...m/jz/dm/mall/moduls/controller/log/LogInfoController.java
+4
-2
PlatformLog.java
...c/main/java/com/jz/dm/mall/moduls/entity/PlatformLog.java
+274
-0
FinanceTradeFlowDao.java
...ava/com/jz/dm/mall/moduls/mapper/FinanceTradeFlowDao.java
+6
-0
MallCustomerDao.java
...in/java/com/jz/dm/mall/moduls/mapper/MallCustomerDao.java
+8
-3
CompanyAuthService.java
...ava/com/jz/dm/mall/moduls/service/CompanyAuthService.java
+10
-4
FinanceTradeFlowService.java
...om/jz/dm/mall/moduls/service/FinanceTradeFlowService.java
+8
-4
LogInfoService.java
...in/java/com/jz/dm/mall/moduls/service/LogInfoService.java
+4
-1
CompanyAuthServiceImpl.java
...z/dm/mall/moduls/service/impl/CompanyAuthServiceImpl.java
+34
-32
FinanceTradeFlowServiceImpl.java
...mall/moduls/service/impl/FinanceTradeFlowServiceImpl.java
+46
-5
LogInfoServiceImpl.java
...om/jz/dm/mall/moduls/service/impl/LogInfoServiceImpl.java
+18
-6
FinanceCustomerAssetsDao.xml
...rc/main/resources/mapperconf/FinanceCustomerAssetsDao.xml
+3
-0
FinanceTradeFlowDao.xml
...all/src/main/resources/mapperconf/FinanceTradeFlowDao.xml
+52
-0
MallCustomerDao.xml
jz-dm-mall/src/main/resources/mapperconf/MallCustomerDao.xml
+9
-0
PlatformLogDao.xml
jz-dm-mall/src/main/resources/mapperconf/PlatformLogDao.xml
+25
-3
ManageLogInfoQueryReq.java
...age/moduls/controller/log/bean/ManageLogInfoQueryReq.java
+22
-0
No files found.
database/mcb/update.sql
View file @
58e75822
alter
table
t_finance_customer_assets
add
remark
text
COMMENT
'备注'
;
alter
table
t_platform_log
add
caller_type
char
(
2
)
NOT
NULL
COMMENT
'调用类型:01商城用户,02平台用户'
;
\ No newline at end of file
alter
table
t_platform_log
add
caller_type
char
(
2
)
NOT
NULL
COMMENT
'调用类型:01商城用户,02平台用户'
;
alter
table
t_finance_trade_flow
add
assets_id
Bigint
(
20
)
default
NULL
COMMENT
'企业资产id'
;
\ No newline at end of file
jz-dm-apigateway/pom.xml
View file @
58e75822
...
...
@@ -38,7 +38,6 @@
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
druid
</artifactId>
<version>
1.0.29
</version>
</dependency>
<!-- 提供mysql驱动 -->
...
...
@@ -52,12 +51,7 @@
<artifactId>
httpclient
</artifactId>
<version>
4.5.6
</version>
</dependency>
<dependency>
<groupId>
org.junit.jupiter
</groupId>
<artifactId>
junit-jupiter
</artifactId>
<version>
RELEASE
</version>
<scope>
test
</scope>
</dependency>
<!--lang3工具类-->
<dependency>
<groupId>
org.apache.commons
</groupId>
...
...
@@ -68,6 +62,12 @@
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
</dependency>
<dependency>
<groupId>
org.junit.jupiter
</groupId>
<artifactId>
junit-jupiter
</artifactId>
<version>
RELEASE
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
...
...
jz-dm-common/pom.xml
View file @
58e75822
...
...
@@ -19,6 +19,10 @@
</properties>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-aop
</artifactId>
...
...
@@ -75,10 +79,7 @@
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<!--阿里云服务器短信平台-->
<dependency>
<groupId>
com.aliyun
</groupId>
...
...
jz-dm-common/src/main/java/com/jz/common/bean/BasePageBean.java
View file @
58e75822
package
com
.
jz
.
common
.
bean
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**分页信息封装
* @author ybz
*
*/
@ApiModel
(
value
=
"分页参数对象"
,
description
=
"分页参数对象"
)
public
class
BasePageBean
{
@ApiModelProperty
(
value
=
"当前页码值"
)
private
int
pageNum
=
1
;
@ApiModelProperty
(
value
=
"每页条数"
)
private
int
pageSize
=
10
;
public
int
getPageNum
()
{
...
...
jz-dm-common/src/main/java/com/jz/common/utils/CommonsUtil.java
View file @
58e75822
...
...
@@ -43,4 +43,15 @@ public class CommonsUtil implements Serializable {
}
return
dt
;
}
/**
* 按指定格式返回字符串当前日期时间
*
* @return
*/
public
static
String
getDate2String
(
String
curDateFormat
,
Date
date
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
curDateFormat
);
String
sd
=
sdf
.
format
(
date
);
return
sd
;
}
}
jz-dm-mall/pom.xml
View file @
58e75822
...
...
@@ -84,7 +84,10 @@
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
io.projectreactor
</groupId>
<artifactId>
reactor-core
</artifactId>
</dependency>
<!--mybatis分页插件 -->
<dependency>
<groupId>
com.github.pagehelper
</groupId>
...
...
@@ -125,9 +128,6 @@
<version>
1.0.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
io.projectreactor
</groupId>
<artifactId>
reactor-core
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/company/CompanyAuthController.java
View file @
58e75822
...
...
@@ -42,8 +42,8 @@ public class CompanyAuthController {
*/
@PostMapping
(
"/add"
)
@ApiOperation
(
value
=
"企业信息提交"
)
public
Mono
<
Result
>
addCompanyAuth
(
@RequestBody
@Validated
CompanyAddReq
req
)
{
return
Mono
.
fromSupplier
(()
->
companyAuthService
.
addCompanyData
(
req
));
public
Mono
<
Result
>
addCompanyAuth
(
@RequestBody
@Validated
CompanyAddReq
req
,
HttpServletRequest
request
)
{
return
Mono
.
fromSupplier
(()
->
companyAuthService
.
addCompanyData
(
req
,
request
));
}
/**
...
...
@@ -53,12 +53,8 @@ public class CompanyAuthController {
*/
@GetMapping
(
"/findCompany"
)
@ApiOperation
(
value
=
"企业认证信息查询"
)
public
Mono
<
Result
>
selectCompany
(
@RequestParam
(
value
=
"type"
)
String
type
)
{
return
Mono
.
fromSupplier
(()
->{
//TODO 获取当前登录用户
//httpRequest.getSession().getServletContext().getAttribute("customer_id");
return
Result
.
ok
(
companyAuthService
.
selectCompany
(
type
));
});
public
Mono
<
Result
>
selectCompany
(
@RequestParam
(
value
=
"type"
)
String
type
,
HttpServletRequest
request
)
{
return
Mono
.
fromSupplier
(()
->
Result
.
of_success
(
companyAuthService
.
selectCompany
(
type
,
request
)));
}
/**
* @Description: 企业认证信息更新
...
...
@@ -67,8 +63,8 @@ public class CompanyAuthController {
*/
@GetMapping
(
"/updateCompany"
)
@ApiOperation
(
value
=
"企业认证信息更新"
)
public
Mono
<
Result
>
updateCompany
(
@RequestBody
@Validated
CompanyUpdateReq
req
)
{
return
Mono
.
fromSupplier
(()
->
companyAuthService
.
updateCompanyInfo
(
req
));
public
Mono
<
Result
>
updateCompany
(
@RequestBody
@Validated
CompanyUpdateReq
req
,
HttpServletRequest
request
)
{
return
Mono
.
fromSupplier
(()
->
companyAuthService
.
updateCompanyInfo
(
req
,
request
));
}
/**
* @Description: 企业认证信息更新
...
...
@@ -77,7 +73,7 @@ public class CompanyAuthController {
*/
@GetMapping
(
"/checkCompany"
)
@ApiOperation
(
value
=
"企业认证信息校验"
)
public
Mono
<
Result
>
checkCompany
()
{
return
Mono
.
fromSupplier
(()
->
companyAuthService
.
checkCompanyInfo
());
public
Mono
<
Result
>
checkCompany
(
HttpServletRequest
request
)
{
return
Mono
.
fromSupplier
(()
->
companyAuthService
.
checkCompanyInfo
(
request
));
}
}
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/company/bean/CompanyAddReq.java
View file @
58e75822
...
...
@@ -60,7 +60,7 @@ public class CompanyAddReq implements Serializable {
private
String
telephone
;
@ApiModelProperty
(
name
=
"登录用户id"
,
hidden
=
true
)
private
Long
customer
Id
;
private
Long
login
Id
;
@ApiModelProperty
(
name
=
"登录用户名称"
,
hidden
=
true
)
private
String
LoginName
;
...
...
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/company/bean/CompanyUpdateReq.java
View file @
58e75822
...
...
@@ -62,7 +62,7 @@ public class CompanyUpdateReq implements Serializable {
private
String
telephone
;
@ApiModelProperty
(
name
=
"登录用户id"
,
hidden
=
true
)
private
Long
customer
Id
;
private
Long
login
Id
;
@ApiModelProperty
(
name
=
"登录用户名称"
,
hidden
=
true
)
private
String
loginName
;
}
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/finance/FinanceTradeFlowController.java
View file @
58e75822
package
com
.
jz
.
dm
.
mall
.
moduls
.
controller
.
finance
;
import
com.jz.common.base.BaseController
;
import
com.jz.common.bean.BasePageBean
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.utils.Result
;
import
com.jz.dm.mall.moduls.controller.finance.bean.FinanceCashOutDto
;
import
com.jz.dm.mall.moduls.controller.finance.bean.FinanceCashOutRequest
;
import
com.jz.dm.mall.moduls.controller.finance.bean.FinanceCustomerAssetsDto
;
import
com.jz.dm.mall.moduls.controller.finance.bean.FinanceCustomerBalanceRequest
;
import
com.jz.dm.mall.moduls.controller.finance.bean.*
;
import
com.jz.dm.mall.moduls.service.FinanceTradeFlowService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -26,7 +26,7 @@ import java.util.Map;
*/
@RestController
@RequestMapping
(
"/financeTradeFlow"
)
@Api
(
tags
=
"利润中心"
)
@Api
(
tags
=
"
商城--
利润中心"
)
public
class
FinanceTradeFlowController
extends
BaseController
{
/**
* 服务对象
...
...
@@ -63,14 +63,14 @@ public class FinanceTradeFlowController extends BaseController {
@ApiOperation
(
value
=
"充值----保存充值金额"
,
notes
=
"保存充值金额"
)
@ApiParam
()
public
Result
<
Object
>
uptAccountMoney
(
@RequestBody
FinanceCustomerBalanceRequest
customerBalanceRequest
,
HttpServletRequest
requset
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
customerBalanceRequest
.
getAssetsId
().
toString
()))
{
//企业资产id
if
(
StringUtils
.
isEmpty
(
customerBalanceRequest
.
getAssetsId
().
toString
()))
{
//企业资产id
return
Result
.
error
(
"参数不能为空!"
);
}
if
(
StringUtils
.
isEmpty
(
customerBalanceRequest
.
getBalanceMoney
().
toString
()))
{
//充值金额
if
(
StringUtils
.
isEmpty
(
customerBalanceRequest
.
getBalanceMoney
().
toString
()))
{
//充值金额
return
Result
.
error
(
"参数不能为空!"
);
}
Boolean
str
=
financeTradeFlowService
.
uptAccountMoney
(
customerBalanceRequest
);
if
(!
str
)
{
if
(!
str
)
{
return
Result
.
error
(
"提交失败!"
);
}
return
Result
.
ok
(
"提交成功!"
);
...
...
@@ -110,7 +110,7 @@ public class FinanceTradeFlowController extends BaseController {
map
.
put
(
"assetsId"
,
1
);
//企业资产账户id
map
.
put
(
"departmentId"
,
1
);
//企业ID
FinanceCashOutDto
dto
=
financeTradeFlowService
.
getCashOutAuditStutas
(
map
);
if
(
dto
.
getCashOutMoney
()
!=
null
)
{
if
(
dto
.
getCashOutMoney
()
!=
null
)
{
result
.
setData
(
dto
.
getCashOutMoney
());
result
.
setMessage
(
"存在提现审核记录!"
);
}
else
{
...
...
@@ -128,30 +128,58 @@ public class FinanceTradeFlowController extends BaseController {
@PostMapping
(
value
=
"/addCashOutMoney"
)
@ApiOperation
(
value
=
"提现----保存提现金额"
,
notes
=
"保存提现金额"
)
public
Result
<
Object
>
addCashOutMoney
(
@RequestBody
FinanceCashOutRequest
financeCashOutRequest
,
HttpServletRequest
requset
)
throws
Exception
{
if
(
financeCashOutRequest
.
getCashOutMoney
()
==
null
)
{
//提现金额
if
(
financeCashOutRequest
.
getCashOutMoney
()
==
null
)
{
//提现金额
return
Result
.
error
(
"参数不能为空!"
);
}
Result
<
Object
>
result
=
financeTradeFlowService
.
addCashOutMoney
(
financeCashOutRequest
);
Result
<
Object
>
result
=
financeTradeFlowService
.
addCashOutMoney
(
financeCashOutRequest
);
return
result
;
}
/**
*
订单管理列表
(分页查询)
*
收支情况
(分页查询)
*
* @author Bellamy
* @since 2020-12-04
*/
/*@PostMapping(value = "/list
")
@ApiOperation(value = "
订单管理列表(分页查询)", notes = "订单列表
(分页查询)")
public PageInfoResponse<FinanceTradeFlow
> queryPageList(
HttpServletRequest req) throws Exception {
PageInfoResponse<FinanceTradeFlow
> pageInfo = new PageInfoResponse<FinanceTradeFlow
>();
@PostMapping
(
value
=
"/receiveListInfo
"
)
@ApiOperation
(
value
=
"
收支情况(分页查询)"
,
notes
=
"收支情况
(分页查询)"
)
public
PageInfoResponse
<
FinanceTradeFlow
Dto
>
queryPageList
(
@RequestBody
BasePageBean
pageBean
,
HttpServletRequest
req
)
throws
Exception
{
PageInfoResponse
<
FinanceTradeFlow
Dto
>
pageInfo
=
new
PageInfoResponse
<
FinanceTradeFlowDto
>();
Map
map
=
new
HashMap
();
try
{
pageInfo = financeTradeFlowService.findList
TradeFlow(map,
req);
pageInfo
=
financeTradeFlowService
.
findList
ScTradeFlow
(
pageBean
,
req
);
}
catch
(
Exception
e
)
{
pageInfo
.
setMessage
(
"查询失败"
);
pageInfo
.
setCode
(
Constants
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
pageInfo
;
}*/
}
/**
* 点击查看--每天--收支情况(分页查询)
*
* @author Bellamy
* @since 2020-12-04
*/
@PostMapping
(
value
=
"/everyPageLisInfo"
)
@ApiOperation
(
value
=
"点击查看--每天--收支情况(分页查询)"
,
notes
=
"点击查看--每天--收支情况(分页查询)"
)
public
PageInfoResponse
<
EveryTradeFlowDto
>
queryEveryDayPageList
(
@RequestBody
EveryTradeFlowRequest
everyTradeFlowRequest
,
HttpServletRequest
req
)
throws
Exception
{
PageInfoResponse
<
EveryTradeFlowDto
>
pageInfo
=
new
PageInfoResponse
<
EveryTradeFlowDto
>();
if
(
everyTradeFlowRequest
.
getCreTime
()
==
null
||
""
.
equals
(
everyTradeFlowRequest
.
getCreTime
()))
{
pageInfo
.
setMessage
(
"参数为空"
);
pageInfo
.
setCode
(
Constants
.
FAILURE_CODE
);
return
pageInfo
;
}
Map
map
=
new
HashMap
();
try
{
pageInfo
=
financeTradeFlowService
.
findListEveryDayScInfo
(
everyTradeFlowRequest
,
req
);
}
catch
(
Exception
e
)
{
pageInfo
.
setMessage
(
"查询失败"
);
pageInfo
.
setCode
(
Constants
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
pageInfo
;
}
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/finance/bean/EveryTradeFlowDto.java
0 → 100644
View file @
58e75822
package
com
.
jz
.
dm
.
mall
.
moduls
.
controller
.
finance
.
bean
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 企业客户交易流水 收支情况
*
* @author makejava
* @since 2020-12-01 10:41:39
*/
@ApiModel
(
value
=
"每天收支情况明细返回对象"
,
description
=
"每天收支情况明细返回对象"
)
public
class
EveryTradeFlowDto
{
/**
* 交易流水编号
*/
@ApiModelProperty
(
value
=
"交易流水编号"
)
private
String
tradeFlowNumber
;
/**
* 交易流水金额
*/
@ApiModelProperty
(
value
=
"交易流水金额"
)
private
BigDecimal
tradeMoney
;
/**
* 交易类型:01提现,02充值,03付款,04收款,05续费
*/
@ApiModelProperty
(
value
=
"交易类型"
)
private
String
tradeType
;
/**
* 交易类型id
*/
@ApiModelProperty
(
value
=
"交易类型:01提现,02充值,03付款,04收款,05续费"
)
private
String
tradeTypeId
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
@JsonFormat
(
pattern
=
"HH:mm:ss"
)
private
Date
creTime
;
/**
* 数据名称
*/
@ApiModelProperty
(
value
=
"数据名称"
)
private
String
dataName
;
/**
* 订单方式
*/
@ApiModelProperty
(
value
=
"订单方式"
)
private
String
purchaseMethod
;
/**
* 余额
*/
@ApiModelProperty
(
value
=
"余额"
)
private
BigDecimal
balanceMoney
;
public
String
getTradeFlowNumber
()
{
return
tradeFlowNumber
;
}
public
void
setTradeFlowNumber
(
String
tradeFlowNumber
)
{
this
.
tradeFlowNumber
=
tradeFlowNumber
;
}
public
BigDecimal
getTradeMoney
()
{
return
tradeMoney
;
}
public
void
setTradeMoney
(
BigDecimal
tradeMoney
)
{
this
.
tradeMoney
=
tradeMoney
;
}
public
String
getTradeType
()
{
return
tradeType
;
}
public
void
setTradeType
(
String
tradeType
)
{
this
.
tradeType
=
tradeType
;
}
public
Date
getCreTime
()
{
return
creTime
;
}
public
void
setCreTime
(
Date
creTime
)
{
this
.
creTime
=
creTime
;
}
public
String
getTradeTypeId
()
{
return
tradeTypeId
;
}
public
void
setTradeTypeId
(
String
tradeTypeId
)
{
this
.
tradeTypeId
=
tradeTypeId
;
}
public
String
getDataName
()
{
return
dataName
;
}
public
void
setDataName
(
String
dataName
)
{
this
.
dataName
=
dataName
;
}
public
String
getPurchaseMethod
()
{
return
purchaseMethod
;
}
public
void
setPurchaseMethod
(
String
purchaseMethod
)
{
this
.
purchaseMethod
=
purchaseMethod
;
}
public
BigDecimal
getBalanceMoney
()
{
return
balanceMoney
;
}
public
void
setBalanceMoney
(
BigDecimal
balanceMoney
)
{
this
.
balanceMoney
=
balanceMoney
;
}
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/finance/bean/EveryTradeFlowRequest.java
0 → 100644
View file @
58e75822
package
com
.
jz
.
dm
.
mall
.
moduls
.
controller
.
finance
.
bean
;
import
com.jz.common.bean.BasePageBean
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**
* 每天收支情况参数接收对象
*
* @author Bellamy
* @since 2020-12-04 10:41:39
*/
@ApiModel
(
value
=
"每天收支情况参数接收对象"
,
description
=
"每天收支情况参数接收对象"
)
public
class
EveryTradeFlowRequest
extends
BasePageBean
{
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间 yyyy-MM-dd"
)
private
String
creTime
;
public
String
getCreTime
()
{
return
creTime
;
}
public
void
setCreTime
(
String
creTime
)
{
this
.
creTime
=
creTime
;
}
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/finance/bean/FinanceTradeFlowDto.java
0 → 100644
View file @
58e75822
package
com
.
jz
.
dm
.
mall
.
moduls
.
controller
.
finance
.
bean
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 企业客户交易流水(TFinanceTradeFlow)实体类
*
* @author Bellamy
* @since 2020-12-01 10:41:39
*/
@ApiModel
(
value
=
"收支情况返回对象"
,
description
=
"收支情况返回对象"
)
public
class
FinanceTradeFlowDto
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
55257582310832314L
;
/**
* 收入金额
*/
@ApiModelProperty
(
value
=
"收入金额"
)
private
BigDecimal
receiveMoey
;
/**
* 提现金额
*/
@ApiModelProperty
(
value
=
"提现金额"
)
private
BigDecimal
cashOutMoney
;
/**
* 充值金额
*/
@ApiModelProperty
(
value
=
"充值金额"
)
private
BigDecimal
rechargeMoney
;
/**
* 支出金额
*/
@ApiModelProperty
(
value
=
"支出金额"
)
private
BigDecimal
payMoey
;
/**
* 结余
*/
@ApiModelProperty
(
value
=
"结余"
)
private
BigDecimal
balanceMoney
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
creTime
;
public
BigDecimal
getReceiveMoey
()
{
return
receiveMoey
;
}
public
void
setReceiveMoey
(
BigDecimal
receiveMoey
)
{
this
.
receiveMoey
=
receiveMoey
;
}
public
BigDecimal
getCashOutMoney
()
{
return
cashOutMoney
;
}
public
void
setCashOutMoney
(
BigDecimal
cashOutMoney
)
{
this
.
cashOutMoney
=
cashOutMoney
;
}
public
BigDecimal
getRechargeMoney
()
{
return
rechargeMoney
;
}
public
void
setRechargeMoney
(
BigDecimal
rechargeMoney
)
{
this
.
rechargeMoney
=
rechargeMoney
;
}
public
BigDecimal
getPayMoey
()
{
return
payMoey
;
}
public
void
setPayMoey
(
BigDecimal
payMoey
)
{
this
.
payMoey
=
payMoey
;
}
public
BigDecimal
getBalanceMoney
()
{
return
balanceMoney
;
}
public
void
setBalanceMoney
(
BigDecimal
balanceMoney
)
{
this
.
balanceMoney
=
balanceMoney
;
}
public
Date
getCreTime
()
{
return
creTime
;
}
public
void
setCreTime
(
Date
creTime
)
{
this
.
creTime
=
creTime
;
}
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/log/LogInfoController.java
View file @
58e75822
...
...
@@ -14,6 +14,8 @@ import org.springframework.validation.annotation.Validated;
import
org.springframework.web.bind.annotation.*
;
import
reactor.core.publisher.Mono
;
import
javax.servlet.http.HttpServletRequest
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.mall.moduls.controller.log
...
...
@@ -39,8 +41,8 @@ public class LogInfoController {
*/
@PostMapping
(
"/getMallLogInfo"
)
@ApiOperation
(
value
=
"获取商城用户日志信息列表"
)
public
Mono
<
Result
<
PageInfoResponse
<
PlatformLog
>>>
getLogInfo
(
@RequestBody
@Validated
LogInfoQueryReq
req
)
{
return
Mono
.
fromSupplier
(()
->
logInfoService
.
getMallUserLogInfo
(
req
));
public
Mono
<
Result
<
PageInfoResponse
<
PlatformLog
>>>
getLogInfo
(
@RequestBody
@Validated
LogInfoQueryReq
req
,
HttpServletRequest
request
)
{
return
Mono
.
fromSupplier
(()
->
logInfoService
.
getMallUserLogInfo
(
req
,
request
));
}
/**
...
...
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/entity/PlatformLog.java
0 → 100644
View file @
58e75822
package
com
.
jz
.
dm
.
mall
.
moduls
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 日志管理(TPlatformLog)实体类
*
* @author Bellamy
* @since 2020-12-01 10:41:42
*/
@TableName
(
"t_platform_Log"
)
@ApiModel
public
class
PlatformLog
implements
Serializable
{
private
static
final
long
serialVersionUID
=
112371340504875570L
;
/**
* 日志id
*/
private
Long
platformLogId
;
/**
* 请求ip
*/
private
String
requestIp
;
/**
* 调用人id
*/
private
String
callerId
;
/**
* 商品id
*/
private
Long
dataGoodsId
;
/**
* apikey
*/
private
String
apiKey
;
/**
* 请求参数
*/
private
String
requestParams
;
/**
* 返回参数
*/
private
String
returnParams
;
/**
* 请求路径
*/
private
String
requestUrl
;
/**
* 请求时间
*/
private
Date
requestTime
;
/**
* 服务类型:01年,02月,03次
*/
private
String
serviceType
;
/**
* 数据类型:01api,02数据包
*/
private
String
dataGoodsType
;
/**
* 下载地址
*/
private
String
downloadAddress
;
/**
* 数据商品单价
*/
private
BigDecimal
dataPrice
;
/**
* 价格类型:01免费,02收费
*/
private
String
priceType
;
/**
* 调用总次数
*/
private
Long
totalTimes
;
/**
* 已使用次数
*/
private
Long
usedTimes
;
/**
* 剩余次数
*/
private
Long
remainTimes
;
/**
* 有效开始时间
*/
private
Date
startTime
;
/**
* 有效结束时间
*/
private
Date
endTime
;
/**
* 创建时间
*/
private
Date
creTime
;
/**
* 删除标识
*/
private
String
delFlag
;
public
Long
getPlatformLogId
()
{
return
platformLogId
;
}
public
void
setPlatformLogId
(
Long
platformLogId
)
{
this
.
platformLogId
=
platformLogId
;
}
public
String
getRequestIp
()
{
return
requestIp
;
}
public
void
setRequestIp
(
String
requestIp
)
{
this
.
requestIp
=
requestIp
;
}
public
String
getCallerId
()
{
return
callerId
;
}
public
void
setCallerId
(
String
callerId
)
{
this
.
callerId
=
callerId
;
}
public
Long
getDataGoodsId
()
{
return
dataGoodsId
;
}
public
void
setDataGoodsId
(
Long
dataGoodsId
)
{
this
.
dataGoodsId
=
dataGoodsId
;
}
public
String
getApiKey
()
{
return
apiKey
;
}
public
void
setApiKey
(
String
apiKey
)
{
this
.
apiKey
=
apiKey
;
}
public
String
getRequestParams
()
{
return
requestParams
;
}
public
void
setRequestParams
(
String
requestParams
)
{
this
.
requestParams
=
requestParams
;
}
public
String
getReturnParams
()
{
return
returnParams
;
}
public
void
setReturnParams
(
String
returnParams
)
{
this
.
returnParams
=
returnParams
;
}
public
String
getRequestUrl
()
{
return
requestUrl
;
}
public
void
setRequestUrl
(
String
requestUrl
)
{
this
.
requestUrl
=
requestUrl
;
}
public
Date
getRequestTime
()
{
return
requestTime
;
}
public
void
setRequestTime
(
Date
requestTime
)
{
this
.
requestTime
=
requestTime
;
}
public
String
getServiceType
()
{
return
serviceType
;
}
public
void
setServiceType
(
String
serviceType
)
{
this
.
serviceType
=
serviceType
;
}
public
String
getDataGoodsType
()
{
return
dataGoodsType
;
}
public
void
setDataGoodsType
(
String
dataGoodsType
)
{
this
.
dataGoodsType
=
dataGoodsType
;
}
public
String
getDownloadAddress
()
{
return
downloadAddress
;
}
public
void
setDownloadAddress
(
String
downloadAddress
)
{
this
.
downloadAddress
=
downloadAddress
;
}
public
BigDecimal
getDataPrice
()
{
return
dataPrice
;
}
public
void
setDataPrice
(
BigDecimal
dataPrice
)
{
this
.
dataPrice
=
dataPrice
;
}
public
String
getPriceType
()
{
return
priceType
;
}
public
void
setPriceType
(
String
priceType
)
{
this
.
priceType
=
priceType
;
}
public
Long
getTotalTimes
()
{
return
totalTimes
;
}
public
void
setTotalTimes
(
Long
totalTimes
)
{
this
.
totalTimes
=
totalTimes
;
}
public
Long
getUsedTimes
()
{
return
usedTimes
;
}
public
void
setUsedTimes
(
Long
usedTimes
)
{
this
.
usedTimes
=
usedTimes
;
}
public
Long
getRemainTimes
()
{
return
remainTimes
;
}
public
void
setRemainTimes
(
Long
remainTimes
)
{
this
.
remainTimes
=
remainTimes
;
}
public
Date
getStartTime
()
{
return
startTime
;
}
public
void
setStartTime
(
Date
startTime
)
{
this
.
startTime
=
startTime
;
}
public
Date
getEndTime
()
{
return
endTime
;
}
public
void
setEndTime
(
Date
endTime
)
{
this
.
endTime
=
endTime
;
}
public
Date
getCreTime
()
{
return
creTime
;
}
public
void
setCreTime
(
Date
creTime
)
{
this
.
creTime
=
creTime
;
}
public
String
getDelFlag
()
{
return
delFlag
;
}
public
void
setDelFlag
(
String
delFlag
)
{
this
.
delFlag
=
delFlag
;
}
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/mapper/FinanceTradeFlowDao.java
View file @
58e75822
package
com
.
jz
.
dm
.
mall
.
moduls
.
mapper
;
import
com.jz.common.base.BaseMapper
;
import
com.jz.dm.mall.moduls.controller.finance.bean.EveryTradeFlowDto
;
import
com.jz.dm.mall.moduls.controller.finance.bean.FinanceCashOutDto
;
import
com.jz.dm.mall.moduls.controller.finance.bean.FinanceCustomerAssetsDto
;
import
com.jz.dm.mall.moduls.controller.finance.bean.FinanceTradeFlowDto
;
import
com.jz.dm.mall.moduls.entity.FinanceCashOut
;
import
com.jz.dm.mall.moduls.entity.FinanceTradeFlow
;
...
...
@@ -24,4 +26,8 @@ public interface FinanceTradeFlowDao extends BaseMapper<FinanceTradeFlow> {
List
<
FinanceCashOutDto
>
getCashOutAuditStutas
(
Map
map
)
throws
Exception
;
int
addCashOutMoney
(
FinanceCashOut
financeCashOut
)
throws
Exception
;
List
<
FinanceTradeFlowDto
>
findListScTradeFlow
(
Map
param
)
throws
Exception
;
List
<
EveryTradeFlowDto
>
findListEveryDayScInfo
(
Map
param
)
throws
Exception
;
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/mapper/MallCustomerDao.java
View file @
58e75822
...
...
@@ -2,7 +2,14 @@ package com.jz.dm.mall.moduls.mapper;
import
com.jz.common.base.BaseMapper
;
import
com.jz.dm.mall.moduls.entity.MallCustomer
;
<<<<<<<
HEAD
import
org.apache.ibatis.annotations.*
;
=======
import
org.apache.ibatis.annotations.Insert
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.ResultType
;
import
org.apache.ibatis.annotations.Select
;
>>>>>>>
4
f2273addb37e5eb2f1b255fb4f521ccb462856f
import
java.util.Map
;
...
...
@@ -49,9 +56,7 @@ public interface MallCustomerDao extends BaseMapper<MallCustomer> {
* @param customerId
* @return
*/
@Select
(
"select * from t_mall_customer where customer_id =#{customerId}"
)
@ResultType
(
MallCustomer
.
class
)
MallCustomer
findById
(
Long
customerId
);
MallCustomer
findById
(
@Param
(
"customerId"
)
Long
customerId
);
@Update
(
" update t_mall_customer set password = #{password} where customer_account = #{customer_account}"
)
...
...
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/CompanyAuthService.java
View file @
58e75822
...
...
@@ -5,6 +5,8 @@ import com.jz.dm.mall.moduls.controller.company.bean.CompanyAddReq;
import
com.jz.common.utils.Result
;
import
com.jz.dm.mall.moduls.controller.company.bean.CompanyUpdateReq
;
import
javax.servlet.http.HttpServletRequest
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.mall.moduls.service
...
...
@@ -19,29 +21,33 @@ public interface CompanyAuthService {
/**
* 添加企业认证
* @param req
* @param request
* @return
*/
Result
addCompanyData
(
CompanyAddReq
req
);
Result
addCompanyData
(
CompanyAddReq
req
,
HttpServletRequest
request
);
/**
* 查询企业认证详情
* @param request
* @param type
* @return
*/
Result
selectCompany
(
String
type
);
Result
selectCompany
(
String
type
,
HttpServletRequest
request
);
/**
* 更新企业信息
* @param request
* @param req
* @return
*/
Result
updateCompanyInfo
(
CompanyUpdateReq
req
);
Result
updateCompanyInfo
(
CompanyUpdateReq
req
,
HttpServletRequest
request
);
/**
* 校验当前用户是否已经企业认证
* @param request
* @return
*/
Result
checkCompanyInfo
();
Result
checkCompanyInfo
(
HttpServletRequest
request
);
}
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/FinanceTradeFlowService.java
View file @
58e75822
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
;
import
com.jz.common.bean.BasePageBean
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.utils.Result
;
import
com.jz.dm.mall.moduls.controller.finance.bean.FinanceCashOutDto
;
import
com.jz.dm.mall.moduls.controller.finance.bean.FinanceCashOutRequest
;
import
com.jz.dm.mall.moduls.controller.finance.bean.FinanceCustomerAssetsDto
;
import
com.jz.dm.mall.moduls.controller.finance.bean.FinanceCustomerBalanceRequest
;
import
com.jz.dm.mall.moduls.controller.finance.bean.*
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Map
;
/**
...
...
@@ -24,4 +24,8 @@ public interface FinanceTradeFlowService {
FinanceCashOutDto
getCashOutAuditStutas
(
Map
map
)
throws
Exception
;
Result
<
Object
>
addCashOutMoney
(
FinanceCashOutRequest
financeCashOutRequest
)
throws
Exception
;
PageInfoResponse
<
FinanceTradeFlowDto
>
findListScTradeFlow
(
BasePageBean
pageBean
,
HttpServletRequest
req
)
throws
Exception
;
PageInfoResponse
<
EveryTradeFlowDto
>
findListEveryDayScInfo
(
EveryTradeFlowRequest
everyTradeFlowRequest
,
HttpServletRequest
req
)
throws
Exception
;
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/LogInfoService.java
View file @
58e75822
...
...
@@ -6,6 +6,8 @@ import com.jz.common.utils.Result;
import
com.jz.dm.mall.moduls.controller.log.bean.LogInfoQueryReq
;
import
com.jz.dm.mall.moduls.controller.order.bean.OrderDto
;
import
javax.servlet.http.HttpServletRequest
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.mall.moduls.service
...
...
@@ -19,10 +21,11 @@ import com.jz.dm.mall.moduls.controller.order.bean.OrderDto;
public
interface
LogInfoService
{
/**
* 获取用户调用日志列表
* @param request
* @param req
* @return
*/
Result
<
PageInfoResponse
<
PlatformLog
>>
getMallUserLogInfo
(
LogInfoQueryReq
req
);
Result
<
PageInfoResponse
<
PlatformLog
>>
getMallUserLogInfo
(
LogInfoQueryReq
req
,
HttpServletRequest
request
);
/**
* 获取商城用户日志信息详情
...
...
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/impl/CompanyAuthServiceImpl.java
View file @
58e75822
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
.
impl
;
import
com.jz.common.base.CurrentUser
;
import
com.jz.common.bean.MallCustomerApiDto
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.constant.ResultMsg
;
import
com.jz.common.entity.Department
;
import
com.jz.common.enums.UserTypeEnum
;
import
com.jz.common.exception.ResponseException
;
import
com.jz.dm.mall.moduls.controller.company.bean.CompanyUpdateReq
;
import
com.jz.dm.mall.moduls.controller.company.dto.CompanyInfoDto
;
...
...
@@ -22,6 +25,7 @@ import org.springframework.transaction.annotation.Propagation;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Date
;
/**
...
...
@@ -47,29 +51,29 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
/**
* 添加企业认证
*
*
@param request
* @param req
* @return
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRES_NEW
)
public
Result
addCompanyData
(
CompanyAddReq
req
)
{
//TODO 获取当前用户ID判断当前用户是否已经关联企业
// Long customerId = (Long) UserContextUtil.pop("customer_id");
Long
customerId
=
0L
;
if
(
null
==
customerId
)
{
public
Result
addCompanyData
(
CompanyAddReq
req
,
HttpServletRequest
request
)
{
//获取当前用户ID判断当前用户是否已经关联企业
MallCustomerApiDto
currentUser
=
CurrentUser
.
getCurrentUser
(
request
);
if
(
null
==
currentUser
)
{
return
Result
.
of_error
(
ResultMsg
.
USER_NOT_EXIST
);
}
MallCustomer
mallCustomer
=
mallCustomerDao
.
findById
(
cu
stomerId
);
MallCustomer
mallCustomer
=
mallCustomerDao
.
findById
(
cu
rrentUser
.
getCustomerId
()
);
if
(
null
==
mallCustomer
)
{
return
Result
.
of_error
(
ResultMsg
.
USER_NOT_EXIST
);
}
if
(
null
!=
mallCustomer
.
getDepartmentId
())
{
return
Result
.
of_error
(
"用户已关联企业,请勿重复操作"
);
}
req
.
setCustomerId
(
mallCustomer
.
getCustomerId
());
if
(
StringUtils
.
isNotBlank
(
req
.
getDepartmentName
())
&&
StringUtils
.
isNotBlank
(
req
.
getUnifiedCreditCode
()))
{
//企业名称 && 营业执照
req
.
setLoginId
(
mallCustomer
.
getCustomerId
());
req
.
setLoginName
(
currentUser
.
getCustomerName
());
if
(
StringUtils
.
isNotBlank
(
req
.
getDepartmentName
())
||
StringUtils
.
isNotBlank
(
req
.
getUnifiedCreditCode
()))
{
//企业名称 && 统一社会编码
Department
department
=
departmentDao
.
selectDepartmentData
(
req
);
if
(
null
!=
department
)
{
return
Result
.
of_error
(
"企业用户信息已存在"
);
...
...
@@ -81,14 +85,14 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
/**
* 查询企业认证详情
*
*
@param request
* @param type
* @return
*/
@Override
public
Result
selectCompany
(
String
type
)
{
//
TODO
查询用户判断用户是否认证
MallCustomer
currentUser
=
getCurrentUser
(
0L
);
public
Result
selectCompany
(
String
type
,
HttpServletRequest
request
)
{
// 查询用户判断用户是否认证
MallCustomer
currentUser
=
getCurrentUser
(
CurrentUser
.
getCustomerId
(
request
)
);
if
(
null
==
currentUser
)
{
return
Result
.
error
(
"当前用户信息不存在"
);
}
...
...
@@ -122,18 +126,18 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
/**
* 更新企业信息
*
*
@param request
* @param req
* @return
*/
@Override
public
Result
updateCompanyInfo
(
CompanyUpdateReq
req
)
{
Long
c
oustomId
=
0L
;
MallCustomer
currentUser
=
getCurrentUser
(
req
.
getCustomerId
()
);
public
Result
updateCompanyInfo
(
CompanyUpdateReq
req
,
HttpServletRequest
request
)
{
Long
c
ustomerId
=
CurrentUser
.
getCustomerId
(
request
)
;
MallCustomer
currentUser
=
getCurrentUser
(
customerId
);
if
(
null
==
currentUser
)
{
return
Result
.
of_error
(
ResultMsg
.
USER_NOT_EXIST
);
}
if
(!
req
.
getDepartmentId
().
equals
(
c
oustom
Id
))
{
if
(!
req
.
getDepartmentId
().
equals
(
c
ustomer
Id
))
{
return
Result
.
of_error
(
"更新企业用户信息与绑定企业信息不一致"
);
}
Department
department
=
new
Department
();
...
...
@@ -148,14 +152,12 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
/**
* 校验用户是否已经企业认证
*
*
@param request
* @return
*/
@Override
public
Result
checkCompanyInfo
()
{
//Todo 获取当前登录用户
Long
customId
=
0L
;
MallCustomer
currentUser
=
getCurrentUser
(
customId
);
public
Result
checkCompanyInfo
(
HttpServletRequest
request
)
{
MallCustomer
currentUser
=
getCurrentUser
(
CurrentUser
.
getCustomerId
(
request
));
if
(
null
==
currentUser
)
{
return
Result
.
of_success
(
ResultMsg
.
USER_NOT_EXIST
);
}
...
...
@@ -190,13 +192,13 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
throw
ResponseException
.
of_error
(
"初始化用户资产失败"
);
}
//更新用户企业信息
MallCustomer
mallCustomer
=
new
MallCustomer
();
mallCustomer
.
setCustomerId
(
req
.
getCustomer
Id
());
//用户ID
mallCustomer
.
setDepartmentId
(
departmentInset
.
getDepartmentId
());
mallCustomer
.
setUptTime
(
new
Date
());
mallCustomer
.
setUptPerson
(
req
.
getLoginName
());
if
(
mallCustomerDao
.
updateById
(
mallCustomer
)
!=
1
)
{
throw
ResponseException
.
of_error
(
"更新用户企业信息失败"
);
}
//
MallCustomer mallCustomer = new MallCustomer();
//mallCustomer.setCustomerId(req.getLogin
Id());//用户ID
//
mallCustomer.setDepartmentId(departmentInset.getDepartmentId());
//
mallCustomer.setUptTime(new Date());
//
mallCustomer.setUptPerson(req.getLoginName());
//
if (mallCustomerDao.updateById(mallCustomer) != 1) {
//
throw ResponseException.of_error("更新用户企业信息失败");
//
}
}
}
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/impl/FinanceTradeFlowServiceImpl.java
View file @
58e75822
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
.
impl
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.bean.BasePageBean
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.enums.AuditStatusEnum
;
import
com.jz.common.utils.CommonsUtil
;
import
com.jz.common.utils.Result
;
import
com.jz.dm.mall.moduls.controller.finance.bean.FinanceCashOutDto
;
import
com.jz.dm.mall.moduls.controller.finance.bean.FinanceCashOutRequest
;
import
com.jz.dm.mall.moduls.controller.finance.bean.FinanceCustomerAssetsDto
;
import
com.jz.dm.mall.moduls.controller.finance.bean.FinanceCustomerBalanceRequest
;
import
com.jz.dm.mall.moduls.controller.finance.bean.*
;
import
com.jz.dm.mall.moduls.entity.FinanceCashOut
;
import
com.jz.dm.mall.moduls.entity.FinanceCustomerAssets
;
import
com.jz.dm.mall.moduls.entity.FinanceCustomerBalance
;
import
com.jz.dm.mall.moduls.mapper.FinanceCustomerAssetsDao
;
import
com.jz.dm.mall.moduls.mapper.FinanceTradeFlowDao
;
import
com.jz.dm.mall.moduls.service.FinanceTradeFlowService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.HashMap
;
...
...
@@ -124,11 +129,47 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
return
result
;
}
}
else
{
result
.
setMessage
(
"提
交失败
!"
);
result
.
setMessage
(
"提
现金额必须小于等于可用金额
!"
);
result
.
setCode
(
500
);
return
result
;
}
}
return
result
;
}
@Override
public
PageInfoResponse
<
FinanceTradeFlowDto
>
findListScTradeFlow
(
BasePageBean
pageBean
,
HttpServletRequest
req
)
throws
Exception
{
PageInfoResponse
<
FinanceTradeFlowDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
PageHelper
.
startPage
(
pageBean
.
getPageNum
(),
pageBean
.
getPageSize
());
Map
param
=
new
HashMap
();
//param.put("assetsId",assetsId); //企业资产id
List
<
FinanceTradeFlowDto
>
list
=
financeTradeFlowDao
.
findListScTradeFlow
(
param
);
PageInfo
<
FinanceTradeFlowDto
>
pageInfo
=
new
PageInfo
<>(
list
);
pageInfoResponse
.
setCode
(
Constants
.
SUCCESS_CODE
);
pageInfoResponse
.
setMessage
(
"查询成功"
);
pageInfoResponse
.
setData
(
pageInfo
);
return
pageInfoResponse
;
}
@Override
public
PageInfoResponse
<
EveryTradeFlowDto
>
findListEveryDayScInfo
(
EveryTradeFlowRequest
everyTradeFlowRequest
,
HttpServletRequest
req
)
throws
Exception
{
PageInfoResponse
<
EveryTradeFlowDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
PageHelper
.
startPage
(
everyTradeFlowRequest
.
getPageNum
(),
everyTradeFlowRequest
.
getPageSize
());
Map
param
=
new
HashMap
();
//商品分类id(行业)
if
(!
StringUtils
.
isEmpty
(
everyTradeFlowRequest
.
getCreTime
()))
{
param
.
put
(
"creTime"
,
everyTradeFlowRequest
.
getCreTime
());
}
//param.put("assetsId",assetsId); //企业资产id
List
<
EveryTradeFlowDto
>
list
=
financeTradeFlowDao
.
findListEveryDayScInfo
(
param
);
PageInfo
<
EveryTradeFlowDto
>
pageInfo
=
new
PageInfo
<>(
list
);
pageInfoResponse
.
setCode
(
Constants
.
SUCCESS_CODE
);
pageInfoResponse
.
setMessage
(
"查询成功"
);
pageInfoResponse
.
setData
(
pageInfo
);
return
pageInfoResponse
;
}
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/impl/LogInfoServiceImpl.java
View file @
58e75822
...
...
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.base.CurrentUser
;
import
com.jz.common.bean.MallCustomerApiDto
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.ResultCode
;
...
...
@@ -20,6 +22,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
/**
...
...
@@ -40,13 +43,22 @@ public class LogInfoServiceImpl implements LogInfoService {
private
PlatformLogDao
platformLogDao
;
@Resource
private
MallCustomerDao
mallCustomerDao
;
/**
* 获取商城用户日志列表
* @param req
* @param request
* @return
*/
@Override
public
Result
<
PageInfoResponse
<
PlatformLog
>>
getMallUserLogInfo
(
LogInfoQueryReq
req
)
{
Long
customerId
=
0L
;
if
(
null
==
customerId
)
{
return
Result
.
of_error
(
ResultMsg
.
USER_NOT_EXIST
);
}
MallCustomer
mallCustomer
=
mallCustomerDao
.
findById
(
customerId
);
public
Result
<
PageInfoResponse
<
PlatformLog
>>
getMallUserLogInfo
(
LogInfoQueryReq
req
,
HttpServletRequest
request
)
{
//MallCustomerApiDto currentUser = CurrentUser.getCurrentUser(request);
//if (null == currentUser) {
// return Result.of_error(ResultMsg.USER_NOT_EXIST);
//}
MallCustomerApiDto
currentUser
=
new
MallCustomerApiDto
();
currentUser
.
setCustomerId
(
1L
);
MallCustomer
mallCustomer
=
mallCustomerDao
.
findById
(
currentUser
.
getCustomerId
());
if
(
null
==
mallCustomer
)
{
return
Result
.
of_error
(
ResultMsg
.
USER_NOT_EXIST
);
}
...
...
jz-dm-mall/src/main/resources/mapperconf/FinanceCustomerAssetsDao.xml
View file @
58e75822
...
...
@@ -136,6 +136,9 @@
<if
test=
"totalMoney != null"
>
total_money = #{totalMoney},
</if>
<if
test=
"frozenMoney != null"
>
frozen_money = #{frozenMoney},
</if>
<if
test=
"uptTime != null"
>
upt_time = #{uptTime},
</if>
...
...
jz-dm-mall/src/main/resources/mapperconf/FinanceTradeFlowDao.xml
View file @
58e75822
...
...
@@ -35,4 +35,56 @@
#{payTime}, #{payPerson}, #{remark}, #{auditStatus}, #{crePerson}, #{creTime}, #{delFlag})
</insert>
<!--商城利润中心每天收支情况-->
<select
id=
"findListScTradeFlow"
resultType=
"com.jz.dm.mall.moduls.controller.finance.bean.FinanceTradeFlowDto"
parameterType=
"map"
>
select
sum(case when a.tradeType='01' then a.tradeMoney else 0 end) cashOutMoney,
sum(case when a.tradeType='02' then a.tradeMoney else 0 end) rechargeMoney,
sum(case when a.tradeType='03' then a.tradeMoney else 0 end) payMoey,
sum(case when a.tradeType='04' then a.tradeMoney else 0 end) receiveMoey,
a.creTime,
a.balanceMoney
from(
select
t.trade_type as tradeType,
t.trade_money as tradeMoney,
t.balance_money as balanceMoney,
date_format(t.cre_time,'%Y-%m-%d') as creTime
from t_finance_trade_flow t
inner join t_finance_customer_assets t1 on t1.assets_id=t.assets_id
where 1=1 and date_format(NOW(),'%Y-%m-%d') > date_format(t.cre_time,'%Y-%m-%d')
<if
test=
"assetsId != null"
>
and t.assets_id = #{assetsId}
</if>
) a
group by a.creTime
order by a.creTime desc
</select>
<!--商城利润中心每天收支情况明细-->
<select
id=
"findListEveryDayScInfo"
resultType=
"com.jz.dm.mall.moduls.controller.finance.bean.EveryTradeFlowDto"
parameterType=
"map"
>
select
t.trade_flow_number as tradeFlowNumber,
(case when t.trade_type ='01' then '提现' when t.trade_type ='02' then '充值' when t.trade_type ='03' then '支付'
when t.trade_type ='04' then '收入' end) as tradeType,
t.trade_type as tradeTypeId,
t.cre_time as creTime,
t.trade_money as tradeMoney,
t.balance_money as balanceMoney,
a.data_name as dataName,
(case when a.purchase_method ='01' then '年' when a.purchase_method ='02' then '季' when a.purchase_method ='03' then '月'
when a.purchase_method ='04' then '次' end) as purchaseMethod
from t_finance_trade_flow t
left join (
select
t1.order_id,
t3.data_name,
t1.purchase_method
from t_order_goods_info t2
inner join t_order t1 on t1.order_id=t2.order_id
inner join t_data_goods t3 on t2.data_goods_id=t3.data_goods_id
) a on a.order_id=t.order_id
where 1=1
<if
test=
"assetsId != null"
>
and t.assets_id = #{assetsId}
</if>
<if
test=
"creTime != null"
>
and date_format(t.cre_time,'%Y-%m-%d')= #{creTime}
</if>
</select>
</mapper>
\ No newline at end of file
jz-dm-mall/src/main/resources/mapperconf/MallCustomerDao.xml
View file @
58e75822
...
...
@@ -185,4 +185,13 @@
from t_mall_customer
where customer_phone = #{telephone};
</select>
<select
id=
"findById"
resultType=
"com.jz.dm.mall.moduls.entity.MallCustomer"
>
SELECT customer_id AS customerId,
department_id AS departmentId,
password AS password,
FROM t_mall_customer
WHERE customer_id =#{customerId}
AND del_flag ='N'"
</select>
</mapper>
\ No newline at end of file
jz-dm-mall/src/main/resources/mapperconf/PlatformLogDao.xml
View file @
58e75822
<?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.jz.dm.mall.moduls.mapper.PlatformLogDao"
>
<resultMap
type=
"com.jz.dm.mall.moduls.entity.PlatformLog"
id=
"TPlatformLogMap"
>
<result
property=
"platformLogId"
column=
"platform_log_id"
jdbcType=
"INTEGER"
/>
<result
property=
"requestIp"
column=
"request_ip"
jdbcType=
"VARCHAR"
/>
<result
property=
"callerId"
column=
"caller_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"dataGoodsId"
column=
"data_goods_id"
jdbcType=
"INTEGER"
/>
<result
property=
"apiKey"
column=
"api_key"
jdbcType=
"VARCHAR"
/>
<result
property=
"requestParams"
column=
"request_params"
jdbcType=
"VARCHAR"
/>
<result
property=
"returnParams"
column=
"return_params"
jdbcType=
"VARCHAR"
/>
<result
property=
"requestUrl"
column=
"request_url"
jdbcType=
"VARCHAR"
/>
<result
property=
"requestTime"
column=
"request_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"serviceType"
column=
"service_type"
jdbcType=
"VARCHAR"
/>
<result
property=
"dataGoodsType"
column=
"data_goods_type"
jdbcType=
"VARCHAR"
/>
<result
property=
"downloadAddress"
column=
"download_address"
jdbcType=
"VARCHAR"
/>
<result
property=
"dataPrice"
column=
"data_price"
jdbcType=
"NUMERIC"
/>
<result
property=
"priceType"
column=
"price_type"
jdbcType=
"VARCHAR"
/>
<result
property=
"totalTimes"
column=
"total_times"
jdbcType=
"INTEGER"
/>
<result
property=
"usedTimes"
column=
"used_times"
jdbcType=
"INTEGER"
/>
<result
property=
"remainTimes"
column=
"remain_times"
jdbcType=
"INTEGER"
/>
<result
property=
"startTime"
column=
"start_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"endTime"
column=
"end_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"creTime"
column=
"cre_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"delFlag"
column=
"del_flag"
jdbcType=
"VARCHAR"
/>
</resultMap>
<select
id=
"listMallLogInfo"
resultType=
"com.jz.common.entity.PlatformLog"
>
<select
id=
"listMallLogInfo"
resultMap=
"TPlatformLogMap"
>
SELECT * FROM t_platform_log WHERE caller_id=#{customerId}
</select>
</mapper>
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/log/bean/ManageLogInfoQueryReq.java
0 → 100644
View file @
58e75822
package
com
.
jz
.
manage
.
moduls
.
controller
.
log
.
bean
;
import
com.jz.common.bean.BasePageBean
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.manage.moduls.controller.log.bean
* @PROJECT_NAME: jz-dm-parent
* @NAME: ManageLogInfoQueryReq
* @USER: key
* @DATE: 2020-12-4/10:31
* @DAY_NAME_SHORT: 周五
* @Description:
**/
@ApiModel
@Data
public
class
ManageLogInfoQueryReq
extends
BasePageBean
implements
Serializable
{
}
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