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
fa208304
Commit
fa208304
authored
Sep 19, 2024
by
YG8429
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绑定关系查询,权益金日志查询修改查询方法,增加vo对象
parent
b54414a1
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
182 additions
and
261 deletions
+182
-261
EquityFundLogController.java
.../share/web/controller/system/EquityFundLogController.java
+4
-3
SharingActivitiesController.java
...re/web/controller/system/SharingActivitiesController.java
+4
-3
EquityFundLogController.java
.../share/web/controller/system/EquityFundLogController.java
+2
-1
SharingActivitiesController.java
...re/web/controller/system/SharingActivitiesController.java
+4
-3
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
+33
-0
EquityFundLogService.java
.../main/java/share/system/service/EquityFundLogService.java
+2
-1
SharingActivitiesService.java
...n/java/share/system/service/SharingActivitiesService.java
+2
-1
CallbackServiceImpl.java
...n/java/share/system/service/impl/CallbackServiceImpl.java
+0
-85
EquityFundLogServiceImpl.java
...a/share/system/service/impl/EquityFundLogServiceImpl.java
+45
-2
SConsumerCenterServiceImpl.java
...share/system/service/impl/SConsumerCenterServiceImpl.java
+6
-6
SharingActivitiesServiceImpl.java
...are/system/service/impl/SharingActivitiesServiceImpl.java
+42
-5
EquityFundLogMapper.xml
.../src/main/resources/mapper/system/EquityFundLogMapper.xml
+3
-41
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 @
fa208304
...
...
@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController;
import
share.common.core.domain.AjaxResult
;
import
share.common.enums.BusinessType
;
import
share.system.domain.EquityFundLog
;
import
share.system.domain.vo.EquityFundLogVo
;
import
share.system.service.EquityFundLogService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.core.page.TableDataInfo
;
...
...
@@ -42,7 +43,7 @@ public class EquityFundLogController extends BaseController
public
TableDataInfo
list
(
EquityFundLog
equityFundLog
)
{
startPage
();
List
<
EquityFundLog
>
list
=
equityFundLogService
.
selectEquityFundLogList
(
equityFundLog
);
List
<
EquityFundLog
Vo
>
list
=
equityFundLogService
.
selectEquityFundLogList
(
equityFundLog
);
return
getDataTable
(
list
);
}
...
...
@@ -54,8 +55,8 @@ public class EquityFundLogController extends BaseController
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
EquityFundLog
equityFundLog
)
{
List
<
EquityFundLog
>
list
=
equityFundLogService
.
selectEquityFundLogList
(
equityFundLog
);
ExcelUtil
<
EquityFundLog
>
util
=
new
ExcelUtil
<
EquityFundLog
>(
EquityFundLog
.
class
);
List
<
EquityFundLog
Vo
>
list
=
equityFundLogService
.
selectEquityFundLogList
(
equityFundLog
);
ExcelUtil
<
EquityFundLog
Vo
>
util
=
new
ExcelUtil
<
EquityFundLogVo
>(
EquityFundLogVo
.
class
);
util
.
exportExcel
(
response
,
list
,
"权益金记录数据"
);
}
...
...
share-admin/src/main/java/share/web/controller/system/SharingActivitiesController.java
View file @
fa208304
...
...
@@ -18,6 +18,7 @@ import share.common.core.controller.BaseController;
import
share.common.core.domain.AjaxResult
;
import
share.common.enums.BusinessType
;
import
share.system.domain.SharingActivities
;
import
share.system.domain.vo.SharingActivitiesVo
;
import
share.system.service.SharingActivitiesService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.core.page.TableDataInfo
;
...
...
@@ -41,7 +42,7 @@ public class SharingActivitiesController extends BaseController {
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SharingActivities
sharingActivities
)
{
startPage
();
List
<
SharingActivities
>
list
=
sharingActivitiesService
.
selectSharingActivitiesList
(
sharingActivities
);
List
<
SharingActivities
Vo
>
list
=
sharingActivitiesService
.
selectSharingActivitiesList
(
sharingActivities
);
return
getDataTable
(
list
);
}
...
...
@@ -52,8 +53,8 @@ public class SharingActivitiesController extends BaseController {
@Log
(
title
=
"分享活动绑定关系"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SharingActivities
sharingActivities
)
{
List
<
SharingActivities
>
list
=
sharingActivitiesService
.
selectSharingActivitiesList
(
sharingActivities
);
ExcelUtil
<
SharingActivities
>
util
=
new
ExcelUtil
<
SharingActivities
>(
SharingActivities
.
class
);
List
<
SharingActivities
Vo
>
list
=
sharingActivitiesService
.
selectSharingActivitiesList
(
sharingActivities
);
ExcelUtil
<
SharingActivities
Vo
>
util
=
new
ExcelUtil
<
SharingActivitiesVo
>(
SharingActivitiesVo
.
class
);
util
.
exportExcel
(
response
,
list
,
"分享活动绑定关系数据"
);
}
...
...
share-front/src/main/java/share/web/controller/system/EquityFundLogController.java
View file @
fa208304
...
...
@@ -12,6 +12,7 @@ import share.common.utils.poi.ExcelUtil;
import
share.system.domain.EquityFundLog
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.DurationLogVo
;
import
share.system.domain.vo.EquityFundLogVo
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.service.EquityFundLogService
;
...
...
@@ -38,7 +39,7 @@ public class EquityFundLogController extends BaseController {
startPage
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
equityFundLog
.
setUid
(
user
.
getId
());
List
<
EquityFundLog
>
list
=
equityFundLogService
.
selectEquityFundLogList
(
equityFundLog
);
List
<
EquityFundLog
Vo
>
list
=
equityFundLogService
.
selectEquityFundLogList
(
equityFundLog
);
return
getDataTable
(
list
);
}
...
...
share-front/src/main/java/share/web/controller/system/SharingActivitiesController.java
View file @
fa208304
...
...
@@ -13,6 +13,7 @@ import share.system.domain.EquityFundLog;
import
share.system.domain.SConsumer
;
import
share.system.domain.SharingActivities
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.SharingActivitiesVo
;
import
share.system.service.SharingActivitiesService
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -34,11 +35,11 @@ public class SharingActivitiesController extends BaseController {
* 查询分享活动绑定关系列表
*/
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SharingActivities
sharingActivities
)
{
public
TableDataInfo
list
(
SharingActivities
Vo
sharingActivities
)
{
startPage
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
sharingActivities
.
setUid
(
user
.
getId
());
List
<
SharingActivities
>
list
=
sharingActivitiesService
.
selectSharingActivitiesList
(
sharingActivities
);
List
<
SharingActivities
Vo
>
list
=
sharingActivitiesService
.
selectSharingActivitiesList
(
sharingActivities
);
return
getDataTable
(
list
);
}
...
...
@@ -46,7 +47,7 @@ public class SharingActivitiesController extends BaseController {
public
AjaxResult
query
(
SharingActivities
sharingActivities
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
sharingActivities
.
setNewUid
(
user
.
getId
());
List
<
SharingActivities
>
list
=
sharingActivitiesService
.
selectSharingActivitiesList
(
sharingActivities
);
List
<
SharingActivities
Vo
>
list
=
sharingActivitiesService
.
selectSharingActivitiesList
(
sharingActivities
);
return
success
(
list
);
}
...
...
share-quartz/src/main/java/share/quartz/task/RedisTask.java
View file @
fa208304
...
...
@@ -428,10 +428,6 @@ public class RedisTask {
consumerWallet
.
setUpdateTime
(
DateUtils
.
getNowDate
());
consumerWalletService
.
updateConsumerWallet
(
consumerWallet
);
//添加权益金日志记录
//下级用户
SConsumer
newConsumer
=
consumerService
.
getById
(
sOrder
.
getConsumerId
());
//上级用户
SConsumer
consumer
=
consumerService
.
getById
(
sharingActivities
.
getUid
());
EquityFundLog
equityFundLog
=
new
EquityFundLog
();
equityFundLog
.
setEquityFund
(
addEquityFund
);
equityFundLog
.
setEquityFundType
(
EquityFundTypeEnum
.
ORDER
.
getCode
());
...
...
@@ -439,14 +435,6 @@ public class RedisTask {
equityFundLog
.
setTerminalTrace
(
sOrder
.
getOutTradeNo
());
equityFundLog
.
setUid
(
sharingActivities
.
getUid
());
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
);
}
}
...
...
share-system/src/main/java/share/system/domain/EquityFundLog.java
View file @
fa208304
...
...
@@ -54,37 +54,7 @@ public class EquityFundLog extends BaseEntity
@TableField
(
select
=
false
)
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
...
...
@@ -103,14 +73,6 @@ public class EquityFundLog extends BaseEntity
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
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
();
}
}
share-system/src/main/java/share/system/domain/SharingActivities.java
View file @
fa208304
...
...
@@ -40,29 +40,7 @@ public class SharingActivities extends BaseEntity
@TableField
(
select
=
false
)
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
...
...
@@ -78,12 +56,6 @@ public class SharingActivities extends BaseEntity
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"remark"
,
getRemark
())
.
append
(
"avatar"
,
getAvatar
())
.
append
(
"newAvatar"
,
getNewAvatar
())
.
append
(
"nickName"
,
getNickName
())
.
append
(
"newNickName"
,
getNewNickName
())
.
append
(
"phone"
,
getPhone
())
.
append
(
"newPhone"
,
getNewPhone
())
.
toString
();
}
}
share-system/src/main/java/share/system/domain/vo/EquityFundLogVo.java
0 → 100644
View file @
fa208304
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 @
fa208304
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
;
}
share-system/src/main/java/share/system/service/EquityFundLogService.java
View file @
fa208304
...
...
@@ -3,6 +3,7 @@ package share.system.service;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.EquityFundLog
;
import
share.system.domain.vo.EquityFundLogVo
;
/**
* 权益金记录Service接口
...
...
@@ -26,7 +27,7 @@ public interface EquityFundLogService extends IService<EquityFundLog>
* @param equityFundLog 权益金记录
* @return 权益金记录集合
*/
public
List
<
EquityFundLog
>
selectEquityFundLogList
(
EquityFundLog
equityFundLog
);
public
List
<
EquityFundLog
Vo
>
selectEquityFundLogList
(
EquityFundLog
equityFundLog
);
/**
* 新增权益金记录
...
...
share-system/src/main/java/share/system/service/SharingActivitiesService.java
View file @
fa208304
...
...
@@ -4,6 +4,7 @@ import java.util.List;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.common.core.domain.AjaxResult
;
import
share.system.domain.SharingActivities
;
import
share.system.domain.vo.SharingActivitiesVo
;
/**
* 分享活动绑定关系Service接口
...
...
@@ -27,7 +28,7 @@ public interface SharingActivitiesService extends IService<SharingActivities>
* @param sharingActivities 分享活动绑定关系
* @return 分享活动绑定关系集合
*/
public
List
<
SharingActivities
>
selectSharingActivitiesList
(
SharingActivities
sharingActivities
);
public
List
<
SharingActivities
Vo
>
selectSharingActivitiesList
(
SharingActivities
sharingActivities
);
/**
* 新增分享活动绑定关系
...
...
share-system/src/main/java/share/system/service/impl/CallbackServiceImpl.java
View file @
fa208304
...
...
@@ -809,10 +809,6 @@ public class CallbackServiceImpl implements CallbackService {
consumerWalletService
.
insertConsumerWallet
(
newConsumerWallet
);
}
//添加权益金日志记录
//下级用户
SConsumer
newConsumer
=
consumerService
.
getById
(
consumerId
);
//上级用户
SConsumer
consumer
=
consumerService
.
getById
(
sharingActivities
.
getUid
());
EquityFundLog
equityFundLog
=
new
EquityFundLog
();
equityFundLog
.
setEquityFund
(
addEquityFund
);
equityFundLog
.
setEquityFundType
(
type
);
...
...
@@ -820,92 +816,11 @@ public class CallbackServiceImpl implements CallbackService {
equityFundLog
.
setTerminalTrace
(
terminalTrace
);
equityFundLog
.
setUid
(
sharingActivities
.
getUid
());
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
);
}
}
}
}
// /**
// * 新增权益金日志
// * @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 @
fa208304
package
share
.
system
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
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.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.BeanUtils
;
import
share.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
share.common.utils.StringUtils
;
import
share.system.domain.SConsumer
;
import
share.system.domain.SharingActivities
;
import
share.system.domain.vo.EquityFundLogVo
;
import
share.system.domain.vo.SharingActivitiesVo
;
import
share.system.mapper.EquityFundLogMapper
;
import
share.system.domain.EquityFundLog
;
import
share.system.service.EquityFundLogService
;
import
share.system.service.SConsumerService
;
/**
* 权益金记录Service业务层处理
...
...
@@ -23,6 +35,9 @@ public class EquityFundLogServiceImpl extends ServiceImpl<EquityFundLogMapper, E
@Autowired
private
EquityFundLogMapper
equityFundLogMapper
;
@Autowired
private
SConsumerService
sConsumerService
;
/**
* 查询权益金记录
*
...
...
@@ -42,9 +57,37 @@ public class EquityFundLogServiceImpl extends ServiceImpl<EquityFundLogMapper, E
* @return 权益金记录
*/
@Override
public
List
<
EquityFundLog
>
selectEquityFundLogList
(
EquityFundLog
equityFundLog
)
public
List
<
EquityFundLog
Vo
>
selectEquityFundLogList
(
EquityFundLog
equityFundLog
)
{
return
equityFundLogMapper
.
selectEquityFundLogList
(
equityFundLog
);
List
<
EquityFundLog
>
activities
=
equityFundLogMapper
.
selectEquityFundLogList
(
equityFundLog
);
List
<
EquityFundLogVo
>
voList
=
new
ArrayList
<>();
List
<
Long
>
collect
=
activities
.
stream
().
map
(
EquityFundLog:
:
getNewUid
).
collect
(
Collectors
.
toList
());
List
<
Long
>
uids
=
activities
.
stream
().
map
(
EquityFundLog:
:
getUid
).
collect
(
Collectors
.
toList
());
Map
<
Long
,
SConsumer
>
newUserMap
=
sConsumerService
.
list
(
new
LambdaQueryWrapper
<
SConsumer
>().
in
(
SConsumer:
:
getId
,
collect
))
.
stream
().
collect
(
Collectors
.
toMap
(
SConsumer:
:
getId
,
Function
.
identity
()));
Map
<
Long
,
SConsumer
>
userMap
=
sConsumerService
.
list
(
new
LambdaQueryWrapper
<
SConsumer
>().
in
(
SConsumer:
:
getId
,
uids
))
.
stream
().
collect
(
Collectors
.
toMap
(
SConsumer:
:
getId
,
Function
.
identity
()));
activities
.
stream
().
forEach
(
item
->{
EquityFundLogVo
vo
=
new
EquityFundLogVo
();
BeanUtils
.
copyProperties
(
item
,
vo
);
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
);
});
return
voList
;
}
/**
...
...
share-system/src/main/java/share/system/service/impl/SConsumerCenterServiceImpl.java
View file @
fa208304
...
...
@@ -316,12 +316,12 @@ public class SConsumerCenterServiceImpl extends ServiceImpl<SConsumerMapper, SCo
SConsumer
newConsumer
=
sConsumerService
.
selectSConsumerById
(
id
);
SharingActivities
sharingActivities
=
new
SharingActivities
();
sharingActivities
.
setUid
(
uid
);
sharingActivities
.
setPhone
(
consumer
.
getPhone
());
sharingActivities
.
setAvatar
(
consumer
.
getAvatar
());
sharingActivities
.
setNickName
(
consumer
.
getNickName
());
sharingActivities
.
setNewPhone
(
newConsumer
.
getPhone
());
sharingActivities
.
setNewAvatar
(
newConsumer
.
getAvatar
());
sharingActivities
.
setNewNickName
(
newConsumer
.
getNickName
());
//
sharingActivities.setPhone(consumer.getPhone());
//
sharingActivities.setAvatar(consumer.getAvatar());
//
sharingActivities.setNickName(consumer.getNickName());
//
sharingActivities.setNewPhone(newConsumer.getPhone());
//
sharingActivities.setNewAvatar(newConsumer.getAvatar());
//
sharingActivities.setNewNickName(newConsumer.getNickName());
sharingActivities
.
setNewUid
(
id
);
sharingActivities
.
setCreateTime
(
DateUtils
.
getNowDate
());
sharingActivitiesService
.
insertSharingActivities
(
sharingActivities
);
...
...
share-system/src/main/java/share/system/service/impl/SharingActivitiesServiceImpl.java
View file @
fa208304
package
share
.
system
.
service
.
impl
;
import
java.time.YearMonth
;
import
java.util.ArrayList
;
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.extension.service.impl.ServiceImpl
;
import
org.apache.poi.hssf.record.DVALRecord
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.redis.RedisUtil
;
...
...
@@ -15,7 +21,9 @@ import share.common.enums.YesNoEnum;
import
share.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
share.common.utils.StringUtils
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.SharingActivitiesVo
;
import
share.system.mapper.SharingActivitiesMapper
;
import
share.system.domain.SharingActivities
;
import
share.system.service.SConsumerService
;
...
...
@@ -39,6 +47,10 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
@Autowired
private
RedisTemplate
redisTemplate
;
@Autowired
private
SConsumerService
sConsumerService
;
/**
* 查询分享活动绑定关系
*
...
...
@@ -58,10 +70,35 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
* @return 分享活动绑定关系
*/
@Override
public
List
<
SharingActivities
>
selectSharingActivitiesList
(
SharingActivities
sharingActivities
)
public
List
<
SharingActivities
Vo
>
selectSharingActivitiesList
(
SharingActivities
sharingActivities
)
{
List
<
SharingActivities
>
activities
=
sharingActivitiesMapper
.
selectSharingActivitiesList
(
sharingActivities
);
List
<
SharingActivitiesVo
>
voList
=
new
ArrayList
<>();
List
<
Long
>
collect
=
activities
.
stream
().
map
(
SharingActivities:
:
getNewUid
).
collect
(
Collectors
.
toList
());
List
<
Long
>
uids
=
activities
.
stream
().
map
(
SharingActivities:
:
getUid
).
collect
(
Collectors
.
toList
());
Map
<
Long
,
SConsumer
>
newUserMap
=
sConsumerService
.
list
(
new
LambdaQueryWrapper
<
SConsumer
>().
in
(
SConsumer:
:
getId
,
collect
))
.
stream
().
collect
(
Collectors
.
toMap
(
SConsumer:
:
getId
,
Function
.
identity
()));
Map
<
Long
,
SConsumer
>
userMap
=
sConsumerService
.
list
(
new
LambdaQueryWrapper
<
SConsumer
>().
in
(
SConsumer:
:
getId
,
uids
))
.
stream
().
collect
(
Collectors
.
toMap
(
SConsumer:
:
getId
,
Function
.
identity
()));
activities
.
stream
().
forEach
(
item
->{
SharingActivitiesVo
vo
=
new
SharingActivitiesVo
();
BeanUtils
.
copyProperties
(
item
,
vo
);
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
);
});
return
sharingActivitiesMapper
.
selectSharingActivitiesList
(
sharingActivities
)
;
return
voList
;
}
/**
...
...
@@ -89,9 +126,9 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
{
SConsumer
consumer
=
consumerService
.
selectSConsumerById
(
sharingActivities
.
getUid
());
sharingActivities
.
setUpdateTime
(
DateUtils
.
getNowDate
());
sharingActivities
.
setAvatar
(
consumer
.
getAvatar
());
sharingActivities
.
setPhone
(
consumer
.
getPhone
());
sharingActivities
.
setNickName
(
consumer
.
getNickName
());
//
sharingActivities.setAvatar(consumer.getAvatar());
//
sharingActivities.setPhone(consumer.getPhone());
//
sharingActivities.setNickName(consumer.getNickName());
return
sharingActivitiesMapper
.
updateSharingActivities
(
sharingActivities
);
}
...
...
share-system/src/main/resources/mapper/system/EquityFundLogMapper.xml
View file @
fa208304
...
...
@@ -18,18 +18,12 @@
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<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>
<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, 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>
<select
id=
"selectEquityFundLogList"
parameterType=
"EquityFundLog"
resultMap=
"EquityFundLogResult"
>
...
...
@@ -42,14 +36,6 @@
<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=
"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
</select>
...
...
@@ -74,14 +60,6 @@
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</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
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"equityFundType != null and equityFundType != ''"
>
#{equityFundType},
</if>
...
...
@@ -96,14 +74,6 @@
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</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>
</insert>
...
...
@@ -122,14 +92,6 @@
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</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>
where id = #{id}
</update>
...
...
share-system/src/main/resources/mapper/system/SharingActivitiesMapper.xml
View file @
fa208304
...
...
@@ -15,16 +15,11 @@
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<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>
<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>
<select
id=
"selectSharingActivitiesList"
parameterType=
"SharingActivities"
resultMap=
"SharingActivitiesResult"
>
...
...
@@ -34,12 +29,6 @@
<if
test=
"uid != null "
>
and uid = #{uid}
</if>
<if
test=
"newUid != null "
>
and new_uid = #{newUid}
</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>
order by create_time desc
</select>
...
...
@@ -61,12 +50,6 @@
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</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
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"activityType != null and activityType != ''"
>
#{activityType},
</if>
...
...
@@ -78,12 +61,6 @@
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</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>
</insert>
...
...
@@ -98,13 +75,6 @@
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</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>
where id = #{id}
</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