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
6a80cfd7
Commit
6a80cfd7
authored
Sep 14, 2024
by
YG8429
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改小程序查询本人权益记录和上级用户权益记录,后台修改绑定人
parent
17da91c4
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
141 additions
and
14 deletions
+141
-14
EquityFundLogController.java
.../share/web/controller/system/EquityFundLogController.java
+1
-7
SharingActivitiesController.java
...re/web/controller/system/SharingActivitiesController.java
+53
-0
SharingActivities.java
.../src/main/java/share/system/domain/SharingActivities.java
+33
-4
SharingActivitiesMapper.java
...ain/java/share/system/mapper/SharingActivitiesMapper.java
+2
-0
SConsumerCenterServiceImpl.java
...share/system/service/impl/SConsumerCenterServiceImpl.java
+8
-0
SharingActivitiesServiceImpl.java
...are/system/service/impl/SharingActivitiesServiceImpl.java
+11
-0
SharingActivitiesMapper.xml
.../main/resources/mapper/system/SharingActivitiesMapper.xml
+33
-3
No files found.
share-front/src/main/java/share/web/controller/system/EquityFundLogController.java
View file @
6a80cfd7
...
...
@@ -42,13 +42,7 @@ public class EquityFundLogController extends BaseController {
return
getDataTable
(
list
);
}
@GetMapping
(
"/query"
)
public
AjaxResult
query
(
EquityFundLog
equityFundLog
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
equityFundLog
.
setNewUid
(
user
.
getId
());
List
<
EquityFundLog
>
list
=
equityFundLogService
.
selectEquityFundLogList
(
equityFundLog
);
return
success
(
list
);
}
}
share-front/src/main/java/share/web/controller/system/SharingActivitiesController.java
0 → 100644
View file @
6a80cfd7
package
share
.
web
.
controller
.
system
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
share.common.annotation.Log
;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.page.TableDataInfo
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.EquityFundLog
;
import
share.system.domain.SConsumer
;
import
share.system.domain.SharingActivities
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.service.SharingActivitiesService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 分享活动绑定关系Controller
*
* @author wuwenlong
* @date 2024-09-02
*/
@RestController
@RequestMapping
(
"/activities"
)
public
class
SharingActivitiesController
extends
BaseController
{
@Autowired
private
SharingActivitiesService
sharingActivitiesService
;
/**
* 查询分享活动绑定关系列表
*/
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SharingActivities
sharingActivities
)
{
startPage
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
sharingActivities
.
setUid
(
user
.
getId
());
List
<
SharingActivities
>
list
=
sharingActivitiesService
.
selectSharingActivitiesList
(
sharingActivities
);
return
getDataTable
(
list
);
}
@GetMapping
(
"/query"
)
public
AjaxResult
query
(
SharingActivities
sharingActivities
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
sharingActivities
.
setNewUid
(
user
.
getId
());
List
<
SharingActivities
>
list
=
sharingActivitiesService
.
selectSharingActivitiesList
(
sharingActivities
);
return
success
(
list
);
}
}
share-system/src/main/java/share/system/domain/SharingActivities.java
View file @
6a80cfd7
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.*
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
share.common.annotation.Excel
;
import
share.common.core.domain.BaseEntity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
lombok.Data
;
/**
* 分享活动绑定关系对象 s_sharing_activities
*
* @author wuwenlong
* @date 2024-09-
02
* @date 2024-09-
14
*/
@Data
@TableName
(
"s_sharing_activities"
)
public
class
SharingActivities
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键 */
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
/** 活动类型(0-新用户注册,1-权益金会员分享) */
...
...
@@ -40,6 +39,30 @@ 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
public
String
toString
()
{
...
...
@@ -54,6 +77,12 @@ 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/mapper/SharingActivitiesMapper.java
View file @
6a80cfd7
...
...
@@ -59,4 +59,6 @@ public interface SharingActivitiesMapper extends BaseMapper<SharingActivities>
* @return 结果
*/
public
int
deleteSharingActivitiesByIds
(
Long
[]
ids
);
}
share-system/src/main/java/share/system/service/impl/SConsumerCenterServiceImpl.java
View file @
6a80cfd7
...
...
@@ -312,8 +312,16 @@ public class SConsumerCenterServiceImpl extends ServiceImpl<SConsumerMapper, SCo
//判断是否为分享新用户
if
(
uid
!=
null
){
//添加绑定关系
SConsumer
consumer
=
sConsumerService
.
selectSConsumerById
(
uid
);
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
.
setNewUid
(
id
);
sharingActivities
.
setCreateTime
(
DateUtils
.
getNowDate
());
sharingActivitiesService
.
insertSharingActivities
(
sharingActivities
);
...
...
share-system/src/main/java/share/system/service/impl/SharingActivitiesServiceImpl.java
View file @
6a80cfd7
...
...
@@ -15,8 +15,10 @@ import share.common.enums.YesNoEnum;
import
share.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
share.system.domain.SConsumer
;
import
share.system.mapper.SharingActivitiesMapper
;
import
share.system.domain.SharingActivities
;
import
share.system.service.SConsumerService
;
import
share.system.service.SharingActivitiesService
;
/**
...
...
@@ -32,6 +34,9 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
private
SharingActivitiesMapper
sharingActivitiesMapper
;
@Autowired
private
SConsumerService
consumerService
;
@Autowired
private
RedisTemplate
redisTemplate
;
/**
...
...
@@ -81,7 +86,11 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
@Override
public
int
updateSharingActivities
(
SharingActivities
sharingActivities
)
{
SConsumer
consumer
=
consumerService
.
selectSConsumerById
(
sharingActivities
.
getUid
());
sharingActivities
.
setUpdateTime
(
DateUtils
.
getNowDate
());
sharingActivities
.
setAvatar
(
consumer
.
getAvatar
());
sharingActivities
.
setPhone
(
consumer
.
getPhone
());
sharingActivities
.
setNickName
(
consumer
.
getNickName
());
return
sharingActivitiesMapper
.
updateSharingActivities
(
sharingActivities
);
}
...
...
@@ -109,4 +118,6 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
return
sharingActivitiesMapper
.
deleteSharingActivitiesById
(
id
);
}
}
share-system/src/main/resources/mapper/system/SharingActivitiesMapper.xml
View file @
6a80cfd7
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"share.system.mapper.SharingActivitiesMapper"
>
<resultMap
type=
"SharingActivities"
id=
"SharingActivitiesResult"
>
...
...
@@ -15,10 +15,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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 from s_sharing_activities
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
</sql>
<select
id=
"selectSharingActivitiesList"
parameterType=
"SharingActivities"
resultMap=
"SharingActivitiesResult"
>
...
...
@@ -28,6 +34,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
</select>
...
...
@@ -48,6 +60,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
...
...
@@ -59,6 +77,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
...
...
@@ -74,6 +98,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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