1
This commit is contained in:
parent
4d4f80d0a4
commit
9983d7ff3f
@ -66,7 +66,7 @@ public class BusiUserLoveServiceImpl extends ServiceImpl<BusiUserLoveMapper,Busi
|
||||
memberWrapper.eq(MemberUser::getUserId,userId).eq(MemberUser::getUserType,"01");
|
||||
MemberUser memberUser = memberUserService.getOne(memberWrapper);
|
||||
if (memberUser!=null){
|
||||
memberUser.setTFansNum(loveCount);
|
||||
memberUser.setTfansNum(loveCount);
|
||||
memberUserService.updateById(memberUser);
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,6 @@ import com.ruoyi.member.domain.MemberUser;
|
||||
import com.ruoyi.member.service.IMemberUserService;
|
||||
import com.ruoyi.member.vo.MemberUserVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@ -77,6 +76,35 @@ public class MemberUserController extends BaseController {
|
||||
return success(memberUserService.bloggerDetail(userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存博主相信信息
|
||||
*
|
||||
* @param memberUser {@link MemberUserVO}
|
||||
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||
* @author PQZ
|
||||
* @date 14:50 2025/4/9
|
||||
**/
|
||||
@PostMapping("/uniSaveMember")
|
||||
public AjaxResult uniSaveMember(MemberUserVO memberUser) {
|
||||
memberUserService.uniSaveMember(memberUser);
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户详情
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param userType 用户类型
|
||||
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||
* @author PQZ
|
||||
* @date 11:46 2025/4/9
|
||||
**/
|
||||
@GetMapping(value = "/queryDetail")
|
||||
public AjaxResult queryDetail(@RequestParam("userId") Long userId,
|
||||
@RequestParam("userType") String userType) {
|
||||
return success(memberUserService.queryByUserId(userId, userType));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出会员列表
|
||||
|
@ -47,31 +47,31 @@ public class MemberUser extends DlBaseEntity
|
||||
|
||||
/** 通告主-本月通告发布剩余额度 */
|
||||
@Excel(name = "通告主-本月通告发布剩余额度")
|
||||
private Integer tRemaining;
|
||||
private Integer tremaining;
|
||||
|
||||
/** 通告主-个人累计已发布通告数量 */
|
||||
@Excel(name = "通告主-个人累计已发布通告数量")
|
||||
private Long tTotalNum;
|
||||
private Long ttotalNum;
|
||||
|
||||
/** 通告主-个人粉丝数量 */
|
||||
@Excel(name = "通告主-个人粉丝数量")
|
||||
private Integer tFansNum;
|
||||
private Integer tfansNum;
|
||||
|
||||
/** 通告主-是否开启报名免打扰(0否|1开启) */
|
||||
@Excel(name = "通告主-是否开启报名免打扰(0否|1开启)")
|
||||
private String tOpenDisturb;
|
||||
private String topenDisturb;
|
||||
|
||||
/** 通告主-收款码姓名 */
|
||||
@Excel(name = "通告主-收款码姓名")
|
||||
private String tRecipientName;
|
||||
private String trecipientName;
|
||||
|
||||
/** 通告主-收款码图片地址 */
|
||||
@Excel(name = "通告主-收款码图片地址")
|
||||
private String tRecipientImage;
|
||||
private String trecipientImage;
|
||||
|
||||
/** 博主-剩余积分 */
|
||||
@Excel(name = "博主-剩余积分")
|
||||
private Long bPoints;
|
||||
private Long bpoints;
|
||||
|
||||
public MemberUser (String userType, SysUser user,Integer addNotice){
|
||||
this.userType = userType;
|
||||
@ -79,13 +79,13 @@ public class MemberUser extends DlBaseEntity
|
||||
this.tel = user.getPhonenumber();
|
||||
if(DictConstants.USER_TYPE_BZ.equals(userType)){
|
||||
//博主
|
||||
this.bPoints=0L;
|
||||
this.bpoints=0L;
|
||||
}else{
|
||||
//通告主
|
||||
this.tRemaining = addNotice;
|
||||
this.tTotalNum = 0L;
|
||||
this.tFansNum = 0;
|
||||
this.tOpenDisturb = DictConstants.YES_NO_NO;
|
||||
this.tremaining = addNotice;
|
||||
this.ttotalNum = 0L;
|
||||
this.tfansNum = 0;
|
||||
this.topenDisturb = DictConstants.YES_NO_NO;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -47,13 +47,32 @@ public interface IMemberUserService extends IService<MemberUser> {
|
||||
**/
|
||||
MemberUserVO bloggerDetail(Long userId);
|
||||
|
||||
/**
|
||||
* 通过用户id查询用户详情信息
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @return com.ruoyi.member.vo.MemberUserVO
|
||||
* @author PQZ
|
||||
* @date 11:40 2025/4/9
|
||||
**/
|
||||
MemberUserVO queryByUserId(Long userId,String userType);
|
||||
|
||||
/**
|
||||
* 微信授权登陆
|
||||
* @author vinjor-M
|
||||
* @date 15:55 2025/3/26
|
||||
* @param openid TODO
|
||||
* @param decryptResult TODO
|
||||
*
|
||||
* @param openid TODO
|
||||
* @param decryptResult TODO
|
||||
* @return java.lang.String
|
||||
* @author vinjor-M
|
||||
* @date 15:55 2025/3/26
|
||||
**/
|
||||
String wxLogin(String openid, String decryptResult);
|
||||
|
||||
/**
|
||||
* uniApp保存会员信息
|
||||
* @author PQZ
|
||||
* @date 14:54 2025/4/9
|
||||
* @param memberUser {@link MemberUserVO}
|
||||
**/
|
||||
String wxLogin(String openid,String decryptResult);
|
||||
void uniSaveMember(MemberUserVO memberUser);
|
||||
}
|
||||
|
@ -19,6 +19,8 @@ import com.ruoyi.member.mapper.MemberUserMapper;
|
||||
import com.ruoyi.member.service.*;
|
||||
import com.ruoyi.member.vo.MemberUserVO;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -53,6 +55,8 @@ public class MemberUserServiceImpl extends ServiceImpl<MemberUserMapper, MemberU
|
||||
private IMemberAddressService addressService;
|
||||
@Resource
|
||||
private IMemberPointsService pointsService;
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
|
||||
/**
|
||||
@ -113,6 +117,29 @@ public class MemberUserServiceImpl extends ServiceImpl<MemberUserMapper, MemberU
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过用户id查询用户详情信息
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param userType userType
|
||||
* @return com.ruoyi.member.vo.MemberUserVO
|
||||
* @author PQZ
|
||||
* @date 11:40 2025/4/9
|
||||
**/
|
||||
@Override
|
||||
public MemberUserVO queryByUserId(Long userId, String userType) {
|
||||
//博主,通告主基本信息
|
||||
MemberUserVO result = memberUserMapper.queryByUserId(userId, userType);
|
||||
if ("02".equals(userType)) {
|
||||
//积分
|
||||
result.setPointsBalance(pointsService.getBloggerBalance(userId));
|
||||
//报名
|
||||
result.setReport(cardService.getCardReport(userId,"02"));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 微信授权登陆
|
||||
*
|
||||
@ -177,4 +204,26 @@ public class MemberUserServiceImpl extends ServiceImpl<MemberUserMapper, MemberU
|
||||
// 生成token
|
||||
return tokenService.createToken(loginUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* uniApp保存会员信息
|
||||
*
|
||||
* @param memberUser {@link MemberUserVO}
|
||||
* @author PQZ
|
||||
* @date 14:54 2025/4/9
|
||||
**/
|
||||
@Override
|
||||
public void uniSaveMember(MemberUserVO memberUser) {
|
||||
//更新用户信息
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setUserId(memberUser.getUserId());
|
||||
sysUser.setAvatar(memberUser.getAvatar());
|
||||
sysUser.setNickName(memberUser.getNickName());
|
||||
sysUser.setPhonenumber(memberUser.getPhonenumber());
|
||||
userService.updateUserProfile(sysUser);
|
||||
//更新会员表信息
|
||||
MemberUser member = new MemberUser();
|
||||
BeanUtils.copyProperties(memberUser,member);
|
||||
updateById(member);
|
||||
}
|
||||
}
|
||||
|
@ -38,4 +38,6 @@ public class MemberUserVO extends MemberUser {
|
||||
int pointsBalance;
|
||||
/**报名次数*/
|
||||
int report;
|
||||
/**用户名*/
|
||||
String userName;
|
||||
}
|
||||
|
@ -10,13 +10,13 @@
|
||||
<result property="identityType" column="identity_type"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="tel" column="tel"/>
|
||||
<result property="tRemaining" column="t_remaining"/>
|
||||
<result property="tTotalNum" column="t_total_num"/>
|
||||
<result property="tFansNum" column="t_fans_num"/>
|
||||
<result property="tOpenDisturb" column="t_open_disturb"/>
|
||||
<result property="tRecipientName" column="t_recipient_name"/>
|
||||
<result property="tRecipientImage" column="t_recipient_image"/>
|
||||
<result property="bPoints" column="b_points"/>
|
||||
<result property="tremaining" column="tremaining"/>
|
||||
<result property="ttotalNum" column="ttotal_num"/>
|
||||
<result property="tfansNum" column="tfans_num"/>
|
||||
<result property="topenDisturb" column="topen_disturb"/>
|
||||
<result property="trecipientName" column="trecipient_name"/>
|
||||
<result property="trecipientImage" column="trecipient_image"/>
|
||||
<result property="bpoints" column="bpoints"/>
|
||||
<result property="creator" column="creator"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updater" column="updater"/>
|
||||
@ -30,13 +30,13 @@
|
||||
identity_type,
|
||||
user_id,
|
||||
tel,
|
||||
t_remaining,
|
||||
t_total_num,
|
||||
t_fans_num,
|
||||
t_open_disturb,
|
||||
t_recipient_name,
|
||||
t_recipient_image,
|
||||
b_points,
|
||||
remaining,
|
||||
ttotal_num,
|
||||
tfans_num,
|
||||
topen_disturb,
|
||||
trecipient_name,
|
||||
trecipient_image,
|
||||
bpoints,
|
||||
creator,
|
||||
create_time,
|
||||
updater,
|
||||
@ -51,13 +51,13 @@
|
||||
main.identity_type AS identityType,
|
||||
main.user_id AS userId,
|
||||
main.tel AS tel,
|
||||
main.t_remaining AS tRemaining,
|
||||
main.t_total_num AS tTotalNum,
|
||||
main.t_fans_num AS tFansNum,
|
||||
main.t_open_disturb AS tOpenDisturb,
|
||||
main.t_recipient_name AS tRecipientName,
|
||||
main.t_recipient_image AS tRecipientImage,
|
||||
main.b_points AS bPoints,
|
||||
main.tremaining AS tremaining,
|
||||
main.ttotal_num AS ttotalNum,
|
||||
main.tfans_num AS tfansNum,
|
||||
main.topen_disturb AS topenDisturb,
|
||||
main.trecipient_name AS trecipientName,
|
||||
main.trecipient_image AS trecipientImage,
|
||||
main.bpoints AS bpoints,
|
||||
su.nick_name AS nickName,
|
||||
su.status AS status,
|
||||
su.avatar AS avatar,
|
||||
@ -90,16 +90,17 @@
|
||||
main.identity_type AS identityType,
|
||||
main.user_id AS userId,
|
||||
main.tel AS tel,
|
||||
main.t_remaining AS tRemaining,
|
||||
main.t_total_num AS tTotalNum,
|
||||
main.t_fans_num AS tFansNum,
|
||||
main.t_open_disturb AS tOpenDisturb,
|
||||
main.t_recipient_name AS tRecipientName,
|
||||
main.t_recipient_image AS tRecipientImage,
|
||||
main.b_points AS bPoints,
|
||||
main.tremaining AS tremaining,
|
||||
main.ttotal_num AS ttotalNum,
|
||||
main.tfans_num AS tfansNum,
|
||||
main.topen_disturb AS topenDisturb,
|
||||
main.trecipient_name AS trecipientName,
|
||||
main.trecipient_image AS trecipientImage,
|
||||
main.bpoints AS bpoints,
|
||||
su.nick_name AS nickName,
|
||||
su.status AS status,
|
||||
su.avatar AS avatar,
|
||||
su.user_name AS userName,
|
||||
su.phonenumber AS phonenumber,
|
||||
GROUP_CONCAT(mc.card_name SEPARATOR ', ') AS memberCardName
|
||||
from dl_member_user main
|
||||
|
Loading…
Reference in New Issue
Block a user