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
4c40b5d1
Commit
4c40b5d1
authored
Dec 04, 2020
by
machengbo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dm_dev' of
http://gitlab.ioubuy.cn/yaobenzhang/dm_project
into dm_dev
parents
77e1f49c
7985fa38
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
137 additions
and
56 deletions
+137
-56
pom.xml
jz-dm-common/pom.xml
+1
-0
CompanyAddReq.java
...dm/mall/moduls/controller/company/bean/CompanyAddReq.java
+1
-1
LogInfoController.java
...m/jz/dm/mall/moduls/controller/log/LogInfoController.java
+2
-4
PlatformLog.java
...c/main/java/com/jz/dm/mall/moduls/entity/PlatformLog.java
+1
-0
DepartmentDao.java
...main/java/com/jz/dm/mall/moduls/mapper/DepartmentDao.java
+8
-1
FinanceCustomerAssetsDao.java
...om/jz/dm/mall/moduls/mapper/FinanceCustomerAssetsDao.java
+8
-0
PlatformLogDao.java
...ain/java/com/jz/dm/mall/moduls/mapper/PlatformLogDao.java
+9
-2
LogInfoService.java
...in/java/com/jz/dm/mall/moduls/service/LogInfoService.java
+2
-3
CompanyAuthServiceImpl.java
...z/dm/mall/moduls/service/impl/CompanyAuthServiceImpl.java
+6
-3
LogInfoServiceImpl.java
...om/jz/dm/mall/moduls/service/impl/LogInfoServiceImpl.java
+16
-16
DepartmentDao.xml
jz-dm-mall/src/main/resources/mapperconf/DepartmentDao.xml
+16
-5
FinanceCustomerAssetsDao.xml
...rc/main/resources/mapperconf/FinanceCustomerAssetsDao.xml
+4
-0
MallCustomerDao.xml
jz-dm-mall/src/main/resources/mapperconf/MallCustomerDao.xml
+12
-2
PlatformLogDao.xml
jz-dm-mall/src/main/resources/mapperconf/PlatformLogDao.xml
+16
-1
PlatformLogController.java
...z/manage/moduls/controller/log/PlatformLogController.java
+5
-2
PlatformLogDao.java
...main/java/com/jz/manage/moduls/mapper/PlatformLogDao.java
+1
-1
PlatformLogService.java
...java/com/jz/manage/moduls/service/PlatformLogService.java
+2
-2
PlatformLogServiceImpl.java
...jz/manage/moduls/service/impl/PlatformLogServiceImpl.java
+16
-11
PlatformLogDao.xml
...m-manage/src/main/resources/mapper/log/PlatformLogDao.xml
+11
-2
No files found.
jz-dm-common/pom.xml
View file @
4c40b5d1
...
...
@@ -23,6 +23,7 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-aop
</artifactId>
...
...
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/company/bean/CompanyAddReq.java
View file @
4c40b5d1
...
...
@@ -62,6 +62,6 @@ public class CompanyAddReq implements Serializable {
@ApiModelProperty
(
name
=
"登录用户id"
,
hidden
=
true
)
private
Long
loginId
;
@ApiModelProperty
(
name
=
"登录用户名称"
,
hidden
=
true
)
private
String
L
oginName
;
private
String
l
oginName
;
}
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/log/LogInfoController.java
View file @
4c40b5d1
package
com
.
jz
.
dm
.
mall
.
moduls
.
controller
.
log
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.
common
.entity.PlatformLog
;
import
com.jz.
dm.mall.moduls
.entity.PlatformLog
;
import
com.jz.common.utils.Result
;
import
com.jz.dm.mall.moduls.controller.company.bean.CompanyAddReq
;
import
com.jz.dm.mall.moduls.controller.log.bean.LogInfoQueryReq
;
import
com.jz.dm.mall.moduls.controller.order.bean.OrderDto
;
import
com.jz.dm.mall.moduls.service.LogInfoService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -41,7 +39,7 @@ public class LogInfoController {
*/
@PostMapping
(
"/getMallLogInfo"
)
@ApiOperation
(
value
=
"获取商城用户日志信息列表"
)
public
Mono
<
Result
<
PageInfoResponse
<
PlatformLog
>
>>
getLogInfo
(
@RequestBody
@Validated
LogInfoQueryReq
req
,
HttpServletRequest
request
)
{
public
Mono
<
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
View file @
4c40b5d1
package
com
.
jz
.
dm
.
mall
.
moduls
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
...
...
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/mapper/DepartmentDao.java
View file @
4c40b5d1
...
...
@@ -21,7 +21,7 @@ public interface DepartmentDao extends BaseMapper<Department> {
* @param req
* @return
*/
Department
selectDepartmentData
(
CompanyAddReq
req
);
Department
selectDepartmentData
(
@Param
(
"req"
)
CompanyAddReq
req
);
/**
* 查询企业状态
...
...
@@ -38,4 +38,11 @@ public interface DepartmentDao extends BaseMapper<Department> {
* @return
*/
CompanyInfoDto
selectCompanyDetail
(
@Param
(
"departmentId"
)
Long
departmentId
);
/**
* 保存企业认证信息
* @param dep
* @return
*/
int
insertDepart
(
@Param
(
"dep"
)
Department
dep
);
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/mapper/FinanceCustomerAssetsDao.java
View file @
4c40b5d1
...
...
@@ -3,6 +3,7 @@ package com.jz.dm.mall.moduls.mapper;
import
com.jz.common.base.BaseMapper
;
import
com.jz.dm.mall.moduls.entity.FinanceCustomerAssets
;
import
com.jz.dm.mall.moduls.entity.FinanceCustomerBalance
;
import
org.apache.ibatis.annotations.Param
;
/**
* 商城企业客户资产(TFinanceCustomerAssets)表数据库访问层
...
...
@@ -15,4 +16,11 @@ public interface FinanceCustomerAssetsDao extends BaseMapper<FinanceCustomerAsse
int
uptAccountMoney
(
FinanceCustomerAssets
financeCustomerAssets
)
throws
Exception
;
int
addCoustomerCzMoney
(
FinanceCustomerBalance
financeCustomerBalance
)
throws
Exception
;
/**
* 添加账户信息
* @param finance
* @return
*/
int
insertFinanceCustome
(
@Param
(
"finance"
)
FinanceCustomerAssets
finance
);
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/mapper/PlatformLogDao.java
View file @
4c40b5d1
package
com
.
jz
.
dm
.
mall
.
moduls
.
mapper
;
import
com.jz.common.base.BaseMapper
;
import
com.jz.
common
.entity.PlatformLog
;
import
com.jz.dm.mall.moduls.controller.order.bean.OrderDto
;
import
com.jz.
dm.mall.moduls
.entity.PlatformLog
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -20,4 +20,11 @@ public interface PlatformLogDao extends BaseMapper<PlatformLog> {
* @return
*/
List
<
PlatformLog
>
listMallLogInfo
(
Long
customerId
);
/**
* 根据日志ID查询日志信息
* @param platformLogId
* @return
*/
PlatformLog
findByPlatformId
(
@Param
(
"platformLogId"
)
Long
platformLogId
);
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/LogInfoService.java
View file @
4c40b5d1
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.
common
.entity.PlatformLog
;
import
com.jz.
dm.mall.moduls
.entity.PlatformLog
;
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
;
...
...
@@ -25,7 +24,7 @@ public interface LogInfoService {
* @param req
* @return
*/
Result
<
PageInfoResponse
<
PlatformLog
>
>
getMallUserLogInfo
(
LogInfoQueryReq
req
,
HttpServletRequest
request
);
PageInfoResponse
<
PlatformLog
>
getMallUserLogInfo
(
LogInfoQueryReq
req
,
HttpServletRequest
request
);
/**
* 获取商城用户日志信息详情
...
...
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/impl/CompanyAuthServiceImpl.java
View file @
4c40b5d1
...
...
@@ -59,7 +59,10 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRES_NEW
)
public
Result
addCompanyData
(
CompanyAddReq
req
,
HttpServletRequest
request
)
{
//获取当前用户ID判断当前用户是否已经关联企业
MallCustomerApiDto
currentUser
=
CurrentUser
.
getCurrentUser
(
request
);
//MallCustomerApiDto currentUser = CurrentUser.getCurrentUser(request);
MallCustomerApiDto
currentUser
=
new
MallCustomerApiDto
();
currentUser
.
setCustomerId
(
1L
);
currentUser
.
setCustomerName
(
"张胜男"
);
if
(
null
==
currentUser
)
{
return
Result
.
of_error
(
ResultMsg
.
USER_NOT_EXIST
);
}
...
...
@@ -180,7 +183,7 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
departmentInset
.
setCreTime
(
new
Date
());
departmentInset
.
setCrePerson
(
req
.
getLoginName
());
BeanUtils
.
copyProperties
(
req
,
departmentInset
);
if
(
departmentDao
.
insert
(
departmentInset
)
!=
1
)
{
if
(
departmentDao
.
insert
Depart
(
departmentInset
)
!=
1
)
{
throw
ResponseException
.
of_error
(
"保存企业信息失败"
);
}
//初始化用户资产表
...
...
@@ -188,7 +191,7 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
finance
.
setDepartmentId
(
departmentInset
.
getDepartmentId
());
//企业ID
finance
.
setCreTime
(
new
Date
());
finance
.
setCrePerson
(
req
.
getLoginName
());
if
(
financeCustomerAssetsDao
.
insert
(
finance
)
!=
1
)
{
if
(
financeCustomerAssetsDao
.
insert
FinanceCustome
(
finance
)
!=
1
)
{
throw
ResponseException
.
of_error
(
"初始化用户资产失败"
);
}
//更新用户企业信息
...
...
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/impl/LogInfoServiceImpl.java
View file @
4c40b5d1
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
.
impl
;
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
;
import
com.jz.common.constant.ResultMsg
;
import
com.jz.
common
.entity.PlatformLog
;
import
com.jz.
dm.mall.moduls
.entity.PlatformLog
;
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
com.jz.dm.mall.moduls.entity.MallCustomer
;
import
com.jz.dm.mall.moduls.mapper.MallCustomerDao
;
import
com.jz.dm.mall.moduls.mapper.PlatformLogDao
;
...
...
@@ -51,25 +47,29 @@ public class LogInfoServiceImpl implements LogInfoService {
* @return
*/
@Override
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
);
public
PageInfoResponse
<
PlatformLog
>
getMallUserLogInfo
(
LogInfoQueryReq
req
,
HttpServletRequest
request
)
{
PageInfoResponse
<
PlatformLog
>
pageInfoResponse
=
new
PageInfoResponse
<>();
MallCustomerApiDto
currentUser
=
CurrentUser
.
getCurrentUser
(
request
);
if
(
null
==
currentUser
)
{
pageInfoResponse
.
setCode
(
Constants
.
SUCCESS_CODE
);
pageInfoResponse
.
setMessage
(
ResultMsg
.
USER_NOT_EXIST
.
getMsg
());
return
pageInfoResponse
;
}
//MallCustomerApiDto currentUser =new MallCustomerApiDto();
//currentUser.setCustomerId(1L);
MallCustomer
mallCustomer
=
mallCustomerDao
.
findById
(
currentUser
.
getCustomerId
());
if
(
null
==
mallCustomer
)
{
return
Result
.
of_error
(
ResultMsg
.
USER_NOT_EXIST
);
pageInfoResponse
.
setCode
(
Constants
.
SUCCESS_CODE
);
pageInfoResponse
.
setMessage
(
ResultMsg
.
USER_NOT_EXIST
.
getMsg
());
return
pageInfoResponse
;
}
PageInfoResponse
<
PlatformLog
>
pageInfoResponse
=
new
PageInfoResponse
<>();
PageHelper
.
startPage
(
req
.
getPageNum
(),
req
.
getPageSize
());
List
<
PlatformLog
>
list
=
platformLogDao
.
listMallLogInfo
(
mallCustomer
.
getCustomerId
());
PageInfo
<
PlatformLog
>
pageInfo
=
new
PageInfo
<>(
list
);
pageInfoResponse
.
setCode
(
Constants
.
SUCCESS_CODE
);
pageInfoResponse
.
setMessage
(
ResultMsg
.
SUCCESS
.
getMsg
());
pageInfoResponse
.
setData
(
pageInfo
);
return
Result
.
of_success
(
pageInfoResponse
)
;
return
pageInfoResponse
;
}
/**
...
...
@@ -79,7 +79,7 @@ public class LogInfoServiceImpl implements LogInfoService {
*/
@Override
public
Result
getMallUserLogDetail
(
Long
platformLogId
)
{
PlatformLog
platformLog
=
platformLogDao
.
selectBy
Id
(
platformLogId
);
PlatformLog
platformLog
=
platformLogDao
.
findByPlatform
Id
(
platformLogId
);
if
(
null
==
platformLog
){
return
Result
.
of_error
(
ResultMsg
.
DATA_NOT_FOUND
);
}
...
...
jz-dm-mall/src/main/resources/mapperconf/DepartmentDao.xml
View file @
4c40b5d1
...
...
@@ -35,13 +35,24 @@
</resultMap>
-->
<sql
id=
"department"
>
department_id,department_name,legal_representative,province,city,industry,linkman,telephone,registered_address,
depart_picture,business_license,tax_registration,depart_picture_time,business_license_time,tax_registration_time,
unified_credit_code,bank_name,bank_card_number,bank_address,bank_no,audit_status,audit_status,audit_person,cre_time,
cre_person,del_flag
department_id AS departmentId,department_name AS departmentName,legal_representative AS legalRepresentative,
province AS province,city AS city,industry AS industry,linkman AS linkman,telephone AS telephone,registered_address AS registeredAddress,
depart_picture AS departPicture,business_license AS businessLicense,tax_registration AS taxRegistration,depart_picture_time AS departPictureTime,
business_license_time AS businessLicenseTime,tax_registration_time AS taxRegistrationTime,
unified_credit_code AS unifiedCreditCode,bank_name AS bankName,bank_card_number AS bankCardNumber,bank_address AS bankAddress,
bank_no AS bankNo,audit_status AS auditStatus,audit_status AS auditStatus,audit_person AS auditPerson,cre_time AS creTime,
cre_person AS crePerson,del_flag AS delFlag
</sql>
<insert
id=
"insertDepart"
>
INSERT INTO `t_department`(`department_name`,`province`,`city`,`linkman`,`telephone`,`registered_address`,
`business_license`, `tax_registration`, `depart_picture_time`,
`business_license_time`,`unified_credit_code`, `bank_name`,
`bank_card_number`,`audit_status`,`cre_time`, `cre_person`) VALUES
(#{dep.departmentName},#{dep.province},#{dep.city},#{linkman},#{dep.telephone},#{registeredAddress},
#{dep.businessLicense},#{dep.unifiedCreditCode},#{bankName},#{bankCardNumber},#{auditStatus},NOW(),#{crePerson})
</insert>
<select
id=
"selectDepartmentData"
resultType=
"com.jz.common.entity.Department"
>
<select
id=
"selectDepartmentData"
resultType=
"com.jz.common.entity.Department"
parameterType=
"com.jz.dm.mall.moduls.controller.company.bean.CompanyAddReq"
>
SELECT
<include
refid=
"department"
/>
FROM t_department
...
...
jz-dm-mall/src/main/resources/mapperconf/FinanceCustomerAssetsDao.xml
View file @
4c40b5d1
...
...
@@ -157,5 +157,9 @@
insert into t_finance_customer_balance(assets_id, balance_money, remark, cre_time, cre_person, audit_status)
values (#{assetsId}, #{balanceMoney}, #{remark}, #{creTime}, #{crePerson}, #{auditStatus})
</insert>
<insert
id=
"insertFinanceCustome"
>
INSERT INTO t_finance_customer_assets(department_id,cre_time, cre_person)VALUES
(#{finance.departmentId},NOW(),#{finance.crePerson})
</insert>
</mapper>
\ No newline at end of file
jz-dm-mall/src/main/resources/mapperconf/MallCustomerDao.xml
View file @
4c40b5d1
...
...
@@ -189,10 +189,20 @@
SELECT customer_id AS customerId,
department_id AS departmentId,
password AS password,
customer_account AS customerAccount,
customer_name AS customerName,
customer_phone AS customerPhone,
customer_email AS customerEmail,
customer_address AS customerAddress,
customer_point AS customerPoint,
register_time AS registerTime,
customer_level AS customerLevel,
identity_card AS identityCard,
cre_time AS creTime,
cre_person AS crePerson
FROM t_mall_customer
WHERE customer_id =#{customerId}
AND del_flag ='N'
"
AND del_flag ='N'
</select>
<select
id=
"selectByCustomerId"
resultMap=
"TMallCustomerMap"
>
...
...
jz-dm-mall/src/main/resources/mapperconf/PlatformLogDao.xml
View file @
4c40b5d1
...
...
@@ -24,8 +24,23 @@
<result
property=
"creTime"
column=
"cre_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"delFlag"
column=
"del_flag"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"allFiled"
>
platform_log_id AS platformLogId,request_ip AS requestIp,caller_id AS callerId,data_goods_id AS dataGoodsId,
api_key AS apiKey,request_params AS requestParams,return_params AS returnParams,request_url AS requestUrl
,request_time AS requestTime,service_type AS serviceType,data_goods_type AS dataGoodsType,download_address AS downloadAddress,
data_price AS dataPrice,price_type AS priceType,total_times AS totalTimes,used_times AS usedTimes
,remain_times AS remainTimes,caller_type AS callerType,start_time AS startTime,end_time AS endTime,cre_time AS creTime,
cre_person AS crePerson,upt_time AS uptTime,upt_person AS uptPerson,del_flag AS delFlag
</sql>
<select
id=
"listMallLogInfo"
resultMap=
"TPlatformLogMap"
>
SELECT * FROM t_platform_log WHERE caller_id=#{customerId}
SELECT
<include
refid=
"allFiled"
/>
FROM t_platform_log WHERE del_flag ='N'
AND caller_id=#{customerId}
</select>
<select
id=
"findByPlatformId"
resultType=
"com.jz.dm.mall.moduls.entity.PlatformLog"
parameterType=
"map"
>
SELECT
<include
refid=
"allFiled"
/>
FROM t_platform_log
WHERE del_flag ='N'
AND platform_log_id =#{platformLogId}
</select>
</mapper>
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/log/PlatformLogController.java
View file @
4c40b5d1
package
com
.
jz
.
manage
.
moduls
.
controller
.
log
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.
common
.entity.PlatformLog
;
import
com.jz.
manage.moduls
.entity.PlatformLog
;
import
com.jz.common.utils.Result
;
import
com.jz.manage.moduls.controller.BaseController
;
import
com.jz.manage.moduls.controller.log.bean.ManageLogInfoQueryReq
;
import
com.jz.manage.moduls.service.PlatformLogService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
...
...
@@ -20,6 +22,7 @@ import reactor.core.publisher.Mono;
*/
@RestController
@RequestMapping
(
"platformLog"
)
@Api
(
tags
=
"平台日志Controller"
)
public
class
PlatformLogController
extends
BaseController
{
/**
* 服务对象
...
...
@@ -34,7 +37,7 @@ public class PlatformLogController extends BaseController {
*/
@PostMapping
(
"/listManageLogInfo"
)
@ApiOperation
(
value
=
"后台用户日志信息列表"
)
public
Mono
<
Result
<
PageInfoRespons
e
<
PlatformLog
>>>
getLogInfo
(
@RequestBody
@Validated
ManageLogInfoQueryReq
req
)
{
public
Mono
<
Result
<
IPag
e
<
PlatformLog
>>>
getLogInfo
(
@RequestBody
@Validated
ManageLogInfoQueryReq
req
)
{
return
Mono
.
fromSupplier
(()
->
tPlatformLogService
.
listManageUserLogInfo
(
req
));
}
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/mapper/PlatformLogDao.java
View file @
4c40b5d1
package
com
.
jz
.
manage
.
moduls
.
mapper
;
import
com.jz.common.base.BaseMapper
;
import
com.jz.
common
.entity.PlatformLog
;
import
com.jz.
manage.moduls
.entity.PlatformLog
;
import
java.util.List
;
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/PlatformLogService.java
View file @
4c40b5d1
package
com
.
jz
.
manage
.
moduls
.
service
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.
common
.entity.PlatformLog
;
import
com.jz.
manage.moduls
.entity.PlatformLog
;
import
com.jz.common.utils.Result
;
import
com.jz.manage.moduls.controller.log.bean.ManageLogInfoQueryReq
;
...
...
@@ -19,7 +19,7 @@ public interface PlatformLogService {
* @param req
* @return
*/
Result
<
PageInfoResponse
<
PlatformLog
>>
listManageUserLogInfo
(
ManageLogInfoQueryReq
req
);
Result
listManageUserLogInfo
(
ManageLogInfoQueryReq
req
);
/**
* 获取用户日志详情
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/impl/PlatformLogServiceImpl.java
View file @
4c40b5d1
package
com
.
jz
.
manage
.
moduls
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
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.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.ResultMsg
;
import
com.jz.
common
.entity.PlatformLog
;
import
com.jz.
manage.moduls
.entity.PlatformLog
;
import
com.jz.common.utils.Result
;
import
com.jz.manage.moduls.controller.log.bean.ManageLogInfoQueryReq
;
import
com.jz.manage.moduls.mapper.PlatformLogDao
;
...
...
@@ -28,15 +31,13 @@ public class PlatformLogServiceImpl implements PlatformLogService {
@Override
public
Result
<
PageInfoResponse
<
PlatformLog
>>
listManageUserLogInfo
(
ManageLogInfoQueryReq
req
)
{
PageInfoResponse
<
PlatformLog
>
pageInfoResponse
=
new
PageInfoResponse
<>();
PageHelper
.
startPage
(
req
.
getPageNum
(),
req
.
getPageSize
());
List
<
PlatformLog
>
list
=
tPlatformLogDao
.
listMallLogInfo
();
PageInfo
<
PlatformLog
>
pageInfo
=
new
PageInfo
<>(
list
);
pageInfoResponse
.
setCode
(
Constants
.
SUCCESS_CODE
);
pageInfoResponse
.
setMessage
(
ResultMsg
.
SUCCESS
.
getMsg
());
pageInfoResponse
.
setData
(
pageInfo
);
return
Result
.
of_success
(
pageInfoResponse
);
public
Result
listManageUserLogInfo
(
ManageLogInfoQueryReq
req
)
{
IPage
<
PlatformLog
>
page
=
new
Page
<>(
req
.
getPageNum
(),
req
.
getPageSize
());
QueryWrapper
<
PlatformLog
>
query
=
new
QueryWrapper
<>();
query
.
eq
(
"del_flag"
,
"N"
);
query
.
orderByDesc
(
"cre_time"
);
IPage
<
PlatformLog
>
platformLogIPage
=
tPlatformLogDao
.
selectPage
(
page
,
query
);
return
Result
.
of_success
(
platformLogIPage
);
}
/**
...
...
@@ -46,7 +47,11 @@ public class PlatformLogServiceImpl implements PlatformLogService {
*/
@Override
public
Result
getMallUserLogDetail
(
Long
platformLogId
)
{
PlatformLog
platformLog
=
tPlatformLogDao
.
selectById
(
platformLogId
);
QueryWrapper
<
PlatformLog
>
query
=
new
QueryWrapper
<>();
query
.
eq
(
"platform_log_id"
,
platformLogId
);
query
.
eq
(
"del_flag"
,
"N"
);
query
.
orderByDesc
(
"cre_time"
);
PlatformLog
platformLog
=
tPlatformLogDao
.
selectOne
(
query
);
if
(
null
==
platformLog
){
return
Result
.
of_error
(
ResultMsg
.
DATA_NOT_FOUND
);
}
...
...
jz-dm-manage/src/main/resources/mapper/log/PlatformLogDao.xml
View file @
4c40b5d1
...
...
@@ -25,8 +25,17 @@
<result
property=
"creTime"
column=
"cre_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"delFlag"
column=
"del_flag"
jdbcType=
"VARCHAR"
/>
</resultMap>
<select
id=
"listMallLogInfo"
resultMap=
"TPlatformLogMap"
>
SELECT * FROM t_t_platform_log
<sql
id=
"allFiled"
>
platform_log_id AS platformLogId,request_ip AS requestIp,caller_id AS callerId,data_goods_id AS dataGoodsId,
api_key AS apiKey,request_params AS requestParams,return_params AS returnParams,request_url AS requestUrl
,request_time AS requestTime,service_type AS serviceType,data_goods_type AS dataGoodsType,download_address AS downloadAddress,
data_price AS dataPrice,price_type AS priceType,total_times AS totalTimes,used_times AS usedTimes
,remain_times AS remainTimes,caller_type AS callerType,start_time AS startTime,end_time AS endTime,cre_time AS creTime,
cre_person AS crePerson,upt_time AS uptTime,upt_person AS uptPerson,del_flag AS delFlag
</sql>
<select
id=
"listMallLogInfo"
resultType=
"com.jz.manage.moduls.entity.PlatformLog"
>
SELECT
<include
refid=
"allFiled"
/>
FROM t_platform_log
</select>
</mapper>
\ No newline at end of file
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