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
bf394c75
Commit
bf394c75
authored
Dec 04, 2020
by
zhangc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加商城+后台日志相关接口
parent
d22a126f
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
135 additions
and
191 deletions
+135
-191
LogInfoController.java
...m/jz/dm/mall/moduls/controller/log/LogInfoController.java
+14
-6
LogInfoService.java
...in/java/com/jz/dm/mall/moduls/service/LogInfoService.java
+7
-0
LogInfoServiceImpl.java
...om/jz/dm/mall/moduls/service/impl/LogInfoServiceImpl.java
+14
-0
PlatformLogDao.xml
jz-dm-mall/src/main/resources/mapperconf/PlatformLogDao.xml
+2
-0
pom.xml
jz-dm-manage/pom.xml
+4
-0
PlatformLogController.java
...z/manage/moduls/controller/log/PlatformLogController.java
+28
-2
PlatformLogDao.java
...main/java/com/jz/manage/moduls/mapper/PlatformLogDao.java
+9
-0
PlatformLogService.java
...java/com/jz/manage/moduls/service/PlatformLogService.java
+18
-0
PlatformLogServiceImpl.java
...jz/manage/moduls/service/impl/PlatformLogServiceImpl.java
+37
-0
PlatformLogDao.xml
...m-manage/src/main/resources/mapper/log/PlatformLogDao.xml
+2
-183
No files found.
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/log/LogInfoController.java
View file @
bf394c75
...
@@ -11,10 +11,7 @@ import io.swagger.annotations.Api;
...
@@ -11,10 +11,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
reactor.core.publisher.Mono
;
import
reactor.core.publisher.Mono
;
/**
/**
...
@@ -36,13 +33,24 @@ public class LogInfoController {
...
@@ -36,13 +33,24 @@ public class LogInfoController {
private
LogInfoService
logInfoService
;
private
LogInfoService
logInfoService
;
/**
/**
* @Description:
添加企业认证信息
* @Description:
获取商城用户日志信息列表
* @Author: Mr.zhang
* @Author: Mr.zhang
* @Date: 2020-12-2
* @Date: 2020-12-2
*/
*/
@PostMapping
(
"/getMallLogInfo"
)
@PostMapping
(
"/getMallLogInfo"
)
@ApiOperation
(
value
=
"获取商城用户日志信息"
)
@ApiOperation
(
value
=
"获取商城用户日志信息
列表
"
)
public
Mono
<
Result
<
PageInfoResponse
<
PlatformLog
>>>
getLogInfo
(
@RequestBody
@Validated
LogInfoQueryReq
req
)
{
public
Mono
<
Result
<
PageInfoResponse
<
PlatformLog
>>>
getLogInfo
(
@RequestBody
@Validated
LogInfoQueryReq
req
)
{
return
Mono
.
fromSupplier
(()
->
logInfoService
.
getMallUserLogInfo
(
req
));
return
Mono
.
fromSupplier
(()
->
logInfoService
.
getMallUserLogInfo
(
req
));
}
}
/**
* @Description: 获取商城用户日志信息详情
* @Author: Mr.zhang
* @Date: 2020-12-2
*/
@PostMapping
(
"/getMallLogDetail"
)
@ApiOperation
(
value
=
"获取商城用户日志信息详情"
)
public
Mono
<
Result
>
getLogInfoDetail
(
@RequestParam
(
value
=
"日志信息Id"
)
Long
platformLogId
)
{
return
Mono
.
fromSupplier
(()
->
logInfoService
.
getMallUserLogDetail
(
platformLogId
));
}
}
}
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/LogInfoService.java
View file @
bf394c75
...
@@ -23,4 +23,11 @@ public interface LogInfoService {
...
@@ -23,4 +23,11 @@ public interface LogInfoService {
* @return
* @return
*/
*/
Result
<
PageInfoResponse
<
PlatformLog
>>
getMallUserLogInfo
(
LogInfoQueryReq
req
);
Result
<
PageInfoResponse
<
PlatformLog
>>
getMallUserLogInfo
(
LogInfoQueryReq
req
);
/**
* 获取商城用户日志信息详情
* @param platformLogId
* @return
*/
Result
getMallUserLogDetail
(
Long
platformLogId
);
}
}
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/impl/LogInfoServiceImpl.java
View file @
bf394c75
...
@@ -59,4 +59,18 @@ public class LogInfoServiceImpl implements LogInfoService {
...
@@ -59,4 +59,18 @@ public class LogInfoServiceImpl implements LogInfoService {
pageInfoResponse
.
setData
(
pageInfo
);
pageInfoResponse
.
setData
(
pageInfo
);
return
Result
.
of_success
(
pageInfoResponse
);
return
Result
.
of_success
(
pageInfoResponse
);
}
}
/**
* 获取商城用户日志信息详情
* @param platformLogId
* @return
*/
@Override
public
Result
getMallUserLogDetail
(
Long
platformLogId
)
{
PlatformLog
platformLog
=
platformLogDao
.
selectById
(
platformLogId
);
if
(
null
==
platformLog
){
return
Result
.
of_error
(
ResultMsg
.
DATA_NOT_FOUND
);
}
return
Result
.
of_success
(
platformLog
);
}
}
}
jz-dm-mall/src/main/resources/mapperconf/PlatformLogDao.xml
View file @
bf394c75
...
@@ -3,5 +3,7 @@
...
@@ -3,5 +3,7 @@
<mapper
namespace=
"com.jz.dm.mall.moduls.mapper.PlatformLogDao"
>
<mapper
namespace=
"com.jz.dm.mall.moduls.mapper.PlatformLogDao"
>
<select
id=
"listMallLogInfo"
resultType=
"com.jz.common.entity.PlatformLog"
>
</select>
</mapper>
</mapper>
\ No newline at end of file
jz-dm-manage/pom.xml
View file @
bf394c75
...
@@ -141,6 +141,10 @@
...
@@ -141,6 +141,10 @@
<version>
1.0.0-SNAPSHOT
</version>
<version>
1.0.0-SNAPSHOT
</version>
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
<dependency>
<groupId>
io.projectreactor
</groupId>
<artifactId>
reactor-core
</artifactId>
</dependency>
<!--阿里云服务器短信平台-->
<!--阿里云服务器短信平台-->
<dependency>
<dependency>
<groupId>
com.aliyun
</groupId>
<groupId>
com.aliyun
</groupId>
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/log/PlatformLogController.java
View file @
bf394c75
package
com
.
jz
.
manage
.
moduls
.
controller
.
log
;
package
com
.
jz
.
manage
.
moduls
.
controller
.
log
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.entity.PlatformLog
;
import
com.jz.common.utils.Result
;
import
com.jz.manage.moduls.controller.BaseController
;
import
com.jz.manage.moduls.controller.BaseController
;
import
com.jz.manage.moduls.controller.log.bean.ManageLogInfoQueryReq
;
import
com.jz.manage.moduls.service.PlatformLogService
;
import
com.jz.manage.moduls.service.PlatformLogService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
reactor.core.publisher.Mono
;
/**
/**
* 日志管理(TPlatformLog)表控制层
* 日志管理(TPlatformLog)表控制层
...
@@ -21,5 +27,25 @@ public class PlatformLogController extends BaseController {
...
@@ -21,5 +27,25 @@ public class PlatformLogController extends BaseController {
@Autowired
@Autowired
private
PlatformLogService
tPlatformLogService
;
private
PlatformLogService
tPlatformLogService
;
/**
* @Description: 后台用户日志信息列表
* @Author: Mr.zhang
* @Date: 2020-12-2
*/
@PostMapping
(
"/listManageLogInfo"
)
@ApiOperation
(
value
=
"后台用户日志信息列表"
)
public
Mono
<
Result
<
PageInfoResponse
<
PlatformLog
>>>
getLogInfo
(
@RequestBody
@Validated
ManageLogInfoQueryReq
req
)
{
return
Mono
.
fromSupplier
(()
->
tPlatformLogService
.
listManageUserLogInfo
(
req
));
}
/**
* @Description: 获取用户日志信息详情
* @Author: Mr.zhang
* @Date: 2020-12-2
*/
@PostMapping
(
"/getLogDetail"
)
@ApiOperation
(
value
=
"获取用户日志信息详情"
)
public
Mono
<
Result
>
getLogInfoDetail
(
@RequestParam
(
value
=
"日志信息Id"
)
Long
platformLogId
)
{
return
Mono
.
fromSupplier
(()
->
tPlatformLogService
.
getMallUserLogDetail
(
platformLogId
));
}
}
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/mapper/PlatformLogDao.java
View file @
bf394c75
...
@@ -3,6 +3,8 @@ package com.jz.manage.moduls.mapper;
...
@@ -3,6 +3,8 @@ package com.jz.manage.moduls.mapper;
import
com.jz.common.base.BaseMapper
;
import
com.jz.common.base.BaseMapper
;
import
com.jz.common.entity.PlatformLog
;
import
com.jz.common.entity.PlatformLog
;
import
java.util.List
;
/**
/**
* 日志管理(TPlatformLog)表数据库访问层
* 日志管理(TPlatformLog)表数据库访问层
*
*
...
@@ -11,4 +13,11 @@ import com.jz.common.entity.PlatformLog;
...
@@ -11,4 +13,11 @@ import com.jz.common.entity.PlatformLog;
*/
*/
public
interface
PlatformLogDao
extends
BaseMapper
<
PlatformLog
>
{
public
interface
PlatformLogDao
extends
BaseMapper
<
PlatformLog
>
{
/**
* 查询平台用户日志列表
* @return
*/
List
<
PlatformLog
>
listMallLogInfo
();
}
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/PlatformLogService.java
View file @
bf394c75
package
com
.
jz
.
manage
.
moduls
.
service
;
package
com
.
jz
.
manage
.
moduls
.
service
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.entity.PlatformLog
;
import
com.jz.common.utils.Result
;
import
com.jz.manage.moduls.controller.log.bean.ManageLogInfoQueryReq
;
/**
/**
* 日志管理(TPlatformLog)表服务接口
* 日志管理(TPlatformLog)表服务接口
*
*
...
@@ -9,4 +14,17 @@ package com.jz.manage.moduls.service;
...
@@ -9,4 +14,17 @@ package com.jz.manage.moduls.service;
public
interface
PlatformLogService
{
public
interface
PlatformLogService
{
/**
* 平台用户日志列表
* @param req
* @return
*/
Result
<
PageInfoResponse
<
PlatformLog
>>
listManageUserLogInfo
(
ManageLogInfoQueryReq
req
);
/**
* 获取用户日志详情
* @param platformLogId
* @return
*/
Result
getMallUserLogDetail
(
Long
platformLogId
);
}
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/impl/PlatformLogServiceImpl.java
View file @
bf394c75
package
com
.
jz
.
manage
.
moduls
.
service
.
impl
;
package
com
.
jz
.
manage
.
moduls
.
service
.
impl
;
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.common.utils.Result
;
import
com.jz.manage.moduls.controller.log.bean.ManageLogInfoQueryReq
;
import
com.jz.manage.moduls.mapper.PlatformLogDao
;
import
com.jz.manage.moduls.mapper.PlatformLogDao
;
import
com.jz.manage.moduls.service.PlatformLogService
;
import
com.jz.manage.moduls.service.PlatformLogService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
/**
* 日志管理(TPlatformLog)表服务实现类
* 日志管理(TPlatformLog)表服务实现类
*
*
...
@@ -15,4 +25,31 @@ import org.springframework.stereotype.Service;
...
@@ -15,4 +25,31 @@ import org.springframework.stereotype.Service;
public
class
PlatformLogServiceImpl
implements
PlatformLogService
{
public
class
PlatformLogServiceImpl
implements
PlatformLogService
{
@Autowired
@Autowired
private
PlatformLogDao
tPlatformLogDao
;
private
PlatformLogDao
tPlatformLogDao
;
@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
);
}
/**
* 获取用户日志详情
* @param platformLogId
* @return
*/
@Override
public
Result
getMallUserLogDetail
(
Long
platformLogId
)
{
PlatformLog
platformLog
=
tPlatformLogDao
.
selectById
(
platformLogId
);
if
(
null
==
platformLog
){
return
Result
.
of_error
(
ResultMsg
.
DATA_NOT_FOUND
);
}
return
Result
.
of_success
(
platformLog
);
}
}
}
\ No newline at end of file
jz-dm-manage/src/main/resources/mapper/log/PlatformLogDao.xml
View file @
bf394c75
...
@@ -25,189 +25,8 @@
...
@@ -25,189 +25,8 @@
<result
property=
"creTime"
column=
"cre_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"creTime"
column=
"cre_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"delFlag"
column=
"del_flag"
jdbcType=
"VARCHAR"
/>
<result
property=
"delFlag"
column=
"del_flag"
jdbcType=
"VARCHAR"
/>
</resultMap>
</resultMap>
<select
id=
"listMallLogInfo"
resultMap=
"TPlatformLogMap"
>
<!--查询单个-->
SELECT * FROM t_t_platform_log
<select
id=
"queryById"
resultMap=
"TPlatformLogMap"
>
select
platform_log_id, request_ip, caller_id, data_goods_id, api_key, request_params, return_params, request_url, request_time, service_type, data_goods_type, download_address, data_price, price_type, total_times, used_times, remain_times, start_time, end_time, cre_time, del_flag
from t_platform_log
where platform_log_id = #{platformLogId}
</select>
<!--查询指定行数据-->
<select
id=
"queryAllByLimit"
resultMap=
"TPlatformLogMap"
>
select
platform_log_id, request_ip, caller_id, data_goods_id, api_key, request_params, return_params, request_url, request_time, service_type, data_goods_type, download_address, data_price, price_type, total_times, used_times, remain_times, start_time, end_time, cre_time, del_flag
from t_platform_log
limit #{offset}, #{limit}
</select>
<!--通过实体作为筛选条件查询-->
<select
id=
"queryAll"
resultMap=
"TPlatformLogMap"
>
select
platform_log_id, request_ip, caller_id, data_goods_id, api_key, request_params, return_params, request_url,
request_time, service_type, data_goods_type, download_address, data_price, price_type, total_times, used_times,
remain_times, start_time, end_time, cre_time, del_flag
from t_platform_log
<where>
<if
test=
"platformLogId != null"
>
and platform_log_id = #{platformLogId}
</if>
<if
test=
"requestIp != null and requestIp != ''"
>
and request_ip = #{requestIp}
</if>
<if
test=
"callerId != null and callerId != ''"
>
and caller_id = #{callerId}
</if>
<if
test=
"dataGoodsId != null"
>
and data_goods_id = #{dataGoodsId}
</if>
<if
test=
"apiKey != null and apiKey != ''"
>
and api_key = #{apiKey}
</if>
<if
test=
"requestParams != null and requestParams != ''"
>
and request_params = #{requestParams}
</if>
<if
test=
"returnParams != null and returnParams != ''"
>
and return_params = #{returnParams}
</if>
<if
test=
"requestUrl != null and requestUrl != ''"
>
and request_url = #{requestUrl}
</if>
<if
test=
"requestTime != null"
>
and request_time = #{requestTime}
</if>
<if
test=
"serviceType != null and serviceType != ''"
>
and service_type = #{serviceType}
</if>
<if
test=
"dataGoodsType != null and dataGoodsType != ''"
>
and data_goods_type = #{dataGoodsType}
</if>
<if
test=
"downloadAddress != null and downloadAddress != ''"
>
and download_address = #{downloadAddress}
</if>
<if
test=
"dataPrice != null"
>
and data_price = #{dataPrice}
</if>
<if
test=
"priceType != null and priceType != ''"
>
and price_type = #{priceType}
</if>
<if
test=
"totalTimes != null"
>
and total_times = #{totalTimes}
</if>
<if
test=
"usedTimes != null"
>
and used_times = #{usedTimes}
</if>
<if
test=
"remainTimes != null"
>
and remain_times = #{remainTimes}
</if>
<if
test=
"startTime != null"
>
and start_time = #{startTime}
</if>
<if
test=
"endTime != null"
>
and end_time = #{endTime}
</if>
<if
test=
"creTime != null"
>
and cre_time = #{creTime}
</if>
<if
test=
"delFlag != null and delFlag != ''"
>
and del_flag = #{delFlag}
</if>
</where>
</select>
</select>
<!--新增所有列-->
<insert
id=
"insert"
keyProperty=
"platformLogId"
useGeneratedKeys=
"true"
>
insert into t_platform_log(request_ip, caller_id, data_goods_id, api_key, request_params, return_params, request_url, request_time, service_type, data_goods_type, download_address, data_price, price_type, total_times, used_times, remain_times, start_time, end_time, cre_time, del_flag)
values (#{requestIp}, #{callerId}, #{dataGoodsId}, #{apiKey}, #{requestParams}, #{returnParams}, #{requestUrl}, #{requestTime}, #{serviceType}, #{dataGoodsType}, #{downloadAddress}, #{dataPrice}, #{priceType}, #{totalTimes}, #{usedTimes}, #{remainTimes}, #{startTime}, #{endTime}, #{creTime}, #{delFlag})
</insert>
<insert
id=
"insertBatch"
keyProperty=
"platformLogId"
useGeneratedKeys=
"true"
>
insert into t_platform_log(request_ip, caller_id, data_goods_id, api_key, request_params,
return_params, request_url, request_time, service_type, data_goods_type, download_address, data_price,
price_type, total_times, used_times, remain_times, start_time, end_time, cre_time, del_flag)
values
<foreach
collection=
"entities"
item=
"entity"
separator=
","
>
(#{entity.requestIp}, #{entity.callerId}, #{entity.dataGoodsId}, #{entity.apiKey}, #{entity.requestParams},
#{entity.returnParams}, #{entity.requestUrl}, #{entity.requestTime}, #{entity.serviceType},
#{entity.dataGoodsType}, #{entity.downloadAddress}, #{entity.dataPrice}, #{entity.priceType},
#{entity.totalTimes}, #{entity.usedTimes}, #{entity.remainTimes}, #{entity.startTime}, #{entity.endTime},
#{entity.creTime}, #{entity.delFlag})
</foreach>
</insert>
<!--通过主键修改数据-->
<update
id=
"update"
>
update t_platform_log
<set>
<if
test=
"requestIp != null and requestIp != ''"
>
request_ip = #{requestIp},
</if>
<if
test=
"callerId != null and callerId != ''"
>
caller_id = #{callerId},
</if>
<if
test=
"dataGoodsId != null"
>
data_goods_id = #{dataGoodsId},
</if>
<if
test=
"apiKey != null and apiKey != ''"
>
api_key = #{apiKey},
</if>
<if
test=
"requestParams != null and requestParams != ''"
>
request_params = #{requestParams},
</if>
<if
test=
"returnParams != null and returnParams != ''"
>
return_params = #{returnParams},
</if>
<if
test=
"requestUrl != null and requestUrl != ''"
>
request_url = #{requestUrl},
</if>
<if
test=
"requestTime != null"
>
request_time = #{requestTime},
</if>
<if
test=
"serviceType != null and serviceType != ''"
>
service_type = #{serviceType},
</if>
<if
test=
"dataGoodsType != null and dataGoodsType != ''"
>
data_goods_type = #{dataGoodsType},
</if>
<if
test=
"downloadAddress != null and downloadAddress != ''"
>
download_address = #{downloadAddress},
</if>
<if
test=
"dataPrice != null"
>
data_price = #{dataPrice},
</if>
<if
test=
"priceType != null and priceType != ''"
>
price_type = #{priceType},
</if>
<if
test=
"totalTimes != null"
>
total_times = #{totalTimes},
</if>
<if
test=
"usedTimes != null"
>
used_times = #{usedTimes},
</if>
<if
test=
"remainTimes != null"
>
remain_times = #{remainTimes},
</if>
<if
test=
"startTime != null"
>
start_time = #{startTime},
</if>
<if
test=
"endTime != null"
>
end_time = #{endTime},
</if>
<if
test=
"creTime != null"
>
cre_time = #{creTime},
</if>
<if
test=
"delFlag != null and delFlag != ''"
>
del_flag = #{delFlag},
</if>
</set>
where platform_log_id = #{platformLogId}
</update>
<!--通过主键删除-->
<delete
id=
"deleteById"
>
delete from t_platform_log where platform_log_id = #{platformLogId}
</delete>
</mapper>
</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