Merge remote-tracking branch 'origin/test' into test

# Conflicts:
#	src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUser.java
#	src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java
This commit is contained in:
GYJ
2024-11-01 10:18:53 +08:00
248 changed files with 11179 additions and 9714 deletions

41
pom.xml
View File

@@ -20,11 +20,23 @@
</properties>
<dependencies>
<!--Spring boot 测试-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.belerweb</groupId>
<artifactId >pinyin4j</artifactId>
<version >2.5.1</version >
</dependency>
<dependency>
<groupId>p6spy</groupId>
<artifactId>p6spy</artifactId>
<version>3.8.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
@@ -102,6 +114,22 @@
<version>1.3.5</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.3.1</version>
<exclusions>
<exclusion>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
@@ -203,6 +231,12 @@
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
</dependency>
<!-- 支付宝服务端通用SDK -->
<dependency>
<groupId>com.alipay.sdk</groupId>
<artifactId>alipay-sdk-java</artifactId>
<version>4.39.165.ALL</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
@@ -214,6 +248,11 @@
<artifactId>weixin-java-miniapp</artifactId>
<version>3.8.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
@@ -273,4 +312,4 @@
</plugins>
</build>
</project>
</project>

View File

@@ -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;
}
}
}

View File

@@ -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;
}
}

View File

@@ -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)){

View File

@@ -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 {
}

View File

@@ -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;
}
}

View File

@@ -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);
}
}
}
}

View File

@@ -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<String, String> 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<String, String> 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}$");

View File

@@ -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<String, String> map) {
@RequestMapping("/auth/custom/login")
public Result authCustomLogin(HttpServletRequest request, @RequestBody Map<String, String> 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<String, String> map) {
public Result getPhoneNumber(@RequestHeader String openId, @RequestBody Map<String, String> 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<String, Object> map){
public Result resetPwd(@RequestHeader String token, @RequestBody Map<String, Object> 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<String, Object> map){
public Result mpdifyPwd(@RequestHeader String token, @RequestBody Map<String, Object> map) {
String userId = TokenUtil.parseParamFromToken(token).getString("userId");
return loginService.modifyPwd(userId,map);
return loginService.modifyPwd(userId, map);
}

View File

@@ -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<String, Integer> 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));
}
}
}

View File

@@ -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<String, Object> 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()));
}
}

View File

@@ -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<String, String> 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<String, Object> 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")

View File

@@ -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<String, String> map) {
public Result queryProduct(@RequestHeader("id") String userId,@RequestBody Map<String, String> 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<TbCashierCart> cashierCartList = cartService.choseEatModel(choseEatModelDTO);
BigDecimal amount = BigDecimal.ZERO;
ArrayList<TbCashierCart> cashierCarts = new ArrayList<>();
for (TbCashierCart item : cashierCartList) {
if (!TableConstant.CART_SEAT_ID.equals(item.getProductId())) {
cashierCarts.add(item);
}
amount = amount.add(item.getTotalAmount());
}
HashMap<String, Object> 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);

View File

@@ -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));
}
}

View File

@@ -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<String, Object> params) {
PageInfo<TbMemberPoints> 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<String, Object> 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<String, Object> 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);
}
}

View File

@@ -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<String, Object> params) {
PageInfo<TbMemberPointsLog> page = tbMemberPointsLogService.page(params);
return Result.successWithData(page);
}
}

View File

@@ -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);
}
}

View File

@@ -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<String, Object> params) {
PageInfo<TbPointsExchangeRecord> 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<String, Object> params) {
Map<String, Object> data = tbPointsExchangeRecordService.total(params);
return Result.successWithData(data);
}
}

View File

@@ -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<String, Object> params) {
PageInfo<TbPointsGoodsSetting> 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);
}
}

View File

@@ -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);
}
}

View File

@@ -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);
}

View File

@@ -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<TbActivateInRecord> queryAll(TbActivateInRecord tbActivateInRecord);
//未使用券
List<TbUserCouponVo> queryByVipIdAndShopId(@Param("vipUserIds") List<Integer> vipUserIds, @Param("shopId") Integer shopId);
//过期券
List<TbUserCouponVo> queryByVipIdAndShopIdExpire(@Param("vipUserIds") List<Integer> vipUserIds, @Param("shopId") Integer shopId);
int countCouponNum(@Param("userId") Integer userId);
/**
* 新增数据
*
* @param tbActivateInRecord 实例对象
* @return 影响行数
*/
int insert(TbActivateInRecord tbActivateInRecord);
/**
* 批量新增数据MyBatis原生foreach方法
*
* @param entities List<TbActivateInRecord> 实例对象列表
* @return 影响行数
*/
int insertBatch(@Param("entities") List<TbActivateInRecord> 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);
}

View File

@@ -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<TbActivate> queryAll(TbActivate tbActivate, @Param("pageable") Pageable pageable);
TbActivate selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(TbActivate record);
int updateByPrimaryKey(TbActivate record);
List<TbActivate> selectByShopId(String shopId);
TbActivate selectByAmount(@Param("shopId") String shopId,@Param("amount") BigDecimal amount);
List<TbActivate> selectByShpopId(String shopId);
/**
* 新增数据
*
* @param tbActivate 实例对象
* @return 影响行数
*/
int insert(TbActivate tbActivate);
/**
* 批量新增数据MyBatis原生foreach方法
*
* @param entities List<TbActivate> 实例对象列表
* @return 影响行数
*/
int insertBatch(@Param("entities") List<TbActivate> entities);
/**
* 修改数据
*
* @param tbActivate 实例对象
* @return 影响行数
*/
int update(TbActivate tbActivate);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 影响行数
*/
int deleteById(Integer id);
}

View File

@@ -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<TbActivateOutRecord> queryAll(TbActivateOutRecord tbActivateOutRecord, @Param("pageable") Pageable pageable);
List<TbUserCouponVo> queryByVipIdAndShopId(@Param("vipUserIds") List<Integer> vipUserIds, @Param("shopId") Integer shopId);
/**
* 新增数据
*
* @param tbActivateOutRecord 实例对象
* @return 影响行数
*/
int insert(TbActivateOutRecord tbActivateOutRecord);
/**
* 批量新增数据MyBatis原生foreach方法
*
* @param entities List<TbActivateOutRecord> 实例对象列表
* @return 影响行数
*/
int insertBatch(@Param("entities") List<TbActivateOutRecord> 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);
}

View File

@@ -56,5 +56,6 @@ public interface TbCashierCartMapper {
List<TbCashierCart> 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);
}
}

View File

@@ -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<TbCouponProduct> queryAll(TbCouponProduct tbCouponProduct, @Param("pageable") Pageable pageable);
List<TbCouponProduct> queryAllByCouponId(Integer couponId);
List<String> queryProsByActivateId(@Param("couponId")Integer couponId,@Param("num")Integer num);
/**
* 新增数据
*
* @param tbCouponProduct 实例对象
* @return 影响行数
*/
int insert(TbCouponProduct tbCouponProduct);
/**
* 批量新增数据MyBatis原生foreach方法
*
* @param entities List<TbCouponProduct> 实例对象列表
* @return 影响行数
*/
int insertBatch(@Param("entities") List<TbCouponProduct> entities);
/**
* 修改数据
*
* @param tbCouponProduct 实例对象
* @return 影响行数
*/
int update(TbCouponProduct tbCouponProduct);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 影响行数
*/
int deleteById(Integer id);
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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<TbIntegral> selectAllByUserId(String userId);
}

View File

@@ -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);
}

View File

@@ -11,6 +11,10 @@ import java.util.List;
@Component
@Mapper
public interface TbOrderInfoMapper {
/**
* 逻辑删除
*/
int deleteByPrimaryKey(Integer id);
int insert(TbOrderInfo record);

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -26,7 +26,7 @@ public interface TbProductMapper {
List<TbProduct> selectByIds(@Param("list") List<String> 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<String> list);
List<ShopGroupInfoVo> selGroups(@Param("proName") String proName,@Param("type") String type,

View File

@@ -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);
}

View File

@@ -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<TbReleaseFlow> selectByUserId(@Param("userId") String userId);
List<TbReleaseFlow> selectAll();
}

View File

@@ -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);
}

View File

@@ -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<TbShopAd> shopAdList(Integer shopId);
}

View File

@@ -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);
}

View File

@@ -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<TbShopCoupon> queryAll(TbShopCoupon tbShopCoupon, @Param("pageable") Pageable pageable);
/**
* 新增数据
*
* @param tbShopCoupon 实例对象
* @return 影响行数
*/
int insert(TbShopCoupon tbShopCoupon);
/**
* 批量新增数据MyBatis原生foreach方法
*
* @param entities List<TbShopCoupon> 实例对象列表
* @return 影响行数
*/
int insertBatch(@Param("entities") List<TbShopCoupon> entities);
/**
* 修改数据
*
* @param tbShopCoupon 实例对象
* @return 影响行数
*/
int update(TbShopCoupon tbShopCoupon);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 影响行数
*/
int deleteById(Integer id);
}

View File

@@ -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);
}

View File

@@ -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<TbShopExtend> queryAll(TbShopExtend tbShopExtend);
}

View File

@@ -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<SubShopVo> 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<TbShopInfo> selectByIds(@Param("list") List<String> ids);
int updateByPrimaryKeySelective(TbShopInfo record);
int updateByPrimaryKeyWithBLOBs(TbShopInfo record);
int updateByPrimaryKey(TbShopInfo record);
TbShopInfo selectByQrCode(String qrcode);
TbShopInfo selectByPhone(String phone);

View File

@@ -30,10 +30,10 @@ public interface TbShopSongMapper {
List<TbShopSong> 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);
}

View File

@@ -48,7 +48,7 @@ public interface TbShopSongOrderMapper {
" AND a.id=#{id}")
Map<String, Object> 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" +

View File

@@ -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<TbShopUser> selectAllByUserId(@Param("userId") String userId);
List<TbShopUser> selectVipByUserId(@Param("userId") Integer userId);
BigDecimal countAmount(@Param("userId") Integer userId);
List<ShopUserListVo> selectByUserId(@Param("userId") String userId, @Param("shopId") String shopId);
TbShopUser selectByOpenId(@Param("openId") String openId);
TbParams selectParams();
}

View File

@@ -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);
}

View File

@@ -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<TbSystemCoupons> selectAll(@Param("type") String type);
int selectByAmount(@Param("orderNum") BigDecimal orderNum);
}

View File

@@ -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<TbUserCoupons> 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);
}

View File

@@ -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<TbWiningParams> selectAll();
}

View File

@@ -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<TbWiningUser> selectAllByTrade(@Param("day") String day);
}

View File

@@ -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<TbYhqParams> selectAll();
}

View File

@@ -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);
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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<String> 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;
}
}
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<String> getGives() {
return gives;
}
public void setGives(List<String> gives) {
this.gives = gives;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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();
}
}

View File

@@ -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();
}
}

View File

@@ -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 "";
}
}
}
}

View File

@@ -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;
}
}

View File

@@ -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();
}
}

View File

@@ -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;
}
}

View File

@@ -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();
}
}

View File

@@ -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();
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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<TbOrderDetail> 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;
}
}
public String getEatModel() {
return TableConstant.OrderInfo.UseType.TAKEOUT.equalsVals(this.getUseType()) ? TableConstant.ShopInfo.EatModel.TAKEOUT.getValue() : TableConstant.ShopInfo.EatModel.DINE_IN.getValue();
}
}

View File

@@ -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;
}

View File

@@ -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();
}
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}

View File

@@ -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;
}
}

View File

@@ -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;
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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();
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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();
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}

Some files were not shown because too many files have changed in this diff Show More