Compare commits

..

No commits in common. "dev-3.0.0" and "master" have entirely different histories.

321 changed files with 10032 additions and 18582 deletions

93
pom.xml
View File

@ -14,7 +14,6 @@
<version>1.0.0</version> <version>1.0.0</version>
<properties> <properties>
<skipTests>true</skipTests>
<maven.compiler.source>8</maven.compiler.source> <maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target> <maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -22,10 +21,6 @@
<dependencies> <dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
@ -53,11 +48,11 @@
<artifactId>hutool-all</artifactId> <artifactId>hutool-all</artifactId>
<version>4.5.18</version> <version>4.5.18</version>
</dependency> </dependency>
<!-- <dependency>--> <!-- <dependency>-->
<!-- <groupId>com.alibaba</groupId>--> <!-- <groupId>com.alibaba</groupId>-->
<!-- <artifactId>fastjson</artifactId>--> <!-- <artifactId>fastjson</artifactId>-->
<!-- <version>1.2.9</version>--> <!-- <version>1.2.9</version>-->
<!-- </dependency>--> <!-- </dependency>-->
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
@ -190,60 +185,30 @@
<version>2.2.0</version> <version>2.2.0</version>
</dependency> </dependency>
<dependency>
<groupId>p6spy</groupId>
<artifactId>p6spy</artifactId>
<version>3.8.2</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>
<!-- alipay -->
<dependency>
<groupId>com.alipay.sdk</groupId>
<artifactId>alipay-sdk-java</artifactId>
<version>4.39.208.ALL</version>
</dependency>
</dependencies> </dependencies>
<!-- <profiles>--> <!-- <profiles>-->
<!-- <profile>--> <!-- <profile>-->
<!-- <id>dev</id>--> <!-- <id>dev</id>-->
<!-- <properties>--> <!-- <properties>-->
<!-- <env>dev</env>--> <!-- <env>dev</env>-->
<!-- </properties>--> <!-- </properties>-->
<!-- <activation>--> <!-- <activation>-->
<!-- <activeByDefault>true</activeByDefault>--> <!-- <activeByDefault>true</activeByDefault>-->
<!-- </activation>--> <!-- </activation>-->
<!-- </profile>--> <!-- </profile>-->
<!-- <profile>--> <!-- <profile>-->
<!-- <id>test</id>--> <!-- <id>test</id>-->
<!-- <properties>--> <!-- <properties>-->
<!-- <env>test</env>--> <!-- <env>test</env>-->
<!-- </properties>--> <!-- </properties>-->
<!-- </profile>--> <!-- </profile>-->
<!-- <profile>--> <!-- <profile>-->
<!-- <id>pro</id>--> <!-- <id>pro</id>-->
<!-- <properties>--> <!-- <properties>-->
<!-- <env>pro</env>--> <!-- <env>pro</env>-->
<!-- </properties>--> <!-- </properties>-->
<!-- </profile>--> <!-- </profile>-->
<!-- </profiles>--> <!-- </profiles>-->
<build> <build>
<plugins> <plugins>
@ -301,4 +266,4 @@
</plugins> </plugins>
</build> </build>
</project> </project>

View File

@ -1,27 +1,31 @@
package com.chaozhanggui.system.cashierservice; package com.chaozhanggui.system.cashierservice;
import com.chaozhanggui.system.cashierservice.task.ConsInfoTask;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext; import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.ApplicationContext;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
@SpringBootApplication @SpringBootApplication
@EnableScheduling @EnableScheduling
@EnableAsync @EntityScan(basePackageClasses = {Shell.class})
//@EntityScan(basePackageClasses = {Shell.class}) @MapperScan(basePackageClasses ={Shell.class} )
//@EnableAspectJAutoProxy(proxyTargetClass = true) @ComponentScan(basePackageClasses ={Shell.class})
@EnableAspectJAutoProxy(proxyTargetClass = true)
@Slf4j @Slf4j
@MapperScan({"com.chaozhanggui.system.cashierservice.mybatis", "com.chaozhanggui.system.cashierservice.mapper", "com.chaozhanggui.system.cashierservice.dao"})
public class Shell { public class Shell {
private static Logger logger = LoggerFactory.getLogger(Shell.class); private static Logger logger = LoggerFactory.getLogger(Shell.class);
@ -41,6 +45,7 @@ public class Shell {
@Bean @Bean
public CommandLineRunner commandLineRunner(ApplicationContext ctx) { public CommandLineRunner commandLineRunner(ApplicationContext ctx) {
return (args) -> { return (args) -> {
// ctx.getBean(ConsInfoTask.class).init();
logger.info("=========================启动完成=========================="); logger.info("=========================启动完成==========================");
}; };
} }

View File

@ -1,15 +0,0 @@
package com.chaozhanggui.system.cashierservice.bean;
import lombok.Getter;
@Getter
public enum OrderPlatformTypeEnum {
PC("pc"),
CASH("cash"),
MINI_APP("miniapp");
private final String value;
OrderPlatformTypeEnum(String value) {
this.value = value;
}
}

View File

@ -1,16 +0,0 @@
package com.chaozhanggui.system.cashierservice.bean;
import lombok.Getter;
@Getter
public enum OrderSendTypeEnums {
TABLE("table"),
TAKEAWAY("takeaway"),
TAKE_SELF("takeself"),
POST("post");
private final String value;
OrderSendTypeEnums(String value) {
this.value = value;
}
}

View File

@ -1,15 +0,0 @@
package com.chaozhanggui.system.cashierservice.bean;
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

@ -1,6 +0,0 @@
package com.chaozhanggui.system.cashierservice.bean;
public class PrintProductInfo {
private Integer orderDetailId;
private Integer num;
}

View File

@ -1,16 +0,0 @@
package com.chaozhanggui.system.cashierservice.bean;
import lombok.EqualsAndHashCode;
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

@ -1,17 +0,0 @@
package com.chaozhanggui.system.cashierservice.bean;
import lombok.Getter;
@Getter
public enum ShopInfoRegisterlEnum {
// 快餐版
MUNCHIES("munchies"),
// 餐饮版
RESTAURANT("restaurant");
private final String value;
ShopInfoRegisterlEnum(String value) {
this.value = value;
}
}

View File

@ -1,17 +0,0 @@
package com.chaozhanggui.system.cashierservice.bean;
public enum ShopWxMsgTypeEnum {
ALL_MSG(-1),
STOCK_MSG(0),
CONSUMABLES_MSG(1),
OPERATION_MSG(2);
private final Integer type;
ShopWxMsgTypeEnum(Integer type) {
this.type = type;
}
public Integer getType() {
return type;
}
}

View File

@ -1,15 +0,0 @@
package com.chaozhanggui.system.cashierservice.bean;
public enum TableStateEnum {
IDLE("idle"),
CLOSED("closed"), PAYING("paying"), PENDING("pending"), USING("using"), CLEANING("cleaning");
private String state = "closed";
TableStateEnum(String state) {
this.state = state;
}
public String getState() {
return state;
}
}

View File

@ -1,197 +0,0 @@
package com.chaozhanggui.system.cashierservice.bean.constant;
import lombok.Getter;
import java.util.Objects;
public interface TableConstant {
String CART_SEAT_ID = "-999";
@Getter
enum Status {
REFUNDING("refunding"), REFUND("refund"), CLOSED("closed"), CREATE("create"),
UNPAID("unpaid"), PAYING("paying"), RETURN("return"), CANCELLED("cancelled");
private final String value;
Status(String value) {
this.value = value;
}
public boolean equalsVals(String value) {
return this.value.equals(value);
}
}
class Product {
@Getter
public enum Type {
NORMAL("normal"), PACKAGE("package");
private final String value;
Type(String value) {
this.value = value;
}
public boolean equalsVals(String value) {
return this.value.equals(value);
}
}
}
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 ThirdPartyCoupon {
@Getter
public enum Plat {
MEI_TUAN("meituan");
private final String value;
Plat(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;
}
public boolean equalsVals(String value) {
return this.value.equals(value);
}
}
@Getter
public enum UseType {
TAKEOUT("takeout"),
DINE_IN_AFTER("dine-in-after"),
DINE_IN_BEFORE("dine-in-before"), NONE_TABLE("dine-in");
private final String value;
UseType(String value) {
this.value = value;
}
public boolean equalsVals(String value) {
return this.value.equals(value);
}
}
}
class CashierCart {
public static final String ID = "-999";
@Getter
public enum Status {
REFUNDING("refunding"), REFUND("refund"), CLOSED("closed"), CREATE("create"),
UNPAID("unpaid"), PAYING("paying"), RETURN("return"), CANCEL("cancel");
private final String value;
Status(String value) {
this.value = value;
}
public boolean equalsVals(String value) {
return this.value.equals(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,30 +0,0 @@
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

@ -23,8 +23,6 @@ public class LoginContoller {
@Autowired @Autowired
LoginService loginService; LoginService loginService;
@RequestMapping(value = "login",method = RequestMethod.POST) @RequestMapping(value = "login",method = RequestMethod.POST)
public Result login(@RequestBody LoginReq loginReq, HttpServletRequest request){ public Result login(@RequestBody LoginReq loginReq, HttpServletRequest request){
try { try {
@ -36,11 +34,6 @@ public class LoginContoller {
return Result.fail(CodeEnum.FAIL); return Result.fail(CodeEnum.FAIL);
} }
@RequestMapping(value = "findVersion",method = RequestMethod.POST)
public Result findVersion() {
return loginService.findVersion();
}
@RequestMapping("logout") @RequestMapping("logout")
public Result logout( @RequestHeader("token") String token, public Result logout( @RequestHeader("token") String token,
@ -58,13 +51,4 @@ public class LoginContoller {
@RequestHeader("clientType") String clientType){ @RequestHeader("clientType") String clientType){
return loginService.getShopInfo(token); return loginService.getShopInfo(token);
} }
@RequestMapping(value = "getStaffDiscount")
public Result getStaffDiscount(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType){
return loginService.getStaffDiscount(token);
}
} }

View File

@ -1,12 +1,12 @@
package com.chaozhanggui.system.cashierservice.controller; package com.chaozhanggui.system.cashierservice.controller;
import com.chaozhanggui.system.cashierservice.service.MemberService; import com.chaozhanggui.system.cashierservice.service.MemberService;
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
import com.chaozhanggui.system.cashierservice.sign.Result; import com.chaozhanggui.system.cashierservice.sign.Result;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.Map; import java.util.Map;
@CrossOrigin(origins = "*") @CrossOrigin(origins = "*")
@ -26,11 +26,10 @@ public class MemberController {
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestParam("shopId") String shopId, @RequestParam("shopId") String shopId,
@RequestParam("phone") String phone, @RequestParam("phone") String phone,
@RequestParam(value = "isFlag",required = false,defaultValue = "0") String isFlag,
@RequestParam("page") int page, @RequestParam("page") int page,
@RequestParam("pageSize") int pageSize @RequestParam("pageSize") int pageSize
) { ){
return memberService.queryMember(shopId, phone, isFlag,page, pageSize); return memberService.queryMember(shopId,phone,page,pageSize);
} }
@ -38,47 +37,43 @@ public class MemberController {
public Result createMember(@RequestHeader("token") String token, public Result createMember(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestBody Map<String, Object> map @RequestBody Map<String,Object> map
) { ){
return memberService.createMember(map); return memberService.createMember(map);
} }
@RequestMapping("memberScanPay") @RequestMapping("memberScanPay")
public Result memberScanPay( public Result memberScanPay(
@RequestHeader("token") String token, @RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestBody Map<String, Object> map @RequestBody Map<String,Object> map
) { ){
return memberService.memberScanPay(map, token); return memberService.memberScanPay(map,token);
} }
@GetMapping("queryScanPay") @GetMapping("queryScanPay")
public Result queryScanPay(@RequestHeader("token") String token, public Result queryScanPay(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestParam("flowId") String flowId @RequestParam("flowId") String flowId
) { ){
return memberService.queryScanPay(flowId, token); return memberService.queryScanPay(flowId,token);
} }
@RequestMapping("accountPay") @RequestMapping("accountPay")
public Result accountPay(@RequestHeader("token") String token, public Result accountPay( @RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestBody Map<String, Object> map @RequestBody Map<String,Object> map
) { ){
try { return memberService.memberAccountPay(map,token);
return memberService.memberAccountPay(map, token);
} catch (Exception e) {
log.error("》》》》》》》》》》账户支付异常:",e);
e.printStackTrace();
}
return Result.fail(CodeEnum.SYS_EXCEPTION);
} }
@ -86,24 +81,11 @@ public class MemberController {
public Result queryMemberAccount(@RequestHeader("token") String token, public Result queryMemberAccount(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestParam("memberId") String memberId, @RequestParam("memberId") String memberId,
@RequestParam("page") int page, @RequestParam("page") int page,
@RequestParam("pageSize") int pageSize @RequestParam("pageSize") int pageSize
) { ){
return memberService.queryMemberAccount(memberId, page, pageSize); return memberService.queryMemberAccount(memberId,page,pageSize);
}
@RequestMapping("returnFlow")
public Result returnFlow(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType,
@RequestParam("flowId") String flowId,
@RequestParam("remark") String remark,
@RequestParam("amount") String amount,
@RequestParam("pwd") String pwd
){
return memberService.returnAccount(token, flowId,remark,amount, pwd);
} }
} }

View File

@ -1,20 +1,14 @@
package com.chaozhanggui.system.cashierservice.controller; package com.chaozhanggui.system.cashierservice.controller;
import cn.hutool.core.date.DateUtil;
import cn.hutool.extra.servlet.ServletUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.chaozhanggui.system.cashierservice.entity.TbOrderInfo;
import com.chaozhanggui.system.cashierservice.service.OrderService;
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
import com.chaozhanggui.system.cashierservice.sign.Result;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
@CrossOrigin(origins = "*") @CrossOrigin(origins = "*")
@RestController @RestController
@ -23,51 +17,11 @@ import java.util.HashMap;
public class NotifyController { public class NotifyController {
@Resource
private OrderService orderService;
@RequestMapping("notifyPay") @RequestMapping("notifyPay")
public Result notifyPay(HttpServletRequest request) { public String notifyPay(@RequestBody Map<String,Object> map){
String body = ServletUtil.getBody(request); log.info("notifyPay:{}", JSON.toJSONString(map));
log.info("notifyPay body:{}", body); return null;
JSONObject resp = JSON.parseObject(body);
String code = resp.getString("code");
String msg = resp.getString("msg");
if (!"000000".equals(code)) {
log.error("支付失败:{}", resp.getString("msg"));
return Result.fail(msg);
}
JSONObject bizData = JSON.parseObject(resp.getString("bizData"));
String state = bizData.getString("state");
String note = bizData.getString("note");
String payOrderId = bizData.getString("payOrderId");
String payType = bizData.getString("payType");
String payTime = bizData.getString("payTime");
long amount = bizData.getLongValue("amount");
long paidTime = DateUtil.parseDateTime(payTime).getTime();
if (!"TRADE_SUCCESS".equals(state)) {
log.error("支付失败:{},{}", state, note);
return Result.fail(state + ":" + note);
}
TbOrderInfo entity = orderService.selectByPayOrderNo(payOrderId);
if (entity == null) {
log.error("订单不存在:{}", payOrderId);
return Result.fail("订单不存在");
}
entity.setPaidTime(paidTime);
orderService.payCallbackCloseOrder(entity, payType, amount);
return Result.success(CodeEnum.SUCCESS);
}
/**
* 支付取消
*
* @return 影响数量
*/
@PostMapping("cancel")
public Result notifyCancel(@RequestBody HashMap<String, Integer> data) {
return Result.success(CodeEnum.SUCCESS, orderService.cancelOrder(data.get("orderId")));
} }
} }

View File

@ -1,22 +1,18 @@
package com.chaozhanggui.system.cashierservice.controller; package com.chaozhanggui.system.cashierservice.controller;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.chaozhanggui.system.cashierservice.entity.OrderVo; import com.chaozhanggui.system.cashierservice.entity.OrderVo;
import com.chaozhanggui.system.cashierservice.entity.dto.*;
import com.chaozhanggui.system.cashierservice.entity.vo.CartVo; import com.chaozhanggui.system.cashierservice.entity.vo.CartVo;
import com.chaozhanggui.system.cashierservice.service.OrderService; import com.chaozhanggui.system.cashierservice.service.OrderService;
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
import com.chaozhanggui.system.cashierservice.sign.Result; import com.chaozhanggui.system.cashierservice.sign.Result;
import com.chaozhanggui.system.cashierservice.util.TokenUtil; import com.chaozhanggui.system.cashierservice.util.TokenUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.validation.Valid; import java.sql.Timestamp;
import java.util.Date;
@CrossOrigin(origins = "*") @CrossOrigin(origins = "*")
@RestController @RestController
@ -28,228 +24,141 @@ public class OrderController {
@Autowired @Autowired
private OrderService orderService; private OrderService orderService;
@PutMapping("/updateVip")
public ResponseEntity<Object> updateVip(@Validated @RequestBody UpdateVipDTO updateVipDTO) {
return ResponseEntity.ok(orderService.updateVip(updateVipDTO));
}
@PostMapping("/createCart") @PostMapping("/createCart")
public Result createCart(@RequestHeader("token") String token, public Result createCart(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@Validated @RequestBody CartVo cartVo) { @RequestBody CartVo cartVo
JSONObject jsonObject = TokenUtil.parseParamFromToken(token); ){
JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
String userId = jsonObject.getString("accountId"); String userId = jsonObject.getString("accountId");
return orderService.createCart(cartVo.getMasterId(), cartVo.getProductId(), cartVo.getShopId(), cartVo.getSkuId(), return orderService.createCart(cartVo.getMasterId(),cartVo.getProductId(),cartVo.getShopId(),
cartVo.getNumber(), userId, clientType, cartVo.getCartId(), cartVo.getIsGift(), cartVo.getSkuId(),cartVo.getNumber(),userId,clientType,cartVo.getCartId(),cartVo.getIsGift(),
cartVo.getIsPack(), cartVo.getUuid(), cartVo.getType(), cartVo.getTableId(), cartVo.getIsPrint(), cartVo.getGroupProductIdList()); cartVo.getIsPack(),cartVo.getUuid(),cartVo.getType());
} }
@PutMapping("/print")
public Result print(@RequestBody CartPrintDTO printDTO) {
return orderService.updatePrint(printDTO);
}
@PostMapping("/temporaryDishes")
public Result addTemporaryDishes(@Valid @RequestBody AddTemporaryDishesDTO temporaryDishesDTO) {
return Result.success(CodeEnum.SUCCESS, orderService.addTemporaryDishes(temporaryDishesDTO));
}
/**
* 美团核销
*/
@PostMapping("checkCoupon")
public Result checkCoupon(@Validated @RequestBody ThirdCouponCheckDTO checkDTO) {
return Result.success(CodeEnum.SUCCESS, orderService.checkCoupon(checkDTO));
}
@PutMapping("/updatePrice")
public Result updatePrice(@Valid @RequestBody UpdatePriceDTO updatePriceDTO) {
return Result.success(CodeEnum.SUCCESS, orderService.updatePrice(updatePriceDTO));
}
@GetMapping("/queryCart") @GetMapping("/queryCart")
public Result queryCart(@RequestHeader("token") String token, public Result queryCart(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestParam(value = "masterId", required = false) String masterId, @RequestParam("masterId") String masterId,
@RequestParam(required = false) String tableId, @RequestParam("shopId") String shopId
@RequestParam("shopId") String shopId) { ){
if (tableId == null && StrUtil.isBlank(masterId)) { return orderService.queryCart(masterId,shopId);
return Result.fail("masterId和tableId不能同时为空");
}
return orderService.queryCart(masterId, shopId, tableId);
} }
@GetMapping("/delCart") @GetMapping("/delCart")
public Result delCart(@RequestHeader("token") String token, public Result delCart(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestParam(required = false) String tableId, @RequestParam("masterId") String masterId,
@RequestParam(value = "masterId", required = false) String masterId, @RequestParam("cartId") Integer cartId
@RequestParam("cartId") Integer cartId) { ){
return orderService.delCart(masterId, cartId); return orderService.delCart(masterId,cartId);
} }
@GetMapping("/createCode") @GetMapping("/createCode")
public Result createCode(@RequestHeader("token") String token, public Result createCode(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestParam("shopId") String shopId, @RequestParam("shopId") String shopId,
@RequestParam(required = false) String tableId, String type) { String type
JSONObject jsonObject = TokenUtil.parseParamFromToken(token); ){
JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
String userId = jsonObject.getString("accountId"); String userId = jsonObject.getString("accountId");
return orderService.createCode(shopId, clientType, userId, type, tableId); return orderService.createCode(shopId,clientType,userId,type);
} }
@GetMapping("/getCartList") @GetMapping("/getCartList")
public Result getCart(@RequestHeader("token") String token, public Result getCart(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName,
@RequestHeader("loginName") String loginName, @RequestHeader("clientType") String clientType, @RequestParam("shopId") Integer shopId){
@RequestHeader("clientType") String clientType,
@RequestParam("shopId") Integer shopId) {
return orderService.getCartList(shopId); return orderService.getCartList(shopId);
} }
@GetMapping("/getCartPrductSpec") @GetMapping("/getCartPrductSpec")
public Result getCartPrductSpec(@RequestHeader("token") String token, public Result getCartPrductSpec(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName,
@RequestHeader("loginName") String loginName, @RequestHeader("clientType") String clientType, @RequestParam("cartId") Integer cartId){
@RequestHeader("clientType") String clientType,
@RequestParam("cartId") Integer cartId) {
return orderService.getCartPrductSpec(cartId); return orderService.getCartPrductSpec(cartId);
} }
@PostMapping("/cartStatus") @PostMapping("/cartStatus")
public Result cartStatus(@RequestHeader("token") String token, public Result cartStatus(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName,
@RequestHeader("loginName") String loginName, @RequestHeader("clientType") String clientType, @RequestBody CartVo cartVo){
@RequestHeader("clientType") String clientType,
@RequestBody CartVo cartVo) {
JSONObject jsonObject = TokenUtil.parseParamFromToken(token); JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
String userId = jsonObject.getString("accountId"); String userId = jsonObject.getString("accountId");
return orderService.cartStatus(cartVo.getShopId(), cartVo.getMasterId(), cartVo.getStatus(), userId, cartVo.getUuid(), clientType, cartVo.getTableId(), token, cartVo.getOrderId()); String code = jsonObject.getString("code");
return orderService.cartStatus(Integer.valueOf(cartVo.getShopId()),cartVo.getMasterId(),cartVo.getStatus(),userId,cartVo.getUuid(),clientType);
} }
@PostMapping("/createOrder") @PostMapping("/createOrder")
public Result createOrder(@RequestHeader("token") String token, public Result createOrder(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName,
@RequestHeader("loginName") String loginName, @RequestHeader("clientType") String clientType, @RequestBody OrderVo orderVo){
@RequestHeader("clientType") String clientType, JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
@RequestBody OrderVo orderVo) {
JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
String userId = jsonObject.getString("accountId");
orderVo.setMerchantId(Integer.valueOf(userId));
return orderService.createOrder(orderVo, clientType, token, null);
}
@PostMapping("/createBackOrder")
public Result createBackOrder(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType,
@RequestBody OrderVo orderVo) {
JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
String userId = jsonObject.getString("accountId"); String userId = jsonObject.getString("accountId");
orderVo.setMerchantId(Integer.valueOf(userId)); orderVo.setMerchantId(Integer.valueOf(userId));
orderVo.setUserId(jsonObject.getString("staffId")); orderVo.setUserId(jsonObject.getString("staffId"));
return orderService.createBackOrder(orderVo, clientType, token); return orderService.createOrder(orderVo,clientType,token);
}
@PostMapping("/createBackOrder")
public Result createBackOrder(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestBody OrderVo orderVo){
JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
String userId = jsonObject.getString("accountId");
orderVo.setMerchantId(Integer.valueOf(userId));
orderVo.setUserId(jsonObject.getString("staffId"));
return orderService.createBackOrder(orderVo,clientType,token);
} }
@PostMapping("/packall") @PostMapping("/packall")
public Result packall(@RequestHeader("token") String token, public Result packall(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName,
@RequestHeader("loginName") String loginName, @RequestHeader("clientType") String clientType, @RequestBody CartVo cartVo){
@RequestHeader("clientType") String clientType, JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
@RequestBody CartVo cartVo) {
JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
String userId = jsonObject.getString("accountId"); String userId = jsonObject.getString("accountId");
return orderService.packall(cartVo); return orderService.packall(cartVo);
} }
@PostMapping("/clearCart") @PostMapping("/clearCart")
public Result clearCart(@RequestHeader("token") String token, public Result clearCart(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName,
@RequestHeader("loginName") String loginName, @RequestHeader("clientType") String clientType, @RequestBody CartVo cartVo){
@RequestHeader("clientType") String clientType,
@RequestBody CartVo cartVo) {
return orderService.clearCart(cartVo); return orderService.clearCart(cartVo);
} }
@GetMapping("/findOrder") @GetMapping("/findOrder")
public Result findOrder(@RequestHeader("token") String token, public Result findOrder(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName,
@RequestHeader("loginName") String loginName, @RequestHeader("clientType") String clientType, @RequestParam("shopId") Integer shopId,
@RequestHeader("clientType") String clientType,
@RequestParam("shopId") Integer shopId,
@RequestParam("status") String status, @RequestParam("status") String status,
@RequestParam(value = "orderNo", required = false) String orderNo, @RequestParam(value = "orderNo", required = false) String orderNo,
@RequestParam(value = "startTime", required = false) String startTime, @RequestParam(value = "startTime", required = false) String startTime,
@RequestParam(value = "endTime", required = false) String endTime, @RequestParam(value = "endTime", required = false) String endTime,
@RequestParam(value = "page", required = false, defaultValue = "1") Integer page, @RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
@RequestParam(value = "size", required = false, defaultValue = "1") Integer size) { @RequestParam(value = "size", required = false, defaultValue = "1") Integer size){
return orderService.findOrder(shopId, status, page, size, orderNo, DateUtil.parse(startTime), DateUtil.parse(endTime)); return orderService.findOrder(shopId,status,page,size,orderNo, DateUtil.parse(startTime), DateUtil.parse(endTime));
} }
@GetMapping("/orderDetail") @GetMapping("/orderDetail")
public Result orderDetail(@RequestHeader("token") String token, public Result orderDetail(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName,
@RequestHeader("loginName") String loginName, @RequestHeader("clientType") String clientType, @RequestParam("shopId") Integer shopId,
@RequestHeader("clientType") String clientType, @RequestParam("id") Integer id){
@RequestParam("shopId") Integer shopId, return orderService.orderDetail(shopId,id);
@RequestParam("id") Integer id) {
JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
String userId = jsonObject.getString("accountId");
return orderService.orderDetail(shopId, id, clientType, token, userId, jsonObject.getString("staffId"));
} }
@RequestMapping(value = "sendMessage") @RequestMapping(value = "sendMessage")
public Result sendMessage(@RequestHeader("token") String token, public Result sendMessage(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName,
@RequestHeader("loginName") String loginName, @RequestHeader("clientType") String clientType,@RequestParam("orderId") String orderId){
@RequestHeader("clientType") String clientType,
@RequestParam("orderId") String orderId) {
return orderService.sendMassage(orderId); return orderService.sendMassage(orderId);
} }
@GetMapping(value = "scanSendMessage") @GetMapping(value = "scanSendMessage")
public Result scanSendMessage(@RequestHeader("token") String token, public Result scanSendMessage(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName,
@RequestHeader("loginName") String loginName, @RequestHeader("clientType") String clientType,@RequestParam("outNumber") String outNumber,@RequestParam("shopId") String shopId){
@RequestHeader("clientType") String clientType, return orderService.scanSendMessage(outNumber,shopId);
@RequestParam("outNumber") String outNumber,
@RequestParam("shopId") String shopId) {
return orderService.scanSendMessage(outNumber, shopId);
} }
@GetMapping(value = "getsendMessage") @GetMapping(value = "getsendMessage")
public Result getsendMessage(@RequestHeader("token") String token, public Result getsendMessage(@RequestHeader("token") String token, @RequestHeader("loginName") String loginName,
@RequestHeader("loginName") String loginName, @RequestHeader("clientType") String clientType,@RequestParam("shopId") String shopId,@RequestParam("page") int page,
@RequestHeader("clientType") String clientType, @RequestParam("pageSize") int pageSize){
@RequestParam("shopId") String shopId, return orderService.getOutNumber(shopId,page,pageSize);
@RequestParam("page") int page,
@RequestParam("pageSize") int pageSize) {
return orderService.getOutNumber(shopId, page, pageSize);
} }
@GetMapping("getOrderById") @GetMapping("getOrderById")
public Result getOrderById(@RequestParam("orderId") Integer orderId) { public Result getOrderById(@RequestParam("orderId") Integer orderId){
return orderService.getOrder(orderId); return orderService.getOrder(orderId);
}
/**
* 就餐人数选择
*/
@PutMapping("/choseCount")
public Result choseCount(@Validated @RequestBody ChoseCountDTO choseCountDTO) {
if (choseCountDTO.getNum() == null) {
return Result.success(CodeEnum.SUCCESS);
}
return Result.success(CodeEnum.SUCCESS, orderService.choseCount(choseCountDTO));
}
/**
* 退菜
* @param returnCartDTO 退菜信息
* @return 是否成功
*/
@PostMapping("/returnCart")
public Result returnCart(@Validated @RequestBody ReturnCartDTO returnCartDTO) {
return Result.success(CodeEnum.SUCCESS, orderService.returnCart(returnCartDTO));
} }
} }

View File

@ -1,73 +1,51 @@
package com.chaozhanggui.system.cashierservice.controller; 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.alipay.api.AlipayApiException;
import com.alipay.api.AlipayClient;
import com.alipay.api.AlipayConfig;
import com.alipay.api.DefaultAlipayClient;
import com.alipay.api.request.AlipaySystemOauthTokenRequest;
import com.alipay.api.response.AlipaySystemOauthTokenResponse;
import com.chaozhanggui.system.cashierservice.annotation.LimitSubmit; import com.chaozhanggui.system.cashierservice.annotation.LimitSubmit;
import com.chaozhanggui.system.cashierservice.dao.TbOrderInfoMapper;
import com.chaozhanggui.system.cashierservice.dao.TbShopInfoMapper;
import com.chaozhanggui.system.cashierservice.entity.TbOrderDetail; import com.chaozhanggui.system.cashierservice.entity.TbOrderDetail;
import com.chaozhanggui.system.cashierservice.entity.TbOrderInfo;
import com.chaozhanggui.system.cashierservice.entity.TbShopInfo;
import com.chaozhanggui.system.cashierservice.entity.dto.ReturnGroupOrderDto; import com.chaozhanggui.system.cashierservice.entity.dto.ReturnGroupOrderDto;
import com.chaozhanggui.system.cashierservice.entity.dto.ReturnOrderDTO;
import com.chaozhanggui.system.cashierservice.entity.dto.VipPayDTO;
import com.chaozhanggui.system.cashierservice.model.PaymentReq;
import com.chaozhanggui.system.cashierservice.service.PayService; import com.chaozhanggui.system.cashierservice.service.PayService;
import com.chaozhanggui.system.cashierservice.service.ShopInfoService;
import com.chaozhanggui.system.cashierservice.sign.CodeEnum; import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
import com.chaozhanggui.system.cashierservice.sign.Result; import com.chaozhanggui.system.cashierservice.sign.Result;
import com.chaozhanggui.system.cashierservice.util.IpUtil; import com.chaozhanggui.system.cashierservice.util.IpUtil;
import com.chaozhanggui.system.cashierservice.util.JSONUtil;
import com.chaozhanggui.system.cashierservice.util.WechatUtil;
import com.fasterxml.jackson.core.JsonProcessingException;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal; import java.util.List;
import java.time.LocalDate;
import java.util.*;
@CrossOrigin(origins = "*") @CrossOrigin(origins = "*")
@RestController @RestController
@Slf4j @Slf4j
@RequestMapping("pay") @RequestMapping("pay")
public class PayController { public class PayController {
@Autowired @Autowired
PayService payService; PayService payService;
@Autowired
private ShopInfoService shopInfoService;
@Autowired
private TbShopInfoMapper tbShopInfoMapper;
@Autowired
private TbOrderInfoMapper tbOrderInfoMapper;
@RequestMapping("queryPayType") @RequestMapping("queryPayType")
public Result queryPayType(@RequestHeader("token") String token, public Result queryPayType( @RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestParam("shopId") String shopId) { @RequestParam("shopId") String shopId
){
return payService.queryPayType(shopId); return payService.queryPayType(shopId);
} }
/** /**
* 扫码支付 * 扫码支付
*
* @param request * @param request
* @param token * @param token
* @param loginName * @param loginName
* @param clientType * @param clientType
* @param orderId
* @param authCode
* @return * @return
*/ */
@RequestMapping("scanpay") @RequestMapping("scanpay")
@ -76,55 +54,62 @@ public class PayController {
@RequestHeader("token") String token, @RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestBody PaymentReq paymentReq) { @RequestParam("orderId") String orderId,
return payService.scanPay(paymentReq.getOrderId(), paymentReq.getAuthCode(), IpUtil.getIpAddr(request), token, paymentReq.getPayAmount(), paymentReq.getDiscountAmount()); @RequestParam("authCode") String authCode
) {
return payService.scanPay(orderId,authCode, IpUtil.getIpAddr(request),token);
} }
/** /**
* 储值卡支付 * 储值卡支付
*
* @param token * @param token
* @param loginName * @param loginName
* @param clientType * @param clientType
* @param orderId
* @param memberId
* @return * @return
*/ */
@RequestMapping("accountPay")
@GetMapping("accountPay")
@LimitSubmit(key = "accountPay:%s") @LimitSubmit(key = "accountPay:%s")
public Result accountPay(@RequestHeader("token") String token, public Result accountPay(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestBody PaymentReq paymentReq) { @RequestParam("orderId") String orderId,
return payService.accountPay(paymentReq.getOrderId(), paymentReq.getMemberId(), token, paymentReq.getMemberAccount(), paymentReq.getPayAmount(), paymentReq.getDiscountAmount()); @RequestParam("memberId") String memberId,
@RequestParam("memberAccount") String memberAccount
){
return payService.accountPay(orderId,memberId,token,memberAccount);
} }
/** /**
* 快捷收款 * 快捷收款
*
* @param token * @param token
* @param loginName * @param loginName
* @param clientType * @param clientType
* @param amount * @param amount
* @param authCode * @param authCode
* @param payType cash 现金 scanpay 扫码 * @param payType cash 现金 scanpay 扫码
* @return * @return
*/ */
@GetMapping("quickPay") @GetMapping("quickPay")
@LimitSubmit(key = "quickPay:%s") @LimitSubmit(key = "quickPay:%s")
public Result quickPay(@RequestHeader("token") String token, public Result quickPay(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestParam("amount") String amount, @RequestParam("amount") String amount,
@RequestParam("authCode") String authCode, @RequestParam("authCode") String authCode,
@RequestParam("payType") String payType) { @RequestParam("payType") String payType
return payService.quickPay(token, amount, authCode, payType); ){
return payService.quickPay(token,amount,authCode,payType);
} }
/** /**
* 查询快捷订单状态 * 查询快捷订单状态
*
* @param token * @param token
* @param loginName * @param loginName
* @param clientType * @param clientType
@ -132,16 +117,16 @@ public class PayController {
*/ */
@GetMapping("queryQuickPayStatus") @GetMapping("queryQuickPayStatus")
public Result queryQuickPayStatus(@RequestHeader("token") String token, public Result queryQuickPayStatus(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestParam("orderId") String orderId) { @RequestParam("orderId") String orderId
){
return payService.queryQuickPayStatus(orderId); return payService.queryQuickPayStatus(orderId);
} }
/** /**
* 获取快捷收款信息 * 获取快捷收款信息
*
* @param token * @param token
* @param loginName * @param loginName
* @param clientType * @param clientType
@ -151,92 +136,80 @@ public class PayController {
*/ */
@GetMapping("queryQuickPay") @GetMapping("queryQuickPay")
public Result queryQuickPay(@RequestHeader("token") String token, public Result queryQuickPay(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestParam("page") Integer page, @RequestParam("page") Integer page,
@RequestParam("pageSize") Integer pageSize) { @RequestParam("pageSize") Integer pageSize
return payService.queryQuickPay(token, page, pageSize); ){
return payService.queryQuickPay(token,page,pageSize);
} }
/** /**
* 会员扫码支付 * 会员扫码支付
*
* @param token * @param token
* @param loginName * @param loginName
* @param clientType * @param clientType
* @param orderId
* @param memberCode
* @return * @return
*/ */
@RequestMapping("memberScanPay") @GetMapping("memberScanPay")
@LimitSubmit(key = "memberScanPay:%s") @LimitSubmit(key = "memberScanPay:%s")
public Result memberScanPay(@RequestHeader("token") String token, public Result memberScanPay(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestBody PaymentReq paymentReq) { @RequestParam("orderId") String orderId,
return payService.memberScanPay(paymentReq.getOrderId(), paymentReq.getMemberCode(), token, paymentReq.getPayAmount(), paymentReq.getDiscountAmount()); @RequestParam("memberCode") String memberCode
){
return payService.memberScanPay(orderId,memberCode,token);
} }
/** /**
* 现金支付 * 现金支付
*
* @param token * @param token
* @param loginName * @param loginName
* @param clientType * @param clientType
* @param orderId
* @return * @return
*/ */
@RequestMapping("cashPay") @GetMapping("cashPay")
@LimitSubmit(key = "cashPay:%s") @LimitSubmit(key = "cashPay:%s")
public Result cashPay(@RequestHeader("token") String token, public Result cashPay(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestBody PaymentReq paymentReq) { @RequestParam("orderId") String orderId){
Result result = payService.cashPay(paymentReq.getOrderId(), token, paymentReq.getPayAmount(), paymentReq.getDiscountAmount()); return payService.cashPay(orderId,token);
return result;
} }
/**
* 会员支付
*
* @param token
* @param loginName
* @param clientType
* @return
*/
@PostMapping("vipPay")
@LimitSubmit(key = "vipPay:%s")
public Result vipPay(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType,
@RequestBody VipPayDTO vipPayDTO) {
if (vipPayDTO.getOrderId() == null || vipPayDTO.getVipUserId() == null) {
return Result.fail("参数缺失");
}
if ((vipPayDTO.getPayAmount() != null && vipPayDTO.getPayAmount().compareTo(BigDecimal.ZERO) <= 0) ||
(vipPayDTO.getDiscountAmount() != null && vipPayDTO.getDiscountAmount().compareTo(BigDecimal.ZERO) <= 0)) {
return Result.fail("折扣金额必须大于0");
}
return payService.vipPay(vipPayDTO.getOrderId(), token, vipPayDTO.getVipUserId(), vipPayDTO.getPayAmount(), vipPayDTO.getDiscountAmount());
}
/** /**
* 银行卡支付 * 银行卡支付
*
* @param token * @param token
* @param loginName * @param loginName
* @param clientType * @param clientType
* @param orderId
* @return * @return
*/ */
@RequestMapping("bankPay") @GetMapping("bankPay")
@LimitSubmit(key = "bankPay:%s") @LimitSubmit(key = "bankPay:%s")
public Result bankPay(@RequestHeader("token") String token, public Result bankPay(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestBody PaymentReq paymentReq) { @RequestParam("orderId") String orderId){
return payService.bankPay(paymentReq.getOrderId(), token, paymentReq.getPayAmount(), paymentReq.getDiscountAmount()); return payService.bankPay(orderId,token);
} }
@RequestMapping("returnOrder") @RequestMapping("returnOrder")
@LimitSubmit(key = "returnOrder:%s", limit = 10) @LimitSubmit(key = "returnOrder:%s", limit = 10)
public Result returnOrder(@RequestHeader("token") String token, public Result returnOrder(@RequestHeader("token") String token,
@ -244,21 +217,11 @@ public class PayController {
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestBody List<TbOrderDetail> list, @RequestBody List<TbOrderDetail> list,
@RequestParam("pwd") String pwd, @RequestParam("pwd") String pwd,
@RequestParam(defaultValue = "true") boolean isOnline) { @RequestParam(defaultValue = "true") boolean isOnline
ReturnOrderDTO returnOrderDTO = new ReturnOrderDTO(); ){
returnOrderDTO.setOrderId(list.get(0).getOrderId());
returnOrderDTO.setNote(list.get(0).getRemark());
returnOrderDTO.setPwd(pwd); return payService.returnOrder(list,token,null, isOnline);
ArrayList<ReturnOrderDTO.OrderDetail> orderDetails = new ArrayList<>();
list.forEach(item -> {
ReturnOrderDTO.OrderDetail orderDetail = new ReturnOrderDTO.OrderDetail();
orderDetail.setId(item.getId());
orderDetail.setNum(item.getNum());
orderDetails.add(orderDetail);
});
returnOrderDTO.setOrderDetails(orderDetails);
returnOrderDTO.setIsOnline(isOnline);
return Result.success(CodeEnum.SUCCESS, payService.returnOrder(returnOrderDTO));
} }
@ -266,169 +229,19 @@ public class PayController {
public Result queryOrder(@RequestHeader("token") String token, public Result queryOrder(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@RequestHeader("clientType") String clientType, @RequestHeader("clientType") String clientType,
@RequestParam("orderId") String orderId) { @RequestParam("orderId") String orderId){
return payService.queryOrder(orderId, token); return payService.queryOrder(orderId,token);
} }
@RequestMapping("returnGpOrder") @RequestMapping("returnGpOrder")
public Result returnOrder(@RequestBody ReturnGroupOrderDto param) { public Result returnOrder(@RequestBody ReturnGroupOrderDto param){
return payService.returnGroupOrder(param); return payService.returnGroupOrder(param);
} }
@RequestMapping("getOrderDiscount") @RequestMapping("test")
public Result getOrderDiscount(@RequestHeader("token") String token, @LimitSubmit(key = "testOrder:%s")
@RequestHeader("loginName") String loginName, public Result testOrder( @RequestParam("orderId") String orderId){
@RequestHeader("clientType") String clientType, return Result.success(CodeEnum.SUCCESS);
@RequestParam("orderId") String orderId,
@RequestParam("staffId") String staffId) {
return payService.getOrderDiscount(staffId, orderId, token);
} }
@RequestMapping("pcscanpay")
@LimitSubmit(key = "pcscanpay:%s")
public Result pcscanpay(HttpServletRequest request, @RequestBody PaymentReq paymentReq) {
try {
return payService.pcscanpay(paymentReq.getOrderId(), IpUtil.getIpAddr(request), paymentReq.getUserId(), paymentReq.getPayType());
} catch (Exception e) {
e.printStackTrace();
}
return Result.fail(CodeEnum.FAIL);
}
@RequestMapping("createOrder")
public Result createOrder(HttpServletRequest request, @RequestBody PaymentReq paymentReq) {
try {
return payService.createOrder(IpUtil.getIpAddr(request), paymentReq.getUserId(), paymentReq.getPayType(),
paymentReq.getShopId(), paymentReq.getOrderId(), paymentReq.getPayAmount(), paymentReq.getRemark());
} catch (JsonProcessingException e) {
e.printStackTrace();
}
return Result.fail(CodeEnum.FAIL);
}
@GetMapping("queryOrderPay")
public Result queryOrderPay(String orderId) {
return payService.queryOrderPay(orderId);
}
@GetMapping("/noToken/queryOrderInfo")
public Result noTokenQueryOrderInfo(String orderId) {
if(StrUtil.isBlank(orderId)){
return Result.fail("订单id不能为空");
}
TbOrderInfo orderInfo = tbOrderInfoMapper.selectByPrimaryKey(Integer.valueOf(orderId));
if(orderInfo == null){
return Result.fail("订单不存在");
}
Map<String, Object> data = new HashMap<>(4);
data.put("id", orderInfo.getId());
data.put("orderNo", orderInfo.getOrderNo());
data.put("payAmount", orderInfo.getPayAmount());
data.put("orderAmount", orderInfo.getOrderAmount());
return Result.success(CodeEnum.SUCCESS, data);
}
@Value("${wx.ysk.appId}")
private String appId;
@Value("${wx.ysk.secrete}")
private String secrete;
@Value("${ali.appId}")
private String aliAppId;
@Value("${ali.privateKey}")
private String privateKey;
@Value("${ali.publicKey}")
private String publicKey;
/**
* 获取支付宝或微信openId
*
* @param code
* @return
*/
@GetMapping("/openId")
public Result getOpenId(@RequestParam String code, @RequestParam String payType,
@RequestParam String shopId) throws AlipayApiException {
if (StrUtil.isBlank(shopId)) {
return Result.fail("店铺ID不能为空");
}
// 查询店铺信息
TbShopInfo shopInfo = tbShopInfoMapper.selectByPrimaryKey(Integer.valueOf(shopId));
if (Objects.isNull(shopInfo)) {
return Result.fail("店铺不存在");
}
Map<String, Object> data = new HashMap<>(4);
data.put("shopId", shopInfo.getId());
data.put("shopName", shopInfo.getShopName());
data.put("shopImage", shopInfo.getCoverImg());
if ("WECHAT".equals(payType)) {
JSONObject SessionKeyOpenId = WechatUtil.getSessionKeyOrOpenId(code, appId, secrete);
log.info("SessionKeyOpenId:{}", SessionKeyOpenId.toString());
String openid = SessionKeyOpenId.getString("openid");
if (Objects.isNull(openid)) {
return Result.fail("获取微信id失败");
}
data.put("openId", openid);
return Result.success(CodeEnum.SUCCESS, data);
} else if ("ALIPAY".equals(payType)) {
// 初始化SDK
AlipayClient alipayClient = new DefaultAlipayClient(getAlipayConfig());
// 构造请求参数以调用接口
AlipaySystemOauthTokenRequest request = new AlipaySystemOauthTokenRequest();
// 设置授权码
request.setCode(code);
// 设置授权方式
request.setGrantType("authorization_code");
AlipaySystemOauthTokenResponse response = alipayClient.execute(request);
log.info("AlipaySystemOauthTokenResponse:{}", JSONUtil.toJSONString(response));
response.setAccessToken(response.getRefreshToken());
if (!response.isSuccess()) {
return Result.fail("获取支付宝userId失败");
}
String openid = ObjectUtil.isNull(response.getUserId()) ? response.getOpenId() : response.getUserId();
data.put("openId", openid);
return Result.success(CodeEnum.SUCCESS, data);
}
return Result.fail(CodeEnum.FAIL);
}
private AlipayConfig getAlipayConfig() {
AlipayConfig alipayConfig = new AlipayConfig();
alipayConfig.setServerUrl("https://openapi.alipay.com/gateway.do");
alipayConfig.setAppId(aliAppId);
alipayConfig.setPrivateKey(privateKey);
alipayConfig.setFormat("json");
alipayConfig.setAlipayPublicKey(publicKey);
alipayConfig.setCharset("UTF-8");
alipayConfig.setSignType("RSA2");
return alipayConfig;
}
public static void main(String[] args) {
LocalDate date = LocalDate.now();
if (date.isLeapYear()) {
System.out.println();
}
}
} }

View File

@ -1,20 +1,13 @@
package com.chaozhanggui.system.cashierservice.controller; package com.chaozhanggui.system.cashierservice.controller;
import com.alibaba.fastjson.JSONObject;
import com.chaozhanggui.system.cashierservice.entity.dto.ProductStatusDTO;
import com.chaozhanggui.system.cashierservice.entity.dto.ProductStockDTO;
import com.chaozhanggui.system.cashierservice.entity.dto.QuerySpecDTO;
import com.chaozhanggui.system.cashierservice.service.ProductService; import com.chaozhanggui.system.cashierservice.service.ProductService;
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
import com.chaozhanggui.system.cashierservice.sign.Result; import com.chaozhanggui.system.cashierservice.sign.Result;
import com.chaozhanggui.system.cashierservice.util.TokenUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.Map; import java.util.Map;
@CrossOrigin(origins = "*") @CrossOrigin(origins = "*")
@ -28,26 +21,6 @@ public class ProductController {
private ProductService productService; private ProductService productService;
@PutMapping("/productStatus")
public Result productStatus(
@Valid @RequestBody ProductStatusDTO productStatusDTO
) {
productService.updateState(productStatusDTO);
return Result.success(CodeEnum.SUCCESS);
}
@PutMapping("/productStock")
public Result productStock(
@RequestHeader("token") String token,
@Valid @RequestBody ProductStockDTO productStockDTO
) {
JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
String loginName = jsonObject.getString("loginName");
productService.updateStock(productStockDTO,loginName);
return Result.success(CodeEnum.SUCCESS);
}
@GetMapping(value = "queryCommodityInfo") @GetMapping(value = "queryCommodityInfo")
public Result queryCommodityInfo( public Result queryCommodityInfo(
@RequestHeader("token") String token, @RequestHeader("token") String token,
@ -64,15 +37,6 @@ public class ProductController {
return productService.queryCommodityInfo(shopId,categoryId,commdityName,page,pageSize,masterId); return productService.queryCommodityInfo(shopId,categoryId,commdityName,page,pageSize,masterId);
} }
@GetMapping("querySpec")
public Result querySpec(
@RequestParam Integer shopId,
@RequestParam Integer productId
) {
return Result.success(CodeEnum.SUCCESS, productService.querySpec(shopId, productId));
}
@GetMapping(value = "queryNewCommodityInfo") @GetMapping(value = "queryNewCommodityInfo")
public Result queryNewCommodityInfo( public Result queryNewCommodityInfo(
@RequestHeader("token") String token, @RequestHeader("token") String token,
@ -82,12 +46,11 @@ public class ProductController {
@RequestParam("categoryId") String categoryId, @RequestParam("categoryId") String categoryId,
@RequestParam("commdityName") String commdityName, @RequestParam("commdityName") String commdityName,
@RequestParam("masterId") String masterId, @RequestParam("masterId") String masterId,
@RequestParam(value = "tableId", required = false) String tableId,
@RequestParam("page") int page, @RequestParam("page") int page,
@RequestParam("pageSize") int pageSize @RequestParam("pageSize") int pageSize
){ ){
return productService.queryNewCommodityInfo(shopId,categoryId,commdityName, tableId,page,pageSize,masterId); return productService.queryNewCommodityInfo(shopId,categoryId,commdityName,page,pageSize,masterId);
} }
@GetMapping(value = "queryCategory") @GetMapping(value = "queryCategory")

View File

@ -1,9 +1,7 @@
package com.chaozhanggui.system.cashierservice.controller; package com.chaozhanggui.system.cashierservice.controller;
import com.chaozhanggui.system.cashierservice.entity.dto.ClearTableDTO;
import com.chaozhanggui.system.cashierservice.service.ShopInfoService; import com.chaozhanggui.system.cashierservice.service.ShopInfoService;
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
import com.chaozhanggui.system.cashierservice.sign.Result; import com.chaozhanggui.system.cashierservice.sign.Result;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -19,11 +17,6 @@ public class ShopInfoController {
@Autowired @Autowired
ShopInfoService shopInfoService; ShopInfoService shopInfoService;
@GetMapping("/queryShopInfo")
public Result queryShopInfo(@RequestParam Integer shopId){
return shopInfoService.queryShopInfo(shopId);
}
@GetMapping("queryShopArea") @GetMapping("queryShopArea")
public Result queryShopArea(@RequestHeader("token") String token, public Result queryShopArea(@RequestHeader("token") String token,
@RequestHeader("loginName") String loginName, @RequestHeader("loginName") String loginName,
@ -49,13 +42,6 @@ public class ShopInfoController {
return shopInfoService.queryShopTable(shopId, areaId, status, page, pageSize); return shopInfoService.queryShopTable(shopId, areaId, status, page, pageSize);
} }
@PutMapping("clearTable")
public Result queryShopTable(
@RequestBody ClearTableDTO clearTableDTO
) {
return Result.success(CodeEnum.SUCCESS, shopInfoService.cleatTable(clearTableDTO));
}
@GetMapping("queryDuty") @GetMapping("queryDuty")
public Result queryDuty(@RequestHeader("token") String token, public Result queryDuty(@RequestHeader("token") String token,
@RequestParam("page") int page, @RequestParam("page") int page,
@ -73,9 +59,4 @@ public class ShopInfoController {
) { ) {
return shopInfoService.queryDutyFlow(token, shopId, page,pageSize); return shopInfoService.queryDutyFlow(token, shopId, page,pageSize);
} }
@GetMapping("queryPwdInfo")
public Result queryPwdInfo(@RequestParam("shopId") String shopId) {
return shopInfoService.queryShopPwdInfo(shopId);
}
} }

View File

@ -1,33 +0,0 @@
package com.chaozhanggui.system.cashierservice.controller;
import com.chaozhanggui.system.cashierservice.entity.TbPrintMachineLog;
import com.chaozhanggui.system.cashierservice.service.ShopPrintLogService;
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
import com.chaozhanggui.system.cashierservice.sign.Result;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Map;
/**
* 店铺小票打印记录
* @author tankaikai
* @since 2024-10-09 17:14
*/
@Slf4j
@RestController
@CrossOrigin(origins = "*")
@RequestMapping("shop/print/log")
public class ShopPrintLogController {
@Resource
private ShopPrintLogService shopPrintLogService;
@GetMapping("page")
public Result page(@RequestParam Map<String, Object> params) {
PageInfo<TbPrintMachineLog> page = shopPrintLogService.page(params);
return Result.success(CodeEnum.SUCCESS, page);
}
}

View File

@ -1,71 +0,0 @@
package com.chaozhanggui.system.cashierservice.controller;
import com.chaozhanggui.system.cashierservice.entity.dto.ShopPrinterDTO;
import com.chaozhanggui.system.cashierservice.service.ShopPrinterService;
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
import com.chaozhanggui.system.cashierservice.sign.Result;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
* 店铺打印机配置
*
* @author tankaikai
* @since 2024-09-24 16:56
*/
@Slf4j
@RestController
@CrossOrigin(origins = "*")
@RequestMapping("shop-config/printer")
public class ShopPrinterController {
@Resource
private ShopPrinterService shopPrinterService;
@GetMapping("page")
public Result page(@RequestHeader String token, @RequestParam Map<String, Object> params) {
PageInfo<ShopPrinterDTO> page = shopPrinterService.page(params);
return Result.success(CodeEnum.SUCCESS, page);
}
@GetMapping("list")
public Result list(@RequestParam Map<String, Object> params) {
List<ShopPrinterDTO> list = shopPrinterService.list(params);
return Result.success(CodeEnum.SUCCESS, list);
}
@GetMapping("{id}")
public Result get(@PathVariable("id") Integer id) {
ShopPrinterDTO dto = shopPrinterService.get(id);
return Result.success(CodeEnum.SUCCESS, dto);
}
@PostMapping
public Result save(@RequestBody ShopPrinterDTO dto) {
shopPrinterService.save(dto);
return Result.success(CodeEnum.SUCCESS);
}
@PutMapping
public Result update(@RequestBody ShopPrinterDTO dto) {
shopPrinterService.update(dto);
return Result.success(CodeEnum.SUCCESS);
}
@DeleteMapping("{id}")
public Result delete(@PathVariable("id") Integer id) {
shopPrinterService.delete(id);
return Result.success(CodeEnum.SUCCESS);
}
@PostMapping("update-status")
public Result updateStatus(@RequestBody ShopPrinterDTO dto) {
shopPrinterService.updateStatus(dto.getId(), dto.getStatus());
return Result.success(CodeEnum.SUCCESS);
}
}

View File

@ -1,25 +0,0 @@
package com.chaozhanggui.system.cashierservice.controller;
import com.chaozhanggui.system.cashierservice.service.TbShopUnitService;
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
import com.chaozhanggui.system.cashierservice.sign.Result;
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;
@RestController
@RequestMapping("/unit")
public class ShopUnitController {
private final TbShopUnitService shopUnitService;
public ShopUnitController(TbShopUnitService shopUnitService) {
this.shopUnitService = shopUnitService;
}
@GetMapping
public Result getShopUnit(@RequestParam Integer shopId, @RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "20") Integer size, @RequestParam(required = false) String name) {
return Result.success(CodeEnum.SUCCESS, shopUnitService.getShopUnit(shopId, page, size, name));
}
}

View File

@ -1,25 +0,0 @@
package com.chaozhanggui.system.cashierservice.controller;
import com.chaozhanggui.system.cashierservice.service.TbShopPermissionService;
import com.chaozhanggui.system.cashierservice.service.TbShopStaffPermissionService;
import com.chaozhanggui.system.cashierservice.sign.Result;
import lombok.extern.slf4j.Slf4j;
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.RestController;
@RestController
@Slf4j
@RequestMapping("staffPermission")
public class StaffPermissionController {
@Autowired
private TbShopPermissionService permissionService;
@GetMapping
public Result getStaffPermission(String staffId, String code) {
return permissionService.getStaffPermission(staffId, code);
}
}

View File

@ -1,78 +0,0 @@
package com.chaozhanggui.system.cashierservice.controller;
import com.chaozhanggui.system.cashierservice.entity.dto.thirdcoupon.CheckCouponDTO;
import com.chaozhanggui.system.cashierservice.service.ThirdPartyCouponService;
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
import com.chaozhanggui.system.cashierservice.sign.Result;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 三方团购券
*/
@RestController
@RequestMapping("/thirdPartyCoupon")
public class ThirdPartyCouponController {
private final ThirdPartyCouponService thirdPartyCouponService;
public ThirdPartyCouponController(ThirdPartyCouponService thirdPartyCouponService) {
this.thirdPartyCouponService = thirdPartyCouponService;
}
/**
* 获取绑定状态
* @return 绑定状态
*/
@GetMapping("/state")
public Result getState(@RequestParam Integer shopId) {
return Result.success(CodeEnum.SUCCESS, thirdPartyCouponService.getState(shopId));
}
/**
* 获取美团绑定链接
* @return 美团绑定链接
*/
@GetMapping("bindUrl")
public Result getBindUrl(@RequestParam Integer shopId) {
return Result.success(CodeEnum.SUCCESS, thirdPartyCouponService.getBindUrl(shopId));
}
/**
* 解绑美团商家
* @return 美团解绑链接
*/
@GetMapping("unBindUrl")
public Result getUnBindUrl(@RequestParam Integer shopId) {
return Result.success(CodeEnum.SUCCESS, thirdPartyCouponService.getUnBindUrl(shopId));
}
/**
* 获取门店客核销券
* @return 所有券
*/
@GetMapping("list")
public Result getActivateCoupon(@RequestParam Integer shopId, @RequestParam String code) {
return Result.success(CodeEnum.SUCCESS, thirdPartyCouponService.getActivateCoupon(shopId, code));
}
/**
* 核销券
*/
@PostMapping
public Result checkCoupon(@RequestBody CheckCouponDTO checkCouponDTO) {
return Result.success(CodeEnum.SUCCESS, thirdPartyCouponService.checkCoupon(checkCouponDTO));
}
/**
* 撤销券核销
*/
@DeleteMapping("revoke")
public Result revokeCoupon(@RequestBody CheckCouponDTO checkCouponDTO) {
return Result.success(CodeEnum.SUCCESS, thirdPartyCouponService.revokeCoupon(checkCouponDTO));
}
}

View File

@ -1,40 +0,0 @@
package com.chaozhanggui.system.cashierservice.controller;
import com.chaozhanggui.system.cashierservice.entity.TbVersion;
import com.chaozhanggui.system.cashierservice.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @author yijiegong
*/
@RestController
@RequestMapping("/version")
public class VersionController {
@Autowired
LoginService loginService;
@GetMapping("pcDownload")
public ResponseEntity<Void> pcDownload(HttpServletRequest request, HttpServletResponse response) {
TbVersion pcVersion = loginService.getCurrentPcVersion();
if (pcVersion == null) {
throw new RuntimeException("未找到PC版本信息");
}
// 重定向到下载地址
HttpHeaders headers = new HttpHeaders();
headers.setLocation(java.net.URI.create(pcVersion.getUrl()));
return new ResponseEntity<>(headers, HttpStatus.FOUND);
}
}

View File

@ -0,0 +1,17 @@
package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.CodeColumnConfig;
public interface CodeColumnConfigMapper {
int deleteByPrimaryKey(Long columnId);
int insert(CodeColumnConfig record);
int insertSelective(CodeColumnConfig record);
CodeColumnConfig selectByPrimaryKey(Long columnId);
int updateByPrimaryKeySelective(CodeColumnConfig record);
int updateByPrimaryKey(CodeColumnConfig record);
}

View File

@ -0,0 +1,17 @@
package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.CodeGenConfig;
public interface CodeGenConfigMapper {
int deleteByPrimaryKey(Long configId);
int insert(CodeGenConfig record);
int insertSelective(CodeGenConfig record);
CodeGenConfig selectByPrimaryKey(Long configId);
int updateByPrimaryKeySelective(CodeGenConfig record);
int updateByPrimaryKey(CodeGenConfig record);
}

View File

@ -0,0 +1,17 @@
package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.MntApp;
public interface MntAppMapper {
int deleteByPrimaryKey(Long appId);
int insert(MntApp record);
int insertSelective(MntApp record);
MntApp selectByPrimaryKey(Long appId);
int updateByPrimaryKeySelective(MntApp record);
int updateByPrimaryKey(MntApp record);
}

View File

@ -0,0 +1,17 @@
package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.MntDatabase;
public interface MntDatabaseMapper {
int deleteByPrimaryKey(String dbId);
int insert(MntDatabase record);
int insertSelective(MntDatabase record);
MntDatabase selectByPrimaryKey(String dbId);
int updateByPrimaryKeySelective(MntDatabase record);
int updateByPrimaryKey(MntDatabase record);
}

View File

@ -0,0 +1,17 @@
package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.MntDeployHistory;
public interface MntDeployHistoryMapper {
int deleteByPrimaryKey(String historyId);
int insert(MntDeployHistory record);
int insertSelective(MntDeployHistory record);
MntDeployHistory selectByPrimaryKey(String historyId);
int updateByPrimaryKeySelective(MntDeployHistory record);
int updateByPrimaryKey(MntDeployHistory record);
}

View File

@ -0,0 +1,17 @@
package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.MntDeploy;
public interface MntDeployMapper {
int deleteByPrimaryKey(Long deployId);
int insert(MntDeploy record);
int insertSelective(MntDeploy record);
MntDeploy selectByPrimaryKey(Long deployId);
int updateByPrimaryKeySelective(MntDeploy record);
int updateByPrimaryKey(MntDeploy record);
}

View File

@ -0,0 +1,11 @@
package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.MntDeployServerKey;
public interface MntDeployServerMapper {
int deleteByPrimaryKey(MntDeployServerKey key);
int insert(MntDeployServerKey record);
int insertSelective(MntDeployServerKey record);
}

View File

@ -0,0 +1,17 @@
package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.MntServer;
public interface MntServerMapper {
int deleteByPrimaryKey(Long serverId);
int insert(MntServer record);
int insertSelective(MntServer record);
MntServer selectByPrimaryKey(Long serverId);
int updateByPrimaryKeySelective(MntServer record);
int updateByPrimaryKey(MntServer record);
}

View File

@ -1,19 +0,0 @@
package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.dto.ShopPrinterDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* @author tankaikai
* @since 2024-09-24 17:25
*/
@Mapper
public interface ShopPrinterServiceMapper {
List<ShopPrinterDTO> getList(Map<String, Object> params);
int updateStatus(@Param("id") Integer id, @Param("status") Integer status);
}

View File

@ -7,6 +7,8 @@ import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
@Mapper
@Component
public interface ShopUserDutyDetailMapper { public interface ShopUserDutyDetailMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -24,4 +26,4 @@ public interface ShopUserDutyDetailMapper {
List<ShopUserDutyDetail> selectByDuctId(@Param("id") Integer id, @Param("list") List<Integer> list); List<ShopUserDutyDetail> selectByDuctId(@Param("id") Integer id, @Param("list") List<Integer> list);
List<ShopUserDutyDetail> selectAllByDuctId(@Param("id") Integer id); List<ShopUserDutyDetail> selectAllByDuctId(@Param("id") Integer id);
} }

View File

@ -9,6 +9,8 @@ import org.springframework.stereotype.Component;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
@Component
@Mapper
public interface ShopUserDutyMapper { public interface ShopUserDutyMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -45,4 +47,4 @@ public interface ShopUserDutyMapper {
List<ProductInfo> selectByDutyId(Integer dutyId); List<ProductInfo> selectByDutyId(Integer dutyId);
} }

View File

@ -10,6 +10,8 @@ import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@Component
@Mapper
public interface ShopUserDutyPayMapper { public interface ShopUserDutyPayMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -32,4 +34,4 @@ public interface ShopUserDutyPayMapper {
List<Map<String,Object>> selectCetoryBydutyId(Integer dutyId); List<Map<String,Object>> selectCetoryBydutyId(Integer dutyId);
List<ProductInfoPO> selectProductByDutyId(Integer dutyId); List<ProductInfoPO> selectProductByDutyId(Integer dutyId);
} }

View File

@ -1,74 +0,0 @@
package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.TbActivateInRecord;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.data.domain.Pageable;
import java.util.List;
/**
* 活动商品赠送记录表(TbActivateInRecord)表数据库访问层
*
* @author ww
* @since 2024-10-24 15:55:01
*/
public interface TbActivateInRecordMapper {
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
TbActivateInRecord queryById(Integer id);
/**
* 查询数据
*
* @param tbActivateInRecord 查询条件
* @param pageable 分页对象
* @return 对象列表
*/
List<TbActivateInRecord> queryAll(TbActivateInRecord tbActivateInRecord, @Param("pageable") Pageable pageable);
/**
* 新增数据
*
* @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);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 影响行数
*/
int deleteById(Integer id);
@Update("update tb_activate_in_record" +
" set over_num = #{overNum}" +
" where id = #{id}")
int updateOverNum(@Param("id") Integer id, @Param("overNum") Integer overNum);
}

View File

@ -1,77 +1,27 @@
package com.chaozhanggui.system.cashierservice.dao; package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.TbActivate; import com.chaozhanggui.system.cashierservice.entity.TbActivate;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Component;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
/** @Component
* (TbActivate)表数据库访问层 @Mapper
*
* @author ww
* @since 2024-10-23 09:57:47
*/
public interface TbActivateMapper { 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);
* 新增数据
*
* @param tbActivate 实例对象
* @return 影响行数
*/
Integer insert(TbActivate tbActivate);
/** int updateByPrimaryKey(TbActivate record);
* 批量新增数据MyBatis原生foreach方法
*
* @param entities List<TbActivate> 实例对象列表
* @return 影响行数
*/
Integer insertBatch(@Param("entities") List<TbActivate> entities);
/**
* 修改数据
*
* @param tbActivate 实例对象
* @return 影响行数
*/
Integer update(TbActivate tbActivate);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 影响行数
*/
Integer deleteById(Integer id);
TbActivate selectByAmount(@Param("shopId") String shopId, @Param("amount") BigDecimal amount); TbActivate selectByAmount(@Param("shopId") String shopId, @Param("amount") BigDecimal amount);
}
TbActivate selectByAmountScope(@Param("shopId") String shopId,@Param("amount") BigDecimal amount);
Integer updateMemberPoints(@Param("memberId") Long memberId,@Param("points") Integer points);
Integer insertMemberPointsLog(Map<String,Object> params);
}

View File

@ -1,74 +0,0 @@
package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.TbActivateOutRecord;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.data.domain.Pageable;
import java.util.List;
/**
* 活动赠送商品使用记录表(TbActivateOutRecord)表数据库访问层
*
* @author ww
* @since 2024-10-24 15:55:23
*/
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);
/**
* 新增数据
*
* @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);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 影响行数
*/
int deleteById(Integer id);
@Update("update tb_activate_out_record" +
" set ref_num = ref_num + #{refNum}" +
" where id = #{id}")
int updateRefNum(@Param("id") Integer id, @Param("refNum") Integer refNum);
}

View File

@ -3,14 +3,14 @@ package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.TbCashierCart; import com.chaozhanggui.system.cashierservice.entity.TbCashierCart;
import com.chaozhanggui.system.cashierservice.entity.po.CartPo; import com.chaozhanggui.system.cashierservice.entity.po.CartPo;
import com.chaozhanggui.system.cashierservice.entity.po.QueryCartPo; import com.chaozhanggui.system.cashierservice.entity.po.QueryCartPo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
@Component
@Mapper
public interface TbCashierCartMapper { public interface TbCashierCartMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -28,14 +28,11 @@ public interface TbCashierCartMapper {
List<TbCashierCart> selectALlByMasterId(@Param("masterId") String masterId,@Param("status") String status); List<TbCashierCart> selectALlByMasterId(@Param("masterId") String masterId,@Param("status") String status);
TbCashierCart selectByDetail(@Param("masterId") String masterId, @Param("productId") String productId, TbCashierCart selectByDetail(@Param("masterId") String masterId, @Param("productId") String productId,
@Param("shopId") String shopId, @Param("skuId") String skuId, @Param("day") String day,@Param("uuid") String uuid, @Param("tableId") String tableId); @Param("shopId") String shopId, @Param("skuId") String skuId, @Param("day") String day,@Param("uuid") String uuid);
TbCashierCart selectDetailByQrcode(@Param("tableId") String tableId, @Param("productId") String productId,
@Param("shopId") String shopId, @Param("skuId") String skuId, @Param("uuid") String uuid);
List<TbCashierCart> selectByMaskerId(@Param("masterId")String masterId, @Param("shopId")Integer shopId,@Param("status") String status,@Param("day") String day); List<TbCashierCart> selectByMaskerId(@Param("masterId")String masterId, @Param("shopId")Integer shopId,@Param("status") String status,@Param("day") String day);
void deleteByCartIdOrTableId(@Param("masterId") String masterId, @Param("cartId")Integer cartId, @Param("qrcode") String qrcode); void deleteByCartId(@Param("masterId") String masterId, @Param("cartId")Integer cartId);
void updateStatus(@Param("masterId") Integer id,@Param("status") String status); void updateStatus(@Param("masterId") Integer id,@Param("status") String status);
@ -63,17 +60,4 @@ public interface TbCashierCartMapper {
List<TbCashierCart> selectByOrderId(@Param("orderId") String orderId,@Param("status") String status); List<TbCashierCart> selectByOrderId(@Param("orderId") String orderId,@Param("status") String status);
}
List<TbCashierCart> selectActivateByQrcode(@Param("tableId") String tableId, @Param("shopId") Integer shopId);
QueryCartPo selectProductNumByQrcode(@Param("qrcode") String qrcode, @Param("shopId") Integer shopId);
@Delete("delete from tb_cashier_cart where master_id=#{masterId} and id=#{cartId}")
int deleteByCartId(@Param("masterId") String masterId, @Param("cartId")Integer cartId);
@Select("select count(*) from tb_cashier_cart where shop_id=#{shopId} and `status`='create' and table_id=#{qrcode} and order_id is not null")
int countTable(@Param("qrcode") String qrcode, @Param("shopId") Integer shopId);
@Select("select count(*) from tb_order_detail where shop_id=#{shopId} and `status`='unpaid' and order_id=#{orderId} and order_id is not null")
int countTableByDetail(@Param("orderId") Integer orderId, @Param("shopId") Integer shopId);
}

View File

@ -7,6 +7,8 @@ import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
@Component
@Mapper
public interface TbConsInfoFlowMapper { public interface TbConsInfoFlowMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -21,4 +23,4 @@ public interface TbConsInfoFlowMapper {
int updateByPrimaryKey(TbConsInfoFlow record); int updateByPrimaryKey(TbConsInfoFlow record);
void insertBatch(@Param("list")List<TbConsInfoFlow> list); void insertBatch(@Param("list")List<TbConsInfoFlow> list);
} }

View File

@ -8,6 +8,8 @@ import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
@Component
@Mapper
public interface TbConsInfoMapper { public interface TbConsInfoMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -25,4 +27,4 @@ public interface TbConsInfoMapper {
int countAll(); int countAll();
List<TbConsInfo> selectAllInfo(); List<TbConsInfo> selectAllInfo();
} }

View File

@ -1,69 +0,0 @@
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-24 15:56:08
*/
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);
/**
* 新增数据
*
* @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

@ -0,0 +1,17 @@
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

@ -4,6 +4,8 @@ import com.chaozhanggui.system.cashierservice.entity.TbMemberIn;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbMemberInMapper { public interface TbMemberInMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -16,4 +18,4 @@ public interface TbMemberInMapper {
int updateByPrimaryKeySelective(TbMemberIn record); int updateByPrimaryKeySelective(TbMemberIn record);
int updateByPrimaryKey(TbMemberIn record); int updateByPrimaryKey(TbMemberIn record);
} }

View File

@ -4,6 +4,8 @@ import com.chaozhanggui.system.cashierservice.entity.TbMerchantThirdApply;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbMerchantThirdApplyMapper { public interface TbMerchantThirdApplyMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -18,4 +20,4 @@ public interface TbMerchantThirdApplyMapper {
int updateByPrimaryKeyWithBLOBs(TbMerchantThirdApply record); int updateByPrimaryKeyWithBLOBs(TbMerchantThirdApply record);
int updateByPrimaryKey(TbMerchantThirdApply record); int updateByPrimaryKey(TbMerchantThirdApply record);
} }

View File

@ -10,6 +10,8 @@ import org.springframework.stereotype.Component;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
@Mapper
@Component
public interface TbOrderDetailMapper { public interface TbOrderDetailMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -23,7 +25,7 @@ public interface TbOrderDetailMapper {
int updateByPrimaryKey(TbOrderDetail record); int updateByPrimaryKey(TbOrderDetail record);
void updateStatusByOrderId(@Param("orderId") int orderId,@Param("status") String status,@Param("radio") BigDecimal radio); void updateStatusByOrderId(@Param("orderId") int orderId,@Param("status") String status);
void updateStatusByOrderIdAndStatus(@Param("orderId") int orderId,@Param("status") String status); void updateStatusByOrderIdAndStatus(@Param("orderId") int orderId,@Param("status") String status);
void deleteByOUrderId(@Param("orderId") int orderId); void deleteByOUrderId(@Param("orderId") int orderId);
@ -41,4 +43,4 @@ public interface TbOrderDetailMapper {
int batchInsert(@Param("list") List<TbOrderDetail> list,@Param("orderId") String orderId); int batchInsert(@Param("list") List<TbOrderDetail> list,@Param("orderId") String orderId);
TbOrderDetail selectByOrderIdAndSkuId(@Param("orderId") int orderId, @Param("skuId") Integer skuId); TbOrderDetail selectByOrderIdAndSkuId(@Param("orderId") int orderId, @Param("skuId") Integer skuId);
} }

View File

@ -12,6 +12,8 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@Component
@Mapper
public interface TbOrderInfoMapper { public interface TbOrderInfoMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -50,6 +52,4 @@ public interface TbOrderInfoMapper {
TbOrderInfo selectById(Integer id); TbOrderInfo selectById(Integer id);
List<TbOrderInfo> selectActivateOrder(@Param("shopId") String shopId, @Param("tableId") String qrcodeId);
} }

View File

@ -7,10 +7,12 @@ import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
@Component
@Mapper
public interface TbOrderOutNumberMapper { public interface TbOrderOutNumberMapper {
int insert(TbOrderOutNumber record); int insert(TbOrderOutNumber record);
int insertSelective(TbOrderOutNumber record); int insertSelective(TbOrderOutNumber record);
List<TbOrderOutNumber> selectAll(@Param("shopId") String shopId); List<TbOrderOutNumber> selectAll(@Param("shopId") String shopId);
} }

View File

@ -1,10 +1,11 @@
package com.chaozhanggui.system.cashierservice.dao; package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.TbOrderPayment; import com.chaozhanggui.system.cashierservice.entity.TbOrderPayment;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbOrderPaymentMapper { public interface TbOrderPaymentMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -19,6 +20,4 @@ public interface TbOrderPaymentMapper {
int updateByPrimaryKey(TbOrderPayment record); int updateByPrimaryKey(TbOrderPayment record);
TbOrderPayment selectByOrderId(String orderId); TbOrderPayment selectByOrderId(String orderId);
}
List<TbOrderPayment> selectListByOrderId(@Param("orderId") String orderId);
}

View File

@ -0,0 +1,19 @@
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

@ -4,6 +4,8 @@ import com.chaozhanggui.system.cashierservice.entity.TbPlussShopStaff;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbPlussShopStaffMapper { public interface TbPlussShopStaffMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -19,4 +21,4 @@ public interface TbPlussShopStaffMapper {
TbPlussShopStaff selectByAccount(String account); TbPlussShopStaff selectByAccount(String account);
TbPlussShopStaff selectByAccountAndShopId(String account,String shopId); TbPlussShopStaff selectByAccountAndShopId(String account,String shopId);
} }

View File

@ -1,15 +0,0 @@
package com.chaozhanggui.system.cashierservice.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chaozhanggui.system.cashierservice.entity.TbPrintMachineLog;
import org.apache.ibatis.annotations.Mapper;
/**
* 店铺小票打印记录
*
* @author tankaikai
* @since 2024-10-8 16:37
*/
@Mapper
public interface TbPrintMachineLogMapper extends BaseMapper<TbPrintMachineLog> {
}

View File

@ -7,6 +7,8 @@ import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
@Component
@Mapper
public interface TbPrintMachineMapper { public interface TbPrintMachineMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -23,4 +25,4 @@ public interface TbPrintMachineMapper {
int updateByPrimaryKey(TbPrintMachine record); int updateByPrimaryKey(TbPrintMachine record);
List<TbPrintMachineWithBLOBs> selectByShopId(String shopId); List<TbPrintMachineWithBLOBs> selectByShopId(String shopId);
} }

View File

@ -7,6 +7,8 @@ import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
@Component
@Mapper
public interface TbPrintPCMachineMapper { public interface TbPrintPCMachineMapper {
/** /**

View File

@ -1,58 +1,56 @@
package com.chaozhanggui.system.cashierservice.dao; package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.TbProduct; import com.chaozhanggui.system.cashierservice.entity.TbProduct;
import com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs;
import com.chaozhanggui.system.cashierservice.entity.po.ProConsSkuInfo; import com.chaozhanggui.system.cashierservice.entity.po.ProConsSkuInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update; import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
@Component
@Mapper
public interface TbProductMapper { public interface TbProductMapper {
int deleteByPrimaryKey(Integer id);
TbProduct selectByPrimaryKey(Integer id); int insert(TbProductWithBLOBs record);
List<TbProduct> selectByShopId(@Param("shopId") String shopId,@Param("commdityName") String commdityName); int insertSelective(TbProductWithBLOBs record);
List<TbProduct> selectByShopIdAndCheckGrounding(@Param("shopId") String shopId,@Param("commdityName") String commdityName);
List<TbProduct> selectByShopIdAndShopType(@Param("shopId") String shopId, @Param("categoryId") String categoryId,@Param("commdityName") String commdityName); TbProductWithBLOBs selectByPrimaryKey(Integer id);
List<TbProduct> selectByShopIdAndShopTypeCheckGrounding(@Param("shopId") String shopId, @Param("categoryId") String categoryId,@Param("commdityName") String commdityName);
List<TbProduct> selectByShopIdAndShopTypeUnGrounding(@Param("shopId") String shopId,@Param("commdityName") String commdityName); int updateByPrimaryKeySelective(TbProductWithBLOBs record);
int updateByPrimaryKeyWithBLOBs(TbProductWithBLOBs record);
int updateByPrimaryKey(TbProduct record);
List<TbProductWithBLOBs> selectByShopId(@Param("shopId") String shopId,@Param("commdityName") String commdityName);
List<TbProductWithBLOBs> selectByShopIdAndCheckGrounding(@Param("shopId") String shopId,@Param("commdityName") String commdityName);
List<TbProductWithBLOBs> selectByShopIdAndShopType(@Param("shopId") String shopId, @Param("categoryId") String categoryId,@Param("commdityName") String commdityName);
List<TbProductWithBLOBs> selectByShopIdAndShopTypeCheckGrounding(@Param("shopId") String shopId, @Param("categoryId") String categoryId,@Param("commdityName") String commdityName);
Integer countOrderByshopIdAndProductId(@Param("shopId") String shopId, @Param("productId") String productId, @Param("masterId") String masterId,@Param("day") String day);
Integer countOrderByshopIdAndProductId(@Param("shopId") String shopId, @Param("productId") String productId, @Param("masterId") String masterId,@Param("day") String day, @Param("tableId") String tableId);
@Update("update tb_product set stock_number = stock_number - #{num,jdbcType=INTEGER} where id = #{productId}")
void updateStockById(@Param("productId")Integer productId, @Param("num")Integer num); void updateStockById(@Param("productId")Integer productId, @Param("num")Integer num);
List<ProConsSkuInfo> selectBySkuId(Integer skuId); List<ProConsSkuInfo> selectBySkuId(Integer skuId);
@Update("update tb_product set stock_number=stock_number+#{num} WHERE id=#{id}") @Update("update tb_product set stock_number=stock_number+#{num} WHERE id=#{id}")
int incrStock(String id, BigDecimal num); int incrStock(String id, int num);
@Update("update tb_product set stock_number=stock_number-#{num} WHERE id=#{id} and stock_number-#{num} >= 0") @Update("update tb_product set stock_number=stock_number-#{num} WHERE id=#{id} and stock_number-#{num} >= 0")
int decrStock(String id, BigDecimal num); int decrStock(String id, int num);
@Update("update tb_product set stock_number=stock_number-#{num} WHERE id=#{id}") @Update("update tb_product set stock_number=stock_number-#{num} WHERE id=#{id}")
int decrStockUnCheck(String id, BigDecimal num); int decrStockUnCheck(String id, int num);
@Select("select * from tb_product product where product.id=#{productId} and product.shop_id=#{shopId} and product.is_del=0")
TbProduct selectByShopIdAndId(@Param("productId") Integer productId, @Param("shopId") Integer shopId);
@Update("update tb_product_sku set is_grounding=#{isGrounding} where product_id=#{productId}")
int updateGroundingByProId(@Param("productId") Integer productId, @Param("isGrounding") int isGrounding);
@Update("update tb_product_sku set is_grounding=#{status} where id=#{skuId}")
int updateGrounding(@Param("skuId") Integer skuId, @Param("status") int status);
@Update("update tb_product set is_pause_sale=#{state} where id=#{id} and shop_id=#{shopId}")
int pauseSale(@Param("id") Integer id, @Param("shopId") Integer shopId, @Param("state") Integer state);
@Update("update tb_product_sku set is_pause_sale=#{state} where product_id=#{id} and shop_id=#{shopId}")
int pauseSkuSale(@Param("id") Integer proId, @Param("shopId") Integer shopId, @Param("state") Integer state);
@Update("update tb_product set stock_number=#{stock} where id=#{productId} and shop_id=#{shopId}")
int updateStock(@Param("shopId") Integer shopId, @Param("productId") Integer productId, @Param("stock") Integer stock);
} }

View File

@ -11,6 +11,8 @@ import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
@Component
@Mapper
public interface TbProductSkuMapper { public interface TbProductSkuMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -46,24 +48,12 @@ public interface TbProductSkuMapper {
@Update("update tb_product_sku set stock_number=stock_number-#{num} WHERE id=#{id} and stock_number-#{num} >= 0") @Update("update tb_product_sku set stock_number=stock_number-#{num} WHERE id=#{id} and stock_number-#{num} >= 0")
int decrStock(String id, int num); int decrStock(String id, int num);
@Update("update tb_product_sku set real_sales_number=real_sales_number-#{num} WHERE id=#{skuId}")
int decrRealSalesNumber(@Param("skuId") Integer skuId, @Param("num") Integer num);
@Update("update tb_product_sku set stock_number=stock_number-#{num} WHERE id=#{id} ") @Update("update tb_product_sku set stock_number=stock_number-#{num} WHERE id=#{id} ")
int decrStockUnCheck(String id, int num); int decrStockUnCheck(String id, int num);
@Select("select * from tb_product_sku where is_grounding=1 and product_id=#{id} and is_del=0") @Select("select * from tb_product_sku where is_grounding=1 and product_id=#{id}")
List<TbProductSku> selectByProductCheckGrounding(@Param("id") Integer id); List<TbProductSku> selectByProductCheckGrounding(@Param("id") Integer id);
@Select("select * from tb_product_sku where is_grounding=1 and is_del=0 and product_id=#{id}") @Select("select * from tb_product_sku where is_grounding=1 and is_del=0 and product_id=#{id}")
List<TbProductSku> selectGroundingByProId(@Param("id") Integer id); List<TbProductSku> selectGroundingByProId(Integer id);
@Update("update tb_product_sku set is_pause_sale=#{state} where id=#{skuId} and shop_id=#{shopId}")
int pauseSale(@Param("skuId") Integer skuId, @Param("shopId") Integer shopId, @Param("state") Integer state);
@Update("update tb_product_sku set stock_number=#{stock} where product_id=#{skuId} and shop_id=#{shopId}")
int updateStock(@Param("shopId") Integer shopId, @Param("skuId") Integer skuId, @Param("stock") Integer stock);
@Select("select * from tb_product_sku where product_id=#{id} and is_del=0")
List<TbProductSku> selectByProductId(Integer id);
} }

View File

@ -4,6 +4,8 @@ import com.chaozhanggui.system.cashierservice.entity.TbProductSkuResult;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbProductSkuResultMapper { public interface TbProductSkuResultMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -18,4 +20,4 @@ public interface TbProductSkuResultMapper {
int updateByPrimaryKeyWithBLOBs(TbProductSkuResult record); int updateByPrimaryKeyWithBLOBs(TbProductSkuResult record);
int updateByPrimaryKey(TbProductSkuResult record); int updateByPrimaryKey(TbProductSkuResult record);
} }

View File

@ -5,6 +5,8 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbProductSpecMapper { public interface TbProductSpecMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -20,4 +22,4 @@ public interface TbProductSpecMapper {
int updateByPrimaryKey(TbProductSpec record); int updateByPrimaryKey(TbProductSpec record);
} }

View File

@ -7,6 +7,8 @@ import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
@Component
@Mapper
public interface TbProskuConMapper { public interface TbProskuConMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -22,14 +24,12 @@ public interface TbProskuConMapper {
List<TbProskuCon> selectBySkuIdAndShopId(@Param("skuId") Integer skuId, @Param("shopId") Integer shopId); List<TbProskuCon> selectBySkuIdAndShopId(@Param("skuId") Integer skuId, @Param("shopId") Integer shopId);
List<TbProskuCon> selectBySkuIdAndShopIdAngCheck(@Param("skuId") Integer skuId, @Param("shopId") Integer shopId);
List<Integer> selectIdBySkuIdAndShopId(@Param("skuId") Integer skuId, @Param("shopId") Integer shopId); List<Integer> selectIdBySkuIdAndShopId(@Param("skuId") Integer skuId, @Param("shopId") Integer shopId);
List<TbProskuCon> selectByShopIdAndSkuIdAndProductId(@Param("skuId") Integer skuId, @Param("shopId") Integer shopId,@Param("productId") Integer productId); List<TbProskuCon> selectByShopIdAndSkuIdAndProductId(@Param("skuId") Integer skuId, @Param("shopId") Integer shopId,@Param("productId") Integer productId);
List<TbProskuCon> selectByShopIdAndSkuIdAndProductIdAndCheck(@Param("skuId") Integer skuId, @Param("shopId") Integer shopId,@Param("productId") Integer productId);
} }

View File

@ -7,6 +7,8 @@ import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
@Component
@Mapper
public interface TbQuickPayMapper { public interface TbQuickPayMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -23,4 +25,4 @@ public interface TbQuickPayMapper {
List<TbQuickPay> selectByShopIdAndStaffId(@Param("shopId") Integer shopId,@Param("staffId") Integer staffId); List<TbQuickPay> selectByShopIdAndStaffId(@Param("shopId") Integer shopId,@Param("staffId") Integer staffId);
TbQuickPay selectByOrderNo(String orderNo); TbQuickPay selectByOrderNo(String orderNo);
} }

View File

@ -0,0 +1,17 @@
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

@ -0,0 +1,17 @@
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

@ -6,6 +6,8 @@ import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
@Component
@Mapper
public interface TbShopAreaMapper { public interface TbShopAreaMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -22,4 +24,4 @@ public interface TbShopAreaMapper {
int updateByPrimaryKey(TbShopArea record); int updateByPrimaryKey(TbShopArea record);
List<TbShopArea> selectByShopId(String shopId); List<TbShopArea> selectByShopId(String shopId);
} }

View File

@ -0,0 +1,20 @@
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

@ -7,6 +7,8 @@ import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
@Component
@Mapper
public interface TbShopCategoryMapper { public interface TbShopCategoryMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -22,4 +24,4 @@ public interface TbShopCategoryMapper {
List<TbShopCategory> selectByAll(String shopId); List<TbShopCategory> selectByAll(String shopId);
List<ShopCategoryVo> queryAllCategory(String shopId); List<ShopCategoryVo> queryAllCategory(String shopId);
} }

View File

@ -1,68 +0,0 @@
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-24 15:52:58
*/
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

@ -0,0 +1,20 @@
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

@ -1,18 +1,32 @@
package com.chaozhanggui.system.cashierservice.dao; package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.TbShopInfo; import com.chaozhanggui.system.cashierservice.entity.TbShopInfo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
@Component
@Mapper
public interface TbShopInfoMapper { public interface TbShopInfoMapper {
int deleteByPrimaryKey(Integer id);
int insert(TbShopInfo record);
int insertSelective(TbShopInfo record);
TbShopInfo selectByPrimaryKey(Integer id); TbShopInfo selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(TbShopInfo record);
int updateByPrimaryKeyWithBLOBs(TbShopInfo record);
int updateByPrimaryKey(TbShopInfo record);
List<TbShopInfo> selectAll(); List<TbShopInfo> selectAll();
List<TbShopInfo> selectAllByCreateTime(); List<TbShopInfo> selectAllByCreateTime();
String getTicketLogo(Integer shopId);
}
}

View File

@ -4,6 +4,8 @@ import com.chaozhanggui.system.cashierservice.entity.TbShopOnline;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbShopOnlineMapper { public interface TbShopOnlineMapper {
int deleteByPrimaryKey(Integer shopId); int deleteByPrimaryKey(Integer shopId);
@ -16,4 +18,4 @@ public interface TbShopOnlineMapper {
int updateByPrimaryKeySelective(TbShopOnline record); int updateByPrimaryKeySelective(TbShopOnline record);
int updateByPrimaryKey(TbShopOnline record); int updateByPrimaryKey(TbShopOnline record);
} }

View File

@ -1,7 +1,6 @@
package com.chaozhanggui.system.cashierservice.dao; package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.TbShopOpenId; import com.chaozhanggui.system.cashierservice.entity.TbShopOpenId;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
@ -28,7 +27,4 @@ public interface TbShopOpenIdMapper {
@Select("select * from tb_shop_open_id where shop_id=#{shopId} and status=1") @Select("select * from tb_shop_open_id where shop_id=#{shopId} and status=1")
List<TbShopOpenId> selectByShopId(Integer integer); List<TbShopOpenId> selectByShopId(Integer integer);
@Select("select * from tb_shop_open_id where shop_id=#{shopId} and status=1 and (type=#{type} or type=-1) group by open_id;")
List<TbShopOpenId> selectStateByShopIdAndType(@Param("shopId") String shopId, @Param("type") int type);
} }

View File

@ -7,6 +7,8 @@ import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
@Component
@Mapper
public interface TbShopPayTypeMapper { public interface TbShopPayTypeMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -25,4 +27,4 @@ public interface TbShopPayTypeMapper {
int countSelectByShopIdAndPayType(@Param("shopId") String shopId, @Param("payType") String payType ); int countSelectByShopIdAndPayType(@Param("shopId") String shopId, @Param("payType") String payType );
} }

View File

@ -1,15 +0,0 @@
package com.chaozhanggui.system.cashierservice.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chaozhanggui.system.cashierservice.entity.TbShopPermission;
/**
* (TbShopPermission)表数据库访问层
*
* @author makejava
* @since 2024-09-14 17:08:48
*/
public interface TbShopPermissionDao extends BaseMapper<TbShopPermission> {
}

View File

@ -1,15 +0,0 @@
package com.chaozhanggui.system.cashierservice.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chaozhanggui.system.cashierservice.entity.TbShopStaffPermission;
/**
* 店铺员工权限关联表(TbShopStaffPermission)表数据库访问层
*
* @author makejava
* @since 2024-09-14 17:07:33
*/
public interface TbShopStaffPermissionDao extends BaseMapper<TbShopStaffPermission> {
}

View File

@ -1,13 +1,14 @@
package com.chaozhanggui.system.cashierservice.dao; package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.TbShopTable; import com.chaozhanggui.system.cashierservice.entity.TbShopTable;
import com.chaozhanggui.system.cashierservice.entity.vo.TbShopTableVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
@Component
@Mapper
public interface TbShopTableMapper { public interface TbShopTableMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -22,5 +23,4 @@ public interface TbShopTableMapper {
int updateByPrimaryKey(TbShopTable record); int updateByPrimaryKey(TbShopTable record);
List<TbShopTable> selectByShopIdAndStatus(@Param("shopId") String shopId,@Param("areaId") String areaId,@Param("status") String status); List<TbShopTable> selectByShopIdAndStatus(@Param("shopId") String shopId,@Param("areaId") String areaId,@Param("status") String status);
List<TbShopTableVO> selectTableInfo(@Param("shopId") String shopId, @Param("areaId") String areaId, @Param("status") String status, @Param("day") String day); }
}

View File

@ -7,6 +7,8 @@ import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@Component
@Mapper
public interface TbShopUserFlowMapper { public interface TbShopUserFlowMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -21,4 +23,4 @@ public interface TbShopUserFlowMapper {
int updateByPrimaryKey(TbShopUserFlow record); int updateByPrimaryKey(TbShopUserFlow record);
List<Map<String,Object>> selectByMemberAccountFlow(String memberId); List<Map<String,Object>> selectByMemberAccountFlow(String memberId);
} }

View File

@ -7,6 +7,8 @@ import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
@Component
@Mapper
public interface TbShopUserMapper { public interface TbShopUserMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -20,7 +22,7 @@ public interface TbShopUserMapper {
int updateByPrimaryKey(TbShopUser record); int updateByPrimaryKey(TbShopUser record);
List<TbShopUser> selectByShopId(@Param("shopId") String shopId,@Param("phone") String phone,@Param("isFlag") String isFlag); List<TbShopUser> selectByShopId(@Param("shopId") String shopId,@Param("phone") String phone);
List<TbShopUser> selectByShopIdAndPhone(@Param("shopId") String shopId,@Param("phone") String phone); List<TbShopUser> selectByShopIdAndPhone(@Param("shopId") String shopId,@Param("phone") String phone);
@ -28,4 +30,4 @@ public interface TbShopUserMapper {
TbShopUser selectByUserIdAndShopId(@Param("userId") String userId,@Param("shopId") String shopId); TbShopUser selectByUserIdAndShopId(@Param("userId") String userId,@Param("shopId") String shopId);
TbShopUser selectByShopIdAndDdynamicCode(@Param("shopId") String shopId,@Param("memberAccount") String memberAccount); TbShopUser selectByShopIdAndDdynamicCode(@Param("shopId") String shopId,@Param("memberAccount") String memberAccount);
} }

View File

@ -4,6 +4,8 @@ import com.chaozhanggui.system.cashierservice.entity.TbToken;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbTokenMapper { public interface TbTokenMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -18,4 +20,4 @@ public interface TbTokenMapper {
int updateByPrimaryKey(TbToken record); int updateByPrimaryKey(TbToken record);
TbToken selectByToken(String token); TbToken selectByToken(String token);
} }

View File

@ -4,6 +4,8 @@ import com.chaozhanggui.system.cashierservice.entity.TbUserInfo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbUserInfoMapper { public interface TbUserInfoMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -21,4 +23,4 @@ public interface TbUserInfoMapper {
TbUserInfo selectByPhone(String phone); TbUserInfo selectByPhone(String phone);
int selectCountByPhone(String phone); int selectCountByPhone(String phone);
} }

View File

@ -8,6 +8,8 @@ import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
@Component
@Mapper
public interface TbUserShopMsgMapper { public interface TbUserShopMsgMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -26,4 +28,4 @@ public interface TbUserShopMsgMapper {
List<TbUserShopMsg> selectAllByShopId(@Param("shopId") Integer shopId); List<TbUserShopMsg> selectAllByShopId(@Param("shopId") Integer shopId);
} }

View File

@ -4,6 +4,8 @@ import com.chaozhanggui.system.cashierservice.entity.TbmerchantAccount;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbmerchantAccountMapper { public interface TbmerchantAccountMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -21,4 +23,4 @@ public interface TbmerchantAccountMapper {
TbmerchantAccount selectByAccount(String account); TbmerchantAccount selectByAccount(String account);
} }

View File

@ -4,6 +4,8 @@ import com.chaozhanggui.system.cashierservice.entity.tbHandover;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Component
@Mapper
public interface tbHandoverMapper { public interface tbHandoverMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
@ -16,4 +18,4 @@ public interface tbHandoverMapper {
int updateByPrimaryKeySelective(tbHandover record); int updateByPrimaryKeySelective(tbHandover record);
int updateByPrimaryKey(tbHandover record); int updateByPrimaryKey(tbHandover record);
} }

View File

@ -0,0 +1,147 @@
package com.chaozhanggui.system.cashierservice.entity;
import java.io.Serializable;
public class CodeColumnConfig implements Serializable {
private Long columnId;
private String tableName;
private String columnName;
private String columnType;
private String dictName;
private String extra;
private Boolean formShow;
private String formType;
private String keyType;
private Boolean listShow;
private Boolean notNull;
private String queryType;
private String remark;
private String dateAnnotation;
private static final long serialVersionUID = 1L;
public Long getColumnId() {
return columnId;
}
public void setColumnId(Long columnId) {
this.columnId = columnId;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName == null ? null : tableName.trim();
}
public String getColumnName() {
return columnName;
}
public void setColumnName(String columnName) {
this.columnName = columnName == null ? null : columnName.trim();
}
public String getColumnType() {
return columnType;
}
public void setColumnType(String columnType) {
this.columnType = columnType == null ? null : columnType.trim();
}
public String getDictName() {
return dictName;
}
public void setDictName(String dictName) {
this.dictName = dictName == null ? null : dictName.trim();
}
public String getExtra() {
return extra;
}
public void setExtra(String extra) {
this.extra = extra == null ? null : extra.trim();
}
public Boolean getFormShow() {
return formShow;
}
public void setFormShow(Boolean formShow) {
this.formShow = formShow;
}
public String getFormType() {
return formType;
}
public void setFormType(String formType) {
this.formType = formType == null ? null : formType.trim();
}
public String getKeyType() {
return keyType;
}
public void setKeyType(String keyType) {
this.keyType = keyType == null ? null : keyType.trim();
}
public Boolean getListShow() {
return listShow;
}
public void setListShow(Boolean listShow) {
this.listShow = listShow;
}
public Boolean getNotNull() {
return notNull;
}
public void setNotNull(Boolean notNull) {
this.notNull = notNull;
}
public String getQueryType() {
return queryType;
}
public void setQueryType(String queryType) {
this.queryType = queryType == null ? null : queryType.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public String getDateAnnotation() {
return dateAnnotation;
}
public void setDateAnnotation(String dateAnnotation) {
this.dateAnnotation = dateAnnotation == null ? null : dateAnnotation.trim();
}
}

View File

@ -0,0 +1,107 @@
package com.chaozhanggui.system.cashierservice.entity;
import java.io.Serializable;
public class CodeGenConfig implements Serializable {
private Long configId;
private String tableName;
private String author;
private Boolean cover;
private String moduleName;
private String pack;
private String path;
private String apiPath;
private String prefix;
private String apiAlias;
private static final long serialVersionUID = 1L;
public Long getConfigId() {
return configId;
}
public void setConfigId(Long configId) {
this.configId = configId;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName == null ? null : tableName.trim();
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author == null ? null : author.trim();
}
public Boolean getCover() {
return cover;
}
public void setCover(Boolean cover) {
this.cover = cover;
}
public String getModuleName() {
return moduleName;
}
public void setModuleName(String moduleName) {
this.moduleName = moduleName == null ? null : moduleName.trim();
}
public String getPack() {
return pack;
}
public void setPack(String pack) {
this.pack = pack == null ? null : pack.trim();
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path == null ? null : path.trim();
}
public String getApiPath() {
return apiPath;
}
public void setApiPath(String apiPath) {
this.apiPath = apiPath == null ? null : apiPath.trim();
}
public String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix == null ? null : prefix.trim();
}
public String getApiAlias() {
return apiAlias;
}
public void setApiAlias(String apiAlias) {
this.apiAlias = apiAlias == null ? null : apiAlias.trim();
}
}

View File

@ -0,0 +1,128 @@
package com.chaozhanggui.system.cashierservice.entity;
import java.io.Serializable;
import java.util.Date;
public class MntApp implements Serializable {
private Long appId;
private String name;
private String uploadPath;
private String deployPath;
private String backupPath;
private Integer port;
private String startScript;
private String deployScript;
private String createBy;
private String updateBy;
private Date createTime;
private Date updateTime;
private static final long serialVersionUID = 1L;
public Long getAppId() {
return appId;
}
public void setAppId(Long appId) {
this.appId = appId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getUploadPath() {
return uploadPath;
}
public void setUploadPath(String uploadPath) {
this.uploadPath = uploadPath == null ? null : uploadPath.trim();
}
public String getDeployPath() {
return deployPath;
}
public void setDeployPath(String deployPath) {
this.deployPath = deployPath == null ? null : deployPath.trim();
}
public String getBackupPath() {
return backupPath;
}
public void setBackupPath(String backupPath) {
this.backupPath = backupPath == null ? null : backupPath.trim();
}
public Integer getPort() {
return port;
}
public void setPort(Integer port) {
this.port = port;
}
public String getStartScript() {
return startScript;
}
public void setStartScript(String startScript) {
this.startScript = startScript == null ? null : startScript.trim();
}
public String getDeployScript() {
return deployScript;
}
public void setDeployScript(String deployScript) {
this.deployScript = deployScript == null ? null : deployScript.trim();
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy == null ? null : createBy.trim();
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy == null ? null : updateBy.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

@ -0,0 +1,98 @@
package com.chaozhanggui.system.cashierservice.entity;
import java.io.Serializable;
import java.util.Date;
public class MntDatabase implements Serializable {
private String dbId;
private String name;
private String jdbcUrl;
private String userName;
private String pwd;
private String createBy;
private String updateBy;
private Date createTime;
private Date updateTime;
private static final long serialVersionUID = 1L;
public String getDbId() {
return dbId;
}
public void setDbId(String dbId) {
this.dbId = dbId == null ? null : dbId.trim();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getJdbcUrl() {
return jdbcUrl;
}
public void setJdbcUrl(String jdbcUrl) {
this.jdbcUrl = jdbcUrl == null ? null : jdbcUrl.trim();
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName == null ? null : userName.trim();
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd == null ? null : pwd.trim();
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy == null ? null : createBy.trim();
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy == null ? null : updateBy.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

@ -0,0 +1,68 @@
package com.chaozhanggui.system.cashierservice.entity;
import java.io.Serializable;
import java.util.Date;
public class MntDeploy implements Serializable {
private Long deployId;
private Long appId;
private String createBy;
private String updateBy;
private Date createTime;
private Date updateTime;
private static final long serialVersionUID = 1L;
public Long getDeployId() {
return deployId;
}
public void setDeployId(Long deployId) {
this.deployId = deployId;
}
public Long getAppId() {
return appId;
}
public void setAppId(Long appId) {
this.appId = appId;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy == null ? null : createBy.trim();
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy == null ? null : updateBy.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

@ -0,0 +1,68 @@
package com.chaozhanggui.system.cashierservice.entity;
import java.io.Serializable;
import java.util.Date;
public class MntDeployHistory implements Serializable {
private String historyId;
private String appName;
private Date deployDate;
private String deployUser;
private String ip;
private Long deployId;
private static final long serialVersionUID = 1L;
public String getHistoryId() {
return historyId;
}
public void setHistoryId(String historyId) {
this.historyId = historyId == null ? null : historyId.trim();
}
public String getAppName() {
return appName;
}
public void setAppName(String appName) {
this.appName = appName == null ? null : appName.trim();
}
public Date getDeployDate() {
return deployDate;
}
public void setDeployDate(Date deployDate) {
this.deployDate = deployDate;
}
public String getDeployUser() {
return deployUser;
}
public void setDeployUser(String deployUser) {
this.deployUser = deployUser == null ? null : deployUser.trim();
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip == null ? null : ip.trim();
}
public Long getDeployId() {
return deployId;
}
public void setDeployId(Long deployId) {
this.deployId = deployId;
}
}

View File

@ -0,0 +1,27 @@
package com.chaozhanggui.system.cashierservice.entity;
import java.io.Serializable;
public class MntDeployServerKey implements Serializable {
private Long deployId;
private Long serverId;
private static final long serialVersionUID = 1L;
public Long getDeployId() {
return deployId;
}
public void setDeployId(Long deployId) {
this.deployId = deployId;
}
public Long getServerId() {
return serverId;
}
public void setServerId(Long serverId) {
this.serverId = serverId;
}
}

View File

@ -0,0 +1,108 @@
package com.chaozhanggui.system.cashierservice.entity;
import java.io.Serializable;
import java.util.Date;
public class MntServer implements Serializable {
private Long serverId;
private String account;
private String ip;
private String name;
private String password;
private Integer port;
private String createBy;
private String updateBy;
private Date createTime;
private Date updateTime;
private static final long serialVersionUID = 1L;
public Long getServerId() {
return serverId;
}
public void setServerId(Long serverId) {
this.serverId = serverId;
}
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account == null ? null : account.trim();
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip == null ? null : ip.trim();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password == null ? null : password.trim();
}
public Integer getPort() {
return port;
}
public void setPort(Integer port) {
this.port = port;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy == null ? null : createBy.trim();
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy == null ? null : updateBy.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

@ -2,8 +2,6 @@ package com.chaozhanggui.system.cashierservice.entity;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.util.List; import java.util.List;
@Data @Data
@ -14,11 +12,4 @@ public class OrderVo {
private Integer shopId; private Integer shopId;
private String userId; private String userId;
private Integer merchantId; private Integer merchantId;
private String tableId;
private Integer vipUserId;
private Integer type;
private String sendType;
@Min(1)
private Integer seatNum;
} }

View File

@ -1,49 +1,24 @@
package com.chaozhanggui.system.cashierservice.entity; package com.chaozhanggui.system.cashierservice.entity;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.math.BigDecimal;
/**
* (TbActivate)实体类
*
* @author ww
* @since 2024-10-23 09:57:13
*/
public class TbActivate implements Serializable { public class TbActivate implements Serializable {
private static final long serialVersionUID = -45208765530510891L;
private Integer id; private Integer id;
private Integer shopId; private Integer shopId;
/**
* 充值金额
*/
private Integer amount;
/**
* 赠送金额
*/
private Integer giftAmount;
/**
* 赠送积分
*/
private Integer giftPoints;
/**
* 是否使用优惠卷 0否 1是
*/
private Integer isUseCoupon;
/**
* 优惠卷id
*/
private Integer couponId;
/**
* 优惠卷数量
*/
private Integer num;
private Date createTime; private Integer minNum;
private Date updateTime; private Integer maxNum;
private BigDecimal handselNum;
private String handselType;
private String isDel;
private static final long serialVersionUID = 1L;
public Integer getId() { public Integer getId() {
return id; return id;
@ -61,68 +36,43 @@ public class TbActivate implements Serializable {
this.shopId = shopId; this.shopId = shopId;
} }
public Integer getAmount() { public Integer getMinNum() {
return amount; return minNum;
} }
public void setAmount(Integer amount) { public void setMinNum(Integer minNum) {
this.amount = amount; this.minNum = minNum;
} }
public Integer getGiftAmount() { public Integer getMaxNum() {
return giftAmount; return maxNum;
} }
public void setGiftAmount(Integer giftAmount) { public void setMaxNum(Integer maxNum) {
this.giftAmount = giftAmount; this.maxNum = maxNum;
} }
public Integer getIsUseCoupon() { public BigDecimal getHandselNum() {
return isUseCoupon; return handselNum;
} }
public void setIsUseCoupon(Integer isUseCoupon) { public void setHandselNum(BigDecimal handselNum) {
this.isUseCoupon = isUseCoupon; this.handselNum = handselNum;
} }
public Integer getCouponId() { public String getHandselType() {
return couponId; return handselType;
} }
public void setCouponId(Integer couponId) { public void setHandselType(String handselType) {
this.couponId = couponId; this.handselType = handselType == null ? null : handselType.trim();
} }
public Integer getNum() { public String getIsDel() {
return num; return isDel;
} }
public void setNum(Integer num) { public void setIsDel(String isDel) {
this.num = num; this.isDel = isDel == null ? null : isDel.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 getGiftPoints() {
return giftPoints;
}
public void setGiftPoints(Integer giftPoints) {
this.giftPoints = giftPoints;
}
}

View File

@ -1,233 +0,0 @@
package com.chaozhanggui.system.cashierservice.entity;
import java.math.BigDecimal;
import java.util.Date;
import java.io.Serializable;
/**
* 活动商品赠送记录表(TbActivateInRecord)实体类
*
* @author ww
* @since 2024-10-24 15:55:01
*/
public class TbActivateInRecord implements Serializable {
private static final long serialVersionUID = -87516247063601097L;
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 BigDecimal fullAmount;
/**
* 减多少金额
*/
private BigDecimal 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;
private String source;
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 BigDecimal getFullAmount() {
return fullAmount;
}
public void setFullAmount(BigDecimal fullAmount) {
this.fullAmount = fullAmount;
}
public BigDecimal getDiscountAmount() {
return discountAmount;
}
public void setDiscountAmount(BigDecimal 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;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
}

View File

@ -1,141 +0,0 @@
package com.chaozhanggui.system.cashierservice.entity;
import java.util.Date;
import java.io.Serializable;
/**
* 活动赠送商品使用记录表(TbActivateOutRecord)实体类
*
* @author ww
* @since 2024-10-24 15:55:23
*/
public class TbActivateOutRecord implements Serializable {
private static final long serialVersionUID = -14744224643993479L;
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

@ -1,315 +0,0 @@
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;
/**
*
* @TableName tb_call_config
*/
@TableName(value ="tb_call_config")
public class TbCallConfig implements Serializable {
/**
*
*/
@TableId(type = IdType.AUTO)
private Integer id;
/**
* 小程序页面地址
*/
private String pageAddress;
/**
* 线上取号 1是 0否
*/
private Integer isOnline;
/**
* 背景图片
*/
private String bgCover;
/**
* 成功提示
*/
private String successMsg;
/**
* 临近提示
*/
private String nearMsg;
/**
* 过号提示
*/
private String callingMsg;
/**
* 店铺id
*/
private Integer shopId;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
* 是否过号顺延
*/
private Integer isPostpone;
/**
* 顺延号码数量
*/
private Integer postponeNum;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 小程序页面地址
*/
public String getPageAddress() {
return pageAddress;
}
/**
* 小程序页面地址
*/
public void setPageAddress(String pageAddress) {
this.pageAddress = pageAddress;
}
/**
* 线上取号 1是 0否
*/
public Integer getIsOnline() {
return isOnline;
}
/**
* 线上取号 1是 0否
*/
public void setIsOnline(Integer isOnline) {
this.isOnline = isOnline;
}
/**
* 背景图片
*/
public String getBgCover() {
return bgCover;
}
/**
* 背景图片
*/
public void setBgCover(String bgCover) {
this.bgCover = bgCover;
}
/**
* 成功提示
*/
public String getSuccessMsg() {
return successMsg;
}
/**
* 成功提示
*/
public void setSuccessMsg(String successMsg) {
this.successMsg = successMsg;
}
/**
* 临近提示
*/
public String getNearMsg() {
return nearMsg;
}
/**
* 临近提示
*/
public void setNearMsg(String nearMsg) {
this.nearMsg = nearMsg;
}
/**
* 过号提示
*/
public String getCallingMsg() {
return callingMsg;
}
/**
* 过号提示
*/
public void setCallingMsg(String callingMsg) {
this.callingMsg = callingMsg;
}
/**
* 店铺id
*/
public Integer getShopId() {
return shopId;
}
/**
* 店铺id
*/
public void setShopId(Integer shopId) {
this.shopId = shopId;
}
/**
*
*/
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 getIsPostpone() {
return isPostpone;
}
/**
* 是否过号顺延
*/
public void setIsPostpone(Integer isPostpone) {
this.isPostpone = isPostpone;
}
/**
* 顺延号码数量
*/
public Integer getPostponeNum() {
return postponeNum;
}
/**
* 顺延号码数量
*/
public void setPostponeNum(Integer postponeNum) {
this.postponeNum = postponeNum;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
TbCallConfig other = (TbCallConfig) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getPageAddress() == null ? other.getPageAddress() == null : this.getPageAddress().equals(other.getPageAddress()))
&& (this.getIsOnline() == null ? other.getIsOnline() == null : this.getIsOnline().equals(other.getIsOnline()))
&& (this.getBgCover() == null ? other.getBgCover() == null : this.getBgCover().equals(other.getBgCover()))
&& (this.getSuccessMsg() == null ? other.getSuccessMsg() == null : this.getSuccessMsg().equals(other.getSuccessMsg()))
&& (this.getNearMsg() == null ? other.getNearMsg() == null : this.getNearMsg().equals(other.getNearMsg()))
&& (this.getCallingMsg() == null ? other.getCallingMsg() == null : this.getCallingMsg().equals(other.getCallingMsg()))
&& (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.getIsPostpone() == null ? other.getIsPostpone() == null : this.getIsPostpone().equals(other.getIsPostpone()))
&& (this.getPostponeNum() == null ? other.getPostponeNum() == null : this.getPostponeNum().equals(other.getPostponeNum()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getPageAddress() == null) ? 0 : getPageAddress().hashCode());
result = prime * result + ((getIsOnline() == null) ? 0 : getIsOnline().hashCode());
result = prime * result + ((getBgCover() == null) ? 0 : getBgCover().hashCode());
result = prime * result + ((getSuccessMsg() == null) ? 0 : getSuccessMsg().hashCode());
result = prime * result + ((getNearMsg() == null) ? 0 : getNearMsg().hashCode());
result = prime * result + ((getCallingMsg() == null) ? 0 : getCallingMsg().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 + ((getIsPostpone() == null) ? 0 : getIsPostpone().hashCode());
result = prime * result + ((getPostponeNum() == null) ? 0 : getPostponeNum().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(", pageAddress=").append(pageAddress);
sb.append(", isOnline=").append(isOnline);
sb.append(", bgCover=").append(bgCover);
sb.append(", successMsg=").append(successMsg);
sb.append(", nearMsg=").append(nearMsg);
sb.append(", callingMsg=").append(callingMsg);
sb.append(", shopId=").append(shopId);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", isPostpone=").append(isPostpone);
sb.append(", postponeNum=").append(postponeNum);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

View File

@ -1,469 +0,0 @@
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;
/**
*
* @TableName tb_call_queue
*/
@TableName(value ="tb_call_queue")
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;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 叫号台桌类型id
*/
public Integer getCallTableId() {
return callTableId;
}
/**
* 叫号台桌类型id
*/
public void setCallTableId(Integer callTableId) {
this.callTableId = callTableId;
}
/**
* 手机号
*/
public String getPhone() {
return phone;
}
/**
* 手机号
*/
public void setPhone(String phone) {
this.phone = phone;
}
/**
* 姓名
*/
public String getName() {
return name;
}
/**
* 姓名
*/
public void setName(String name) {
this.name = name;
}
/**
* 店铺名称
*/
public String getShopName() {
return shopName;
}
/**
* 店铺名称
*/
public void setShopName(String shopName) {
this.shopName = shopName;
}
/**
* 店铺id
*/
public Integer getShopId() {
return shopId;
}
/**
* 店铺id
*/
public void setShopId(Integer shopId) {
this.shopId = shopId;
}
/**
* -1已取消 0排队中 1叫号中 2已入座 3 已过号
*/
public Integer getState() {
return state;
}
/**
* -1已取消 0排队中 1叫号中 2已入座 3 已过号
*/
public void setState(Integer state) {
this.state = state;
}
/**
* 排号时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 排号时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 叫号时间
*/
public Date getCallTime() {
return callTime;
}
/**
* 叫号时间
*/
public void setCallTime(Date callTime) {
this.callTime = callTime;
}
/**
* 叫号次数
*/
public Integer getCallCount() {
return callCount;
}
/**
* 叫号次数
*/
public void setCallCount(Integer callCount) {
this.callCount = callCount;
}
/**
* 过号时间
*/
public Date getPassTime() {
return passTime;
}
/**
* 过号时间
*/
public void setPassTime(Date passTime) {
this.passTime = passTime;
}
/**
* 取消时间
*/
public Date getCancelTime() {
return cancelTime;
}
/**
* 取消时间
*/
public void setCancelTime(Date cancelTime) {
this.cancelTime = cancelTime;
}
/**
* 备注
*/
public String getNote() {
return note;
}
/**
* 备注
*/
public void setNote(String note) {
this.note = note;
}
/**
*
*/
public Integer getUserId() {
return userId;
}
/**
*
*/
public void setUserId(Integer userId) {
this.userId = userId;
}
/**
*
*/
public String getOpenId() {
return openId;
}
/**
*
*/
public void setOpenId(String openId) {
this.openId = openId;
}
/**
* 订阅提醒 0未订阅 1已订阅
*/
public Integer getSubState() {
return subState;
}
/**
* 订阅提醒 0未订阅 1已订阅
*/
public void setSubState(Integer subState) {
this.subState = subState;
}
/**
* 确认时间
*/
public Date getConfirmTime() {
return confirmTime;
}
/**
* 确认时间
*/
public void setConfirmTime(Date confirmTime) {
this.confirmTime = confirmTime;
}
/**
* 叫号号码
*/
public String getCallNum() {
return callNum;
}
/**
* 叫号号码
*/
public void setCallNum(String callNum) {
this.callNum = callNum;
}
/**
* 创建年月日
*/
public String getCreateDay() {
return createDay;
}
/**
* 创建年月日
*/
public void setCreateDay(String createDay) {
this.createDay = createDay;
}
@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()));
}
@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());
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(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

View File

@ -1,359 +0,0 @@
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;
/**
* 叫号桌型表
* @TableName tb_call_table
*/
@TableName(value ="tb_call_table")
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;
/**
* 顺延号码数量
*/
private Integer isPostpone;
/**
* 顺延号码数量
*/
private Integer postponeNum;
@TableField(exist = false)
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;
}
/**
* 描述
*/
public String getNote() {
return note;
}
/**
* 描述
*/
public void setNote(String note) {
this.note = note;
}
/**
* 等待时间分钟
*/
public Integer getWaitTime() {
return waitTime;
}
/**
* 等待时间分钟
*/
public void setWaitTime(Integer waitTime) {
this.waitTime = waitTime;
}
/**
* 前缀
*/
public String getPrefix() {
return prefix;
}
/**
* 前缀
*/
public void setPrefix(String prefix) {
this.prefix = prefix;
}
/**
* 起始号码
*/
public Integer getStart() {
return start;
}
/**
* 起始号码
*/
public void setStart(Integer start) {
this.start = start;
}
/**
* 临近几桌提醒
*/
public Integer getNearNum() {
return nearNum;
}
/**
* 临近几桌提醒
*/
public void setNearNum(Integer nearNum) {
this.nearNum = nearNum;
}
/**
* 0禁用 1使用
*/
public Integer getState() {
return state;
}
/**
* 0禁用 1使用
*/
public void setState(Integer state) {
this.state = state;
}
/**
* 店铺id
*/
public Integer getShopId() {
return shopId;
}
/**
* 店铺id
*/
public void setShopId(Integer shopId) {
this.shopId = shopId;
}
/**
* 二维码地址
*/
public String getQrcode() {
return qrcode;
}
/**
* 二维码地址
*/
public void setQrcode(String qrcode) {
this.qrcode = qrcode;
}
/**
*
*/
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 getIsPostpone() {
return isPostpone;
}
/**
* 顺延号码数量
*/
public void setIsPostpone(Integer isPostpone) {
this.isPostpone = isPostpone;
}
/**
* 顺延号码数量
*/
public Integer getPostponeNum() {
return postponeNum;
}
/**
* 顺延号码数量
*/
public void setPostponeNum(Integer postponeNum) {
this.postponeNum = postponeNum;
}
@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()))
&& (this.getIsPostpone() == null ? other.getIsPostpone() == null : this.getIsPostpone().equals(other.getIsPostpone()))
&& (this.getPostponeNum() == null ? other.getPostponeNum() == null : this.getPostponeNum().equals(other.getPostponeNum()));
}
@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());
result = prime * result + ((getIsPostpone() == null) ? 0 : getIsPostpone().hashCode());
result = prime * result + ((getPostponeNum() == null) ? 0 : getPostponeNum().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(", isPostpone=").append(isPostpone);
sb.append(", postponeNum=").append(postponeNum);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

View File

@ -1,14 +1,9 @@
package com.chaozhanggui.system.cashierservice.entity; package com.chaozhanggui.system.cashierservice.entity;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
@Data @Data
public class TbCashierCart implements Serializable { public class TbCashierCart implements Serializable {
@ -16,9 +11,9 @@ public class TbCashierCart implements Serializable {
private String masterId; private String masterId;
private Integer orderId; private String orderId;
private Integer refOrderId; private String refOrderId;
private BigDecimal totalAmount; private BigDecimal totalAmount;
@ -33,147 +28,37 @@ public class TbCashierCart implements Serializable {
private String name; private String name;
private BigDecimal salePrice; private BigDecimal salePrice;
private BigDecimal packFee;
private BigDecimal number; private Integer number;
private BigDecimal totalNumber; private Integer totalNumber;
private BigDecimal refundNumber; private Integer refundNumber;
private String categoryId; private String categoryId;
private String tradeDay;
private String status; private String status;
private Integer type; private Byte type;
private String merchantId; private String merchantId;
private String shopId; private String shopId;
private String isPack;
private String isGift;
private String skuName;
private String uuid;
private Long createdAt; private Long createdAt;
private Long updatedAt;
private Integer userId;
private String tableId;
private BigDecimal packFee;
private String tradeDay;
private String isPack;
private String isGift;
private Long pendingAt; private Long pendingAt;
private String uuid; private Long updatedAt;
private String skuName; private Integer userId;
private Integer placeNum; private String tableId;
private String note; private TbProductSpec tbProductSpec;
private String useType; private String selectSpec="";
private String platformType;
// 优惠券id
private Integer userCouponId;
private BigDecimal memberPrice = BigDecimal.ZERO;
private Integer isMember;
// 是否临时菜品
private Integer isTemporary;
private String unit;
private BigDecimal discountSaleAmount;
private String discountSaleNote;
private Integer isPrint;
private String useCouponInfo;
private int isThirdCoupon;
private String proGroupInfo;
private String typeEnum;
private Integer groupType;
public void copy(TbCashierCart source) { private static final long serialVersionUID = 1L;
BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); }
}
/**
* 根据是否会员充值价格
*/
public void resetTotalAmount() {
if (isThirdCoupon == 1) {
totalAmount = BigDecimal.ZERO;
return;
}
if ("false".equals(isPack)) {
packFee = BigDecimal.ZERO;
}
if ("true".equals(isGift)) {
totalAmount = packFee;
} else {
discountSaleAmount = discountSaleAmount == null ? BigDecimal.ZERO : discountSaleAmount;
BigDecimal subtract;
if (isMember != null && isMember == 1 && memberPrice != null && memberPrice.compareTo(BigDecimal.ZERO) > 0) {
subtract = memberPrice.subtract(discountSaleAmount);
} else {
subtract = salePrice.subtract(discountSaleAmount);
}
totalAmount = totalNumber.multiply(subtract.compareTo(BigDecimal.ZERO) < 0 ? BigDecimal.ZERO : subtract).add(packFee).setScale(2, RoundingMode.DOWN);
}
}
/**
* 根据是否会员充值价格
*/
public void resetTotalAmount(BigDecimal discountRadio) {
if (isThirdCoupon == 1) {
totalAmount = BigDecimal.ZERO;
return;
}
if (discountRadio == null) {
discountRadio = BigDecimal.ONE;
}
if ("false".equals(isPack)) {
packFee = BigDecimal.ZERO;
}
if ("true".equals(isGift)) {
totalAmount = packFee;
} else {
discountSaleAmount = discountSaleAmount == null ? BigDecimal.ZERO : discountSaleAmount;
BigDecimal subtract;
if (isMember != null && isMember == 1 && memberPrice != null && memberPrice.compareTo(BigDecimal.ZERO) > 0) {
subtract = memberPrice.subtract(discountSaleAmount);
totalAmount = totalNumber.multiply(subtract).add(packFee).multiply(discountRadio).setScale(2, RoundingMode.DOWN);
} else {
subtract = salePrice.subtract(discountSaleAmount);
totalAmount = totalNumber.multiply(subtract)
.add(packFee).multiply(discountRadio).setScale(2, RoundingMode.DOWN);
}
}
}
/**
* 获取总价不包含打包费
*
*/
public BigDecimal getTotalAmountByNum(BigDecimal num, BigDecimal discountRadio) {
if (isThirdCoupon == 1) {
return BigDecimal.ZERO;
}
if (discountRadio == null) {
discountRadio = new BigDecimal("1");
}
if (num == null) {
num = totalNumber;
}
if (isMember != null && isMember == 1 && memberPrice != null && memberPrice.compareTo(BigDecimal.ZERO) > 0) {
return num.multiply(memberPrice).multiply(discountRadio).add(packFee).setScale(2, RoundingMode.DOWN);
}else {
return num.multiply(discountSaleAmount != null ? discountSaleAmount : salePrice).add(packFee).multiply(discountRadio).setScale(2, RoundingMode.DOWN);
}
// if (isMember != null && isMember == 1 && memberPrice != null && memberPrice.compareTo(BigDecimal.ZERO) > 0) {
// return num.multiply(memberPrice);
// } else {
// return num.multiply(discountSaleAmount != null ? discountSaleAmount : salePrice);
// }
}
}

View File

@ -35,8 +35,6 @@ public class TbConsInfo implements Serializable {
private Date updateTime; private Date updateTime;
private String isCheck;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Integer getId() { public Integer getId() {
@ -158,12 +156,4 @@ public class TbConsInfo implements Serializable {
public void setPrice(BigDecimal price) { public void setPrice(BigDecimal price) {
this.price = price; this.price = price;
} }
}
public String getIsCheck() {
return isCheck;
}
public void setIsCheck(String isCheck) {
this.isCheck = isCheck;
}
}

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