Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
Overview
Overview
Details
Activity
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
pseer
gxpt_ht
Commits
ebc067dc
Commit
ebc067dc
authored
Sep 20, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refs/heads/dev' into test
parents
4ee8e41f
32238d09
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
269 additions
and
263 deletions
+269
-263
EquityFundLogController.java
.../share/web/controller/system/EquityFundLogController.java
+4
-2
SharingActivitiesController.java
...re/web/controller/system/SharingActivitiesController.java
+4
-2
EquityFundLogController.java
.../share/web/controller/system/EquityFundLogController.java
+6
-3
SharingActivitiesController.java
...re/web/controller/system/SharingActivitiesController.java
+13
-6
RedisTask.java
share-quartz/src/main/java/share/quartz/task/RedisTask.java
+0
-12
EquityFundLog.java
...stem/src/main/java/share/system/domain/EquityFundLog.java
+0
-38
SharingActivities.java
.../src/main/java/share/system/domain/SharingActivities.java
+0
-28
EquityFundLogVo.java
...src/main/java/share/system/domain/vo/EquityFundLogVo.java
+33
-0
SharingActivitiesVo.java
...main/java/share/system/domain/vo/SharingActivitiesVo.java
+38
-0
EquityFundLogService.java
.../main/java/share/system/service/EquityFundLogService.java
+7
-0
SharingActivitiesService.java
...n/java/share/system/service/SharingActivitiesService.java
+4
-0
CallbackServiceImpl.java
...n/java/share/system/service/impl/CallbackServiceImpl.java
+0
-85
EquityFundLogServiceImpl.java
...a/share/system/service/impl/EquityFundLogServiceImpl.java
+73
-0
SConsumerCenterServiceImpl.java
...share/system/service/impl/SConsumerCenterServiceImpl.java
+6
-6
SharingActivitiesServiceImpl.java
...are/system/service/impl/SharingActivitiesServiceImpl.java
+77
-6
EquityFundLogMapper.xml
.../src/main/resources/mapper/system/EquityFundLogMapper.xml
+2
-43
SharingActivitiesMapper.xml
.../main/resources/mapper/system/SharingActivitiesMapper.xml
+2
-32
No files found.
share-admin/src/main/java/share/web/controller/system/EquityFundLogController.java
View file @
ebc067dc
...
@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController;
...
@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.domain.AjaxResult
;
import
share.common.enums.BusinessType
;
import
share.common.enums.BusinessType
;
import
share.system.domain.EquityFundLog
;
import
share.system.domain.EquityFundLog
;
import
share.system.domain.vo.EquityFundLogVo
;
import
share.system.service.EquityFundLogService
;
import
share.system.service.EquityFundLogService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.page.TableDataInfo
;
...
@@ -39,11 +40,12 @@ public class EquityFundLogController extends BaseController
...
@@ -39,11 +40,12 @@ public class EquityFundLogController extends BaseController
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:equityFundLog:list')"
)
@PreAuthorize
(
"@ss.hasPermi('system:equityFundLog:list')"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
EquityFundLog
equityFundLog
)
public
TableDataInfo
list
(
EquityFundLog
Vo
equityFundLog
)
{
{
startPage
();
startPage
();
List
<
EquityFundLog
>
list
=
equityFundLogService
.
selectEquityFundLogList
(
equityFundLog
);
List
<
EquityFundLog
>
list
=
equityFundLogService
.
selectEquityFundLogList
(
equityFundLog
);
return
getDataTable
(
list
);
TableDataInfo
dataTable
=
getDataTable
(
list
);
return
equityFundLogService
.
pageList
(
dataTable
,
equityFundLog
);
}
}
/**
/**
...
...
share-admin/src/main/java/share/web/controller/system/SharingActivitiesController.java
View file @
ebc067dc
...
@@ -18,6 +18,7 @@ import share.common.core.controller.BaseController;
...
@@ -18,6 +18,7 @@ import share.common.core.controller.BaseController;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.domain.AjaxResult
;
import
share.common.enums.BusinessType
;
import
share.common.enums.BusinessType
;
import
share.system.domain.SharingActivities
;
import
share.system.domain.SharingActivities
;
import
share.system.domain.vo.SharingActivitiesVo
;
import
share.system.service.SharingActivitiesService
;
import
share.system.service.SharingActivitiesService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.page.TableDataInfo
;
...
@@ -39,10 +40,11 @@ public class SharingActivitiesController extends BaseController {
...
@@ -39,10 +40,11 @@ public class SharingActivitiesController extends BaseController {
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:activities:list')"
)
@PreAuthorize
(
"@ss.hasPermi('system:activities:list')"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SharingActivities
sharingActivities
)
{
public
TableDataInfo
list
(
SharingActivities
Vo
sharingActivities
)
{
startPage
();
startPage
();
List
<
SharingActivities
>
list
=
sharingActivitiesService
.
selectSharingActivitiesList
(
sharingActivities
);
List
<
SharingActivities
>
list
=
sharingActivitiesService
.
selectSharingActivitiesList
(
sharingActivities
);
return
getDataTable
(
list
);
TableDataInfo
dataTable
=
getDataTable
(
list
);
return
sharingActivitiesService
.
pageList
(
dataTable
,
sharingActivities
);
}
}
/**
/**
...
...
share-front/src/main/java/share/web/controller/system/EquityFundLogController.java
View file @
ebc067dc
...
@@ -11,7 +11,9 @@ import share.common.enums.BusinessType;
...
@@ -11,7 +11,9 @@ import share.common.enums.BusinessType;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.EquityFundLog
;
import
share.system.domain.EquityFundLog
;
import
share.system.domain.SConsumer
;
import
share.system.domain.SConsumer
;
import
share.system.domain.SharingActivities
;
import
share.system.domain.vo.DurationLogVo
;
import
share.system.domain.vo.DurationLogVo
;
import
share.system.domain.vo.EquityFundLogVo
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.service.EquityFundLogService
;
import
share.system.service.EquityFundLogService
;
...
@@ -34,12 +36,13 @@ public class EquityFundLogController extends BaseController {
...
@@ -34,12 +36,13 @@ public class EquityFundLogController extends BaseController {
* 查询本人权益金记录列表
* 查询本人权益金记录列表
*/
*/
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
EquityFundLog
equityFundLog
)
{
public
TableDataInfo
list
(
EquityFundLogVo
equityFundLog
)
{
startPage
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
equityFundLog
.
setUid
(
user
.
getId
());
equityFundLog
.
setUid
(
user
.
getId
());
startPage
();
List
<
EquityFundLog
>
list
=
equityFundLogService
.
selectEquityFundLogList
(
equityFundLog
);
List
<
EquityFundLog
>
list
=
equityFundLogService
.
selectEquityFundLogList
(
equityFundLog
);
return
getDataTable
(
list
);
TableDataInfo
dataTable
=
getDataTable
(
list
);
return
equityFundLogService
.
pageList
(
dataTable
,
equityFundLog
);
}
}
...
...
share-front/src/main/java/share/web/controller/system/SharingActivitiesController.java
View file @
ebc067dc
...
@@ -13,6 +13,7 @@ import share.system.domain.EquityFundLog;
...
@@ -13,6 +13,7 @@ import share.system.domain.EquityFundLog;
import
share.system.domain.SConsumer
;
import
share.system.domain.SConsumer
;
import
share.system.domain.SharingActivities
;
import
share.system.domain.SharingActivities
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.SharingActivitiesVo
;
import
share.system.service.SharingActivitiesService
;
import
share.system.service.SharingActivitiesService
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
...
@@ -34,20 +35,24 @@ public class SharingActivitiesController extends BaseController {
...
@@ -34,20 +35,24 @@ public class SharingActivitiesController extends BaseController {
* 查询分享活动绑定关系列表
* 查询分享活动绑定关系列表
*/
*/
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SharingActivities
sharingActivities
)
{
public
TableDataInfo
list
(
SharingActivitiesVo
sharingActivities
)
{
startPage
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
sharingActivities
.
setUid
(
user
.
getId
());
sharingActivities
.
setNewUid
(
user
.
getId
());
startPage
();
List
<
SharingActivities
>
list
=
sharingActivitiesService
.
selectSharingActivitiesList
(
sharingActivities
);
List
<
SharingActivities
>
list
=
sharingActivitiesService
.
selectSharingActivitiesList
(
sharingActivities
);
return
getDataTable
(
list
);
TableDataInfo
dataTable
=
getDataTable
(
list
);
return
sharingActivitiesService
.
pageList
(
dataTable
,
sharingActivities
);
}
}
@GetMapping
(
"/query"
)
@GetMapping
(
"/query"
)
public
AjaxResult
query
(
SharingActivities
sharingActivities
)
{
public
TableDataInfo
query
(
SharingActivitiesVo
sharingActivities
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
sharingActivities
.
setNewUid
(
user
.
getId
());
sharingActivities
.
setNewUid
(
user
.
getId
());
startPage
();
List
<
SharingActivities
>
list
=
sharingActivitiesService
.
selectSharingActivitiesList
(
sharingActivities
);
List
<
SharingActivities
>
list
=
sharingActivitiesService
.
selectSharingActivitiesList
(
sharingActivities
);
return
success
(
list
);
TableDataInfo
dataTable
=
getDataTable
(
list
);
return
sharingActivitiesService
.
pageList
(
dataTable
,
sharingActivities
);
}
}
/**
/**
...
@@ -64,4 +69,6 @@ public class SharingActivitiesController extends BaseController {
...
@@ -64,4 +69,6 @@ public class SharingActivitiesController extends BaseController {
}
}
share-quartz/src/main/java/share/quartz/task/RedisTask.java
View file @
ebc067dc
...
@@ -428,10 +428,6 @@ public class RedisTask {
...
@@ -428,10 +428,6 @@ public class RedisTask {
consumerWallet
.
setUpdateTime
(
DateUtils
.
getNowDate
());
consumerWallet
.
setUpdateTime
(
DateUtils
.
getNowDate
());
consumerWalletService
.
updateConsumerWallet
(
consumerWallet
);
consumerWalletService
.
updateConsumerWallet
(
consumerWallet
);
//添加权益金日志记录
//添加权益金日志记录
//下级用户
SConsumer
newConsumer
=
consumerService
.
getById
(
sOrder
.
getConsumerId
());
//上级用户
SConsumer
consumer
=
consumerService
.
getById
(
sharingActivities
.
getUid
());
EquityFundLog
equityFundLog
=
new
EquityFundLog
();
EquityFundLog
equityFundLog
=
new
EquityFundLog
();
equityFundLog
.
setEquityFund
(
addEquityFund
);
equityFundLog
.
setEquityFund
(
addEquityFund
);
equityFundLog
.
setEquityFundType
(
EquityFundTypeEnum
.
ORDER
.
getCode
());
equityFundLog
.
setEquityFundType
(
EquityFundTypeEnum
.
ORDER
.
getCode
());
...
@@ -439,14 +435,6 @@ public class RedisTask {
...
@@ -439,14 +435,6 @@ public class RedisTask {
equityFundLog
.
setTerminalTrace
(
sOrder
.
getOutTradeNo
());
equityFundLog
.
setTerminalTrace
(
sOrder
.
getOutTradeNo
());
equityFundLog
.
setUid
(
sharingActivities
.
getUid
());
equityFundLog
.
setUid
(
sharingActivities
.
getUid
());
equityFundLog
.
setNewUid
(
sharingActivities
.
getNewUid
());
equityFundLog
.
setNewUid
(
sharingActivities
.
getNewUid
());
equityFundLog
.
setPhone
(
consumer
.
getPhone
());
equityFundLog
.
setAccount
(
consumer
.
getAccount
());
equityFundLog
.
setNickName
(
consumer
.
getNickName
());
equityFundLog
.
setAvatar
(
consumer
.
getAvatar
());
equityFundLog
.
setNewAvatar
(
newConsumer
.
getAvatar
());
equityFundLog
.
setNewPhone
(
newConsumer
.
getPhone
());
equityFundLog
.
setNewAccount
(
newConsumer
.
getAccount
());
equityFundLog
.
setNewNickName
(
newConsumer
.
getNickName
());
equityFundLogService
.
insertEquityFundLog
(
equityFundLog
);
equityFundLogService
.
insertEquityFundLog
(
equityFundLog
);
}
}
}
}
...
...
share-system/src/main/java/share/system/domain/EquityFundLog.java
View file @
ebc067dc
...
@@ -54,37 +54,7 @@ public class EquityFundLog extends BaseEntity
...
@@ -54,37 +54,7 @@ public class EquityFundLog extends BaseEntity
@TableField
(
select
=
false
)
@TableField
(
select
=
false
)
private
Long
isDelete
;
private
Long
isDelete
;
/** 上级电话 */
@Excel
(
name
=
"上级电话"
)
private
String
phone
;
/** 上级账号 */
@Excel
(
name
=
"上级账号"
)
private
String
account
;
/** 上级用户昵称 */
@Excel
(
name
=
"上级用户昵称"
)
private
String
nickName
;
/** 下级电话 */
@Excel
(
name
=
"下级电话"
)
private
String
newPhone
;
/** 下级账号 */
@Excel
(
name
=
"下级账号"
)
private
String
newAccount
;
/** 下级用户昵称 */
@Excel
(
name
=
"下级用户昵称"
)
private
String
newNickName
;
/** 上级用户头像 */
@Excel
(
name
=
"上级用户头像"
)
private
String
avatar
;
/** 下级用户头像 */
@Excel
(
name
=
"下级用户头像"
)
private
String
newAvatar
;
@Override
@Override
...
@@ -103,14 +73,6 @@ public class EquityFundLog extends BaseEntity
...
@@ -103,14 +73,6 @@ public class EquityFundLog extends BaseEntity
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"remark"
,
getRemark
())
.
append
(
"remark"
,
getRemark
())
.
append
(
"phone"
,
getPhone
())
.
append
(
"account"
,
getAccount
())
.
append
(
"nickName"
,
getNickName
())
.
append
(
"newPhone"
,
getNewPhone
())
.
append
(
"newAccount"
,
getNewAccount
())
.
append
(
"newNickName"
,
getNewNickName
())
.
append
(
"avatar"
,
getAvatar
())
.
append
(
"newAvatar"
,
getNewAvatar
())
.
toString
();
.
toString
();
}
}
}
}
share-system/src/main/java/share/system/domain/SharingActivities.java
View file @
ebc067dc
...
@@ -40,29 +40,7 @@ public class SharingActivities extends BaseEntity
...
@@ -40,29 +40,7 @@ public class SharingActivities extends BaseEntity
@TableField
(
select
=
false
)
@TableField
(
select
=
false
)
private
Long
isDelete
;
private
Long
isDelete
;
/** 上级用户头像 */
@Excel
(
name
=
"上级用户头像"
)
private
String
avatar
;
/** 下级用户头像 */
@Excel
(
name
=
"下级用户头像"
)
private
String
newAvatar
;
/** 上级用户昵称 */
@Excel
(
name
=
"上级用户昵称"
)
private
String
nickName
;
/** 下级用户昵称 */
@Excel
(
name
=
"下级用户昵称"
)
private
String
newNickName
;
/** 上级电话 */
@Excel
(
name
=
"上级电话"
)
private
String
phone
;
/** 下级电话 */
@Excel
(
name
=
"下级电话"
)
private
String
newPhone
;
@Override
@Override
...
@@ -78,12 +56,6 @@ public class SharingActivities extends BaseEntity
...
@@ -78,12 +56,6 @@ public class SharingActivities extends BaseEntity
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"remark"
,
getRemark
())
.
append
(
"remark"
,
getRemark
())
.
append
(
"avatar"
,
getAvatar
())
.
append
(
"newAvatar"
,
getNewAvatar
())
.
append
(
"nickName"
,
getNickName
())
.
append
(
"newNickName"
,
getNewNickName
())
.
append
(
"phone"
,
getPhone
())
.
append
(
"newPhone"
,
getNewPhone
())
.
toString
();
.
toString
();
}
}
}
}
share-system/src/main/java/share/system/domain/vo/EquityFundLogVo.java
0 → 100644
View file @
ebc067dc
package
share
.
system
.
domain
.
vo
;
import
lombok.Data
;
import
share.common.annotation.Excel
;
import
share.system.domain.EquityFundLog
;
@Data
public
class
EquityFundLogVo
extends
EquityFundLog
{
/** 上级电话 */
private
String
phone
;
/** 上级账号 */
private
String
account
;
/** 上级用户昵称 */
private
String
nickName
;
/** 下级电话 */
private
String
newPhone
;
/** 下级账号 */
private
String
newAccount
;
/** 下级用户昵称 */
private
String
newNickName
;
/** 上级用户头像 */
private
String
avatar
;
/** 下级用户头像 */
private
String
newAvatar
;
}
share-system/src/main/java/share/system/domain/vo/SharingActivitiesVo.java
0 → 100644
View file @
ebc067dc
package
share
.
system
.
domain
.
vo
;
import
lombok.Data
;
import
share.system.domain.SharingActivities
;
@Data
public
class
SharingActivitiesVo
extends
SharingActivities
{
/** 上级用户头像 */
private
String
avatar
;
/** 下级用户头像 */
private
String
newAvatar
;
/** 上级用户昵称 */
private
String
nickName
;
/** 下级用户昵称 */
private
String
newNickName
;
/** 上级电话 */
private
String
phone
;
/** 下级电话 */
private
String
newPhone
;
private
Integer
pageNum
;
private
Integer
pageSize
;
}
share-system/src/main/java/share/system/service/EquityFundLogService.java
View file @
ebc067dc
...
@@ -2,7 +2,10 @@ package share.system.service;
...
@@ -2,7 +2,10 @@ package share.system.service;
import
java.util.List
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.common.core.page.TableDataInfo
;
import
share.system.domain.EquityFundLog
;
import
share.system.domain.EquityFundLog
;
import
share.system.domain.vo.EquityFundLogVo
;
import
share.system.domain.vo.SharingActivitiesVo
;
/**
/**
* 权益金记录Service接口
* 权益金记录Service接口
...
@@ -63,4 +66,8 @@ public interface EquityFundLogService extends IService<EquityFundLog>
...
@@ -63,4 +66,8 @@ public interface EquityFundLogService extends IService<EquityFundLog>
List
<
EquityFundLog
>
selectEquityFundLogByUid
(
Long
uid
);
List
<
EquityFundLog
>
selectEquityFundLogByUid
(
Long
uid
);
List
<
EquityFundLog
>
selectEquityFundLogByNewUid
(
Long
newUid
);
List
<
EquityFundLog
>
selectEquityFundLogByNewUid
(
Long
newUid
);
TableDataInfo
pageList
(
TableDataInfo
info
,
EquityFundLogVo
sharingActivities
);
}
}
share-system/src/main/java/share/system/service/SharingActivitiesService.java
View file @
ebc067dc
...
@@ -3,7 +3,9 @@ package share.system.service;
...
@@ -3,7 +3,9 @@ package share.system.service;
import
java.util.List
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.page.TableDataInfo
;
import
share.system.domain.SharingActivities
;
import
share.system.domain.SharingActivities
;
import
share.system.domain.vo.SharingActivitiesVo
;
/**
/**
* 分享活动绑定关系Service接口
* 分享活动绑定关系Service接口
...
@@ -63,4 +65,6 @@ public interface SharingActivitiesService extends IService<SharingActivities>
...
@@ -63,4 +65,6 @@ public interface SharingActivitiesService extends IService<SharingActivities>
int
selectSharingActivitiesCount
(
SharingActivities
sharingActivities
);
int
selectSharingActivitiesCount
(
SharingActivities
sharingActivities
);
TableDataInfo
pageList
(
TableDataInfo
info
,
SharingActivitiesVo
sharingActivities
);
}
}
share-system/src/main/java/share/system/service/impl/CallbackServiceImpl.java
View file @
ebc067dc
...
@@ -809,10 +809,6 @@ public class CallbackServiceImpl implements CallbackService {
...
@@ -809,10 +809,6 @@ public class CallbackServiceImpl implements CallbackService {
consumerWalletService
.
insertConsumerWallet
(
newConsumerWallet
);
consumerWalletService
.
insertConsumerWallet
(
newConsumerWallet
);
}
}
//添加权益金日志记录
//添加权益金日志记录
//下级用户
SConsumer
newConsumer
=
consumerService
.
getById
(
consumerId
);
//上级用户
SConsumer
consumer
=
consumerService
.
getById
(
sharingActivities
.
getUid
());
EquityFundLog
equityFundLog
=
new
EquityFundLog
();
EquityFundLog
equityFundLog
=
new
EquityFundLog
();
equityFundLog
.
setEquityFund
(
addEquityFund
);
equityFundLog
.
setEquityFund
(
addEquityFund
);
equityFundLog
.
setEquityFundType
(
type
);
equityFundLog
.
setEquityFundType
(
type
);
...
@@ -820,92 +816,11 @@ public class CallbackServiceImpl implements CallbackService {
...
@@ -820,92 +816,11 @@ public class CallbackServiceImpl implements CallbackService {
equityFundLog
.
setTerminalTrace
(
terminalTrace
);
equityFundLog
.
setTerminalTrace
(
terminalTrace
);
equityFundLog
.
setUid
(
sharingActivities
.
getUid
());
equityFundLog
.
setUid
(
sharingActivities
.
getUid
());
equityFundLog
.
setNewUid
(
sharingActivities
.
getNewUid
());
equityFundLog
.
setNewUid
(
sharingActivities
.
getNewUid
());
equityFundLog
.
setPhone
(
consumer
.
getPhone
());
equityFundLog
.
setAccount
(
consumer
.
getAccount
());
equityFundLog
.
setNickName
(
consumer
.
getNickName
());
equityFundLog
.
setAvatar
(
consumer
.
getAvatar
());
equityFundLog
.
setNewAvatar
(
newConsumer
.
getAvatar
());
equityFundLog
.
setNewPhone
(
newConsumer
.
getPhone
());
equityFundLog
.
setNewAccount
(
newConsumer
.
getAccount
());
equityFundLog
.
setNewNickName
(
newConsumer
.
getNickName
());
equityFundLogService
.
insertEquityFundLog
(
equityFundLog
);
equityFundLogService
.
insertEquityFundLog
(
equityFundLog
);
}
}
}
}
}
}
}
}
// /**
// * 新增权益金日志
// * @param consumerId 用户ID
// * @param payPrice 消费金额
// * @param equityOrderNo 订单编号
// * @param terminalTrace 终端流水号
// * @param type 权益类型
// */
// private void addEquityFundLogRights(Long consumerId, BigDecimal payPrice, String equityOrderNo, String terminalTrace, String type) {
// //查询是否有上级
// SharingActivities sharingActivities = sharingActivitiesService.getOne(new LambdaQueryWrapper<SharingActivities>()
// .eq(SharingActivities::getNewUid, consumerId)
// .eq(SharingActivities::getIsDelete, YesNoEnum.no.getIndex()));
// if (ObjectUtil.isNotEmpty(sharingActivities)) {
// //查询会员用户类型
// LambdaQueryWrapper<ConsumerMember> consumerMemberWrapper = new LambdaQueryWrapper<>();
// consumerMemberWrapper.eq(ConsumerMember::getConsumerId, sharingActivities.getUid());
// ConsumerMember consumerMember = consumerMemberService.getOne(consumerMemberWrapper);
// LambdaQueryWrapper<ConsumerMember> newConsumerMemberWrapper = new LambdaQueryWrapper<>();
// newConsumerMemberWrapper.eq(ConsumerMember::getConsumerId, sharingActivities.getUid());
// ConsumerMember newConsumerMember = consumerMemberService.getOne(newConsumerMemberWrapper);
// //判断是否为权益会员和会员是否有效
// if ("2".equals(consumerMember.getMemberType()) && new Date().getTime() < consumerMember.getExpirationDate().getTime()
// && "2".equals(newConsumerMember.getMemberType()) && new Date().getTime() < newConsumerMember.getExpirationDate().getTime()) {
// Boolean aBoolean = redisTemplate.hasKey(ReceiptRdeisEnum.EQUITY_MEMBERS_TIME + sharingActivities.getUid().toString());
// Boolean newAboolean = redisTemplate.hasKey(ReceiptRdeisEnum.EQUITY_MEMBERS_TIME + sharingActivities.getNewUid().toString());
// if (aBoolean && newAboolean) {
// String equityFund = sysConfigService.selectConfigByKey("sys.equityFundLog.equityFund");
// //查询上级用户是否有钱包
// ConsumerWallet consumerWallet = consumerWalletService.getOne(new LambdaQueryWrapper<ConsumerWallet>()
// .eq(ConsumerWallet::getConsumerId, sharingActivities.getUid()));
// if (ObjectUtil.isNotEmpty(consumerWallet)) {
// consumerWallet.setEquityFund(consumerWallet.getEquityFund().add(payPrice.multiply(new BigDecimal(equityFund))));
// consumerWallet.setAccumulateEquityFund(consumerWallet.getAccumulateEquityFund().
// add(payPrice.multiply(new BigDecimal(equityFund))));
// consumerWallet.setUpdateTime(DateUtils.getNowDate());
// consumerWalletService.updateConsumerWallet(consumerWallet);
// } else {
// //新增钱包
// ConsumerWallet newConsumerWallet = new ConsumerWallet();
// BigDecimal defaultVlue = new BigDecimal(0.0);
// newConsumerWallet.setConsumerId(sharingActivities.getUid());
// newConsumerWallet.setBalance(defaultVlue);
// newConsumerWallet.setRemainingIntegral(defaultVlue);
// newConsumerWallet.setRemainingDuration(defaultVlue);
// newConsumerWallet.setEquityFund(consumerWallet.getEquityFund().add(payPrice.multiply(new BigDecimal(equityFund).setScale(2, RoundingMode.HALF_UP))));
// newConsumerWallet.setAccumulateEquityFund(consumerWallet.getAccumulateEquityFund()
// .add(payPrice.multiply(new BigDecimal(equityFund).setScale(2, RoundingMode.HALF_UP))));
// consumerWalletService.insertConsumerWallet(newConsumerWallet);
// }
// //添加权益金日志记录
// //下级用户
// SConsumer newConsumer = consumerService.getById(consumerId);
// //上级用户
// SConsumer consumer = consumerService.getById(sharingActivities.getUid());
// EquityFundLog equityFundLog = new EquityFundLog();
// equityFundLog.setEquityFund(payPrice.multiply(new BigDecimal(equityFund).setScale(2, RoundingMode.HALF_UP)));
// equityFundLog.setEquityFundType(type);
// equityFundLog.setOutTradeNo(equityOrderNo);
// equityFundLog.setTerminalTrace(terminalTrace);
// equityFundLog.setUid(sharingActivities.getUid());
// equityFundLog.setNewUid(sharingActivities.getNewUid());
// equityFundLog.setPhone(consumer.getPhone());
// equityFundLog.setAccount(consumer.getAccount());
// equityFundLog.setNickName(consumer.getNickName());
// equityFundLog.setNewPhone(newConsumer.getPhone());
// equityFundLog.setNewAccount(newConsumer.getAccount());
// equityFundLog.setNewNickName(newConsumer.getNickName());
// equityFundLogService.insertEquityFundLog(equityFundLog);
// }
// }
// }
// }
...
...
share-system/src/main/java/share/system/service/impl/EquityFundLogServiceImpl.java
View file @
ebc067dc
package
share
.
system
.
service
.
impl
;
package
share
.
system
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
share.common.core.page.TableDataInfo
;
import
share.common.utils.DateUtils
;
import
share.common.utils.DateUtils
;
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
share.common.utils.StringUtils
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.EquityFundLogVo
;
import
share.system.mapper.EquityFundLogMapper
;
import
share.system.mapper.EquityFundLogMapper
;
import
share.system.domain.EquityFundLog
;
import
share.system.domain.EquityFundLog
;
import
share.system.service.EquityFundLogService
;
import
share.system.service.EquityFundLogService
;
import
share.system.service.SConsumerService
;
/**
/**
* 权益金记录Service业务层处理
* 权益金记录Service业务层处理
...
@@ -23,6 +36,9 @@ public class EquityFundLogServiceImpl extends ServiceImpl<EquityFundLogMapper, E
...
@@ -23,6 +36,9 @@ public class EquityFundLogServiceImpl extends ServiceImpl<EquityFundLogMapper, E
@Autowired
@Autowired
private
EquityFundLogMapper
equityFundLogMapper
;
private
EquityFundLogMapper
equityFundLogMapper
;
@Autowired
private
SConsumerService
sConsumerService
;
/**
/**
* 查询权益金记录
* 查询权益金记录
*
*
...
@@ -44,6 +60,8 @@ public class EquityFundLogServiceImpl extends ServiceImpl<EquityFundLogMapper, E
...
@@ -44,6 +60,8 @@ public class EquityFundLogServiceImpl extends ServiceImpl<EquityFundLogMapper, E
@Override
@Override
public
List
<
EquityFundLog
>
selectEquityFundLogList
(
EquityFundLog
equityFundLog
)
public
List
<
EquityFundLog
>
selectEquityFundLogList
(
EquityFundLog
equityFundLog
)
{
{
return
equityFundLogMapper
.
selectEquityFundLogList
(
equityFundLog
);
return
equityFundLogMapper
.
selectEquityFundLogList
(
equityFundLog
);
}
}
...
@@ -108,4 +126,59 @@ public class EquityFundLogServiceImpl extends ServiceImpl<EquityFundLogMapper, E
...
@@ -108,4 +126,59 @@ public class EquityFundLogServiceImpl extends ServiceImpl<EquityFundLogMapper, E
return
equityFundLogMapper
.
selectList
(
new
LambdaQueryWrapper
<
EquityFundLog
>().
eq
(
EquityFundLog:
:
getNewUid
,
newUid
));
return
equityFundLogMapper
.
selectList
(
new
LambdaQueryWrapper
<
EquityFundLog
>().
eq
(
EquityFundLog:
:
getNewUid
,
newUid
));
}
}
@Override
public
TableDataInfo
pageList
(
TableDataInfo
info
,
EquityFundLogVo
equityFundLog
)
{
List
<
EquityFundLogVo
>
voList
=
new
ArrayList
<>();
List
<
EquityFundLog
>
activities
=(
List
<
EquityFundLog
>)
info
.
getRows
();
if
(
CollectionUtils
.
isEmpty
(
activities
))
return
info
;
List
<
Long
>
collect
=
activities
.
stream
().
map
(
EquityFundLog:
:
getNewUid
).
collect
(
Collectors
.
toList
());
List
<
Long
>
uids
=
activities
.
stream
().
map
(
EquityFundLog:
:
getUid
).
collect
(
Collectors
.
toList
());
LambdaQueryWrapper
<
SConsumer
>
newSConsumer
=
new
LambdaQueryWrapper
<
SConsumer
>();
LambdaQueryWrapper
<
SConsumer
>
uSConsumer
=
new
LambdaQueryWrapper
<
SConsumer
>();
newSConsumer
.
in
(
SConsumer:
:
getId
,
collect
);
uSConsumer
.
in
(
SConsumer:
:
getId
,
uids
);
if
(
StringUtils
.
isNotEmpty
(
equityFundLog
.
getNewNickName
())){
newSConsumer
.
like
(
SConsumer:
:
getNickName
,
equityFundLog
.
getNewNickName
());
}
if
(
StringUtils
.
isNotEmpty
(
equityFundLog
.
getNewPhone
())){
newSConsumer
.
like
(
SConsumer:
:
getPhone
,
equityFundLog
.
getNewPhone
());
}
if
(
StringUtils
.
isNotEmpty
(
equityFundLog
.
getNickName
())){
uSConsumer
.
like
(
SConsumer:
:
getNickName
,
equityFundLog
.
getNickName
());
}
if
(
StringUtils
.
isNotEmpty
(
equityFundLog
.
getPhone
())){
uSConsumer
.
like
(
SConsumer:
:
getPhone
,
equityFundLog
.
getPhone
());
}
Map
<
Long
,
SConsumer
>
newUserMap
=
sConsumerService
.
list
(
newSConsumer
)
.
stream
().
collect
(
Collectors
.
toMap
(
SConsumer:
:
getId
,
Function
.
identity
()));
Map
<
Long
,
SConsumer
>
userMap
=
sConsumerService
.
list
(
uSConsumer
)
.
stream
().
collect
(
Collectors
.
toMap
(
SConsumer:
:
getId
,
Function
.
identity
()));
activities
.
stream
().
forEach
(
item
->{
EquityFundLogVo
vo
=
new
EquityFundLogVo
();
BeanUtils
.
copyProperties
(
item
,
vo
);
Set
<
Long
>
longs
=
userMap
.
keySet
();
Set
<
Long
>
longs1
=
newUserMap
.
keySet
();
if
(!(
longs
.
contains
(
item
.
getUid
())
&&
longs1
.
contains
(
item
.
getNewUid
()))){
return
;
}
SConsumer
newConsumer
=
newUserMap
.
get
(
item
.
getNewUid
());
SConsumer
uConsumer
=
userMap
.
get
(
item
.
getUid
());
if
(
ObjectUtil
.
isNotEmpty
(
newConsumer
)){
vo
.
setNewAvatar
(
StringUtils
.
isNotEmpty
(
newConsumer
.
getAvatar
())
?
newConsumer
.
getAvatar
():
""
);
vo
.
setNewNickName
(
StringUtils
.
isNotEmpty
(
newConsumer
.
getNickName
())
?
newConsumer
.
getNickName
():
""
);
vo
.
setNewPhone
(
StringUtils
.
isNotEmpty
(
newConsumer
.
getPhone
())
?
newConsumer
.
getPhone
():
""
);
}
if
(
ObjectUtil
.
isNotEmpty
(
uConsumer
)){
vo
.
setAvatar
(
StringUtils
.
isNotEmpty
(
uConsumer
.
getAvatar
())
?
uConsumer
.
getAvatar
():
""
);
vo
.
setNickName
(
StringUtils
.
isNotEmpty
(
uConsumer
.
getNickName
())
?
uConsumer
.
getNickName
():
""
);
vo
.
setPhone
(
StringUtils
.
isNotEmpty
(
uConsumer
.
getPhone
())
?
uConsumer
.
getPhone
():
""
);
}
voList
.
add
(
vo
);
});
info
.
setRows
(
voList
);
return
info
;
}
}
}
share-system/src/main/java/share/system/service/impl/SConsumerCenterServiceImpl.java
View file @
ebc067dc
...
@@ -316,12 +316,12 @@ public class SConsumerCenterServiceImpl extends ServiceImpl<SConsumerMapper, SCo
...
@@ -316,12 +316,12 @@ public class SConsumerCenterServiceImpl extends ServiceImpl<SConsumerMapper, SCo
SConsumer
newConsumer
=
sConsumerService
.
selectSConsumerById
(
id
);
SConsumer
newConsumer
=
sConsumerService
.
selectSConsumerById
(
id
);
SharingActivities
sharingActivities
=
new
SharingActivities
();
SharingActivities
sharingActivities
=
new
SharingActivities
();
sharingActivities
.
setUid
(
uid
);
sharingActivities
.
setUid
(
uid
);
sharingActivities
.
setPhone
(
consumer
.
getPhone
());
//
sharingActivities.setPhone(consumer.getPhone());
sharingActivities
.
setAvatar
(
consumer
.
getAvatar
());
//
sharingActivities.setAvatar(consumer.getAvatar());
sharingActivities
.
setNickName
(
consumer
.
getNickName
());
//
sharingActivities.setNickName(consumer.getNickName());
sharingActivities
.
setNewPhone
(
newConsumer
.
getPhone
());
//
sharingActivities.setNewPhone(newConsumer.getPhone());
sharingActivities
.
setNewAvatar
(
newConsumer
.
getAvatar
());
//
sharingActivities.setNewAvatar(newConsumer.getAvatar());
sharingActivities
.
setNewNickName
(
newConsumer
.
getNickName
());
//
sharingActivities.setNewNickName(newConsumer.getNickName());
sharingActivities
.
setNewUid
(
id
);
sharingActivities
.
setNewUid
(
id
);
sharingActivities
.
setCreateTime
(
DateUtils
.
getNowDate
());
sharingActivities
.
setCreateTime
(
DateUtils
.
getNowDate
());
sharingActivitiesService
.
insertSharingActivities
(
sharingActivities
);
sharingActivitiesService
.
insertSharingActivities
(
sharingActivities
);
...
...
share-system/src/main/java/share/system/service/impl/SharingActivitiesServiceImpl.java
View file @
ebc067dc
package
share
.
system
.
service
.
impl
;
package
share
.
system
.
service
.
impl
;
import
java.time.YearMonth
;
import
java.time.YearMonth
;
import
java.util.List
;
import
java.util.*
;
import
java.util.Set
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.poi.hssf.record.DVALRecord
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.redis.RedisUtil
;
import
share.common.core.redis.RedisUtil
;
import
share.common.enums.ReceiptRdeisEnum
;
import
share.common.enums.ReceiptRdeisEnum
;
import
share.common.enums.YesNoEnum
;
import
share.common.enums.YesNoEnum
;
import
share.common.utils.DateUtils
;
import
share.common.utils.DateUtils
;
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
share.common.utils.StringUtils
;
import
share.system.domain.SConsumer
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.SharingActivitiesVo
;
import
share.system.mapper.SharingActivitiesMapper
;
import
share.system.mapper.SharingActivitiesMapper
;
import
share.system.domain.SharingActivities
;
import
share.system.domain.SharingActivities
;
import
share.system.service.SConsumerService
;
import
share.system.service.SConsumerService
;
import
share.system.service.SharingActivitiesService
;
import
share.system.service.SharingActivitiesService
;
import
javax.annotation.Resource
;
/**
/**
* 分享活动绑定关系Service业务层处理
* 分享活动绑定关系Service业务层处理
*
*
...
@@ -30,7 +39,7 @@ import share.system.service.SharingActivitiesService;
...
@@ -30,7 +39,7 @@ import share.system.service.SharingActivitiesService;
@Service
@Service
public
class
SharingActivitiesServiceImpl
extends
ServiceImpl
<
SharingActivitiesMapper
,
SharingActivities
>
implements
SharingActivitiesService
public
class
SharingActivitiesServiceImpl
extends
ServiceImpl
<
SharingActivitiesMapper
,
SharingActivities
>
implements
SharingActivitiesService
{
{
@
Autowired
@
Resource
private
SharingActivitiesMapper
sharingActivitiesMapper
;
private
SharingActivitiesMapper
sharingActivitiesMapper
;
@Autowired
@Autowired
...
@@ -39,6 +48,10 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
...
@@ -39,6 +48,10 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
@Autowired
@Autowired
private
RedisTemplate
redisTemplate
;
private
RedisTemplate
redisTemplate
;
@Autowired
private
SConsumerService
sConsumerService
;
/**
/**
* 查询分享活动绑定关系
* 查询分享活动绑定关系
*
*
...
@@ -61,6 +74,7 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
...
@@ -61,6 +74,7 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
public
List
<
SharingActivities
>
selectSharingActivitiesList
(
SharingActivities
sharingActivities
)
public
List
<
SharingActivities
>
selectSharingActivitiesList
(
SharingActivities
sharingActivities
)
{
{
return
sharingActivitiesMapper
.
selectSharingActivitiesList
(
sharingActivities
);
return
sharingActivitiesMapper
.
selectSharingActivitiesList
(
sharingActivities
);
}
}
...
@@ -89,9 +103,9 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
...
@@ -89,9 +103,9 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
{
{
SConsumer
consumer
=
consumerService
.
selectSConsumerById
(
sharingActivities
.
getUid
());
SConsumer
consumer
=
consumerService
.
selectSConsumerById
(
sharingActivities
.
getUid
());
sharingActivities
.
setUpdateTime
(
DateUtils
.
getNowDate
());
sharingActivities
.
setUpdateTime
(
DateUtils
.
getNowDate
());
sharingActivities
.
setAvatar
(
consumer
.
getAvatar
());
//
sharingActivities.setAvatar(consumer.getAvatar());
sharingActivities
.
setPhone
(
consumer
.
getPhone
());
//
sharingActivities.setPhone(consumer.getPhone());
sharingActivities
.
setNickName
(
consumer
.
getNickName
());
//
sharingActivities.setNickName(consumer.getNickName());
return
sharingActivitiesMapper
.
updateSharingActivities
(
sharingActivities
);
return
sharingActivitiesMapper
.
updateSharingActivities
(
sharingActivities
);
}
}
...
@@ -127,5 +141,62 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
...
@@ -127,5 +141,62 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
.
eq
(
SharingActivities:
:
getIsDelete
,
YesNoEnum
.
no
.
getIndex
()));
.
eq
(
SharingActivities:
:
getIsDelete
,
YesNoEnum
.
no
.
getIndex
()));
}
}
@Override
public
TableDataInfo
pageList
(
TableDataInfo
info
,
SharingActivitiesVo
sharingActivities
)
{
List
<
SharingActivitiesVo
>
voList
=
new
ArrayList
<>();
List
<
SharingActivities
>
activities
=(
List
<
SharingActivities
>)
info
.
getRows
();
if
(
CollectionUtils
.
isEmpty
(
activities
)){
return
info
;
}
List
<
Long
>
collect
=
activities
.
stream
().
map
(
SharingActivities:
:
getNewUid
).
collect
(
Collectors
.
toList
());
List
<
Long
>
uids
=
activities
.
stream
().
map
(
SharingActivities:
:
getUid
).
collect
(
Collectors
.
toList
());
LambdaQueryWrapper
<
SConsumer
>
newSConsumer
=
new
LambdaQueryWrapper
<
SConsumer
>();
LambdaQueryWrapper
<
SConsumer
>
uSConsumer
=
new
LambdaQueryWrapper
<
SConsumer
>();
newSConsumer
.
in
(
SConsumer:
:
getId
,
collect
);
uSConsumer
.
in
(
SConsumer:
:
getId
,
uids
);
if
(
StringUtils
.
isNotEmpty
(
sharingActivities
.
getNewNickName
())){
newSConsumer
.
like
(
SConsumer:
:
getNickName
,
sharingActivities
.
getNewNickName
());
}
if
(
StringUtils
.
isNotEmpty
(
sharingActivities
.
getNewPhone
())){
newSConsumer
.
like
(
SConsumer:
:
getPhone
,
sharingActivities
.
getNewPhone
());
}
if
(
StringUtils
.
isNotEmpty
(
sharingActivities
.
getNickName
())){
uSConsumer
.
like
(
SConsumer:
:
getNickName
,
sharingActivities
.
getNickName
());
}
if
(
StringUtils
.
isNotEmpty
(
sharingActivities
.
getPhone
())){
uSConsumer
.
like
(
SConsumer:
:
getPhone
,
sharingActivities
.
getPhone
());
}
Map
<
Long
,
SConsumer
>
newUserMap
=
sConsumerService
.
list
(
newSConsumer
)
.
stream
().
collect
(
Collectors
.
toMap
(
SConsumer:
:
getId
,
Function
.
identity
()));
Map
<
Long
,
SConsumer
>
userMap
=
sConsumerService
.
list
(
uSConsumer
)
.
stream
().
collect
(
Collectors
.
toMap
(
SConsumer:
:
getId
,
Function
.
identity
()));
activities
.
stream
().
forEach
(
item
->{
SharingActivitiesVo
vo
=
new
SharingActivitiesVo
();
BeanUtils
.
copyProperties
(
item
,
vo
);
Set
<
Long
>
longs
=
userMap
.
keySet
();
Set
<
Long
>
longs1
=
newUserMap
.
keySet
();
if
(!(
longs
.
contains
(
item
.
getUid
())
&&
longs1
.
contains
(
item
.
getNewUid
()))){
return
;
}
SConsumer
newConsumer
=
newUserMap
.
get
(
item
.
getNewUid
());
SConsumer
uConsumer
=
userMap
.
get
(
item
.
getUid
());
if
(
ObjectUtil
.
isNotEmpty
(
newConsumer
)){
vo
.
setNewAvatar
(
StringUtils
.
isNotEmpty
(
newConsumer
.
getAvatar
())
?
newConsumer
.
getAvatar
():
""
);
vo
.
setNewNickName
(
StringUtils
.
isNotEmpty
(
newConsumer
.
getNickName
())
?
newConsumer
.
getNickName
():
""
);
vo
.
setNewPhone
(
StringUtils
.
isNotEmpty
(
newConsumer
.
getPhone
())
?
newConsumer
.
getPhone
():
""
);
}
if
(
ObjectUtil
.
isNotEmpty
(
uConsumer
)){
vo
.
setAvatar
(
StringUtils
.
isNotEmpty
(
uConsumer
.
getAvatar
())
?
uConsumer
.
getAvatar
():
""
);
vo
.
setNickName
(
StringUtils
.
isNotEmpty
(
uConsumer
.
getNickName
())
?
uConsumer
.
getNickName
():
""
);
vo
.
setPhone
(
StringUtils
.
isNotEmpty
(
uConsumer
.
getPhone
())
?
uConsumer
.
getPhone
():
""
);
}
voList
.
add
(
vo
);
});
info
.
setRows
(
voList
);
return
info
;
}
}
}
share-system/src/main/resources/mapper/system/EquityFundLogMapper.xml
View file @
ebc067dc
...
@@ -18,23 +18,15 @@
...
@@ -18,23 +18,15 @@
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"account"
column=
"account"
/>
<result
property=
"nickName"
column=
"nick_name"
/>
<result
property=
"newPhone"
column=
"new_phone"
/>
<result
property=
"newAccount"
column=
"new_account"
/>
<result
property=
"newNickName"
column=
"new_nick_name"
/>
<result
property=
"avatar"
column=
"avatar"
/>
<result
property=
"newAvatar"
column=
"new_avatar"
/>
</resultMap>
</resultMap>
<sql
id=
"selectEquityFundLogVo"
>
<sql
id=
"selectEquityFundLogVo"
>
select id, equity_fund_type, equity_fund, uid, new_uid, terminal_trace, out_trade_no, is_delete, create_by, create_time, update_by, update_time, remark
, phone, account, nick_name, new_phone, new_account, new_nick_name, avatar, new_avatar
from s_equity_fund_log
select id, equity_fund_type, equity_fund, uid, new_uid, terminal_trace, out_trade_no, is_delete, create_by, create_time, update_by, update_time, remark from s_equity_fund_log
</sql>
</sql>
<select
id=
"selectEquityFundLogList"
parameterType=
"EquityFundLog"
resultMap=
"EquityFundLogResult"
>
<select
id=
"selectEquityFundLogList"
parameterType=
"EquityFundLog"
resultMap=
"EquityFundLogResult"
>
<include
refid=
"selectEquityFundLogVo"
/>
<include
refid=
"selectEquityFundLogVo"
/>
<where>
where 1=1
<if
test=
"equityFundType != null and equityFundType != ''"
>
and equity_fund_type = #{equityFundType}
</if>
<if
test=
"equityFundType != null and equityFundType != ''"
>
and equity_fund_type = #{equityFundType}
</if>
<if
test=
"equityFund != null "
>
and equity_fund = #{equityFund}
</if>
<if
test=
"equityFund != null "
>
and equity_fund = #{equityFund}
</if>
<if
test=
"uid != null "
>
and uid = #{uid}
</if>
<if
test=
"uid != null "
>
and uid = #{uid}
</if>
...
@@ -42,15 +34,6 @@
...
@@ -42,15 +34,6 @@
<if
test=
"terminalTrace != null and terminalTrace != ''"
>
and terminal_trace = #{terminalTrace}
</if>
<if
test=
"terminalTrace != null and terminalTrace != ''"
>
and terminal_trace = #{terminalTrace}
</if>
<if
test=
"outTradeNo != null and outTradeNo != ''"
>
and out_trade_no = #{outTradeNo}
</if>
<if
test=
"outTradeNo != null and outTradeNo != ''"
>
and out_trade_no = #{outTradeNo}
</if>
<if
test=
"isDelete != null "
>
and is_delete = #{isDelete}
</if>
<if
test=
"isDelete != null "
>
and is_delete = #{isDelete}
</if>
<if
test=
"phone != null and phone != ''"
>
and phone = #{phone}
</if>
<if
test=
"account != null and account != ''"
>
and account = #{account}
</if>
<if
test=
"nickName != null and nickName != ''"
>
and nick_name like concat('%', #{nickName}, '%')
</if>
<if
test=
"newPhone != null and newPhone != ''"
>
and new_phone = #{newPhone}
</if>
<if
test=
"newAccount != null and newAccount != ''"
>
and new_account = #{newAccount}
</if>
<if
test=
"newNickName != null and newNickName != ''"
>
and new_nick_name like concat('%', #{newNickName}, '%')
</if>
<if
test=
"avatar != null and avatar != ''"
>
and avatar = #{avatar}
</if>
<if
test=
"newAvatar != null and newAvatar != ''"
>
and new_avatar = #{newAvatar}
</if>
</where>
order by create_time desc
order by create_time desc
</select>
</select>
...
@@ -74,14 +57,6 @@
...
@@ -74,14 +57,6 @@
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"phone != null"
>
phone,
</if>
<if
test=
"account != null"
>
account,
</if>
<if
test=
"nickName != null"
>
nick_name,
</if>
<if
test=
"newPhone != null"
>
new_phone,
</if>
<if
test=
"newAccount != null"
>
new_account,
</if>
<if
test=
"newNickName != null"
>
new_nick_name,
</if>
<if
test=
"avatar != null"
>
avatar,
</if>
<if
test=
"newAvatar != null"
>
new_avatar,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"equityFundType != null and equityFundType != ''"
>
#{equityFundType},
</if>
<if
test=
"equityFundType != null and equityFundType != ''"
>
#{equityFundType},
</if>
...
@@ -96,14 +71,6 @@
...
@@ -96,14 +71,6 @@
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"phone != null"
>
#{phone},
</if>
<if
test=
"account != null"
>
#{account},
</if>
<if
test=
"nickName != null"
>
#{nickName},
</if>
<if
test=
"newPhone != null"
>
#{newPhone},
</if>
<if
test=
"newAccount != null"
>
#{newAccount},
</if>
<if
test=
"newNickName != null"
>
#{newNickName},
</if>
<if
test=
"avatar != null"
>
#{avatar},
</if>
<if
test=
"newAvatar != null"
>
#{newAvatar},
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -122,14 +89,6 @@
...
@@ -122,14 +89,6 @@
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"phone != null"
>
phone = #{phone},
</if>
<if
test=
"account != null"
>
account = #{account},
</if>
<if
test=
"nickName != null"
>
nick_name = #{nickName},
</if>
<if
test=
"newPhone != null"
>
new_phone = #{newPhone},
</if>
<if
test=
"newAccount != null"
>
new_account = #{newAccount},
</if>
<if
test=
"newNickName != null"
>
new_nick_name = #{newNickName},
</if>
<if
test=
"avatar != null"
>
avatar = #{avatar},
</if>
<if
test=
"newAvatar != null"
>
new_avatar = #{newAvatar},
</if>
</trim>
</trim>
where id = #{id}
where id = #{id}
</update>
</update>
...
...
share-system/src/main/resources/mapper/system/SharingActivitiesMapper.xml
View file @
ebc067dc
...
@@ -15,16 +15,11 @@
...
@@ -15,16 +15,11 @@
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"avatar"
column=
"avatar"
/>
<result
property=
"newAvatar"
column=
"new_avatar"
/>
<result
property=
"nickName"
column=
"nick_name"
/>
<result
property=
"newNickName"
column=
"new_nick_name"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"newPhone"
column=
"new_phone"
/>
</resultMap>
</resultMap>
<sql
id=
"selectSharingActivitiesVo"
>
<sql
id=
"selectSharingActivitiesVo"
>
select id, activity_type, uid, new_uid, is_delete, create_by, create_time, update_by, update_time, remark, avatar, new_avatar, nick_name, new_nick_name, phone, new_phone from s_sharing_activities
select id, activity_type, uid, new_uid, is_delete, create_by, create_time, update_by, update_time, remark
from s_sharing_activities
</sql>
</sql>
<select
id=
"selectSharingActivitiesList"
parameterType=
"SharingActivities"
resultMap=
"SharingActivitiesResult"
>
<select
id=
"selectSharingActivitiesList"
parameterType=
"SharingActivities"
resultMap=
"SharingActivitiesResult"
>
...
@@ -34,12 +29,6 @@
...
@@ -34,12 +29,6 @@
<if
test=
"uid != null "
>
and uid = #{uid}
</if>
<if
test=
"uid != null "
>
and uid = #{uid}
</if>
<if
test=
"newUid != null "
>
and new_uid = #{newUid}
</if>
<if
test=
"newUid != null "
>
and new_uid = #{newUid}
</if>
<if
test=
"isDelete != null "
>
and is_delete = #{isDelete}
</if>
<if
test=
"isDelete != null "
>
and is_delete = #{isDelete}
</if>
<if
test=
"avatar != null and avatar != ''"
>
and avatar = #{avatar}
</if>
<if
test=
"newAvatar != null and newAvatar != ''"
>
and new_avatar = #{newAvatar}
</if>
<if
test=
"nickName != null and nickName != ''"
>
and nick_name like concat('%', #{nickName}, '%')
</if>
<if
test=
"newNickName != null and newNickName != ''"
>
and new_nick_name like concat('%', #{newNickName}, '%')
</if>
<if
test=
"phone != null and phone != ''"
>
and phone = #{phone}
</if>
<if
test=
"newPhone != null and newPhone != ''"
>
and new_phone = #{newPhone}
</if>
</where>
</where>
order by create_time desc
order by create_time desc
</select>
</select>
...
@@ -61,12 +50,6 @@
...
@@ -61,12 +50,6 @@
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"avatar != null"
>
avatar,
</if>
<if
test=
"newAvatar != null"
>
new_avatar,
</if>
<if
test=
"nickName != null"
>
nick_name,
</if>
<if
test=
"newNickName != null"
>
new_nick_name,
</if>
<if
test=
"phone != null"
>
phone,
</if>
<if
test=
"newPhone != null"
>
new_phone,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"activityType != null and activityType != ''"
>
#{activityType},
</if>
<if
test=
"activityType != null and activityType != ''"
>
#{activityType},
</if>
...
@@ -78,12 +61,6 @@
...
@@ -78,12 +61,6 @@
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"avatar != null"
>
#{avatar},
</if>
<if
test=
"newAvatar != null"
>
#{newAvatar},
</if>
<if
test=
"nickName != null"
>
#{nickName},
</if>
<if
test=
"newNickName != null"
>
#{newNickName},
</if>
<if
test=
"phone != null"
>
#{phone},
</if>
<if
test=
"newPhone != null"
>
#{newPhone},
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -98,13 +75,6 @@
...
@@ -98,13 +75,6 @@
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"avatar != null"
>
avatar = #{avatar},
</if>
<if
test=
"newAvatar != null"
>
new_avatar = #{newAvatar},
</if>
<if
test=
"nickName != null"
>
nick_name = #{nickName},
</if>
<if
test=
"newNickName != null"
>
new_nick_name = #{newNickName},
</if>
<if
test=
"phone != null"
>
phone = #{phone},
</if>
<if
test=
"newPhone != null"
>
new_phone = #{newPhone},
</if>
</trim>
</trim>
where id = #{id}
where id = #{id}
</update>
</update>
...
...
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