补全字段
This commit is contained in:
parent
ba3728879c
commit
776d22784b
@ -13,6 +13,9 @@ public class AdvisorBasicVO implements Serializable {
|
||||
@ApiModelProperty("用户id")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("用户工号")
|
||||
private String staffNo;
|
||||
|
||||
@ApiModelProperty("投顾名称")
|
||||
private String name;
|
||||
|
||||
@ -37,6 +40,7 @@ public class AdvisorBasicVO implements Serializable {
|
||||
public AdvisorBasicVO(AdvisorBasic advisorBasic) {
|
||||
this.id = advisorBasic.id;
|
||||
this.userId = advisorBasic.userId;
|
||||
this.staffNo = advisorBasic.staffNo;
|
||||
this.name = advisorBasic.name;
|
||||
this.showName = advisorBasic.showName;
|
||||
this.avatar = advisorBasic.avatar;
|
||||
@ -61,6 +65,14 @@ public class AdvisorBasicVO implements Serializable {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getStaffNo() {
|
||||
return staffNo;
|
||||
}
|
||||
|
||||
public void setStaffNo(String staffNo) {
|
||||
this.staffNo = staffNo;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@ -1,23 +1,24 @@
|
||||
package com.syzb.app.controller;
|
||||
|
||||
import com.syzb.common.handler.BizException;
|
||||
import com.syzb.common.query.AppUserInfoQuery;
|
||||
import com.syzb.common.query.OnlyIdQuery;
|
||||
import com.syzb.common.result.CommonResult;
|
||||
import com.syzb.common.result.ResponseStatus;
|
||||
import com.syzb.common.service.AppUserService;
|
||||
import com.syzb.common.vo.AppCUserInfoVO;
|
||||
import com.syzb.common.vo.AuthResultVO;
|
||||
import com.syzb.common.vo.FrontUserVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Api(tags = "App用户信息")
|
||||
@RestController
|
||||
@RequestMapping("/app/user/")
|
||||
@Validated
|
||||
public class AppUserController {
|
||||
|
||||
@Resource
|
||||
@ -25,9 +26,22 @@ public class AppUserController {
|
||||
|
||||
@ApiOperation("获取C端用户信息")
|
||||
@PostMapping("getUserInfo")
|
||||
@CrossOrigin(origins = "*", allowedHeaders = "*", maxAge = 3600)
|
||||
public CommonResult<AppCUserInfoVO> getUserInfo(@Validated @RequestBody AppUserInfoQuery query) {
|
||||
AppCUserInfoVO vo = appUserService.getUserInfo(query);
|
||||
return CommonResult.success(vo);
|
||||
}
|
||||
|
||||
@ApiOperation("C端用户鉴权")
|
||||
@PostMapping("checkAuth")
|
||||
@CrossOrigin(origins = "*", allowedHeaders = "*", maxAge = 3600)
|
||||
public CommonResult<AuthResultVO> checkAuth(@Validated @RequestBody OnlyIdQuery query,
|
||||
@RequestAttribute(value = "frontUser", required = false) FrontUserVO frontUserVO) {
|
||||
if (frontUserVO == null) {
|
||||
throw new BizException(ResponseStatus.SESSION_EXPIRY);
|
||||
}
|
||||
AuthResultVO vo = appUserService.checkAuth(query.getId().toString(), frontUserVO);
|
||||
return CommonResult.success(vo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -20,7 +20,6 @@ import com.syzb.group.mapper.GroupMessageReadMapper;
|
||||
import com.syzb.group.vo.message.GroupMessageReadVO;
|
||||
import com.syzb.group.vo.message.GroupMessageVO;
|
||||
import com.syzb.rbac.service.WxUserService;
|
||||
import com.syzb.rbac.vo.WxUserVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@ -27,6 +27,9 @@ import com.syzb.common.vo.AuthResultVO;
|
||||
import com.syzb.common.vo.FrontUserVO;
|
||||
import com.syzb.common.vo.MergeProductInfoVO;
|
||||
import com.syzb.common.vo.TagVO;
|
||||
import com.syzb.rbac.entity.UserDept;
|
||||
import com.syzb.rbac.entity.UserLogin;
|
||||
import com.syzb.rbac.service.UserService;
|
||||
import com.syzb.video.constant.*;
|
||||
import com.syzb.video.entity.*;
|
||||
import com.syzb.video.helper.AbstractVideoSortComparator;
|
||||
@ -101,6 +104,9 @@ public class AppVideoInfoService {
|
||||
@Resource
|
||||
private OnlineUserService onlineUserService;
|
||||
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
||||
@Value("${resizeUrl.urlMain}")
|
||||
private String urlMain;
|
||||
|
||||
@ -160,7 +166,15 @@ public class AppVideoInfoService {
|
||||
appVideoCustomerService.saveCustomerSale(saleUserId, userId, id);
|
||||
videoCommonService.publishPcMessageWithDebounce(id);
|
||||
}
|
||||
|
||||
if (saleUserId != null) {
|
||||
UserDept userDept = userService.getUserMap().get(saleUserId);
|
||||
if (userDept != null && userDept.getLoginId() != null) {
|
||||
UserLogin userLogin = userService.getUserLoginMap().get(userDept.getLoginId());
|
||||
if (userLogin != null) {
|
||||
vo.setSaleUserStaffNo(userLogin.getStaffNo());
|
||||
}
|
||||
}
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
||||
@ -183,6 +183,9 @@ public class VideoDetailAppVO implements IVideoInfoAppVO, Serializable {
|
||||
@ApiModelProperty("是否显示完整昵称 1 显示 2 屏蔽")
|
||||
private Integer showNickname;
|
||||
|
||||
@ApiModelProperty("营销经理工号")
|
||||
private String saleUserStaffNo;
|
||||
|
||||
public VideoDetailAppVO() {
|
||||
}
|
||||
|
||||
@ -651,4 +654,12 @@ public class VideoDetailAppVO implements IVideoInfoAppVO, Serializable {
|
||||
public void setShowNickname(Integer showNickname) {
|
||||
this.showNickname = showNickname;
|
||||
}
|
||||
|
||||
public String getSaleUserStaffNo() {
|
||||
return saleUserStaffNo;
|
||||
}
|
||||
|
||||
public void setSaleUserStaffNo(String saleUserStaffNo) {
|
||||
this.saleUserStaffNo = saleUserStaffNo;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user