Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
4e69edea
Commit
4e69edea
authored
Aug 14, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
行为日志记录
parent
a89fb725
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
134 additions
and
95 deletions
+134
-95
BehaviorTypeBiz.java
.../com/xxfc/platform/user/behavior/biz/BehaviorTypeBiz.java
+2
-11
CustomerBehaviorNotesBiz.java
.../platform/user/behavior/biz/CustomerBehaviorNotesBiz.java
+115
-81
ActivityBehaviorMapper.java
...platform/user/behavior/mapper/ActivityBehaviorMapper.java
+1
-1
ActivityBehaviorRelationMapper.java
.../user/behavior/mapper/ActivityBehaviorRelationMapper.java
+1
-1
BehaviorTypeMapper.java
...xfc/platform/user/behavior/mapper/BehaviorTypeMapper.java
+14
-0
CustomerBehaviorNotesMapper.xml
...src/main/resources/mapper/CustomerBehaviorNotesMapper.xml
+1
-1
No files found.
xx-user-behavior-collect/xx-user-behavior-server/src/main/java/com/xxfc/platform/user/behavior/biz/BehaviorTypeBiz.java
View file @
4e69edea
...
...
@@ -4,10 +4,8 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
import
com.xxfc.platform.user.behavior.dto.BehaviorTypeDTO
;
import
com.xxfc.platform.user.behavior.entity.BehaviorType
;
import
com.xxfc.platform.user.behavior.mapper.BehaviorTypeMapper
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
...
...
@@ -20,14 +18,7 @@ import java.util.List;
public
class
BehaviorTypeBiz
extends
BaseBiz
<
BehaviorTypeMapper
,
BehaviorType
>
{
public
List
<
BehaviorTypeDTO
>
findBehaviorTypesByIds
(
List
<
Integer
>
typeIds
){
List
<
BehaviorTypeDTO
>
behaviorTypeDTOS
=
new
ArrayList
<>();
List
<
BehaviorType
>
behaviorTypes
=
mapper
.
selectByIdList
(
typeIds
);
BehaviorTypeDTO
behaviorTypeDTO
;
for
(
BehaviorType
behaviorType
:
behaviorTypes
)
{
behaviorTypeDTO
=
new
BehaviorTypeDTO
();
BeanUtils
.
copyProperties
(
behaviorType
,
behaviorTypeDTO
);
behaviorTypeDTOS
.
add
(
behaviorTypeDTO
);
}
return
behaviorTypeDTOS
;
return
mapper
.
selectAllByIdList
(
typeIds
);
}
}
xx-user-behavior-collect/xx-user-behavior-server/src/main/java/com/xxfc/platform/user/behavior/biz/CustomerBehaviorNotesBiz.java
View file @
4e69edea
This diff is collapsed.
Click to expand it.
xx-user-behavior-collect/xx-user-behavior-server/src/main/java/com/xxfc/platform/user/behavior/mapper/ActivityBehaviorMapper.java
View file @
4e69edea
...
...
@@ -17,7 +17,7 @@ import java.util.List;
* @data 2019/8/13 14:10
*/
public
interface
ActivityBehaviorMapper
extends
Mapper
<
ActivityBehavior
>
{
@Select
(
"select `behavior_type_id` from `activity_behavior` where `activity_id`=#{activityId}"
)
@Select
(
"select `
activity_id`,`
behavior_type_id` from `activity_behavior` where `activity_id`=#{activityId}"
)
@Results
(
value
=
{
@Result
(
column
=
"activity_id"
,
property
=
"activityId"
),
@Result
(
column
=
"behavior_type_id"
,
property
=
"behaviorTypeId"
)
...
...
xx-user-behavior-collect/xx-user-behavior-server/src/main/java/com/xxfc/platform/user/behavior/mapper/ActivityBehaviorRelationMapper.java
View file @
4e69edea
...
...
@@ -18,7 +18,7 @@ import java.util.List;
*/
public
interface
ActivityBehaviorRelationMapper
extends
Mapper
<
ActivityBehaviorRelation
>
{
@Select
(
"select
*
from `activity_behavior_relation` where `activity_id`=#{activityId}"
)
@Select
(
"select
`type`,`biz_id`,`activity_id`
from `activity_behavior_relation` where `activity_id`=#{activityId}"
)
@Results
(
value
=
{
@Result
(
property
=
"type"
,
column
=
"type"
),
@Result
(
property
=
"bizId"
,
column
=
"biz_id"
),
...
...
xx-user-behavior-collect/xx-user-behavior-server/src/main/java/com/xxfc/platform/user/behavior/mapper/BehaviorTypeMapper.java
View file @
4e69edea
package
com
.
xxfc
.
platform
.
user
.
behavior
.
mapper
;
import
com.xxfc.platform.user.behavior.dto.BehaviorTypeDTO
;
import
com.xxfc.platform.user.behavior.entity.BehaviorType
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Result
;
import
org.apache.ibatis.annotations.Results
;
import
org.apache.ibatis.annotations.Select
;
import
tk.mybatis.mapper.additional.idlist.IdListMapper
;
import
tk.mybatis.mapper.common.Mapper
;
import
java.util.List
;
/**
* @author libin
* @version 1.0
...
...
@@ -11,4 +18,11 @@ import tk.mybatis.mapper.common.Mapper;
* @data 2019/8/13 14:13
*/
public
interface
BehaviorTypeMapper
extends
Mapper
<
BehaviorType
>,
IdListMapper
<
BehaviorType
,
Integer
>
{
@Select
(
"<script>select `name`,`code` from behavior_type where `id` in <foreach collection='typeIds' open='(' item='typeId' separator=',' close=')'> #{typeId}</foreach></script>"
)
@Results
(
value
=
{
@Result
(
column
=
"name"
,
property
=
"name"
),
@Result
(
column
=
"code"
,
property
=
"code"
)
})
List
<
BehaviorTypeDTO
>
selectAllByIdList
(
@Param
(
"typeIds"
)
List
<
Integer
>
typeIds
);
}
xx-user-behavior-collect/xx-user-behavior-server/src/main/resources/mapper/CustomerBehaviorNotesMapper.xml
View file @
4e69edea
...
...
@@ -45,6 +45,6 @@
<if
test=
"endTime != null and startTime == null"
>
and
<![CDATA[ `crt_time` <= #{endTime}]]>
</if>
and `type` in(0,1,2,3)
</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