订单
This commit is contained in:
@@ -73,22 +73,6 @@
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--weixin-java-common-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.github.binarywang</groupId>-->
|
||||
<!-- <artifactId>weixin-java-common</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
<!--weixin-java-admin-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.github.binarywang</groupId>-->
|
||||
<!-- <artifactId>weixin-java-mp</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <!–weixin-java-miniapp–>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.github.binarywang</groupId>-->
|
||||
<!-- <artifactId>weixin-java-miniapp</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.binarywang</groupId>
|
||||
<artifactId>wx-java-mp-spring-boot-starter</artifactId>
|
||||
@@ -103,19 +87,11 @@
|
||||
<dependency>
|
||||
<groupId>ws.schild</groupId>
|
||||
<artifactId>jave-core</artifactId>
|
||||
<version>3.5.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ws.schild</groupId>
|
||||
<artifactId>jave-native-win64</artifactId>
|
||||
<version>2.4.6</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/ws.schild/jave-native-linux64 Linux版本-->
|
||||
<dependency>
|
||||
<groupId>ws.schild</groupId>
|
||||
<artifactId>jave-native-linux64</artifactId>
|
||||
<version>2.4.6</version>
|
||||
<artifactId>jave-nativebin-linux64</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.starry.admin.common.aspect;
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 陪玩登录注解
|
||||
* 陪聊登录注解
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
|
||||
@@ -2,8 +2,8 @@ package com.starry.admin.common.aspect;
|
||||
|
||||
import com.starry.admin.common.conf.ThreadLocalRequestDetail;
|
||||
import com.starry.admin.common.exception.ServiceException;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clear.service.impl.PlayClerkUserInfoServiceImpl;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.impl.PlayClerkUserInfoServiceImpl;
|
||||
import com.starry.admin.modules.weichat.service.WxTokenService;
|
||||
import com.starry.common.constant.Constants;
|
||||
import com.starry.common.constant.HttpStatus;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.starry.admin.common.conf;
|
||||
|
||||
import com.alibaba.ttl.TransmittableThreadLocal;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.custom.module.entity.PlayCustomUserInfoEntity;
|
||||
|
||||
/**
|
||||
@@ -9,35 +9,35 @@ import com.starry.admin.modules.custom.module.entity.PlayCustomUserInfoEntity;
|
||||
* @since : 2024/4/2 12:10 AM
|
||||
*/
|
||||
public class ThreadLocalRequestDetail {
|
||||
private static final TransmittableThreadLocal<Object> threadLocal = new TransmittableThreadLocal<>();
|
||||
private static final TransmittableThreadLocal<Object> THREAD_LOCAL = new TransmittableThreadLocal<>();
|
||||
|
||||
/**
|
||||
* 设置请求信息到当前线程中
|
||||
*/
|
||||
public static void setRequestDetail(Object data) {
|
||||
threadLocal.set(data);
|
||||
THREAD_LOCAL.set(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 从当前线程中获取请求信息
|
||||
*/
|
||||
public static Object getRequestDetail() {
|
||||
return threadLocal.get();
|
||||
return THREAD_LOCAL.get();
|
||||
}
|
||||
|
||||
public static PlayClerkUserInfoEntity getClerkUserInfo() {
|
||||
return (PlayClerkUserInfoEntity) threadLocal.get();
|
||||
return (PlayClerkUserInfoEntity) THREAD_LOCAL.get();
|
||||
}
|
||||
|
||||
public static PlayCustomUserInfoEntity getCustomUserInfo() {
|
||||
return (PlayCustomUserInfoEntity) threadLocal.get();
|
||||
return (PlayCustomUserInfoEntity) THREAD_LOCAL.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* 销毁
|
||||
*/
|
||||
public static void remove() {
|
||||
threadLocal.remove();
|
||||
THREAD_LOCAL.remove();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -77,29 +77,6 @@ public class HttpUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 向指定 URL 发送POST方法的请求
|
||||
// *
|
||||
// * @param url 发送请求的 URL
|
||||
// * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
|
||||
// * @return 所代表远程资源的响应结果
|
||||
// */
|
||||
// public static String sendPost(String url, String param) {
|
||||
// URLConnection conn = getConnection(url);
|
||||
// StringBuilder result = new StringBuilder();
|
||||
// try (PrintWriter out = new PrintWriter(conn.getOutputStream()); BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {
|
||||
// out.print(param);
|
||||
// out.flush();
|
||||
// String line;
|
||||
// while ((line = in.readLine()) != null) {
|
||||
// result.append(line);
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// log.error("sendPost error", e);
|
||||
// }
|
||||
// return result.toString();
|
||||
// }
|
||||
|
||||
|
||||
public static String sendPost(String requestUrl, String outputStr) throws IOException {
|
||||
HttpURLConnection conn = getConnection(requestUrl);
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
package com.starry.admin.common.play.wx;
|
||||
|
||||
/**
|
||||
* 位置支付常量
|
||||
*
|
||||
* @author admin
|
||||
*/
|
||||
public class WeChatConstants {
|
||||
|
||||
public enum SignType {
|
||||
@@ -11,7 +16,7 @@ public class WeChatConstants {
|
||||
/**
|
||||
* 支付成功回调地址
|
||||
*/
|
||||
public static String NOTIFY_URL = "http://8.142.116.233:8001/pay/wxpay/callback";
|
||||
public static String NOTIFY_URL = "https://july.hucs.top/api/wx/pay/jsCallback";
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.starry.admin.common.play.wx;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.crypto.digest.MD5;
|
||||
import com.github.wxpay.sdk.WXPayUtil;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.common.utils.StringUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
@@ -22,13 +24,17 @@ import java.io.InputStream;
|
||||
import java.io.StringWriter;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 微信支付辅助类
|
||||
*
|
||||
* @author admin
|
||||
*/
|
||||
@Slf4j
|
||||
public class WxPlayUtils {
|
||||
public class WxCustomPayUtils {
|
||||
|
||||
private static final String SYMBOLS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
|
||||
@@ -36,45 +42,52 @@ public class WxPlayUtils {
|
||||
|
||||
|
||||
/**
|
||||
* 获取微信支付请求参数(map格式)
|
||||
*
|
||||
* @param openId 微信公众号ID
|
||||
* @param appid 用户ID
|
||||
* @param mchId 商户ID
|
||||
* @param orderId 订单ID
|
||||
* @param nonceStr 订单ID
|
||||
* @param spBillCreateIp 终端设备ID
|
||||
* @param body 商品描述
|
||||
* @param totalFee 商品金额
|
||||
* @param attach 附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用(传入租户ID)
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String unifiedOrderJSAPI(String openId, String appid, String mchId, String orderId, String spBillCreateIp, String body, String attach, int totalFee) throws Exception {
|
||||
Map<String, String> playRequestParameters = new HashMap<>();
|
||||
public static Map<String, String> getPayRequestParameters(String openId, String appid, String mchId, String orderId, String nonceStr, String spBillCreateIp, String body, String attach, long totalFee) {
|
||||
Map<String, String> playRequestParameters = new HashMap<>(16);
|
||||
playRequestParameters.put("openId", openId);
|
||||
playRequestParameters.put("appid", appid);
|
||||
playRequestParameters.put("mch_id", mchId);
|
||||
playRequestParameters.put("nonce_str", IdUtil.fastSimpleUUID());
|
||||
playRequestParameters.put("nonce_str", nonceStr);
|
||||
playRequestParameters.put("body", body);
|
||||
playRequestParameters.put("attach", attach);
|
||||
playRequestParameters.put("out_trade_no", orderId);
|
||||
playRequestParameters.put("total_fee", String.valueOf(totalFee));
|
||||
playRequestParameters.put("spbill_create_ip", spBillCreateIp);
|
||||
playRequestParameters.put("notify_url", WxPlayProperties.RETURN_URL);
|
||||
playRequestParameters.put("notify_url", WeChatConstants.NOTIFY_URL);
|
||||
playRequestParameters.put("trade_type", "JSAPI");
|
||||
playRequestParameters.put("openId", openId);
|
||||
String nonce_str = IdUtil.fastSimpleUUID();
|
||||
//生成签名, 统一下单
|
||||
log.debug("paraMap------------{}", playRequestParameters);
|
||||
String sign = WXPayUtil.generateSignature(playRequestParameters, orderId);
|
||||
log.debug("sign:{}", sign);
|
||||
playRequestParameters.put("sign", sign);
|
||||
String xml = WXPayUtil.mapToXml(playRequestParameters);//将所有参数(map)转xml格式
|
||||
String new_xml = new String(xml.getBytes(StandardCharsets.UTF_8));
|
||||
log.debug("xml:{}", new_xml);
|
||||
//发送post请求"统一下单接口"返回预支付id:prepay_id
|
||||
String xmlStr = HttpUtils.sendPost(WeChatConstants.UNIFIEDORDER_URL, generateSignedXml(playRequestParameters, orderId));
|
||||
// String xmlStr = HttpUtils.sendPost(WeChatConstants.UNIFIEDORDER_URL, generateSignedXml(playRequestParameters, orderId));
|
||||
log.debug("xmlStr:{}", xmlStr);
|
||||
Map<String, String> map = WXPayUtil.xmlToMap(xmlStr);
|
||||
return playRequestParameters;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param playRequestParameters 微信支付请求参数
|
||||
* @param orderId 订单ID
|
||||
* @param sign 签名信息
|
||||
*/
|
||||
public static String unifiedOrderJsApi(Map<String, String> playRequestParameters, String orderId, String sign) throws Exception {
|
||||
playRequestParameters.put("sign", sign);
|
||||
// 将所有参数(map)转xml格式
|
||||
String xml = WXPayUtil.mapToXml(playRequestParameters);
|
||||
String newXml = new String(xml.getBytes(StandardCharsets.UTF_8));
|
||||
log.error("xml:{}", newXml);
|
||||
// 发送post请求"统一下单接口"返回预支付id:prepay_id
|
||||
String xmlStr = HttpUtils.sendPost(WeChatConstants.UNIFIEDORDER_URL, newXml);
|
||||
log.info("xmlStr:{}", xmlStr);
|
||||
if (StringUtils.isBlank(xmlStr)) {
|
||||
throw new CustomException("微信支付返回信息为空");
|
||||
}
|
||||
Map<String, String> map = WXPayUtil.xmlToMap(xmlStr);
|
||||
// 如果预支付返回状态码为不为SUCCESS,说明预支付接口调用失败(通讯业务失败),抛出异常,业务进行处理
|
||||
if (!map.get("return_code").equals("SUCCESS")) {
|
||||
throw new CustomException(map.get("return_msg"));
|
||||
@@ -286,7 +299,7 @@ public class WxPlayUtils {
|
||||
}
|
||||
sb.append("key=").append(key);
|
||||
if (WeChatConstants.SignType.MD5.equals(signType)) {
|
||||
return MD5(sb.toString()).toUpperCase();
|
||||
return MD5.create().digestHex(sb.toString()).toUpperCase();
|
||||
} else if (WeChatConstants.SignType.HMACSHA256.equals(signType)) {
|
||||
return HmacSHA256(sb.toString(), key);
|
||||
} else {
|
||||
@@ -309,21 +322,21 @@ public class WxPlayUtils {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生成 MD5
|
||||
*
|
||||
* @param data 待处理数据
|
||||
* @return MD5结果
|
||||
*/
|
||||
public static String MD5(String data) throws Exception {
|
||||
MessageDigest md = MessageDigest.getInstance("MD5");
|
||||
byte[] array = md.digest(data.getBytes(StandardCharsets.UTF_8));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (byte item : array) {
|
||||
sb.append(Integer.toHexString((item & 0xFF) | 0x100), 1, 3);
|
||||
}
|
||||
return sb.toString().toUpperCase();
|
||||
}
|
||||
// /**
|
||||
// * 生成 MD5
|
||||
// *
|
||||
// * @param data 待处理数据
|
||||
// * @return MD5结果
|
||||
// */
|
||||
// public static String MD5(String data) throws Exception {
|
||||
// MessageDigest md = MessageDigest.getInstance("MD5");
|
||||
// byte[] array = md.digest(data.getBytes(StandardCharsets.UTF_8));
|
||||
// StringBuilder sb = new StringBuilder();
|
||||
// for (byte item : array) {
|
||||
// sb.append(Integer.toHexString((item & 0xFF) | 0x100), 1, 3);
|
||||
// }
|
||||
// return sb.toString().toUpperCase();
|
||||
// }
|
||||
|
||||
/**
|
||||
* 生成 HmacSHA256
|
||||
@@ -351,4 +364,5 @@ public class WxPlayUtils {
|
||||
public static long getCurrentTimestamp() {
|
||||
return System.currentTimeMillis() / 1000;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,11 +2,12 @@ package com.starry.admin.common.security.filter;
|
||||
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.starry.admin.common.component.JwtToken;
|
||||
import com.starry.admin.common.domain.LoginUser;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clear.service.impl.PlayClerkUserInfoServiceImpl;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.impl.PlayClerkUserInfoServiceImpl;
|
||||
import com.starry.admin.modules.custom.module.entity.PlayCustomUserInfoEntity;
|
||||
import com.starry.admin.modules.custom.service.impl.PlayCustomUserInfoServiceImpl;
|
||||
import com.starry.admin.modules.platform.entity.SysTenantEntity;
|
||||
@@ -15,6 +16,8 @@ import com.starry.admin.modules.weichat.service.WxTokenService;
|
||||
import com.starry.admin.utils.SecurityUtils;
|
||||
import com.starry.common.constant.Constants;
|
||||
import com.starry.common.redis.RedisCache;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.result.ResultCodeEnum;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
@@ -25,11 +28,14 @@ import org.springframework.web.servlet.HandlerExceptionResolver;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
@@ -62,12 +68,14 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
|
||||
private RedisCache redisCache;
|
||||
|
||||
|
||||
/**
|
||||
* 不需要登录的的路径
|
||||
*/
|
||||
Set<String> noLoginPathRequired = new HashSet<>(Arrays.asList("/wx/common/area/tree", "/wx/common/file/upload", "/wx/common/audio/upload", "/wx/oauth2/getConfigAddress", "/wx/clerk/user/queryByPage", "wx/clerk/user/queryGiftById", "/wx/clerk/user/queryPriceById", "/wx/clerk/user/queryTrendsById", "wx/clerk/user/queryEvaluateById"));
|
||||
|
||||
@Override
|
||||
protected void doFilterInternal(@NotNull HttpServletRequest httpServletRequest, @NotNull HttpServletResponse httpServletResponse, @NotNull FilterChain filterChain) {
|
||||
protected void doFilterInternal(@NotNull HttpServletRequest httpServletRequest, @NotNull HttpServletResponse httpServletResponse, @NotNull FilterChain filterChain) throws ServletException, IOException {
|
||||
log.info("url = {}", httpServletRequest.getRequestURI());
|
||||
try {
|
||||
|
||||
|
||||
// 微信公众号的请求,必须存在tenantkey,否则抛出异常
|
||||
if (httpServletRequest.getServletPath().startsWith("/wx/")) {
|
||||
String tenantKey = httpServletRequest.getHeader("tenantkey");
|
||||
@@ -75,21 +83,24 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
|
||||
resolver.resolveException(httpServletRequest, httpServletResponse, null, new CustomException("tenantkey不能为空"));
|
||||
return;
|
||||
}
|
||||
Map<String, String> notLoginUrls = new HashMap<>();
|
||||
notLoginUrls.put("/wx/common/area/tree", "1");
|
||||
notLoginUrls.put("/wx/common/file/upload", "1");
|
||||
notLoginUrls.put("/wx/common/audio/upload", "1");
|
||||
notLoginUrls.put("/wx/oauth2/getConfigAddress", "1");
|
||||
notLoginUrls.put("/clerk/level/queryAll", "1");
|
||||
notLoginUrls.put("/wx/clerk/class/queryAll", "1");
|
||||
notLoginUrls.put("/wx/clerk/user/queryByPage", "1");
|
||||
notLoginUrls.put("/wx/clerk/user/queryGiftById", "1");
|
||||
notLoginUrls.put("/wx/clerk/user/queryPriceById", "1");
|
||||
notLoginUrls.put("/wx/clerk/user/queryTrendsById", "1");
|
||||
notLoginUrls.put("/wx/clerk/user/queryEvaluateById", "1");
|
||||
if (notLoginUrls.containsKey(httpServletRequest.getServletPath())) {
|
||||
String tenantId = getTenantId(null, null, tenantKey);
|
||||
if (noLoginPathRequired.contains(httpServletRequest.getServletPath())) {
|
||||
//非必须登录的请求,验证租户信息是否正常
|
||||
String tenantId;
|
||||
try {
|
||||
tenantId = getTenantId(null, null, tenantKey);
|
||||
} catch (Exception e) {
|
||||
httpServletResponse.setCharacterEncoding("UTF-8");
|
||||
httpServletResponse.setContentType("application/json");
|
||||
httpServletResponse.getWriter().println(JSONUtil.parse(R.error(ResultCodeEnum.UNAUTHORIZED.getCode(), ResultCodeEnum.UNAUTHORIZED.getMessage())));
|
||||
httpServletResponse.getWriter().flush();
|
||||
return;
|
||||
//返回401‘
|
||||
//
|
||||
// return;
|
||||
// throw new RuntimeException("token验证失败,需要重新登录");
|
||||
}
|
||||
if (!checkTenantId(tenantId)) {
|
||||
//返回500
|
||||
resolver.resolveException(httpServletRequest, httpServletResponse, null, new CustomException("租户信息异常"));
|
||||
return;
|
||||
}
|
||||
@@ -97,8 +108,20 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
|
||||
} else {
|
||||
String clerkToken = httpServletRequest.getHeader(Constants.CLERK_USER_LOGIN_TOKEN);
|
||||
String customToken = httpServletRequest.getHeader(Constants.CUSTOM_USER_LOGIN_TOKEN);
|
||||
String tenantId = getTenantId(clerkToken, customToken, tenantKey);
|
||||
String tenantId;
|
||||
try {
|
||||
tenantId = getTenantId(clerkToken, customToken, tenantKey);
|
||||
} catch (Exception e) {
|
||||
httpServletResponse.setCharacterEncoding("UTF-8");
|
||||
httpServletResponse.setContentType("application/json");
|
||||
httpServletResponse.getWriter().println(JSONUtil.parse(R.error(ResultCodeEnum.UNAUTHORIZED.getCode(), ResultCodeEnum.UNAUTHORIZED.getMessage())));
|
||||
httpServletResponse.getWriter().flush();
|
||||
//返回401
|
||||
return;
|
||||
// throw new CustomException("token验证失败,需要重新登录");
|
||||
}
|
||||
if (!checkTenantId(tenantId)) {
|
||||
//返回500
|
||||
resolver.resolveException(httpServletRequest, httpServletResponse, null, new CustomException("租户信息异常"));
|
||||
return;
|
||||
}
|
||||
@@ -115,26 +138,21 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
|
||||
}
|
||||
}
|
||||
filterChain.doFilter(httpServletRequest, httpServletResponse);
|
||||
} catch (Exception e) {
|
||||
log.error("系统异常", e);
|
||||
resolver.resolveException(httpServletRequest, httpServletResponse, null, new CustomException("租户及授权验证失败"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 微信公众号端访问时,获取当前用户租户ID
|
||||
* 如果用户(陪玩或客户)已登录,从token中获取租户ID
|
||||
* 如果用户(陪聊或客户)已登录,从token中获取租户ID
|
||||
* 如果用户未登录,从tenantKey中获取租户ID
|
||||
*
|
||||
* @param clerkToken 陪玩登录Key
|
||||
* @param clerkToken 陪聊登录Key
|
||||
* @param customToken 客户登录key
|
||||
* @param tenantKey 租户标识
|
||||
*/
|
||||
public String getTenantId(String clerkToken, String customToken, String tenantKey) {
|
||||
String tenantId = "";
|
||||
try {
|
||||
//如果用户(陪玩或客户)已登录,从token中获取租户ID
|
||||
//如果用户(陪聊或客户)已登录,从token中获取租户ID
|
||||
if (StrUtil.isNotBlank(clerkToken) || StrUtil.isNotBlank(customToken)) {
|
||||
String userId = tokenService.getWxUserIdByToken(StrUtil.isNotBlank(clerkToken) ? clerkToken : customToken);
|
||||
String redisKey = "TENANT_INFO:" + userId;
|
||||
@@ -142,26 +160,25 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
|
||||
if (clerkToken != null) {
|
||||
PlayClerkUserInfoEntity entity = clerkUserInfoService.selectById(userId);
|
||||
if (entity == null) {
|
||||
log.error("当前登录陪玩不存在,clerkToken={},tenantKey={}", clerkToken, tenantKey);
|
||||
log.error("当前登录陪聊不存在,clerkToken={},tenantKey={}", clerkToken, tenantKey);
|
||||
throw new CustomException("用户不存在");
|
||||
}
|
||||
tenantId = entity != null ? entity.getTenantId() : "";
|
||||
return entity.getTenantId();
|
||||
} else {
|
||||
PlayCustomUserInfoEntity entity = customUserInfoService.selectById(userId);
|
||||
if (entity == null) {
|
||||
log.error("当前登录顾客不存在,customToken={},tenantKey={}", customToken, tenantKey);
|
||||
throw new CustomException("用户不存在");
|
||||
}
|
||||
tenantId = entity != null ? entity.getTenantId() : "";
|
||||
return entity.getTenantId();
|
||||
}
|
||||
} else {
|
||||
// 如果用户未登录,从tenantKey中获取租户ID,然后验证租户ID是否存在,以及租户是否过期等
|
||||
SysTenantEntity entity = sysTenantService.selectByTenantKey(tenantKey);
|
||||
if (entity != null) {
|
||||
tenantId = entity.getTenantId();
|
||||
return entity.getTenantId();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("获取tenantKey异常,clerkToken={},customToken={},tenantKey = {}", clerkToken, customToken, tenantKey, e);
|
||||
}
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 陪玩点赞动态信息Controller
|
||||
* 陪聊点赞动态信息Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-04
|
||||
@@ -24,7 +24,7 @@ public class PlayCustomArticleInfoController {
|
||||
private IPlayCustomArticleInfoService playCustomArticleInfoService;
|
||||
|
||||
/**
|
||||
* 查询陪玩点赞动态信息列表
|
||||
* 查询陪聊点赞动态信息列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:list')")
|
||||
@GetMapping("/list")
|
||||
@@ -34,7 +34,7 @@ public class PlayCustomArticleInfoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取陪玩点赞动态信息详细信息
|
||||
* 获取陪聊点赞动态信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@@ -43,10 +43,10 @@ public class PlayCustomArticleInfoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增陪玩点赞动态信息
|
||||
* 新增陪聊点赞动态信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:create')")
|
||||
@Log(title = "陪玩点赞动态信息", businessType = BusinessType.INSERT)
|
||||
@Log(title = "陪聊点赞动态信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayCustomArticleInfoEntity playCustomArticleInfo) {
|
||||
boolean success = playCustomArticleInfoService.create(playCustomArticleInfo);
|
||||
@@ -57,10 +57,10 @@ public class PlayCustomArticleInfoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改陪玩点赞动态信息
|
||||
* 修改陪聊点赞动态信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:edit')")
|
||||
@Log(title = "陪玩点赞动态信息", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "陪聊点赞动态信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayCustomArticleInfoEntity playCustomArticleInfo) {
|
||||
playCustomArticleInfo.setId(id);
|
||||
@@ -72,10 +72,10 @@ public class PlayCustomArticleInfoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除陪玩点赞动态信息
|
||||
* 删除陪聊点赞动态信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:remove')")
|
||||
@Log(title = "陪玩点赞动态信息", businessType = BusinessType.DELETE)
|
||||
@Log(title = "陪聊点赞动态信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playCustomArticleInfoService.deletePlayCustomArticleInfoByIds(ids));
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.starry.admin.modules.article.module.entity.PlayCustomArticleInfoEntity;
|
||||
|
||||
/**
|
||||
* 陪玩点赞动态信息Mapper接口
|
||||
* 陪聊点赞动态信息Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-04
|
||||
|
||||
@@ -30,7 +30,7 @@ public class PlayClerkArticleInfoEntity extends BaseEntity<PlayClerkArticleInfoE
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 陪玩用户ID
|
||||
* 陪聊用户ID
|
||||
*/
|
||||
private String playUserId;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 陪玩点赞动态信息对象 play_custom_article_info
|
||||
* 陪聊点赞动态信息对象 play_custom_article_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-04
|
||||
@@ -37,12 +37,12 @@ public class PlayCustomArticleInfoEntity extends BaseEntity<PlayCustomArticleInf
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkUserId;
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 顾客ID
|
||||
*/
|
||||
private String customUserId;
|
||||
private String customId;
|
||||
|
||||
/**
|
||||
* 点赞时间
|
||||
|
||||
@@ -17,17 +17,17 @@ public class PlayClerkArticleReturnVo {
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 陪玩用户ID
|
||||
* 陪聊用户ID
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 陪玩用户昵称
|
||||
* 陪聊用户昵称
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 陪玩用户头像
|
||||
* 陪聊用户头像
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
|
||||
@@ -5,56 +5,56 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.starry.admin.modules.article.module.entity.PlayCustomArticleInfoEntity;
|
||||
|
||||
/**
|
||||
* 陪玩点赞动态信息Service接口
|
||||
* 陪聊点赞动态信息Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-04
|
||||
*/
|
||||
public interface IPlayCustomArticleInfoService extends IService<PlayCustomArticleInfoEntity> {
|
||||
/**
|
||||
* 查询陪玩点赞动态信息
|
||||
* 查询陪聊点赞动态信息
|
||||
*
|
||||
* @param id 陪玩点赞动态信息主键
|
||||
* @return 陪玩点赞动态信息
|
||||
* @param id 陪聊点赞动态信息主键
|
||||
* @return 陪聊点赞动态信息
|
||||
*/
|
||||
PlayCustomArticleInfoEntity selectPlayCustomArticleInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询陪玩点赞动态信息列表
|
||||
* 查询陪聊点赞动态信息列表
|
||||
*
|
||||
* @param playCustomArticleInfo 陪玩点赞动态信息
|
||||
* @return 陪玩点赞动态信息集合
|
||||
* @param playCustomArticleInfo 陪聊点赞动态信息
|
||||
* @return 陪聊点赞动态信息集合
|
||||
*/
|
||||
IPage<PlayCustomArticleInfoEntity> selectPlayCustomArticleInfoByPage(PlayCustomArticleInfoEntity playCustomArticleInfo);
|
||||
|
||||
/**
|
||||
* 新增陪玩点赞动态信息
|
||||
* 新增陪聊点赞动态信息
|
||||
*
|
||||
* @param playCustomArticleInfo 陪玩点赞动态信息
|
||||
* @param playCustomArticleInfo 陪聊点赞动态信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayCustomArticleInfoEntity playCustomArticleInfo);
|
||||
|
||||
/**
|
||||
* 修改陪玩点赞动态信息
|
||||
* 修改陪聊点赞动态信息
|
||||
*
|
||||
* @param playCustomArticleInfo 陪玩点赞动态信息
|
||||
* @param playCustomArticleInfo 陪聊点赞动态信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayCustomArticleInfoEntity playCustomArticleInfo);
|
||||
|
||||
/**
|
||||
* 批量删除陪玩点赞动态信息
|
||||
* 批量删除陪聊点赞动态信息
|
||||
*
|
||||
* @param ids 需要删除的陪玩点赞动态信息主键集合
|
||||
* @param ids 需要删除的陪聊点赞动态信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayCustomArticleInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除陪玩点赞动态信息信息
|
||||
* 删除陪聊点赞动态信息信息
|
||||
*
|
||||
* @param id 陪玩点赞动态信息主键
|
||||
* @param id 陪聊点赞动态信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayCustomArticleInfoById(String id);
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.starry.admin.modules.article.module.entity.PlayClerkArticleInfoEntity
|
||||
import com.starry.admin.modules.article.module.vo.PlayClerkArticleQueryVo;
|
||||
import com.starry.admin.modules.article.module.vo.PlayClerkArticleReturnVo;
|
||||
import com.starry.admin.modules.article.service.IPlayClerkArticleInfoService;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -50,9 +50,9 @@ public class PlayClerkArticleInfoServiceImpl extends ServiceImpl<PlayClerkArticl
|
||||
MPJLambdaWrapper<PlayClerkArticleInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<PlayClerkArticleInfoEntity>()
|
||||
//查询主表全部字段
|
||||
.selectAll(PlayClerkArticleInfoEntity.class)
|
||||
//陪玩用户表全部字段
|
||||
//陪聊用户表全部字段
|
||||
.selectAll(PlayClerkUserInfoEntity.class)
|
||||
//陪玩用户表
|
||||
//陪聊用户表
|
||||
.leftJoin(PlayClerkUserInfoEntity.class, PlayClerkUserInfoEntity::getId, PlayClerkArticleInfoEntity::getPlayUserId);
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayClerkArticleReturnVo.class, lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.Arrays;
|
||||
|
||||
|
||||
/**
|
||||
* 陪玩点赞动态信息Service业务层处理
|
||||
* 陪聊点赞动态信息Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-04
|
||||
@@ -27,10 +27,10 @@ public class PlayCustomArticleInfoServiceImpl extends ServiceImpl<PlayCustomArti
|
||||
private PlayCustomArticleInfoMapper playCustomArticleInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询陪玩点赞动态信息
|
||||
* 查询陪聊点赞动态信息
|
||||
*
|
||||
* @param id 陪玩点赞动态信息主键
|
||||
* @return 陪玩点赞动态信息
|
||||
* @param id 陪聊点赞动态信息主键
|
||||
* @return 陪聊点赞动态信息
|
||||
*/
|
||||
@Override
|
||||
public PlayCustomArticleInfoEntity selectPlayCustomArticleInfoById(String id) {
|
||||
@@ -38,10 +38,10 @@ public class PlayCustomArticleInfoServiceImpl extends ServiceImpl<PlayCustomArti
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询陪玩点赞动态信息列表
|
||||
* 查询陪聊点赞动态信息列表
|
||||
*
|
||||
* @param playCustomArticleInfo 陪玩点赞动态信息
|
||||
* @return 陪玩点赞动态信息
|
||||
* @param playCustomArticleInfo 陪聊点赞动态信息
|
||||
* @return 陪聊点赞动态信息
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayCustomArticleInfoEntity> selectPlayCustomArticleInfoByPage(PlayCustomArticleInfoEntity playCustomArticleInfo) {
|
||||
@@ -50,9 +50,9 @@ public class PlayCustomArticleInfoServiceImpl extends ServiceImpl<PlayCustomArti
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增陪玩点赞动态信息
|
||||
* 新增陪聊点赞动态信息
|
||||
*
|
||||
* @param playCustomArticleInfo 陪玩点赞动态信息
|
||||
* @param playCustomArticleInfo 陪聊点赞动态信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -64,9 +64,9 @@ public class PlayCustomArticleInfoServiceImpl extends ServiceImpl<PlayCustomArti
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改陪玩点赞动态信息
|
||||
* 修改陪聊点赞动态信息
|
||||
*
|
||||
* @param playCustomArticleInfo 陪玩点赞动态信息
|
||||
* @param playCustomArticleInfo 陪聊点赞动态信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -75,9 +75,9 @@ public class PlayCustomArticleInfoServiceImpl extends ServiceImpl<PlayCustomArti
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除陪玩点赞动态信息
|
||||
* 批量删除陪聊点赞动态信息
|
||||
*
|
||||
* @param ids 需要删除的陪玩点赞动态信息主键
|
||||
* @param ids 需要删除的陪聊点赞动态信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -86,9 +86,9 @@ public class PlayCustomArticleInfoServiceImpl extends ServiceImpl<PlayCustomArti
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除陪玩点赞动态信息信息
|
||||
* 删除陪聊点赞动态信息信息
|
||||
*
|
||||
* @param id 陪玩点赞动态信息主键
|
||||
* @param id 陪聊点赞动态信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -36,7 +36,7 @@ public class PlayBalanceDetailsInfoEntity extends BaseEntity<PlayBalanceDetailsI
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 用户类型[0:陪玩;1:顾客]
|
||||
* 用户类型[0:陪聊;1:顾客]
|
||||
*/
|
||||
private String userType;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public interface IPlayBalanceDetailsInfoService extends IService<PlayBalanceDeta
|
||||
/**
|
||||
* 新增余额明细信息
|
||||
*
|
||||
* @param userType 用户类型[0:陪玩;1:顾客]
|
||||
* @param userType 用户类型[0:陪聊;1:顾客]
|
||||
* @param userId 用户ID
|
||||
* @param balanceBeforeOperation 操作前余额
|
||||
* @param balanceAfterOperation 操作后余额
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.starry.admin.modules.clear.controller;
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkClassificationInfoEntity;
|
||||
import com.starry.admin.modules.clear.service.IPlayClerkClassificationInfoService;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkClassificationInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkClassificationInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.starry.admin.modules.clear.controller;
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkCommodityEntity;
|
||||
import com.starry.admin.modules.clear.module.vo.PlayClerkCommodityQueryVo;
|
||||
import com.starry.admin.modules.clear.service.IPlayClerkCommodityService;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkCommodityEntity;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkCommodityQueryVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkCommodityService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
@@ -14,7 +14,7 @@ import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 陪玩服务项目Controller
|
||||
* 陪聊服务项目Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-31
|
||||
@@ -26,7 +26,7 @@ public class PlayClerkCommodityController {
|
||||
private IPlayClerkCommodityService playClerkCommodityService;
|
||||
|
||||
/**
|
||||
* 查询陪玩服务项目列表
|
||||
* 查询陪聊服务项目列表
|
||||
*/
|
||||
@GetMapping("/listAllCommodity")
|
||||
public R listAllCommodity() {
|
||||
@@ -36,7 +36,7 @@ public class PlayClerkCommodityController {
|
||||
|
||||
|
||||
/**
|
||||
* 查询陪玩服务项目列表
|
||||
* 查询陪聊服务项目列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public R list(PlayClerkCommodityEntity playClerkCommodity) {
|
||||
@@ -45,7 +45,7 @@ public class PlayClerkCommodityController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取陪玩服务项目详细信息
|
||||
* 获取陪聊服务项目详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
@@ -53,9 +53,9 @@ public class PlayClerkCommodityController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增陪玩服务项目
|
||||
* 新增陪聊服务项目
|
||||
*/
|
||||
@Log(title = "陪玩服务项目", businessType = BusinessType.INSERT)
|
||||
@Log(title = "陪聊服务项目", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayClerkCommodityEntity playClerkCommodity) {
|
||||
boolean success = playClerkCommodityService.create(playClerkCommodity);
|
||||
@@ -67,9 +67,9 @@ public class PlayClerkCommodityController {
|
||||
|
||||
|
||||
/**
|
||||
* 修改陪玩服务项目
|
||||
* 修改陪聊服务项目
|
||||
*/
|
||||
@Log(title = "陪玩服务项目", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "陪聊服务项目", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayClerkCommodityEntity playClerkCommodity) {
|
||||
playClerkCommodity.setId(id);
|
||||
@@ -81,9 +81,9 @@ public class PlayClerkCommodityController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除陪玩服务项目
|
||||
* 删除陪聊服务项目
|
||||
*/
|
||||
@Log(title = "陪玩服务项目", businessType = BusinessType.DELETE)
|
||||
@Log(title = "陪聊服务项目", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playClerkCommodityService.deletePlayClerkCommodityByIds(ids));
|
||||
@@ -1,14 +1,14 @@
|
||||
package com.starry.admin.modules.clear.controller;
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkDataReviewInfoEditVo;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkDataReviewInfoEntity;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkDataReviewInfoQueryVo;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clear.service.IPlayClerkCommodityService;
|
||||
import com.starry.admin.modules.clear.service.IPlayClerkDataReviewInfoService;
|
||||
import com.starry.admin.modules.clear.service.impl.PlayClerkUserInfoServiceImpl;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoEditVo;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkCommodityService;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkDataReviewInfoService;
|
||||
import com.starry.admin.modules.clerk.service.impl.PlayClerkUserInfoServiceImpl;
|
||||
import com.starry.admin.modules.weichat.entity.PlayClerkUserAlbumVo;
|
||||
import com.starry.admin.modules.weichat.entity.PlayClerkUserAudioVo;
|
||||
import com.starry.admin.modules.weichat.entity.PlayClerkUserAvatarVo;
|
||||
@@ -73,15 +73,15 @@ public class PlayClerkDataReviewInfoController {
|
||||
boolean success = playClerkDataReviewInfoService.update(entity);
|
||||
if (success) {
|
||||
entity = playClerkDataReviewInfoService.selectPlayClerkDataReviewInfoById(entity.getId());
|
||||
if (entity != null && entity.getState().equals("1")) {
|
||||
if (entity != null && "1".equals(entity.getState())) {
|
||||
switch (entity.getDataType()) {
|
||||
case "0": {
|
||||
//陪玩申请审批通过,初始化陪玩信息
|
||||
//陪聊申请审批通过,初始化陪聊信息
|
||||
PlayClerkUserInfoEntity item = JSONObject.parseObject(entity.getContent(), PlayClerkUserInfoEntity.class);
|
||||
item.setId(entity.getPlayUserId());
|
||||
item.setClerkState("1");
|
||||
playClerkUserInfoService.update(item);
|
||||
//初始化陪玩服务项目
|
||||
//初始化陪聊服务项目
|
||||
playClerkCommodityService.initClerkCommodity(entity.getPlayUserId());
|
||||
break;
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.starry.admin.modules.clear.controller;
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkLevelInfoEntity;
|
||||
import com.starry.admin.modules.clear.module.vo.PlayClerkLevelAddVo;
|
||||
import com.starry.admin.modules.clear.module.vo.PlayClerkLevelEditVo;
|
||||
import com.starry.admin.modules.clear.service.IPlayClerkLevelInfoService;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkLevelInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkLevelAddVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkLevelEditVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkLevelInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
@@ -1,15 +1,16 @@
|
||||
package com.starry.admin.modules.clear.controller;
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkLevelInfoEntity;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkUserInfoQueryVo;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkUserListResultVo;
|
||||
import com.starry.admin.modules.clear.module.vo.*;
|
||||
import com.starry.admin.modules.clear.service.IPlayClerkCommodityService;
|
||||
import com.starry.admin.modules.clear.service.IPlayClerkLevelInfoService;
|
||||
import com.starry.admin.modules.clear.service.IPlayClerkUserInfoService;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserListResultVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUserAddToWxVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUserAddVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUserEditVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUserStateEditVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkCommodityService;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkUserInfoService;
|
||||
import com.starry.admin.modules.play.module.entity.PlayUserInfoEntity;
|
||||
import com.starry.admin.modules.play.service.IPlayUserInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
@@ -39,17 +40,6 @@ public class PlayClerkUserInfoController {
|
||||
@Resource
|
||||
private IPlayClerkCommodityService clerkCommodityService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IPlayClerkLevelInfoService clerkLevelInfoService;
|
||||
|
||||
@GetMapping("/queryLevel")
|
||||
public R queryLevel() {
|
||||
PlayClerkLevelInfoEntity entity = clerkLevelInfoService.selectPlayClerkLevelInfoById(playClerkUserInfoService.queryByUserId().getId());
|
||||
return R.ok(ConvertUtil.entityToVo(entity, PlayClerkLevelQueryReturnVo.class));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员列表
|
||||
*/
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.starry.admin.modules.clear.mapper;
|
||||
package com.starry.admin.modules.clerk.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkClassificationInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkClassificationInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员分类Mapper接口
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.starry.admin.modules.clear.mapper;
|
||||
package com.starry.admin.modules.clerk.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkCommodityEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkCommodityEntity;
|
||||
|
||||
/**
|
||||
* 陪玩服务项目Mapper接口
|
||||
* 陪聊服务项目Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-31
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.starry.admin.modules.clear.mapper;
|
||||
package com.starry.admin.modules.clerk.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkDataReviewInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员资料审核Mapper接口
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.starry.admin.modules.clear.mapper;
|
||||
package com.starry.admin.modules.clerk.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkLevelInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkLevelInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员等级Mapper接口
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.starry.admin.modules.clear.mapper;
|
||||
package com.starry.admin.modules.clerk.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
|
||||
|
||||
/**
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clear.module.entity;
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clear.module.entity;
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
@@ -8,7 +8,7 @@ import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 陪玩服务项目对象 play_clerk_commodity
|
||||
* 陪聊服务项目对象 play_clerk_commodity
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-31
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clear.module.entity;
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clear.module.entity;
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
@@ -37,12 +37,12 @@ public class PlayClerkDataReviewInfoEntity extends BaseEntity<PlayClerkDataRevie
|
||||
/**
|
||||
* 店员头像
|
||||
*/
|
||||
private String clarkAvatar;
|
||||
private String clerkAvatar;
|
||||
|
||||
/**
|
||||
* 店员名称
|
||||
*/
|
||||
private String clarkNickname;
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 资料类型[0:店员申请,1:头像;2:相册;3:录音]
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clear.module.entity;
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
@@ -1,12 +1,10 @@
|
||||
package com.starry.admin.modules.clear.module.entity;
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 店员等级对象 play_clerk_level_info
|
||||
*
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.starry.admin.modules.clear.module.entity;
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkUserDetailResultVo {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clear.module.entity;
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -6,9 +6,11 @@ import java.util.Date;
|
||||
|
||||
/**
|
||||
* 店员评价信息
|
||||
*
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClarkUserEvaluateInfoEntity {
|
||||
public class PlayClerkUserEvaluateInfoEntity {
|
||||
|
||||
private String id;
|
||||
|
||||
@@ -48,7 +50,7 @@ public class PlayClarkUserEvaluateInfoEntity {
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String clarkUsername;
|
||||
private String clerkUsername;
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
@@ -71,7 +73,7 @@ public class PlayClarkUserEvaluateInfoEntity {
|
||||
public Integer likeCount;
|
||||
|
||||
|
||||
public PlayClarkUserEvaluateInfoEntity(String id, String evaluatorId, String evaluatorUsername, String evaluatorAvatar, String con, Date evaluateTime, String orderId, String clarkUsername, String commodityId, String commodityName, String commodityUnit) {
|
||||
public PlayClerkUserEvaluateInfoEntity(String id, String evaluatorId, String evaluatorUsername, String evaluatorAvatar, String con, Date evaluateTime, String orderId, String clerkUsername, String commodityId, String commodityName, String commodityUnit) {
|
||||
this.id = id;
|
||||
this.evaluatorId = evaluatorId;
|
||||
this.evaluatorUsername = evaluatorUsername;
|
||||
@@ -79,13 +81,13 @@ public class PlayClarkUserEvaluateInfoEntity {
|
||||
this.con = con;
|
||||
this.evaluateTime = evaluateTime;
|
||||
this.orderId = orderId;
|
||||
this.clarkUsername = clarkUsername;
|
||||
this.clerkUsername = clerkUsername;
|
||||
this.commodityId = commodityId;
|
||||
this.commodityName = commodityName;
|
||||
this.commodityUnit = commodityUnit;
|
||||
}
|
||||
|
||||
public PlayClarkUserEvaluateInfoEntity(String id, String evaluatorId, String evaluatorUsername, String evaluatorAvatar, String con, Date evaluateTime, String orderId, String clarkUsername, String commodityId, String commodityName, String commodityUnit, int likeCount) {
|
||||
public PlayClerkUserEvaluateInfoEntity(String id, String evaluatorId, String evaluatorUsername, String evaluatorAvatar, String con, Date evaluateTime, String orderId, String clerkUsername, String commodityId, String commodityName, String commodityUnit, int likeCount) {
|
||||
this.id = id;
|
||||
this.evaluatorId = evaluatorId;
|
||||
this.evaluatorUsername = evaluatorUsername;
|
||||
@@ -93,7 +95,7 @@ public class PlayClarkUserEvaluateInfoEntity {
|
||||
this.con = con;
|
||||
this.evaluateTime = evaluateTime;
|
||||
this.orderId = orderId;
|
||||
this.clarkUsername = clarkUsername;
|
||||
this.clerkUsername = clerkUsername;
|
||||
this.commodityId = commodityId;
|
||||
this.commodityName = commodityName;
|
||||
this.commodityUnit = commodityUnit;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clear.module.entity;
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -9,7 +9,6 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -45,7 +44,7 @@ public class PlayClerkUserInfoEntity extends BaseEntity<PlayClerkUserInfoEntity>
|
||||
private String weiChatCode;
|
||||
|
||||
/**
|
||||
* 陪玩用户ID
|
||||
* 陪聊用户ID
|
||||
*/
|
||||
private String playUserId;
|
||||
|
||||
@@ -99,7 +98,7 @@ public class PlayClerkUserInfoEntity extends BaseEntity<PlayClerkUserInfoEntity>
|
||||
* 标签
|
||||
*/
|
||||
@TableField(typeHandler = StringTypeHandler.class)
|
||||
private List<String> label = new ArrayList<>();
|
||||
private List<String> label;
|
||||
|
||||
/**
|
||||
* 个性签名
|
||||
@@ -182,14 +181,14 @@ public class PlayClerkUserInfoEntity extends BaseEntity<PlayClerkUserInfoEntity>
|
||||
private String randomOrderState;
|
||||
|
||||
/**
|
||||
* 店员状态(0:不是陪玩,1:陪玩,2:资料审核中)
|
||||
* 店员状态(0:不是陪聊,1:陪聊,2:资料审核中)
|
||||
*/
|
||||
private String clerkState;
|
||||
/**
|
||||
* 相册
|
||||
*/
|
||||
@TableField(typeHandler = StringTypeHandler.class)
|
||||
private List<String> album = new ArrayList<>();
|
||||
private List<String> album;
|
||||
/**
|
||||
* 微信二维码
|
||||
**/
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clear.module.entity;
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
@@ -50,7 +50,7 @@ public class PlayClerkUserInfoQueryVo extends BasePageEntity {
|
||||
private String recommendationState;
|
||||
|
||||
/**
|
||||
* 员工状态【1:是陪玩,0:不是陪玩】
|
||||
* 员工状态【1:是陪聊,0:不是陪聊】
|
||||
*/
|
||||
private String clerkState = "1";
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
package com.starry.admin.modules.clear.module.entity;
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkUserListResultVo {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clear.module.entity;
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -6,9 +6,11 @@ import java.util.Date;
|
||||
|
||||
/**
|
||||
* 店员动态
|
||||
*
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClarkUserTrendsInfoEntity {
|
||||
public class PlayClerkUserTrendsInfoEntity {
|
||||
|
||||
private String id;
|
||||
|
||||
@@ -26,7 +28,7 @@ public class PlayClarkUserTrendsInfoEntity {
|
||||
|
||||
private Date releaseTime;
|
||||
|
||||
public PlayClarkUserTrendsInfoEntity(String id, String title, String con, Date releaseTime) {
|
||||
public PlayClerkUserTrendsInfoEntity(String id, String title, String con, Date releaseTime) {
|
||||
this.id = id;
|
||||
this.title = title;
|
||||
this.con = con;
|
||||
@@ -34,7 +36,7 @@ public class PlayClarkUserTrendsInfoEntity {
|
||||
this.type = "1";
|
||||
}
|
||||
|
||||
public PlayClarkUserTrendsInfoEntity(String id, String title, String type, String con, Date releaseTime) {
|
||||
public PlayClerkUserTrendsInfoEntity(String id, String title, String type, String con, Date releaseTime) {
|
||||
this.id = id;
|
||||
this.title = title;
|
||||
this.type = type;
|
||||
@@ -1,10 +1,11 @@
|
||||
package com.starry.admin.modules.clear.module.entity;
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 礼物信息
|
||||
* @author admin
|
||||
*/
|
||||
|
||||
@Data
|
||||
@@ -1,10 +1,13 @@
|
||||
package com.starry.admin.modules.clear.module.vo;
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkCommodityEditVo {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.starry.admin.modules.clear.module.vo;
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkCommodityQueryVo {
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.starry.admin.modules.clear.module.vo;
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkLevelAddVo {
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.starry.admin.modules.clear.module.vo;
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkLevelEditVo {
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
package com.starry.admin.modules.clear.module.vo;
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 店员等级查询接口
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkLevelQueryReturnVo {
|
||||
|
||||
/**
|
||||
* 登记名称
|
||||
* 等级名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clear.module.vo;
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -6,6 +6,9 @@ import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkUserAddToWxVo {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clear.module.vo;
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -6,6 +6,9 @@ import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkUserAddVo {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clear.module.vo;
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -6,6 +6,9 @@ import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkUserEditVo {
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
package com.starry.admin.modules.clear.module.vo;
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkUserStateEditVo {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.starry.admin.modules.clear.service;
|
||||
package com.starry.admin.modules.clerk.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkClassificationInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkClassificationInfoEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package com.starry.admin.modules.clear.service;
|
||||
package com.starry.admin.modules.clerk.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkCommodityEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkCommodityEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 陪玩服务项目Service接口
|
||||
* 陪聊服务项目Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-31
|
||||
@@ -16,7 +16,7 @@ public interface IPlayClerkCommodityService extends IService<PlayClerkCommodityE
|
||||
|
||||
|
||||
/**
|
||||
* 初始化当前陪玩服务项目
|
||||
* 初始化当前陪聊服务项目
|
||||
*
|
||||
* @param playUserId 账号ID
|
||||
*/
|
||||
@@ -48,65 +48,67 @@ public interface IPlayClerkCommodityService extends IService<PlayClerkCommodityE
|
||||
List<PlayClerkCommodityEntity> selectByUser(String playUserId);
|
||||
|
||||
/**
|
||||
* 查询当前陪玩所有服务项目
|
||||
* 查询当前陪聊所有服务项目
|
||||
*
|
||||
* @return List<PlayClerkCommodityEntity>
|
||||
*/
|
||||
List<PlayClerkCommodityEntity> selectAll();
|
||||
|
||||
|
||||
/**
|
||||
* 启停当前陪玩服务项目
|
||||
* 启停当前陪聊服务项目
|
||||
*
|
||||
* @param type 项目名称
|
||||
* @param enablingState 启停状态
|
||||
* @param clerkUserId 陪玩ID
|
||||
* @param clerkUserId 陪聊ID
|
||||
*/
|
||||
void startStopClerkItem(String type, String enablingState, String clerkUserId);
|
||||
|
||||
|
||||
/**
|
||||
* 查询陪玩服务项目
|
||||
* 查询陪聊服务项目
|
||||
*
|
||||
* @param id 陪玩服务项目主键
|
||||
* @return 陪玩服务项目
|
||||
* @param id 陪聊服务项目主键
|
||||
* @return 陪聊服务项目
|
||||
*/
|
||||
PlayClerkCommodityEntity selectPlayClerkCommodityById(String id);
|
||||
|
||||
/**
|
||||
* 查询陪玩服务项目列表
|
||||
* 查询陪聊服务项目列表
|
||||
*
|
||||
* @param playClerkCommodity 陪玩服务项目
|
||||
* @return 陪玩服务项目集合
|
||||
* @param playClerkCommodity 陪聊服务项目
|
||||
* @return 陪聊服务项目集合
|
||||
*/
|
||||
IPage<PlayClerkCommodityEntity> selectPlayClerkCommodityByPage(PlayClerkCommodityEntity playClerkCommodity);
|
||||
|
||||
/**
|
||||
* 新增陪玩服务项目
|
||||
* 新增陪聊服务项目
|
||||
*
|
||||
* @param playClerkCommodity 陪玩服务项目
|
||||
* @param playClerkCommodity 陪聊服务项目
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkCommodityEntity playClerkCommodity);
|
||||
|
||||
/**
|
||||
* 修改陪玩服务项目
|
||||
* 修改陪聊服务项目
|
||||
*
|
||||
* @param playClerkCommodity 陪玩服务项目
|
||||
* @param playClerkCommodity 陪聊服务项目
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayClerkCommodityEntity playClerkCommodity);
|
||||
|
||||
/**
|
||||
* 批量删除陪玩服务项目
|
||||
* 批量删除陪聊服务项目
|
||||
*
|
||||
* @param ids 需要删除的陪玩服务项目主键集合
|
||||
* @param ids 需要删除的陪聊服务项目主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkCommodityByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除陪玩服务项目信息
|
||||
* 删除陪聊服务项目信息
|
||||
*
|
||||
* @param id 陪玩服务项目主键
|
||||
* @param id 陪聊服务项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkCommodityById(String id);
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.starry.admin.modules.clear.service;
|
||||
package com.starry.admin.modules.clerk.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkDataReviewInfoEntity;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkDataReviewInfoQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoQueryVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.starry.admin.modules.clear.service;
|
||||
package com.starry.admin.modules.clerk.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkLevelInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkLevelInfoEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -16,7 +16,7 @@ public interface IPlayClerkLevelInfoService extends IService<PlayClerkLevelInfoE
|
||||
|
||||
|
||||
/**
|
||||
* 获取新增陪玩时,默认最低等级ID
|
||||
* 获取新增陪聊时,默认最低等级ID
|
||||
* @return PlayClerkLevelInfoEntity
|
||||
*/
|
||||
PlayClerkLevelInfoEntity getDefaultLevel();
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.starry.admin.modules.clear.service;
|
||||
package com.starry.admin.modules.clerk.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkUserInfoQueryVo;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkUserListResultVo;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserListResultVo;
|
||||
import com.starry.admin.modules.weichat.entity.PlayClerkUserLoginResponseVo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -21,9 +21,10 @@ public interface IPlayClerkUserInfoService extends IService<PlayClerkUserInfoEnt
|
||||
/**
|
||||
* 根据账户ID查询店员
|
||||
*
|
||||
* @param id 店员ID
|
||||
* @return 店员
|
||||
*/
|
||||
PlayClerkUserInfoEntity queryByUserId();
|
||||
PlayClerkUserInfoEntity queryByUserId(String id);
|
||||
|
||||
|
||||
/**
|
||||
@@ -43,7 +44,7 @@ public interface IPlayClerkUserInfoService extends IService<PlayClerkUserInfoEnt
|
||||
PlayClerkUserInfoEntity selectById(String id);
|
||||
|
||||
/**
|
||||
* 获得陪玩用户登录返回信息
|
||||
* 获得陪聊用户登录返回信息
|
||||
*
|
||||
* @param vo PlayClerkUserInfoEntity
|
||||
* @return PlayClerkUserLoginResponseVo
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clear.service.impl;
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -6,9 +6,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.starry.admin.modules.clear.mapper.PlayClerkClassificationInfoMapper;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkClassificationInfoEntity;
|
||||
import com.starry.admin.modules.clear.service.IPlayClerkClassificationInfoService;
|
||||
import com.starry.admin.modules.clerk.mapper.PlayClerkClassificationInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkClassificationInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkClassificationInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -58,7 +58,7 @@ public class PlayClerkClassificationInfoServiceImpl extends ServiceImpl<PlayCler
|
||||
@Override
|
||||
public IPage<PlayClerkClassificationInfoEntity> selectPlayClerkClassificationInfoByPage(PlayClerkClassificationInfoEntity playClerkClassificationInfo) {
|
||||
Page<PlayClerkClassificationInfoEntity> page = new Page<>(1, 10);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<PlayClerkClassificationInfoEntity>());
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<>());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clear.service.impl;
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -6,9 +6,10 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.starry.admin.modules.clear.mapper.PlayClerkCommodityMapper;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkCommodityEntity;
|
||||
import com.starry.admin.modules.clear.service.IPlayClerkCommodityService;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.clerk.mapper.PlayClerkCommodityMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkCommodityEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkCommodityService;
|
||||
import com.starry.admin.modules.play.module.entity.PlayCommodityInfoEntity;
|
||||
import com.starry.admin.modules.play.service.IPlayCommodityInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -19,7 +20,7 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 陪玩服务项目Service业务层处理
|
||||
* 陪聊服务项目Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-31
|
||||
@@ -36,11 +37,11 @@ public class PlayClerkCommodityServiceImpl extends ServiceImpl<PlayClerkCommodit
|
||||
|
||||
@Override
|
||||
public void initClerkCommodity(String userId) {
|
||||
//删除当前陪玩的所有服务项目
|
||||
// 删除当前陪聊的所有服务项目
|
||||
LambdaQueryWrapper<PlayClerkCommodityEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkCommodityEntity::getPlayUserId, userId);
|
||||
this.baseMapper.delete(lambdaQueryWrapper);
|
||||
//根据当前租户的服务项目,生成陪玩项目数据
|
||||
// 根据当前租户的服务项目,生成陪聊项目数据
|
||||
for (PlayCommodityInfoEntity commodityInfo : playCommodityInfoService.selectAll()) {
|
||||
PlayClerkCommodityEntity entity = new PlayClerkCommodityEntity();
|
||||
entity.setPlayUserId(userId);
|
||||
@@ -94,21 +95,25 @@ public class PlayClerkCommodityServiceImpl extends ServiceImpl<PlayClerkCommodit
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询陪玩服务项目
|
||||
* 查询陪聊服务项目
|
||||
*
|
||||
* @param id 陪玩服务项目主键
|
||||
* @return 陪玩服务项目
|
||||
* @param id 陪聊服务项目主键
|
||||
* @return 陪聊服务项目
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkCommodityEntity selectPlayClerkCommodityById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
PlayClerkCommodityEntity entity = this.baseMapper.selectById(id);
|
||||
if (entity == null) {
|
||||
throw new CustomException("服务项目不存在");
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询陪玩服务项目列表
|
||||
* 查询陪聊服务项目列表
|
||||
*
|
||||
* @param playClerkCommodity 陪玩服务项目
|
||||
* @return 陪玩服务项目
|
||||
* @param playClerkCommodity 陪聊服务项目
|
||||
* @return 陪聊服务项目
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayClerkCommodityEntity> selectPlayClerkCommodityByPage(PlayClerkCommodityEntity playClerkCommodity) {
|
||||
@@ -117,9 +122,9 @@ public class PlayClerkCommodityServiceImpl extends ServiceImpl<PlayClerkCommodit
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增陪玩服务项目
|
||||
* 新增陪聊服务项目
|
||||
*
|
||||
* @param playClerkCommodity 陪玩服务项目
|
||||
* @param playClerkCommodity 陪聊服务项目
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -131,9 +136,9 @@ public class PlayClerkCommodityServiceImpl extends ServiceImpl<PlayClerkCommodit
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改陪玩服务项目
|
||||
* 修改陪聊服务项目
|
||||
*
|
||||
* @param playClerkCommodity 陪玩服务项目
|
||||
* @param playClerkCommodity 陪聊服务项目
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -142,9 +147,9 @@ public class PlayClerkCommodityServiceImpl extends ServiceImpl<PlayClerkCommodit
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除陪玩服务项目
|
||||
* 批量删除陪聊服务项目
|
||||
*
|
||||
* @param ids 需要删除的陪玩服务项目主键
|
||||
* @param ids 需要删除的陪聊服务项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -153,9 +158,9 @@ public class PlayClerkCommodityServiceImpl extends ServiceImpl<PlayClerkCommodit
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除陪玩服务项目信息
|
||||
* 删除陪聊服务项目信息
|
||||
*
|
||||
* @param id 陪玩服务项目主键
|
||||
* @param id 陪聊服务项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clear.service.impl;
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -6,10 +6,10 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.starry.admin.modules.clear.mapper.PlayClerkDataReviewInfoMapper;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkDataReviewInfoEntity;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkDataReviewInfoQueryVo;
|
||||
import com.starry.admin.modules.clear.service.IPlayClerkDataReviewInfoService;
|
||||
import com.starry.admin.modules.clerk.mapper.PlayClerkDataReviewInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoQueryVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkDataReviewInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clear.service.impl;
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -8,9 +8,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.clear.mapper.PlayClerkLevelInfoMapper;
|
||||
import com.starry.admin.modules.clear.module.entity.PlayClerkLevelInfoEntity;
|
||||
import com.starry.admin.modules.clear.service.IPlayClerkLevelInfoService;
|
||||
import com.starry.admin.modules.clerk.mapper.PlayClerkLevelInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkLevelInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkLevelInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clear.service.impl;
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -7,11 +7,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.starry.admin.modules.clear.mapper.PlayClerkUserInfoMapper;
|
||||
import com.starry.admin.modules.clear.module.entity.*;
|
||||
import com.starry.admin.modules.clear.module.vo.PlayClerkCommodityQueryVo;
|
||||
import com.starry.admin.modules.clear.service.IPlayClerkCommodityService;
|
||||
import com.starry.admin.modules.clear.service.IPlayClerkUserInfoService;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.clerk.mapper.PlayClerkUserInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.*;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkCommodityQueryVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkCommodityService;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkUserInfoService;
|
||||
import com.starry.admin.modules.follow.module.entity.PlayCustomFollowInfoEntity;
|
||||
import com.starry.admin.modules.follow.service.IPlayCustomFollowInfoService;
|
||||
import com.starry.admin.modules.weichat.entity.PlayClerkUserLoginResponseVo;
|
||||
@@ -49,9 +50,9 @@ public class PlayClerkUserInfoServiceImpl extends ServiceImpl<PlayClerkUserInfoM
|
||||
|
||||
|
||||
@Override
|
||||
public PlayClerkUserInfoEntity queryByUserId() {
|
||||
public PlayClerkUserInfoEntity queryByUserId(String id) {
|
||||
LambdaQueryWrapper<PlayClerkUserInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getPlayUserId, "123456");
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getId, id);
|
||||
return this.baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@@ -70,7 +71,11 @@ public class PlayClerkUserInfoServiceImpl extends ServiceImpl<PlayClerkUserInfoM
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkUserInfoEntity selectById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
PlayClerkUserInfoEntity entity = this.baseMapper.selectById(id);
|
||||
if (entity == null) {
|
||||
throw new CustomException("店员不存在");
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -164,14 +169,14 @@ public class PlayClerkUserInfoServiceImpl extends ServiceImpl<PlayClerkUserInfoM
|
||||
|
||||
@Override
|
||||
public IPage<PlayClerkUserListResultVo> selectByPage(PlayClerkUserInfoQueryVo vo, String customUserId) {
|
||||
IPage<PlayClerkUserListResultVo> voIPage = this.selectPlayClerkUserInfoByPage(vo);
|
||||
IPage<PlayClerkUserListResultVo> voPage = this.selectPlayClerkUserInfoByPage(vo);
|
||||
// 如果当前顾客已登录,查询是否关注
|
||||
if (StrUtil.isNotBlank(customUserId)) {
|
||||
LambdaQueryWrapper<PlayCustomFollowInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayCustomFollowInfoEntity::getCustomUserId, customUserId);
|
||||
List<PlayCustomFollowInfoEntity> customFollowInfoEntities = customFollowInfoService.list(lambdaQueryWrapper);
|
||||
Map<String, String> customFollows = customFollowInfoEntities.stream().collect(Collectors.toMap(PlayCustomFollowInfoEntity::getClerkUserId, PlayCustomFollowInfoEntity::getFollowState));
|
||||
for (PlayClerkUserListResultVo record : voIPage.getRecords()) {
|
||||
for (PlayClerkUserListResultVo record : voPage.getRecords()) {
|
||||
if (customFollows.containsKey(record.getId())) {
|
||||
record.setFollowState(customFollows.get(record.getId()));
|
||||
record.setCommodity(playClerkCommodityService.getClerkCommodityList(record.getId()));
|
||||
@@ -180,7 +185,7 @@ public class PlayClerkUserInfoServiceImpl extends ServiceImpl<PlayClerkUserInfoM
|
||||
}
|
||||
}
|
||||
|
||||
return voIPage;
|
||||
return voPage;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.starry.admin.modules.commodity.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.starry.admin.modules.commodity.module.entity.PlayClearServiceEntity;
|
||||
|
||||
|
||||
/**
|
||||
* 陪玩引用服务项目Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-28
|
||||
*/
|
||||
public interface PlayClearServiceMapper extends BaseMapper<PlayClearServiceEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.starry.admin.modules.commodity.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.starry.admin.modules.commodity.module.entity.PlayClerkServiceEntity;
|
||||
|
||||
|
||||
/**
|
||||
* 陪聊引用服务项目Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-28
|
||||
*/
|
||||
public interface PlayClerkServiceMapper extends BaseMapper<PlayClerkServiceEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -6,15 +6,15 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 陪玩引用服务项目对象 play_clear_service
|
||||
* 陪聊引用服务项目对象 play_clerk_service
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_clear_service")
|
||||
public class PlayClearServiceEntity extends BaseEntity<PlayClearServiceEntity> {
|
||||
@TableName("play_clerk_service")
|
||||
public class PlayClerkServiceEntity extends BaseEntity<PlayClerkServiceEntity> {
|
||||
|
||||
|
||||
/**
|
||||
@@ -1,84 +0,0 @@
|
||||
package com.starry.admin.modules.commodity.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.starry.admin.modules.commodity.module.entity.PlayClearServiceEntity;
|
||||
|
||||
/**
|
||||
* 陪玩引用服务项目Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-28
|
||||
*/
|
||||
public interface IPlayClearServiceService extends IService<PlayClearServiceEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 初始化陪玩的服务项目
|
||||
*
|
||||
* @param playUserId 陪玩用户ID
|
||||
* @author admin
|
||||
* @since 2024/3/28 11:13
|
||||
**/
|
||||
void initPlayService(String playUserId);
|
||||
|
||||
/**
|
||||
* 查询陪玩引用服务项目
|
||||
*
|
||||
* @param id 陪玩引用服务项目主键
|
||||
* @return 陪玩引用服务项目
|
||||
*/
|
||||
PlayClearServiceEntity selectPlayClearServiceById(String id);
|
||||
|
||||
/**
|
||||
* 查询陪玩引用服务项目列表
|
||||
*
|
||||
* @param playClearService 陪玩引用服务项目
|
||||
* @return 陪玩引用服务项目集合
|
||||
*/
|
||||
IPage<PlayClearServiceEntity> selectPlayClearServiceByPage(PlayClearServiceEntity playClearService);
|
||||
|
||||
/**
|
||||
* 新增陪玩引用服务项目
|
||||
*
|
||||
* @param playClearService 陪玩引用服务项目
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClearServiceEntity playClearService);
|
||||
|
||||
|
||||
/**
|
||||
* 修改陪玩服务启停状态
|
||||
*
|
||||
* @param playUserId 陪玩用户ID
|
||||
* @param serviceId 服务ID
|
||||
* @param enablingState * 项目启用状态【0:停用,1:启用】
|
||||
* @author admin
|
||||
* @since 2024/3/28 11:35
|
||||
**/
|
||||
void updateServiceEnablingState(String playUserId, String serviceId, String enablingState);
|
||||
|
||||
/**
|
||||
* 修改陪玩引用服务项目
|
||||
*
|
||||
* @param playClearService 陪玩引用服务项目
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayClearServiceEntity playClearService);
|
||||
|
||||
/**
|
||||
* 批量删除陪玩引用服务项目
|
||||
*
|
||||
* @param ids 需要删除的陪玩引用服务项目主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClearServiceByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除陪玩引用服务项目信息
|
||||
*
|
||||
* @param id 陪玩引用服务项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClearServiceById(String id);
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.starry.admin.modules.commodity.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.starry.admin.modules.commodity.module.entity.PlayClerkServiceEntity;
|
||||
|
||||
/**
|
||||
* 陪聊引用服务项目Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-28
|
||||
*/
|
||||
public interface IPlayClerkServiceService extends IService<PlayClerkServiceEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 初始化陪聊的服务项目
|
||||
*
|
||||
* @param playUserId 陪聊用户ID
|
||||
* @author admin
|
||||
* @since 2024/3/28 11:13
|
||||
**/
|
||||
void initPlayService(String playUserId);
|
||||
|
||||
/**
|
||||
* 查询陪聊引用服务项目
|
||||
*
|
||||
* @param id 陪聊引用服务项目主键
|
||||
* @return 陪聊引用服务项目
|
||||
*/
|
||||
PlayClerkServiceEntity selectPlayClerkServiceById(String id);
|
||||
|
||||
/**
|
||||
* 查询陪聊引用服务项目列表
|
||||
*
|
||||
* @param playClerkService 陪聊引用服务项目
|
||||
* @return 陪聊引用服务项目集合
|
||||
*/
|
||||
IPage<PlayClerkServiceEntity> selectPlayClerkServiceByPage(PlayClerkServiceEntity playClerkService);
|
||||
|
||||
/**
|
||||
* 新增陪聊引用服务项目
|
||||
*
|
||||
* @param playClerkService 陪聊引用服务项目
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkServiceEntity playClerkService);
|
||||
|
||||
|
||||
/**
|
||||
* 修改陪聊服务启停状态
|
||||
*
|
||||
* @param playUserId 陪聊用户ID
|
||||
* @param serviceId 服务ID
|
||||
* @param enablingState * 项目启用状态【0:停用,1:启用】
|
||||
* @author admin
|
||||
* @since 2024/3/28 11:35
|
||||
**/
|
||||
void updateServiceEnablingState(String playUserId, String serviceId, String enablingState);
|
||||
|
||||
/**
|
||||
* 修改陪聊引用服务项目
|
||||
*
|
||||
* @param playClerkService 陪聊引用服务项目
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayClerkServiceEntity playClerkService);
|
||||
|
||||
/**
|
||||
* 批量删除陪聊引用服务项目
|
||||
*
|
||||
* @param ids 需要删除的陪聊引用服务项目主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkServiceByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除陪聊引用服务项目信息
|
||||
*
|
||||
* @param id 陪聊引用服务项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkServiceById(String id);
|
||||
}
|
||||
@@ -7,10 +7,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.commodity.mapper.PlayClearServiceMapper;
|
||||
import com.starry.admin.modules.commodity.module.entity.PlayClearServiceEntity;
|
||||
import com.starry.admin.modules.commodity.mapper.PlayClerkServiceMapper;
|
||||
import com.starry.admin.modules.commodity.module.entity.PlayClerkServiceEntity;
|
||||
import com.starry.admin.modules.commodity.module.entity.PlayServiceInfoEntity;
|
||||
import com.starry.admin.modules.commodity.service.IPlayClearServiceService;
|
||||
import com.starry.admin.modules.commodity.service.IPlayClerkServiceService;
|
||||
import com.starry.admin.modules.commodity.service.IPlayServiceInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -19,15 +19,15 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 陪玩引用服务项目Service业务层处理
|
||||
* 陪聊引用服务项目Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-28
|
||||
*/
|
||||
@Service
|
||||
public class PlayClearServiceServiceImpl extends ServiceImpl<PlayClearServiceMapper, PlayClearServiceEntity> implements IPlayClearServiceService {
|
||||
public class PlayClerkServiceServiceImpl extends ServiceImpl<PlayClerkServiceMapper, PlayClerkServiceEntity> implements IPlayClerkServiceService {
|
||||
@Resource
|
||||
private PlayClearServiceMapper playClearServiceMapper;
|
||||
private PlayClerkServiceMapper playClerkServiceMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
@@ -37,7 +37,7 @@ public class PlayClearServiceServiceImpl extends ServiceImpl<PlayClearServiceMap
|
||||
@Override
|
||||
public void initPlayService(String playUserId) {
|
||||
for (PlayServiceInfoEntity playServiceInfoEntity : playServiceInfoService.selectPlayServiceInfoAll()) {
|
||||
PlayClearServiceEntity entity = new PlayClearServiceEntity();
|
||||
PlayClerkServiceEntity entity = new PlayClerkServiceEntity();
|
||||
entity.setServiceId(playServiceInfoEntity.getId());
|
||||
entity.setTenantId(playServiceInfoEntity.getTenantId());
|
||||
entity.setPlayUserId(playUserId);
|
||||
@@ -47,88 +47,88 @@ public class PlayClearServiceServiceImpl extends ServiceImpl<PlayClearServiceMap
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询陪玩引用服务项目
|
||||
* 查询陪聊引用服务项目
|
||||
*
|
||||
* @param id 陪玩引用服务项目主键
|
||||
* @return 陪玩引用服务项目
|
||||
* @param id 陪聊引用服务项目主键
|
||||
* @return 陪聊引用服务项目
|
||||
*/
|
||||
@Override
|
||||
public PlayClearServiceEntity selectPlayClearServiceById(String id) {
|
||||
public PlayClerkServiceEntity selectPlayClerkServiceById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询陪玩引用服务项目列表
|
||||
* 查询陪聊引用服务项目列表
|
||||
*
|
||||
* @param playClearService 陪玩引用服务项目
|
||||
* @return 陪玩引用服务项目
|
||||
* @param playClerkService 陪聊引用服务项目
|
||||
* @return 陪聊引用服务项目
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayClearServiceEntity> selectPlayClearServiceByPage(PlayClearServiceEntity playClearService) {
|
||||
Page<PlayClearServiceEntity> page = new Page<>(1, 10);
|
||||
public IPage<PlayClerkServiceEntity> selectPlayClerkServiceByPage(PlayClerkServiceEntity playClerkService) {
|
||||
Page<PlayClerkServiceEntity> page = new Page<>(1, 10);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<>());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增陪玩引用服务项目
|
||||
* 新增陪聊引用服务项目
|
||||
*
|
||||
* @param playClearService 陪玩引用服务项目
|
||||
* @param playClerkService 陪聊引用服务项目
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayClearServiceEntity playClearService) {
|
||||
if (StrUtil.isBlankIfStr(playClearService.getId())) {
|
||||
playClearService.setId(IdUtil.fastSimpleUUID());
|
||||
public boolean create(PlayClerkServiceEntity playClerkService) {
|
||||
if (StrUtil.isBlankIfStr(playClerkService.getId())) {
|
||||
playClerkService.setId(IdUtil.fastSimpleUUID());
|
||||
}
|
||||
return save(playClearService);
|
||||
return save(playClerkService);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateServiceEnablingState(String playUserId, String serviceId, String enablingState) {
|
||||
LambdaQueryWrapper<PlayClearServiceEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClearServiceEntity::getServiceId, serviceId);
|
||||
lambdaQueryWrapper.eq(PlayClearServiceEntity::getPlayUserId, playUserId);
|
||||
List<PlayClearServiceEntity> list = this.baseMapper.selectList(lambdaQueryWrapper);
|
||||
LambdaQueryWrapper<PlayClerkServiceEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkServiceEntity::getServiceId, serviceId);
|
||||
lambdaQueryWrapper.eq(PlayClerkServiceEntity::getPlayUserId, playUserId);
|
||||
List<PlayClerkServiceEntity> list = this.baseMapper.selectList(lambdaQueryWrapper);
|
||||
if (list.size() != 1) {
|
||||
throw new CustomException("服务不存在,请查证");
|
||||
}
|
||||
// 更新服务状态
|
||||
PlayClearServiceEntity item = list.get(0);
|
||||
PlayClerkServiceEntity item = list.get(0);
|
||||
item.setEnablingState(enablingState);
|
||||
this.update(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改陪玩引用服务项目
|
||||
* 修改陪聊引用服务项目
|
||||
*
|
||||
* @param playClearService 陪玩引用服务项目
|
||||
* @param playClerkService 陪聊引用服务项目
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayClearServiceEntity playClearService) {
|
||||
return updateById(playClearService);
|
||||
public boolean update(PlayClerkServiceEntity playClerkService) {
|
||||
return updateById(playClerkService);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除陪玩引用服务项目
|
||||
* 批量删除陪聊引用服务项目
|
||||
*
|
||||
* @param ids 需要删除的陪玩引用服务项目主键
|
||||
* @param ids 需要删除的陪聊引用服务项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClearServiceByIds(String[] ids) {
|
||||
return playClearServiceMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
public int deletePlayClerkServiceByIds(String[] ids) {
|
||||
return playClerkServiceMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除陪玩引用服务项目信息
|
||||
* 删除陪聊引用服务项目信息
|
||||
*
|
||||
* @param id 陪玩引用服务项目主键
|
||||
* @param id 陪聊引用服务项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClearServiceById(String id) {
|
||||
return playClearServiceMapper.deleteById(id);
|
||||
public int deletePlayClerkServiceById(String id) {
|
||||
return playClerkServiceMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.starry.admin.modules.custom.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.custom.module.entity.PlayCustomLeaveMsgEntity;
|
||||
import com.starry.admin.modules.custom.module.vo.PlayCustomLeaveMsgQueryVo;
|
||||
import com.starry.admin.modules.custom.module.vo.PlayCustomLeaveMsgReturnVo;
|
||||
import com.starry.admin.modules.custom.service.IPlayCustomLeaveMsgService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 顾客留言Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-07
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/custom/leave")
|
||||
public class PlayCustomLeaveMsgController {
|
||||
@Resource
|
||||
private IPlayCustomLeaveMsgService playCustomLeaveMsgService;
|
||||
|
||||
/**
|
||||
* 分页查询顾客留言列表
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public R list(@RequestBody PlayCustomLeaveMsgQueryVo vo) {
|
||||
IPage<PlayCustomLeaveMsgReturnVo> list = playCustomLeaveMsgService.selectByPage(vo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取顾客留言详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playCustomLeaveMsgService.selectPlayCustomLeaveMsgById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增顾客留言
|
||||
*/
|
||||
@Log(title = "顾客留言", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayCustomLeaveMsgEntity playCustomLeaveMsg) {
|
||||
boolean success = playCustomLeaveMsgService.create(playCustomLeaveMsg);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改顾客留言
|
||||
*/
|
||||
@Log(title = "顾客留言", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayCustomLeaveMsgEntity playCustomLeaveMsg) {
|
||||
playCustomLeaveMsg.setId(id);
|
||||
boolean success = playCustomLeaveMsgService.update(playCustomLeaveMsg);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除顾客留言
|
||||
*/
|
||||
@Log(title = "顾客留言", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playCustomLeaveMsgService.deletePlayCustomLeaveMsgByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.starry.admin.modules.custom.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.custom.module.entity.PlayCustomLeaveMsgEntity;
|
||||
|
||||
/**
|
||||
* 顾客留言Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-07
|
||||
*/
|
||||
public interface PlayCustomLeaveMsgMapper extends MPJBaseMapper<PlayCustomLeaveMsgEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.starry.admin.modules.custom.module.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 顾客留言对象 play_custom_leave_msg
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-07
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_custom_leave_msg")
|
||||
public class PlayCustomLeaveMsgEntity extends BaseEntity<PlayCustomLeaveMsgEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 顾客ID
|
||||
*/
|
||||
private String customId;
|
||||
|
||||
/**
|
||||
* 留言内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String images;
|
||||
|
||||
/**
|
||||
* 留言时间
|
||||
*/
|
||||
private Date msgTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.starry.admin.modules.custom.module.vo;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
|
||||
/**
|
||||
* 顾客留言查询对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/7 16:29
|
||||
**/
|
||||
public class PlayCustomLeaveMsgQueryVo extends BasePageEntity {
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.starry.admin.modules.custom.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 顾客留言查询返回对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/7 16:29
|
||||
**/
|
||||
@Data
|
||||
public class PlayCustomLeaveMsgReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 留言内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String images;
|
||||
|
||||
/**
|
||||
* 留言时间
|
||||
*/
|
||||
private Date msgTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 顾客Id
|
||||
*/
|
||||
private String customId;
|
||||
|
||||
/**
|
||||
* 顾客昵称
|
||||
*/
|
||||
private String customAvatar;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String customNickname;
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.starry.admin.modules.custom.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.starry.admin.modules.custom.module.entity.PlayCustomLeaveMsgEntity;
|
||||
import com.starry.admin.modules.custom.module.vo.PlayCustomLeaveMsgQueryVo;
|
||||
import com.starry.admin.modules.custom.module.vo.PlayCustomLeaveMsgReturnVo;
|
||||
|
||||
/**
|
||||
* 顾客留言Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-07
|
||||
*/
|
||||
public interface IPlayCustomLeaveMsgService extends IService<PlayCustomLeaveMsgEntity> {
|
||||
/**
|
||||
* 查询顾客留言
|
||||
*
|
||||
* @param id 顾客留言主键
|
||||
* @return 顾客留言
|
||||
*/
|
||||
PlayCustomLeaveMsgEntity selectPlayCustomLeaveMsgById(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询顾客留言列表
|
||||
*
|
||||
* @param vo 顾客留言分页查询对象
|
||||
* @return 顾客留言集合
|
||||
*/
|
||||
IPage<PlayCustomLeaveMsgReturnVo> selectByPage(PlayCustomLeaveMsgQueryVo vo);
|
||||
|
||||
/**
|
||||
* 查询顾客留言列表
|
||||
*
|
||||
* @param playCustomLeaveMsg 顾客留言
|
||||
* @return 顾客留言集合
|
||||
*/
|
||||
IPage<PlayCustomLeaveMsgEntity> selectPlayCustomLeaveMsgByPage(PlayCustomLeaveMsgEntity playCustomLeaveMsg);
|
||||
|
||||
/**
|
||||
* 新增顾客留言
|
||||
*
|
||||
* @param playCustomLeaveMsg 顾客留言
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayCustomLeaveMsgEntity playCustomLeaveMsg);
|
||||
|
||||
/**
|
||||
* 修改顾客留言
|
||||
*
|
||||
* @param playCustomLeaveMsg 顾客留言
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayCustomLeaveMsgEntity playCustomLeaveMsg);
|
||||
|
||||
/**
|
||||
* 批量删除顾客留言
|
||||
*
|
||||
* @param ids 需要删除的顾客留言主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayCustomLeaveMsgByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除顾客留言信息
|
||||
*
|
||||
* @param id 顾客留言主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayCustomLeaveMsgById(String id);
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.starry.admin.modules.custom.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.starry.admin.modules.custom.mapper.PlayCustomLeaveMsgMapper;
|
||||
import com.starry.admin.modules.custom.module.entity.PlayCustomLeaveMsgEntity;
|
||||
import com.starry.admin.modules.custom.module.entity.PlayCustomUserInfoEntity;
|
||||
import com.starry.admin.modules.custom.module.vo.PlayCustomLeaveMsgQueryVo;
|
||||
import com.starry.admin.modules.custom.module.vo.PlayCustomLeaveMsgReturnVo;
|
||||
import com.starry.admin.modules.custom.service.IPlayCustomLeaveMsgService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 顾客留言Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-07
|
||||
*/
|
||||
@Service
|
||||
public class PlayCustomLeaveMsgServiceImpl extends ServiceImpl<PlayCustomLeaveMsgMapper, PlayCustomLeaveMsgEntity> implements IPlayCustomLeaveMsgService {
|
||||
@Resource
|
||||
private PlayCustomLeaveMsgMapper playCustomLeaveMsgMapper;
|
||||
|
||||
@Override
|
||||
public IPage<PlayCustomLeaveMsgReturnVo> selectByPage(PlayCustomLeaveMsgQueryVo vo) {
|
||||
MPJLambdaWrapper<PlayCustomLeaveMsgEntity> lambdaQueryWrapper = new MPJLambdaWrapper<PlayCustomLeaveMsgEntity>()
|
||||
// 查询主表全部字段
|
||||
.selectAll(PlayCustomLeaveMsgEntity.class)
|
||||
// 查询顾客表
|
||||
.selectAs(PlayCustomUserInfoEntity::getId, "customUId").selectAs(PlayCustomUserInfoEntity::getAvatar, "customAvatar").selectAs(PlayCustomUserInfoEntity::getNickname, "customNickname")
|
||||
// 子表
|
||||
.leftJoin(PlayCustomUserInfoEntity.class, PlayCustomUserInfoEntity::getId, PlayCustomLeaveMsgEntity::getCustomId);
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayCustomLeaveMsgReturnVo.class, lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询顾客留言
|
||||
*
|
||||
* @param id 顾客留言主键
|
||||
* @return 顾客留言
|
||||
*/
|
||||
@Override
|
||||
public PlayCustomLeaveMsgEntity selectPlayCustomLeaveMsgById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询顾客留言列表
|
||||
*
|
||||
* @param playCustomLeaveMsg 顾客留言
|
||||
* @return 顾客留言
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayCustomLeaveMsgEntity> selectPlayCustomLeaveMsgByPage(PlayCustomLeaveMsgEntity playCustomLeaveMsg) {
|
||||
Page<PlayCustomLeaveMsgEntity> page = new Page<>(1, 10);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<PlayCustomLeaveMsgEntity>());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增顾客留言
|
||||
*
|
||||
* @param playCustomLeaveMsg 顾客留言
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayCustomLeaveMsgEntity playCustomLeaveMsg) {
|
||||
if (StrUtil.isBlankIfStr(playCustomLeaveMsg.getId())) {
|
||||
playCustomLeaveMsg.setId(IdUtil.fastSimpleUUID());
|
||||
}
|
||||
return save(playCustomLeaveMsg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改顾客留言
|
||||
*
|
||||
* @param playCustomLeaveMsg 顾客留言
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayCustomLeaveMsgEntity playCustomLeaveMsg) {
|
||||
return updateById(playCustomLeaveMsg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除顾客留言
|
||||
*
|
||||
* @param ids 需要删除的顾客留言主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayCustomLeaveMsgByIds(String[] ids) {
|
||||
return playCustomLeaveMsgMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除顾客留言信息
|
||||
*
|
||||
* @param id 顾客留言主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayCustomLeaveMsgById(String id) {
|
||||
return playCustomLeaveMsgMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.custom.mapper.PlayCustomUserInfoMapper;
|
||||
import com.starry.admin.modules.custom.module.entity.PlayCustomUserInfoEntity;
|
||||
import com.starry.admin.modules.custom.service.IPlayCustomUserInfoService;
|
||||
@@ -33,6 +34,7 @@ public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInf
|
||||
lambdaQueryWrapper.eq(PlayCustomUserInfoEntity::getOpenid, openId);
|
||||
return this.baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询顾客
|
||||
*
|
||||
@@ -41,7 +43,11 @@ public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInf
|
||||
*/
|
||||
@Override
|
||||
public PlayCustomUserInfoEntity selectById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
PlayCustomUserInfoEntity entity = this.baseMapper.selectById(id);
|
||||
if (entity == null) {
|
||||
throw new CustomException("顾客不存在");
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 顾客关注陪玩信息Controller
|
||||
* 顾客关注陪聊信息Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-30
|
||||
@@ -24,7 +24,7 @@ public class PlayCustomFollowInfoController {
|
||||
private IPlayCustomFollowInfoService playCustomFollowInfoService;
|
||||
|
||||
/**
|
||||
* 查询顾客关注陪玩信息列表
|
||||
* 查询顾客关注陪聊信息列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:list')")
|
||||
@GetMapping("/list")
|
||||
@@ -34,7 +34,7 @@ public class PlayCustomFollowInfoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取顾客关注陪玩信息详细信息
|
||||
* 获取顾客关注陪聊信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@@ -43,10 +43,10 @@ public class PlayCustomFollowInfoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增顾客关注陪玩信息
|
||||
* 新增顾客关注陪聊信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:create')")
|
||||
@Log(title = "顾客关注陪玩信息", businessType = BusinessType.INSERT)
|
||||
@Log(title = "顾客关注陪聊信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayCustomFollowInfoEntity playCustomFollowInfo) {
|
||||
boolean success = playCustomFollowInfoService.create(playCustomFollowInfo);
|
||||
@@ -57,10 +57,10 @@ public class PlayCustomFollowInfoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改顾客关注陪玩信息
|
||||
* 修改顾客关注陪聊信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:edit')")
|
||||
@Log(title = "顾客关注陪玩信息", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "顾客关注陪聊信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayCustomFollowInfoEntity playCustomFollowInfo) {
|
||||
playCustomFollowInfo.setId(id);
|
||||
@@ -72,10 +72,10 @@ public class PlayCustomFollowInfoController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除顾客关注陪玩信息
|
||||
* 删除顾客关注陪聊信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:remove')")
|
||||
@Log(title = "顾客关注陪玩信息", businessType = BusinessType.DELETE)
|
||||
@Log(title = "顾客关注陪聊信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playCustomFollowInfoService.deletePlayCustomFollowInfoByIds(ids));
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.starry.admin.modules.follow.module.entity.PlayCustomFollowInfoEntity;
|
||||
|
||||
/**
|
||||
* 顾客关注陪玩信息Mapper接口
|
||||
* 顾客关注陪聊信息Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-30
|
||||
|
||||
@@ -8,7 +8,7 @@ import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 顾客关注陪玩信息对象 play_custom_follow_info
|
||||
* 顾客关注陪聊信息对象 play_custom_follow_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-30
|
||||
@@ -35,7 +35,7 @@ public class PlayCustomFollowInfoEntity extends BaseEntity<PlayCustomFollowInfoE
|
||||
private String customUserId;
|
||||
|
||||
/**
|
||||
* 陪玩ID
|
||||
* 陪聊ID
|
||||
*/
|
||||
private String clerkUserId;
|
||||
|
||||
|
||||
@@ -5,17 +5,17 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.starry.admin.modules.follow.module.entity.PlayCustomFollowInfoEntity;
|
||||
|
||||
/**
|
||||
* 顾客关注陪玩信息Service接口
|
||||
* 顾客关注陪聊信息Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-30
|
||||
*/
|
||||
public interface IPlayCustomFollowInfoService extends IService<PlayCustomFollowInfoEntity> {
|
||||
/**
|
||||
* 查询顾客关注陪玩信息
|
||||
* 查询顾客关注陪聊信息
|
||||
*
|
||||
* @param id 顾客关注陪玩信息主键
|
||||
* @return 顾客关注陪玩信息
|
||||
* @param id 顾客关注陪聊信息主键
|
||||
* @return 顾客关注陪聊信息
|
||||
*/
|
||||
PlayCustomFollowInfoEntity selectPlayCustomFollowInfoById(String id);
|
||||
|
||||
@@ -23,56 +23,56 @@ public interface IPlayCustomFollowInfoService extends IService<PlayCustomFollowI
|
||||
* 修改关注状态
|
||||
*
|
||||
* @param customUserId 顾客ID
|
||||
* @param clarkUserId 陪玩ID
|
||||
* @param clerkUserId 陪聊ID
|
||||
* @return 关注状态[0:未关注,1:已关注]
|
||||
*/
|
||||
String queryFollowState(String customUserId, String clarkUserId);
|
||||
String queryFollowState(String customUserId, String clerkUserId);
|
||||
|
||||
/**
|
||||
* 修改关注状态
|
||||
*
|
||||
* @param customUserId 顾客ID
|
||||
* @param clarkUserId 陪玩ID
|
||||
* @param clerkUserId 陪聊ID
|
||||
* @param followState 关注状态[0:未关注,1:已关注]
|
||||
*/
|
||||
void updateFollowState(String customUserId, String clarkUserId, String followState);
|
||||
void updateFollowState(String customUserId, String clerkUserId, String followState);
|
||||
|
||||
/**
|
||||
* 查询顾客关注陪玩信息列表
|
||||
* 查询顾客关注陪聊信息列表
|
||||
*
|
||||
* @param playCustomFollowInfo 顾客关注陪玩信息
|
||||
* @return 顾客关注陪玩信息集合
|
||||
* @param playCustomFollowInfo 顾客关注陪聊信息
|
||||
* @return 顾客关注陪聊信息集合
|
||||
*/
|
||||
IPage<PlayCustomFollowInfoEntity> selectPlayCustomFollowInfoByPage(PlayCustomFollowInfoEntity playCustomFollowInfo);
|
||||
|
||||
/**
|
||||
* 新增顾客关注陪玩信息
|
||||
* 新增顾客关注陪聊信息
|
||||
*
|
||||
* @param playCustomFollowInfo 顾客关注陪玩信息
|
||||
* @param playCustomFollowInfo 顾客关注陪聊信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayCustomFollowInfoEntity playCustomFollowInfo);
|
||||
|
||||
/**
|
||||
* 修改顾客关注陪玩信息
|
||||
* 修改顾客关注陪聊信息
|
||||
*
|
||||
* @param playCustomFollowInfo 顾客关注陪玩信息
|
||||
* @param playCustomFollowInfo 顾客关注陪聊信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayCustomFollowInfoEntity playCustomFollowInfo);
|
||||
|
||||
/**
|
||||
* 批量删除顾客关注陪玩信息
|
||||
* 批量删除顾客关注陪聊信息
|
||||
*
|
||||
* @param ids 需要删除的顾客关注陪玩信息主键集合
|
||||
* @param ids 需要删除的顾客关注陪聊信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayCustomFollowInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除顾客关注陪玩信息信息
|
||||
* 删除顾客关注陪聊信息信息
|
||||
*
|
||||
* @param id 顾客关注陪玩信息主键
|
||||
* @param id 顾客关注陪聊信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayCustomFollowInfoById(String id);
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 顾客关注陪玩信息Service业务层处理
|
||||
* 顾客关注陪聊信息Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-30
|
||||
@@ -27,10 +27,10 @@ public class PlayCustomFollowInfoServiceImpl extends ServiceImpl<PlayCustomFollo
|
||||
private PlayCustomFollowInfoMapper playCustomFollowInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询顾客关注陪玩信息
|
||||
* 查询顾客关注陪聊信息
|
||||
*
|
||||
* @param id 顾客关注陪玩信息主键
|
||||
* @return 顾客关注陪玩信息
|
||||
* @param id 顾客关注陪聊信息主键
|
||||
* @return 顾客关注陪聊信息
|
||||
*/
|
||||
@Override
|
||||
public PlayCustomFollowInfoEntity selectPlayCustomFollowInfoById(String id) {
|
||||
@@ -39,25 +39,25 @@ public class PlayCustomFollowInfoServiceImpl extends ServiceImpl<PlayCustomFollo
|
||||
|
||||
|
||||
@Override
|
||||
public String queryFollowState(String customUserId, String clarkUserId) {
|
||||
public String queryFollowState(String customUserId, String clerkUserId) {
|
||||
LambdaQueryWrapper<PlayCustomFollowInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayCustomFollowInfoEntity::getClerkUserId, clarkUserId);
|
||||
lambdaQueryWrapper.eq(PlayCustomFollowInfoEntity::getClerkUserId, clerkUserId);
|
||||
lambdaQueryWrapper.eq(PlayCustomFollowInfoEntity::getCustomUserId, customUserId);
|
||||
PlayCustomFollowInfoEntity entity = this.baseMapper.selectOne(lambdaQueryWrapper);
|
||||
return entity == null ? "0" : entity.getFollowState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFollowState(String customUserId, String clarkUserId, String followState) {
|
||||
public void updateFollowState(String customUserId, String clerkUserId, String followState) {
|
||||
LambdaQueryWrapper<PlayCustomFollowInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayCustomFollowInfoEntity::getClerkUserId, clarkUserId);
|
||||
lambdaQueryWrapper.eq(PlayCustomFollowInfoEntity::getClerkUserId, clerkUserId);
|
||||
lambdaQueryWrapper.eq(PlayCustomFollowInfoEntity::getCustomUserId, customUserId);
|
||||
PlayCustomFollowInfoEntity entity = this.baseMapper.selectOne(lambdaQueryWrapper);
|
||||
if (entity == null) {
|
||||
entity = new PlayCustomFollowInfoEntity();
|
||||
entity.setCustomUserId(customUserId);
|
||||
entity.setFollowState(followState);
|
||||
entity.setClerkUserId(clarkUserId);
|
||||
entity.setClerkUserId(clerkUserId);
|
||||
entity.setFollowTime(new Date());
|
||||
this.baseMapper.insert(entity);
|
||||
} else {
|
||||
@@ -67,10 +67,10 @@ public class PlayCustomFollowInfoServiceImpl extends ServiceImpl<PlayCustomFollo
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询顾客关注陪玩信息列表
|
||||
* 查询顾客关注陪聊信息列表
|
||||
*
|
||||
* @param playCustomFollowInfo 顾客关注陪玩信息
|
||||
* @return 顾客关注陪玩信息
|
||||
* @param playCustomFollowInfo 顾客关注陪聊信息
|
||||
* @return 顾客关注陪聊信息
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayCustomFollowInfoEntity> selectPlayCustomFollowInfoByPage(PlayCustomFollowInfoEntity playCustomFollowInfo) {
|
||||
@@ -79,9 +79,9 @@ public class PlayCustomFollowInfoServiceImpl extends ServiceImpl<PlayCustomFollo
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增顾客关注陪玩信息
|
||||
* 新增顾客关注陪聊信息
|
||||
*
|
||||
* @param playCustomFollowInfo 顾客关注陪玩信息
|
||||
* @param playCustomFollowInfo 顾客关注陪聊信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -93,9 +93,9 @@ public class PlayCustomFollowInfoServiceImpl extends ServiceImpl<PlayCustomFollo
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改顾客关注陪玩信息
|
||||
* 修改顾客关注陪聊信息
|
||||
*
|
||||
* @param playCustomFollowInfo 顾客关注陪玩信息
|
||||
* @param playCustomFollowInfo 顾客关注陪聊信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -104,9 +104,9 @@ public class PlayCustomFollowInfoServiceImpl extends ServiceImpl<PlayCustomFollo
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除顾客关注陪玩信息
|
||||
* 批量删除顾客关注陪聊信息
|
||||
*
|
||||
* @param ids 需要删除的顾客关注陪玩信息主键
|
||||
* @param ids 需要删除的顾客关注陪聊信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -115,9 +115,9 @@ public class PlayCustomFollowInfoServiceImpl extends ServiceImpl<PlayCustomFollo
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除顾客关注陪玩信息信息
|
||||
* 删除顾客关注陪聊信息信息
|
||||
*
|
||||
* @param id 顾客关注陪玩信息主键
|
||||
* @param id 顾客关注陪聊信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.starry.admin.modules.gift.module.constant;
|
||||
|
||||
/**
|
||||
* 礼物常量
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/8 9:50
|
||||
**/
|
||||
public class GiftConstant {
|
||||
|
||||
/**
|
||||
* 礼物单词最大赠送数量
|
||||
*
|
||||
* @since 2024/5/8 9:51
|
||||
**/
|
||||
public final static int MAXIMUM_SINGLE_GIFT_QUANTITY = 1000;
|
||||
|
||||
/**
|
||||
* 礼物单词最大赠送数量
|
||||
*
|
||||
* @since 2024/5/8 9:51
|
||||
**/
|
||||
public final static int MINIMUM_SINGLE_GIFT_QUANTITY = 1;
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.gift.mapper.PlayGiftInfoMapper;
|
||||
import com.starry.admin.modules.gift.module.entity.PlayGiftInfoEntity;
|
||||
import com.starry.admin.modules.gift.service.IPlayGiftInfoService;
|
||||
@@ -34,7 +35,11 @@ public class PlayGiftInfoServiceImpl extends ServiceImpl<PlayGiftInfoMapper, Pla
|
||||
*/
|
||||
@Override
|
||||
public PlayGiftInfoEntity selectPlayGiftInfoById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
PlayGiftInfoEntity entity = this.baseMapper.selectById(id);
|
||||
if (entity == null) {
|
||||
throw new CustomException("礼物不存在");
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.starry.admin.modules.order.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.order.module.entity.PlayOrderComplaintInfoEntity;
|
||||
import com.starry.admin.modules.order.module.vo.PlayOrderComplaintQueryVo;
|
||||
import com.starry.admin.modules.order.module.vo.PlayOrderComplaintReturnVo;
|
||||
import com.starry.admin.modules.order.service.IPlayOrderComplaintInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 订单投诉信息Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-07
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/order/complaint")
|
||||
public class PlayOrderComplaintInfoController {
|
||||
@Resource
|
||||
private IPlayOrderComplaintInfoService playOrderComplaintInfoService;
|
||||
|
||||
/**
|
||||
* 查询订单投诉信息列表
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public R list(@RequestBody PlayOrderComplaintQueryVo vo) {
|
||||
IPage<PlayOrderComplaintReturnVo> list = playOrderComplaintInfoService.selectByPage(vo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单投诉信息详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playOrderComplaintInfoService.selectPlayOrderComplaintInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单投诉信息
|
||||
*/
|
||||
@Log(title = "订单投诉信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayOrderComplaintInfoEntity playOrderComplaintInfo) {
|
||||
boolean success = playOrderComplaintInfoService.create(playOrderComplaintInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单投诉信息
|
||||
*/
|
||||
@Log(title = "订单投诉信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayOrderComplaintInfoEntity playOrderComplaintInfo) {
|
||||
playOrderComplaintInfo.setId(id);
|
||||
boolean success = playOrderComplaintInfoService.update(playOrderComplaintInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单投诉信息
|
||||
*/
|
||||
@Log(title = "订单投诉信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playOrderComplaintInfoService.deletePlayOrderComplaintInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.starry.admin.modules.order.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.order.module.entity.PlayOrderEvaluateInfoEntity;
|
||||
import com.starry.admin.modules.order.module.vo.PlayOrderEvaluateEditVo;
|
||||
import com.starry.admin.modules.order.module.vo.PlayOrderEvaluateQueryVo;
|
||||
import com.starry.admin.modules.order.module.vo.PlayOrderEvaluateReturnVo;
|
||||
import com.starry.admin.modules.order.service.IPlayOrderEvaluateInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 订单评价信息Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-07
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/order/evaluate")
|
||||
public class PlayOrderEvaluateInfoController {
|
||||
@Resource
|
||||
private IPlayOrderEvaluateInfoService playOrderEvaluateInfoService;
|
||||
|
||||
/**
|
||||
* 查询订单评价信息列表
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public R list(@RequestBody PlayOrderEvaluateQueryVo vo) {
|
||||
IPage<PlayOrderEvaluateReturnVo> list = playOrderEvaluateInfoService.selectByPage(vo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单评价信息详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playOrderEvaluateInfoService.selectPlayOrderEvaluateInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单评价信息
|
||||
*/
|
||||
@Log(title = "订单评价信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayOrderEvaluateInfoEntity playOrderEvaluateInfo) {
|
||||
boolean success = playOrderEvaluateInfoService.create(playOrderEvaluateInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单评价信息
|
||||
*/
|
||||
@Log(title = "订单评价信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayOrderEvaluateInfoEntity playOrderEvaluateInfo) {
|
||||
playOrderEvaluateInfo.setId(id);
|
||||
boolean success = playOrderEvaluateInfoService.update(playOrderEvaluateInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单评价信息
|
||||
*/
|
||||
@Log(title = "修改订单评价状态", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/updateStatus")
|
||||
public R update(@RequestBody PlayOrderEvaluateEditVo vo) {
|
||||
PlayOrderEvaluateInfoEntity entity = ConvertUtil.entityToVo(vo, PlayOrderEvaluateInfoEntity.class);
|
||||
boolean success = playOrderEvaluateInfoService.update(entity);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单评价信息
|
||||
*/
|
||||
@Log(title = "订单评价信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playOrderEvaluateInfoService.deletePlayOrderEvaluateInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,11 @@
|
||||
package com.starry.admin.modules.order.controller;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.coupon.module.entity.CouponInfoEntity;
|
||||
import com.starry.admin.modules.coupon.service.ICouponInfoService;
|
||||
import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
|
||||
import com.starry.admin.modules.order.module.vo.*;
|
||||
import com.starry.admin.modules.order.module.vo.PlayOrderInfoQueryVo;
|
||||
import com.starry.admin.modules.order.service.IPlayOrderInfoService;
|
||||
import com.starry.admin.modules.play.module.entity.PlayUserInfoEntity;
|
||||
import com.starry.admin.modules.play.service.IPlayUserInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -32,106 +24,12 @@ public class PlayOrderInfoController {
|
||||
private IPlayOrderInfoService orderInfoService;
|
||||
|
||||
|
||||
@Resource
|
||||
private ICouponInfoService couponInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayUserInfoService playUserInfoService;
|
||||
|
||||
|
||||
@Log(title = "取消订单", businessType = BusinessType.UPDATE)
|
||||
public R cancellationOrder(@RequestBody OrderInfoCancellationVo vo) {
|
||||
|
||||
// 判断操作人是否是陪玩本身
|
||||
PlayOrderInfoEntity entity = orderInfoService.selectOrderInfoById(vo.getId());
|
||||
|
||||
// 校验通过
|
||||
orderInfoService.orderRefund(vo.getId(), "2", null, false);
|
||||
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@PreAuthorize("@customSs.hasPermission('order/info/create')")
|
||||
@Log(title = "新增打赏订单", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/reward")
|
||||
public R reward(@RequestBody OrderInfoRewardVo addVo) {
|
||||
|
||||
// 校验当前用户余额是否充足
|
||||
// if (false) {
|
||||
|
||||
// throw new CustomException("余额不足,无法下单");
|
||||
// }
|
||||
|
||||
// 新增陪玩余额
|
||||
// playUserInfoService.editAccountBalance(addVo.getPlayUserId(), addVo.getMoney(), "add");
|
||||
// 减少用户余额
|
||||
|
||||
// 新增订单记录(订单信息需完善)
|
||||
PlayOrderInfoEntity entity = ConvertUtil.entityToVo(addVo, PlayOrderInfoEntity.class);
|
||||
orderInfoService.create(entity);
|
||||
// 新增订单处理日志(打赏单,订单直接完成)
|
||||
// orderLogInfoService.create(new OrderLogInfoEntity(entity.getId(), "1", new Date()));
|
||||
// orderLogInfoService.create(new OrderLogInfoEntity(entity.getId(), "4", new Date()));
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增订单
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order/info/create')")
|
||||
@Log(title = "新增普通订单", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody OrderInfoAddVo addVo) {
|
||||
|
||||
// 商品总价格
|
||||
long commodityTotalMoney = 0;
|
||||
// 订单总价格
|
||||
long orderTotalMoney = 0;
|
||||
// 校验商品(陪玩)状态
|
||||
PlayUserInfoEntity playUserInfo = playUserInfoService.selectPlayUserInfoById(addVo.getPlayUserId());
|
||||
|
||||
|
||||
// 校验优惠券是否存在
|
||||
for (String commodityInfoId : addVo.getCouponIds()) {
|
||||
CouponInfoEntity couponInfo = couponInfoService.selectCouponInfoById(commodityInfoId);
|
||||
if (couponInfo == null) {
|
||||
throw new CustomException("优惠券不存在");
|
||||
}
|
||||
}
|
||||
|
||||
// 校验当前用户余额是否充足
|
||||
// if (false) {
|
||||
// throw new CustomException("余额不足,无法下单");
|
||||
// }
|
||||
|
||||
PlayOrderInfoEntity entity = ConvertUtil.entityToVo(addVo, PlayOrderInfoEntity.class);
|
||||
entity.setId(IdUtil.fastSimpleUUID());
|
||||
entity.setFirstOrder(true);
|
||||
// entity.setOrderMoney(String.valueOf(orderTotalMoney));
|
||||
|
||||
orderInfoService.create(entity);
|
||||
|
||||
// 记录订单日志
|
||||
// orderLogInfoService.create(new OrderLogInfoEntity(entity.getId(), "0", new Date()));
|
||||
// 记录订单详细信息
|
||||
// orderDetailsInfoService.create(new OrderDetailsInfoEntity(entity.getId(), addVo.getPlayUserId(), "0"));
|
||||
// for (String commodityInfoId : addVo.getCouponIds()) {
|
||||
// orderDetailsInfoService.create(new OrderDetailsInfoEntity(entity.getId(), commodityInfoId, "1"));
|
||||
// }
|
||||
// 发送通知给陪玩,等待陪玩接单
|
||||
|
||||
return R.ok("下单成功,等待接单");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询订单列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public R list(OrderInfoQueryVo vo) {
|
||||
return R.ok(orderInfoService.selectOrderInfoList(vo));
|
||||
public R list(PlayOrderInfoQueryVo vo) {
|
||||
return R.ok(orderInfoService.selectOrderInfoPage(vo));
|
||||
}
|
||||
|
||||
|
||||
@@ -158,17 +56,6 @@ public class PlayOrderInfoController {
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID进行订单退款
|
||||
*/
|
||||
|
||||
@Log(title = "用户发起订单退款申请", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/refund/{id}")
|
||||
public R refund(@RequestBody OrderInfoRefundVo vo) {
|
||||
orderInfoService.orderRefund(vo.getId(), vo.getRefundType(), vo.getRefundMoney(), false);
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除订单
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.starry.admin.modules.order.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.order.module.entity.PlayOrderComplaintInfoEntity;
|
||||
|
||||
/**
|
||||
* 订单投诉信息Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-07
|
||||
*/
|
||||
public interface PlayOrderComplaintInfoMapper extends MPJBaseMapper<PlayOrderComplaintInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.starry.admin.modules.order.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.order.module.entity.PlayOrderEvaluateInfoEntity;
|
||||
|
||||
/**
|
||||
* 订单评价信息Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-07
|
||||
*/
|
||||
public interface PlayOrderEvaluateInfoMapper extends MPJBaseMapper<PlayOrderEvaluateInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.starry.admin.modules.order.module.constant;
|
||||
|
||||
/**
|
||||
* @author 杭州世平信息科技有限公司-xuhq
|
||||
* @since 2024/5/8 15:41
|
||||
**/
|
||||
public class OrderConstant {
|
||||
|
||||
/**
|
||||
* 订单状态-待接单
|
||||
*
|
||||
* @since 2024/5/8 15:42
|
||||
**/
|
||||
public final static String ORDER_STATUS_0 = "0";
|
||||
|
||||
/**
|
||||
* 订单状态-待开始
|
||||
*
|
||||
* @since 2024/5/8 15:42
|
||||
**/
|
||||
public final static String ORDER_STATUS_1 = "1";
|
||||
|
||||
/**
|
||||
* 订单状态-服务中
|
||||
*
|
||||
* @since 2024/5/8 15:42
|
||||
**/
|
||||
public final static String ORDER_STATUS_2 = "2";
|
||||
|
||||
/**
|
||||
* 订单状态-已完成
|
||||
*
|
||||
* @since 2024/5/8 15:42
|
||||
**/
|
||||
public final static String ORDER_STATUS_3 = "3";
|
||||
|
||||
/**
|
||||
* 订单状态-已取消
|
||||
*
|
||||
* @since 2024/5/8 15:42
|
||||
**/
|
||||
public final static String ORDER_STATUS_4 = "4";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.starry.admin.modules.order.module.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 订单投诉信息对象 play_order_complaint_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-07
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_order_complaint_info")
|
||||
public class PlayOrderComplaintInfoEntity extends BaseEntity<PlayOrderComplaintInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* uuid
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
* 顾客ID
|
||||
*/
|
||||
private String customId;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 投诉人微信号码
|
||||
*/
|
||||
private String wxChatCode;
|
||||
|
||||
/**
|
||||
* 投诉内容
|
||||
*/
|
||||
private String complaintCon;
|
||||
|
||||
/**
|
||||
* 投诉时间
|
||||
*/
|
||||
private Date complaintTime;
|
||||
|
||||
/**
|
||||
* 图片列表
|
||||
*/
|
||||
private String images;
|
||||
|
||||
/**
|
||||
* 数据是否隐藏(0:未隐藏,1:隐藏)
|
||||
*/
|
||||
private String hidden;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.starry.admin.modules.order.module.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 订单评价信息对象 play_order_evaluate_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-07
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_order_evaluate_info")
|
||||
public class PlayOrderEvaluateInfoEntity extends BaseEntity<PlayOrderEvaluateInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* uuid
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
* 顾客ID
|
||||
*/
|
||||
private String customId;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 匿名评价(0:匿名,1:非匿名)
|
||||
*/
|
||||
private String anonymous;
|
||||
|
||||
/**
|
||||
* 评价类型(0:好评,1差评)
|
||||
*/
|
||||
private String evaluateType;
|
||||
|
||||
/**
|
||||
* 评价等级【1-5星,最低1星,最高5星】
|
||||
*/
|
||||
private Integer evaluateLevel;
|
||||
|
||||
/**
|
||||
* 评价内容
|
||||
*/
|
||||
private String evaluateCon;
|
||||
|
||||
/**
|
||||
* 评价时间
|
||||
*/
|
||||
private Date evaluateTime;
|
||||
|
||||
/**
|
||||
* 数据是否隐藏(0:未隐藏,1:隐藏)
|
||||
*/
|
||||
private String hidden;
|
||||
|
||||
|
||||
}
|
||||
@@ -8,7 +8,6 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -21,7 +20,7 @@ import java.util.List;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
|
||||
@TableName("play_order_info")
|
||||
@TableName(value = "play_order_info", autoResultMap = true)
|
||||
public class PlayOrderInfoEntity extends BaseEntity<PlayOrderInfoEntity> {
|
||||
|
||||
|
||||
@@ -37,17 +36,16 @@ public class PlayOrderInfoEntity extends BaseEntity<PlayOrderInfoEntity> {
|
||||
|
||||
/**
|
||||
* 订单状态【0:1:2:3:4:5】
|
||||
* 0:已下单
|
||||
* 1:已审核(退款 或者 提现需要审核,其余不需要)
|
||||
* 2:已接单
|
||||
* 3:已开始
|
||||
* 4:已完成
|
||||
* 5:已取消
|
||||
* 0:已下单(待接单)
|
||||
* 1:已接单(待开始)
|
||||
* 2:已开始(服务中)
|
||||
* 3:已完成
|
||||
* 4:已取消
|
||||
*/
|
||||
private String orderStatus;
|
||||
|
||||
/**
|
||||
* 订单类型【0:充值订单;1:提现订单;2:普通订单】
|
||||
* 订单类型【-1:退款订单;0:充值订单;1:提现订单;2:普通订单】
|
||||
*/
|
||||
private String orderType;
|
||||
|
||||
@@ -83,19 +81,29 @@ public class PlayOrderInfoEntity extends BaseEntity<PlayOrderInfoEntity> {
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
private String commodityNumber;
|
||||
private int commodityNumber;
|
||||
|
||||
/**
|
||||
* 优惠券列表
|
||||
*/
|
||||
@TableField(typeHandler = StringTypeHandler.class)
|
||||
private List<String> couponIds = new ArrayList<>();
|
||||
private List<String> couponIds;
|
||||
|
||||
/**
|
||||
* 支付方式,0:余额支付,1:微信支付,2:支付宝支付
|
||||
*/
|
||||
private String payMethod;
|
||||
|
||||
/**
|
||||
* 支付状态,[-1:支付失败,0:未支付;1:支付中;2:支付完成]
|
||||
*/
|
||||
private String payState;
|
||||
|
||||
/**
|
||||
* 支付消息
|
||||
*/
|
||||
private String payMsg;
|
||||
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
@@ -123,6 +131,11 @@ public class PlayOrderInfoEntity extends BaseEntity<PlayOrderInfoEntity> {
|
||||
*/
|
||||
private String reviewRequired;
|
||||
|
||||
/**
|
||||
* 审核状态(0:未审核,1:已通过,2:不通过)
|
||||
*/
|
||||
private String reviewState;
|
||||
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
|
||||
@@ -10,7 +10,7 @@ import javax.validation.constraints.NotBlank;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 陪玩订单对象 order_info
|
||||
* 陪聊订单对象 order_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-20
|
||||
@@ -52,9 +52,9 @@ public class OrderInfoAddVo extends BaseEntity<OrderInfoAddVo> {
|
||||
private String placeType;
|
||||
|
||||
/**
|
||||
* 陪玩ID
|
||||
* 陪聊ID
|
||||
*/
|
||||
@NotBlank(message = "陪玩对象不能为空")
|
||||
@NotBlank(message = "陪聊对象不能为空")
|
||||
private String playUserId;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
package com.starry.admin.modules.order.module.vo;
|
||||
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 订单信息对象 order_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
|
||||
public class OrderInfoRewardVo extends BaseEntity<OrderInfoRewardVo> {
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@NotBlank(message = "租户ID不能为空")
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@NotBlank(message = "打赏对象不能为空")
|
||||
private String playUserId;
|
||||
|
||||
/**
|
||||
* 订单类型【0:充值订单;1:提现订单;2:普通订单】
|
||||
*/
|
||||
private String orderType = String.valueOf(2);
|
||||
|
||||
/**
|
||||
* 下单类型(0:指定单,1:随机单。2:打赏单)
|
||||
*/
|
||||
@NotBlank(message = "下单类型不能为空")
|
||||
private String placeType = "2";
|
||||
|
||||
/**
|
||||
* 金额,单位分
|
||||
*/
|
||||
@NotBlank(message = "打赏金额不能为空")
|
||||
private String money;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.starry.admin.modules.order.module.vo;
|
||||
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 订单投诉查询对象
|
||||
*
|
||||
* @author admin
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayOrderComplaintQueryVo extends BasePageEntity {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.starry.admin.modules.order.module.vo;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 订单投诉查询返回对象
|
||||
*
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayOrderComplaintReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* uuid
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
* 顾客ID
|
||||
*/
|
||||
private String customId;
|
||||
|
||||
/**
|
||||
* 顾客昵称
|
||||
*/
|
||||
private String customNickname;
|
||||
|
||||
/**
|
||||
* 顾客头像
|
||||
*/
|
||||
private String customAvatar;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 顾客昵称
|
||||
*/
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 顾客头像
|
||||
*/
|
||||
private String clerkAvatar;
|
||||
|
||||
/**
|
||||
* 投诉人微信号码
|
||||
*/
|
||||
private String wxChatCode;
|
||||
|
||||
/**
|
||||
* 投诉内容
|
||||
*/
|
||||
private String complaintCon;
|
||||
|
||||
/**
|
||||
* 投诉时间
|
||||
*/
|
||||
private Date complaintTime;
|
||||
|
||||
/**
|
||||
* 图片列表
|
||||
*/
|
||||
private String images;
|
||||
|
||||
/**
|
||||
* 数据是否隐藏(0:未隐藏,1:隐藏)
|
||||
*/
|
||||
private String hidden;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.starry.admin.modules.order.module.vo;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 订单评价查询对象
|
||||
*
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayOrderEvaluateEditVo {
|
||||
|
||||
@NotBlank(message = "ID不能为空")
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 数据是否隐藏(0:未隐藏,1:隐藏)
|
||||
*/
|
||||
private String hidden;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.starry.admin.modules.order.module.vo;
|
||||
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 订单评价查询对象
|
||||
*
|
||||
* @author admin
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayOrderEvaluateQueryVo extends BasePageEntity {
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.starry.admin.modules.order.module.vo;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 订单评价查询返回对象
|
||||
*
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayOrderEvaluateReturnVo {
|
||||
|
||||
/**
|
||||
* uuid
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
* 匿名评价(0:匿名,1:非匿名)
|
||||
*/
|
||||
private String anonymous;
|
||||
/**
|
||||
* 评价类型(0:好评,1差评)
|
||||
*/
|
||||
private String evaluateType;
|
||||
|
||||
/**
|
||||
* 评价等级【1-5星,最低1星,最高5星】
|
||||
*/
|
||||
private Integer evaluateLevel;
|
||||
|
||||
/**
|
||||
* 评价内容
|
||||
*/
|
||||
private String evaluateCon;
|
||||
|
||||
/**
|
||||
* 评价时间
|
||||
*/
|
||||
private Date evaluateTime;
|
||||
|
||||
/**
|
||||
* 数据是否隐藏(0:未隐藏,1:隐藏)
|
||||
*/
|
||||
private String hidden;
|
||||
|
||||
|
||||
/**
|
||||
* 顾客ID
|
||||
*/
|
||||
private String customId;
|
||||
|
||||
/**
|
||||
* 顾客昵称
|
||||
*/
|
||||
private String customNickname;
|
||||
|
||||
/**
|
||||
* 顾客头像
|
||||
*/
|
||||
private String customAvatar;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 顾客昵称
|
||||
*/
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 顾客头像
|
||||
*/
|
||||
private String clerkAvatar;
|
||||
}
|
||||
@@ -7,14 +7,14 @@ import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 订单对象 order_info
|
||||
* 订单查询对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class OrderInfoQueryVo extends BasePageEntity {
|
||||
public class PlayOrderInfoQueryVo extends BasePageEntity {
|
||||
|
||||
|
||||
/**
|
||||
@@ -25,11 +25,10 @@ public class OrderInfoQueryVo extends BasePageEntity {
|
||||
/**
|
||||
* 订单状态【0:1:2:3:4:5】
|
||||
* 0:已下单
|
||||
* 1:已审核(退款 或者 提现需要审核,其余不需要)
|
||||
* 2:已接单
|
||||
* 3:已开始
|
||||
* 4:已完成
|
||||
* 5:已取消
|
||||
* 1:已接单
|
||||
* 2:已开始
|
||||
* 3:已完成
|
||||
* 4:已取消
|
||||
*/
|
||||
private String orderStatus;
|
||||
|
||||
@@ -44,7 +43,7 @@ public class OrderInfoQueryVo extends BasePageEntity {
|
||||
private String placeType;
|
||||
|
||||
/**
|
||||
* 是否是首单【0:不是。1:是】
|
||||
* 是否是首单【0:不是;1:是】
|
||||
*/
|
||||
private Integer firstOrder;
|
||||
|
||||
@@ -61,7 +60,7 @@ public class OrderInfoQueryVo extends BasePageEntity {
|
||||
/**
|
||||
* 下单人
|
||||
*/
|
||||
private Date purchaserBy;
|
||||
private String purchaserBy;
|
||||
|
||||
/**
|
||||
* 下单时间
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.starry.admin.modules.order.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 订单查询返回对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class PlayOrderInfoReturnVo {
|
||||
|
||||
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private String customId;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String customNickname;
|
||||
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
private String customAvatar;
|
||||
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 店员头像
|
||||
*/
|
||||
private String clerkAvatar;
|
||||
|
||||
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
private Date purchaserTime;
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal orderMoney;
|
||||
|
||||
|
||||
/**
|
||||
* 订单最终金额
|
||||
*/
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private String commodityId;
|
||||
|
||||
/**
|
||||
* 商品类型[0:礼物,1:服务]
|
||||
*/
|
||||
private String commodityType;
|
||||
|
||||
/**
|
||||
* 商品类型[0:礼物,1:服务]
|
||||
*/
|
||||
private String commodityName;
|
||||
/**
|
||||
* 商品单价
|
||||
*/
|
||||
private BigDecimal commodityPrice;
|
||||
|
||||
/**
|
||||
* 服务市场
|
||||
*
|
||||
* @since 2024/5/8 16:44
|
||||
**/
|
||||
private String serviceDuration;
|
||||
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
private int commodityNumber;
|
||||
|
||||
/**
|
||||
* 订单状态【0:1:2:3:4】
|
||||
* 0:已下单(待接单)
|
||||
* 1:已接单(待开始)
|
||||
* 2:已开始(服务中)
|
||||
* 3:已完成
|
||||
* 4:已取消
|
||||
*/
|
||||
private String orderStatus;
|
||||
|
||||
/**
|
||||
* 下单类型(0:指定单,1:随机单。2:打赏单)
|
||||
*/
|
||||
private String placeType;
|
||||
|
||||
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import java.util.Date;
|
||||
|
||||
/**
|
||||
* 打赏订单查询返回信息
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayOrderRewardReturnVo {
|
||||
@@ -19,34 +20,34 @@ public class PlayOrderRewardReturnVo {
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private String customUserId;
|
||||
private String customId;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String customUserNickname;
|
||||
private String customNickname;
|
||||
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
private String customUserAvatar;
|
||||
private String customAvatar;
|
||||
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkUserId;
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String clerkUserNickname;
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 店员头像
|
||||
*/
|
||||
private String clerkUserAvatar;
|
||||
private String clerkAvatar;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user