Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
c65aff9e
Commit
c65aff9e
authored
Jun 07, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户浏览记录
parent
72be54da
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
2090 additions
and
7 deletions
+2090
-7
ch-dao/src/main/java/com/wwdz/ch/db/dao/BrowseLogDao.java
ch-dao/src/main/java/com/wwdz/ch/db/dao/BrowseLogDao.java
+8
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/BrowseLog.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/BrowseLog.java
+284
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/BrowseLogExample.java
...src/main/java/com/wwdz/ch/db/domain/BrowseLogExample.java
+1257
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/BrowseLogDaoImpl.java
...o/src/main/java/com/wwdz/ch/db/impl/BrowseLogDaoImpl.java
+19
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/BrowseLogMapper.java
.../src/main/java/com/wwdz/ch/db/mapper/BrowseLogMapper.java
+69
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/BrowseLogMapper.xml
.../main/resources/com/wwdz/ch/db/mapper/BrowseLogMapper.xml
+338
-0
ch-dao/src/main/resources/generatorConfig_new.xml
ch-dao/src/main/resources/generatorConfig_new.xml
+4
-4
ch-wx-api/pom.xml
ch-wx-api/pom.xml
+6
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/Application.java
ch-wx-api/src/main/java/com/wwdz/ch/wx/Application.java
+2
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/aspect/AddBrowseLog.java
...api/src/main/java/com/wwdz/ch/wx/aspect/AddBrowseLog.java
+19
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/aspect/BrowseLogAop.java
...api/src/main/java/com/wwdz/ch/wx/aspect/BrowseLogAop.java
+77
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
.../main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/UserServiceImpl.java
...pi/src/main/java/com/wwdz/ch/wx/impl/UserServiceImpl.java
+2
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
...wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
+4
-0
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/dao/BrowseLogDao.java
0 → 100644
View file @
c65aff9e
package
com.wwdz.ch.db.dao
;
import
com.wwdz.ch.db.domain.BrowseLog
;
public
interface
BrowseLogDao
{
boolean
insert
(
BrowseLog
browseLog
);
}
ch-dao/src/main/java/com/wwdz/ch/db/domain/BrowseLog.java
0 → 100644
View file @
c65aff9e
package
com.wwdz.ch.db.domain
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
/**
* @author shiyu
* @date 2024/06/07
*/
@Data
public
class
BrowseLog
implements
Entity
{
private
Long
id
;
/**
* 浏览描述
*/
private
String
desc
;
/**
* 方法名
*/
private
String
methodName
;
/**
* 用户id
*/
private
Long
userId
;
/**
* 浏览时间
*/
private
Date
createTime
;
/**
* 浏览对象id
*/
private
String
targetId
;
/**
* 类型
*/
private
Integer
type
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", desc="
).
append
(
desc
);
sb
.
append
(
", methodName="
).
append
(
methodName
);
sb
.
append
(
", userId="
).
append
(
userId
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", targetId="
).
append
(
targetId
);
sb
.
append
(
", type="
).
append
(
type
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
@Override
public
boolean
equals
(
Object
that
)
{
if
(
this
==
that
)
{
return
true
;
}
if
(
that
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
that
.
getClass
())
{
return
false
;
}
BrowseLog
other
=
(
BrowseLog
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getDesc
()
==
null
?
other
.
getDesc
()
==
null
:
this
.
getDesc
().
equals
(
other
.
getDesc
()))
&&
(
this
.
getMethodName
()
==
null
?
other
.
getMethodName
()
==
null
:
this
.
getMethodName
().
equals
(
other
.
getMethodName
()))
&&
(
this
.
getUserId
()
==
null
?
other
.
getUserId
()
==
null
:
this
.
getUserId
().
equals
(
other
.
getUserId
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getTargetId
()
==
null
?
other
.
getTargetId
()
==
null
:
this
.
getTargetId
().
equals
(
other
.
getTargetId
()))
&&
(
this
.
getType
()
==
null
?
other
.
getType
()
==
null
:
this
.
getType
().
equals
(
other
.
getType
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getDesc
()
==
null
)
?
0
:
getDesc
().
hashCode
());
result
=
prime
*
result
+
((
getMethodName
()
==
null
)
?
0
:
getMethodName
().
hashCode
());
result
=
prime
*
result
+
((
getUserId
()
==
null
)
?
0
:
getUserId
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getTargetId
()
==
null
)
?
0
:
getTargetId
().
hashCode
());
result
=
prime
*
result
+
((
getType
()
==
null
)
?
0
:
getType
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"BIGINT"
,
false
),
desc
(
"desc"
,
"desc"
,
"VARCHAR"
,
true
),
methodName
(
"method_name"
,
"methodName"
,
"VARCHAR"
,
false
),
userId
(
"user_id"
,
"userId"
,
"BIGINT"
,
false
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
targetId
(
"target_id"
,
"targetId"
,
"VARCHAR"
,
false
),
type
(
"type"
,
"type"
,
"INTEGER"
,
true
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
BEGINNING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
ENDING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
column
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
boolean
isColumnNameDelimited
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
javaProperty
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
jdbcType
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
value
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getValue
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJavaProperty
()
{
return
this
.
javaProperty
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJdbcType
()
{
return
this
.
jdbcType
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column
(
String
column
,
String
javaProperty
,
String
jdbcType
,
boolean
isColumnNameDelimited
)
{
this
.
column
=
column
;
this
.
javaProperty
=
javaProperty
;
this
.
jdbcType
=
jdbcType
;
this
.
isColumnNameDelimited
=
isColumnNameDelimited
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
desc
()
{
return
this
.
getEscapedColumnName
()
+
" DESC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
asc
()
{
return
this
.
getEscapedColumnName
()
+
" ASC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Column
[]
excludes
(
Column
...
excludes
)
{
ArrayList
<
Column
>
columns
=
new
ArrayList
<>(
Arrays
.
asList
(
Column
.
values
()));
if
(
excludes
!=
null
&&
excludes
.
length
>
0
)
{
columns
.
removeAll
(
new
ArrayList
<>(
Arrays
.
asList
(
excludes
)));
}
return
columns
.
toArray
(
new
Column
[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getEscapedColumnName
()
{
if
(
this
.
isColumnNameDelimited
)
{
return
new
StringBuilder
().
append
(
BEGINNING_DELIMITER
).
append
(
this
.
column
).
append
(
ENDING_DELIMITER
).
toString
();
}
else
{
return
this
.
column
;
}
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/BrowseLogExample.java
0 → 100644
View file @
c65aff9e
This diff is collapsed.
Click to expand it.
ch-dao/src/main/java/com/wwdz/ch/db/impl/BrowseLogDaoImpl.java
0 → 100644
View file @
c65aff9e
package
com.wwdz.ch.db.impl
;
import
com.wwdz.ch.db.dao.BrowseLogDao
;
import
com.wwdz.ch.db.domain.BrowseLog
;
import
com.wwdz.ch.db.mapper.BrowseLogMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
@Repository
public
class
BrowseLogDaoImpl
implements
BrowseLogDao
{
@Autowired
BrowseLogMapper
browseLogMapper
;
@Override
public
boolean
insert
(
BrowseLog
browseLog
)
{
return
browseLogMapper
.
insert
(
browseLog
)
>
0
;
}
}
ch-dao/src/main/java/com/wwdz/ch/db/mapper/BrowseLogMapper.java
0 → 100644
View file @
c65aff9e
package
com.wwdz.ch.db.mapper
;
import
com.wwdz.ch.db.domain.BrowseLog
;
import
com.wwdz.ch.db.domain.BrowseLogExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
BrowseLogMapper
{
long
countByExample
(
BrowseLogExample
example
);
int
deleteByExample
(
BrowseLogExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
BrowseLog
record
);
int
insertSelective
(
BrowseLog
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
BrowseLog
selectOneByExample
(
BrowseLogExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
BrowseLog
selectOneByExampleSelective
(
@Param
(
"example"
)
BrowseLogExample
example
,
@Param
(
"selective"
)
BrowseLog
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
BrowseLog
>
selectByExampleSelective
(
@Param
(
"example"
)
BrowseLogExample
example
,
@Param
(
"selective"
)
BrowseLog
.
Column
...
selective
);
List
<
BrowseLog
>
selectByExample
(
BrowseLogExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table browse_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
BrowseLog
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Long
id
,
@Param
(
"selective"
)
BrowseLog
.
Column
...
selective
);
BrowseLog
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
BrowseLog
record
,
@Param
(
"example"
)
BrowseLogExample
example
);
int
updateByExample
(
@Param
(
"record"
)
BrowseLog
record
,
@Param
(
"example"
)
BrowseLogExample
example
);
int
updateByPrimaryKeySelective
(
BrowseLog
record
);
int
updateByPrimaryKey
(
BrowseLog
record
);
}
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/BrowseLogMapper.xml
0 → 100644
View file @
c65aff9e
This diff is collapsed.
Click to expand it.
ch-dao/src/main/resources/generatorConfig_new.xml
View file @
c65aff9e
...
@@ -63,16 +63,16 @@
...
@@ -63,16 +63,16 @@
<!--生成Model类存放位置-->
<!--生成Model类存放位置-->
<javaModelGenerator
targetPackage=
"com.wwdz.ch.db.domain
.distribution
"
targetProject=
"ch-dao/src/main/java"
>
<javaModelGenerator
targetPackage=
"com.wwdz.ch.db.domain"
targetProject=
"ch-dao/src/main/java"
>
<property
name=
"enableSubPackages"
value=
"true"
/>
<property
name=
"enableSubPackages"
value=
"true"
/>
<property
name=
"trimStrings"
value=
"true"
/>
<property
name=
"trimStrings"
value=
"true"
/>
</javaModelGenerator>
</javaModelGenerator>
<sqlMapGenerator
targetPackage=
"com.wwdz.ch.db.mapper
.distribution
"
targetProject=
"ch-dao/src/main/resources"
/>
<sqlMapGenerator
targetPackage=
"com.wwdz.ch.db.mapper"
targetProject=
"ch-dao/src/main/resources"
/>
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper
.distribution
"
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper"
targetProject=
"ch-dao/src/main/java"
/>
targetProject=
"ch-dao/src/main/java"
/>
<table
tableName=
"
special_performance
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<table
tableName=
"
user
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
</table>
</table>
...
...
ch-wx-api/pom.xml
View file @
c65aff9e
...
@@ -115,6 +115,12 @@
...
@@ -115,6 +115,12 @@
<artifactId>
jackson-dataformat-xml
</artifactId>
<artifactId>
jackson-dataformat-xml
</artifactId>
<version>
2.9.6
</version>
<version>
2.9.6
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.aspectj
</groupId>
<artifactId>
aspectjweaver
</artifactId>
<version>
1.8.13
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/Application.java
View file @
c65aff9e
...
@@ -4,6 +4,7 @@ import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
...
@@ -4,6 +4,7 @@ import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.context.annotation.EnableAspectJAutoProxy
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
...
@@ -19,6 +20,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
...
@@ -19,6 +20,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableTransactionManagement
@EnableTransactionManagement
@EnableScheduling
@EnableScheduling
@EnableDubbo
(
scanBasePackages
=
{
"com.wwdz.ch.wx"
})
@EnableDubbo
(
scanBasePackages
=
{
"com.wwdz.ch.wx"
})
@EnableAspectJAutoProxy
public
class
Application
{
public
class
Application
{
// 小程序后台服务启动类
// 小程序后台服务启动类
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/aspect/AddBrowseLog.java
0 → 100644
View file @
c65aff9e
package
com.wwdz.ch.wx.aspect
;
import
com.wwdz.ch.core.consts.DistributionEnum
;
import
java.lang.annotation.*
;
@Inherited
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Target
({
ElementType
.
METHOD
})
public
@interface
AddBrowseLog
{
/**
* 操作具体某个功能的描述
* @return
*/
String
desc
()
default
""
;
DistributionEnum
.
DistributionTypeEnum
type
();
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/aspect/BrowseLogAop.java
0 → 100644
View file @
c65aff9e
package
com.wwdz.ch.wx.aspect
;
import
com.wwdz.ch.db.dao.BrowseLogDao
;
import
com.wwdz.ch.db.domain.BrowseLog
;
import
com.xxdxxs.utils.EntityMapper
;
import
com.xxdxxs.utils.JsonUtils
;
import
com.xxdxxs.utils.StringUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.aspectj.lang.JoinPoint
;
import
org.aspectj.lang.annotation.AfterReturning
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Pointcut
;
import
org.aspectj.lang.reflect.MethodSignature
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.Date
;
import
java.util.Map
;
@Component
@Aspect
@Slf4j
public
class
BrowseLogAop
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
BrowseLogAop
.
class
);
@Autowired
BrowseLogDao
browseLogDao
;
@Pointcut
(
"@annotation(com.wwdz.ch.wx.aspect.AddBrowseLog)"
)
public
void
pointcut
()
{
}
/**
* 返回通知
*
* @param joinPoint
* @retur
*/
@AfterReturning
(
"pointcut()"
)
public
void
afterRuturn
(
JoinPoint
joinPoint
)
{
try
{
//执行目标方法
Object
[]
args
=
joinPoint
.
getArgs
();
logger
.
info
(
"入参为 : {}"
,
JsonUtils
.
from
(
args
[
0
]));
Map
<
String
,
Object
>
paramMap
=
JsonUtils
.
toMap
(
JsonUtils
.
from
(
args
[
0
]));
long
userId
=
Long
.
valueOf
(
String
.
valueOf
(
paramMap
.
get
(
"userId"
)));
String
id
=
String
.
valueOf
(
paramMap
.
get
(
"id"
));
String
targetId
=
null
;
if
(
StringUtils
.
hasLength
(
id
))
{
targetId
=
id
;
}
else
{
targetId
=
String
.
valueOf
(
paramMap
.
get
(
"shareRecordId"
));
}
//目标方法执行完成后,获取目标类、目标方法上的业务日志注解上的功能名称和功能描述
Object
target
=
joinPoint
.
getTarget
();
MethodSignature
signature
=
(
MethodSignature
)
joinPoint
.
getSignature
();
String
methodName
=
signature
.
getMethod
().
getName
();
AddBrowseLog
browseLogAnno
=
signature
.
getMethod
().
getAnnotation
(
AddBrowseLog
.
class
);
String
logDesc
=
browseLogAnno
.
desc
();
BrowseLog
browseLog
=
new
BrowseLog
();
browseLog
.
setDesc
(
logDesc
);
browseLog
.
setMethodName
(
methodName
);
browseLog
.
setUserId
(
userId
);
browseLog
.
setCreateTime
(
new
Date
());
browseLog
.
setTargetId
(
targetId
);
browseLog
.
setType
(
browseLogAnno
.
type
().
getCode
());
browseLogDao
.
insert
(
browseLog
);
logger
.
info
(
"===================== BrowseLogAop 执行完成 ====================="
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"保存用户浏览记录error : {}"
,
e
);
}
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
View file @
c65aff9e
...
@@ -49,7 +49,7 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
...
@@ -49,7 +49,7 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
,
"/wx/specialPerformance/**"
,
"/wx/specialPerformance/**"
,
"/wx/supplierItem/**"
,
"/wx/shareRecord/**"
,
"/wx/distributionOrder/**"
,
"/wx/selfPage/**"
,
"/wx/auctionRecord/**"
,
,
"/wx/supplierItem/**"
,
"/wx/shareRecord/**"
,
"/wx/distributionOrder/**"
,
"/wx/selfPage/**"
,
"/wx/auctionRecord/**"
,
"/wx/shareRecord/**"
,
"/wx/collectionBook/**"
,
"/wx/collectedRecord/**"
,
"/wx/collectionItemsRelation/**"
,
"/wx/collectionShareRecord/**"
"/wx/shareRecord/**"
,
"/wx/collectionBook/**"
,
"/wx/collectedRecord/**"
,
"/wx/collectionItemsRelation/**"
,
"/wx/collectionShareRecord/**"
,
"/wx/logistics/**"
,
"/wx/follow/**"
,
"/wx/logistics/**"
,
"/wx/follow/**"
,
"/wx/user/findById"
,
"/wx/user/updateQrCode"
// , "/wx/supplierItem/**", "/wx/shareRecord/**", "/wx/distributionOrder/**", "/wx/selfPage/**", "/wx/auctionRecord/**"
// , "/wx/supplierItem/**", "/wx/shareRecord/**", "/wx/distributionOrder/**", "/wx/selfPage/**", "/wx/auctionRecord/**"
/* "/wx/officialAccount/**",
/* "/wx/officialAccount/**",
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/UserServiceImpl.java
View file @
c65aff9e
...
@@ -625,14 +625,14 @@ public class UserServiceImpl implements UserService {
...
@@ -625,14 +625,14 @@ public class UserServiceImpl implements UserService {
// 缓存用户信息
// 缓存用户信息
redisUtil
.
set
(
key
,
user
,
2
*
60
*
60
);
redisUtil
.
set
(
key
,
user
,
2
*
60
*
60
);
}
}
try
{
/*
try {
CloudServerResponse<CommunityUserAttributeDO> response = communityAttributeReadService.getCommunityUserAttributeByUserId(userId);
CloudServerResponse<CommunityUserAttributeDO> response = communityAttributeReadService.getCommunityUserAttributeByUserId(userId);
if (response.isSuccess()) {
if (response.isSuccess()) {
user.setProfile(response.getResult() == null ? null : response.getResult().getSignature());
user.setProfile(response.getResult() == null ? null : response.getResult().getSignature());
}
}
} catch (Exception e) {
} catch (Exception e) {
logger.error(">>>>>>>>> 调用社区用户查询接口获取用户签名出错:{}", e);
logger.error(">>>>>>>>> 调用社区用户查询接口获取用户签名出错:{}", e);
}
}
*/
logger
.
info
(
"【请求结束】查询用户信息成功"
);
logger
.
info
(
"【请求结束】查询用户信息成功"
);
return
Result
.
success
(
user
);
return
Result
.
success
(
user
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
View file @
c65aff9e
...
@@ -21,6 +21,7 @@ import com.wwdz.ch.db.domain.distribution.*;
...
@@ -21,6 +21,7 @@ import com.wwdz.ch.db.domain.distribution.*;
import
com.wwdz.ch.db.dto.request.FollowFansRecordRequestDto
;
import
com.wwdz.ch.db.dto.request.FollowFansRecordRequestDto
;
import
com.wwdz.ch.db.dto.request.distribution.*
;
import
com.wwdz.ch.db.dto.request.distribution.*
;
import
com.wwdz.ch.core.entity.SupplierItemVo
;
import
com.wwdz.ch.core.entity.SupplierItemVo
;
import
com.wwdz.ch.wx.aspect.AddBrowseLog
;
import
com.wwdz.ch.wx.constant.CollectionBookConstants
;
import
com.wwdz.ch.wx.constant.CollectionBookConstants
;
import
com.wwdz.ch.wx.entity.vo.distribution.AuctionDetailVo
;
import
com.wwdz.ch.wx.entity.vo.distribution.AuctionDetailVo
;
import
com.wwdz.ch.wx.entity.vo.distribution.AuctionRecordRowVo
;
import
com.wwdz.ch.wx.entity.vo.distribution.AuctionRecordRowVo
;
...
@@ -178,6 +179,9 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -178,6 +179,9 @@ public class SupplierItemServiceImpl implements SupplierItemService {
return
Result
.
failed
();
return
Result
.
failed
();
}
}
@AddBrowseLog
(
desc
=
"查询平台商品详情"
,
type
=
DistributionEnum
.
DistributionTypeEnum
.
FIXED_PRICE
)
@Override
@Override
public
Result
findDetail
(
SupplierItemRequestDto
dto
)
{
public
Result
findDetail
(
SupplierItemRequestDto
dto
)
{
try
{
try
{
...
...
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