完善需求和逻辑问题
This commit is contained in:
parent
9ef12e0a82
commit
fc45c6eb13
@ -23,7 +23,7 @@ IF %ERRORLEVEL% NEQ 0 (
|
|||||||
|
|
||||||
:: 3. 通过 SSH 运行 start.sh 脚本
|
:: 3. 通过 SSH 运行 start.sh 脚本
|
||||||
echo Running start.sh script on Linux server...
|
echo Running start.sh script on Linux server...
|
||||||
call ssh root@8.138.144.54 'bash /root/start.sh'
|
call ssh root@8.138.144.54 "bash /root/start.sh"
|
||||||
|
|
||||||
:: 检查 SSH 命令是否成功
|
:: 检查 SSH 命令是否成功
|
||||||
IF %ERRORLEVEL% NEQ 0 (
|
IF %ERRORLEVEL% NEQ 0 (
|
||||||
|
|||||||
@ -2,14 +2,9 @@ package com.upchina.common.constant;
|
|||||||
|
|
||||||
public enum ClientType {
|
public enum ClientType {
|
||||||
|
|
||||||
UNKOWN(0),
|
UNKNOWN(0),
|
||||||
PC(1),
|
H5(1),
|
||||||
APP(2),
|
WEB(2),
|
||||||
Web(3),
|
|
||||||
H5(4),
|
|
||||||
TEACH_APP(5),
|
|
||||||
ADVISOR_APP(6),
|
|
||||||
HW_FAST_APP(7),
|
|
||||||
Other(99);
|
Other(99);
|
||||||
|
|
||||||
private final int value;
|
private final int value;
|
||||||
|
|||||||
@ -115,18 +115,8 @@ public class AuthFilter implements Filter {
|
|||||||
if (frontUserVO.getClientType() == null) {
|
if (frontUserVO.getClientType() == null) {
|
||||||
handlerExceptionResolver.resolveException(req, resp, null, new BizException(ResponseStatus.TOKEN_DATA_ERROR));
|
handlerExceptionResolver.resolveException(req, resp, null, new BizException(ResponseStatus.TOKEN_DATA_ERROR));
|
||||||
return;
|
return;
|
||||||
} else if (frontUserVO.getClientType() == ClientType.H5.value() || frontUserVO.getClientType() == ClientType.Web.value()) {
|
} else if (frontUserVO.getClientType() == ClientType.H5.value() || frontUserVO.getClientType() == ClientType.WEB.value()) {
|
||||||
if (StrUtil.isBlank(frontUserVO.getReCookie()) || StrUtil.isBlank(frontUserVO.getCookie())) {
|
if (StrUtil.isBlank(frontUserVO.getUserId()) || StrUtil.isBlank(frontUserVO.getUserName())) {
|
||||||
handlerExceptionResolver.resolveException(req, resp, null, new BizException(ResponseStatus.TOKEN_DATA_ERROR));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else if (frontUserVO.getClientType() == ClientType.APP.value()) {
|
|
||||||
if (StrUtil.isBlank(frontUserVO.getAppToken()) || StrUtil.isBlank(frontUserVO.getAppSign())) {
|
|
||||||
handlerExceptionResolver.resolveException(req, resp, null, new BizException(ResponseStatus.TOKEN_DATA_ERROR));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else if (frontUserVO.getClientType() == ClientType.PC.value()) {
|
|
||||||
if (StrUtil.isBlank(frontUserVO.getHqright())) {
|
|
||||||
handlerExceptionResolver.resolveException(req, resp, null, new BizException(ResponseStatus.TOKEN_DATA_ERROR));
|
handlerExceptionResolver.resolveException(req, resp, null, new BizException(ResponseStatus.TOKEN_DATA_ERROR));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,24 +2,30 @@ package com.upchina.common.query;
|
|||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Max;
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
|
||||||
public class AppUserInfoQuery {
|
public class AppUserInfoQuery {
|
||||||
|
|
||||||
@ApiModelProperty("直播间id")
|
@ApiModelProperty("用户ID")
|
||||||
private Integer videoId;
|
@NotBlank
|
||||||
|
private String userId;
|
||||||
|
|
||||||
@ApiModelProperty("营销人员id")
|
@ApiModelProperty("客户类型 1:H5 2:Web")
|
||||||
private Integer saleUserId;
|
@NotNull
|
||||||
|
@Min(1)
|
||||||
@ApiModelProperty("客户类型 1 PC 2 app 3 web 4 H5")
|
@Max(2)
|
||||||
private Integer clientType;
|
private Integer clientType;
|
||||||
|
|
||||||
public Integer getVideoId() {
|
public String getUserId() {
|
||||||
return videoId;
|
return userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVideoId(Integer videoId) {
|
public void setUserId(String userId) {
|
||||||
this.videoId = videoId;
|
this.userId = userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getClientType() {
|
public Integer getClientType() {
|
||||||
@ -29,13 +35,4 @@ public class AppUserInfoQuery {
|
|||||||
public void setClientType(Integer clientType) {
|
public void setClientType(Integer clientType) {
|
||||||
this.clientType = clientType;
|
this.clientType = clientType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getSaleUserId() {
|
|
||||||
return saleUserId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSaleUserId(Integer saleUserId) {
|
|
||||||
this.saleUserId = saleUserId;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,13 +39,17 @@ public class AppUserService {
|
|||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AppCUserInfoVO getUserInfo(AppUserInfoQuery query) {
|
public AppCUserInfoVO getUserInfo(AppUserInfoQuery query) {
|
||||||
|
String userId = query.getUserId();
|
||||||
Integer clientType = query.getClientType();
|
Integer clientType = query.getClientType();
|
||||||
AppCUserInfoVO userInfoVO = new AppCUserInfoVO();
|
AppCUserInfoVO userInfoVO = new AppCUserInfoVO();
|
||||||
|
userInfoVO.setUserId(userId);
|
||||||
userInfoVO.setClientType(clientType);
|
userInfoVO.setClientType(clientType);
|
||||||
// TODO 对接前端健全
|
// TODO 对接前端健全
|
||||||
FrontUserVO frontUserVO = new FrontUserVO();
|
FrontUserVO frontUserVO = new FrontUserVO();
|
||||||
|
frontUserVO.setUserId(userId);
|
||||||
|
frontUserVO.setUserName(userId);
|
||||||
|
frontUserVO.setClientType(clientType);
|
||||||
if (frontUserVO != null) {
|
if (frontUserVO != null) {
|
||||||
String userId = frontUserVO.getUserId();
|
|
||||||
// 校验黑名单
|
// 校验黑名单
|
||||||
if (userBlackListService.check(userId)) {
|
if (userBlackListService.check(userId)) {
|
||||||
throw new BizException(ResponseStatus.USER_BLACK_LIST_ERROR);
|
throw new BizException(ResponseStatus.USER_BLACK_LIST_ERROR);
|
||||||
|
|||||||
@ -8,18 +8,8 @@ public class FrontUserVO {
|
|||||||
|
|
||||||
private String imgUrl;
|
private String imgUrl;
|
||||||
|
|
||||||
private String cookie;
|
|
||||||
|
|
||||||
private String reCookie;
|
|
||||||
|
|
||||||
private Integer clientType;
|
private Integer clientType;
|
||||||
|
|
||||||
private String appToken;
|
|
||||||
|
|
||||||
private String appSign;
|
|
||||||
|
|
||||||
private String hqright;
|
|
||||||
|
|
||||||
public FrontUserVO() {
|
public FrontUserVO() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,14 +37,6 @@ public class FrontUserVO {
|
|||||||
this.imgUrl = imgUrl;
|
this.imgUrl = imgUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCookie() {
|
|
||||||
return cookie;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCookie(String cookie) {
|
|
||||||
this.cookie = cookie;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getClientType() {
|
public Integer getClientType() {
|
||||||
return clientType;
|
return clientType;
|
||||||
}
|
}
|
||||||
@ -63,35 +45,4 @@ public class FrontUserVO {
|
|||||||
this.clientType = clientType;
|
this.clientType = clientType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getReCookie() {
|
|
||||||
return reCookie;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setReCookie(String reCookie) {
|
|
||||||
this.reCookie = reCookie;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppToken() {
|
|
||||||
return appToken;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAppToken(String appToken) {
|
|
||||||
this.appToken = appToken;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppSign() {
|
|
||||||
return appSign;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAppSign(String appSign) {
|
|
||||||
this.appSign = appSign;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getHqright() {
|
|
||||||
return hqright;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHqright(String hqright) {
|
|
||||||
this.hqright = hqright;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import javax.annotation.Resource;
|
|||||||
|
|
||||||
import com.hazelcast.map.IMap;
|
import com.hazelcast.map.IMap;
|
||||||
import com.upchina.common.config.cache.CacheKey;
|
import com.upchina.common.config.cache.CacheKey;
|
||||||
|
import com.upchina.group.constant.*;
|
||||||
import com.upchina.group.service.GroupInfoService;
|
import com.upchina.group.service.GroupInfoService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -27,12 +28,6 @@ import com.upchina.common.result.ResponseStatus;
|
|||||||
import com.upchina.common.state.StateMachine;
|
import com.upchina.common.state.StateMachine;
|
||||||
import com.upchina.common.vo.BackendUserVO;
|
import com.upchina.common.vo.BackendUserVO;
|
||||||
import com.upchina.common.vo.OnlyIdVO;
|
import com.upchina.common.vo.OnlyIdVO;
|
||||||
import com.upchina.group.constant.GroupMessageChannel;
|
|
||||||
import com.upchina.group.constant.GroupMessageContentType;
|
|
||||||
import com.upchina.group.constant.GroupMessageStatus;
|
|
||||||
import com.upchina.group.constant.GroupMessageType;
|
|
||||||
import com.upchina.group.constant.GroupMessageUserType;
|
|
||||||
import com.upchina.group.constant.QueryGroupMessageType;
|
|
||||||
import com.upchina.group.entity.GroupInfo;
|
import com.upchina.group.entity.GroupInfo;
|
||||||
import com.upchina.group.entity.GroupMessage;
|
import com.upchina.group.entity.GroupMessage;
|
||||||
import com.upchina.group.mapper.GroupInfoMapper;
|
import com.upchina.group.mapper.GroupInfoMapper;
|
||||||
@ -133,6 +128,7 @@ public class AdminGroupMessageService {
|
|||||||
.eq(QueryGroupMessageType.CUSTOMER.value.equals(type), GroupMessage::getUserType, GroupMessageUserType.CUSTOMER.value)
|
.eq(QueryGroupMessageType.CUSTOMER.value.equals(type), GroupMessage::getUserType, GroupMessageUserType.CUSTOMER.value)
|
||||||
.eq(QueryGroupMessageType.SELECTED.value.equals(type), GroupMessage::getIsRecommend, IsOrNot.IS.value)
|
.eq(QueryGroupMessageType.SELECTED.value.equals(type), GroupMessage::getIsRecommend, IsOrNot.IS.value)
|
||||||
.eq(QueryGroupMessageType.PRIVATE.value.equals(type) && StrUtil.isNotEmpty(userId), GroupMessage::getPrivateUserId, userId)
|
.eq(QueryGroupMessageType.PRIVATE.value.equals(type) && StrUtil.isNotEmpty(userId), GroupMessage::getPrivateUserId, userId)
|
||||||
|
.eq(!QueryGroupMessageType.PRIVATE.value.equals(type), GroupMessage::getInteractiveType, GroupInteractiveType.GROUP.value)
|
||||||
.eq(status != null, GroupMessage::getStatus, query.getStatus())
|
.eq(status != null, GroupMessage::getStatus, query.getStatus())
|
||||||
.like(StrUtil.isNotEmpty(keyword),GroupMessage::getContent, keyword)
|
.like(StrUtil.isNotEmpty(keyword),GroupMessage::getContent, keyword)
|
||||||
|
|
||||||
@ -192,7 +188,8 @@ public class AdminGroupMessageService {
|
|||||||
GroupMessage message = query.toPO();
|
GroupMessage message = query.toPO();
|
||||||
groupMessageMapper.updateById(message);
|
groupMessageMapper.updateById(message);
|
||||||
|
|
||||||
groupCacheService.addMessage(message);
|
messageInDB.setIsRecommend(query.getIsRecommend());
|
||||||
|
groupCacheService.addMessage(messageInDB);
|
||||||
clearCache(query.getMessageId());
|
clearCache(query.getMessageId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user