diff --git a/pom.xml b/pom.xml
index 2ea4374..ca2656e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,11 +20,23 @@
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
com.belerweb
pinyin4j
2.5.1
+
+ p6spy
+ p6spy
+ 3.8.2
+
org.apache.commons
commons-lang3
@@ -102,6 +114,22 @@
1.3.5
+
+ com.baomidou
+ mybatis-plus-boot-starter
+ 3.3.1
+
+
+ org.mybatis
+ mybatis-spring
+
+
+ org.springframework.boot
+ spring-boot-starter-jdbc
+
+
+
+
org.springframework.boot
spring-boot-starter-validation
@@ -203,6 +231,12 @@
io.netty
netty-all
+
+
+ com.alipay.sdk
+ alipay-sdk-java
+ 4.39.165.ALL
+
org.springframework.boot
spring-boot-starter-amqp
@@ -214,6 +248,11 @@
weixin-java-miniapp
3.8.0
+
+ junit
+ junit
+ test
+
@@ -273,4 +312,4 @@
-
\ No newline at end of file
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/alipayUtil/AlipayUtil.java b/src/main/java/com/chaozhanggui/system/cashierservice/alipayUtil/AlipayUtil.java
new file mode 100644
index 0000000..7617b8f
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/alipayUtil/AlipayUtil.java
@@ -0,0 +1,134 @@
+package com.chaozhanggui.system.cashierservice.alipayUtil;
+
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.json.JSONObject;
+import cn.hutool.json.JSONUtil;
+import com.alipay.api.AlipayApiException;
+import com.alipay.api.AlipayClient;
+import com.alipay.api.AlipayConfig;
+import com.alipay.api.DefaultAlipayClient;
+import com.alipay.api.internal.util.AlipayEncrypt;
+import com.alipay.api.request.AlipaySystemOauthTokenRequest;
+import com.alipay.api.response.AlipaySystemOauthTokenResponse;
+import lombok.SneakyThrows;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+/**
+ * 支付宝通用SDK工具类
+ *
+ * @author tankaikai
+ * @since 2024-09-23 16:15
+ */
+
+@Slf4j
+@Component
+public class AlipayUtil {
+
+ /**
+ * 网关地址 线上:https://openapi.alipay.com/gateway.do 沙箱:https://openapi.alipaydev.com/gateway.do
+ */
+ @Value("${alipay.sdk.config.serverUrl}")
+ private String serverUrl;
+ /**
+ * 应用ID
+ */
+ @Value("${alipay.sdk.config.appId}")
+ private String appId;
+ /**
+ * 应用私钥
+ */
+ @Value("${alipay.sdk.config.privateKey}")
+ private String privateKey;
+ /**
+ * 支付宝公钥
+ */
+ @Value("${alipay.sdk.config.alipayPublicKey}")
+ private String alipayPublicKey;
+ /**
+ * 支付宝公钥
+ */
+ @Value("${alipay.sdk.config.encryptKey}")
+ private String encryptKey;
+
+ /**
+ * 创建支付宝客户端
+ * @return AlipayClient
+ */
+ @SneakyThrows
+ public AlipayClient createClient() {
+ AlipayConfig alipayConfig = new AlipayConfig();
+ //设置网关地址
+ alipayConfig.setServerUrl(serverUrl);
+ //设置应用ID
+ alipayConfig.setAppId(appId);
+ //设置应用私钥
+ alipayConfig.setPrivateKey(privateKey);
+ //设置支付宝公钥
+ alipayConfig.setAlipayPublicKey(alipayPublicKey);
+ return new DefaultAlipayClient(alipayConfig);
+ }
+
+ /**
+ * 获取支付宝用户的openId
+ * @param code 用户信息授权码
+ * @return openId
+ */
+ public String getOpenId(String code) throws Exception{
+ AlipaySystemOauthTokenRequest req = new AlipaySystemOauthTokenRequest();
+ //SDK已经封装掉了公共参数,这里只需要传入业务参数
+ req.setCode(code);
+ req.setGrantType("authorization_code");
+ //此次只是参数展示,未进行字符串转义,实际情况下请转义
+ //req.setBizContent(" {" + " \"primary_industry_name\":\"IT科技/IT软件与服务\"," + " \"primary_industry_code\":\"10001/20102\"," + " \"secondary_industry_code\":\"10001/20102\"," + " \"secondary_industry_name\":\"IT科技/IT软件与服务\"" + " }");
+ AlipaySystemOauthTokenResponse response;
+ try {
+ response = createClient().execute(req);
+ }catch (AlipayApiException e){
+ log.error("获取支付宝用户信息失败,错误码:{},错误信息:{}", e.getErrCode(), e.getErrMsg());
+ throw e;
+ }
+ log.info("获取支付宝用户信息成功,返回结果:{}", response.getBody());
+ //调用失败
+ if (!response.isSuccess()) {
+ log.error("获取支付宝用户信息失败,错误码:{},错误信息:{}", response.getSubCode(), response.getSubMsg());
+ throw new AlipayApiException(response.getSubCode(), response.getSubMsg());
+ }
+ //调用成功,则处理业务逻辑,为配合支付系统确定沿用支付宝的老标准使用userId
+ return response.getUserId();
+ }
+
+ /**
+ * 获取支付宝用户的手机号码
+ * @param encryptedData 密文
+ * @return mobile
+ */
+ public String getMobile(String encryptedData) throws Exception{
+ if(StrUtil.isEmpty(encryptedData)){
+ throw new AlipayApiException("加密数据不能为空");
+ }
+ try {
+ log.info("解密前的数据,返回结果:{}", encryptedData);
+ String resp = AlipayEncrypt.decryptContent(encryptedData, "AES", encryptKey, "UTF-8");
+ log.info("解密后的数据,返回结果:{}", resp);
+ boolean isJson = JSONUtil.isJson(resp);
+ if(!isJson){
+ throw new AlipayApiException("解密后的数据不是json格式");
+ }
+ JSONObject jsonObject = JSONUtil.parseObj(resp);
+ String code = jsonObject.getStr("code");
+ String msg = jsonObject.getStr("msg");
+ String mobile = jsonObject.getStr("mobile");
+ if("10000".equals(code)){
+ return mobile;
+ }else{
+ throw new AlipayApiException(code,msg);
+ }
+ }catch (AlipayApiException e){
+ log.error("获取支付宝用户的手机号码失败,错误码:{},错误信息:{}", e.getErrCode(), e.getErrMsg());
+ throw e;
+ }
+ }
+
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/auth/AuthSource.java b/src/main/java/com/chaozhanggui/system/cashierservice/auth/AuthSource.java
new file mode 100644
index 0000000..11b952e
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/auth/AuthSource.java
@@ -0,0 +1,35 @@
+package com.chaozhanggui.system.cashierservice.auth;
+
+/**
+ * 三方登录认证来源
+ * @author tankaikai
+ * @since 2024-09-23 17:51
+ */
+public enum AuthSource {
+ WECHAT("微信", "wechat"),
+ ALIPAY("支付宝", "alipay");
+
+ private String name;
+ private String value;
+
+ AuthSource(String name, String value) {
+ this.name = name;
+ this.value = value;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/auth/LoginFilter.java b/src/main/java/com/chaozhanggui/system/cashierservice/auth/LoginFilter.java
index d2d0f9c..cb6cfc2 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/auth/LoginFilter.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/auth/LoginFilter.java
@@ -49,6 +49,7 @@ public class LoginFilter implements Filter {
// "cashierService/login/**",//登录部分接口不校验
"cashierService/login/wx/**",//登录部分接口不校验
+ "cashierService/login/auth/**",//登录部分接口不校验
"cashierService/login/app/login",//登录部分接口不校验
"cashierService/product/queryProduct",
"cashierService/product/queryProductSku",
@@ -94,7 +95,7 @@ public class LoginFilter implements Filter {
return;
}
- //environment 环境标识 wx app 后续environment不可为空
+ //environment 环境标识 wx alipay app 后续environment不可为空
String environment = request.getHeader("environment");
// 判断用户TOKEN是否存在
@@ -130,7 +131,7 @@ public class LoginFilter implements Filter {
String userId = jsonObject1.getString("userId");
tokenKey=RedisCst.ONLINE_APP_USER.concat(userId);
//获取redis中的token
- }else if(environment.equals("wx")){
+ }else if(environment.equals("wx") || environment.equals("alipay")){
//获取当前登录人的用户id
String openId = jsonObject1.getString("openId");
if(StringUtils.isBlank(openId)){
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/config/MyBatisPlusConfig.java b/src/main/java/com/chaozhanggui/system/cashierservice/config/MyBatisPlusConfig.java
new file mode 100644
index 0000000..253f70e
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/config/MyBatisPlusConfig.java
@@ -0,0 +1,12 @@
+package com.chaozhanggui.system.cashierservice.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.Properties;
+
+@Configuration
+public class MyBatisPlusConfig {
+
+}
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/config/RequestLoggingConfig.java b/src/main/java/com/chaozhanggui/system/cashierservice/config/RequestLoggingConfig.java
new file mode 100644
index 0000000..e5207cf
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/config/RequestLoggingConfig.java
@@ -0,0 +1,30 @@
+package com.chaozhanggui.system.cashierservice.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.annotation.Order;
+import org.springframework.web.filter.CommonsRequestLoggingFilter;
+
+@Configuration
+public class RequestLoggingConfig {
+ @Bean
+ @Order(-9999)
+ public CommonsRequestLoggingFilter logFilter() {
+ CommonsRequestLoggingFilter filter = new CommonsRequestLoggingFilter();
+ // 是否记录请求的查询参数信息
+ filter.setIncludeQueryString(true);
+ // 是否记录请求body内容
+ filter.setIncludePayload(true);
+ filter.setMaxPayloadLength(10000);
+ //是否记录请求header信息
+ filter.setIncludeHeaders(false);
+ // 是否记录请求客户端信息
+ filter.setIncludeClientInfo(true);
+ // 设置日期记录的前缀
+ filter.setBeforeMessagePrefix("\033[32;4m请求开始:");
+ filter.setBeforeMessageSuffix("\033[0m");
+ filter.setAfterMessagePrefix("\033[34m请求结束:");
+ filter.setAfterMessageSuffix("\033[0m");
+ return filter;
+ }
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/constant/TableConstant.java b/src/main/java/com/chaozhanggui/system/cashierservice/constant/TableConstant.java
new file mode 100644
index 0000000..34717e0
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/constant/TableConstant.java
@@ -0,0 +1,153 @@
+package com.chaozhanggui.system.cashierservice.constant;
+
+import io.netty.handler.codec.http2.Http2FrameStreamEvent;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+
+import java.util.Objects;
+
+public interface TableConstant {
+ String CART_SEAT_ID = "-999";
+
+ class ShopTable {
+ @Getter
+ public enum State {
+ IDLE("idle"), CLOSED("closed"), PAYING("paying"), PENDING("pending"), USING("using"), CLEANING("cleaning");
+ private final String value;
+
+ State(String value) {
+ this.value = value;
+ }
+ }
+ }
+
+ class OrderInfo {
+ @Getter
+ public enum Status {
+ REFUNDING("refunding"), REFUND("refund"), CLOSED("closed"), CREATE("create"),
+ UNPAID("unpaid"), PAYING("paying"), RETURN("return");
+ private final String value;
+
+ Status(String value) {
+ this.value = value;
+ }
+ }
+
+ @Getter
+ public enum UseType {
+ TAKEOUT("takeout"),
+ DINE_IN_AFTER("dine-in-after"),
+ DINE_IN_BEFORE("dine-in-before");
+ private final String value;
+
+ UseType(String value) {
+ this.value = value;
+ }
+
+ public boolean equalsVals(String value) {
+ return this.value.equals(value);
+ }
+ }
+ }
+
+ class FreeDineRecord {
+ @Getter
+ public enum State {
+ WAIT_PAY(0),
+ SUCCESS_PAY(1),
+ FAIL_PAY(2);
+ private final Integer value;
+
+ State(Integer value) {
+ this.value = value;
+ }
+ }
+
+ @Getter
+ public enum UseType {
+ TAKEOUT("takeout"),
+ DINE_IN_AFTER("dine-in-after"),
+ DINE_IN_BEFORE("dine-in-before");
+ private final String value;
+
+ UseType(String value) {
+ this.value = value;
+ }
+
+ public boolean equalsVals(String value) {
+ return this.value.equals(value);
+ }
+ }
+ }
+
+ class ShopInfo {
+ @Getter
+ public enum EatModel {
+ TAKEOUT("takeout"),
+ DINE_IN("dine-in");
+ private final String value;
+
+ EatModel(String value) {
+ this.value = value;
+ }
+
+ public boolean equalsVals(String value) {
+ return this.value.equals(value);
+ }
+ }
+ }
+
+ class MemberIn {
+ @Getter
+ public enum Type {
+ NORMAL(0),
+ FREE_DINE(1);
+ private final Integer value;
+
+ Type(Integer value) {
+ this.value = value;
+ }
+
+ public boolean equalsVals(Integer value) {
+ return Objects.equals(this.value, value);
+ }
+ }
+ }
+
+ class ActivateOutRecord {
+ @Getter
+ public enum Type {
+ // 满减
+ FULL_REDUCTION(1),
+ // 商品
+ PRODUCT(2);
+ private final Integer value;
+
+ Type(Integer value) {
+ this.value = value;
+ }
+
+ public boolean equalsVals(Integer value) {
+ return Objects.equals(this.value, value);
+ }
+ }
+ @Getter
+ public enum Status {
+ CREATE("create"),
+ CANCEL("cancel"),
+ // 商品
+ CLOSED("closed");
+ private final String value;
+
+ Status(String value) {
+ this.value = value;
+ }
+
+ public boolean equalsVals(String value) {
+ return this.value.equals(value);
+ }
+ }
+ }
+
+
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/CommonController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/CommonController.java
index 83211ee..c826119 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/controller/CommonController.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/CommonController.java
@@ -1,11 +1,13 @@
package com.chaozhanggui.system.cashierservice.controller;
-import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSONObject;
import com.chaozhanggui.system.cashierservice.dao.TbPlatformDictMapper;
+import com.chaozhanggui.system.cashierservice.dao.TbShopExtendMapper;
import com.chaozhanggui.system.cashierservice.entity.TbPlatformDict;
import com.chaozhanggui.system.cashierservice.entity.dto.WxMsgSubDTO;
import com.chaozhanggui.system.cashierservice.entity.vo.DistrictVo;
import com.chaozhanggui.system.cashierservice.exception.MsgException;
+import com.chaozhanggui.system.cashierservice.netty.PushToClientChannelHandlerAdapter;
import com.chaozhanggui.system.cashierservice.redis.RedisCst;
import com.chaozhanggui.system.cashierservice.redis.RedisUtil;
import com.chaozhanggui.system.cashierservice.service.FileService;
@@ -24,12 +26,14 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
+import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
+import java.util.Map;
/**
* 通用接口
@@ -50,6 +54,8 @@ public class CommonController {
private TbPlatformDictMapper platformDictMapper;
@Resource
private FileService fileService;
+ @Resource
+ private TbShopExtendMapper extendMapper;
private final LoginService loginService;;
@@ -163,6 +169,21 @@ public class CommonController {
return new Result(CodeEnum.SUCCESS, fileService.uploadFile(file));
}
+ @RequestMapping("common/shopExtend")
+ public Result getShopExtend(@RequestBody Map map) {
+ if (CollectionUtils.isEmpty(map) || !map.containsKey("shopId") || !map.containsKey("autokey")) return new Result(CodeEnum.SUCCESS);
+ return new Result(CodeEnum.SUCCESS, extendMapper.queryByShopIdAndAutoKey(Integer.valueOf(map.get("shopId").toString()),map.get("autokey")));
+ }
+
+ /**
+ * 交班
+ */
+ @PostMapping("common/handoverData")
+ public Result handoverData(@RequestBody Map map) throws Exception{
+ PushToClientChannelHandlerAdapter.getInstance().AppSendInfo(JSONObject.toJSONString(map),map.get("shopId"));
+ return Result.success(CodeEnum.SUCCESS);
+ }
+
// 检查手机号格式是否正确的方法
private boolean isValidPhoneNumber(String phone) {
return phone.matches("^1[3-9]\\d{9}$");
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/LoginContoller.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/LoginContoller.java
index 8fd3de8..55dc30d 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/controller/LoginContoller.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/LoginContoller.java
@@ -2,8 +2,10 @@ package com.chaozhanggui.system.cashierservice.controller;
import cn.binarywang.wx.miniapp.util.crypt.WxMaCryptUtils;
import cn.hutool.core.util.ObjectUtil;
-import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
+import com.alipay.api.AlipayApiException;
+import com.chaozhanggui.system.cashierservice.alipayUtil.AlipayUtil;
+import com.chaozhanggui.system.cashierservice.auth.AuthSource;
import com.chaozhanggui.system.cashierservice.dao.TbMerchantAccountMapper;
import com.chaozhanggui.system.cashierservice.entity.TbMerchantAccount;
import com.chaozhanggui.system.cashierservice.entity.TbUserInfo;
@@ -16,10 +18,12 @@ import com.chaozhanggui.system.cashierservice.service.LoginService;
import com.chaozhanggui.system.cashierservice.service.OnlineUserService;
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
import com.chaozhanggui.system.cashierservice.sign.Result;
-import com.chaozhanggui.system.cashierservice.util.*;
+import com.chaozhanggui.system.cashierservice.util.IpUtil;
+import com.chaozhanggui.system.cashierservice.util.MD5Utils;
+import com.chaozhanggui.system.cashierservice.util.StringUtil;
+import com.chaozhanggui.system.cashierservice.util.TokenUtil;
import com.chaozhanggui.system.cashierservice.wxUtil.WechatUtil;
import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -60,28 +64,27 @@ public class LoginContoller {
@Autowired
RedisUtil redisUtil;
+ @Resource
+ AlipayUtil alipayUtil;
+
@RequestMapping("/wx/business/login")
- public Result wxBusinessLogin(@RequestParam(value = "code", required = false) String code,
- @RequestParam(value = "shopId", required = false) String shopId
- ) {
+ public Result wxBusinessLogin(@RequestParam(value = "code", required = false) String code, @RequestParam(value = "shopId", required = false) String shopId) {
JSONObject SessionKeyOpenId = WechatUtil.getSessionKeyOrOpenId(code, businessAppId, businessSecrete);
String openid = SessionKeyOpenId.getString("openid");
- if(Objects.isNull(openid)){
+ if (Objects.isNull(openid)) {
return Result.fail("获取微信id失败");
}
- return loginService.wxBusinessLogin(openid,shopId);
+ return loginService.wxBusinessLogin(openid, shopId);
}
@GetMapping("/wx/business/openId")
- public Result getOpenId(
- @RequestParam String code
- ) {
+ public Result getOpenId(@RequestParam String code) {
JSONObject SessionKeyOpenId = WechatUtil.getSessionKeyOrOpenId(code, customAppId, customSecrete);
String openid = SessionKeyOpenId.getString("openid");
- if(Objects.isNull(openid)){
+ if (Objects.isNull(openid)) {
return Result.fail("获取微信id失败");
}
@@ -95,50 +98,46 @@ public class LoginContoller {
* @param map
* @return
*/
- @RequestMapping("/wx/custom/login")
- public Result wxCustomLogin(HttpServletRequest request, @RequestBody Map map) {
+ @RequestMapping("/auth/custom/login")
+ public Result authCustomLogin(HttpServletRequest request, @RequestBody Map map) {
if (ObjectUtil.isNull(map) || ObjectUtil.isEmpty(map) || !map.containsKey("code") || ObjectUtil.isEmpty(map.get("code"))) {
Result.fail("code不能为空");
}
- String code = map.get("code").toString();
- String rawData = map.get("rawData");
-// String signature = map.get("signature");
-// String encryptedData = map.get("encryptedData");
-// String ivStr = map.get("iv");
-// String phone = map.get("phone");
- // 用户非敏感信息:rawData
- // 签名:signature
- JSONObject rawDataJson = JSON.parseObject(rawData);
- // 1.接收小程序发送的code
- // 2.开发者服务器 登录凭证校验接口 appi + appsecret + code
- JSONObject SessionKeyOpenId = WechatUtil.getSessionKeyOrOpenId(code, customAppId, customSecrete);
- // 3.接收微信接口服务 获取返回的参数
- String openid = SessionKeyOpenId.getString("openid");
-// String sessionKey = SessionKeyOpenId.getString("session_key");
-
- // 4.校验签名 小程序发送的签名signature与服务器端生成的签名signature2 = sha1(rawData + sessionKey)
-// String signature2 = DigestUtils.sha1Hex(rawData + sessionKey);
-// if (!signature.equals(signature2)) {
-// return Result.fail("签名校验失败");
-// }
-// String phone = "";
-// try{
-// String data = WxMaCryptUtils.decrypt(sessionKey, encryptedData, ivStr);
-// if (ObjectUtil.isNotEmpty(data) && JSONObject.parseObject(data).containsKey("phoneNumber")) {
-// }// phone =JSONObject.parseObject(data).get("phoneNumber").toString();
-// }catch (Exception e){
-// log.info("登录传参:获取手机号失败{}",e.getMessage());
-// }
- String nickName = rawDataJson.getString("nickName");
- String avatarUrl = rawDataJson.getString("avatarUrl");
- try {
- return loginService.wxCustomLogin(openid, avatarUrl, nickName, "", IpUtil.getIpAddr(request));
- } catch (Exception e) {
- e.printStackTrace();
+ // 三方登录来源 wechat、alipay
+ String source = map.getOrDefault("source",AuthSource.WECHAT.getValue());
+ String code = map.get("code");
+ if(AuthSource.WECHAT.getValue().equals(source)){
+ try {
+ // 1.接收小程序发送的code
+ // 2.开发者服务器 登录凭证校验接口 appi + appsecret + code
+ JSONObject wxResp = WechatUtil.getSessionKeyOrOpenId(code, customAppId, customSecrete);
+ //Integer errCode = wxResp.getInteger("errcode");
+ log.info("微信获取openid响应报文:{}", wxResp.toJSONString());
+ boolean hasOpenId = wxResp.containsKey("openid");
+ if (!hasOpenId) {
+ return Result.fail("登录失败:" + wxResp.getString("errmsg"));
+ }
+ String a = "{\"width\":\"58\",\"printerNum\":\"1\",\"categoryList\":[{\"id\":30,\"name\":\"奶茶\",\"shortName\":null,\"tree\":null,\"pid\":null,\"pic\":null,\"merchantId\":null,\"shopId\":null,\"style\":null,\"isShow\":null,\"detail\":null,\"sort\":null,\"keyWord\":null,\"createdAt\":null,\"updatedAt\":null},{\"id\":35,\"name\":\"酒水饮料\",\"shortName\":null,\"tree\":null,\"pid\":null,\"pic\":null,\"merchantId\":null,\"shopId\":null,\"style\":null,\"isShow\":null,\"detail\":null,\"sort\":null,\"keyWord\":null,\"createdAt\":null,\"updatedAt\":null},{\"id\":65,\"name\":\"火锅\",\"shortName\":null,\"tree\":null,\"pid\":null,\"pic\":null,\"merchantId\":null,\"shopId\":null,\"style\":null,\"isShow\":null,\"detail\":null,\"sort\":null,\"keyWord\":null,\"createdAt\":null,\"updatedAt\":null},{\"id\":95,\"name\":\"串串\",\"shortName\":null,\"tree\":null,\"pid\":null,\"pic\":null,\"merchantId\":null,\"shopId\":null,\"style\":null,\"isShow\":null,\"detail\":null,\"sort\":null,\"keyWord\":null,\"createdAt\":null,\"updatedAt\":null},{\"id\":96,\"name\":\"烧烤\",\"shortName\":null,\"tree\":null,\"pid\":null,\"pic\":null,\"merchantId\":null,\"shopId\":null,\"style\":null,\"isShow\":null,\"detail\":null,\"sort\":null,\"keyWord\":null,\"createdAt\":null,\"updatedAt\":null}],\"model\":\"normal\",\"feet\":\"0\",\"autoCut\":\"1\"}";
+ // 3.接收微信接口服务 获取返回的参数
+ String openid = wxResp.getString("openid");
+ return loginService.wxCustomLogin(openid, "", "", "", IpUtil.getIpAddr(request));
+ } catch (Exception e) {
+ e.printStackTrace();
+ log.error("登录失败:",e);
+ }
+ }else if(AuthSource.ALIPAY.getValue().equals(source)){
+ try {
+ String openId = alipayUtil.getOpenId(code);
+ return loginService.alipayCustomLogin(openId);
+ }catch (AlipayApiException e){
+ log.error("登录失败:",e);
+ return Result.fail("登录失败:"+e.getErrMsg());
+ }catch (Exception e){
+ e.printStackTrace();
+ log.error("登录失败:",e);
+ }
}
-
return Result.fail("登录失败");
-
}
@@ -179,14 +178,28 @@ public class LoginContoller {
// return Result.fail("获取手机号失败,请重试!");
// }
@RequestMapping("getPhoneNumber")
- public Result getPhoneNumber(@RequestHeader String openId,@RequestBody Map map) {
-
+ public Result getPhoneNumber(@RequestHeader String openId, @RequestBody Map map) {
+ String encryptedData = map.get("encryptedData");
+ // 三方登录来源 wechat、alipay
+ String source = map.getOrDefault("source",AuthSource.WECHAT.getValue());
+ if (AuthSource.ALIPAY.getValue().equals(source)) {
+ try {
+ String mobile = alipayUtil.getMobile(encryptedData);
+ return Result.success(CodeEnum.SUCCESS, mobile);
+ }catch (AlipayApiException e){
+ log.error("获取手机号失败:",e);
+ return Result.fail("获取手机号失败:"+e.getErrMsg());
+ }catch (Exception e){
+ e.printStackTrace();
+ log.error("登录手机号失败:",e);
+ return Result.fail("获取手机号失败:未知错误");
+ }
+ }
if (ObjectUtil.isNull(map) || ObjectUtil.isEmpty(map) || !map.containsKey("code") || ObjectUtil.isEmpty(map.get("code"))) {
Result.fail("code不能为空");
}
- String code = map.get("code").toString();
+ String code = map.get("code");
- String encryptedData = map.get("encryptedData");
String ivStr = map.get("iv");
if (StringUtils.isBlank(encryptedData) || StringUtils.isBlank(ivStr)) {
@@ -201,14 +214,14 @@ public class LoginContoller {
try {
if (ObjectUtil.isNotEmpty(data) && JSONObject.parseObject(data).containsKey("phoneNumber")) {
// if (!map.containsKey("shopId") || ObjectUtil.isEmpty(map.get("shopId"))) {
- return Result.success(CodeEnum.SUCCESS, JSONObject.parseObject(data).get("phoneNumber"));
+ return Result.success(CodeEnum.SUCCESS, JSONObject.parseObject(data).get("phoneNumber"));
// }
// log.info("登录传参 获取手机号成功 sessionKey:{}\n encryptedData:{} \nivStr:{} \n data:{},",sessionKey,encryptedData,ivStr,JSONObject.parseObject(data).get("phoneNumber"));
// return loginService.upPhone(openId,JSONObject.parseObject(data).get("phoneNumber").toString(),map.get("shopId").toString());
}
- } catch (Exception e){
+ } catch (Exception e) {
// e.printStackTrace();
- log.info("登录传参 获取手机号失败 sessionKey:{}\n encryptedData:{} \nivStr:{} \n data:{},",sessionKey,encryptedData,ivStr,data);
+ log.info("登录传参 获取手机号失败 sessionKey:{}\n encryptedData:{} \nivStr:{} \n data:{},", sessionKey, encryptedData, ivStr, data);
}
return Result.fail("获取手机号失败,请重试!");
}
@@ -254,10 +267,8 @@ public class LoginContoller {
* @return
*/
@GetMapping("createCardNo")
- public Result createCardNo(@RequestHeader("openId") String openId, @RequestHeader("token") String token, @RequestHeader("id") String id,
- @RequestParam("shopId") String shopId
- ) {
- return loginService.createCardNo(id, openId,shopId);
+ public Result createCardNo(@RequestHeader("openId") String openId, @RequestHeader("token") String token, @RequestHeader("id") String id, @RequestParam("shopId") String shopId) {
+ return loginService.createCardNo(id, openId, shopId);
}
@GetMapping("/userInfo")
@@ -267,6 +278,7 @@ public class LoginContoller {
/**
* 更新用户信息
+ *
* @param token
* @param userInfo
* @return
@@ -281,16 +293,16 @@ public class LoginContoller {
}
@PostMapping(value = "/upPass")
- public Result upPass(@RequestHeader String token,@RequestBody UserPassDto passVo){
+ public Result upPass(@RequestHeader String token, @RequestBody UserPassDto passVo) {
String userId = TokenUtil.parseParamFromToken(token).getString("userId");
String newPass = MD5Utils.MD5Encode(passVo.getNewPass(), "utf-8");
if (ObjectUtil.isNull(passVo.getCode())) {
String oldPass = MD5Utils.MD5Encode(passVo.getOldPass(), "utf-8");
- return loginService.upPass(userId,oldPass, newPass);
+ return loginService.upPass(userId, oldPass, newPass);
} else {
boolean tf = loginService.validate(passVo.getCode(), passVo.getPhone());
if (tf) {
- TbUserInfo userInfo=new TbUserInfo();
+ TbUserInfo userInfo = new TbUserInfo();
userInfo.setId(Integer.valueOf(userId));
userInfo.setPassword(newPass);
return loginService.upUserInfo(userInfo);
@@ -301,16 +313,16 @@ public class LoginContoller {
}
@PostMapping(value = "modityPass")
- public Result modityPass(@RequestHeader String token,@RequestBody UserPassDto passVo){
+ public Result modityPass(@RequestHeader String token, @RequestBody UserPassDto passVo) {
String userId = TokenUtil.parseParamFromToken(token).getString("userId");
String newPass = MD5Utils.MD5Encode(passVo.getNewPass(), "utf-8");
if (ObjectUtil.isNull(passVo.getCode())) {
String oldPass = MD5Utils.MD5Encode(passVo.getOldPass(), "utf-8");
- return loginService.upPass(userId,oldPass, newPass);
+ return loginService.upPass(userId, oldPass, newPass);
} else {
boolean tf = loginService.validate(passVo.getCode(), passVo.getPhone());
if (tf) {
- TbUserInfo userInfo=new TbUserInfo();
+ TbUserInfo userInfo = new TbUserInfo();
userInfo.setId(Integer.valueOf(userId));
userInfo.setPassword(newPass);
return loginService.upUserInfo(userInfo);
@@ -359,12 +371,12 @@ public class LoginContoller {
}
//验证密码
String mdPasswordString = MD5Utils.MD5Encode(authUserDto.getPassword(), "utf-8");
- return loginService.appLogin(authUserDto.getUsername(),openid, mdPasswordString);
+ return loginService.appLogin(authUserDto.getUsername(), openid, mdPasswordString);
} else {
// tf = true;
tf = loginService.validate(authUserDto.getCode(), authUserDto.getUsername());
if (tf) {
- return loginService.appLogin(authUserDto.getUsername(),openid, null);
+ return loginService.appLogin(authUserDto.getUsername(), openid, null);
} else {
return Result.fail("验证码输入有误");
}
@@ -393,29 +405,31 @@ public class LoginContoller {
/**
* 重置资金密码
+ *
* @param token
* @param map
* @return
*/
@RequestMapping("resetPwd")
- public Result resetPwd(@RequestHeader String token,@RequestBody Map map){
+ public Result resetPwd(@RequestHeader String token, @RequestBody Map map) {
String userId = TokenUtil.parseParamFromToken(token).getString("userId");
- return loginService.resetPwd(userId,map);
+ return loginService.resetPwd(userId, map);
}
/**
* 修改密码
+ *
* @param token
* @param map
* @return
*/
@RequestMapping("mpdifyPwd")
- public Result mpdifyPwd(@RequestHeader String token,@RequestBody Map map){
+ public Result mpdifyPwd(@RequestHeader String token, @RequestBody Map map) {
String userId = TokenUtil.parseParamFromToken(token).getString("userId");
- return loginService.modifyPwd(userId,map);
+ return loginService.modifyPwd(userId, map);
}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/NotifyController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/NotifyController.java
index adc35e7..151bcbd 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/controller/NotifyController.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/NotifyController.java
@@ -4,9 +4,9 @@ package com.chaozhanggui.system.cashierservice.controller;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
-import com.chaozhanggui.system.cashierservice.entity.Enum.PayTypeConstant;
import com.chaozhanggui.system.cashierservice.interceptor.RequestWrapper;
import com.chaozhanggui.system.cashierservice.service.PayService;
+import com.chaozhanggui.system.cashierservice.sign.Result;
import com.chaozhanggui.system.cashierservice.util.DateUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -14,8 +14,8 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
+import java.util.HashMap;
import java.util.Map;
-import java.util.Random;
@CrossOrigin(origins = "*")
@RestController
@@ -57,7 +57,8 @@ public class NotifyController {
if("TRADE_SUCCESS".equals(object.get("state").toString())){
String orderNo=object.get("mchOrderNo").toString();
String tradeNo=object.get("payOrderId").toString();
- return payService.fstMemberInSuccess(orderNo,tradeNo);
+ String payType=object.getStr("payType");
+ return payService.fstMemberInSuccess(orderNo,tradeNo, payType);
}
}
}
@@ -66,11 +67,6 @@ public class NotifyController {
}
- @RequestMapping("test")
- public void test(@RequestParam String payOrderNO){
- payService.test(payOrderNO);
- }
-
@RequestMapping("notifyCallBack")
public String notifyCallBack(HttpServletRequest request){
@@ -84,6 +80,7 @@ public class NotifyController {
&& !"0100".equals(object.getStr("payType"))
){
String orderNo=object.getStr("orderNumber");
+
return payService.callBackPay(orderNo);
}
}
@@ -91,6 +88,15 @@ public class NotifyController {
return null;
}
+ /**
+ * 支付取消
+ * @return 影响数量
+ */
+ @PostMapping("cancel")
+ public Result notifyCancel(@RequestBody HashMap data) {
+ return Result.successWithData(payService.cancelOrder(data.get("orderId")));
+ }
+
@RequestMapping("notifyfstCallBack")
public String notifyfstCallBack(HttpServletRequest request){
@@ -104,7 +110,11 @@ public class NotifyController {
if("TRADE_SUCCESS".equals(object.get("state").toString())){
String orderNo=object.get("mchOrderNo").toString();
String tradeNo=object.get("payOrderId").toString();
- return payService.callBackPayFST(tradeNo);
+ String payType=object.getStr("payType");
+ return payService.callBackPayFST(tradeNo,payType);
+ }else {
+ String tradeNo=object.get("payOrderId").toString();
+ return String.valueOf(payService.activateOrder(tradeNo));
}
}
}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/OrderController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/OrderController.java
index b43ec8a..be25987 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/controller/OrderController.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/OrderController.java
@@ -1,15 +1,17 @@
package com.chaozhanggui.system.cashierservice.controller;
-import com.chaozhanggui.system.cashierservice.entity.TbShopTable;
-import com.chaozhanggui.system.cashierservice.entity.dto.OrderDto;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.chaozhanggui.system.cashierservice.redis.RedisCst;
+import com.chaozhanggui.system.cashierservice.service.CartService;
import com.chaozhanggui.system.cashierservice.service.OrderService;
import com.chaozhanggui.system.cashierservice.sign.Result;
+import com.chaozhanggui.system.cashierservice.util.Utils;
import lombok.extern.slf4j.Slf4j;
+import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.*;
-import javax.annotation.Resource;
-import java.io.IOException;
-import java.text.ParseException;
+import java.util.Map;
@CrossOrigin(origins = "*")
@RestController
@@ -17,32 +19,38 @@ import java.text.ParseException;
@RequestMapping("/order")
public class OrderController {
- @Resource
- private OrderService orderService;
+ private final OrderService orderService;
+ private final CartService cartService;
+ private final StringRedisTemplate stringRedisTemplate;
+
+ public OrderController(OrderService orderService, CartService cartService, StringRedisTemplate stringRedisTemplate) {
+ this.orderService = orderService;
+ this.cartService = cartService;
+ this.stringRedisTemplate = stringRedisTemplate;
+ }
/**
* 添加订单
* @return
*/
@PostMapping("/creatOrder")
- public Result createOrder(@RequestBody OrderDto shopTable){
- if (shopTable.getTableId() == null){
- return Result.fail("台桌号有误");
- }
- return orderService.createOrder(shopTable.getTableId(),shopTable.getShopId(),shopTable.getUserId());
+ public Result createOrder(@RequestHeader String environment, @RequestBody JSONObject jsonObject){
+ jsonObject.put("environment",environment);
+ return Utils.runFunAndCheckKey(() -> cartService.createOrder(jsonObject), stringRedisTemplate, RedisCst.getLockKey("CREATE_ORDER_KEY"));
+// return orderService.createOrder(shopTable.getTableId(),shopTable.getShopId(),shopTable.getUserId());
}
+
/**
- * 订单回显
- * @param orderId
- * @return
+ * 订单详情
+ * @param orderId 订单id
+ * @return 订单信息
*/
@GetMapping ("/orderInfo")
- private Result orderInfo(@RequestParam(required = false) Integer orderId){
- if (orderId==null) {
- return Result.fail("请返回首页订单列表查看");
- }
- return orderService.orderInfo(orderId);
+ public Result getCartByOrderId(
+ @RequestParam Integer orderId
+ ){
+ return Result.successWithData(orderService.orderDetail(orderId));
}
@GetMapping("/orderList")
@@ -51,55 +59,11 @@ public class OrderController {
return orderService.orderList(userId,page,size,status);
}
- @GetMapping("/tradeIntegral")
- private Result tradeIntegral(@RequestParam("userId") String userId, @RequestParam("id") String id) throws IOException, ParseException {
- return orderService.tradeIntegral(userId,id);
- }
-// @GetMapping("/我的积分")
-// private Result mineYhq(@RequestParam("userId") String userId) throws IOException {
-// return orderService.mineYhq(userId);
-// }
- @GetMapping("/mineCoupons")
- private Result mineCoupons(@RequestHeader String token,
- @RequestParam("userId") String userId,
- @RequestParam("status") String status,
- @RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
- @RequestParam(value = "size", required = false, defaultValue = "1") Integer size,
- @RequestParam("orderId") String orderId
- ) throws IOException {
- return orderService.mineCoupons(userId,orderId,status,page,size);
- }
- @GetMapping("/findCoupons")
- private Result findCoupons(@RequestHeader String token,String type,
- @RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
- @RequestParam(value = "size", required = false, defaultValue = "1") Integer size) throws IOException {
- return orderService.findCoupons(type,page,size);
- }
-
- @GetMapping("/findWiningUser")
- private Result findWiningUser(){
- return orderService.findWiningUser();
- }
- @GetMapping("/mineWinner")
- private Result mineWinner(@RequestHeader String token,@RequestParam Integer userId,
- @RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
- @RequestParam(value = "size", required = false, defaultValue = "1") Integer size){
- return orderService.mineWinner(userId,page,size);
- }
- @GetMapping("/getYhqPara")
- private Result getYhqPara(){
- return orderService.getYhqPara();
- }
- @GetMapping("/getYhqDouble")
- private Result getYhqDouble(@RequestParam Integer orderId){
- return orderService.getYhqDouble(orderId);
- }
- @PostMapping("/yhqDouble")
- private Result yhqDouble(@RequestParam Integer conponsId){
- return orderService.yhqDouble(conponsId);
- }
- @GetMapping("/kc")
- private Result kc(){
- return orderService.kc();
+ @PostMapping("/rmOrder")
+ private Result rmOrder(@RequestBody Map map){
+ if (ObjectUtil.isEmpty(map) || map.size() <= 0 || !map.containsKey("orderId") || ObjectUtil.isEmpty(map.get("orderId"))) {
+ return Result.fail("订单号不允许为空");
+ }
+ return orderService.rmOrder(Integer.valueOf(map.get("orderId").toString()));
}
}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/PayController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/PayController.java
index 79db6f6..c5c8348 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/controller/PayController.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/PayController.java
@@ -1,7 +1,10 @@
package com.chaozhanggui.system.cashierservice.controller;
import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
import com.chaozhanggui.system.cashierservice.annotation.LimitSubmit;
+import com.chaozhanggui.system.cashierservice.entity.dto.MemberInDTO;
+import com.chaozhanggui.system.cashierservice.entity.dto.OrderPayDTO;
import com.chaozhanggui.system.cashierservice.service.PayService;
import com.chaozhanggui.system.cashierservice.sign.Result;
import com.chaozhanggui.system.cashierservice.util.IpUtil;
@@ -9,11 +12,14 @@ import com.chaozhanggui.system.cashierservice.util.TokenUtil;
import com.fasterxml.jackson.core.JsonProcessingException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
+import java.math.BigDecimal;
import java.util.Map;
+import java.util.Objects;
@CrossOrigin(origins = "*")
@RestController
@@ -30,20 +36,17 @@ public class PayController {
* 支付
*
* @param request payType wechatPay:微信支付;aliPay:支付宝支付;
- * @param map
- * @return
*/
@RequestMapping("orderPay")
@LimitSubmit(key = "orderPay:%s")
- public Result pay(HttpServletRequest request, @RequestHeader("openId") String openId, @RequestBody Map map) {
- if (ObjectUtil.isEmpty(map) || map.size() <= 0 || !map.containsKey("orderId") || ObjectUtil.isEmpty(map.get("orderId"))) {
- return Result.fail("订单号不允许为空");
- }
-
+ public Result pay(HttpServletRequest request, @RequestHeader("openId") String openId, @RequestBody OrderPayDTO payDTO) {
try {
- return payService.payOrder(openId, map.get("orderId"), IpUtil.getIpAddr(request));
+ if (ObjectUtil.isEmpty(openId) || Objects.isNull(openId)) {
+ return Result.fail("付款用户[userId]参数不能为空");
+ }
+ return payService.payOrder(openId, payDTO, IpUtil.getIpAddr(request));
} catch (Exception e) {
- e.printStackTrace();
+ log.error("支付失败", e);
}
return Result.fail("支付失败");
}
@@ -63,7 +66,7 @@ public class PayController {
@RequestParam("memberId") String memberId,
@RequestParam("pwd") String pwd
) {
- return payService.accountPay(orderId, memberId, token,pwd);
+ return payService.accountPay(orderId, memberId, token, pwd);
}
@RequestMapping("groupOrderPay")
@@ -77,6 +80,8 @@ public class PayController {
String userId = "";
if (environment.equals("wx") && payType.equals("wechatPay")) {
userId = TokenUtil.parseParamFromToken(token).getString("openId");
+ } else if ("aliPay".equals(payType)) {
+ userId = TokenUtil.parseParamFromToken(token).getString("openId");
} else {
userId = TokenUtil.parseParamFromToken(token).getString("userId");
}
@@ -124,7 +129,6 @@ public class PayController {
@RequestMapping("getActive")
public Result getActive(
- @RequestHeader("token") String token,
@RequestParam("shopId") String shopId,
@RequestParam("page") int page,
@RequestParam("pageSize") int pageSize) {
@@ -137,16 +141,23 @@ public class PayController {
*
* @param request
* @param openId
- * @param map
- * @return
*/
@RequestMapping("memeberIn")
@LimitSubmit(key = "memeberIn:%s")
- public Result memeberIn(HttpServletRequest request, @RequestHeader("openId") String openId, @RequestHeader("id") String id,
- @RequestBody Map map
- ) {
+ public Result memeberIn(HttpServletRequest request,
+ @RequestHeader("openId") String openId, @RequestHeader("id") String id,
+ @RequestBody @Validated MemberInDTO memberInDTO) {
try {
- return payService.memberIn(openId, id, map.get("amount").toString(), map.get("shopId").toString(), IpUtil.getIpAddr(request));
+ if (memberInDTO.getOrderId() == null && memberInDTO.getAmount() == null) {
+ return Result.fail("金额和订单id不能同时为空");
+ }
+
+ if(memberInDTO.getAmount() != null && memberInDTO.getAmount().compareTo(BigDecimal.ZERO) <= 0) {
+ return Result.fail("充值金额不能小于等于0");
+ }
+ memberInDTO.setUserId(TokenUtil.getUserId());
+ memberInDTO.setOpenId(openId);
+ return payService.memberIn(memberInDTO, IpUtil.getIpAddr(request));
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
@@ -160,7 +171,7 @@ public class PayController {
@RequestParam("userId") String userId,
@RequestParam("shopId") String shopId
) {
- return payService.getShopByMember(userId,shopId,page,pageSize);
+ return payService.getShopByMember(userId, shopId, page, pageSize);
}
@RequestMapping("queryMemberAccount")
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/ProductController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/ProductController.java
index b36d7d9..77fcd9a 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/controller/ProductController.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/ProductController.java
@@ -2,7 +2,12 @@ package com.chaozhanggui.system.cashierservice.controller;
import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
+import com.chaozhanggui.system.cashierservice.constant.TableConstant;
+import com.chaozhanggui.system.cashierservice.entity.TbCashierCart;
+import com.chaozhanggui.system.cashierservice.entity.dto.ChoseCountDTO;
+import com.chaozhanggui.system.cashierservice.entity.dto.ChoseEatModelDTO;
import com.chaozhanggui.system.cashierservice.entity.dto.QuerySpecDTO;
import com.chaozhanggui.system.cashierservice.service.CartService;
import com.chaozhanggui.system.cashierservice.service.ProductService;
@@ -10,8 +15,13 @@ import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
import com.chaozhanggui.system.cashierservice.sign.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
import java.util.Map;
@CrossOrigin(origins = "*")
@@ -36,11 +46,15 @@ public class ProductController {
public Result queryShopIdByTableCode(
@RequestHeader("openId") String openId,
@RequestHeader("id") String userId,
- @RequestParam String lat,
- @RequestParam String lng,
- @RequestParam("code") String code
+ @RequestParam(required = false) String lat,
+ @RequestParam(required = false) String lng,
+ @RequestParam(required = false) String code,
+ @RequestParam(required = false) Integer shopId
) {
- return productService.queryShopIdByTableCode(userId, openId, code,lat,lng);
+ if (shopId == null && StrUtil.isBlank(code)) {
+ return Result.fail("参数缺失");
+ }
+ return productService.queryShopIdByTableCode(userId, openId, code,lat,lng, shopId);
}
/**
@@ -50,12 +64,13 @@ public class ProductController {
* @return
*/
@RequestMapping("queryProduct")
- public Result queryProduct(@RequestBody Map map) {
+ public Result queryProduct(@RequestHeader("id") String userId,@RequestBody Map map) {
if (ObjectUtil.isEmpty(map) || map.size() <= 0 || !map.containsKey("shopId")) {
return Result.fail("参数错误");
}
return productService.queryProduct(
+ userId,
map.get("shopId").toString(),
(map.containsKey("productGroupId") && ObjectUtil.isNotEmpty(map.get("productGroupId"))) ? map.get("productGroupId").toString() : "");
}
@@ -81,9 +96,10 @@ public class ProductController {
@RequestParam(value = "code", required = false) String code,
@RequestParam("shopId") String shopId,
@RequestParam("productId") String productId,
- @RequestParam("spec_tag") String spec_tag
+ @RequestParam("spec_tag") String spec_tag,
+ @RequestParam("isVip") String isVip
) {
- return productService.queryProductSku(code,shopId, productId, spec_tag);
+ return productService.queryProductSku(code,shopId, productId, spec_tag,isVip);
}
@PostMapping("addCart")
@@ -92,6 +108,32 @@ public class ProductController {
return cartService.createCart(jsonObject);
}
+ /**
+ * 餐位费选择
+ * @return 餐位费信息
+ */
+ @PostMapping("/choseCount")
+ public Result choseCount(@Validated @RequestBody ChoseCountDTO choseCountDTO) {
+ return Result.success(CodeEnum.SUCCESS, productService.choseCount(choseCountDTO));
+ }
+
+ @PostMapping("/choseEatModel")
+ public Result choseEatModel(@Validated @RequestBody ChoseEatModelDTO choseEatModelDTO) {
+ List cashierCartList = cartService.choseEatModel(choseEatModelDTO);
+ BigDecimal amount = BigDecimal.ZERO;
+ ArrayList cashierCarts = new ArrayList<>();
+ for (TbCashierCart item : cashierCartList) {
+ if (!TableConstant.CART_SEAT_ID.equals(item.getProductId())) {
+ cashierCarts.add(item);
+ }
+ amount = amount.add(item.getTotalAmount());
+ }
+ HashMap data = new HashMap<>();
+ data.put("amount", amount);
+ data.put("info", cashierCarts);
+ return Result.success(CodeEnum.SUCCESS, data);
+ }
+
@PostMapping("cleanCart")
public Result cleanCart(@RequestBody JSONObject jsonObject) {
log.info("清空购物车数据:{}", jsonObject);
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbCallTableController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbCallTableController.java
new file mode 100644
index 0000000..77ae919
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbCallTableController.java
@@ -0,0 +1,77 @@
+package com.chaozhanggui.system.cashierservice.controller;
+
+import cn.hutool.core.util.StrUtil;
+import com.chaozhanggui.system.cashierservice.entity.dto.BaseCallTableDTO;
+import com.chaozhanggui.system.cashierservice.entity.dto.CallSubMsgDTO;
+import com.chaozhanggui.system.cashierservice.entity.dto.CancelCallQueueDTO;
+import com.chaozhanggui.system.cashierservice.entity.dto.TakeNumberDTO;
+import com.chaozhanggui.system.cashierservice.service.TbCallService;
+import com.chaozhanggui.system.cashierservice.sign.Result;
+import lombok.AllArgsConstructor;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 叫号
+ */
+@RestController
+@RequestMapping("/callTable")
+@AllArgsConstructor
+public class TbCallTableController {
+
+ private final TbCallService tbCallService;
+
+ @PostMapping("takeNumber")
+ public Result takeNumber(
+ @Validated @RequestBody TakeNumberDTO takeNumberDTO
+ ) {
+ return Result.successWithData(tbCallService.takeNumber(takeNumberDTO));
+ }
+
+ /**
+ * 排号列表
+ * @param openId openId
+ * @param shopId 店铺id
+ * @return data
+ */
+ @GetMapping("queue")
+ public Result get(
+ @RequestParam String openId,
+ @RequestParam Integer shopId,
+ @RequestParam(required = false) Integer queueId
+ ) {
+ return Result.successWithData(tbCallService.getList(shopId, openId, queueId));
+ }
+
+ @GetMapping
+ public Result getList(
+ @RequestParam Integer shopId
+ ) {
+ return Result.successWithData(tbCallService.getAllInfo(shopId));
+ }
+
+ @PostMapping("/cancel")
+ public Result cancel(
+ @Validated @RequestBody CancelCallQueueDTO cancelCallQueueDTO
+ ) {
+ return Result.successWithData(tbCallService.cancel(cancelCallQueueDTO));
+ }
+
+ @GetMapping("state")
+ public Result getState(
+ @RequestParam String openId,
+ @RequestParam Integer shopId,
+ @RequestParam(required = false) Integer queueId
+ ) {
+ return Result.successWithData(tbCallService.getState(openId, shopId, queueId));
+ }
+
+ @PostMapping("subMsg")
+ public Result subMsg(
+ @Validated @RequestBody CallSubMsgDTO subMsgDTO
+ ) {
+ return Result.successWithData(tbCallService.subMsg(subMsgDTO));
+ }
+
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbMemberPointsController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbMemberPointsController.java
new file mode 100644
index 0000000..99fde14
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbMemberPointsController.java
@@ -0,0 +1,127 @@
+package com.chaozhanggui.system.cashierservice.controller;
+
+import cn.hutool.core.map.MapProxy;
+import com.chaozhanggui.system.cashierservice.entity.TbMemberPoints;
+import com.chaozhanggui.system.cashierservice.entity.dto.OrderDeductionPointsDTO;
+import com.chaozhanggui.system.cashierservice.service.TbMemberPointsService;
+import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
+import com.chaozhanggui.system.cashierservice.sign.Result;
+import com.github.pagehelper.PageInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.Map;
+
+
+/**
+ * 会员积分
+ *
+ * @author Tankaikai tankaikai@aliyun.com
+ * @since 2.0 2024-10-25
+ */
+@RestController
+@RequestMapping("/api/points/member-points")
+public class TbMemberPointsController {
+
+ @Autowired
+ private TbMemberPointsService tbMemberPointsService;
+
+ /**
+ * 分页
+ *
+ * @param params
+ * @return
+ */
+ @GetMapping("page")
+ public Result page(@RequestParam Map params) {
+ PageInfo page = tbMemberPointsService.page(params);
+ return Result.successWithData(page);
+ }
+
+ /**
+ * 获取会员积分等信息
+ *
+ * @param memberId
+ * @return
+ */
+ @GetMapping("{memberId}")
+ public Result getMemberPoints(@PathVariable("memberId") Long memberId) {
+ TbMemberPoints memberPoints = tbMemberPointsService.getMemberPoints(memberId);
+ return Result.successWithData(memberPoints);
+ }
+
+ /**
+ * 获取订单可用积分及抵扣金额
+ *
+ * @param memberId
+ * @param orderAmount
+ * @return
+ */
+ @GetMapping("calc-usable-points")
+ public Result getMemberUsablePoints(@RequestParam Long memberId, @RequestParam BigDecimal orderAmount) {
+ OrderDeductionPointsDTO usablePoints = tbMemberPointsService.getMemberUsablePoints(memberId, orderAmount);
+ return Result.successWithData(usablePoints);
+ }
+
+ /**
+ * 根据抵扣金额计算所需积分
+ *
+ * @param memberId
+ * @param orderAmount
+ * @param deductionAmount
+ * @return
+ */
+ @GetMapping("calc-used-points")
+ public Result calcUsedPoints(@RequestParam Long memberId, @RequestParam BigDecimal orderAmount, @RequestParam BigDecimal deductionAmount) {
+ int points = tbMemberPointsService.calcUsedPoints(memberId, orderAmount, deductionAmount);
+ return Result.successWithData(points);
+ }
+
+ /**
+ * 根据积分计算可抵扣金额
+ *
+ * @param memberId
+ * @param orderAmount
+ * @param points
+ * @return
+ */
+ @GetMapping("calc-deduction-amount")
+ public Result calcDeductionAmount(@RequestParam Long memberId, @RequestParam BigDecimal orderAmount, @RequestParam Integer points) {
+ BigDecimal deductionAmount = tbMemberPointsService.calcDeductionAmount(memberId, orderAmount, points);
+ return Result.successWithData(deductionAmount);
+ }
+
+ /**
+ * 支付完成扣减积分(支付成功回调中使用)
+ *
+ * @param params
+ * @return
+ */
+ @PostMapping("payed-deduct-points")
+ public Result deductPoints(@RequestBody Map params) {
+ MapProxy proxy = MapProxy.create(params);
+ Long memberId = proxy.getLong("memberId");
+ Integer points = proxy.getInt("points");
+ String content = proxy.getStr("content");
+ Long orderId = proxy.getLong("orderId");
+ boolean ret = tbMemberPointsService.deductPoints(memberId, points, content, orderId);
+ return Result.successWithData(ret);
+ }
+
+ /**
+ * 消费赠送积分(支付成功回调中使用)
+ *
+ * @param params
+ * @return
+ */
+ @PostMapping("consume-award-points")
+ public Result consumeAwardPoints(@RequestBody Map params) {
+ MapProxy proxy = MapProxy.create(params);
+ Long memberId = proxy.getLong("memberId");
+ Long orderId = proxy.getLong("orderId");
+ tbMemberPointsService.consumeAwardPoints(memberId, orderId);
+ return Result.success(CodeEnum.SUCCESS);
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbMemberPointsLogController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbMemberPointsLogController.java
new file mode 100644
index 0000000..9fd9e15
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbMemberPointsLogController.java
@@ -0,0 +1,39 @@
+package com.chaozhanggui.system.cashierservice.controller;
+
+import com.chaozhanggui.system.cashierservice.entity.TbMemberPointsLog;
+import com.chaozhanggui.system.cashierservice.service.TbMemberPointsLogService;
+import com.chaozhanggui.system.cashierservice.sign.Result;
+import com.github.pagehelper.PageInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+
+/**
+ * 会员积分变动记录
+ *
+ * @author Tankaikai tankaikai@aliyun.com
+ * @since 2.0 2024-10-25
+ */
+@RestController
+@RequestMapping("/api/points/member-points-log")
+public class TbMemberPointsLogController {
+
+ @Autowired
+ private TbMemberPointsLogService tbMemberPointsLogService;
+
+ /**
+ * 分页
+ * @param params
+ * @return
+ */
+ @GetMapping("page")
+ public Result page(@RequestParam Map params) {
+ PageInfo page = tbMemberPointsLogService.page(params);
+ return Result.successWithData(page);
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbPointsBasicSettingController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbPointsBasicSettingController.java
new file mode 100644
index 0000000..2c4291e
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbPointsBasicSettingController.java
@@ -0,0 +1,47 @@
+package com.chaozhanggui.system.cashierservice.controller;
+
+import com.chaozhanggui.system.cashierservice.entity.TbPointsBasicSetting;
+import com.chaozhanggui.system.cashierservice.service.TbPointsBasicSettingService;
+import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
+import com.chaozhanggui.system.cashierservice.sign.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * 积分基本设置
+ *
+ * @author Tankaikai tankaikai@aliyun.com
+ * @since 2.0 2024-10-25
+ */
+@RestController
+@RequestMapping("/api/points/basic-setting")
+public class TbPointsBasicSettingController {
+
+ @Autowired
+ private TbPointsBasicSettingService tbPointsBasicSettingService;
+
+ /**
+ * 信息
+ * @param shopId
+ * @return
+ */
+ @GetMapping("{shopId}")
+ public Result get(@PathVariable("shopId") Long shopId) {
+ TbPointsBasicSetting data = tbPointsBasicSettingService.getByShopId(shopId);
+ return Result.successWithData(data);
+ }
+
+ /**
+ * 保存
+ * @param entity
+ * @return
+ */
+ @PostMapping
+ public Result save(@RequestBody TbPointsBasicSetting entity) {
+ tbPointsBasicSettingService.save(entity);
+ return Result.success(CodeEnum.SUCCESS);
+ }
+
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbPointsExchangeRecordController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbPointsExchangeRecordController.java
new file mode 100644
index 0000000..1f5e332
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbPointsExchangeRecordController.java
@@ -0,0 +1,86 @@
+package com.chaozhanggui.system.cashierservice.controller;
+
+import com.chaozhanggui.system.cashierservice.entity.TbPointsExchangeRecord;
+import com.chaozhanggui.system.cashierservice.service.TbPointsExchangeRecordService;
+import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
+import com.chaozhanggui.system.cashierservice.sign.Result;
+import com.github.pagehelper.PageInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+
+/**
+ * 积分兑换记录
+ *
+ * @author Tankaikai tankaikai@aliyun.com
+ * @since 2.0 2024-10-25
+ */
+@RestController
+@RequestMapping("/api/points/exchange-record")
+public class TbPointsExchangeRecordController {
+
+ @Autowired
+ private TbPointsExchangeRecordService tbPointsExchangeRecordService;
+
+ /**
+ * 分页
+ *
+ * @param params
+ * @return
+ */
+ @GetMapping("page")
+ public Result page(@RequestParam Map params) {
+ PageInfo page = tbPointsExchangeRecordService.page(params);
+ return Result.successWithData(page);
+ }
+
+ /**
+ * 信息
+ *
+ * @param id
+ * @return
+ */
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") Long id) {
+ TbPointsExchangeRecord data = tbPointsExchangeRecordService.get(id);
+ return Result.successWithData(data);
+ }
+
+ /**
+ * 核销
+ *
+ * @param record
+ * @return
+ */
+ @PostMapping("checkout")
+ public Result checkout(@RequestBody TbPointsExchangeRecord record) {
+ tbPointsExchangeRecordService.checkout(record.getCouponCode());
+ return Result.success(CodeEnum.SUCCESS);
+ }
+
+ /**
+ * 兑换
+ *
+ * @param record
+ * @return
+ */
+ @PostMapping("exchange")
+ public Result exchange(@RequestBody TbPointsExchangeRecord record) {
+ TbPointsExchangeRecord data = tbPointsExchangeRecordService.exchange(record);
+ return Result.successWithData(data);
+ }
+
+ /**
+ * 统计
+ *
+ * @param params
+ * @return
+ */
+ @GetMapping("total")
+ public Result total(@RequestParam Map params) {
+ Map data = tbPointsExchangeRecordService.total(params);
+ return Result.successWithData(data);
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbPointsGoodsSettingController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbPointsGoodsSettingController.java
new file mode 100644
index 0000000..e5ab1a5
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbPointsGoodsSettingController.java
@@ -0,0 +1,81 @@
+package com.chaozhanggui.system.cashierservice.controller;
+
+import com.chaozhanggui.system.cashierservice.entity.TbPointsGoodsSetting;
+import com.chaozhanggui.system.cashierservice.service.TbPointsGoodsSettingService;
+import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
+import com.chaozhanggui.system.cashierservice.sign.Result;
+import com.github.pagehelper.PageInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+
+/**
+ * 积分商品设置
+ *
+ * @author Tankaikai tankaikai@aliyun.com
+ * @since 2.0 2024-10-25
+ */
+@RestController
+@RequestMapping("/api/points/goods-setting")
+public class TbPointsGoodsSettingController {
+
+ @Autowired
+ private TbPointsGoodsSettingService tbPointsGoodsSettingService;
+
+ /**
+ * 分页
+ * @param params
+ * @return
+ */
+ @GetMapping("page")
+ public Result page(@RequestParam Map params) {
+ PageInfo page = tbPointsGoodsSettingService.page(params);
+ return Result.successWithData(page);
+ }
+
+ /**
+ * 信息
+ * @param id
+ * @return
+ */
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") Long id) {
+ TbPointsGoodsSetting data = tbPointsGoodsSettingService.getById(id);
+ return Result.successWithData(data);
+ }
+
+ /**
+ * 保存
+ * @param entity
+ * @return
+ */
+ @PostMapping
+ public Result save(@RequestBody TbPointsGoodsSetting entity) {
+ boolean ret = tbPointsGoodsSettingService.save(entity);
+ return Result.successWithData(ret);
+ }
+
+ /**
+ * 修改
+ * @param dto
+ * @return
+ */
+ @PutMapping
+ public Result update(@RequestBody TbPointsGoodsSetting dto) {
+ boolean ret = tbPointsGoodsSettingService.update(dto);
+ return Result.successWithData(ret);
+ }
+
+ /**
+ * 删除
+ * @param id
+ * @return
+ */
+ @DeleteMapping("{id}")
+ public Result delete(@PathVariable("id") Long id) {
+ tbPointsGoodsSettingService.delete(id);
+ return Result.success(CodeEnum.SUCCESS);
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbShopCouponController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbShopCouponController.java
new file mode 100644
index 0000000..641d310
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/TbShopCouponController.java
@@ -0,0 +1,38 @@
+package com.chaozhanggui.system.cashierservice.controller;
+
+import com.chaozhanggui.system.cashierservice.entity.dto.CouponDto;
+import com.chaozhanggui.system.cashierservice.service.TbShopCouponService;
+import com.chaozhanggui.system.cashierservice.sign.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 优惠券(TbShopCoupon)表控制层
+ *
+ * @author ww
+ * @since 2024-10-23 15:37:26
+ */
+@RestController
+@RequestMapping("coupon")
+public class TbShopCouponController {
+ /**
+ * 服务对象
+ */
+ @Autowired
+ private TbShopCouponService tbShopCouponService;
+
+ /**
+ * 根据优惠券DTO查询优惠券
+ * @param param 优惠券DTO
+ * @return 查询结果
+ */
+ @RequestMapping("find")
+ public Result find(@Validated @RequestBody CouponDto param) {
+ return tbShopCouponService.find(param);
+ }
+
+}
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/UserContoller.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/UserContoller.java
index c13a247..57ec9e5 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/controller/UserContoller.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/UserContoller.java
@@ -3,26 +3,21 @@ package com.chaozhanggui.system.cashierservice.controller;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.RandomUtil;
-import com.alibaba.fastjson.JSONObject;
import com.chaozhanggui.system.cashierservice.dao.TbShopInfoMapper;
import com.chaozhanggui.system.cashierservice.dao.TbShopUserMapper;
import com.chaozhanggui.system.cashierservice.dao.TbUserInfoMapper;
import com.chaozhanggui.system.cashierservice.entity.TbShopInfo;
import com.chaozhanggui.system.cashierservice.entity.TbShopUser;
import com.chaozhanggui.system.cashierservice.entity.TbUserInfo;
-import com.chaozhanggui.system.cashierservice.entity.vo.IntegralFlowVo;
-import com.chaozhanggui.system.cashierservice.entity.vo.IntegralVo;
import com.chaozhanggui.system.cashierservice.entity.vo.OpenMemberVo;
import com.chaozhanggui.system.cashierservice.service.UserService;
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
import com.chaozhanggui.system.cashierservice.sign.Result;
-import com.chaozhanggui.system.cashierservice.util.TokenUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
-import java.io.IOException;
import java.math.BigDecimal;
@CrossOrigin(origins = "*")
@@ -42,32 +37,22 @@ public class UserContoller {
@Autowired
private TbUserInfoMapper userInfoMapper;
-// @GetMapping("/userInfo")
-// public JSONObject userInfo(@RequestParam("openId") String openId ) throws Exception {
-// TbUserInfo shopUser = userInfoMapper.selectByOpenId(openId);
-// JSONObject jsonObject = new JSONObject();
-// if (Objects.isNull(shopUser)){
-// jsonObject.put("status","fail");
-// jsonObject.put("msg","用户不存在");
-// return jsonObject;
-// }
-// String userSign = UUID.randomUUID().toString().replaceAll("-","");
-// String token = TokenUtil.generateJfToken(openId,userSign);
-// JSONObject object = new JSONObject();
-// object.put("token",token);
-// object.put("userSign",userSign);
-// object.put("num",shopUser.getTotalScore());
-// jsonObject.put("status","success");
-// jsonObject.put("msg","成功");
-// jsonObject.put("data",object);
-// return jsonObject;
-// }
-
@PostMapping("/openMember")
public Result openMember(@RequestBody OpenMemberVo memberVo){
+ if(StringUtils.isBlank(memberVo.getTelephone())){
+ return Result.fail("手机号不可为空");
+ }
return userService.openMember(memberVo);
}
+ @PostMapping("/upVipPhont")
+ public Result upVipPhont(@RequestBody OpenMemberVo memberVo){
+ if(StringUtils.isBlank(memberVo.getTelephone())){
+ return Result.fail("手机号不可为空");
+ }
+ return userService.upVipPhont(memberVo);
+ }
+
@GetMapping("/shopUserInfo")
public Result shopUserInfo(@RequestParam("userId") String userId, @RequestHeader("openId") String openId, @RequestParam("shopId") String shopId) throws Exception {
if(shopId.equals("undefined")){
@@ -127,51 +112,11 @@ public class UserContoller {
return Result.success(CodeEnum.SUCCESS, shopUser);
}
- @GetMapping("/userCoupon")
- public Result userCoupon(@RequestParam("userId") String userId, @RequestParam("orderNum") BigDecimal orderNum) throws Exception {
- int num = userService.userCoupon(userId, orderNum);
- return Result.success(CodeEnum.SUCCESS, num);
- }
-
- @PostMapping("/modityIntegral")
- public JSONObject modityIntegral(@RequestHeader String token, @RequestBody IntegralVo integralVo) throws Exception {
- JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
- String userSign = jsonObject.getString("userSign");
- return userService.modityIntegral(integralVo, userSign);
- }
-
- @PostMapping("/userIntegral")
- public JSONObject userIntegral(@RequestHeader String token, @RequestBody IntegralFlowVo integralFlowVo) throws Exception {
- JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
- String userSign = jsonObject.getString("userSign");
- return userService.userIntegral(integralFlowVo, userSign);
- }
-
- @PostMapping("/userAllIntegral")
- public JSONObject userAllIntegral(@RequestBody IntegralFlowVo integralFlowVo) throws Exception {
-// JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
-// String userSign = jsonObject.getString("userSign");
- return userService.userAllIntegral(integralFlowVo, "userSign");
- }
-
- @PostMapping("/userAll")
- public JSONObject userAll(@RequestBody IntegralFlowVo integralFlowVo) throws Exception {
-// JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
-// String userSign = jsonObject.getString("userSign");
- return userService.userAll(integralFlowVo, "userSign");
- }
-
-
/**
* 获取订阅当前用户店库存预警消息的二维码
- *
- * @param shopId
- * @return
*/
@GetMapping("/subQrCode")
- public Result getSubQrCode(
- @RequestParam String shopId
- ) throws Exception {
+ public Result getSubQrCode(@RequestParam String shopId) throws Exception {
String url = userService.getSubQrCode(shopId);
return Result.successWithData(url);
}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbActivateInRecordMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbActivateInRecordMapper.java
new file mode 100644
index 0000000..a69145f
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbActivateInRecordMapper.java
@@ -0,0 +1,76 @@
+package com.chaozhanggui.system.cashierservice.dao;
+
+import com.chaozhanggui.system.cashierservice.entity.TbActivateInRecord;
+import com.chaozhanggui.system.cashierservice.entity.vo.TbUserCouponVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 活动商品赠送表(TbActivateInRecord)表数据库访问层
+ *
+ * @author ww
+ * @since 2024-08-22 11:13:40
+ */
+public interface TbActivateInRecordMapper {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param id 主键
+ * @return 实例对象
+ */
+ TbActivateInRecord queryById(Integer id);
+
+ /**
+ * 查询数据
+ *
+ * @param tbActivateInRecord 查询条件
+ * @return 对象列表
+ */
+ List queryAll(TbActivateInRecord tbActivateInRecord);
+
+ //未使用券
+ List queryByVipIdAndShopId(@Param("vipUserIds") List vipUserIds, @Param("shopId") Integer shopId);
+ //过期券
+ List queryByVipIdAndShopIdExpire(@Param("vipUserIds") List vipUserIds, @Param("shopId") Integer shopId);
+
+ int countCouponNum(@Param("userId") Integer userId);
+
+
+ /**
+ * 新增数据
+ *
+ * @param tbActivateInRecord 实例对象
+ * @return 影响行数
+ */
+ int insert(TbActivateInRecord tbActivateInRecord);
+
+ /**
+ * 批量新增数据(MyBatis原生foreach方法)
+ *
+ * @param entities List 实例对象列表
+ * @return 影响行数
+ */
+ int insertBatch(@Param("entities") List entities);
+
+ /**
+ * 修改数据
+ *
+ * @param tbActivateInRecord 实例对象
+ * @return 影响行数
+ */
+ int update(TbActivateInRecord tbActivateInRecord);
+
+ int updateOverNum(@Param("id") Integer id, @Param("overNum") Integer overNum);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param id 主键
+ * @return 影响行数
+ */
+ int deleteById(Integer id);
+
+}
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbActivateMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbActivateMapper.java
index 2a458b2..bd125a3 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbActivateMapper.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbActivateMapper.java
@@ -1,29 +1,72 @@
package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.TbActivate;
-import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
-import org.springframework.stereotype.Component;
+import org.springframework.data.domain.Pageable;
import java.math.BigDecimal;
import java.util.List;
-@Component
-@Mapper
+/**
+ * (TbActivate)表数据库访问层
+ *
+ * @author ww
+ * @since 2024-10-23 14:19:53
+ */
public interface TbActivateMapper {
- int deleteByPrimaryKey(Integer id);
- int insert(TbActivate record);
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param id 主键
+ * @return 实例对象
+ */
+ TbActivate queryById(Integer id);
- int insertSelective(TbActivate record);
+ /**
+ * 查询数据
+ *
+ * @param tbActivate 查询条件
+ * @param pageable 分页对象
+ * @return 对象列表
+ */
+ List queryAll(TbActivate tbActivate, @Param("pageable") Pageable pageable);
- TbActivate selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(TbActivate record);
-
- int updateByPrimaryKey(TbActivate record);
+ List selectByShopId(String shopId);
TbActivate selectByAmount(@Param("shopId") String shopId,@Param("amount") BigDecimal amount);
- List selectByShpopId(String shopId);
+
+ /**
+ * 新增数据
+ *
+ * @param tbActivate 实例对象
+ * @return 影响行数
+ */
+ int insert(TbActivate tbActivate);
+
+ /**
+ * 批量新增数据(MyBatis原生foreach方法)
+ *
+ * @param entities List 实例对象列表
+ * @return 影响行数
+ */
+ int insertBatch(@Param("entities") List entities);
+
+ /**
+ * 修改数据
+ *
+ * @param tbActivate 实例对象
+ * @return 影响行数
+ */
+ int update(TbActivate tbActivate);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param id 主键
+ * @return 影响行数
+ */
+ int deleteById(Integer id);
+
}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbActivateOutRecordMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbActivateOutRecordMapper.java
new file mode 100644
index 0000000..6c9d6f7
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbActivateOutRecordMapper.java
@@ -0,0 +1,72 @@
+package com.chaozhanggui.system.cashierservice.dao;
+
+import com.chaozhanggui.system.cashierservice.entity.TbActivateOutRecord;
+import com.chaozhanggui.system.cashierservice.entity.vo.TbUserCouponVo;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.Pageable;
+
+import java.util.List;
+
+/**
+ * 活动赠送商品使用记录表(TbActivateOutRecord)表数据库访问层
+ *
+ * @author ww
+ * @since 2024-10-23 14:55:22
+ */
+public interface TbActivateOutRecordMapper {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param id 主键
+ * @return 实例对象
+ */
+ TbActivateOutRecord queryById(Integer id);
+
+ /**
+ * 查询数据
+ *
+ * @param tbActivateOutRecord 查询条件
+ * @param pageable 分页对象
+ * @return 对象列表
+ */
+ List queryAll(TbActivateOutRecord tbActivateOutRecord, @Param("pageable") Pageable pageable);
+
+ List queryByVipIdAndShopId(@Param("vipUserIds") List vipUserIds, @Param("shopId") Integer shopId);
+
+ /**
+ * 新增数据
+ *
+ * @param tbActivateOutRecord 实例对象
+ * @return 影响行数
+ */
+ int insert(TbActivateOutRecord tbActivateOutRecord);
+
+ /**
+ * 批量新增数据(MyBatis原生foreach方法)
+ *
+ * @param entities List 实例对象列表
+ * @return 影响行数
+ */
+ int insertBatch(@Param("entities") List entities);
+
+ /**
+ * 修改数据
+ *
+ * @param tbActivateOutRecord 实例对象
+ * @return 影响行数
+ */
+ int update(TbActivateOutRecord tbActivateOutRecord);
+
+ int updateRefNum(@Param("id")Integer id,@Param("refNum")Integer refNum);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param id 主键
+ * @return 影响行数
+ */
+ int deleteById(Integer id);
+
+}
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbCashierCartMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbCashierCartMapper.java
index 4f2e299..f620062 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbCashierCartMapper.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbCashierCartMapper.java
@@ -56,5 +56,6 @@ public interface TbCashierCartMapper {
List selectByOrderId(@Param("orderId") String orderId,@Param("status") String status);
void updateStatusByTableId(@Param("tableId")String tableId,@Param("status") String status);
+ void updateStatusByOrderIdForMini(@Param("tableId")String tableId,@Param("status") String status);
void updateStatusById(@Param("id")Integer id,@Param("status") String status);
-}
\ No newline at end of file
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbCouponProductMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbCouponProductMapper.java
new file mode 100644
index 0000000..6ca6628
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbCouponProductMapper.java
@@ -0,0 +1,72 @@
+package com.chaozhanggui.system.cashierservice.dao;
+
+import com.chaozhanggui.system.cashierservice.entity.TbCouponProduct;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.Pageable;
+
+import java.util.List;
+
+/**
+ * 活动赠送商品表(TbCouponProduct)表数据库访问层
+ *
+ * @author ww
+ * @since 2024-10-23 14:35:49
+ */
+public interface TbCouponProductMapper {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param id 主键
+ * @return 实例对象
+ */
+ TbCouponProduct queryById(Integer id);
+
+ /**
+ * 查询数据
+ *
+ * @param tbCouponProduct 查询条件
+ * @param pageable 分页对象
+ * @return 对象列表
+ */
+ List queryAll(TbCouponProduct tbCouponProduct, @Param("pageable") Pageable pageable);
+
+
+ List queryAllByCouponId(Integer couponId);
+ List queryProsByActivateId(@Param("couponId")Integer couponId,@Param("num")Integer num);
+
+
+ /**
+ * 新增数据
+ *
+ * @param tbCouponProduct 实例对象
+ * @return 影响行数
+ */
+ int insert(TbCouponProduct tbCouponProduct);
+
+ /**
+ * 批量新增数据(MyBatis原生foreach方法)
+ *
+ * @param entities List 实例对象列表
+ * @return 影响行数
+ */
+ int insertBatch(@Param("entities") List entities);
+
+ /**
+ * 修改数据
+ *
+ * @param tbCouponProduct 实例对象
+ * @return 影响行数
+ */
+ int update(TbCouponProduct tbCouponProduct);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param id 主键
+ * @return 影响行数
+ */
+ int deleteById(Integer id);
+
+}
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbDeviceOperateInfoMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbDeviceOperateInfoMapper.java
deleted file mode 100644
index 38b0c4d..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbDeviceOperateInfoMapper.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.TbDeviceOperateInfo;
-
-public interface TbDeviceOperateInfoMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(TbDeviceOperateInfo record);
-
- int insertSelective(TbDeviceOperateInfo record);
-
- TbDeviceOperateInfo selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(TbDeviceOperateInfo record);
-
- int updateByPrimaryKey(TbDeviceOperateInfo record);
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbDeviceStockMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbDeviceStockMapper.java
deleted file mode 100644
index 88b0e55..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbDeviceStockMapper.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.TbDeviceStock;
-
-public interface TbDeviceStockMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(TbDeviceStock record);
-
- int insertSelective(TbDeviceStock record);
-
- TbDeviceStock selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(TbDeviceStock record);
-
- int updateByPrimaryKey(TbDeviceStock record);
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbIntegralFlowMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbIntegralFlowMapper.java
deleted file mode 100644
index cb6f56f..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbIntegralFlowMapper.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.TbIntegralFlow;
-
-public interface TbIntegralFlowMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(TbIntegralFlow record);
-
- int insertSelective(TbIntegralFlow record);
-
- TbIntegralFlow selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(TbIntegralFlow record);
-
- int updateByPrimaryKey(TbIntegralFlow record);
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbIntegralMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbIntegralMapper.java
deleted file mode 100644
index 322cfcd..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbIntegralMapper.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.TbIntegral;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-
-@Component
-public interface TbIntegralMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(TbIntegral record);
-
- int insertSelective(TbIntegral record);
-
- TbIntegral selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(TbIntegral record);
-
- int updateByPrimaryKey(TbIntegral record);
-
- List selectAllByUserId(String userId);
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbMerchantCouponMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbMerchantCouponMapper.java
deleted file mode 100644
index 08bf7d4..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbMerchantCouponMapper.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.TbMerchantCoupon;
-import org.apache.ibatis.annotations.Mapper;
-import org.springframework.stereotype.Component;
-
-/**
- * 优惠券(TbMerchantCoupon)表数据库访问层
- *
- * @author lyf
- * @since 2024-04-02 09:24:16
- */
-@Component
-@Mapper
-public interface TbMerchantCouponMapper {
-
- /**
- * 通过ID查询单条数据
- *
- * @param id 主键
- * @return 实例对象
- */
- TbMerchantCoupon queryById(Integer id);
-
-
-
-}
-
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbOrderInfoMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbOrderInfoMapper.java
index 20d3776..0affb60 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbOrderInfoMapper.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbOrderInfoMapper.java
@@ -11,6 +11,10 @@ import java.util.List;
@Component
@Mapper
public interface TbOrderInfoMapper {
+
+ /**
+ * 逻辑删除
+ */
int deleteByPrimaryKey(Integer id);
int insert(TbOrderInfo record);
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbParamsMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbParamsMapper.java
deleted file mode 100644
index f234c90..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbParamsMapper.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.TbParams;
-
-public interface TbParamsMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(TbParams record);
-
- int insertSelective(TbParams record);
-
- TbParams selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(TbParams record);
-
- int updateByPrimaryKey(TbParams record);
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbPlussDeviceGoodsMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbPlussDeviceGoodsMapper.java
deleted file mode 100644
index c97cc2d..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbPlussDeviceGoodsMapper.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.TbPlussDeviceGoods;
-
-public interface TbPlussDeviceGoodsMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(TbPlussDeviceGoods record);
-
- int insertSelective(TbPlussDeviceGoods record);
-
- TbPlussDeviceGoods selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(TbPlussDeviceGoods record);
-
- int updateByPrimaryKeyWithBLOBs(TbPlussDeviceGoods record);
-
- int updateByPrimaryKey(TbPlussDeviceGoods record);
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductMapper.java
index 3968f0d..9e33d9a 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductMapper.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductMapper.java
@@ -26,7 +26,7 @@ public interface TbProductMapper {
List selectByIds(@Param("list") List ids);
Integer selectByQcode(@Param("code") String code,@Param("productId") Integer productId,@Param("shopId") String shopId);
- Integer selectByCodeAndSkuId(@Param("code") String code,@Param("skuId") Integer skuId,@Param("shopId") String shopId);
+ Integer selectByCodeAndSkuId(@Param("code") String code,@Param("skuId") Integer skuId,@Param("shopId") String shopId,@Param("isVip") String isVip);
Integer selectByNewQcode(@Param("code") String code,@Param("productId") Integer productId,@Param("shopId") String shopId,@Param("list") List list);
List selGroups(@Param("proName") String proName,@Param("type") String type,
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbReceiptSalesMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbReceiptSalesMapper.java
deleted file mode 100644
index 51af334..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbReceiptSalesMapper.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.TbReceiptSales;
-
-public interface TbReceiptSalesMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(TbReceiptSales record);
-
- int insertSelective(TbReceiptSales record);
-
- TbReceiptSales selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(TbReceiptSales record);
-
- int updateByPrimaryKey(TbReceiptSales record);
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbReleaseFlowMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbReleaseFlowMapper.java
deleted file mode 100644
index 0cce4bd..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbReleaseFlowMapper.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-public interface TbReleaseFlowMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(TbReleaseFlow record);
-
- int insertSelective(TbReleaseFlow record);
-
- TbReleaseFlow selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(TbReleaseFlow record);
-
- int updateByPrimaryKey(TbReleaseFlow record);
-
- List selectByUserId(@Param("userId") String userId);
-
- List selectAll();
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbRenewalsPayLogMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbRenewalsPayLogMapper.java
deleted file mode 100644
index 0f317e8..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbRenewalsPayLogMapper.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.TbRenewalsPayLog;
-
-public interface TbRenewalsPayLogMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(TbRenewalsPayLog record);
-
- int insertSelective(TbRenewalsPayLog record);
-
- TbRenewalsPayLog selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(TbRenewalsPayLog record);
-
- int updateByPrimaryKey(TbRenewalsPayLog record);
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopAdDao.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopAdDao.java
index 3030d0f..5cbe34a 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopAdDao.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopAdDao.java
@@ -17,7 +17,7 @@ public interface TbShopAdDao {
*
* @return 对象列表
*/
- @Select("select * from fycashier.tb_shop_ad where (shop_id = #{songId} or shop_id = 1) and status=1")
+ @Select("select * from tb_shop_ad where (shop_id = #{songId} or shop_id = 1) and status=1")
List shopAdList(Integer shopId);
}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopCashSpreadMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopCashSpreadMapper.java
deleted file mode 100644
index ddcc1bd..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopCashSpreadMapper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.TbShopCashSpread;
-import com.chaozhanggui.system.cashierservice.entity.TbShopCashSpreadWithBLOBs;
-
-public interface TbShopCashSpreadMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(TbShopCashSpreadWithBLOBs record);
-
- int insertSelective(TbShopCashSpreadWithBLOBs record);
-
- TbShopCashSpreadWithBLOBs selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(TbShopCashSpreadWithBLOBs record);
-
- int updateByPrimaryKeyWithBLOBs(TbShopCashSpreadWithBLOBs record);
-
- int updateByPrimaryKey(TbShopCashSpread record);
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopCouponMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopCouponMapper.java
new file mode 100644
index 0000000..0ce36a0
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopCouponMapper.java
@@ -0,0 +1,68 @@
+package com.chaozhanggui.system.cashierservice.dao;
+
+import com.chaozhanggui.system.cashierservice.entity.TbShopCoupon;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.Pageable;
+
+import java.util.List;
+
+/**
+ * 优惠券(TbShopCoupon)表数据库访问层
+ *
+ * @author ww
+ * @since 2024-10-23 14:25:13
+ */
+public interface TbShopCouponMapper {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param id 主键
+ * @return 实例对象
+ */
+ TbShopCoupon queryById(Integer id);
+
+ /**
+ * 查询数据
+ *
+ * @param tbShopCoupon 查询条件
+ * @param pageable 分页对象
+ * @return 对象列表
+ */
+ List queryAll(TbShopCoupon tbShopCoupon, @Param("pageable") Pageable pageable);
+
+
+ /**
+ * 新增数据
+ *
+ * @param tbShopCoupon 实例对象
+ * @return 影响行数
+ */
+ int insert(TbShopCoupon tbShopCoupon);
+
+ /**
+ * 批量新增数据(MyBatis原生foreach方法)
+ *
+ * @param entities List 实例对象列表
+ * @return 影响行数
+ */
+ int insertBatch(@Param("entities") List entities);
+
+ /**
+ * 修改数据
+ *
+ * @param tbShopCoupon 实例对象
+ * @return 影响行数
+ */
+ int update(TbShopCoupon tbShopCoupon);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param id 主键
+ * @return 影响行数
+ */
+ int deleteById(Integer id);
+
+}
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopCurrencyMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopCurrencyMapper.java
deleted file mode 100644
index 8dbcb5b..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopCurrencyMapper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.TbShopCurrency;
-import com.chaozhanggui.system.cashierservice.entity.TbShopCurrencyWithBLOBs;
-
-public interface TbShopCurrencyMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(TbShopCurrencyWithBLOBs record);
-
- int insertSelective(TbShopCurrencyWithBLOBs record);
-
- TbShopCurrencyWithBLOBs selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(TbShopCurrencyWithBLOBs record);
-
- int updateByPrimaryKeyWithBLOBs(TbShopCurrencyWithBLOBs record);
-
- int updateByPrimaryKey(TbShopCurrency record);
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopExtendMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopExtendMapper.java
new file mode 100644
index 0000000..0e80d49
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopExtendMapper.java
@@ -0,0 +1,33 @@
+package com.chaozhanggui.system.cashierservice.dao;
+
+import com.chaozhanggui.system.cashierservice.entity.TbShopExtend;
+
+import java.util.List;
+
+/**
+ * 店铺扩展信息(TbShopExtend)表数据库访问层
+ *
+ * @author ww
+ * @since 2024-08-21 09:40:25
+ */
+public interface TbShopExtendMapper {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param id 主键
+ * @return 实例对象
+ */
+ TbShopExtend queryById(Integer id);
+
+ TbShopExtend queryByShopIdAndAutoKey(Integer shopId,String autokey);
+
+ /**
+ * 查询数据
+ *
+ * @param tbShopExtend 查询条件
+ * @return 对象列表
+ */
+ List queryAll(TbShopExtend tbShopExtend);
+}
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopInfoMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopInfoMapper.java
index ad6904e..a22953d 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopInfoMapper.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopInfoMapper.java
@@ -13,11 +13,6 @@ import java.util.List;
@Component
@Mapper
public interface TbShopInfoMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(TbShopInfo record);
-
- int insertSelective(TbShopInfo record);
List selShopInfoByGps(@Param("rightTopLng") Double rightTopLng, @Param("rightTopLat") Double rightTopLat,
@Param("leftBottomLng") Double leftBottomLng, @Param("leftBottomLat") Double leftBottomLat,
@@ -30,12 +25,6 @@ public interface TbShopInfoMapper {
List selectByIds(@Param("list") List ids);
- int updateByPrimaryKeySelective(TbShopInfo record);
-
- int updateByPrimaryKeyWithBLOBs(TbShopInfo record);
-
- int updateByPrimaryKey(TbShopInfo record);
-
TbShopInfo selectByQrCode(String qrcode);
TbShopInfo selectByPhone(String phone);
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopSongMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopSongMapper.java
index c998a25..77196f8 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopSongMapper.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopSongMapper.java
@@ -30,10 +30,10 @@ public interface TbShopSongMapper {
List selectAllAndSearch(Integer shopId, String keyWord);
- @Select("select * from fycashier.tb_shop_song where id=#{songId} and status=1")
+ @Select("select * from tb_shop_song where id=#{songId} and status=1")
TbShopSong selectById(@Param("songId") Integer songId);
- @Update("update fycashier.tb_shop_song set sales_number=sales_number+#{num} where id=#{id}")
+ @Update("update tb_shop_song set sales_number=sales_number+#{num} where id=#{id}")
int incrNum(@Param("num") Integer num,@Param("id") Integer id);
}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopSongOrderMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopSongOrderMapper.java
index 7c461ed..ed7720b 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopSongOrderMapper.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopSongOrderMapper.java
@@ -48,7 +48,7 @@ public interface TbShopSongOrderMapper {
" AND a.id=#{id}")
Map selectByUserIdAndId(@Param("openId") String openId, @Param("id") Integer id);
- @Select("select * from fycashier.tb_shop_song_order where order_no=#{orderNo};")
+ @Select("select * from tb_shop_song_order where order_no=#{orderNo};")
TbShopSongOrder selectByOrderNo(@Param("orderNo") String orderNo);
@Delete("DELETE FROM tb_shop_song_order\n" +
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopUserMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopUserMapper.java
index a87fe71..6df8e88 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopUserMapper.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbShopUserMapper.java
@@ -1,14 +1,13 @@
package com.chaozhanggui.system.cashierservice.dao;
-import com.chaozhanggui.system.cashierservice.entity.TbParams;
import com.chaozhanggui.system.cashierservice.entity.TbShopUser;
import com.chaozhanggui.system.cashierservice.entity.vo.ShopUserListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
+import java.math.BigDecimal;
import java.util.List;
-import java.util.Map;
@Component
@Mapper
@@ -32,11 +31,11 @@ public interface TbShopUserMapper {
TbShopUser selectByPhoneAndShopId(@Param("phone") String phone,@Param("shopId") String shopId);
TbShopUser selectPCByPhoneAndShopId(@Param("phone") String phone,@Param("shopId") String shopId);
List selectAllByUserId(@Param("userId") String userId);
+ List selectVipByUserId(@Param("userId") Integer userId);
+ BigDecimal countAmount(@Param("userId") Integer userId);
List selectByUserId(@Param("userId") String userId, @Param("shopId") String shopId);
TbShopUser selectByOpenId(@Param("openId") String openId);
-
- TbParams selectParams();
}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbSplitAccountsMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbSplitAccountsMapper.java
deleted file mode 100644
index 70ee67a..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbSplitAccountsMapper.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.TbSplitAccounts;
-
-public interface TbSplitAccountsMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(TbSplitAccounts record);
-
- int insertSelective(TbSplitAccounts record);
-
- TbSplitAccounts selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(TbSplitAccounts record);
-
- int updateByPrimaryKey(TbSplitAccounts record);
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbSystemCouponsMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbSystemCouponsMapper.java
deleted file mode 100644
index c66ed50..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbSystemCouponsMapper.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.TbSystemCoupons;
-import org.apache.ibatis.annotations.Param;
-
-import java.math.BigDecimal;
-import java.util.List;
-
-public interface TbSystemCouponsMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(TbSystemCoupons record);
-
- int insertSelective(TbSystemCoupons record);
-
- TbSystemCoupons selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(TbSystemCoupons record);
-
- int updateByPrimaryKey(TbSystemCoupons record);
-
- List selectAll(@Param("type") String type);
-
- int selectByAmount(@Param("orderNum") BigDecimal orderNum);
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbUserCouponsMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbUserCouponsMapper.java
deleted file mode 100644
index 192a2e3..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbUserCouponsMapper.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.TbUserCoupons;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.springframework.stereotype.Component;
-
-import java.math.BigDecimal;
-import java.util.List;
-
-@Component
-@Mapper
-public interface TbUserCouponsMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(TbUserCoupons record);
-
- int insertSelective(TbUserCoupons record);
-
- TbUserCoupons selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(TbUserCoupons record);
-
- int updateByPrimaryKey(TbUserCoupons record);
-
- List selectByUserId(@Param("userId") String userId,@Param("status") String status,@Param("amount") BigDecimal amount);
-
- TbUserCoupons selectByOrderId(@Param("orderId") Integer orderId);
-
- int selectByUserIdAndAmount(@Param("userId") String userId, @Param("orderNum") BigDecimal orderNum);
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbWiningParamsMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbWiningParamsMapper.java
deleted file mode 100644
index 803fc9f..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbWiningParamsMapper.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.TbWiningParams;
-
-import java.util.List;
-
-public interface TbWiningParamsMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(TbWiningParams record);
-
- int insertSelective(TbWiningParams record);
-
- TbWiningParams selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(TbWiningParams record);
-
- int updateByPrimaryKey(TbWiningParams record);
-
- List selectAll();
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbWiningUserMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbWiningUserMapper.java
deleted file mode 100644
index 8659d34..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbWiningUserMapper.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.TbWiningUser;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-
-@Component
-@Mapper
-public interface TbWiningUserMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(TbWiningUser record);
-
- int insertSelective(TbWiningUser record);
-
- TbWiningUser selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(TbWiningUser record);
-
- int updateByPrimaryKey(TbWiningUser record);
-
- List selectAllByTrade(@Param("day") String day);
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbYhqParamsMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbYhqParamsMapper.java
deleted file mode 100644
index 0693c83..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbYhqParamsMapper.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.TbYhqParams;
-
-import java.util.List;
-
-public interface TbYhqParamsMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(TbYhqParams record);
-
- int insertSelective(TbYhqParams record);
-
- TbYhqParams selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(TbYhqParams record);
-
- int updateByPrimaryKey(TbYhqParams record);
-
- List selectAll();
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/ViewOrderMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ViewOrderMapper.java
deleted file mode 100644
index 44a16c9..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/ViewOrderMapper.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.chaozhanggui.system.cashierservice.dao;
-
-import com.chaozhanggui.system.cashierservice.entity.ViewOrder;
-
-public interface ViewOrderMapper {
- int insert(ViewOrder record);
-
- int insertSelective(ViewOrder record);
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/Enum/OrderUseTypeEnum.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/Enum/OrderUseTypeEnum.java
new file mode 100644
index 0000000..28707a3
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/Enum/OrderUseTypeEnum.java
@@ -0,0 +1,18 @@
+package com.chaozhanggui.system.cashierservice.entity.Enum;
+
+import lombok.Getter;
+
+/**
+ * 订餐用餐类型枚举
+ */
+@Getter
+public enum OrderUseTypeEnum {
+ TAKEOUT("takeout"),
+ DINE_IN_AFTER("dine-in-after"),
+ DINE_IN_BEFORE("dine-in-before");
+ private final String value;
+
+ OrderUseTypeEnum(String value) {
+ this.value = value;
+ }
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/Enum/PlatformTypeEnum.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/Enum/PlatformTypeEnum.java
new file mode 100644
index 0000000..b23596d
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/Enum/PlatformTypeEnum.java
@@ -0,0 +1,13 @@
+package com.chaozhanggui.system.cashierservice.entity.Enum;
+
+import lombok.Getter;
+
+@Getter
+public enum PlatformTypeEnum {
+ MINI_APP("miniapp");
+ private final String value;
+
+ PlatformTypeEnum(String value) {
+ this.value = value;
+ }
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/Enum/ShopInfoEatModelEnum.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/Enum/ShopInfoEatModelEnum.java
new file mode 100644
index 0000000..9f9ee03
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/Enum/ShopInfoEatModelEnum.java
@@ -0,0 +1,18 @@
+package com.chaozhanggui.system.cashierservice.entity.Enum;
+
+import lombok.Getter;
+
+/**
+ * 店铺就餐类型
+ */
+@Getter
+public enum ShopInfoEatModelEnum {
+ TAKE_OUT("take-out"),
+ DINE_IN("dine-in");
+
+ private final String value;
+
+ ShopInfoEatModelEnum(String value) {
+ this.value = value;
+ }
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/Enum/ShopInfoRegisterlEnum.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/Enum/ShopInfoRegisterlEnum.java
new file mode 100644
index 0000000..5765104
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/Enum/ShopInfoRegisterlEnum.java
@@ -0,0 +1,20 @@
+package com.chaozhanggui.system.cashierservice.entity.Enum;
+
+import lombok.Getter;
+
+/**
+ * 店铺注册类型枚举
+ */
+@Getter
+public enum ShopInfoRegisterlEnum {
+ // 快餐版
+ MUNCHIES("munchies"),
+ // 餐饮版
+ RESTAURANT("restaurant");
+
+ private final String value;
+
+ ShopInfoRegisterlEnum(String value) {
+ this.value = value;
+ }
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbActivate.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbActivate.java
index c223bfc..35d9c79 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbActivate.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbActivate.java
@@ -1,24 +1,48 @@
package com.chaozhanggui.system.cashierservice.entity;
+import java.util.Date;
import java.io.Serializable;
-import java.math.BigDecimal;
+import java.util.List;
+/**
+ * (TbActivate)实体类
+ *
+ * @author ww
+ * @since 2024-10-23 14:16:33
+ */
public class TbActivate implements Serializable {
+ private static final long serialVersionUID = 216340931948517603L;
+
private Integer id;
private Integer shopId;
+ /**
+ * 充值金额
+ */
+ private Integer amount;
+ /**
+ * 赠送金额
+ */
+ private Integer giftAmount;
+ /**
+ * 是否使用优惠卷 0否 1是
+ */
+ private Integer isUseCoupon;
+ /**
+ * 优惠卷id
+ */
+ private Integer couponId;
+ /**
+ * 优惠卷数量
+ */
+ private Integer num;
- private Integer minNum;
+ private Date createTime = new Date();
- private Integer maxNum;
+ private Date updateTime = new Date();
- private BigDecimal handselNum;
-
- private String handselType;
-
- private String isDel;
-
- private static final long serialVersionUID = 1L;
+ private String couponDesc;
+ private List gives;
public Integer getId() {
return id;
@@ -36,43 +60,77 @@ public class TbActivate implements Serializable {
this.shopId = shopId;
}
- public Integer getMinNum() {
- return minNum;
+ public Integer getAmount() {
+ return amount;
}
- public void setMinNum(Integer minNum) {
- this.minNum = minNum;
+ public void setAmount(Integer amount) {
+ this.amount = amount;
}
- public Integer getMaxNum() {
- return maxNum;
+ public Integer getGiftAmount() {
+ return giftAmount;
}
- public void setMaxNum(Integer maxNum) {
- this.maxNum = maxNum;
+ public void setGiftAmount(Integer giftAmount) {
+ this.giftAmount = giftAmount;
}
- public BigDecimal getHandselNum() {
- return handselNum;
+ public Integer getIsUseCoupon() {
+ return isUseCoupon;
}
- public void setHandselNum(BigDecimal handselNum) {
- this.handselNum = handselNum;
+ public void setIsUseCoupon(Integer isUseCoupon) {
+ this.isUseCoupon = isUseCoupon;
}
- public String getHandselType() {
- return handselType;
+ public Integer getCouponId() {
+ return couponId;
}
- public void setHandselType(String handselType) {
- this.handselType = handselType == null ? null : handselType.trim();
+ public void setCouponId(Integer couponId) {
+ this.couponId = couponId;
}
- public String getIsDel() {
- return isDel;
+ public Integer getNum() {
+ return num;
}
- public void setIsDel(String isDel) {
- this.isDel = isDel == null ? null : isDel.trim();
+ public void setNum(Integer num) {
+ this.num = num;
}
-}
\ No newline at end of file
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public Date getUpdateTime() {
+ return updateTime;
+ }
+
+ public void setUpdateTime(Date updateTime) {
+ this.updateTime = updateTime;
+ }
+
+
+ public String getCouponDesc() {
+ return couponDesc;
+ }
+
+ public void setCouponDesc(String couponDesc) {
+ this.couponDesc = couponDesc;
+ }
+
+ public List getGives() {
+ return gives;
+ }
+
+ public void setGives(List gives) {
+ this.gives = gives;
+ }
+}
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbActivateInRecord.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbActivateInRecord.java
new file mode 100644
index 0000000..e7385df
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbActivateInRecord.java
@@ -0,0 +1,223 @@
+package com.chaozhanggui.system.cashierservice.entity;
+
+import java.util.Date;
+import java.io.Serializable;
+
+/**
+ * 活动商品赠送记录表(TbActivateInRecord)实体类
+ *
+ * @author ww
+ * @since 2024-10-23 16:43:02
+ */
+public class TbActivateInRecord implements Serializable {
+ private static final long serialVersionUID = -31673077202067433L;
+
+ private Integer id;
+/**
+ * 会员id
+ */
+ private Integer vipUserId;
+/**
+ * 卷Id (校验是否可用)
+ */
+ private Integer couponId;
+/**
+ * 卷描述 满10减2/商品卷
+ */
+ private String name;
+/**
+ * 1-满减 2-商品
+ */
+ private Integer type;
+/**
+ * 商品id
+ */
+ private Integer proId;
+/**
+ * 满多少金额
+ */
+ private Integer fullAmount;
+/**
+ * 减多少金额
+ */
+ private Integer discountAmount;
+/**
+ * 赠送数量
+ */
+ private Integer num;
+/**
+ * 未使用数量
+ */
+ private Integer overNum;
+/**
+ * 店铺id
+ */
+ private Integer shopId;
+/**
+ * 来源活动id
+ */
+ private Integer sourceActId;
+
+ private Integer sourceFlowId;
+/**
+ * 可用开始时间
+ */
+ private Date useStartTime;
+/**
+ * 可用结束时间
+ */
+ private Date useEndTime;
+
+ private Date createTime;
+
+ private Date updateTime;
+
+ private String couponJson;
+
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Integer getVipUserId() {
+ return vipUserId;
+ }
+
+ public void setVipUserId(Integer vipUserId) {
+ this.vipUserId = vipUserId;
+ }
+
+ public Integer getCouponId() {
+ return couponId;
+ }
+
+ public void setCouponId(Integer couponId) {
+ this.couponId = couponId;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Integer getType() {
+ return type;
+ }
+
+ public void setType(Integer type) {
+ this.type = type;
+ }
+
+ public Integer getProId() {
+ return proId;
+ }
+
+ public void setProId(Integer proId) {
+ this.proId = proId;
+ }
+
+ public Integer getFullAmount() {
+ return fullAmount;
+ }
+
+ public void setFullAmount(Integer fullAmount) {
+ this.fullAmount = fullAmount;
+ }
+
+ public Integer getDiscountAmount() {
+ return discountAmount;
+ }
+
+ public void setDiscountAmount(Integer discountAmount) {
+ this.discountAmount = discountAmount;
+ }
+
+ public Integer getNum() {
+ return num;
+ }
+
+ public void setNum(Integer num) {
+ this.num = num;
+ }
+
+ public Integer getOverNum() {
+ return overNum;
+ }
+
+ public void setOverNum(Integer overNum) {
+ this.overNum = overNum;
+ }
+
+ public Integer getShopId() {
+ return shopId;
+ }
+
+ public void setShopId(Integer shopId) {
+ this.shopId = shopId;
+ }
+
+ public Integer getSourceActId() {
+ return sourceActId;
+ }
+
+ public void setSourceActId(Integer sourceActId) {
+ this.sourceActId = sourceActId;
+ }
+
+ public Integer getSourceFlowId() {
+ return sourceFlowId;
+ }
+
+ public void setSourceFlowId(Integer sourceFlowId) {
+ this.sourceFlowId = sourceFlowId;
+ }
+
+ public Date getUseStartTime() {
+ return useStartTime;
+ }
+
+ public void setUseStartTime(Date useStartTime) {
+ this.useStartTime = useStartTime;
+ }
+
+ public Date getUseEndTime() {
+ return useEndTime;
+ }
+
+ public void setUseEndTime(Date useEndTime) {
+ this.useEndTime = useEndTime;
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public Date getUpdateTime() {
+ return updateTime;
+ }
+
+ public void setUpdateTime(Date updateTime) {
+ this.updateTime = updateTime;
+ }
+
+ public String getCouponJson() {
+ return couponJson;
+ }
+
+ public void setCouponJson(String couponJson) {
+ this.couponJson = couponJson;
+ }
+
+}
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbActivateOutRecord.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbActivateOutRecord.java
new file mode 100644
index 0000000..d1afc74
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbActivateOutRecord.java
@@ -0,0 +1,141 @@
+package com.chaozhanggui.system.cashierservice.entity;
+
+import java.util.Date;
+import java.io.Serializable;
+
+/**
+ * 活动赠送商品使用记录表(TbActivateOutRecord)实体类
+ *
+ * @author ww
+ * @since 2024-10-23 14:55:22
+ */
+public class TbActivateOutRecord implements Serializable {
+ private static final long serialVersionUID = -34082928893064380L;
+
+ private Integer id;
+
+ private Integer shopId;
+ /**
+ * 订单id
+ */
+ private String orderId;
+ /**
+ * 商品赠送Id tb_activate_in_record的id
+ */
+ private Integer giveId;
+ /**
+ * 会员id
+ */
+ private Integer vipUserId;
+ /**
+ * 1-满减 2-商品
+ */
+ private Integer type;
+ /**
+ * 使用数量
+ */
+ private Integer useNum;
+ /**
+ * 退单量
+ */
+ private Integer refNum;
+ /**
+ * 新建: create, 完成: closed, 取消:cancel,
+ */
+ private String status;
+
+ private Date createTime;
+
+ private Date updateTime;
+
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Integer getShopId() {
+ return shopId;
+ }
+
+ public void setShopId(Integer shopId) {
+ this.shopId = shopId;
+ }
+
+ public String getOrderId() {
+ return orderId;
+ }
+
+ public void setOrderId(String orderId) {
+ this.orderId = orderId;
+ }
+
+ public Integer getGiveId() {
+ return giveId;
+ }
+
+ public void setGiveId(Integer giveId) {
+ this.giveId = giveId;
+ }
+
+ public Integer getVipUserId() {
+ return vipUserId;
+ }
+
+ public void setVipUserId(Integer vipUserId) {
+ this.vipUserId = vipUserId;
+ }
+
+ public Integer getType() {
+ return type;
+ }
+
+ public void setType(Integer type) {
+ this.type = type;
+ }
+
+ public Integer getUseNum() {
+ return useNum;
+ }
+
+ public void setUseNum(Integer useNum) {
+ this.useNum = useNum;
+ }
+
+ public Integer getRefNum() {
+ return refNum;
+ }
+
+ public void setRefNum(Integer refNum) {
+ this.refNum = refNum;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public Date getUpdateTime() {
+ return updateTime;
+ }
+
+ public void setUpdateTime(Date updateTime) {
+ this.updateTime = updateTime;
+ }
+
+}
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCallQueue.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCallQueue.java
new file mode 100644
index 0000000..943ac55
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCallQueue.java
@@ -0,0 +1,213 @@
+package com.chaozhanggui.system.cashierservice.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ * 叫号排号表
+ * @TableName tb_call_queue
+ */
+@TableName(value ="tb_call_queue")
+@Data
+public class TbCallQueue implements Serializable {
+ /**
+ *
+ */
+ @TableId(type = IdType.AUTO)
+ private Integer id;
+
+ /**
+ * 叫号台桌类型id
+ */
+ private Integer callTableId;
+
+ /**
+ * 手机号
+ */
+ private String phone;
+
+ /**
+ * 姓名
+ */
+ private String name;
+
+ /**
+ * 店铺名称
+ */
+ private String shopName;
+
+ /**
+ * 店铺id
+ */
+ private Integer shopId;
+
+ /**
+ * -1已取消 0排队中 1叫号中 2已入座 3 已过号
+ */
+ private Integer state;
+
+ /**
+ * 排号时间
+ */
+ private Date createTime;
+
+ /**
+ * 叫号时间
+ */
+ private Date callTime;
+
+ /**
+ * 叫号次数
+ */
+ private Integer callCount;
+
+ /**
+ * 过号时间
+ */
+ private Date passTime;
+
+ /**
+ * 取消时间
+ */
+ private Date cancelTime;
+
+ /**
+ * 备注
+ */
+ private String note;
+
+ /**
+ *
+ */
+ private Integer userId;
+
+ /**
+ *
+ */
+ private String openId;
+
+ /**
+ * 订阅提醒 0未订阅 1已订阅
+ */
+ private Integer subState;
+
+ /**
+ * 确认时间
+ */
+ private Date confirmTime;
+
+ /**
+ * 叫号号码
+ */
+ private String callNum;
+
+ /**
+ * 创建年月日
+ */
+ private String createDay;
+
+ /**
+ * 是否已经顺延
+ */
+ private Integer isPostpone;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public boolean equals(Object that) {
+ if (this == that) {
+ return true;
+ }
+ if (that == null) {
+ return false;
+ }
+ if (getClass() != that.getClass()) {
+ return false;
+ }
+ TbCallQueue other = (TbCallQueue) that;
+ return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+ && (this.getCallTableId() == null ? other.getCallTableId() == null : this.getCallTableId().equals(other.getCallTableId()))
+ && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
+ && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
+ && (this.getShopName() == null ? other.getShopName() == null : this.getShopName().equals(other.getShopName()))
+ && (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()))
+ && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
+ && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+ && (this.getCallTime() == null ? other.getCallTime() == null : this.getCallTime().equals(other.getCallTime()))
+ && (this.getCallCount() == null ? other.getCallCount() == null : this.getCallCount().equals(other.getCallCount()))
+ && (this.getPassTime() == null ? other.getPassTime() == null : this.getPassTime().equals(other.getPassTime()))
+ && (this.getCancelTime() == null ? other.getCancelTime() == null : this.getCancelTime().equals(other.getCancelTime()))
+ && (this.getNote() == null ? other.getNote() == null : this.getNote().equals(other.getNote()))
+ && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
+ && (this.getOpenId() == null ? other.getOpenId() == null : this.getOpenId().equals(other.getOpenId()))
+ && (this.getSubState() == null ? other.getSubState() == null : this.getSubState().equals(other.getSubState()))
+ && (this.getConfirmTime() == null ? other.getConfirmTime() == null : this.getConfirmTime().equals(other.getConfirmTime()))
+ && (this.getCallNum() == null ? other.getCallNum() == null : this.getCallNum().equals(other.getCallNum()))
+ && (this.getCreateDay() == null ? other.getCreateDay() == null : this.getCreateDay().equals(other.getCreateDay()))
+ && (this.getIsPostpone() == null ? other.getIsPostpone() == null : this.getIsPostpone().equals(other.getIsPostpone()));
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+ result = prime * result + ((getCallTableId() == null) ? 0 : getCallTableId().hashCode());
+ result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
+ result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
+ result = prime * result + ((getShopName() == null) ? 0 : getShopName().hashCode());
+ result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
+ result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
+ result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+ result = prime * result + ((getCallTime() == null) ? 0 : getCallTime().hashCode());
+ result = prime * result + ((getCallCount() == null) ? 0 : getCallCount().hashCode());
+ result = prime * result + ((getPassTime() == null) ? 0 : getPassTime().hashCode());
+ result = prime * result + ((getCancelTime() == null) ? 0 : getCancelTime().hashCode());
+ result = prime * result + ((getNote() == null) ? 0 : getNote().hashCode());
+ result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
+ result = prime * result + ((getOpenId() == null) ? 0 : getOpenId().hashCode());
+ result = prime * result + ((getSubState() == null) ? 0 : getSubState().hashCode());
+ result = prime * result + ((getConfirmTime() == null) ? 0 : getConfirmTime().hashCode());
+ result = prime * result + ((getCallNum() == null) ? 0 : getCallNum().hashCode());
+ result = prime * result + ((getCreateDay() == null) ? 0 : getCreateDay().hashCode());
+ result = prime * result + ((getIsPostpone() == null) ? 0 : getIsPostpone().hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", id=").append(id);
+ sb.append(", callTableId=").append(callTableId);
+ sb.append(", phone=").append(phone);
+ sb.append(", name=").append(name);
+ sb.append(", shopName=").append(shopName);
+ sb.append(", shopId=").append(shopId);
+ sb.append(", state=").append(state);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", callTime=").append(callTime);
+ sb.append(", callCount=").append(callCount);
+ sb.append(", passTime=").append(passTime);
+ sb.append(", cancelTime=").append(cancelTime);
+ sb.append(", note=").append(note);
+ sb.append(", userId=").append(userId);
+ sb.append(", openId=").append(openId);
+ sb.append(", subState=").append(subState);
+ sb.append(", confirmTime=").append(confirmTime);
+ sb.append(", callNum=").append(callNum);
+ sb.append(", createDay=").append(createDay);
+ sb.append(", isPostpone=").append(isPostpone);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCallTable.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCallTable.java
new file mode 100644
index 0000000..a917dd6
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCallTable.java
@@ -0,0 +1,149 @@
+package com.chaozhanggui.system.cashierservice.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ *
+ * @TableName tb_call_table
+ */
+@TableName(value ="tb_call_table")
+@Data
+public class TbCallTable implements Serializable {
+ /**
+ *
+ */
+ @TableId(type = IdType.AUTO)
+ private Integer id;
+
+ /**
+ * 名称
+ */
+ private String name;
+
+ /**
+ * 描述
+ */
+ private String note;
+
+ /**
+ * 等待时间分钟
+ */
+ private Integer waitTime;
+
+ /**
+ * 前缀
+ */
+ private String prefix;
+
+ /**
+ * 起始号码
+ */
+ private Integer start;
+
+ /**
+ * 临近几桌提醒
+ */
+ private Integer nearNum;
+
+ /**
+ * 0禁用 1使用
+ */
+ private Integer state;
+
+ /**
+ * 店铺id
+ */
+ private Integer shopId;
+
+ /**
+ * 二维码地址
+ */
+ private String qrcode;
+
+ /**
+ *
+ */
+ private Date createTime;
+
+ /**
+ *
+ */
+ private Date updateTime;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public boolean equals(Object that) {
+ if (this == that) {
+ return true;
+ }
+ if (that == null) {
+ return false;
+ }
+ if (getClass() != that.getClass()) {
+ return false;
+ }
+ TbCallTable other = (TbCallTable) that;
+ return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+ && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
+ && (this.getNote() == null ? other.getNote() == null : this.getNote().equals(other.getNote()))
+ && (this.getWaitTime() == null ? other.getWaitTime() == null : this.getWaitTime().equals(other.getWaitTime()))
+ && (this.getPrefix() == null ? other.getPrefix() == null : this.getPrefix().equals(other.getPrefix()))
+ && (this.getStart() == null ? other.getStart() == null : this.getStart().equals(other.getStart()))
+ && (this.getNearNum() == null ? other.getNearNum() == null : this.getNearNum().equals(other.getNearNum()))
+ && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
+ && (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()))
+ && (this.getQrcode() == null ? other.getQrcode() == null : this.getQrcode().equals(other.getQrcode()))
+ && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+ && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+ result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
+ result = prime * result + ((getNote() == null) ? 0 : getNote().hashCode());
+ result = prime * result + ((getWaitTime() == null) ? 0 : getWaitTime().hashCode());
+ result = prime * result + ((getPrefix() == null) ? 0 : getPrefix().hashCode());
+ result = prime * result + ((getStart() == null) ? 0 : getStart().hashCode());
+ result = prime * result + ((getNearNum() == null) ? 0 : getNearNum().hashCode());
+ result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
+ result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
+ result = prime * result + ((getQrcode() == null) ? 0 : getQrcode().hashCode());
+ result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+ result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", id=").append(id);
+ sb.append(", name=").append(name);
+ sb.append(", note=").append(note);
+ sb.append(", waitTime=").append(waitTime);
+ sb.append(", prefix=").append(prefix);
+ sb.append(", start=").append(start);
+ sb.append(", nearNum=").append(nearNum);
+ sb.append(", state=").append(state);
+ sb.append(", shopId=").append(shopId);
+ sb.append(", qrcode=").append(qrcode);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", updateTime=").append(updateTime);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCashierCart.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCashierCart.java
index 0c99e3a..d978055 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCashierCart.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCashierCart.java
@@ -1,5 +1,8 @@
package com.chaozhanggui.system.cashierservice.entity;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
@@ -8,6 +11,7 @@ import java.math.BigDecimal;
@Data
public class TbCashierCart implements Serializable {
+ @TableId(type = IdType.AUTO)
private Integer id;
private String masterId;
@@ -58,7 +62,14 @@ public class TbCashierCart implements Serializable {
private Long updatedAt;
private Integer userId;
private String tableId;
+ private Byte isVip;
+ @TableField(exist = false)
private TbProductSpec tbProductSpec;
+ private String note;
+
+ private String platformType;
+ private String useType;
+ private Integer placeNum;
private static final long serialVersionUID = 1L;
@@ -69,4 +80,4 @@ public class TbCashierCart implements Serializable {
return "";
}
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCouponProduct.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCouponProduct.java
new file mode 100644
index 0000000..2572106
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbCouponProduct.java
@@ -0,0 +1,83 @@
+package com.chaozhanggui.system.cashierservice.entity;
+
+import java.util.Date;
+import java.io.Serializable;
+
+/**
+ * 活动赠送商品表(TbCouponProduct)实体类
+ *
+ * @author ww
+ * @since 2024-10-23 14:35:49
+ */
+public class TbCouponProduct implements Serializable {
+ private static final long serialVersionUID = 619724621133545616L;
+
+ private Integer id;
+ /**
+ * 活动Id
+ */
+ private Integer couponId;
+ /**
+ * 商品id
+ */
+ private Integer productId;
+ /**
+ * 数量
+ */
+ private Integer num;
+
+ private Date createTime;
+
+ private Date updateTime;
+
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Integer getCouponId() {
+ return couponId;
+ }
+
+ public void setCouponId(Integer couponId) {
+ this.couponId = couponId;
+ }
+
+ public Integer getProductId() {
+ return productId;
+ }
+
+ public void setProductId(Integer productId) {
+ this.productId = productId;
+ }
+
+ public Integer getNum() {
+ return num;
+ }
+
+ public void setNum(Integer num) {
+ this.num = num;
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public Date getUpdateTime() {
+ return updateTime;
+ }
+
+ public void setUpdateTime(Date updateTime) {
+ this.updateTime = updateTime;
+ }
+
+}
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbDeviceOperateInfo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbDeviceOperateInfo.java
deleted file mode 100644
index e6c8e56..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbDeviceOperateInfo.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import java.io.Serializable;
-import java.util.Date;
-
-public class TbDeviceOperateInfo implements Serializable {
- private Integer id;
-
- private String deviceno;
-
- private String type;
-
- private String shopId;
-
- private Date createtime;
-
- private String remark;
-
- private static final long serialVersionUID = 1L;
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public String getDeviceno() {
- return deviceno;
- }
-
- public void setDeviceno(String deviceno) {
- this.deviceno = deviceno == null ? null : deviceno.trim();
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type == null ? null : type.trim();
- }
-
- public String getShopId() {
- return shopId;
- }
-
- public void setShopId(String shopId) {
- this.shopId = shopId == null ? null : shopId.trim();
- }
-
- public Date getCreatetime() {
- return createtime;
- }
-
- public void setCreatetime(Date createtime) {
- this.createtime = createtime;
- }
-
- public String getRemark() {
- return remark;
- }
-
- public void setRemark(String remark) {
- this.remark = remark == null ? null : remark.trim();
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbDeviceStock.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbDeviceStock.java
deleted file mode 100644
index 0c6fc38..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbDeviceStock.java
+++ /dev/null
@@ -1,249 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-public class TbDeviceStock implements Serializable {
- private Integer id;
-
- private String code;
-
- private String snno;
-
- private String orderno;
-
- private BigDecimal price;
-
- private String type;
-
- private String groupno;
-
- private String buymercname;
-
- private String buymercid;
-
- private String actmercname;
-
- private String actmercid;
-
- private String status;
-
- private Date createtime;
-
- private String createby;
-
- private String delflag;
-
- private String remarks;
-
- private Date updatetime;
-
- private String deviceno;
-
- private Integer belonguserid;
-
- private Integer extractuserid;
-
- private String rolecode;
-
- private Date instocktime;
-
- private String transferstatus;
-
- private Date bindtime;
-
- private static final long serialVersionUID = 1L;
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public String getCode() {
- return code;
- }
-
- public void setCode(String code) {
- this.code = code == null ? null : code.trim();
- }
-
- public String getSnno() {
- return snno;
- }
-
- public void setSnno(String snno) {
- this.snno = snno == null ? null : snno.trim();
- }
-
- public String getOrderno() {
- return orderno;
- }
-
- public void setOrderno(String orderno) {
- this.orderno = orderno == null ? null : orderno.trim();
- }
-
- public BigDecimal getPrice() {
- return price;
- }
-
- public void setPrice(BigDecimal price) {
- this.price = price;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type == null ? null : type.trim();
- }
-
- public String getGroupno() {
- return groupno;
- }
-
- public void setGroupno(String groupno) {
- this.groupno = groupno == null ? null : groupno.trim();
- }
-
- public String getBuymercname() {
- return buymercname;
- }
-
- public void setBuymercname(String buymercname) {
- this.buymercname = buymercname == null ? null : buymercname.trim();
- }
-
- public String getBuymercid() {
- return buymercid;
- }
-
- public void setBuymercid(String buymercid) {
- this.buymercid = buymercid == null ? null : buymercid.trim();
- }
-
- public String getActmercname() {
- return actmercname;
- }
-
- public void setActmercname(String actmercname) {
- this.actmercname = actmercname == null ? null : actmercname.trim();
- }
-
- public String getActmercid() {
- return actmercid;
- }
-
- public void setActmercid(String actmercid) {
- this.actmercid = actmercid == null ? null : actmercid.trim();
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status == null ? null : status.trim();
- }
-
- public Date getCreatetime() {
- return createtime;
- }
-
- public void setCreatetime(Date createtime) {
- this.createtime = createtime;
- }
-
- public String getCreateby() {
- return createby;
- }
-
- public void setCreateby(String createby) {
- this.createby = createby == null ? null : createby.trim();
- }
-
- public String getDelflag() {
- return delflag;
- }
-
- public void setDelflag(String delflag) {
- this.delflag = delflag == null ? null : delflag.trim();
- }
-
- public String getRemarks() {
- return remarks;
- }
-
- public void setRemarks(String remarks) {
- this.remarks = remarks == null ? null : remarks.trim();
- }
-
- public Date getUpdatetime() {
- return updatetime;
- }
-
- public void setUpdatetime(Date updatetime) {
- this.updatetime = updatetime;
- }
-
- public String getDeviceno() {
- return deviceno;
- }
-
- public void setDeviceno(String deviceno) {
- this.deviceno = deviceno == null ? null : deviceno.trim();
- }
-
- public Integer getBelonguserid() {
- return belonguserid;
- }
-
- public void setBelonguserid(Integer belonguserid) {
- this.belonguserid = belonguserid;
- }
-
- public Integer getExtractuserid() {
- return extractuserid;
- }
-
- public void setExtractuserid(Integer extractuserid) {
- this.extractuserid = extractuserid;
- }
-
- public String getRolecode() {
- return rolecode;
- }
-
- public void setRolecode(String rolecode) {
- this.rolecode = rolecode == null ? null : rolecode.trim();
- }
-
- public Date getInstocktime() {
- return instocktime;
- }
-
- public void setInstocktime(Date instocktime) {
- this.instocktime = instocktime;
- }
-
- public String getTransferstatus() {
- return transferstatus;
- }
-
- public void setTransferstatus(String transferstatus) {
- this.transferstatus = transferstatus == null ? null : transferstatus.trim();
- }
-
- public Date getBindtime() {
- return bindtime;
- }
-
- public void setBindtime(Date bindtime) {
- this.bindtime = bindtime;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbFreeDineConfig.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbFreeDineConfig.java
new file mode 100644
index 0000000..38d8bc3
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbFreeDineConfig.java
@@ -0,0 +1,150 @@
+package com.chaozhanggui.system.cashierservice.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ * 霸王餐配置信息表
+ * @TableName tb_free_dine_config
+ */
+@TableName(value ="tb_free_dine_config")
+@Data
+public class TbFreeDineConfig implements Serializable {
+ /**
+ *
+ */
+ @TableId(type = IdType.AUTO)
+ private Integer id;
+
+ /**
+ * 是否启用
+ */
+ private Integer enable;
+
+ /**
+ * 充值多少倍免单
+ */
+ private Integer rechargeTimes;
+
+ /**
+ * 订单满多少元可以使用
+ */
+ private BigDecimal rechargeThreshold;
+
+ /**
+ * 是否与优惠券共享
+ */
+ private Integer withCoupon;
+
+ /**
+ * 是否与积分同享
+ */
+ private Integer withPoints;
+
+ /**
+ * 充值说明
+ */
+ private String rechargeDesc;
+
+ /**
+ * 使用类型 dine-in店内 takeout 自取 post快递,takeaway外卖
+ */
+ private String useType;
+
+ /**
+ * 门店id
+ */
+ private Integer shopId;
+
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+
+ /**
+ * 修改时间
+ */
+ private Date updateTime;
+
+ /**
+ * 可用的子门店id
+ */
+ private String childShopIdList;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public boolean equals(Object that) {
+ if (this == that) {
+ return true;
+ }
+ if (that == null) {
+ return false;
+ }
+ if (getClass() != that.getClass()) {
+ return false;
+ }
+ TbFreeDineConfig other = (TbFreeDineConfig) that;
+ return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+ && (this.getEnable() == null ? other.getEnable() == null : this.getEnable().equals(other.getEnable()))
+ && (this.getRechargeTimes() == null ? other.getRechargeTimes() == null : this.getRechargeTimes().equals(other.getRechargeTimes()))
+ && (this.getRechargeThreshold() == null ? other.getRechargeThreshold() == null : this.getRechargeThreshold().equals(other.getRechargeThreshold()))
+ && (this.getWithCoupon() == null ? other.getWithCoupon() == null : this.getWithCoupon().equals(other.getWithCoupon()))
+ && (this.getWithPoints() == null ? other.getWithPoints() == null : this.getWithPoints().equals(other.getWithPoints()))
+ && (this.getRechargeDesc() == null ? other.getRechargeDesc() == null : this.getRechargeDesc().equals(other.getRechargeDesc()))
+ && (this.getUseType() == null ? other.getUseType() == null : this.getUseType().equals(other.getUseType()))
+ && (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()))
+ && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+ && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
+ && (this.getChildShopIdList() == null ? other.getChildShopIdList() == null : this.getChildShopIdList().equals(other.getChildShopIdList()));
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+ result = prime * result + ((getEnable() == null) ? 0 : getEnable().hashCode());
+ result = prime * result + ((getRechargeTimes() == null) ? 0 : getRechargeTimes().hashCode());
+ result = prime * result + ((getRechargeThreshold() == null) ? 0 : getRechargeThreshold().hashCode());
+ result = prime * result + ((getWithCoupon() == null) ? 0 : getWithCoupon().hashCode());
+ result = prime * result + ((getWithPoints() == null) ? 0 : getWithPoints().hashCode());
+ result = prime * result + ((getRechargeDesc() == null) ? 0 : getRechargeDesc().hashCode());
+ result = prime * result + ((getUseType() == null) ? 0 : getUseType().hashCode());
+ result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
+ result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+ result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
+ result = prime * result + ((getChildShopIdList() == null) ? 0 : getChildShopIdList().hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", id=").append(id);
+ sb.append(", enable=").append(enable);
+ sb.append(", rechargeTimes=").append(rechargeTimes);
+ sb.append(", rechargeThreshold=").append(rechargeThreshold);
+ sb.append(", withCoupon=").append(withCoupon);
+ sb.append(", withPoints=").append(withPoints);
+ sb.append(", rechargeDesc=").append(rechargeDesc);
+ sb.append(", useType=").append(useType);
+ sb.append(", shopId=").append(shopId);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", updateTime=").append(updateTime);
+ sb.append(", childShopIdList=").append(childShopIdList);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbFreeDineRecord.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbFreeDineRecord.java
new file mode 100644
index 0000000..bd64fc0
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbFreeDineRecord.java
@@ -0,0 +1,166 @@
+package com.chaozhanggui.system.cashierservice.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ * 霸王餐充值记录
+ * @TableName tb_free_dine_record
+ */
+@TableName(value ="tb_free_dine_record")
+@Data
+public class TbFreeDineRecord implements Serializable {
+ /**
+ *
+ */
+ @TableId(type = IdType.AUTO)
+ private Integer id;
+
+ /**
+ * 0 已选择待消耗 1 已消耗 2 取消支付
+ */
+ private Integer state;
+
+ /**
+ * 订单id
+ */
+ private Integer orderId;
+
+ /**
+ * 订单金额
+ */
+ private BigDecimal orderAmount;
+
+ /**
+ * 充值金额
+ */
+ private BigDecimal rechargeAmount;
+
+ /**
+ * 最终支付金额
+ */
+ private BigDecimal payAmount;
+
+ /**
+ * 用户id
+ */
+ private Integer userId;
+
+ /**
+ * 会员id
+ */
+ private Integer vipUserId;
+
+ /**
+ * 店铺id
+ */
+ private Integer shopId;
+
+ /**
+ * 使用的优惠券信息
+ */
+ private String couponInfo;
+
+ /**
+ * 使用的积分信息
+ */
+ private Integer pointsNum;
+
+ /**
+ * 充值倍率
+ */
+ private Integer rechargeTimes;
+
+ /**
+ *
+ */
+ private BigDecimal rechargeThreshold;
+
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public boolean equals(Object that) {
+ if (this == that) {
+ return true;
+ }
+ if (that == null) {
+ return false;
+ }
+ if (getClass() != that.getClass()) {
+ return false;
+ }
+ TbFreeDineRecord other = (TbFreeDineRecord) that;
+ return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+ && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
+ && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
+ && (this.getOrderAmount() == null ? other.getOrderAmount() == null : this.getOrderAmount().equals(other.getOrderAmount()))
+ && (this.getRechargeAmount() == null ? other.getRechargeAmount() == null : this.getRechargeAmount().equals(other.getRechargeAmount()))
+ && (this.getPayAmount() == null ? other.getPayAmount() == null : this.getPayAmount().equals(other.getPayAmount()))
+ && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
+ && (this.getVipUserId() == null ? other.getVipUserId() == null : this.getVipUserId().equals(other.getVipUserId()))
+ && (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()))
+ && (this.getCouponInfo() == null ? other.getCouponInfo() == null : this.getCouponInfo().equals(other.getCouponInfo()))
+ && (this.getPointsNum() == null ? other.getPointsNum() == null : this.getPointsNum().equals(other.getPointsNum()))
+ && (this.getRechargeTimes() == null ? other.getRechargeTimes() == null : this.getRechargeTimes().equals(other.getRechargeTimes()))
+ && (this.getRechargeThreshold() == null ? other.getRechargeThreshold() == null : this.getRechargeThreshold().equals(other.getRechargeThreshold()))
+ && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+ result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
+ result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
+ result = prime * result + ((getOrderAmount() == null) ? 0 : getOrderAmount().hashCode());
+ result = prime * result + ((getRechargeAmount() == null) ? 0 : getRechargeAmount().hashCode());
+ result = prime * result + ((getPayAmount() == null) ? 0 : getPayAmount().hashCode());
+ result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
+ result = prime * result + ((getVipUserId() == null) ? 0 : getVipUserId().hashCode());
+ result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
+ result = prime * result + ((getCouponInfo() == null) ? 0 : getCouponInfo().hashCode());
+ result = prime * result + ((getPointsNum() == null) ? 0 : getPointsNum().hashCode());
+ result = prime * result + ((getRechargeTimes() == null) ? 0 : getRechargeTimes().hashCode());
+ result = prime * result + ((getRechargeThreshold() == null) ? 0 : getRechargeThreshold().hashCode());
+ result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", id=").append(id);
+ sb.append(", state=").append(state);
+ sb.append(", orderId=").append(orderId);
+ sb.append(", orderAmount=").append(orderAmount);
+ sb.append(", rechargeAmount=").append(rechargeAmount);
+ sb.append(", payAmount=").append(payAmount);
+ sb.append(", userId=").append(userId);
+ sb.append(", vipUserId=").append(vipUserId);
+ sb.append(", shopId=").append(shopId);
+ sb.append(", couponInfo=").append(couponInfo);
+ sb.append(", pointsNum=").append(pointsNum);
+ sb.append(", rechargeTimes=").append(rechargeTimes);
+ sb.append(", rechargeThreshold=").append(rechargeThreshold);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbIntegral.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbIntegral.java
deleted file mode 100644
index ed52c85..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbIntegral.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-public class TbIntegral implements Serializable {
- private Integer id;
-
- private String userId;
-
- private BigDecimal num;
-
- private String status;
-
- private Date createTime;
-
- private Date updateTime;
-
- private static final long serialVersionUID = 1L;
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public String getUserId() {
- return userId;
- }
-
- public void setUserId(String userId) {
- this.userId = userId == null ? null : userId.trim();
- }
-
- public BigDecimal getNum() {
- return num;
- }
-
- public void setNum(BigDecimal num) {
- this.num = num;
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status == null ? null : status.trim();
- }
-
- public Date getCreateTime() {
- return createTime;
- }
-
- public void setCreateTime(Date createTime) {
- this.createTime = createTime;
- }
-
- public Date getUpdateTime() {
- return updateTime;
- }
-
- public void setUpdateTime(Date updateTime) {
- this.updateTime = updateTime;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbIntegralFlow.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbIntegralFlow.java
deleted file mode 100644
index 888295e..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbIntegralFlow.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-public class TbIntegralFlow implements Serializable {
- private Integer id;
-
- private String userId;
-
- private BigDecimal num;
-
- private Date createTime;
-
- private Date updateTime;
-
- private static final long serialVersionUID = 1L;
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public String getUserId() {
- return userId;
- }
-
- public void setUserId(String userId) {
- this.userId = userId == null ? null : userId.trim();
- }
-
- public BigDecimal getNum() {
- return num;
- }
-
- public void setNum(BigDecimal num) {
- this.num = num;
- }
-
- public Date getCreateTime() {
- return createTime;
- }
-
- public void setCreateTime(Date createTime) {
- this.createTime = createTime;
- }
-
- public Date getUpdateTime() {
- return updateTime;
- }
-
- public void setUpdateTime(Date updateTime) {
- this.updateTime = updateTime;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMemberIn.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMemberIn.java
index aa6b8d4..9ca7508 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMemberIn.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMemberIn.java
@@ -1,9 +1,12 @@
package com.chaozhanggui.system.cashierservice.entity;
+import lombok.Data;
+
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
+@Data
public class TbMemberIn implements Serializable {
private Integer id;
@@ -27,93 +30,11 @@ public class TbMemberIn implements Serializable {
private Integer shopId;
+ private Integer orderId;
+
+ private Integer type;
+
private static final long serialVersionUID = 1L;
- public Integer getId() {
- return id;
- }
- public void setId(Integer id) {
- this.id = id;
- }
-
- public Integer getUserId() {
- return userId;
- }
-
- public void setUserId(Integer userId) {
- this.userId = userId;
- }
-
- public Integer getMerchantId() {
- return merchantId;
- }
-
- public void setMerchantId(Integer merchantId) {
- this.merchantId = merchantId;
- }
-
- public String getCode() {
- return code;
- }
-
- public void setCode(String code) {
- this.code = code == null ? null : code.trim();
- }
-
- public BigDecimal getAmount() {
- return amount;
- }
-
- public void setAmount(BigDecimal amount) {
- this.amount = amount;
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status == null ? null : status.trim();
- }
-
- public String getOrderNo() {
- return orderNo;
- }
-
- public void setOrderNo(String orderNo) {
- this.orderNo = orderNo == null ? null : orderNo.trim();
- }
-
- public String getTradeNo() {
- return tradeNo;
- }
-
- public void setTradeNo(String tradeNo) {
- this.tradeNo = tradeNo == null ? null : tradeNo.trim();
- }
-
- public Date getCreateTime() {
- return createTime;
- }
-
- public void setCreateTime(Date createTime) {
- this.createTime = createTime;
- }
-
- public Date getUpdateTime() {
- return updateTime;
- }
-
- public void setUpdateTime(Date updateTime) {
- this.updateTime = updateTime;
- }
-
- public Integer getShopId() {
- return shopId;
- }
-
- public void setShopId(Integer shopId) {
- this.shopId = shopId;
- }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMemberPoints.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMemberPoints.java
new file mode 100644
index 0000000..3e3429e
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMemberPoints.java
@@ -0,0 +1,67 @@
+package com.chaozhanggui.system.cashierservice.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 会员积分
+ *
+ * @author Tankaikai tankaikai@aliyun.com
+ * @since 2.0 2024-10-25
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("tb_shop_user")
+public class TbMemberPoints {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * id
+ */
+ @TableId(type = IdType.AUTO)
+ private Long id;
+ /**
+ * 店铺id
+ */
+ private Long shopId;
+ /**
+ * 会员id
+ */
+ @TableField(value = "id", insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
+ private Long memberId;
+ /**
+ * 会员名称
+ */
+ @TableField("name")
+ private String memberName;
+ /**
+ * 会员头像
+ */
+ @TableField("head_img")
+ private String avatarUrl;
+ /**
+ * 手机号码
+ */
+ @TableField("telephone")
+ private String mobile;
+ /**
+ * 账户积分
+ */
+ @TableField("account_points")
+ private Integer accountPoints;
+ /**
+ * 最近一次积分变动时间
+ */
+ @TableField("last_points_change_time")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date lastPointsChangeTime;
+ /**
+ * 最近一次浮动积分
+ */
+ @TableField("last_float_points")
+ private Integer lastFloatPoints;
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMemberPointsLog.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMemberPointsLog.java
new file mode 100644
index 0000000..1d5a609
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMemberPointsLog.java
@@ -0,0 +1,70 @@
+package com.chaozhanggui.system.cashierservice.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 会员积分变动记录
+ *
+ * @author Tankaikai tankaikai@aliyun.com
+ * @since 2.0 2024-10-25
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("tb_member_points_log")
+public class TbMemberPointsLog {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * id
+ */
+ @TableId(type = IdType.AUTO)
+ private Long id;
+ /**
+ * 店铺id
+ */
+ private Long shopId;
+ /**
+ * 会员id
+ */
+ private Long memberId;
+ /**
+ * 会员名称
+ */
+ private String memberName;
+ /**
+ * 会员头像
+ */
+ private String avatarUrl;
+ /**
+ * 摘要信息(如:兑换某个商品/消费多少钱/充值多少钱/新会员赠送积分等)
+ */
+ private String content;
+ /**
+ * 订单编号
+ */
+ private String orderNo;
+ /**
+ * 手机号码
+ */
+ private String mobile;
+ /**
+ * 浮动类型 add-累加 subtract-扣减
+ */
+ private String floatType;
+ /**
+ * 浮动积分(非0正负数)
+ */
+ private Integer floatPoints;
+ /**
+ * 创建时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date createTime;
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMerchantCoupon.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMerchantCoupon.java
deleted file mode 100644
index 4f5bee0..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMerchantCoupon.java
+++ /dev/null
@@ -1,420 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import java.util.Date;
-import java.io.Serializable;
-
-/**
- * 优惠券(TbMerchantCoupon)实体类
- *
- * @author lyf
- * @since 2024-04-02 09:22:41
- */
-public class TbMerchantCoupon implements Serializable {
- private static final long serialVersionUID = 391103766508753856L;
- /**
- * 自增
- */
- private Integer id;
- /**
- * 状态0-关闭 1 正常
- */
- private Integer status;
- /**
- * 优惠券名称
- */
- private String title;
-
- private String templateId;
-
- private String shopId;
-
- private String shopSnap;
- /**
- * 开始时间
- */
- private Date fromTime;
- /**
- * 到期时间
- */
- private Date toTime;
- /**
- * 限领数量
- */
- private String limitNumber;
- private String useNumber;
- /**
- * 发放数量
- */
- private Integer number;
- /**
- * 剩余数量
- */
- private String leftNumber;
- /**
- * 优惠金额
- */
- private Double amount;
- /**
- * 订单满赠金额
- */
- private Double limitAmount;
- /**
- * 是否显示0-不显示 1显示
- */
- private Integer isShow;
- /**
- * 图标
- */
- private String pic;
- /**
- * 0-满减 1-折扣
- */
- private Integer type;
- /**
- * 折扣 ,一位小数
- */
- private Float ratio;
- /**
- * 最大折扣金额
- */
- private Double maxRatioAmount;
- /**
- * 优惠券途径,首充|分销
- */
- private String track;
- /**
- * 品类product 商品券 ---cateogry 品类券common -通 用券
- */
- private String classType;
- /**
- * 有效期类型:0-toTime有效 1-effectDays有效
- */
- private Integer effectType;
- /**
- * 领取之日有效天数
- */
- private Integer effectDays;
- /**
- * 关联商品Id
- */
- private String relationIds;
-
- private String relationList;
- /**
- * 发放人
- */
- private String editor;
- /**
- * 说明
- */
- private String note;
-
- private Long createdAt;
-
- private Long updatedAt;
- /**
- * 支持堂食
- */
- private Integer furnishMeal;
- /**
- * 支持配送
- */
- private Integer furnishExpress;
- /**
- * 支持自提
- */
- private Integer furnishDraw;
- /**
- * 支持虚拟
- */
- private Integer furnishVir;
-
- private Integer disableDistribute;
- /**
- * 商户Id
- */
- private String merchantId;
-
-
- public String getUseNumber() {
- return useNumber;
- }
-
- public void setUseNumber(String useNumber) {
- this.useNumber = useNumber;
- }
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public Integer getStatus() {
- return status;
- }
-
- public void setStatus(Integer status) {
- this.status = status;
- }
-
- public String getTitle() {
- return title;
- }
-
- public void setTitle(String title) {
- this.title = title;
- }
-
- public String getTemplateId() {
- return templateId;
- }
-
- public void setTemplateId(String templateId) {
- this.templateId = templateId;
- }
-
- public String getShopId() {
- return shopId;
- }
-
- public void setShopId(String shopId) {
- this.shopId = shopId;
- }
-
- public String getShopSnap() {
- return shopSnap;
- }
-
- public void setShopSnap(String shopSnap) {
- this.shopSnap = shopSnap;
- }
-
- public Date getFromTime() {
- return fromTime;
- }
-
- public void setFromTime(Date fromTime) {
- this.fromTime = fromTime;
- }
-
- public Date getToTime() {
- return toTime;
- }
-
- public void setToTime(Date toTime) {
- this.toTime = toTime;
- }
-
- public String getLimitNumber() {
- return limitNumber;
- }
-
- public void setLimitNumber(String limitNumber) {
- this.limitNumber = limitNumber;
- }
-
- public Integer getNumber() {
- return number;
- }
-
- public void setNumber(Integer number) {
- this.number = number;
- }
-
- public String getLeftNumber() {
- return leftNumber;
- }
-
- public void setLeftNumber(String leftNumber) {
- this.leftNumber = leftNumber;
- }
-
- public Double getAmount() {
- return amount;
- }
-
- public void setAmount(Double amount) {
- this.amount = amount;
- }
-
- public Double getLimitAmount() {
- return limitAmount;
- }
-
- public void setLimitAmount(Double limitAmount) {
- this.limitAmount = limitAmount;
- }
-
- public Integer getIsShow() {
- return isShow;
- }
-
- public void setIsShow(Integer isShow) {
- this.isShow = isShow;
- }
-
- public String getPic() {
- return pic;
- }
-
- public void setPic(String pic) {
- this.pic = pic;
- }
-
- public Integer getType() {
- return type;
- }
-
- public void setType(Integer type) {
- this.type = type;
- }
-
- public Float getRatio() {
- return ratio;
- }
-
- public void setRatio(Float ratio) {
- this.ratio = ratio;
- }
-
- public Double getMaxRatioAmount() {
- return maxRatioAmount;
- }
-
- public void setMaxRatioAmount(Double maxRatioAmount) {
- this.maxRatioAmount = maxRatioAmount;
- }
-
- public String getTrack() {
- return track;
- }
-
- public void setTrack(String track) {
- this.track = track;
- }
-
- public String getClassType() {
- return classType;
- }
-
- public void setClassType(String classType) {
- this.classType = classType;
- }
-
- public Integer getEffectType() {
- return effectType;
- }
-
- public void setEffectType(Integer effectType) {
- this.effectType = effectType;
- }
-
- public Integer getEffectDays() {
- return effectDays;
- }
-
- public void setEffectDays(Integer effectDays) {
- this.effectDays = effectDays;
- }
-
- public String getRelationIds() {
- return relationIds;
- }
-
- public void setRelationIds(String relationIds) {
- this.relationIds = relationIds;
- }
-
- public String getRelationList() {
- return relationList;
- }
-
- public void setRelationList(String relationList) {
- this.relationList = relationList;
- }
-
- public String getEditor() {
- return editor;
- }
-
- public void setEditor(String editor) {
- this.editor = editor;
- }
-
- public String getNote() {
- return note;
- }
-
- public void setNote(String note) {
- this.note = note;
- }
-
- public Long getCreatedAt() {
- return createdAt;
- }
-
- public void setCreatedAt(Long createdAt) {
- this.createdAt = createdAt;
- }
-
- public Long getUpdatedAt() {
- return updatedAt;
- }
-
- public void setUpdatedAt(Long updatedAt) {
- this.updatedAt = updatedAt;
- }
-
- public Integer getFurnishMeal() {
- return furnishMeal;
- }
-
- public void setFurnishMeal(Integer furnishMeal) {
- this.furnishMeal = furnishMeal;
- }
-
- public Integer getFurnishExpress() {
- return furnishExpress;
- }
-
- public void setFurnishExpress(Integer furnishExpress) {
- this.furnishExpress = furnishExpress;
- }
-
- public Integer getFurnishDraw() {
- return furnishDraw;
- }
-
- public void setFurnishDraw(Integer furnishDraw) {
- this.furnishDraw = furnishDraw;
- }
-
- public Integer getFurnishVir() {
- return furnishVir;
- }
-
- public void setFurnishVir(Integer furnishVir) {
- this.furnishVir = furnishVir;
- }
-
- public Integer getDisableDistribute() {
- return disableDistribute;
- }
-
- public void setDisableDistribute(Integer disableDistribute) {
- this.disableDistribute = disableDistribute;
- }
-
- public String getMerchantId() {
- return merchantId;
- }
-
- public void setMerchantId(String merchantId) {
- this.merchantId = merchantId;
- }
-
-}
-
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMerchantThirdApply.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMerchantThirdApply.java
index 8e9901e..4e1fd88 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMerchantThirdApply.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbMerchantThirdApply.java
@@ -23,6 +23,8 @@ public class TbMerchantThirdApply implements Serializable {
private String smallAppid;
+ private String alipaySmallAppid;
+
private String storeId;
@@ -117,4 +119,12 @@ public class TbMerchantThirdApply implements Serializable {
public void setStoreId(String storeId) {
this.storeId = storeId;
}
+
+ public String getAlipaySmallAppid() {
+ return alipaySmallAppid;
+ }
+
+ public void setAlipaySmallAppid(String alipaySmallAppid) {
+ this.alipaySmallAppid = alipaySmallAppid;
+ }
}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderDetail.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderDetail.java
index 3d97089..d91d8db 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderDetail.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderDetail.java
@@ -1,5 +1,6 @@
package com.chaozhanggui.system.cashierservice.entity;
+import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import java.io.Serializable;
@@ -20,6 +21,8 @@ public class TbOrderDetail implements Serializable {
private Integer num;
+ private Byte isVip;
+
private String productName;
private String status;
@@ -35,6 +38,13 @@ public class TbOrderDetail implements Serializable {
private BigDecimal priceAmount;
private BigDecimal packAmount;
+ @TableField(exist = false)
+ private String remark;
+
+ private Integer cartId;
+ private Integer placeNum;
+ private String useType;
+ private String note;
private static final long serialVersionUID = 1L;
-}
\ No newline at end of file
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderInfo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderInfo.java
index 60a3dcf..f87e7f4 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderInfo.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbOrderInfo.java
@@ -1,5 +1,9 @@
package com.chaozhanggui.system.cashierservice.entity;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.chaozhanggui.system.cashierservice.constant.TableConstant;
import lombok.Data;
import java.io.Serializable;
@@ -8,6 +12,7 @@ import java.util.List;
@Data
public class TbOrderInfo implements Serializable {
+ @TableId(type = IdType.AUTO)
private Integer id;
//订单号
@@ -58,11 +63,15 @@ public class TbOrderInfo implements Serializable {
private Byte isVip;
private String memberId;
+ @TableField(exist = false)
private String userName;
+ @TableField(exist = false)
private String memberName;
+ @TableField(exist = false)
private String zdNo;
private String userId;
+ @TableField(exist = false)
private String imgUrl;
private Integer productScore;
@@ -97,16 +106,37 @@ public class TbOrderInfo implements Serializable {
private String masterId;
private String isBuyCoupon;
private String isUseCoupon;
+ @TableField(exist = false)
private Integer totalNumber;
+ @TableField(exist = false)
private List detailList;
+ @TableField(exist = false)
private String winnnerNo;
+ @TableField(exist = false)
private String isWinner;
+ @TableField(exist = false)
+ private String shopName;
+
+ private String useType;
+
+ // 下单次数
+ private Integer placeNum;
+
+ private Integer seatCount;
+ private BigDecimal seatAmount;
+ private BigDecimal pointsDiscountAmount;
+ private Integer pointsNum;
+ // 用户优惠券id
+ private String activateInInfoList;
+ private BigDecimal activateInDiscountAmount;
//根据状态返回 需付款 已付款 未付款 已退
+ @TableField(exist = false)
private String description;
- public void setDescription() {
+ public void setDescription(String shopName) {
+ this.shopName = shopName;
switch (status) {
case "closed":
this.description = "已付款";
@@ -186,4 +216,8 @@ public class TbOrderInfo implements Serializable {
this.createdAt = System.currentTimeMillis();
this.isAccepted = 1;
}
-}
\ No newline at end of file
+
+ public String getEatModel() {
+ return TableConstant.OrderInfo.UseType.TAKEOUT.equalsVals(this.getUseType()) ? TableConstant.ShopInfo.EatModel.TAKEOUT.getValue() : TableConstant.ShopInfo.EatModel.DINE_IN.getValue();
+ }
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbParams.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbParams.java
deleted file mode 100644
index 5aa9414..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbParams.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-
-@Data
-public class TbParams implements Serializable {
- private Integer id;
-
- private BigDecimal integralRatio;
- private BigDecimal twoRatio;
-
- private BigDecimal tradeRatio;
-
- private static final long serialVersionUID = 1L;
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPlussDeviceGoods.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPlussDeviceGoods.java
deleted file mode 100644
index d3132cc..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPlussDeviceGoods.java
+++ /dev/null
@@ -1,128 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import java.io.Serializable;
-import java.util.Date;
-
-public class TbPlussDeviceGoods implements Serializable {
- private Integer id;
-
- private String code;
-
- private String name;
-
- private String devicelogo;
-
- private String introdesc;
-
- private Integer sort;
-
- private Integer status;
-
- private Integer tagid;
-
- private String depositflag;
-
- private Date createtime;
-
- private Date updatetime;
-
- private String detail;
-
- private static final long serialVersionUID = 1L;
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public String getCode() {
- return code;
- }
-
- public void setCode(String code) {
- this.code = code == null ? null : code.trim();
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name == null ? null : name.trim();
- }
-
- public String getDevicelogo() {
- return devicelogo;
- }
-
- public void setDevicelogo(String devicelogo) {
- this.devicelogo = devicelogo == null ? null : devicelogo.trim();
- }
-
- public String getIntrodesc() {
- return introdesc;
- }
-
- public void setIntrodesc(String introdesc) {
- this.introdesc = introdesc == null ? null : introdesc.trim();
- }
-
- public Integer getSort() {
- return sort;
- }
-
- public void setSort(Integer sort) {
- this.sort = sort;
- }
-
- public Integer getStatus() {
- return status;
- }
-
- public void setStatus(Integer status) {
- this.status = status;
- }
-
- public Integer getTagid() {
- return tagid;
- }
-
- public void setTagid(Integer tagid) {
- this.tagid = tagid;
- }
-
- public String getDepositflag() {
- return depositflag;
- }
-
- public void setDepositflag(String depositflag) {
- this.depositflag = depositflag == null ? null : depositflag.trim();
- }
-
- public Date getCreatetime() {
- return createtime;
- }
-
- public void setCreatetime(Date createtime) {
- this.createtime = createtime;
- }
-
- public Date getUpdatetime() {
- return updatetime;
- }
-
- public void setUpdatetime(Date updatetime) {
- this.updatetime = updatetime;
- }
-
- public String getDetail() {
- return detail;
- }
-
- public void setDetail(String detail) {
- this.detail = detail == null ? null : detail.trim();
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPointsBasicSetting.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPointsBasicSetting.java
new file mode 100644
index 0000000..0c10760
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPointsBasicSetting.java
@@ -0,0 +1,71 @@
+package com.chaozhanggui.system.cashierservice.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 积分基本设置
+ *
+ * @author Tankaikai tankaikai@aliyun.com
+ * @since 2.0 2024-10-25
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("tb_points_basic_setting")
+public class TbPointsBasicSetting {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * id
+ */
+ @TableId(type = IdType.AUTO)
+ private Long id;
+ /**
+ * 店铺id
+ */
+ private Long shopId;
+ /**
+ * 开启消费赠送积分 1-开启 0-关闭
+ */
+ private Integer enableRewards;
+ /**
+ * 每消费xx元赠送1积分
+ */
+ private BigDecimal consumeAmount;
+ /**
+ * 开启下单积分抵扣 1-开启 0-关闭
+ */
+ private Integer enableDeduction;
+ /**
+ * 下单积分抵扣门槛
+ */
+ private Integer minDeductionPoint;
+ /**
+ * 下单最高抵扣比例
+ */
+ private BigDecimal maxDeductionRatio;
+ /**
+ * 下单抵扣积分比例 1元=?积分
+ */
+ private Integer equivalentPoints;
+ /**
+ * 开启积分商城 1-开启 0-关闭
+ */
+ private Integer enablePointsMall;
+ /**
+ * 浏览模式 list-列表 grid-宫格
+ */
+ private String browseMode;
+ /**
+ * 创建时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date createTime;
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPointsExchangeRecord.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPointsExchangeRecord.java
new file mode 100644
index 0000000..5013fc3
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPointsExchangeRecord.java
@@ -0,0 +1,100 @@
+package com.chaozhanggui.system.cashierservice.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 积分兑换记录
+ *
+ * @author Tankaikai tankaikai@aliyun.com
+ * @since 2.0 2024-10-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("tb_points_exchange_record")
+public class TbPointsExchangeRecord {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * id
+ */
+ @TableId(type = IdType.AUTO)
+ private Long id;
+ /**
+ * 订单编号
+ */
+ private String orderNo;
+ /**
+ * 店铺id
+ */
+ private Long shopId;
+ /**
+ * 积分商品id
+ */
+ private Long pointsGoodsId;
+ /**
+ * 积分商品名称
+ */
+ private String pointsGoodsName;
+ /**
+ * 商品图片URL
+ */
+ private String goodsImageUrl;
+ /**
+ * 领取方式 self-自取 post-邮寄
+ */
+ private String pickupMethod;
+ /**
+ * 会员id
+ */
+ private Long memberId;
+ /**
+ * 会员名称
+ */
+ private String memberName;
+ /**
+ * 手机号码
+ */
+ private String mobile;
+ /**
+ * 会员头像
+ */
+ private String avatarUrl;
+ /**
+ * 消耗积分
+ */
+ private Integer spendPoints;
+ /**
+ * 额外支付
+ */
+ private BigDecimal extraPaymentAmount;
+ /**
+ * 兑换券券码
+ */
+ private String couponCode;
+ /**
+ * 状态 waiting-待自取 done-已完成
+ */
+ private String status;
+ /**
+ * 创建时间(下单时间)
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date createTime;
+ /**
+ * 更新时间(核销时间)
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date updateTime;
+
+ @TableField(value = "count(*)", select = false, insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
+ private Long count;
+
+ @TableField(value = "sum(extra_payment_amount)", select = false, insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
+ private BigDecimal totalAmount;
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPointsGoodsSetting.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPointsGoodsSetting.java
new file mode 100644
index 0000000..3cf3932
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPointsGoodsSetting.java
@@ -0,0 +1,89 @@
+package com.chaozhanggui.system.cashierservice.entity;
+
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 积分商品设置
+ *
+ * @author Tankaikai tankaikai@aliyun.com
+ * @since 2.0 2024-10-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("tb_points_goods_setting")
+public class TbPointsGoodsSetting {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * id
+ */
+ @TableId(type = IdType.AUTO)
+ private Long id;
+ /**
+ * 店铺id
+ */
+ private Long shopId;
+ /**
+ * 商品类型 physical-实物 coupon-优惠劵
+ */
+ private String goodsCategory;
+ /**
+ * 商品名称
+ */
+ private String goodsName;
+ /**
+ * 商品图片URL
+ */
+ @TableField(value = "goods_image_url", updateStrategy = FieldStrategy.IGNORED)
+ private String goodsImageUrl;
+ /**
+ * 所需积分
+ */
+ private Integer requiredPoints;
+ /**
+ * 额外价格
+ */
+ private BigDecimal extraPrice;
+ /**
+ * 排序(权重),数字越高,显示约靠前
+ */
+ private Integer sort;
+ /**
+ * 数量
+ */
+ private Integer quantity;
+ /**
+ * 商品详情
+ */
+ @TableField(value = "goods_description", updateStrategy = FieldStrategy.IGNORED)
+ private String goodsDescription;
+ /**
+ * 累计兑换数量
+ */
+ private Integer totalExchangeCount;
+ /**
+ * 是否上架 1-是 0-否
+ */
+ private Integer status;
+ /**
+ * 创建时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date createTime;
+ /**
+ * 更新时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date updateTime;
+ /**
+ * 逻辑删除标志 1-是 0-否
+ */
+ private Integer delFlag;
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPrintMachine.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPrintMachine.java
index 3bdee44..2518cdf 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPrintMachine.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbPrintMachine.java
@@ -35,6 +35,14 @@ public class TbPrintMachine implements Serializable {
private String productId;
+ private String receiptSize;
+ private String classifyPrint;
+ private String tablePrint;
+ private String printQty;
+ private String printMethod;
+ private String printType;
+ private String printReceipt;
+
private static final long serialVersionUID = 1L;
public Integer getId() {
@@ -164,4 +172,60 @@ public class TbPrintMachine implements Serializable {
public void setProductId(String productId) {
this.productId = productId == null ? null : productId.trim();
}
+
+ public String getReceiptSize() {
+ return receiptSize;
+ }
+
+ public void setReceiptSize(String receiptSize) {
+ this.receiptSize = receiptSize;
+ }
+
+ public String getClassifyPrint() {
+ return classifyPrint;
+ }
+
+ public void setClassifyPrint(String classifyPrint) {
+ this.classifyPrint = classifyPrint;
+ }
+
+ public String getTablePrint() {
+ return tablePrint;
+ }
+
+ public void setTablePrint(String tablePrint) {
+ this.tablePrint = tablePrint;
+ }
+
+ public String getPrintQty() {
+ return printQty;
+ }
+
+ public void setPrintQty(String printQty) {
+ this.printQty = printQty;
+ }
+
+ public String getPrintMethod() {
+ return printMethod;
+ }
+
+ public void setPrintMethod(String printMethod) {
+ this.printMethod = printMethod;
+ }
+
+ public String getPrintType() {
+ return printType;
+ }
+
+ public void setPrintType(String printType) {
+ this.printType = printType;
+ }
+
+ public String getPrintReceipt() {
+ return printReceipt;
+ }
+
+ public void setPrintReceipt(String printReceipt) {
+ this.printReceipt = printReceipt;
+ }
}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProduct.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProduct.java
index ba7404d..e455026 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProduct.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProduct.java
@@ -66,11 +66,6 @@ public class TbProduct implements Serializable {
private String typeEnum;
- /**
- * 是否共享库存
- */
- private Byte isDistribute;
-
private Byte isDel;
private Byte isStock;
@@ -140,6 +135,9 @@ public class TbProduct implements Serializable {
//是否可售 1 可售 0非可售
private Integer isSale = 1;
+ private Integer warnLine = 0;
+
+
public String getImages() {
return images;
@@ -403,13 +401,6 @@ public class TbProduct implements Serializable {
this.typeEnum = typeEnum == null ? null : typeEnum.trim();
}
- public Byte getIsDistribute() {
- return isDistribute;
- }
-
- public void setIsDistribute(Byte isDistribute) {
- this.isDistribute = isDistribute;
- }
public Byte getIsDel() {
return isDel;
@@ -683,4 +674,12 @@ public class TbProduct implements Serializable {
public void setIsSale(Integer isSale) {
this.isSale = isSale;
}
+
+ public Integer getWarnLine() {
+ return warnLine;
+ }
+
+ public void setWarnLine(Integer warnLine) {
+ this.warnLine = warnLine;
+ }
}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductSku.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductSku.java
index 325eda4..5005cce 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductSku.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbProductSku.java
@@ -32,7 +32,6 @@ public class TbProductSku implements Serializable {
private String coverImg;
- private Integer warnLine;
private Double weight;
@@ -175,14 +174,6 @@ public class TbProductSku implements Serializable {
this.coverImg = coverImg == null ? null : coverImg.trim();
}
- public Integer getWarnLine() {
- return warnLine;
- }
-
- public void setWarnLine(Integer warnLine) {
- this.warnLine = warnLine;
- }
-
public Double getWeight() {
return weight;
}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbReceiptSales.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbReceiptSales.java
deleted file mode 100644
index 1a38a26..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbReceiptSales.java
+++ /dev/null
@@ -1,207 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import java.io.Serializable;
-
-public class TbReceiptSales implements Serializable {
- private Integer id;
-
- private String title;
-
- private String logo;
-
- private Boolean showContactInfo;
-
- private Boolean showMember;
-
- private Boolean showMemberCode;
-
- private Boolean showMemberScore;
-
- private Boolean showMemberWallet;
-
- private String footerRemark;
-
- private Boolean showCashCharge;
-
- private Boolean showSerialNo;
-
- private Boolean bigSerialNo;
-
- private String headerText;
-
- private String headerTextAlign;
-
- private String footerText;
-
- private String footerTextAlign;
-
- private String footerImage;
-
- private String prePrint;
-
- private Long createdAt;
-
- private Long updatedAt;
-
- private static final long serialVersionUID = 1L;
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public String getTitle() {
- return title;
- }
-
- public void setTitle(String title) {
- this.title = title == null ? null : title.trim();
- }
-
- public String getLogo() {
- return logo;
- }
-
- public void setLogo(String logo) {
- this.logo = logo == null ? null : logo.trim();
- }
-
- public Boolean getShowContactInfo() {
- return showContactInfo;
- }
-
- public void setShowContactInfo(Boolean showContactInfo) {
- this.showContactInfo = showContactInfo;
- }
-
- public Boolean getShowMember() {
- return showMember;
- }
-
- public void setShowMember(Boolean showMember) {
- this.showMember = showMember;
- }
-
- public Boolean getShowMemberCode() {
- return showMemberCode;
- }
-
- public void setShowMemberCode(Boolean showMemberCode) {
- this.showMemberCode = showMemberCode;
- }
-
- public Boolean getShowMemberScore() {
- return showMemberScore;
- }
-
- public void setShowMemberScore(Boolean showMemberScore) {
- this.showMemberScore = showMemberScore;
- }
-
- public Boolean getShowMemberWallet() {
- return showMemberWallet;
- }
-
- public void setShowMemberWallet(Boolean showMemberWallet) {
- this.showMemberWallet = showMemberWallet;
- }
-
- public String getFooterRemark() {
- return footerRemark;
- }
-
- public void setFooterRemark(String footerRemark) {
- this.footerRemark = footerRemark == null ? null : footerRemark.trim();
- }
-
- public Boolean getShowCashCharge() {
- return showCashCharge;
- }
-
- public void setShowCashCharge(Boolean showCashCharge) {
- this.showCashCharge = showCashCharge;
- }
-
- public Boolean getShowSerialNo() {
- return showSerialNo;
- }
-
- public void setShowSerialNo(Boolean showSerialNo) {
- this.showSerialNo = showSerialNo;
- }
-
- public Boolean getBigSerialNo() {
- return bigSerialNo;
- }
-
- public void setBigSerialNo(Boolean bigSerialNo) {
- this.bigSerialNo = bigSerialNo;
- }
-
- public String getHeaderText() {
- return headerText;
- }
-
- public void setHeaderText(String headerText) {
- this.headerText = headerText == null ? null : headerText.trim();
- }
-
- public String getHeaderTextAlign() {
- return headerTextAlign;
- }
-
- public void setHeaderTextAlign(String headerTextAlign) {
- this.headerTextAlign = headerTextAlign == null ? null : headerTextAlign.trim();
- }
-
- public String getFooterText() {
- return footerText;
- }
-
- public void setFooterText(String footerText) {
- this.footerText = footerText == null ? null : footerText.trim();
- }
-
- public String getFooterTextAlign() {
- return footerTextAlign;
- }
-
- public void setFooterTextAlign(String footerTextAlign) {
- this.footerTextAlign = footerTextAlign == null ? null : footerTextAlign.trim();
- }
-
- public String getFooterImage() {
- return footerImage;
- }
-
- public void setFooterImage(String footerImage) {
- this.footerImage = footerImage == null ? null : footerImage.trim();
- }
-
- public String getPrePrint() {
- return prePrint;
- }
-
- public void setPrePrint(String prePrint) {
- this.prePrint = prePrint == null ? null : prePrint.trim();
- }
-
- public Long getCreatedAt() {
- return createdAt;
- }
-
- public void setCreatedAt(Long createdAt) {
- this.createdAt = createdAt;
- }
-
- public Long getUpdatedAt() {
- return updatedAt;
- }
-
- public void setUpdatedAt(Long updatedAt) {
- this.updatedAt = updatedAt;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbReleaseFlow.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbReleaseFlow.java
deleted file mode 100644
index 34414ed..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbReleaseFlow.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-@Data
-public class TbReleaseFlow implements Serializable {
- private Integer id;
-
- private String userId;
-
- private BigDecimal num;
-
- private String type;
- private String operationType;
-
- private String remark;
- private String nickName;
-
- private String fromSource;
-
- private Date createTime;
- private String createTr;
- private String openId;
-
- private static final long serialVersionUID = 1L;
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbRenewalsPayLog.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbRenewalsPayLog.java
deleted file mode 100644
index 9a4bcbd..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbRenewalsPayLog.java
+++ /dev/null
@@ -1,148 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-public class TbRenewalsPayLog implements Serializable {
- private Integer id;
-
- private String payType;
-
- private String shopId;
-
- private String orderId;
-
- private String openId;
-
- private String userId;
-
- private String transactionId;
-
- private BigDecimal amount;
-
- private Byte status;
-
- private String remark;
-
- private String attach;
-
- private Long expiredAt;
-
- private Long createdAt;
-
- private Long updatedAt;
-
- private static final long serialVersionUID = 1L;
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public String getPayType() {
- return payType;
- }
-
- public void setPayType(String payType) {
- this.payType = payType == null ? null : payType.trim();
- }
-
- public String getShopId() {
- return shopId;
- }
-
- public void setShopId(String shopId) {
- this.shopId = shopId == null ? null : shopId.trim();
- }
-
- public String getOrderId() {
- return orderId;
- }
-
- public void setOrderId(String orderId) {
- this.orderId = orderId == null ? null : orderId.trim();
- }
-
- public String getOpenId() {
- return openId;
- }
-
- public void setOpenId(String openId) {
- this.openId = openId == null ? null : openId.trim();
- }
-
- public String getUserId() {
- return userId;
- }
-
- public void setUserId(String userId) {
- this.userId = userId == null ? null : userId.trim();
- }
-
- public String getTransactionId() {
- return transactionId;
- }
-
- public void setTransactionId(String transactionId) {
- this.transactionId = transactionId == null ? null : transactionId.trim();
- }
-
- public BigDecimal getAmount() {
- return amount;
- }
-
- public void setAmount(BigDecimal amount) {
- this.amount = amount;
- }
-
- public Byte getStatus() {
- return status;
- }
-
- public void setStatus(Byte status) {
- this.status = status;
- }
-
- public String getRemark() {
- return remark;
- }
-
- public void setRemark(String remark) {
- this.remark = remark == null ? null : remark.trim();
- }
-
- public String getAttach() {
- return attach;
- }
-
- public void setAttach(String attach) {
- this.attach = attach == null ? null : attach.trim();
- }
-
- public Long getExpiredAt() {
- return expiredAt;
- }
-
- public void setExpiredAt(Long expiredAt) {
- this.expiredAt = expiredAt;
- }
-
- public Long getCreatedAt() {
- return createdAt;
- }
-
- public void setCreatedAt(Long createdAt) {
- this.createdAt = createdAt;
- }
-
- public Long getUpdatedAt() {
- return updatedAt;
- }
-
- public void setUpdatedAt(Long updatedAt) {
- this.updatedAt = updatedAt;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCashSpread.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCashSpread.java
deleted file mode 100644
index 1a6d486..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCashSpread.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import java.io.Serializable;
-
-public class TbShopCashSpread implements Serializable {
- private Integer id;
-
- private Long createdAt;
-
- private Long updatedAt;
-
- private static final long serialVersionUID = 1L;
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public Long getCreatedAt() {
- return createdAt;
- }
-
- public void setCreatedAt(Long createdAt) {
- this.createdAt = createdAt;
- }
-
- public Long getUpdatedAt() {
- return updatedAt;
- }
-
- public void setUpdatedAt(Long updatedAt) {
- this.updatedAt = updatedAt;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCashSpreadWithBLOBs.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCashSpreadWithBLOBs.java
deleted file mode 100644
index ac6cc8a..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCashSpreadWithBLOBs.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import java.io.Serializable;
-
-public class TbShopCashSpreadWithBLOBs extends TbShopCashSpread implements Serializable {
- private String saleReceipt;
-
- private String triplicateReceipt;
-
- private String screenConfig;
-
- private String tagConfig;
-
- private String scaleConfig;
-
- private static final long serialVersionUID = 1L;
-
- public String getSaleReceipt() {
- return saleReceipt;
- }
-
- public void setSaleReceipt(String saleReceipt) {
- this.saleReceipt = saleReceipt == null ? null : saleReceipt.trim();
- }
-
- public String getTriplicateReceipt() {
- return triplicateReceipt;
- }
-
- public void setTriplicateReceipt(String triplicateReceipt) {
- this.triplicateReceipt = triplicateReceipt == null ? null : triplicateReceipt.trim();
- }
-
- public String getScreenConfig() {
- return screenConfig;
- }
-
- public void setScreenConfig(String screenConfig) {
- this.screenConfig = screenConfig == null ? null : screenConfig.trim();
- }
-
- public String getTagConfig() {
- return tagConfig;
- }
-
- public void setTagConfig(String tagConfig) {
- this.tagConfig = tagConfig == null ? null : tagConfig.trim();
- }
-
- public String getScaleConfig() {
- return scaleConfig;
- }
-
- public void setScaleConfig(String scaleConfig) {
- this.scaleConfig = scaleConfig == null ? null : scaleConfig.trim();
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCoupon.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCoupon.java
new file mode 100644
index 0000000..fc54428
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCoupon.java
@@ -0,0 +1,288 @@
+package com.chaozhanggui.system.cashierservice.entity;
+
+import java.time.LocalTime;
+import java.util.Date;
+import java.io.Serializable;
+
+/**
+ * 优惠券(TbShopCoupon)实体类
+ *
+ * @author ww
+ * @since 2024-10-24 10:40:00
+ */
+public class TbShopCoupon implements Serializable {
+ private static final long serialVersionUID = 382961088281627909L;
+ /**
+ * 自增
+ */
+ private Integer id;
+
+ private String shopId;
+ /**
+ * 名称(无意义)
+ */
+ private String title;
+ /**
+ * 1-满减 2-商品
+ */
+ private Integer type;
+ /**
+ * 满多少金额
+ */
+ private Integer fullAmount;
+ /**
+ * 减多少金额
+ */
+ private Integer discountAmount;
+ /**
+ * 描述
+ */
+ private String description;
+ /**
+ * 发放数量
+ */
+ private Integer number;
+ /**
+ * 剩余数量
+ */
+ private Integer leftNumber;
+ /**
+ * 有效期类型,可选值为 fixed(固定时间)/custom(自定义时间)
+ */
+ private String validityType;
+ /**
+ * 有效天数
+ */
+ private Integer validDays;
+ /**
+ * 隔多少天生效
+ */
+ private Integer daysToTakeEffect;
+ /**
+ * 有效开始时间
+ */
+ private Date validStartTime;
+ /**
+ * 有效结束时间
+ */
+ private Date validEndTime;
+ /**
+ * 周 数组["周一","周二"]
+ */
+ private String userDays;
+ /**
+ * all-全时段 custom-指定时段
+ */
+ private String useTimeType;
+ /**
+ * 可用开始时间
+ */
+ private LocalTime useStartTime;
+ /**
+ * 可用结束时间
+ */
+ private LocalTime useEndTime;
+ /**
+ * 已使用数量
+ */
+ private Integer useNumber;
+ /**
+ * 发放人
+ */
+ private String editor;
+ /**
+ * 状态0-关闭 1 正常
+ */
+ private Integer status;
+
+ private Date createTime;
+
+ private Date updateTime;
+
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getShopId() {
+ return shopId;
+ }
+
+ public void setShopId(String shopId) {
+ this.shopId = shopId;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public Integer getType() {
+ return type;
+ }
+
+ public void setType(Integer type) {
+ this.type = type;
+ }
+
+ public Integer getFullAmount() {
+ return fullAmount;
+ }
+
+ public void setFullAmount(Integer fullAmount) {
+ this.fullAmount = fullAmount;
+ }
+
+ public Integer getDiscountAmount() {
+ return discountAmount;
+ }
+
+ public void setDiscountAmount(Integer discountAmount) {
+ this.discountAmount = discountAmount;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Integer getNumber() {
+ return number;
+ }
+
+ public void setNumber(Integer number) {
+ this.number = number;
+ }
+
+ public Integer getLeftNumber() {
+ return leftNumber;
+ }
+
+ public void setLeftNumber(Integer leftNumber) {
+ this.leftNumber = leftNumber;
+ }
+
+ public String getValidityType() {
+ return validityType;
+ }
+
+ public void setValidityType(String validityType) {
+ this.validityType = validityType;
+ }
+
+ public Integer getValidDays() {
+ return validDays;
+ }
+
+ public void setValidDays(Integer validDays) {
+ this.validDays = validDays;
+ }
+
+ public Integer getDaysToTakeEffect() {
+ return daysToTakeEffect;
+ }
+
+ public void setDaysToTakeEffect(Integer daysToTakeEffect) {
+ this.daysToTakeEffect = daysToTakeEffect;
+ }
+
+ public Date getValidStartTime() {
+ return validStartTime;
+ }
+
+ public void setValidStartTime(Date validStartTime) {
+ this.validStartTime = validStartTime;
+ }
+
+ public Date getValidEndTime() {
+ return validEndTime;
+ }
+
+ public void setValidEndTime(Date validEndTime) {
+ this.validEndTime = validEndTime;
+ }
+
+ public String getUserDays() {
+ return userDays;
+ }
+
+ public void setUserDays(String userDays) {
+ this.userDays = userDays;
+ }
+
+ public String getUseTimeType() {
+ return useTimeType;
+ }
+
+ public void setUseTimeType(String useTimeType) {
+ this.useTimeType = useTimeType;
+ }
+
+ public LocalTime getUseStartTime() {
+ return useStartTime;
+ }
+
+ public void setUseStartTime(LocalTime useStartTime) {
+ this.useStartTime = useStartTime;
+ }
+
+ public LocalTime getUseEndTime() {
+ return useEndTime;
+ }
+
+ public void setUseEndTime(LocalTime useEndTime) {
+ this.useEndTime = useEndTime;
+ }
+
+ public Integer getUseNumber() {
+ return useNumber;
+ }
+
+ public void setUseNumber(Integer useNumber) {
+ this.useNumber = useNumber;
+ }
+
+ public String getEditor() {
+ return editor;
+ }
+
+ public void setEditor(String editor) {
+ this.editor = editor;
+ }
+
+ public Integer getStatus() {
+ return status;
+ }
+
+ public void setStatus(Integer status) {
+ this.status = status;
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public Date getUpdateTime() {
+ return updateTime;
+ }
+
+ public void setUpdateTime(Date updateTime) {
+ this.updateTime = updateTime;
+ }
+
+}
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCurrency.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCurrency.java
deleted file mode 100644
index 4b71c95..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCurrency.java
+++ /dev/null
@@ -1,208 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-public class TbShopCurrency implements Serializable {
- private Integer id;
-
- private String shopId;
-
- private BigDecimal prepareAmount;
-
- private String currency;
-
- private Byte decimalsDigits;
-
- private String discountRound;
-
- private String merchantId;
-
- private Byte smallChange;
-
- private Byte enableCustomDiscount;
-
- private BigDecimal maxDiscount;
-
- private Double maxPercent;
-
- private String bizDuration;
-
- private Byte allowWebPay;
-
- private Byte isAutoToZero;
-
- private Byte isIncludeTaxPrice;
-
- private String taxNumber;
-
- private Long createdAt;
-
- private Long updatedAt;
-
- private Byte autoLockScreen;
-
- private Byte voiceNotification;
-
- private static final long serialVersionUID = 1L;
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public String getShopId() {
- return shopId;
- }
-
- public void setShopId(String shopId) {
- this.shopId = shopId == null ? null : shopId.trim();
- }
-
- public BigDecimal getPrepareAmount() {
- return prepareAmount;
- }
-
- public void setPrepareAmount(BigDecimal prepareAmount) {
- this.prepareAmount = prepareAmount;
- }
-
- public String getCurrency() {
- return currency;
- }
-
- public void setCurrency(String currency) {
- this.currency = currency == null ? null : currency.trim();
- }
-
- public Byte getDecimalsDigits() {
- return decimalsDigits;
- }
-
- public void setDecimalsDigits(Byte decimalsDigits) {
- this.decimalsDigits = decimalsDigits;
- }
-
- public String getDiscountRound() {
- return discountRound;
- }
-
- public void setDiscountRound(String discountRound) {
- this.discountRound = discountRound == null ? null : discountRound.trim();
- }
-
- public String getMerchantId() {
- return merchantId;
- }
-
- public void setMerchantId(String merchantId) {
- this.merchantId = merchantId == null ? null : merchantId.trim();
- }
-
- public Byte getSmallChange() {
- return smallChange;
- }
-
- public void setSmallChange(Byte smallChange) {
- this.smallChange = smallChange;
- }
-
- public Byte getEnableCustomDiscount() {
- return enableCustomDiscount;
- }
-
- public void setEnableCustomDiscount(Byte enableCustomDiscount) {
- this.enableCustomDiscount = enableCustomDiscount;
- }
-
- public BigDecimal getMaxDiscount() {
- return maxDiscount;
- }
-
- public void setMaxDiscount(BigDecimal maxDiscount) {
- this.maxDiscount = maxDiscount;
- }
-
- public Double getMaxPercent() {
- return maxPercent;
- }
-
- public void setMaxPercent(Double maxPercent) {
- this.maxPercent = maxPercent;
- }
-
- public String getBizDuration() {
- return bizDuration;
- }
-
- public void setBizDuration(String bizDuration) {
- this.bizDuration = bizDuration == null ? null : bizDuration.trim();
- }
-
- public Byte getAllowWebPay() {
- return allowWebPay;
- }
-
- public void setAllowWebPay(Byte allowWebPay) {
- this.allowWebPay = allowWebPay;
- }
-
- public Byte getIsAutoToZero() {
- return isAutoToZero;
- }
-
- public void setIsAutoToZero(Byte isAutoToZero) {
- this.isAutoToZero = isAutoToZero;
- }
-
- public Byte getIsIncludeTaxPrice() {
- return isIncludeTaxPrice;
- }
-
- public void setIsIncludeTaxPrice(Byte isIncludeTaxPrice) {
- this.isIncludeTaxPrice = isIncludeTaxPrice;
- }
-
- public String getTaxNumber() {
- return taxNumber;
- }
-
- public void setTaxNumber(String taxNumber) {
- this.taxNumber = taxNumber == null ? null : taxNumber.trim();
- }
-
- public Long getCreatedAt() {
- return createdAt;
- }
-
- public void setCreatedAt(Long createdAt) {
- this.createdAt = createdAt;
- }
-
- public Long getUpdatedAt() {
- return updatedAt;
- }
-
- public void setUpdatedAt(Long updatedAt) {
- this.updatedAt = updatedAt;
- }
-
- public Byte getAutoLockScreen() {
- return autoLockScreen;
- }
-
- public void setAutoLockScreen(Byte autoLockScreen) {
- this.autoLockScreen = autoLockScreen;
- }
-
- public Byte getVoiceNotification() {
- return voiceNotification;
- }
-
- public void setVoiceNotification(Byte voiceNotification) {
- this.voiceNotification = voiceNotification;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCurrencyWithBLOBs.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCurrencyWithBLOBs.java
deleted file mode 100644
index 5fc056b..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopCurrencyWithBLOBs.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import java.io.Serializable;
-
-public class TbShopCurrencyWithBLOBs extends TbShopCurrency implements Serializable {
- private String discountConfigs;
-
- private String serviceCharge;
-
- private static final long serialVersionUID = 1L;
-
- public String getDiscountConfigs() {
- return discountConfigs;
- }
-
- public void setDiscountConfigs(String discountConfigs) {
- this.discountConfigs = discountConfigs == null ? null : discountConfigs.trim();
- }
-
- public String getServiceCharge() {
- return serviceCharge;
- }
-
- public void setServiceCharge(String serviceCharge) {
- this.serviceCharge = serviceCharge == null ? null : serviceCharge.trim();
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopExtend.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopExtend.java
new file mode 100644
index 0000000..82867d6
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopExtend.java
@@ -0,0 +1,113 @@
+package com.chaozhanggui.system.cashierservice.entity;
+
+import java.util.Date;
+import java.io.Serializable;
+
+/**
+ * 店铺扩展信息(TbShopExtend)实体类
+ *
+ * @author ww
+ * @since 2024-08-21 09:40:26
+ */
+public class TbShopExtend implements Serializable {
+ private static final long serialVersionUID = -25782280496188600L;
+ /**
+ * 自增id
+ */
+ private Integer id;
+ /**
+ * 商户Id
+ */
+ private Integer shopId;
+ /**
+ * img:图片;text:文本;
+ */
+ private String type;
+ /**
+ * 描述
+ */
+ private String name;
+ /**
+ * 自定义key
+ */
+ private String autokey;
+ /**
+ * 值
+ */
+ private String value;
+ /**
+ * 更新时间
+ */
+ private Date updateTime;
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Integer getShopId() {
+ return shopId;
+ }
+
+ public void setShopId(Integer shopId) {
+ this.shopId = shopId;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getAutokey() {
+ return autokey;
+ }
+
+ public void setAutokey(String autokey) {
+ this.autokey = autokey;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public Date getUpdateTime() {
+ return updateTime;
+ }
+
+ public void setUpdateTime(Date updateTime) {
+ this.updateTime = updateTime;
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+}
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopInfo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopInfo.java
index 4e94053..a7665ac 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopInfo.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopInfo.java
@@ -5,114 +5,263 @@ import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
-
+/**
+ * (TbShopInfo)实体类
+ *
+ * @author ww
+ * @since 2024-10-23 15:03:55
+ */
@Data
public class TbShopInfo implements Serializable {
+ private static final long serialVersionUID = -75915575260078554L;
+
+ /**
+ * 自增id
+ */
private Integer id;
-
+ /**
+ * 店铺帐号
+ */
private String account;
-
+ /**
+ * 店铺代号,策略方式为city +店铺号(8位)
+ */
private String shopCode;
-
+ /**
+ * 店铺口号
+ */
private String subTitle;
-
+ /**
+ * 商户Id
+ */
private String merchantId;
-
+ /**
+ * 店铺名称
+ */
private String shopName;
-
+ /**
+ * 连锁店扩展店名
+ */
private String chainName;
-
+ /**
+ * 背景图
+ */
private String backImg;
-
+ /**
+ * 门头照
+ */
private String frontImg;
-
+ /**
+ * 联系人姓名
+ */
private String contactName;
-
+ /**
+ * 联系电话
+ */
private String phone;
-
+ /**
+ * 店铺log0
+ */
private String logo;
-
- private Byte isDeposit;
-
- private Byte isSupply;
-
+ /**
+ * 是否参与代收 0--不参与 1参与
+ */
+ private Integer isDeposit;
+ /**
+ * 是否为供应商
+ */
+ private Integer isSupply;
+ /**
+ * 封面图
+ */
private String coverImg;
-
+ /**
+ * 店铺分享图
+ */
private String shareImg;
-
+ /**
+ * 轮播图
+ */
+ private String view;
+ /**
+ * 店铺简介
+ */
private String detail;
-
+ /**
+ * 经纬度
+ */
private String lat;
-
+ /**
+ * 经纬度
+ */
private String lng;
-
+ /**
+ * 未用
+ */
private String mchId;
private String registerType;
-
- private Byte isWxMaIndependent;
-
+ /**
+ * 是否独立的微信小程序
+ */
+ private Integer isWxMaIndependent;
+ /**
+ * 详细地址
+ */
private String address;
-
+ /**
+ * 类似于这种规则51.51.570
+ */
private String city;
-
+ /**
+ * 店铺类型 超市--MARKET---其它店SHOP
+ */
private String type;
-
+ /**
+ * 行业
+ */
private String industry;
-
+ /**
+ * 行业名称
+ */
private String industryName;
-
+ /**
+ * 营业时间(周开始)
+ */
private String businessStartDay;
+ /**
+ * 营业时间(周结束)
+ */
private String businessEndDay;
+ /**
+ * 营业时间
+ */
private String businessTime;
-
+ /**
+ * 配送时间
+ */
private String postTime;
private BigDecimal postAmountLine;
-
- private Byte onSale;
-
- private Byte settleType;
-
+ /**
+ * 0停业1,正常营业,网上售卖
+ */
+ private Integer onSale;
+ /**
+ * 0今日,1次日
+ */
+ private Integer settleType;
+ /**
+ * 时间
+ */
private String settleTime;
-
+ /**
+ * 入驻时间
+ */
private Integer enterAt;
-
+ /**
+ * 到期时间
+ */
private Long expireAt;
-
- private Byte status;
-
- private Float average;
-
+ /**
+ * -1 平台禁用 0-过期,1正式营业,
+ */
+ private Integer status;
+ /**
+ * 人均消费
+ */
+ private BigDecimal average;
+ /**
+ * 订单等待时间
+ */
private Integer orderWaitPayMinute;
-
+ /**
+ * 支持登陆设备个数
+ */
private Integer supportDeviceNumber;
-
- private Byte distributeLevel;
+ /**
+ * 分销层级(1-下级分销 2-两下级分销)
+ */
+ private Integer distributeLevel;
private Long createdAt;
private Long updatedAt;
private String proxyId;
-
- private String view;
+ /**
+ * trial试用版,release正式
+ */
+ private String profiles;
/**
* 商家二维码
*/
private String shopQrcode;
- private String isOpenYhq;
- private Byte isUseVip;
/**
- * 商户标签
+ * 商家标签
*/
private String tag;
+
+ private String isOpenYhq;
+ /**
+ * 0否1是
+ */
+ private Integer isUseVip;
+ /**
+ * 省
+ */
private String provinces;
+ /**
+ * 市
+ */
private String cities;
+ /**
+ * 区/县
+ */
private String districts;
-
+ /**
+ * 是否允许会员自定义金额 1 允许 0 不允许
+ */
private String isCustom;
+ /**
+ * 是否开启退款密码 1 启用 0 禁用
+ */
+ private String isReturn;
+ /**
+ * 是否开启会员充值密码 1 启用 0 禁用
+ */
+ private String isMemberIn;
+ /**
+ * 是否开启会员退款密码 1 启用 0 禁用
+ */
+ private String isMemberReturn;
+ /**
+ * 是否免除桌位费 0否1是
+ */
+ private Integer isTableFee;
+ /**
+ * 是否启用会员价 0否1是
+ */
+ private Integer isMemberPrice;
+ /**
+ * 积分群体 all-所有 vip-仅针对会员
+ */
+ private String consumeColony;
+ /**
+ * 桌位费
+ */
+ private BigDecimal tableFee;
+ /**
+ * 就餐模式 堂食 dine-in 外带 take-out
+ */
+ private String eatModel;
+ /**
+ * 小程序码(零点八零首页)
+ */
+ private String smallQrcode;
+ /**
+ * 店铺收款码
+ */
+ private String paymentQrcode;
- private static final long serialVersionUID = 1L;
-
-}
\ No newline at end of file
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopTable.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopTable.java
index 9fd5e39..a4f2bcd 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopTable.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopTable.java
@@ -1,8 +1,13 @@
package com.chaozhanggui.system.cashierservice.entity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+
import java.io.Serializable;
import java.math.BigDecimal;
+import java.util.Date;
+@Data
public class TbShopTable implements Serializable {
private Integer id;
@@ -36,144 +41,26 @@ public class TbShopTable implements Serializable {
private String qrcode;
+ @TableField(exist = false)
private String areaname;
+ @TableField(exist = false)
+ private Integer orderId;
- public String getAreaname() {
- return areaname;
- }
+ @TableField(exist = false)
+ private boolean isChoseCount;
- public void setAreaname(String areaname) {
- this.areaname = areaname;
- }
+ @TableField(exist = false)
+ private Integer seatNum;
- public String getQrcode() {
- return qrcode;
- }
+ private Integer autoClear;
+ private Date useTime;
+ private Date endTime;
+ private Integer productNum;
+ private BigDecimal totalAmount;
+ private BigDecimal realAmount;
+ private Integer useNum;
- public void setQrcode(String qrcode) {
- this.qrcode = qrcode;
- }
- private static final long serialVersionUID = 1L;
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name == null ? null : name.trim();
- }
-
- public Integer getShopId() {
- return shopId;
- }
-
- public void setShopId(Integer shopId) {
- this.shopId = shopId;
- }
-
- public Integer getMaxCapacity() {
- return maxCapacity;
- }
-
- public void setMaxCapacity(Integer maxCapacity) {
- this.maxCapacity = maxCapacity;
- }
-
- public Integer getSort() {
- return sort;
- }
-
- public void setSort(Integer sort) {
- this.sort = sort;
- }
-
- public Integer getAreaId() {
- return areaId;
- }
-
- public void setAreaId(Integer areaId) {
- this.areaId = areaId;
- }
-
- public Byte getIsPredate() {
- return isPredate;
- }
-
- public void setIsPredate(Byte isPredate) {
- this.isPredate = isPredate;
- }
-
- public BigDecimal getPredateAmount() {
- return predateAmount;
- }
-
- public void setPredateAmount(BigDecimal predateAmount) {
- this.predateAmount = predateAmount;
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status == null ? null : status.trim();
- }
-
- public Byte getType() {
- return type;
- }
-
- public void setType(Byte type) {
- this.type = type;
- }
-
- public BigDecimal getAmount() {
- return amount;
- }
-
- public void setAmount(BigDecimal amount) {
- this.amount = amount;
- }
-
- public BigDecimal getPerhour() {
- return perhour;
- }
-
- public void setPerhour(BigDecimal perhour) {
- this.perhour = perhour;
- }
-
- public String getView() {
- return view;
- }
-
- public void setView(String view) {
- this.view = view == null ? null : view.trim();
- }
-
- public Long getCreatedAt() {
- return createdAt;
- }
-
- public void setCreatedAt(Long createdAt) {
- this.createdAt = createdAt;
- }
-
- public Long getUpdatedAt() {
- return updatedAt;
- }
-
- public void setUpdatedAt(Long updatedAt) {
- this.updatedAt = updatedAt;
- }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUser.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUser.java
index 0c9ad7d..0d47251 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUser.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUser.java
@@ -4,6 +4,7 @@ import org.springframework.data.annotation.Transient;
import java.io.Serializable;
import java.math.BigDecimal;
+import java.sql.Timestamp;
public class TbShopUser implements Serializable {
private String id;
@@ -70,10 +71,14 @@ public class TbShopUser implements Serializable {
private String lng="";
private String address="";
-
@Transient
private String isUser;
+ private Timestamp joinTime;
+
+
+
+
private static final long serialVersionUID = 1L;
public String getId() {
@@ -348,4 +353,13 @@ public class TbShopUser implements Serializable {
public void setAddress(String address) {
this.address = address;
}
+
+ public Timestamp getJoinTime() {
+ return joinTime;
+ }
+
+ public void setJoinTime(Timestamp joinTime) {
+ this.joinTime = joinTime;
+ }
}
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUserFlow.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUserFlow.java
index 730cd8f..fb8f548 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUserFlow.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUserFlow.java
@@ -21,6 +21,11 @@ public class TbShopUserFlow implements Serializable {
private String type;
+
+ private String isReturn;
+
+ private String remark;
+
private static final long serialVersionUID = 1L;
public Integer getId() {
@@ -86,4 +91,20 @@ public class TbShopUserFlow implements Serializable {
public void setType(String type) {
this.type = type == null ? null : type.trim();
}
+
+ public String getIsReturn() {
+ return isReturn;
+ }
+
+ public void setIsReturn(String isReturn) {
+ this.isReturn = isReturn;
+ }
+
+ public String getRemark() {
+ return remark;
+ }
+
+ public void setRemark(String remark) {
+ this.remark = remark;
+ }
}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbSplitAccounts.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbSplitAccounts.java
deleted file mode 100644
index 89408a0..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbSplitAccounts.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-@Data
-//分配金额
-public class TbSplitAccounts implements Serializable {
- private Integer id;
-
- private Integer merchantId;//商户ID
-
- private Integer shopId;//店铺ID
-
- private BigDecimal couponsPrice;//优惠券价值
-
- private BigDecimal conponsAmount;//优惠券面额
- private BigDecimal originAmount;//
-
- private String isSplit;
-
- private BigDecimal orderAmount;
-
- private Date createTime;
-
- private Date splitTime;
-
- private String tradeDay;
-
- private static final long serialVersionUID = 1L;
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbUserCoupons.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbUserCoupons.java
deleted file mode 100644
index 6f59527..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbUserCoupons.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-@Data
-public class TbUserCoupons implements Serializable {
- private Integer id;
-
- private String userId;
- private Integer orderId;
-
- private BigDecimal couponsPrice;
-
- private BigDecimal couponsAmount;
- private TbOrderInfo orderInfo;
-
- private String status;
- private String isDouble;
-
- private Date createTime;
-
- private Date updateTime;
-
- private Date endTime;
-
- private static final long serialVersionUID = 1L;
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbUserInfo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbUserInfo.java
index e449864..6bb7f5a 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbUserInfo.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbUserInfo.java
@@ -101,7 +101,11 @@ public class TbUserInfo implements Serializable {
private String pwd;
- private String custPhone="400-6666-389";
+ private String custPhone = "400-6666-389";
+ //优惠卷数量
+ private Integer couponAll = 0;
+ //储值数量
+ private BigDecimal balanceAll = BigDecimal.ZERO;
public String getAvatar() {
@@ -505,4 +509,20 @@ public class TbUserInfo implements Serializable {
public void setPwd(String pwd) {
this.pwd = pwd;
}
+
+ public Integer getCouponAll() {
+ return couponAll;
+ }
+
+ public void setCouponAll(Integer couponAll) {
+ this.couponAll = couponAll;
+ }
+
+ public BigDecimal getBalanceAll() {
+ return balanceAll;
+ }
+
+ public void setBalanceAll(BigDecimal balanceAll) {
+ this.balanceAll = balanceAll;
+ }
}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbWiningParams.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbWiningParams.java
deleted file mode 100644
index 6c513c1..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbWiningParams.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-@Data
-public class TbWiningParams implements Serializable {
- private Integer id;
-
- private BigDecimal minPrice;
-
- private BigDecimal maxPrice;
-
- private Integer winingNum;
-
- private Integer winingUserNum;
- private String status;
-
- private static final long serialVersionUID = 1L;
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbWiningUser.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbWiningUser.java
deleted file mode 100644
index 3855259..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbWiningUser.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-@Data
-public class TbWiningUser implements Serializable {
- private Integer id;
-
- private String userName;
-
- private String orderNo;
-
- private BigDecimal orderAmount;
-
- private String isUser;
-
- private Date createTime;
-
- private String isRefund;
-
- private BigDecimal refundAmount;
-
- private String refundNo;
-
- private String refundPayType;
-
- private String tradeDay;
-
- private Date refundTime;
-
-
- private static final long serialVersionUID = 1L;
- public TbWiningUser(){
- super();
- }
- public TbWiningUser(String userName,String orderNo,BigDecimal orderAmount,
- String isUser,String tradeDay){
- this.createTime = new Date();
- this.userName = userName;
- this.orderNo = orderNo;
- this.orderAmount = orderAmount;
- this.isUser = isUser;
- this.tradeDay = tradeDay;
- this.isRefund = "true";
- this.refundAmount = BigDecimal.ZERO;
- this.refundPayType = "WX";
-
-
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbYhqParams.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbYhqParams.java
deleted file mode 100644
index 41e19af..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbYhqParams.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-@Data
-public class TbYhqParams implements Serializable {
- private Integer id;
-
- private String name;
-
- private BigDecimal minPrice;
-
- private BigDecimal maxPrice;
-
- private String status;
- private static final long serialVersionUID = 1L;
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/ViewOrder.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/ViewOrder.java
deleted file mode 100644
index 1c33659..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/ViewOrder.java
+++ /dev/null
@@ -1,378 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-public class ViewOrder implements Serializable {
- private BigDecimal aliPaidAmount;
-
- private Integer id;
-
- private BigDecimal amount;
-
- private BigDecimal bankPaidAmount;
-
- private String billingId;
-
- private BigDecimal cashPaidAmount;
-
- private Long createdAt;
-
- private Integer deductScore;
-
- private BigDecimal depositPaidAmount;
-
- private BigDecimal discountAmount;
-
- private BigDecimal freightAmount;
-
- private Byte isMaster;
-
- private Byte isVip;
-
- private String masterId;
-
- private String memberId;
-
- private String orderNo;
-
- private String orderType;
-
- private BigDecimal otherPaidAmount;
-
- private Long paidTime;
-
- private BigDecimal payAmount;
-
- private Integer productScore;
-
- private String productType;
-
- private String refOrderId;
-
- private Byte refundAble;
-
- private BigDecimal refundAmount;
-
- private String sendType;
-
- private BigDecimal settlementAmount;
-
- private String shopId;
-
- private BigDecimal smallChange;
-
- private String status;
-
- private String tableId;
-
- private String tableParty;
-
- private String terminalSnap;
-
- private String userId;
-
- private BigDecimal virtualPaidAmount;
-
- private BigDecimal wxPaidAmount;
-
- private String cartList;
-
- private static final long serialVersionUID = 1L;
-
- public BigDecimal getAliPaidAmount() {
- return aliPaidAmount;
- }
-
- public void setAliPaidAmount(BigDecimal aliPaidAmount) {
- this.aliPaidAmount = aliPaidAmount;
- }
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public BigDecimal getAmount() {
- return amount;
- }
-
- public void setAmount(BigDecimal amount) {
- this.amount = amount;
- }
-
- public BigDecimal getBankPaidAmount() {
- return bankPaidAmount;
- }
-
- public void setBankPaidAmount(BigDecimal bankPaidAmount) {
- this.bankPaidAmount = bankPaidAmount;
- }
-
- public String getBillingId() {
- return billingId;
- }
-
- public void setBillingId(String billingId) {
- this.billingId = billingId == null ? null : billingId.trim();
- }
-
- public BigDecimal getCashPaidAmount() {
- return cashPaidAmount;
- }
-
- public void setCashPaidAmount(BigDecimal cashPaidAmount) {
- this.cashPaidAmount = cashPaidAmount;
- }
-
- public Long getCreatedAt() {
- return createdAt;
- }
-
- public void setCreatedAt(Long createdAt) {
- this.createdAt = createdAt;
- }
-
- public Integer getDeductScore() {
- return deductScore;
- }
-
- public void setDeductScore(Integer deductScore) {
- this.deductScore = deductScore;
- }
-
- public BigDecimal getDepositPaidAmount() {
- return depositPaidAmount;
- }
-
- public void setDepositPaidAmount(BigDecimal depositPaidAmount) {
- this.depositPaidAmount = depositPaidAmount;
- }
-
- public BigDecimal getDiscountAmount() {
- return discountAmount;
- }
-
- public void setDiscountAmount(BigDecimal discountAmount) {
- this.discountAmount = discountAmount;
- }
-
- public BigDecimal getFreightAmount() {
- return freightAmount;
- }
-
- public void setFreightAmount(BigDecimal freightAmount) {
- this.freightAmount = freightAmount;
- }
-
- public Byte getIsMaster() {
- return isMaster;
- }
-
- public void setIsMaster(Byte isMaster) {
- this.isMaster = isMaster;
- }
-
- public Byte getIsVip() {
- return isVip;
- }
-
- public void setIsVip(Byte isVip) {
- this.isVip = isVip;
- }
-
- public String getMasterId() {
- return masterId;
- }
-
- public void setMasterId(String masterId) {
- this.masterId = masterId == null ? null : masterId.trim();
- }
-
- public String getMemberId() {
- return memberId;
- }
-
- public void setMemberId(String memberId) {
- this.memberId = memberId == null ? null : memberId.trim();
- }
-
- public String getOrderNo() {
- return orderNo;
- }
-
- public void setOrderNo(String orderNo) {
- this.orderNo = orderNo == null ? null : orderNo.trim();
- }
-
- public String getOrderType() {
- return orderType;
- }
-
- public void setOrderType(String orderType) {
- this.orderType = orderType == null ? null : orderType.trim();
- }
-
- public BigDecimal getOtherPaidAmount() {
- return otherPaidAmount;
- }
-
- public void setOtherPaidAmount(BigDecimal otherPaidAmount) {
- this.otherPaidAmount = otherPaidAmount;
- }
-
- public Long getPaidTime() {
- return paidTime;
- }
-
- public void setPaidTime(Long paidTime) {
- this.paidTime = paidTime;
- }
-
- public BigDecimal getPayAmount() {
- return payAmount;
- }
-
- public void setPayAmount(BigDecimal payAmount) {
- this.payAmount = payAmount;
- }
-
- public Integer getProductScore() {
- return productScore;
- }
-
- public void setProductScore(Integer productScore) {
- this.productScore = productScore;
- }
-
- public String getProductType() {
- return productType;
- }
-
- public void setProductType(String productType) {
- this.productType = productType == null ? null : productType.trim();
- }
-
- public String getRefOrderId() {
- return refOrderId;
- }
-
- public void setRefOrderId(String refOrderId) {
- this.refOrderId = refOrderId == null ? null : refOrderId.trim();
- }
-
- public Byte getRefundAble() {
- return refundAble;
- }
-
- public void setRefundAble(Byte refundAble) {
- this.refundAble = refundAble;
- }
-
- public BigDecimal getRefundAmount() {
- return refundAmount;
- }
-
- public void setRefundAmount(BigDecimal refundAmount) {
- this.refundAmount = refundAmount;
- }
-
- public String getSendType() {
- return sendType;
- }
-
- public void setSendType(String sendType) {
- this.sendType = sendType == null ? null : sendType.trim();
- }
-
- public BigDecimal getSettlementAmount() {
- return settlementAmount;
- }
-
- public void setSettlementAmount(BigDecimal settlementAmount) {
- this.settlementAmount = settlementAmount;
- }
-
- public String getShopId() {
- return shopId;
- }
-
- public void setShopId(String shopId) {
- this.shopId = shopId == null ? null : shopId.trim();
- }
-
- public BigDecimal getSmallChange() {
- return smallChange;
- }
-
- public void setSmallChange(BigDecimal smallChange) {
- this.smallChange = smallChange;
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status == null ? null : status.trim();
- }
-
- public String getTableId() {
- return tableId;
- }
-
- public void setTableId(String tableId) {
- this.tableId = tableId == null ? null : tableId.trim();
- }
-
- public String getTableParty() {
- return tableParty;
- }
-
- public void setTableParty(String tableParty) {
- this.tableParty = tableParty == null ? null : tableParty.trim();
- }
-
- public String getTerminalSnap() {
- return terminalSnap;
- }
-
- public void setTerminalSnap(String terminalSnap) {
- this.terminalSnap = terminalSnap == null ? null : terminalSnap.trim();
- }
-
- public String getUserId() {
- return userId;
- }
-
- public void setUserId(String userId) {
- this.userId = userId == null ? null : userId.trim();
- }
-
- public BigDecimal getVirtualPaidAmount() {
- return virtualPaidAmount;
- }
-
- public void setVirtualPaidAmount(BigDecimal virtualPaidAmount) {
- this.virtualPaidAmount = virtualPaidAmount;
- }
-
- public BigDecimal getWxPaidAmount() {
- return wxPaidAmount;
- }
-
- public void setWxPaidAmount(BigDecimal wxPaidAmount) {
- this.wxPaidAmount = wxPaidAmount;
- }
-
- public String getCartList() {
- return cartList;
- }
-
- public void setCartList(String cartList) {
- this.cartList = cartList == null ? null : cartList.trim();
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/BaseCallTableDTO.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/BaseCallTableDTO.java
new file mode 100644
index 0000000..c431171
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/BaseCallTableDTO.java
@@ -0,0 +1,13 @@
+package com.chaozhanggui.system.cashierservice.entity.dto;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+public class BaseCallTableDTO {
+ @NotNull
+ private Integer callTableId;
+ @NotNull
+ private Integer shopId;
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/CallNumPrintDTO.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/CallNumPrintDTO.java
new file mode 100644
index 0000000..ac37d31
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/CallNumPrintDTO.java
@@ -0,0 +1,9 @@
+package com.chaozhanggui.system.cashierservice.entity.dto;
+
+import lombok.Data;
+
+@Data
+public class CallNumPrintDTO {
+ private Integer callQueueId;
+ private Integer shopId;
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/CallSubMsgDTO.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/CallSubMsgDTO.java
new file mode 100644
index 0000000..2e823aa
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/CallSubMsgDTO.java
@@ -0,0 +1,16 @@
+package com.chaozhanggui.system.cashierservice.entity.dto;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+
+@Data
+public class CallSubMsgDTO {
+ @NotNull
+ private Integer queueId;
+ @NotEmpty
+ private String openId;
+ @NotNull
+ private Integer shopId;
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/CancelCallQueueDTO.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/CancelCallQueueDTO.java
new file mode 100644
index 0000000..e0dd55a
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/CancelCallQueueDTO.java
@@ -0,0 +1,13 @@
+package com.chaozhanggui.system.cashierservice.entity.dto;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+public class CancelCallQueueDTO {
+ @NotNull
+ private Integer queueId;
+ @NotNull
+ private Integer shopId;
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/ChoseCountDTO.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/ChoseCountDTO.java
new file mode 100644
index 0000000..3d64bd5
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/ChoseCountDTO.java
@@ -0,0 +1,18 @@
+package com.chaozhanggui.system.cashierservice.entity.dto;
+
+import lombok.Data;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+
+@Data
+public class ChoseCountDTO {
+ @NotNull
+ private Integer shopId;
+ @NotEmpty
+ private String tableId;
+ @NotNull
+ @Min(1)
+ private Integer num;
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/ChoseEatModelDTO.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/ChoseEatModelDTO.java
new file mode 100644
index 0000000..6760671
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/ChoseEatModelDTO.java
@@ -0,0 +1,20 @@
+package com.chaozhanggui.system.cashierservice.entity.dto;
+
+import lombok.Data;
+
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+
+@Data
+public class ChoseEatModelDTO {
+ @NotNull
+ private Integer shopId;
+ private String tableId;
+ @NotNull
+ @Max(1)
+ @Min(0)
+ // 0切换店内 1切换外带
+ private Integer type;
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/CouponDto.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/CouponDto.java
new file mode 100644
index 0000000..a5165da
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/CouponDto.java
@@ -0,0 +1,15 @@
+package com.chaozhanggui.system.cashierservice.entity.dto;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+public class CouponDto {
+ private Integer shopId;
+ private Integer userId;
+ //-1已过期 1未使用 2已使用
+ @NotNull(message = "状态不允许为空")
+ private Integer status;
+ private Integer orderId;
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/CouponUseDto.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/CouponUseDto.java
new file mode 100644
index 0000000..0859352
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/CouponUseDto.java
@@ -0,0 +1,15 @@
+package com.chaozhanggui.system.cashierservice.entity.dto;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class CouponUseDto {
+ private Integer shopId;
+ private Integer orderId;
+ //满减券id
+ private Integer couponId;
+ //商品券id
+ private List proCouponIds;
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/MemberInDTO.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/MemberInDTO.java
new file mode 100644
index 0000000..c1a03ca
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/MemberInDTO.java
@@ -0,0 +1,26 @@
+package com.chaozhanggui.system.cashierservice.entity.dto;
+
+import com.chaozhanggui.system.cashierservice.entity.TbOrderInfo;
+import lombok.Data;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+@Data
+public class MemberInDTO {
+ @NotNull
+ private Integer shopId;
+ private Integer userId;
+// @NotBlank(message = "用户信息不允许为空")
+ private String openId;
+ private BigDecimal amount;
+ private Integer orderId;
+ // 使用的优惠券
+ private List userCouponIds = new ArrayList<>();
+ // 是否使用积分抵扣
+ private boolean usePoints ;
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/OrderDeductionPointsDTO.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/OrderDeductionPointsDTO.java
new file mode 100644
index 0000000..7f94b4d
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/OrderDeductionPointsDTO.java
@@ -0,0 +1,61 @@
+package com.chaozhanggui.system.cashierservice.entity.dto;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 获取会员可用积分
+ * @author tankaikai
+ * @since 2024-10-26 11:40
+ */
+@Data
+public class OrderDeductionPointsDTO {
+
+ /**
+ * 本单最多可抵扣多少积分
+ */
+ private Integer maxUsablePoints;
+ /**
+ * 根据策略计算出的最少可以抵扣的金额
+ */
+ private BigDecimal minDeductionAmount;
+ /**
+ * 根据策略计算出的最多可以抵扣的金额
+ */
+ private BigDecimal maxDeductionAmount;
+ /**
+ * 下单积分抵扣门槛(每次使用不低于这个值)
+ */
+ private Integer minDeductionPoints;
+ /**
+ * 会员账户积分
+ */
+ private Integer accountPoints;
+ /**
+ * 订单金额 (扣除各类折扣)
+ */
+ private BigDecimal orderAmount;
+ /**
+ * 使用的积分数量
+ */
+ private Integer usedPoints;
+ /**
+ * 实际抵扣的金额
+ */
+ private Integer deductionAmount;
+ /**
+ * 下单抵扣积分比例 1元=?积分
+ */
+ private Integer equivalentPoints;
+ /**
+ * 不可抵扣原因
+ */
+ private String unusableReason;
+ /**
+ * 是否可用
+ */
+ private Boolean usable;
+
+
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/OrderPayDTO.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/OrderPayDTO.java
new file mode 100644
index 0000000..6ce9276
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/OrderPayDTO.java
@@ -0,0 +1,18 @@
+package com.chaozhanggui.system.cashierservice.entity.dto;
+
+import lombok.Data;
+import org.springframework.validation.annotation.Validated;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+@Data
+public class OrderPayDTO {
+ @NotNull(message = "订单号不允许为空")
+ private Integer orderId;
+ @NotBlank(message = "支付类型不允许为空")
+ private String payType;
+
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/ShopEatTypeInfoDTO.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/ShopEatTypeInfoDTO.java
new file mode 100644
index 0000000..b1117c9
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/ShopEatTypeInfoDTO.java
@@ -0,0 +1,18 @@
+package com.chaozhanggui.system.cashierservice.entity.dto;
+
+import com.chaozhanggui.system.cashierservice.entity.TbShopInfo;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+@Data
+@AllArgsConstructor
+public class ShopEatTypeInfoDTO {
+ private boolean isTakeout;
+ private boolean isMunchies;
+ private boolean isDineInAfter;
+ private boolean isDineInBefore;
+ private TbShopInfo shopInfo;
+ private String useType;
+ private boolean isOpenTakeout;
+ private boolean isOpenDineIn;
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/TakeNumberDTO.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/TakeNumberDTO.java
new file mode 100644
index 0000000..a560f29
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/TakeNumberDTO.java
@@ -0,0 +1,21 @@
+package com.chaozhanggui.system.cashierservice.entity.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Pattern;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class TakeNumberDTO extends BaseCallTableDTO{
+ @NotBlank
+ @Pattern(regexp = "^1\\d{10}$|^(0\\d{2,3}-?|\\(0\\d{2,3}\\))?[1-9]\\d{4,7}(-\\d{1,8})?$",message = "手机号码格式错误")
+ private String phone;
+ private String note;
+ private String name;
+ @NotBlank
+ private String openId;
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/UserCouponDto.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/UserCouponDto.java
new file mode 100644
index 0000000..b53d03f
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/dto/UserCouponDto.java
@@ -0,0 +1,11 @@
+package com.chaozhanggui.system.cashierservice.entity.dto;
+
+import lombok.Data;
+
+@Data
+public class UserCouponDto extends BasePageDto{
+ private Integer userId;
+ private Integer status;
+ private Integer shopId;
+
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/ActivateInInfoVO.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/ActivateInInfoVO.java
new file mode 100644
index 0000000..46cd10d
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/ActivateInInfoVO.java
@@ -0,0 +1,14 @@
+package com.chaozhanggui.system.cashierservice.entity.vo;
+
+import lombok.Builder;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+@Data
+@Accessors(chain = true)
+public class ActivateInInfoVO {
+ private Integer id;
+ private Integer couponId;
+ private Integer num;
+}
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/CallQueueInfoVO.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/CallQueueInfoVO.java
new file mode 100644
index 0000000..9174ce6
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/CallQueueInfoVO.java
@@ -0,0 +1,17 @@
+package com.chaozhanggui.system.cashierservice.entity.vo;
+
+import lombok.Data;
+
+@Data
+public class CallQueueInfoVO {
+ private Integer id;
+ private String tableName;
+ private String tableNote;
+ private Integer waitingCount;
+ private Integer waitTime;
+ private Integer state;
+ private String callNum;
+ private String shopState;
+ private String shopName;
+ private String logo;
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/GroupOrderDetailsVo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/GroupOrderDetailsVo.java
index cee294b..9dfc193 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/GroupOrderDetailsVo.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/GroupOrderDetailsVo.java
@@ -55,7 +55,7 @@ public class GroupOrderDetailsVo {
* 商家名称
*/
private String shopName;
- private Byte isUseVip;
+ private Integer isUseVip;
/**
* 商家电话
*/
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/IntegralFlowVo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/IntegralFlowVo.java
deleted file mode 100644
index 12cfe06..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/IntegralFlowVo.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity.vo;
-
-import lombok.Data;
-
-import java.math.BigDecimal;
-
-/**
- * @author lyf
- */
-@Data
-public class IntegralFlowVo {
- private String openId;
- private Integer page;
- private Integer pageSize;
- private String sign;
-
-}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/IntegralVo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/IntegralVo.java
deleted file mode 100644
index c26ab36..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/IntegralVo.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.chaozhanggui.system.cashierservice.entity.vo;
-
-import lombok.Data;
-
-import java.math.BigDecimal;
-
-/**
- * @author lyf
- */
-@Data
-public class IntegralVo {
- //openId
- private String openId;
- //数量
- private BigDecimal num;
- //类型
- private String type;
- //签名
- private String sign;
-
-}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/OpenMemberVo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/OpenMemberVo.java
index b08c50e..28c9515 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/OpenMemberVo.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/OpenMemberVo.java
@@ -6,10 +6,8 @@ import lombok.Data;
public class OpenMemberVo {
private Integer id;
private Integer shopId;
- private String headImg;
-
- private String nickName;
-
private String telephone;
+ private String nickName;
private String birthDay;
+ private String headImg;
}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/OrderConfirmVo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/OrderConfirmVo.java
index 1e774e4..5ffcca6 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/OrderConfirmVo.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/OrderConfirmVo.java
@@ -8,7 +8,7 @@ import java.math.BigDecimal;
public class OrderConfirmVo {
private String proId;
private String shopId;
- private Byte isUseVip;
+ private Integer isUseVip;
/**
* 商品图片
*/
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/OrderVo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/OrderVo.java
index 03ee617..a5abc9e 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/OrderVo.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/OrderVo.java
@@ -37,4 +37,9 @@ public class OrderVo {
private String outNumber;
+ private String useType;
+
+ private Integer shopId;
+ private String qrcode;
+
}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/TbUserCouponVo.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/TbUserCouponVo.java
new file mode 100644
index 0000000..6e0f865
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/TbUserCouponVo.java
@@ -0,0 +1,34 @@
+package com.chaozhanggui.system.cashierservice.entity.vo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class TbUserCouponVo {
+ private Integer id;
+ private BigDecimal fullAmount;
+ private BigDecimal discountAmount;
+ private Integer couponId;
+ private Integer proId;
+ //优惠券名称
+ private String name;
+ //优惠券类型 1 满减 2 商品券
+ private Integer type;
+ //数量
+ private Integer num;
+ //到期时间
+ private Date endTime;
+ private Long expireTime;
+ private String useRestrictions;
+ private boolean isUse = false;
+
+
+ public void setEndTime(Date endTime) {
+ this.endTime = endTime;
+ if(endTime!=null){
+ expireTime=endTime.getTime();
+ }
+ }
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/CustomFilter.java b/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/CustomFilter.java
index b79a877..5e8bb65 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/CustomFilter.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/interceptor/CustomFilter.java
@@ -14,7 +14,11 @@ import java.util.List;
@WebFilter(urlPatterns = {"/cashierService/*"},filterName = "customFilter")
public class CustomFilter implements Filter {
- private static final List unFilterUrlList= Arrays.asList("/cashierService/notify/notifyCallBack","/cashierService/notify/memberInCallBack");
+ private static final List unFilterUrlList =
+ Arrays.asList(
+ "/cashierService/notify/notifyCallBack",
+ "/cashierService/notify/memberInCallBack"
+ );
private boolean isfilter(String url){
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpCashierCartMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpCashierCartMapper.java
new file mode 100644
index 0000000..8a630d5
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpCashierCartMapper.java
@@ -0,0 +1,19 @@
+package com.chaozhanggui.system.cashierservice.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.chaozhanggui.system.cashierservice.entity.TbCashierCart;
+import com.chaozhanggui.system.cashierservice.entity.TbOrderInfo;
+
+/**
+* @author Administrator
+* @description 针对表【tb_call_queue】的数据库操作Mapper
+* @createDate 2024-09-13 13:44:26
+* @Entity com.chaozhanggui.system.cashierservice.entity.TbCallQueue
+*/
+public interface MpCashierCartMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpMemberInMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpMemberInMapper.java
new file mode 100644
index 0000000..c016e50
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpMemberInMapper.java
@@ -0,0 +1,16 @@
+package com.chaozhanggui.system.cashierservice.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.chaozhanggui.system.cashierservice.entity.TbCashierCart;
+import com.chaozhanggui.system.cashierservice.entity.TbMemberIn;
+
+/**
+* @author Administrator
+*/
+public interface MpMemberInMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpOrderDetailMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpOrderDetailMapper.java
new file mode 100644
index 0000000..50405a3
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpOrderDetailMapper.java
@@ -0,0 +1,19 @@
+package com.chaozhanggui.system.cashierservice.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.chaozhanggui.system.cashierservice.entity.TbOrderDetail;
+import com.chaozhanggui.system.cashierservice.entity.TbOrderInfo;
+
+/**
+* @author Administrator
+* @description 针对表【tb_call_queue】的数据库操作Mapper
+* @createDate 2024-09-13 13:44:26
+* @Entity com.chaozhanggui.system.cashierservice.entity.TbCallQueue
+*/
+public interface MpOrderDetailMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpOrderInfoMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpOrderInfoMapper.java
new file mode 100644
index 0000000..0dc8d2f
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpOrderInfoMapper.java
@@ -0,0 +1,19 @@
+package com.chaozhanggui.system.cashierservice.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.chaozhanggui.system.cashierservice.entity.TbOrderInfo;
+import com.chaozhanggui.system.cashierservice.entity.TbShopInfo;
+
+/**
+* @author Administrator
+* @description 针对表【tb_call_queue】的数据库操作Mapper
+* @createDate 2024-09-13 13:44:26
+* @Entity com.chaozhanggui.system.cashierservice.entity.TbCallQueue
+*/
+public interface MpOrderInfoMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpShopCouponMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpShopCouponMapper.java
new file mode 100644
index 0000000..5a7425d
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpShopCouponMapper.java
@@ -0,0 +1,19 @@
+package com.chaozhanggui.system.cashierservice.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.chaozhanggui.system.cashierservice.entity.TbCashierCart;
+import com.chaozhanggui.system.cashierservice.entity.TbShopCoupon;
+
+/**
+* @author Administrator
+* @description 针对表【tb_call_queue】的数据库操作Mapper
+* @createDate 2024-09-13 13:44:26
+* @Entity com.chaozhanggui.system.cashierservice.entity.TbCallQueue
+*/
+public interface MpShopCouponMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpShopInfoMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpShopInfoMapper.java
new file mode 100644
index 0000000..7f72780
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpShopInfoMapper.java
@@ -0,0 +1,22 @@
+package com.chaozhanggui.system.cashierservice.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.chaozhanggui.system.cashierservice.entity.TbCallQueue;
+import com.chaozhanggui.system.cashierservice.entity.TbShopInfo;
+import com.chaozhanggui.system.cashierservice.entity.vo.CallQueueInfoVO;
+
+import java.util.List;
+
+/**
+* @author Administrator
+* @description 针对表【tb_call_queue】的数据库操作Mapper
+* @createDate 2024-09-13 13:44:26
+* @Entity com.chaozhanggui.system.cashierservice.entity.TbCallQueue
+*/
+public interface MpShopInfoMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpShopTableMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpShopTableMapper.java
new file mode 100644
index 0000000..1409402
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/MpShopTableMapper.java
@@ -0,0 +1,19 @@
+package com.chaozhanggui.system.cashierservice.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.chaozhanggui.system.cashierservice.entity.TbCashierCart;
+import com.chaozhanggui.system.cashierservice.entity.TbShopTable;
+
+/**
+* @author Administrator
+* @description 针对表【tb_call_queue】的数据库操作Mapper
+* @createDate 2024-09-13 13:44:26
+* @Entity com.chaozhanggui.system.cashierservice.entity.TbCallQueue
+*/
+public interface MpShopTableMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbCallQueueMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbCallQueueMapper.java
new file mode 100644
index 0000000..ba394aa
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbCallQueueMapper.java
@@ -0,0 +1,22 @@
+package com.chaozhanggui.system.cashierservice.mapper;
+
+import com.chaozhanggui.system.cashierservice.entity.TbCallQueue;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.chaozhanggui.system.cashierservice.entity.vo.CallQueueInfoVO;
+
+import java.util.List;
+
+/**
+* @author Administrator
+* @description 针对表【tb_call_queue】的数据库操作Mapper
+* @createDate 2024-09-13 13:44:26
+* @Entity com.chaozhanggui.system.cashierservice.entity.TbCallQueue
+*/
+public interface TbCallQueueMapper extends BaseMapper {
+
+ List selectInfoByOpenId(Integer shopId, String openId, String today, Integer queueId);
+}
+
+
+
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbCallTableMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbCallTableMapper.java
new file mode 100644
index 0000000..adefb7b
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbCallTableMapper.java
@@ -0,0 +1,18 @@
+package com.chaozhanggui.system.cashierservice.mapper;
+
+import com.chaozhanggui.system.cashierservice.entity.TbCallTable;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author Administrator
+* @description 针对表【tb_call_table】的数据库操作Mapper
+* @createDate 2024-09-13 13:44:34
+* @Entity com.chaozhanggui.system.cashierservice.entity.TbCallTable
+*/
+public interface TbCallTableMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbFreeDineConfigMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbFreeDineConfigMapper.java
new file mode 100644
index 0000000..a0abe2c
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbFreeDineConfigMapper.java
@@ -0,0 +1,18 @@
+package com.chaozhanggui.system.cashierservice.mapper;
+
+import com.chaozhanggui.system.cashierservice.entity.TbFreeDineConfig;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author Administrator
+* @description 针对表【tb_free_dine_config(霸王餐配置信息表)】的数据库操作Mapper
+* @createDate 2024-10-25 14:22:41
+* @Entity com.chaozhanggui.system.cashierservice.entity.TbFreeDineConfig
+*/
+public interface TbFreeDineConfigMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbFreeDineRecordMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbFreeDineRecordMapper.java
new file mode 100644
index 0000000..a411afa
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbFreeDineRecordMapper.java
@@ -0,0 +1,18 @@
+package com.chaozhanggui.system.cashierservice.mapper;
+
+import com.chaozhanggui.system.cashierservice.entity.TbFreeDineRecord;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author Administrator
+* @description 针对表【tb_free_dine_record(霸王餐充值记录)】的数据库操作Mapper
+* @createDate 2024-10-30 09:48:31
+* @Entity com.chaozhanggui.system.cashierservice.entity.TbFreeDineRecord
+*/
+public interface TbFreeDineRecordMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbMemberPointsLogMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbMemberPointsLogMapper.java
new file mode 100644
index 0000000..9ddf2d8
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbMemberPointsLogMapper.java
@@ -0,0 +1,16 @@
+package com.chaozhanggui.system.cashierservice.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.chaozhanggui.system.cashierservice.entity.TbMemberPointsLog;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 会员积分变动记录
+ *
+ * @author Tankaikai tankaikai@aliyun.com
+ * @since 2.0 2024-10-25
+ */
+@Mapper
+public interface TbMemberPointsLogMapper extends BaseMapper {
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbMemberPointsMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbMemberPointsMapper.java
new file mode 100644
index 0000000..04ab248
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbMemberPointsMapper.java
@@ -0,0 +1,16 @@
+package com.chaozhanggui.system.cashierservice.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.chaozhanggui.system.cashierservice.entity.TbMemberPoints;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 会员积分
+ *
+ * @author Tankaikai tankaikai@aliyun.com
+ * @since 2.0 2024-10-25
+ */
+@Mapper
+public interface TbMemberPointsMapper extends BaseMapper {
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbPointsBasicSettingMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbPointsBasicSettingMapper.java
new file mode 100644
index 0000000..71380fb
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbPointsBasicSettingMapper.java
@@ -0,0 +1,16 @@
+package com.chaozhanggui.system.cashierservice.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.chaozhanggui.system.cashierservice.entity.TbPointsBasicSetting;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 积分基本设置
+ *
+ * @author Tankaikai tankaikai@aliyun.com
+ * @since 2.0 2024-10-25
+ */
+@Mapper
+public interface TbPointsBasicSettingMapper extends BaseMapper {
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbPointsExchangeRecordMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbPointsExchangeRecordMapper.java
new file mode 100644
index 0000000..c889113
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbPointsExchangeRecordMapper.java
@@ -0,0 +1,16 @@
+package com.chaozhanggui.system.cashierservice.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.chaozhanggui.system.cashierservice.entity.TbPointsExchangeRecord;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 积分兑换记录
+ *
+ * @author Tankaikai tankaikai@aliyun.com
+ * @since 2.0 2024-10-25
+ */
+@Mapper
+public interface TbPointsExchangeRecordMapper extends BaseMapper {
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbPointsGoodsSettingMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbPointsGoodsSettingMapper.java
new file mode 100644
index 0000000..8ea5351
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/mapper/TbPointsGoodsSettingMapper.java
@@ -0,0 +1,16 @@
+package com.chaozhanggui.system.cashierservice.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.chaozhanggui.system.cashierservice.entity.TbPointsGoodsSetting;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 积分商品设置
+ *
+ * @author Tankaikai tankaikai@aliyun.com
+ * @since 2.0 2024-10-25
+ */
+@Mapper
+public interface TbPointsGoodsSettingMapper extends BaseMapper {
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mpservice/MpShopTableService.java b/src/main/java/com/chaozhanggui/system/cashierservice/mpservice/MpShopTableService.java
new file mode 100644
index 0000000..cc11b5a
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/mpservice/MpShopTableService.java
@@ -0,0 +1,26 @@
+package com.chaozhanggui.system.cashierservice.mpservice;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.chaozhanggui.system.cashierservice.constant.TableConstant;
+import com.chaozhanggui.system.cashierservice.entity.TbShopTable;
+
+public interface MpShopTableService extends IService {
+ /**
+ * 根据台桌id修改台桌状态
+ * @param tableId qrcode
+ * @param state 状态
+ */
+ boolean updateStateByQrcode(String tableId, TableConstant.ShopTable.State state);
+
+ /**
+ * 根据qrcode获取台桌
+ * @param tableId qrcode
+ */
+ TbShopTable selectByQrcode(String tableId);
+
+ /**
+ * 清除台桌状态
+ * @param tableId 台桌id
+ */
+ boolean clearTableState(String tableId);
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/mpservice/impl/MpShopTableServiceImpl.java b/src/main/java/com/chaozhanggui/system/cashierservice/mpservice/impl/MpShopTableServiceImpl.java
new file mode 100644
index 0000000..db06283
--- /dev/null
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/mpservice/impl/MpShopTableServiceImpl.java
@@ -0,0 +1,45 @@
+package com.chaozhanggui.system.cashierservice.mpservice.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.chaozhanggui.system.cashierservice.constant.TableConstant;
+import com.chaozhanggui.system.cashierservice.entity.TbShopTable;
+import com.chaozhanggui.system.cashierservice.mapper.MpShopTableMapper;
+import com.chaozhanggui.system.cashierservice.mpservice.MpShopTableService;
+import org.springframework.context.annotation.Primary;
+import org.springframework.stereotype.Service;
+
+@Service
+@Primary
+public class MpShopTableServiceImpl extends ServiceImpl implements MpShopTableService {
+ @Override
+ public boolean updateStateByQrcode(String tableId, TableConstant.ShopTable.State state) {
+ return update(new LambdaUpdateWrapper()
+ .eq(TbShopTable::getQrcode, tableId)
+ .set(TbShopTable::getStatus, state.getValue()));
+ }
+
+ @Override
+ public TbShopTable selectByQrcode(String tableId) {
+ return getOne(new LambdaQueryWrapper()
+ .eq(TbShopTable::getQrcode, tableId));
+ }
+
+ @Override
+ public boolean clearTableState(String tableId) {
+ TbShopTable shopTable = selectByQrcode(tableId);
+ if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) {
+ return update(new LambdaUpdateWrapper()
+ .eq(TbShopTable::getQrcode, tableId)
+ .set(TbShopTable::getUseTime, null)
+ .set(TbShopTable::getProductNum, 0)
+ .set(TbShopTable::getTotalAmount, 0)
+ .set(TbShopTable::getRealAmount, 0)
+ .set(TbShopTable::getUseNum, 0)
+ .set(TbShopTable::getStatus, TableConstant.ShopTable.State.CLEANING.getValue()));
+ }else {
+ return updateStateByQrcode(tableId, TableConstant.ShopTable.State.CLEANING);
+ }
+ }
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/netty/PushToAppChannelHandlerAdapter.java b/src/main/java/com/chaozhanggui/system/cashierservice/netty/PushToAppChannelHandlerAdapter.java
index 339735f..3a065d5 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/netty/PushToAppChannelHandlerAdapter.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/netty/PushToAppChannelHandlerAdapter.java
@@ -3,11 +3,13 @@ package com.chaozhanggui.system.cashierservice.netty;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
+import com.chaozhanggui.system.cashierservice.entity.dto.ShopEatTypeInfoDTO;
import com.chaozhanggui.system.cashierservice.netty.config.NettyChannelHandlerAdapter;
import com.chaozhanggui.system.cashierservice.rabbit.RabbitProducer;
import com.chaozhanggui.system.cashierservice.redis.RedisCst;
import com.chaozhanggui.system.cashierservice.redis.RedisUtil;
import com.chaozhanggui.system.cashierservice.util.JSONUtil;
+import com.chaozhanggui.system.cashierservice.util.ShopUtils;
import com.chaozhanggui.system.cashierservice.util.SpringUtils;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandler.Sharable;
@@ -17,6 +19,8 @@ import io.netty.handler.timeout.IdleState;
import io.netty.handler.timeout.IdleStateEvent;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
@@ -35,7 +39,9 @@ import java.util.concurrent.ConcurrentHashMap;
public class PushToAppChannelHandlerAdapter extends NettyChannelHandlerAdapter {
/**
- * [tableID-shopId, [userId, ctx]]
+ * 台桌下单为: TAKEOUT_TABLE_CART:shopId:tableID
+ * 店内自取为: DINE_IN_TABLE_CART:shopId:userId
+ * [shopId:tableID, [userId, ctx]]
*/
private static Map> webSocketMap = new HashMap<>();
@@ -51,6 +57,9 @@ public class PushToAppChannelHandlerAdapter extends NettyChannelHandlerAdapter {
private RabbitProducer a;
//注入为空
public static RabbitProducer rabbitProducer;
+
+ private ShopUtils shopUtils = SpringUtils.getBean(ShopUtils.class);
+
@PostConstruct
public void b() {
rabbitProducer = this.a;
@@ -88,13 +97,14 @@ public class PushToAppChannelHandlerAdapter extends NettyChannelHandlerAdapter {
// 遍历webSocketMap,查找并移除对应的ChannelHandlerContext
String key = ctxToUserIdMap.get(ctx);
if (StringUtils.isNotBlank(key)) {
- String[] split = key.split(":");
+ String[] split = key.split("-");
ConcurrentHashMap tableMap = webSocketMap.get(split[0]);
if (tableMap != null && !tableMap.isEmpty() && tableMap.size() > 0) {
tableMap.remove(split[1]);
if (tableMap.isEmpty() || tableMap.size() == 0) {
webSocketMap.remove(split[0]);
- redisUtils.deleteByKey(RedisCst.TABLE_CART.concat(split[0]));
+ // 删除购物车缓存
+ redisUtils.deleteByKey(split[0]);
}
}
}
@@ -133,12 +143,14 @@ public class PushToAppChannelHandlerAdapter extends NettyChannelHandlerAdapter {
channelInactive(ctx);
return;
}
- String key = tableId + "-" + shopId;
- log.info("netty连接 接收到数据 建立连接参数 param:{}",jsonObject);
+
+ ShopEatTypeInfoDTO eatModel = shopUtils.getEatModel(tableId, shopId);
+ String tableCartKey = RedisCst.getTableCartKey(shopId, eatModel.isOpenDineIn() ? tableId : null, Integer.valueOf(userId));
+ log.info("netty连接 接收到数据 建立连接参数 key: {} param:{}", tableCartKey, jsonObject);
this.tableId=tableId;
this.shopId=shopId;
- if (webSocketMap.containsKey(key)) {
- ConcurrentHashMap userSocketMap = webSocketMap.get(key);
+ if (webSocketMap.containsKey(tableCartKey)) {
+ ConcurrentHashMap userSocketMap = webSocketMap.get(tableCartKey);
ChannelHandlerContext channelHandlerContext = userSocketMap.get(userId);
if (channelHandlerContext != null) {
channelHandlerContext.close();
@@ -147,9 +159,9 @@ public class PushToAppChannelHandlerAdapter extends NettyChannelHandlerAdapter {
} else {
ConcurrentHashMap userSocketMap = new ConcurrentHashMap<>();
userSocketMap.put(userId, ctx);
- webSocketMap.put(key,userSocketMap);
+ webSocketMap.put(tableCartKey,userSocketMap);
}
- ctxToUserIdMap.put(ctx, key + ":" + userId);
+ ctxToUserIdMap.put(ctx, tableCartKey + "-" + userId);
JSONObject jsonObject1 = new JSONObject();
jsonObject1.put("status", "success");
jsonObject1.put("msg", "连接成功");
@@ -163,11 +175,13 @@ public class PushToAppChannelHandlerAdapter extends NettyChannelHandlerAdapter {
log.info("netty连接 接收到接口数据:meg:{}",msg);
jsonObject.put("tableId", this.tableId);
jsonObject.put("shopId", this.shopId);
+ Integer userId = jsonObject.getInteger("userId");
if("sku".equals(type)){
- boolean exist = redisUtils.exists(RedisCst.TABLE_CART.concat(jsonObject.getString("tableId").concat("-").concat(shopId)));
+ String tableCartKey = RedisCst.getTableCartKey(shopId, tableId, userId);
+ boolean exist = redisUtils.exists(tableCartKey);
Integer num = 0;
if (exist){
- String message = redisUtils.getMessage(RedisCst.TABLE_CART.concat(jsonObject.getString("tableId").concat("-").concat(shopId)));
+ String message = redisUtils.getMessage(tableCartKey);
JSONArray array = JSON.parseArray(message);
for (int i = 0; i < array.size(); i++) {
JSONObject object = array.getJSONObject(i);
@@ -226,11 +240,12 @@ public class PushToAppChannelHandlerAdapter extends NettyChannelHandlerAdapter {
}
@Async
- public void AppSendInfo(String message, String tableId,String userId, boolean userFlag) {
- log.info("netty连接 发送消息 tableId:{} userId:{} userFlag:{} message:{}",tableId,userId,userFlag, JSONUtil.toJSONString(message));
+ public void AppSendInfo(String message, String redisKey,String userId, boolean userFlag) {
+ log.info("netty连接 发送消息 key:{} userId:{} userFlag:{} message:{}",redisKey,userId,userFlag, JSONUtil.toJSONString(message));
+ log.info("当前已连接队列信息: {}", webSocketMap);
if (userFlag) {
- if (webSocketMap.containsKey(tableId)) {
- ConcurrentHashMap webSockets = webSocketMap.get(tableId);
+ if (webSocketMap.containsKey(redisKey)) {
+ ConcurrentHashMap webSockets = webSocketMap.get(redisKey);
if(!webSockets.isEmpty()){
if (StringUtils.isNotBlank(userId)) {
ChannelHandlerContext ctx = webSockets.get(userId);
@@ -241,15 +256,15 @@ public class PushToAppChannelHandlerAdapter extends NettyChannelHandlerAdapter {
}
}
} else {
- if (StringUtils.isEmpty(tableId)) {
+ if (StringUtils.isEmpty(redisKey)) {
// 向所有用户发送信息
for (ConcurrentHashMap value : webSocketMap.values()) {
for (ChannelHandlerContext ctx : value.values()) {
sendMesToApp(message,ctx);
}
}
- } else if (webSocketMap.containsKey(tableId)) {
- ConcurrentHashMap webSockets = webSocketMap.get(tableId);
+ } else if (webSocketMap.containsKey(redisKey)) {
+ ConcurrentHashMap webSockets = webSocketMap.get(redisKey);
if(!webSockets.isEmpty()) {
for (String user : webSockets.keySet()) {
ChannelHandlerContext ctx = webSockets.get(user);
@@ -261,10 +276,10 @@ public class PushToAppChannelHandlerAdapter extends NettyChannelHandlerAdapter {
}
}
}else {
- log.info("netty连接 发送消息 桌码群发 tableId:{} 失败",tableId);
+ log.info("netty连接 发送消息 桌码群发 tableId:{} 失败",redisKey);
}
}
}
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/netty/PushToClientChannelHandlerAdapter.java b/src/main/java/com/chaozhanggui/system/cashierservice/netty/PushToClientChannelHandlerAdapter.java
index cedc930..b994d1a 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/netty/PushToClientChannelHandlerAdapter.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/netty/PushToClientChannelHandlerAdapter.java
@@ -160,6 +160,19 @@ public class PushToClientChannelHandlerAdapter extends NettyChannelHandlerAdapte
});
}
+ @Async
+ public void AppSendInfo(String message, String shopId) {
+ log.info("长链接发送交班数据。");
+ ConcurrentHashMap webSockets = webSocketMap.get(shopId);
+ if (webSockets != null) {
+ for (ChannelHandlerContext ctx : webSockets.values()) {
+ sendMesToApp(message, ctx);
+ }
+ }
+ }
+
+
+ //发送打印消息 有重发机制
public void AppSendInfoV1(String shopId, String orderNo, JSONObject message) {
log.info("netty连接client 发送消息 shopId:{} clientId:{} userFlag:{} message:{}", shopId, message.get("orderInfo"));
retryQueue.computeIfAbsent(shopId, k -> new ConcurrentLinkedQueue<>()).offer(message);
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/CartConsumer.java b/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/CartConsumer.java
index c3c1d16..2ad7144 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/CartConsumer.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/CartConsumer.java
@@ -3,10 +3,12 @@ package com.chaozhanggui.system.cashierservice.rabbit;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
+import com.chaozhanggui.system.cashierservice.entity.dto.ShopEatTypeInfoDTO;
import com.chaozhanggui.system.cashierservice.exception.MsgException;
import com.chaozhanggui.system.cashierservice.redis.RedisCst;
import com.chaozhanggui.system.cashierservice.redis.RedisUtil;
import com.chaozhanggui.system.cashierservice.service.CartService;
+import com.chaozhanggui.system.cashierservice.util.ShopUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
@@ -26,6 +28,9 @@ public class CartConsumer {
private RedisUtil redisUtil;
@Autowired
private CartService cartService;
+ @Autowired
+ private ShopUtils shopUtils;
+
@RabbitHandler
@RabbitListener(queues = {"${queue}"})
public void listener(String message) {
@@ -34,6 +39,7 @@ public class CartConsumer {
JSONObject jsonObject = JSON.parseObject(message);
String tableId = jsonObject.getString("tableId");
String shopId = jsonObject.getString("shopId");
+ Integer userId = jsonObject.getInteger("userId");
if (jsonObject.getString("type").equals("initCart") ) {
cartService.initCart(jsonObject);
}
@@ -46,15 +52,7 @@ public class CartConsumer {
else if (jsonObject.getString("type").equals("queryCart") ) {
cartService.queryCart(jsonObject);
} else if(jsonObject.getString("type").equals("createOrder")){
- String cartDetail = redisUtil.getMessage(RedisCst.TABLE_CART.concat(tableId).concat("-").concat(shopId));
- if (StringUtils.isEmpty(cartDetail)){
- log.info("createOrder购物车为空");
- throw new MsgException("购物车为空无法下单");
- }
- JSONArray array = JSON.parseArray(cartDetail);
- if (array.size() > 0){
- cartService.createOrder(jsonObject);
- }
+ cartService.createOrder(jsonObject);
}
// else if(jsonObject.getString("type").equals("clearCart")){
// cartService.clearCart(jsonObject);
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/IntegralConsumer.java b/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/IntegralConsumer.java
deleted file mode 100644
index a4155f3..0000000
--- a/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/IntegralConsumer.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.chaozhanggui.system.cashierservice.rabbit;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.chaozhanggui.system.cashierservice.redis.RedisUtil;
-import com.chaozhanggui.system.cashierservice.service.IntegralService;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.amqp.rabbit.annotation.RabbitHandler;
-import org.springframework.amqp.rabbit.annotation.RabbitListener;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import org.springframework.stereotype.Service;
-
-@Slf4j
-@Component
-@RabbitListener(queues = {RabbitConstants.INTEGRAL_QUEUE_PUT})
-@Service
-public class IntegralConsumer {
-
-
- @Autowired
- private RedisUtil redisUtil;
- @Autowired
- private IntegralService integralService;
- @RabbitHandler
- public void listener(String message) {
- try {
- JSONObject jsonObject = JSON.parseObject(message);
- integralService.integralAdd(jsonObject);
- } catch (Exception e) {
- e.getMessage();
- }
- }
-
-
-}
diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/PrintMechineConsumer.java b/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/PrintMechineConsumer.java
index 1657918..c1cebdf 100644
--- a/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/PrintMechineConsumer.java
+++ b/src/main/java/com/chaozhanggui/system/cashierservice/rabbit/PrintMechineConsumer.java
@@ -1,11 +1,13 @@
package com.chaozhanggui.system.cashierservice.rabbit;
+import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.ObjectUtil;
-import com.alibaba.fastjson.JSONObject;
+import cn.hutool.core.util.StrUtil;
import com.chaozhanggui.system.cashierservice.dao.*;
import com.chaozhanggui.system.cashierservice.entity.*;
import com.chaozhanggui.system.cashierservice.model.CategoryInfo;
import com.chaozhanggui.system.cashierservice.model.OrderDetailPO;
+import com.chaozhanggui.system.cashierservice.redis.RedisCst;
import com.chaozhanggui.system.cashierservice.util.DateUtils;
import com.chaozhanggui.system.cashierservice.util.FeieyunPrintUtil;
import com.chaozhanggui.system.cashierservice.util.JSONUtil;
@@ -14,12 +16,18 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.stream.Collectors;
@Slf4j
@Component
@@ -47,6 +55,10 @@ public class PrintMechineConsumer {
@Autowired
private TbOrderDetailMapper tbOrderDetailMapper;
+ @Autowired
+ private RedisTemplate