Compare commits

..

No commits in common. "print" and "master" have entirely different histories.

253 changed files with 842 additions and 9653 deletions

View File

@ -74,6 +74,4 @@ public interface CacheKey {
*/
String PRODUCT = "PRODUCT:";
String SONG_URL = "song:";
String VIPCODE = "VIPCODE:";
}

View File

@ -23,11 +23,9 @@ import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.ExcelWriter;
import cn.ysk.cashier.exception.BadRequestException;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.util.IOUtils;
import org.apache.poi.xssf.streaming.SXSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.multipart.MultipartFile;
@ -39,8 +37,10 @@ import java.io.*;
import java.security.MessageDigest;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* File工具类扩展 hutool 工具包
@ -237,51 +237,6 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
IoUtil.close(out);
}
public static void downloadAndMergeExcel(List<Map<String, Object>> list, List<List<Integer>> mergeData, List<String> keyList, HttpServletResponse response) throws IOException {
String tempPath = SYS_TEM_DIR + IdUtil.fastSimpleUUID() + ".xlsx";
// 创建工作簿
Workbook workbook = new XSSFWorkbook();
// 创建工作表
Sheet sheet = workbook.createSheet("Sheet1");
// 合并单元格从第 0 行第 0 列到第 0 行第 2
// sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 2));
for (List<Integer> mergeDatum : mergeData) {
sheet.addMergedRegion(new CellRangeAddress(mergeDatum.get(0), mergeDatum.get(1), mergeDatum.get(2), mergeDatum.get(3)));
}
Row row0 = sheet.createRow(0);
for (int i = 0; i < keyList.size(); i++) {
Cell cell = row0.createCell(i);
cell.setCellValue(keyList.get(i));
}
for (int i = 0; i < list.size(); i++) {
Map<String, Object> map = list.get(i);
Row row = sheet.createRow(i + 1);
for (int j = 0; j < keyList.size(); j++) {
Cell cell = row.createCell(j);
cell.setCellValue(map.get(keyList.get(j)) == null ? "" : map.get(keyList.get(j)).toString());
}
}
// response为HttpServletResponse对象
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");
response.setHeader("Content-Disposition", "attachment;filename=file.xlsx");
try (FileOutputStream outputStream = new FileOutputStream(tempPath);
ServletOutputStream out = response.getOutputStream()) {
workbook.write(outputStream);
workbook.write(out);
} catch (IOException e) {
// 更详细的错误处理
e.printStackTrace();
// 可以考虑返回一个错误响应给客户端
}
}
/**
* 输入标题到excel
*
@ -315,7 +270,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
}
}
public static void downloadExcelAndMerge(ConcurrentLinkedQueue<Map<String, Object>> list, int colSize, HttpServletResponse response, List<Integer> mergeRowIndex) throws IOException {
public static void downloadExcelAndMerge(List<Map<String, Object>> list, int colSize, HttpServletResponse response, ArrayList<Integer> mergeRowIndex) throws IOException {
String tempPath = SYS_TEM_DIR + IdUtil.fastSimpleUUID() + ".xlsx";
File file = new File(tempPath);
ExcelWriter writer = ExcelUtil.getWriter(file);

View File

@ -257,15 +257,6 @@ public class RedisUtils {
}
}
public boolean setNx(String key, Object value) {
try {
return redisTemplate.opsForValue().setIfAbsent(key, value);
} catch (Exception e) {
log.error(e.getMessage(), e);
return false;
}
}
/**
* 普通缓存放入并设置时间
*

View File

@ -96,7 +96,8 @@ public class LogServiceImpl implements LogService {
String value = SpelUtil.generateKeyBySpEL(split[1], joinPoint);
// 描述
log.setDescription(split[0] + ":" + value);
} else if (split.length == 3) {
}
if (split.length == 3) {
// String v1 = SpelUtil.generateKeyBySpEL(split[1], joinPoint);
String v2 = SpelUtil.generateKeyBySpEL(split[2], joinPoint);
if (methodName.contains("createOutAndONOperate")) {

View File

@ -19,16 +19,7 @@
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>com.github.gavlyukovskiy</groupId>
<artifactId>p6spy-spring-boot-starter</artifactId>
<version>1.7.0</version>
</dependency>
<!-- 代码生成模块 -->
<dependency>
<groupId>cn.ysk.cashier</groupId>

View File

@ -36,8 +36,8 @@ import org.springframework.web.bind.annotation.RestController;
@EnableAsync
@RestController
@Api(hidden = true)
@EnableTransactionManagement
@SpringBootApplication
@EnableTransactionManagement
@EnableJpaAuditing(auditorAwareRef = "auditorAware")
public class AppRun {

View File

@ -13,10 +13,6 @@ public class RabbitConfig {
public static final String EXCHANGE_STOCK_RECORD = "exchange.stock.record";
public static final String ROUTING_STOCK_RECORD_SALE = "routing.stock.record.sale";
public static final String QUEUE_STOCK_RECORD = "queue.stock.record";
public static final String ROUTING_STOCK_RECORD= "routing.stock.record";
@Bean
Queue stockRecordSaleQueue() {
return new Queue(QUEUE_STOCK_RECORD_SALE);
@ -31,14 +27,4 @@ public class RabbitConfig {
Binding binding(Queue stockRecordSaleQueue, DirectExchange stockRecordExchange) {
return BindingBuilder.bind(stockRecordSaleQueue).to(stockRecordExchange).with(ROUTING_STOCK_RECORD_SALE);
}
@Bean
Queue stockRecordSaleQueue2() {
return new Queue(QUEUE_STOCK_RECORD);
}
@Bean
Binding binding2(Queue stockRecordSaleQueue2, DirectExchange stockRecordExchange) {
return BindingBuilder.bind(stockRecordSaleQueue2).to(stockRecordExchange).with(ROUTING_STOCK_RECORD);
}
}

View File

@ -1,25 +0,0 @@
package cn.ysk.cashier.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;
@Configuration//加上这个注解作用可以被Spring扫描
public class RestTemplateConfig {
@Bean
public RestTemplate restTemplate(ClientHttpRequestFactory factory){
return new RestTemplate(factory);
}
@Bean
public ClientHttpRequestFactory simpleClientHttpRequestFactory(){
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
factory.setReadTimeout(500000);//单位为ms
factory.setConnectTimeout(500000);//单位为ms
return factory;
}
}

View File

@ -43,7 +43,6 @@ import cn.ysk.cashier.config.security.service.dto.JwtUserDto;
import cn.ysk.cashier.config.security.service.OnlineUserService;
import cn.ysk.cashier.pojo.shop.TbShopInfo;
import cn.ysk.cashier.repository.shop.TbShopInfoRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
@ -233,14 +232,6 @@ public class AuthorizationController {
return ResponseEntity.ok(imgResult);
}
@ApiOperation("设置验证码")
@AnonymousGetMapping(value = "/setCode")
public ResponseEntity<Object> setCode(@RequestParam String uuid, @RequestParam String code) {
// 保存
redisUtils.set(uuid, code, loginProperties.getLoginCode().getExpiration(), TimeUnit.MINUTES);
return ResponseEntity.ok("ok");
}
@ApiOperation("退出登录")
@AnonymousDeleteMapping(value = "/logout")
public ResponseEntity<Object> logout(HttpServletRequest request) {

View File

@ -105,7 +105,6 @@ public class TokenProvider implements InitializingBean {
.getBody();
}
/**
* @param token 需要检查的token
*/
@ -138,17 +137,4 @@ public class TokenProvider implements InitializingBean {
}
return null;
}
public String getSubject() {
HttpServletRequest request = SpringContextHolder.getRequest();
final String requestHeader = request.getHeader(properties.getHeader());
if (requestHeader != null && requestHeader.startsWith(properties.getTokenStartWith())) {
Claims claims = jwtParser
.parseClaimsJws(requestHeader.substring(7))
.getBody();
return claims.getSubject();
}
return null;
}
}

View File

@ -1,46 +0,0 @@
package cn.ysk.cashier.cons;
public interface RedisConstant {
//在线用户
String ONLINE_USER = "ONLINE:USER";
String CART = "CZG:CART:";
public final Object PRODUCT = "PRODUCT:";
public final String OUT_NUMBER="ORDER:NUMBER:";
public static final String ORDER_MESSAGE="ORDER:MESSAGE:";
public static final String ORDER_PRODUCT_NUM = "ORDER_NUM:";
public static final String ORDER_CART_EXISTS = "ORDER_CART_EXISTS:";
String CURRENT_TABLE_ORDER = "CURRENT_TABLE_ORDER:";
public static String TABLE_CART = "TABLE:CART:";
String ADD_TABLE_CART_LOCK = "ADD_TABLE_CART";
String PC_OUT_NUMBER = "PC_OUT_NUMBER:";
String LOCK_KEY = "LOCK:";
String CREATE_ORDER = "CREATE_ORDER";
// 排队取号全局号码
String TABLE_CALL_NUMBER = "TABLE_CALL_NUMBER:";
static String getCurrentOrderKey(String tableId, String shopId) {
return CURRENT_TABLE_ORDER + shopId + ":" + tableId;
}
static String getTableCartKey(String tableId, String shopId) {
return TABLE_CART + tableId + "-" + shopId;
}
static String getLockKey(String sign, Object... args) {
StringBuilder key = new StringBuilder(LOCK_KEY + ":" + sign + ":");
for (Object arg : args) {
key.append(":").append(arg.toString());
}
return key.toString();
}
static String getTableCallNumKey(Integer shopId, Integer callTableId) {
return TABLE_CALL_NUMBER + shopId + ":" + callTableId;
}
}

View File

@ -101,12 +101,6 @@ public class TbConsInfo implements Serializable {
@ApiModelProperty(value = "消耗总量")
private BigDecimal stockConsume;
@Column(name = "`is_check`")
@ApiModelProperty(value = "是否检测库存")
private String isCheck;
public void copy(TbConsInfo source){
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
}

View File

@ -23,7 +23,6 @@ import javax.persistence.*;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
/**
* @author admin
@ -75,11 +74,6 @@ public class ViewConInfoFlow implements Serializable {
private BigDecimal balance;
@Column(name = "`status`")
@ApiModelProperty(value = "status")
private String status;
@Column(name = "`product_id`")
@ApiModelProperty(value = "商品id")
@ -90,48 +84,6 @@ public class ViewConInfoFlow implements Serializable {
@ApiModelProperty(value = "商品名称")
private String productName;
@Column(name = "`con_code`")
@ApiModelProperty(value = "耗材代码")
private String conCode;
@Column(name = "`con_type_code`")
@ApiModelProperty(value = "耗材类型代码")
private String conTypeCode;
@Column(name = "`con_type_name`")
@ApiModelProperty(value = "耗材类型名称")
private String conTypeName;
@Column(name = "`con_unit`")
@ApiModelProperty(value = "耗材单位")
private String conUnit;
@Column(name = "`con_warning`")
@ApiModelProperty(value = "预警值")
private String conWarning;
@Column(name = "`con_type_id`")
@ApiModelProperty(value = "耗材类型名称")
private Integer conTypeId;
@Column(name = "`is_check`")
@ApiModelProperty(value = "是否检测库存")
private String isCheck;
@Column(name = "`create_time`")
@ApiModelProperty(value = "创建时间")
private Date createTime;
@Column(name = "`update_time`")
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@Column(name = "price")
@ApiModelProperty(value = "单价")
private BigDecimal price;
public void copy(ViewConInfoFlow source){

View File

@ -5,27 +5,4 @@ public interface RabbitConstants {
String CONS_COLLECT_ROUTINGKEY_PUT = "cons_collect_routingkey_put";
String CONS_MSG_COLLECT_PUT = "cons_msg_collect_put";
String CONS_MSG_COLLECT_ROUTINGKEY_PUT = "cons_msg_collect_routingkey_put";
String CART_ORDER_COLLECT_PUT = "cart_order_collect_put";
String CART_ORDER_COLLECT_ROUTINGKEY_PUT = "cart_order_collect_routingkey_put";
// 打印
String PRINT_MECHINE_COLLECT_PUT="print_mechine_collect_put";
String PRINT_MECHINE_COLLECT_QUEUE_PUT = "print_mechine_collect_queue_put";
String PRINT_MECHINE_COLLECT_ROUTINGKEY_PUT = "print_mechine_collect_routingkey_put";
// 售出记录
String EXCHANGE_STOCK_RECORD = "exchange.stock.record";
String ROUTING_STOCK_RECORD_SALE = "routing.stock.record.sale";
// 菜品打印
String EXCHANGE_PRINT = "exchange.print";
String ROUTING_KEY_PRINT_DISHES = "routing.dishes.print1";
// 订单打印
String QUEUE_PRINT_PLACE = "queue.place.order.print";
String ROUTING_KEY_PRINT_PLACE = "routing.place.order.print";
}

View File

@ -51,7 +51,6 @@ public class TbProskuConController {
} catch (BadRequestException be) {
throw new Exception(be.getMessage());
}catch (Exception e){
e.printStackTrace();
throw new Exception("相同商品耗材信息不允许添加");
}
}

View File

@ -77,7 +77,4 @@ public class TbConsInfoDto implements Serializable {
private String contypeCode;
private String isCheck;
}

View File

@ -68,6 +68,4 @@ public class TbConsInfoFlowDto implements Serializable {
private Integer orderId;
private String orderNo;
}

View File

@ -21,7 +21,6 @@ import lombok.Data;
import javax.persistence.Column;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
/**
* @author admin
@ -50,24 +49,4 @@ public class ViewConInfoFlowDto implements Serializable {
private String productId;
private String productName;
private String status;
private String conCode;
private String conTypeCode;
private String conTypeName;
private String conUnit;
private String conWarning;
private Integer conTypeId;
private String isCheck;
private Date createTime;
private Date updateTime;
private BigDecimal price;
}

View File

@ -18,7 +18,4 @@ public class ViewConInfoFlowQueryCriteria{
@Query
private String shopId;
@Query
private String conTypeCode;
}

View File

@ -1,7 +1,6 @@
package cn.ysk.cashier.cons.service.impl;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.ysk.cashier.cons.domain.*;
import cn.ysk.cashier.cons.repository.TbConsInfoFlowRepository;
import cn.ysk.cashier.cons.repository.TbConsInfoRepository;
@ -82,9 +81,9 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
@Override
public List<TbConsInfoDto> queryAll(TbConsInfoQueryCriteria criteria) {
List<TbConsInfoDto> list = tbConsInfoMapper.toDto(tbConsInfoRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, criteria, criteriaBuilder)));
if (Objects.nonNull(list) && list.size() > 0) {
list.parallelStream().forEach(it -> {
List<TbConsInfoDto> list= tbConsInfoMapper.toDto(tbConsInfoRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, criteria, criteriaBuilder)));
if(Objects.nonNull(list)&&list.size()>0){
list.parallelStream().forEach(it->{
it.setContypeCode(tbConsTypeRepository.findById(it.getConTypeId()).orElseGet(TbConsType::new).getConTypeCode());
});
}
@ -116,31 +115,14 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
// }
resource.setConCode(StringCodeUtil.getRandom(8, LETTER_CAPITAL_NUMBER));
resource.setConCode(StringCodeUtil.getRandom(8,LETTER_CAPITAL_NUMBER));
resource.setConTypeName(tbConsType.getConTypeName());
resource.setLasterInStock(BigDecimal.ZERO);
resource.setStockNumber(BigDecimal.ZERO);
resource.setStatus("1");
resource.setStockConsume(BigDecimal.ZERO);
resource.setCreateTime(new Timestamp(System.currentTimeMillis()));
resource = tbConsInfoRepository.save(resource);
TbConsInfoFlow flow = new TbConsInfoFlow();
flow.setBizCode("stockIn");
flow.setBizName("初始化入库");
flow.setBizType("+");
flow.setConsId(resource.getId());
flow.setShopId(resource.getShopId());
flow.setConName(resource.getConName());
flow.setAmount(BigDecimal.ZERO);
flow.setBalance(BigDecimal.ZERO);
flow.setCreateTime(new Timestamp(System.currentTimeMillis()));
tbConsInfoFlowRepository.save(flow);
tbConsInfoRepository.save(resource);
}
return tbConsInfoMapper.toDto(new TbConsInfo());
}
@ -155,14 +137,12 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
throw new Exception("耗材信息不存在");
}
tbConsInfo.setConName(ObjectUtil.isEmpty(resource.getConName())||ObjectUtil.isNull(resource.getConName())?tbConsInfo.getConName():resource.getConName());
tbConsInfo.setPrice(ObjectUtil.isEmpty(resource.getPrice())||ObjectUtil.isNull(resource.getPrice())?tbConsInfo.getPrice():resource.getPrice());
tbConsInfo.setConUnit(ObjectUtil.isEmpty(resource.getConUnit())||ObjectUtil.isNull(resource.getConUnit())?tbConsInfo.getConUnit(): resource.getConUnit());
tbConsInfo.setConWarning(ObjectUtil.isEmpty(resource.getConWarning())||ObjectUtil.isNull(resource.getConWarning())?tbConsInfo.getConWarning():resource.getConWarning());
tbConsInfo.setStatus(ObjectUtil.isEmpty(resource.getStatus())||ObjectUtil.isNull(resource.getStatus())?tbConsInfo.getStatus():resource.getStatus());
tbConsInfo.setIsCheck(ObjectUtil.isEmpty(resource.getIsCheck())||ObjectUtil.isNull(resource.getIsCheck())?tbConsInfo.getIsCheck():resource.getIsCheck());
tbConsInfo.setConName(resource.getConName());
tbConsInfo.setPrice(resource.getPrice());
tbConsInfo.setConUnit(resource.getConUnit());
tbConsInfo.setConWarning(resource.getConWarning());
tbConsInfo.setStatus(resource.getStatus());
tbConsInfo.setUpdateTime(new Timestamp(System.currentTimeMillis()));
tbConsInfoRepository.save(tbConsInfo);
}
@ -184,9 +164,9 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
map.put("耗材名称", tbConsInfo.getConName());
map.put("耗材类型代码", tbConsInfo.getContypeCode());
map.put("单位", tbConsInfo.getConUnit());
map.put("价格", tbConsInfo.getPrice());
map.put("耗材预警值", tbConsInfo.getConWarning());
map.put("库存", tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()));
map.put("价格",tbConsInfo.getPrice());
map.put("耗材预警值",tbConsInfo.getConWarning());
map.put("库存",tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()));
list.add(map);
}
FileUtil.downloadExcel(list, response);
@ -195,7 +175,7 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
@Override
@Transactional(rollbackFor = Exception.class)
public void stockInOut(SuppFlow resources) throws Exception {
log.info("resources:{}", JSON.toJSONString(resources));
log.info("resources:{}",JSON.toJSONString(resources));
if (Objects.isNull(resources)) {
throw new Exception("参数错误");
}
@ -205,9 +185,9 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
throw new Exception("店铺信息不存在");
}
TbShopPurveyor purveyor = null;
TbShopPurveyor purveyor=null;
TbProductStockOperate stockOperate = new TbProductStockOperate();
if (Objects.nonNull(resources.getSupplierId())) {
if(Objects.nonNull(resources.getSupplierId())){
purveyor = tbShopPurveyorRepository.getById(resources.getSupplierId());
if (Objects.nonNull(purveyor)) {
stockOperate.setPurveyorId(resources.getSupplierId().toString());
@ -217,7 +197,7 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
stockOperate.setShopId(tbShopInfo.getId().toString());
stockOperate.setStockSnap("");
stockOperate.setType(resources.getType().equals("in") ? "cons_in" : "cons_out");
stockOperate.setType(resources.getType().equals("in")?"cons_in":"cons_out");
Map<String, String> operatorSnapMap = new HashMap<>();
operatorSnapMap.put("name", tbShopInfo.getShopName());
operatorSnapMap.put("account", tbShopInfo.getAccount());
@ -229,11 +209,11 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
stockOperate.setUpdatedAt(System.currentTimeMillis());
stockOperate.setStatus("normal");
JSONArray array = new JSONArray();
JSONArray array=new JSONArray();
for (SuppFlow.ConInfos conInfos : resources.getList()) {
JSONObject object = new JSONObject();
JSONObject object=new JSONObject();
TbConsInfo info = tbConsInfoRepository.getById(conInfos.getConInfold());
if (Objects.isNull(info)) {
@ -247,19 +227,19 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
TbShopPurveyorTransact purveyorTransact = new TbShopPurveyorTransact();
purveyorTransact.setShopId(tbShopInfo.getId().toString());
purveyorTransact.setPurveyorName(Objects.isNull(purveyor) ? "" : purveyor.getPurveyorName());
purveyorTransact.setPurveyorId(Objects.isNull(purveyor) ? "" : purveyor.getId().toString());
purveyorTransact.setPurveyorName(Objects.isNull(purveyor)?"":purveyor.getPurveyorName());
purveyorTransact.setPurveyorId(Objects.isNull(purveyor)?"":purveyor.getId().toString());
purveyorTransact.setRemark(resources.getRemark());
purveyorTransact.setCreatedAt(System.currentTimeMillis());
purveyorTransact.setUpdatedAt(System.currentTimeMillis());
suppFlow.setConInfoId(info.getConTypeId());
suppFlow.setShopId(resources.getShopId());
suppFlow.setSupplierId(Objects.isNull(resources.getSupplierId()) ? 0 : resources.getSupplierId());
suppFlow.setSupplierId(Objects.isNull(resources.getSupplierId())?0: resources.getSupplierId());
suppFlow.setType(resources.getType());
suppFlow.setStockNumber(conInfos.getStockNumber());
BigDecimal amount = info.getStockNumber().subtract(info.getStockConsume());
BigDecimal amount=info.getStockNumber().subtract(info.getStockConsume());
if ("in".equals(resources.getType())) {
@ -279,17 +259,19 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
purveyorTransact.setWaitAmount((resources.getAccountsPayable().subtract(resources.getActualPayment())));
purveyorTransact.setType("cons_in");
object.put("number", conInfos.getStockNumber());
} else if ("out".equals(resources.getType())) {
object.put("number",conInfos.getStockNumber());
} else if("out".equals(resources.getType())) {
stockOperate.setSubType(-1);
if (conInfos.getStockNumber().compareTo(info.getStockNumber()) > 0) {
if(conInfos.getStockNumber().compareTo(info.getStockNumber())>0){
throw new BadRequestException("出库数量大于现有的库存数量");
}
info.setStockNumber(info.getStockNumber().subtract(conInfos.getStockNumber()));
suppFlow.setBalance(info.getStockNumber().subtract(info.getStockConsume()).subtract(conInfos.getStockNumber()));
@ -302,16 +284,16 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
purveyorTransact.setWaitAmount((resources.getAccountsPayable().subtract(resources.getActualPayment())).negate());
purveyorTransact.setType("cons_out");
object.put("number", conInfos.getStockNumber());
} else {
object.put("number",conInfos.getStockNumber());
}else {
throw new BadRequestException("错误操作类型");
}
object.put("stockNumber", amount);
object.put("stockNumber",amount);
object.put("name", info.getConName());
object.put("unitName", info.getConUnit());
object.put("name",info.getConName());
object.put("unitName",info.getConUnit());
array.add(object);
suppFlow.setPrice(conInfos.getPrice());
@ -365,7 +347,7 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
XSSFSheet sheet = xssfWorkbook.getSheetAt(0);
XSSFRow row = null;
List<TbConsInfo> consInfos = new ArrayList<>();
List<TbConsInfo> consInfos=new ArrayList<>();
for (int i = 1; i < sheet.getPhysicalNumberOfRows(); i++) {
row = sheet.getRow(i);
if (row != null) {
@ -429,7 +411,7 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
TbConsInfo consInfo = tbConsInfoRepository.findByConCode(cell0.toString());
if (ObjectUtil.isEmpty(consInfo) || ObjectUtil.isNull(consInfo)) {
consInfo = new TbConsInfo();
consInfo.setConCode(StringCodeUtil.getRandom(8, LETTER_CAPITAL_NUMBER));
consInfo.setConCode(StringCodeUtil.getRandom(8,LETTER_CAPITAL_NUMBER));
consInfo.setShopId(Integer.valueOf(shopId));
consInfo.setConTypeId(tbConsType.getId());
consInfo.setConTypeName(tbConsType.getConTypeName());
@ -485,7 +467,7 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
}
} else {
TbConsInfo consInfo = new TbConsInfo();
consInfo.setConCode(StringCodeUtil.getRandom(8, LETTER_CAPITAL_NUMBER));
consInfo.setConCode(StringCodeUtil.getRandom(8,LETTER_CAPITAL_NUMBER));
consInfo.setShopId(Integer.valueOf(shopId));
consInfo.setConTypeId(tbConsType.getId());
consInfo.setConTypeName(tbConsType.getConTypeName());
@ -521,7 +503,7 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
}
public static void main(String[] args) {
public static void main(String[] args){
System.out.println(UUID.randomUUID().toString());
}

View File

@ -71,8 +71,6 @@ public class TbProskuConServiceImpl implements TbProskuConService {
@Override
@Transactional(rollbackFor = Exception.class)
public TbProskuConDto create(List<ProskuInfo> resources) throws BadRequestException,Exception {
log.info("List<ProskuInfo> resources:{}",JSONUtil.toJSONString(resources));
for (ProskuInfo resource : resources) {
TbProduct product= tbProductRepository.getById(resource.getProductId());
if(Objects.isNull(product)){

View File

@ -1,106 +0,0 @@
package cn.ysk.cashier.controller;
import cn.ysk.cashier.annotation.AnonymousAccess;
import cn.ysk.cashier.dto.calltable.*;
import cn.ysk.cashier.exception.BadRequestException;
import cn.ysk.cashier.service.app.TbCallService;
import lombok.AllArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
/**
* 叫号
*/
@RestController
@RequestMapping("/callTable")
@AllArgsConstructor
public class TbCallTableController {
private final TbCallService tbCallService;
@AnonymousAccess
@GetMapping
public ResponseEntity<?> get(
@RequestParam(required = false) Integer callTableId,
@RequestParam Integer shopId,
@RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer size,
@RequestParam(required = false) Integer state
) {
return ResponseEntity.ok(tbCallService.get(page, size, shopId, callTableId, state));
}
@AnonymousAccess
@PostMapping
public ResponseEntity<?> add(
@Validated @RequestBody CallTableDTO addCallTableDTO
) {
return ResponseEntity.ok(tbCallService.add(addCallTableDTO));
}
@AnonymousAccess
@PutMapping
public ResponseEntity<?> update(
@Validated @RequestBody UpdateCallTableDTO callTableDTO
) {
return ResponseEntity.ok(tbCallService.update(callTableDTO));
}
@AnonymousAccess
@DeleteMapping
public ResponseEntity<?> delete(
@Validated @RequestBody BaseCallTableDTO baseCallTableDTO
) {
return ResponseEntity.ok(tbCallService.delete(baseCallTableDTO));
}
@AnonymousAccess
@PostMapping("takeNumber")
public ResponseEntity<?> takeNumber(
@Validated @RequestBody TakeNumberDTO takeNumberDTO
) {
return ResponseEntity.ok(tbCallService.takeNumber(takeNumberDTO));
}
@AnonymousAccess
@GetMapping("takeNumberCode")
public ResponseEntity<?> takeNumberCode(
@RequestParam Integer shopId,
@RequestParam Integer callTableId
) {
return ResponseEntity.ok(tbCallService.takeNumberCode(shopId, callTableId));
}
@AnonymousAccess
@PostMapping("call")
public ResponseEntity<?> call(
@Validated @RequestBody CallQueueDTO callQueueDTO
) {
return ResponseEntity.ok(tbCallService.call(callQueueDTO));
}
@AnonymousAccess
@PutMapping("updateState")
public ResponseEntity<?> confirm(
@Validated @RequestBody UpdateCallQueueDTO updateCallQueueDTO
) {
return ResponseEntity.ok(tbCallService.updateInfo(updateCallQueueDTO));
}
@AnonymousAccess
@GetMapping("queue")
public ResponseEntity<?> getQueue(
@RequestParam Integer shopId,
@RequestParam(required = false) Integer callTableId,
@RequestParam(required = false) Integer state,
@RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer size
) {
return ResponseEntity.ok(tbCallService.getQueue(shopId, callTableId, state, page, size));
}
}

View File

@ -1,46 +0,0 @@
package cn.ysk.cashier.controller;
import cn.ysk.cashier.dto.TbMiniAppPagesDto;
import cn.ysk.cashier.mybatis.service.TbMiniAppPagesService;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* @author GYJ
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/miniAppPages")
public class TbMiniAppPagesController {
final private TbMiniAppPagesService tbMiniAppPagesService;
@PostMapping
@ApiOperation("新增/system/miniAppPages")
public ResponseEntity<Object> createTbMiniAppPages(@Validated @RequestBody TbMiniAppPagesDto pagesDto) {
return tbMiniAppPagesService.createTbMiniAppPages(pagesDto);
}
@PutMapping
@ApiOperation("修改/system/miniAppPages")
public ResponseEntity<Object> updateTbMiniAppPages(@Validated @RequestBody TbMiniAppPagesDto pagesDto) {
return tbMiniAppPagesService.updateTbMiniAppPages(pagesDto);
}
@DeleteMapping("/{pagesId}")
@ApiOperation("删除/system/miniAppPages")
public ResponseEntity<Object> deleteTbMiniAppPages(@PathVariable Integer pagesId) {
return tbMiniAppPagesService.deleteTbMiniAppPages(pagesId);
}
@GetMapping
@ApiOperation("查询/system/miniAppPages")
public ResponseEntity<Object> getTbMiniAppPages(@RequestParam Map<String, Object> params) {
return tbMiniAppPagesService.getTbMiniAppPages(params);
}
}

View File

@ -1,27 +0,0 @@
package cn.ysk.cashier.controller;
import cn.ysk.cashier.dto.ScanPayDTO;
import cn.ysk.cashier.service.TbPayService;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/pay")
public class TbPayController {
private final TbPayService payService;
public TbPayController(TbPayService payService) {
this.payService = payService;
}
@PostMapping("/scanPay")
public ResponseEntity<?> scanPay(
@RequestBody @Validated ScanPayDTO scanPayDTO
) {
// payService.scanPay(scanPayDTO);
return null;
}
}

View File

@ -0,0 +1,185 @@
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.ysk.cashier.controller;
import cn.ysk.cashier.annotation.Log;
import cn.ysk.cashier.exception.BadRequestException;
import cn.ysk.cashier.pojo.TbUserInfo;
import cn.ysk.cashier.pojo.shop.TbMerchantAccount;
import cn.ysk.cashier.repository.TbUserInfoRepository;
import cn.ysk.cashier.repository.shop.TbMerchantAccountRepository;
import cn.ysk.cashier.service.TbUserInfoService;
import cn.ysk.cashier.dto.TbUserInfoQueryCriteria;
import cn.ysk.cashier.utils.*;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.aliyun.dysmsapi20170525.models.SendSmsResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*;
import java.io.IOException;
import java.util.Map;
import java.util.Objects;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @website https://eladmin.vip
* @author lyf
* @date 2023-11-13
**/
@RestController
@RequiredArgsConstructor
@Api(tags = "/userInfo/list管理")
@RequestMapping("/api/tbUserInfo")
public class TbUserInfoController {
private final TbUserInfoService tbUserInfoService;
@ApiOperation("导出数据")
@GetMapping(value = "/download")
@PreAuthorize("@el.check('tbUserInfo:list')")
public void exportTbUserInfo(HttpServletResponse response, TbUserInfoQueryCriteria criteria) throws IOException {
tbUserInfoService.download(tbUserInfoService.queryAll(criteria), response);
}
@GetMapping
@ApiOperation("查询/userInfo/list")
public ResponseEntity<Object> queryTbUserInfo(TbUserInfoQueryCriteria criteria, Pageable pageable){
return new ResponseEntity<>(tbUserInfoService.queryAll(criteria,pageable),HttpStatus.OK);
}
@PostMapping
@ApiOperation("新增/userInfo/list")
public ResponseEntity<Object> createTbUserInfo(@Validated @RequestBody TbUserInfo resources){
return new ResponseEntity<>(tbUserInfoService.create(resources),HttpStatus.CREATED);
}
@PutMapping
@ApiOperation("修改/userInfo/list")
public ResponseEntity<Object> updateTbUserInfo(@Validated @RequestBody TbUserInfo resources){
tbUserInfoService.update(resources);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@DeleteMapping
@ApiOperation("删除/userInfo/list")
public ResponseEntity<Object> deleteTbUserInfo(@RequestBody Integer[] ids) {
tbUserInfoService.deleteAll(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
@Autowired
ValidateCodeUtil validateCodeUtil;
@Autowired
RedisUtils redisUtils;
@GetMapping("sendMsg")
public Object sendMsg(){
Object o= SecurityContextHolder.getContext().getAuthentication().getPrincipal();
if(Objects.isNull(o)){
throw new BadRequestException("用户登录信息失效");
}
JSONObject object=JSON.parseObject(JSON.toJSONString(o));
if(Objects.isNull(object)){
throw new BadRequestException("用户登录信息失效");
}
String regex="^\\d{11}$";
if(!object.containsKey("username")||Objects.isNull(object.getString("username"))||
!object.getString("username").matches(regex)
){
throw new BadRequestException("用户登录信息失效");
}
String phone=object.getString("username");
String tempcode="SMS_244665149";
String random = StringUtil.random(6);
try {
validateCodeUtil.requestValidateCodeAli(phone, random,tempcode);
redisUtils.set(phone.concat("#").concat(tempcode),random,300L);
return "{\n" +
" \"code\": 0,\n" +
" \"msg\": \"成功\"\n" +
"}";
} catch (Exception e) {
throw new RuntimeException(e.getMessage());
}
}
@Autowired
TbMerchantAccountRepository tbMerchantAccountRepository;
@RequestMapping(value = "modfiyUserInfo",method = RequestMethod.POST)
public ResponseEntity<Object> modfiyUserInfo(@RequestBody Map<String,String> map){
Object o= SecurityContextHolder.getContext().getAuthentication().getPrincipal();
if(Objects.isNull(o)){
throw new BadRequestException("用户登录信息失效");
}
JSONObject object=JSON.parseObject(JSON.toJSONString(o));
if(Objects.isNull(object)){
throw new BadRequestException("用户登录信息失效");
}
String regex="^\\d{11}$";
if(!object.containsKey("username")||Objects.isNull(object.getString("username"))||
!object.getString("username").matches(regex)
){
throw new BadRequestException("用户登录信息失效");
}
String tempcode="SMS_244665149";
String phone=object.getString("username");
Object redisCode= redisUtils.get(phone.concat("#").concat(tempcode));
if(Objects.isNull(redisCode)){
throw new BadRequestException("短信验证码已过期");
}
String code= map.get("code");
if(!redisCode.toString().equals(code)){
throw new BadRequestException("短信验证码错误");
}
redisUtils.del(phone.concat("#").concat(tempcode));
String pwd= map.get("pwd");
TbMerchantAccount account= tbMerchantAccountRepository.findByAccount(phone);
if(Objects.isNull(account)){
throw new BadRequestException("账户不存在");
}
account.setPwd(MD5Utils.md5(pwd.concat(account.getAccount()).concat(account.getId().toString())));
account.setUpdatedAt(System.currentTimeMillis());
tbMerchantAccountRepository.save(account);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
}

View File

@ -28,29 +28,18 @@ public class TbVersionController {
}
@PostMapping
@Log("版本管理 新增")
@ApiOperation("新增版本")
public ResponseEntity<Object> createTbVersion(@Validated @RequestBody TbVersion resources){
return new ResponseEntity<>(tbVersionService.create(resources),HttpStatus.CREATED);
}
@PutMapping
@Log("版本管理 修改")
@ApiOperation("修改版本")
public ResponseEntity<Object> updateTbVersion(@Validated @RequestBody TbVersion resources){
tbVersionService.update(resources);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@PutMapping("upSel")
@Log("版本管理 修改选中")
@ApiOperation("修改当前选中")
public ResponseEntity<Object> updateSel(@Validated @RequestBody TbVersion resources){
tbVersionService.updateSel(resources);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@DeleteMapping
@ApiOperation("删除版本")
public ResponseEntity<Object> deleteTbVersion(@RequestBody Integer[] ids) {

View File

@ -42,6 +42,7 @@ public class TbOrderInfoController {
@PostMapping("/date")
@ApiOperation("查询订单")
@AnonymousPostMapping
public ResponseEntity<Object> queryTbOrderInfo(@RequestBody TbOrderInfoQueryCriteria criteria){
return new ResponseEntity<>(tbOrderInfoService.queryAllPage(criteria),HttpStatus.OK);
}

View File

@ -1,273 +0,0 @@
package cn.ysk.cashier.controller.product;
import cn.ysk.cashier.annotation.AnonymousAccess;
import cn.ysk.cashier.annotation.Log;
import cn.ysk.cashier.cons.rabbit.RabbitConstants;
import cn.ysk.cashier.dto.shoptable.*;
import cn.ysk.cashier.pojo.order.TbCashierCart;
import cn.ysk.cashier.service.product.TbProductService;
import cn.ysk.cashier.service.shop.TbShopTableService;
import cn.ysk.cashier.utils.RabbitMsgUtils;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiOperation;
import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.Validator;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.UUID;
@RestController
@RequestMapping("/api/place")
public class TbPlaceController {
private final TbShopTableService tbShopTableService;
private final TbProductService tbProductService;
private final Validator validator;
private final RabbitMsgUtils rabbitMsgUtils;
@AnonymousAccess
@GetMapping ("/activate")
@ApiOperation("查询/product")
public ResponseEntity<Object> queryActivateTbProductInfo(
@RequestParam(defaultValue = "0") Integer page,
@RequestParam(defaultValue = "30") Integer size,
@RequestParam(required = false) Integer categoryId,
@RequestParam Integer shopId,
@RequestParam(required = false) Integer productId
){
return new ResponseEntity<>(tbProductService.activateProduct(page, size, categoryId, shopId, productId),HttpStatus.OK);
}
public TbPlaceController(TbShopTableService tbShopTableService, TbProductService tbProductService, Validator validator, RabbitTemplate rabbitTemplate, RabbitMsgUtils rabbitMsgUtils) {
this.tbShopTableService = tbShopTableService;
this.tbProductService = tbProductService;
this.validator = validator;
this.rabbitTemplate = rabbitTemplate;
this.rabbitMsgUtils = rabbitMsgUtils;
}
@AnonymousAccess
@PostMapping("/addCart")
@Log("代客下单:#addCartDTO.tableId")
@ApiOperation("代客下单/shop/table")
public ResponseEntity<TbCashierCart> addCartForUser(@Valid @RequestBody AddCartDTO addCartDTO) {
return ResponseEntity.ok(tbShopTableService.addCartForUser(addCartDTO));
}
@AnonymousAccess
@PutMapping("/updateCart")
@Log("代客下单")
@ApiOperation("代客下单/shop/table")
public ResponseEntity<TbCashierCart> updateCart(@Valid @RequestBody UpdateCartDTO updateCartDTO) {
return ResponseEntity.ok(tbShopTableService.updateCart(updateCartDTO));
}
@AnonymousAccess
@PutMapping("/pack")
@Log("代客下单")
@ApiOperation("代客下单/shop/table")
public ResponseEntity<TbCashierCart> pack(@Valid @RequestBody PackCartDTO packCartDTO) {
tbShopTableService.pack(packCartDTO);
return ResponseEntity.ok(null);
}
@AnonymousAccess
@DeleteMapping("/removeCart")
@Log("代客下单 删除购物车商品")
@ApiOperation("代客下单 清空购物车 /shop/table")
public ResponseEntity<Object> removeCart(@Validated @RequestBody RemoveCartDTO removeCartDTO) {
tbShopTableService.removeCart(removeCartDTO);
return new ResponseEntity<>(HttpStatus.OK);
}
@AnonymousAccess
@PutMapping("/returnCart")
@Log("代客下单 退单")
@ApiOperation("代客下单 清空购物车 /shop/table")
public ResponseEntity<Object> returnOrder(@Validated @RequestBody RemoveCartDTO removeCartDTO) {
tbShopTableService.returnCart(removeCartDTO);
return new ResponseEntity<>(HttpStatus.OK);
}
@AnonymousAccess
@DeleteMapping("/clearCart")
@Log("代客下单 清空购物车")
@ApiOperation("代客下单 清空购物车 /shop/table"/**/)
public ResponseEntity<Object> clearCart(@Validated @RequestBody ClearCartDTO clearCartDTO) {
tbShopTableService.clearCart(clearCartDTO);
return new ResponseEntity<>(HttpStatus.OK);
}
@AnonymousAccess
@GetMapping("/cart")
@Log("代客下单 查询购物车")
@ApiOperation("代客下单 查询购物车 /shop/table")
public ResponseEntity<Object> getCart(
@RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer size,
@RequestParam Long tableId,
@RequestParam Integer shopId,
@RequestParam(required = false) Integer vipUserId,
@RequestParam String masterId
) {
return ResponseEntity.ok(tbShopTableService.getCart(tableId, page, size, shopId, vipUserId, masterId));
}
@AnonymousAccess
@GetMapping("/pending/cart")
@Log("代客下单 查询购物车")
@ApiOperation("代客下单 查询购物车 /shop/table")
public ResponseEntity<Object> getPendingCart(
@RequestParam Integer shopId,
@RequestParam String tableId
) {
return ResponseEntity.ok(tbShopTableService.getCar(shopId, tableId));
}
@AnonymousAccess
@GetMapping("/masterId")
@Log("代客下单 查询购物车")
@ApiOperation("代客下单 ")
public ResponseEntity<Object> getMasterId(
@RequestParam Integer shopId,
@RequestParam Long tableId,
@RequestParam(required = false) Integer vipUserId
) {
return ResponseEntity.ok(tbShopTableService.getMasterId(shopId, tableId, vipUserId));
}
@AnonymousAccess
@PostMapping("/order")
@Log("代客下单 查询购物车")
@ApiOperation("代客下单 查询购物车 /shop/table")
public ResponseEntity<Object> createOrder(
@RequestBody CreateOrderDTO createOrderDTO
) {
return ResponseEntity.ok(tbShopTableService.createOrder(createOrderDTO, !createOrderDTO.isPostPay(), true));
}
@AnonymousAccess
@PostMapping("/pending")
@Log("代客下单 查询购物车")
@ApiOperation("代客下单 查询购物车 /shop/table")
public ResponseEntity<Object> pending(
@RequestBody PendingDTO pendingDTO
) {
return ResponseEntity.ok(tbShopTableService.pending(pendingDTO));
}
@AnonymousAccess
@GetMapping("/payType")
@Log("代客下单 查询购物车")
@ApiOperation("代客下单 查询购物车 /shop/table")
public ResponseEntity<Object> getPayType(
@RequestParam Integer shopId
) {
return ResponseEntity.ok(tbShopTableService.getPayType(shopId));
}
@AnonymousAccess
@DeleteMapping("/order")
@Log("代客下单 删除订单")
@ApiOperation("代客下单 查询购物车 /shop/table")
public ResponseEntity<Object> delete(
@Validated @RequestBody DeleteOrderDTO deleteOrderDTO
) {
return ResponseEntity.ok(tbShopTableService.deleteOrder(deleteOrderDTO));
}
@AnonymousAccess
@PutMapping("/pay")
@Log("代客下单 查询购物车")
@ApiOperation("代客下单 查询购物车 /shop/table")
public ResponseEntity<Object> pay(
@Validated @RequestBody PayDTO payDTO
) {
return ResponseEntity.ok(tbShopTableService.pay(payDTO));
}
@AnonymousAccess
@PutMapping("/choseTable")
@Log("代客下单 选择台桌")
@ApiOperation("代客下单 选择台桌 /shop/table")
public ResponseEntity<Object> choseTable(
@Validated @RequestBody ChoseTableDTO choseTableDTO
) {
return ResponseEntity.ok(tbShopTableService.choseTable(choseTableDTO));
}
@AnonymousAccess
@PutMapping("/choseCount")
@Log("代客下单 选择用餐人数")
@ApiOperation("代客下单 选择台桌 /shop/table")
public ResponseEntity<Object> choseCount(
@Validated @RequestBody ChoseCountDTO choseCountDTO
) {
return ResponseEntity.ok(tbShopTableService.choseCount(choseCountDTO));
}
@AnonymousAccess
@PutMapping("/updateVip")
@Log("代客下单 查询购物车")
@ApiOperation("代客下单 查询购物车 /shop/table")
public ResponseEntity<Object> updateVip(
@Validated @RequestBody UpdateVipDTO updateVipDTO
) {
return ResponseEntity.ok(tbShopTableService.updateVip(updateVipDTO));
}
@AnonymousAccess
@PostMapping("/printOrder")
@Log("代客下单 打印订单")
@ApiOperation("代客下单 查询购物车 /shop/table")
public ResponseEntity<Object> printOrder(
@Validated @RequestBody BaseTableDTO baseTableDTO
) {
return ResponseEntity.ok(tbShopTableService.printOrder(baseTableDTO));
}
@AnonymousAccess
@PostMapping("/printDishes")
@Log("代客下单 打印菜品单")
@ApiOperation("代客下单 打印菜品单 /shop/table")
public ResponseEntity<Object> printDishes(
@Validated @RequestBody BaseTableDTO baseTableDTO
) {
return ResponseEntity.ok(tbShopTableService.printDishes(baseTableDTO));
}
private final RabbitTemplate rabbitTemplate;
@AnonymousAccess
@GetMapping("/test")
public void test(
@RequestParam Integer id
) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("type", "create");
jsonObject.put("orderId", id);
// rabbitTemplate.convertAndSend(RabbitConstants.CART_ORDER_COLLECT_PUT, RabbitConstants.CART_ORDER_COLLECT_ROUTINGKEY_PUT, jsonObject.toJSONString(), new CorrelationData(UUID.randomUUID().toString()));
rabbitMsgUtils.printTicket(String.valueOf(id));
// rabbitTemplate.convertAndSend(RabbitConstants.PRINT_MECHINE_COLLECT_PUT, RabbitConstants.PRINT_MECHINE_COLLECT_ROUTINGKEY_PUT, id, new CorrelationData(UUID.randomUUID().toString()));
}
}

View File

@ -1,6 +1,5 @@
package cn.ysk.cashier.controller.product;
import cn.ysk.cashier.annotation.AnonymousAccess;
import cn.ysk.cashier.annotation.Log;
import cn.ysk.cashier.dto.product.TbProductSortCriteria;
import cn.ysk.cashier.vo.TbProductVo;
@ -33,8 +32,6 @@ public class TbProductController {
return new ResponseEntity<>(tbProductService.queryAll(criteria, false),HttpStatus.OK);
}
@GetMapping("/list")
@ApiOperation("查询/productForAdmin")
public ResponseEntity<Object> queryTbProductForAdmin(TbProductQueryCriteria criteria){
@ -52,15 +49,12 @@ public class TbProductController {
public Object queryTbProductInfo(@PathVariable("product") Integer product)throws Exception{
return tbProductService.findByProductId(product);
}
@GetMapping ("/productList")
@ApiOperation("查询/product")
public Object queryTbProductInfo(@RequestParam List<String> productList){
return tbProductService.findByProductList(productList);
}
@PostMapping("/upProSort")
@ApiOperation("修改商品排序")
public ResponseEntity<Object> upProSort(@RequestBody TbProductSortCriteria param){

View File

@ -36,12 +36,12 @@ public class TbProductGroupController {
@Resource
private TbProductService tbProductService;
// @ApiOperation("导出数据")
// @GetMapping(value = "/download")
// @PreAuthorize("@el.check('tbProductGroup:list')")
// public void exportTbProductGroup(HttpServletResponse response, TbProductGroupQueryCriteria criteria) throws IOException {
// tbProductGroupService.download(tbProductGroupService.queryAll(criteria), response);
// }
@ApiOperation("导出数据")
@GetMapping(value = "/download")
@PreAuthorize("@el.check('tbProductGroup:list')")
public void exportTbProductGroup(HttpServletResponse response, TbProductGroupQueryCriteria criteria) throws IOException {
tbProductGroupService.download(tbProductGroupService.queryAll(criteria), response);
}
@GetMapping
@ApiOperation("查询product/group")

View File

@ -1,78 +0,0 @@
package cn.ysk.cashier.controller.shop;
import cn.ysk.cashier.annotation.AnonymousAccess;
import cn.ysk.cashier.dto.shop.*;
import cn.ysk.cashier.mybatis.entity.TbShopOpenId;
import cn.ysk.cashier.pojo.shop.TbFullShopId;
import cn.ysk.cashier.service.shop.MsgService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.HashMap;
import java.util.List;
@RestController
@RequestMapping("/api/msg")
public class MsgController {
private final MsgService msgService;
public MsgController(MsgService msgService) {
this.msgService = msgService;
}
/**
* 获取所有订阅消息用户
* @return
*/
@AnonymousAccess
@GetMapping("/all")
public ResponseEntity<Page<TbFullShopId>> all(
@RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer size,
@RequestParam Integer shopId,
@RequestParam(required = false) String nickName,
@RequestParam(required = false) String openId,
@RequestParam(required = false) Integer state,
@RequestParam(required = false) Integer type
) {
Page<TbFullShopId> all = msgService.all(page, size, shopId, nickName, openId, state, type);
return ResponseEntity.ok(all);
}
@AnonymousAccess
@PutMapping("/shopState")
public ResponseEntity<Boolean> shopMsgState(
@Valid @RequestBody ShopMsgStateDTO shopMsgStateDTO
) {
return ResponseEntity.of(msgService.updateShopState(shopMsgStateDTO));
}
@AnonymousAccess
@DeleteMapping
public ResponseEntity<Boolean> removeSubUser(
@Valid @RequestBody ShopMsgRemoveDTO shopMsgRemoveDTO
) {
return ResponseEntity.of(msgService.removeSubUser(shopMsgRemoveDTO));
}
@AnonymousAccess
@PutMapping("/info")
public ResponseEntity<Boolean> updateInfo(
@Valid @RequestBody ShopInfoUpdateDTO shopInfoUpdateDTO
) {
return ResponseEntity.of(msgService.updateInfo(shopInfoUpdateDTO));
}
@AnonymousAccess
@GetMapping("/state")
public ResponseEntity<HashMap<String, Object>> updateInfo(
@RequestParam Integer shopId
) {
return ResponseEntity.ok(msgService.getInfo(shopId, null));
}
}

View File

@ -1,6 +1,5 @@
package cn.ysk.cashier.controller.shop;
import cn.ysk.cashier.annotation.rest.AnonymousPostMapping;
import cn.ysk.cashier.dto.ShopSummaryDto;
import cn.ysk.cashier.service.SummaryService;
import cn.ysk.cashier.vo.TbOrderPayCountVo;
@ -42,8 +41,10 @@ public class SummaryByDayController {
}
@GetMapping(value = "count")
public List<TbOrderPayCountVo> summaryCount(ShopSummaryDto summaryDto) {
return summaryService.summaryCount(summaryDto);
public List<TbOrderPayCountVo> summaryCount(@RequestParam String shopId,
@RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date startTime,
@RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endTime) {
return summaryService.summaryCount(shopId, startTime, endTime);
}
}

View File

@ -2,11 +2,13 @@ package cn.ysk.cashier.controller.shop;
import cn.ysk.cashier.annotation.rest.AnonymousGetMapping;
import cn.ysk.cashier.annotation.rest.AnonymousPostMapping;
import cn.ysk.cashier.dto.BaseQueryDto;
import cn.ysk.cashier.dto.shop.ShopTableSaleInfoDto;
import cn.ysk.cashier.dto.ShopSummaryDto;
import cn.ysk.cashier.dto.shop.ShopTableSeleInfoDto;
import cn.ysk.cashier.service.SummaryService;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@ -24,20 +26,11 @@ public class SummaryController {
@Resource
private SummaryService summaryService;
@PostMapping("/trade")
@AnonymousPostMapping
private Object shopSummaryDate(@RequestBody BaseQueryDto param) {
return summaryService.trade(param);
@GetMapping
private Object shopSummary(@RequestParam Integer shopId) {
return summaryService.selectSummary(shopId);
}
// @GetMapping
// private Object shopSummary(@RequestParam Integer shopId) {
// return summaryService.selectSummary(shopId);
// }
@GetMapping("/date")
private Object shopSummaryDate(@RequestParam Integer shopId, @RequestParam Integer day) {
return summaryService.selectSummaryDate(shopId, day);
@ -66,7 +59,6 @@ public class SummaryController {
}
@GetMapping("/table")
@AnonymousGetMapping
private Object shopSummaryTable(@RequestParam Integer shopId,
@RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date startTime,
@RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endTime) {
@ -74,9 +66,8 @@ public class SummaryController {
}
@PostMapping("/table/download")
@AnonymousPostMapping
private void downloadShopSummaryTable(HttpServletResponse response, @RequestBody ShopTableSaleInfoDto exportRequest) throws IOException {
summaryService.downloadTableSaleInfo(exportRequest, response);
private void downloadShopSummaryTable(HttpServletResponse response, @RequestBody ShopTableSeleInfoDto exportRequest) throws IOException {
summaryService.downloadTableSeleInfo(exportRequest, response);
}
}

View File

@ -50,8 +50,8 @@ public class TbDeviceStockController {
throw new RuntimeException("请先添加台桌");
}
if (downloadDto.getCount() > 500) {
throw new RuntimeException("最多可获取500个");
if (downloadDto.getCount() > (shopTables.size() * 2)) {
throw new RuntimeException("最多可获取台桌数量的2倍");
}
TbDeviceStock lastRecord = tbDeviceStockService.findLastRecord();

View File

@ -1,39 +0,0 @@
package cn.ysk.cashier.controller.shop;
import cn.ysk.cashier.dto.shop.TbShopAdDto;
import cn.ysk.cashier.mybatis.service.TbShopAdService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* @author GYJ
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/ad")
public class TbShopAdController {
final private TbShopAdService tbShopAdService;
@PostMapping
public ResponseEntity<Object> createTbShopAd(@RequestBody TbShopAdDto adDto) {
return tbShopAdService.createTbShopAd(adDto);
}
@PutMapping
public ResponseEntity<Object> updateTbShopAd(@RequestBody TbShopAdDto adDto) {
return tbShopAdService.updateTbShopAd(adDto);
}
@DeleteMapping("/{adId}")
public ResponseEntity<Object> deleteTbShopAd(@PathVariable Integer adId) {
return tbShopAdService.deleteTbShopAd(adId);
}
@GetMapping
public ResponseEntity<Object> getTbShopAd(@RequestParam Map<String, Object> params) {
return tbShopAdService.getTbShopAd(params);
}
}

View File

@ -1,9 +1,12 @@
package cn.ysk.cashier.controller.shop;
import cn.ysk.cashier.exception.BadRequestException;
import cn.ysk.cashier.annotation.rest.AnonymousDeleteMapping;
import cn.ysk.cashier.annotation.rest.AnonymousGetMapping;
import cn.ysk.cashier.annotation.rest.AnonymousPostMapping;
import cn.ysk.cashier.annotation.rest.AnonymousPutMapping;
import cn.ysk.cashier.mybatis.entity.TbShopExtend;
import cn.ysk.cashier.mybatis.service.TbShopExtendService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.HttpStatus;
@ -32,37 +35,38 @@ public class TbShopExtendController {
@GetMapping
@ApiOperation("分页查询")
@AnonymousGetMapping
public ResponseEntity<Object> selectAll(TbShopExtendQueryCriteria criteria) {
return new ResponseEntity<>(tbShopExtendService.queryAll(criteria), HttpStatus.OK);
}
@GetMapping("{id}")
@ApiOperation("通过Id查询详情")
@AnonymousGetMapping
public TbShopExtend selectOne(@PathVariable Serializable id) {
return tbShopExtendService.getById(id);
}
@PostMapping
@ApiOperation("新增")
@AnonymousPostMapping
public ResponseEntity<Object> insert(@RequestBody TbShopExtend tbShopExtend) {
tbShopExtend.setCreateTime(new Date());
tbShopExtendService.saveInfo(tbShopExtend);
return new ResponseEntity<>(HttpStatus.CREATED);
return new ResponseEntity<>(tbShopExtendService.save(tbShopExtend), HttpStatus.CREATED);
}
@PutMapping
@ApiOperation("通过id修改")
@AnonymousPutMapping
public ResponseEntity<Object> update(@RequestBody TbShopExtend tbShopExtend) {
if (tbShopExtend.getId() != null) {
tbShopExtendService.updateById(tbShopExtend);
} else {
tbShopExtendService.saveInfo(tbShopExtend);
}
tbShopExtend.setUpdateTime(new Date());
tbShopExtendService.updateById(tbShopExtend);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@DeleteMapping
@ApiOperation("删除")
@AnonymousDeleteMapping
public ResponseEntity<Object> delete(@RequestParam("idList") List<Long> idList) {
tbShopExtendService.removeByIds(idList);
return new ResponseEntity<>(HttpStatus.OK);

View File

@ -15,15 +15,11 @@
*/
package cn.ysk.cashier.controller.shop;
import cn.ysk.cashier.annotation.AnonymousAccess;
import cn.ysk.cashier.annotation.Log;
import cn.ysk.cashier.dto.shoptable.AddCartDTO;
import cn.ysk.cashier.dto.shoptable.ClearCartDTO;
import cn.ysk.cashier.dto.shoptable.RemoveCartDTO;
import cn.ysk.cashier.dto.shoptable.TableGenerateDTO;
import cn.ysk.cashier.pojo.shop.TbShopTable;
import cn.ysk.cashier.service.shop.TbShopTableService;
import cn.ysk.cashier.dto.shop.TbShopTableQueryCriteria;
import org.springframework.data.domain.Pageable;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@ -88,16 +84,4 @@ public class TbShopTableController {
tbShopTableService.deleteAll(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
@PostMapping("/generate")
@ApiOperation("查询/shop/table")
public ResponseEntity<Object> generate(@Validated @RequestBody TableGenerateDTO generateDTO){
if (generateDTO.getStart() >= generateDTO.getEnd()){
return ResponseEntity.badRequest().body("起始数不能大于结束数");
}
return new ResponseEntity<>(tbShopTableService.generate(generateDTO),HttpStatus.OK);
}
}
}

View File

@ -8,7 +8,6 @@ import cn.ysk.cashier.dto.shop.TbShopRechargeListDto;
import cn.ysk.cashier.dto.shop.TbShopUserQueryCriteria;
import cn.ysk.cashier.exception.BadRequestException;
import cn.ysk.cashier.mybatis.service.TbMShopUserService;
import cn.ysk.cashier.mybatis.service.TbShopUserFlowService;
import cn.ysk.cashier.pojo.shop.TbShopUser;
import cn.ysk.cashier.service.shop.TbShopUserService;
import io.swagger.annotations.Api;
@ -22,7 +21,6 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
/**
* @author lyf
@ -38,9 +36,6 @@ public class TbShopUserController {
private final TbShopUserService tbShopUserService;
private final TbMShopUserService tbMShopUserService;
private final TbShopUserFlowService tbShopUserFlowService;
@ApiOperation("导出数据")
@GetMapping(value = "/download")
public void exportTbShopUser(HttpServletResponse response, TbShopUserQueryCriteria criteria) throws IOException {
@ -55,6 +50,7 @@ public class TbShopUserController {
@GetMapping("queryAllShopUser")
@ApiOperation("查询商家用户")
@AnonymousGetMapping
public ResponseEntity<Object> queryAllShopUser(TbShopUserQueryCriteria criteria) {
return new ResponseEntity<>(tbShopUserService.queryShopUser(criteria), HttpStatus.OK);
}
@ -100,18 +96,4 @@ public class TbShopUserController {
public void rechargeListDownload(HttpServletResponse response, @RequestBody TbShopRechargeListDto criteria) throws IOException {
tbShopUserService.rechargeListDownload(response, criteria);
}
@PostMapping("midfiyAccount")
@ApiOperation("增加扣减会员余额")
public ResponseEntity<Object> midfiyAccount(@RequestBody Map<String,Object> map){
tbShopUserService.modfiyAccount(map);
return new ResponseEntity<>(HttpStatus.OK);
}
@GetMapping("queryShopUserFlow")
public ResponseEntity<Object> queryShopUserFlow(@RequestParam("userId") Integer userId,@RequestParam("page") Integer page,@RequestParam("pageSize") Integer pageSize){
return new ResponseEntity<>( tbShopUserFlowService.selectByUserId(userId, page, pageSize),HttpStatus.OK);
}
}

View File

@ -1,36 +0,0 @@
package cn.ysk.cashier.dto;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
public class BaseQueryDto {
private Integer shopId;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date startTime;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endTime;
public Integer getShopId() {
return shopId;
}
public void setShopId(Integer shopId) {
this.shopId = shopId;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
}

View File

@ -1,10 +0,0 @@
package cn.ysk.cashier.dto;
import lombok.Data;
@Data
public class ScanPayDTO {
private Integer shopId;
private Integer orderId;
private String authCode;
}

View File

@ -19,9 +19,7 @@ public class ShopSummaryDto {
}
public void setCateId(String cateId) {
if(StringUtils.isNotBlank(cateId)){
this.cateId = cateId;
}
this.cateId = cateId;
}
public String getShopId() {

View File

@ -1,30 +0,0 @@
package cn.ysk.cashier.dto;
import java.util.Date;
import lombok.Data;
/**
* 活动赠送商品表(TbActivateProduct)表查询类
*
* @author ww
* @since 2024-08-20 11:27:40
*/
@Data
public class TbActivateProductQueryCriteria {
private Integer id;
//活动Id
private Integer activateId;
//商品id
private Integer productId;
//数量
private Integer num;
private Date createTime;
private Date updateTime;
private long page;
private long size;
}

View File

@ -1,22 +0,0 @@
package cn.ysk.cashier.dto;
import lombok.Data;
import java.util.Date;
/**
* @author GYJ
*/
@Data
public class TbMiniAppPagesDto {
private Integer id;
private Integer shopId;
private String name;
private String path;
private String icon;
private String description;
private Integer sort;
private Integer status;
private Date createTime;
private Date updateTime;
}

View File

@ -14,7 +14,7 @@ public class TbVersionDto implements Serializable {
private Integer id;
/** PC;APP; */
/** LDBL_APP;WX; */
private String source;
/** ios;android; */
@ -22,12 +22,9 @@ public class TbVersionDto implements Serializable {
/** 版本号 */
private String version;
/** 下载地址 */
private String url;
/** 是否强制更新 0否 1 */
/** 0不更新1更新 */
private Integer isUp;
private Integer sel;
/** 更新提示内容 */
private String message;

View File

@ -12,7 +12,7 @@ import lombok.Data;
public class TbVersionQueryCriteria{
@Query
/** PCAPP; */
/** LDBL-APP;WX; */
private String source;
@Query
/** ios;android; */
@ -21,7 +21,7 @@ public class TbVersionQueryCriteria{
/** 版本号 */
private String version;
@Query
/** 是否强制更新 0否 1*/
/** 0不更新1更新 */
private Integer isUp;
private Integer pageSize;

View File

@ -1,13 +0,0 @@
package cn.ysk.cashier.dto.calltable;
import lombok.Data;
import javax.validation.constraints.NotNull;
@Data
public class BaseCallTableDTO {
@NotNull
private Integer callTableId;
@NotNull
private Integer shopId;
}

View File

@ -1,13 +0,0 @@
package cn.ysk.cashier.dto.calltable;
import lombok.Data;
import javax.validation.constraints.NotNull;
@Data
public class CallQueueDTO{
@NotNull
private Integer callQueueId;
@NotNull
private Integer shopId;
}

View File

@ -1,27 +0,0 @@
package cn.ysk.cashier.dto.calltable;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@Data
public class CallTableDTO {
@NotNull
private Integer shopId;
@NotEmpty
private String name;
private String note;
@NotNull
@Min(1)
private Integer waitTime;
@NotBlank
private String prefix;
@NotNull
@Min(1)
private Integer start;
@Min(1)
private Integer nearNum;
}

View File

@ -1,15 +0,0 @@
package cn.ysk.cashier.dto.calltable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotNull;
@EqualsAndHashCode(callSuper = true)
@Data
public class TakeNumberDTO extends BaseCallTableDTO{
private Integer userId;
private String phone;
private String note;
private String name;
}

View File

@ -1,15 +0,0 @@
package cn.ysk.cashier.dto.calltable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import javax.validation.constraints.NotNull;
@EqualsAndHashCode(callSuper = true)
@Data
@Getter
public class UpdateCallQueueDTO extends CallQueueDTO{
@NotNull
private Byte state;
}

View File

@ -1,26 +0,0 @@
package cn.ysk.cashier.dto.calltable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@Data
public class UpdateCallTableDTO{
@NotNull
private Integer callTableId;
@NotNull
private Integer shopId;
private String name;
private String note;
@Min(1)
private Integer waitTime;
private String prefix;
@Min(1)
private Integer start;
@Min(1)
private Integer nearNum;
}

View File

@ -59,7 +59,4 @@ public class TbOrderDetailDto implements Serializable {
/** 打包费 */
private BigDecimal packAmount;
private Integer isVip;
}

View File

@ -70,8 +70,6 @@ public class TbOrderInfoQueryCriteria{
@Query(type = Query.Type.BETWEEN)
private List<Long> createdAt;
private Integer userId;
@Query
private String tableName;
@ -81,18 +79,4 @@ public class TbOrderInfoQueryCriteria{
public void setProductName(String productName) {
if(StringUtils.isNotBlank(productName)) this.productName = productName;
}
public Integer getPage() {
if (page == null) {
return 0;
}
return page;
}
public Integer getPageSize() {
if (pageSize == null) {
return 10;
}
return pageSize;
}
}

View File

@ -9,15 +9,12 @@ import javax.persistence.Id;
public class StockCountDTO {
private String shopId;
@Id
private Long skuId;
private Long proId;
private String proName;
private Integer isStock;
private String skuName;
private String unitName;
// 消耗数
private Integer stockCount;
// 当前库存
private Integer stockNumber;
private String specSnap;
}

View File

@ -1,6 +1,5 @@
package cn.ysk.cashier.dto.product;
import cn.ysk.cashier.annotation.Query;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
@ -12,7 +11,6 @@ public class StockQueryDto {
private Double num;
private Integer isStock;
private String categoryId;
private String sort;
public void setName(String name) {
if (StringUtils.isNotBlank(name)) {

View File

@ -1,10 +1,22 @@
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.ysk.cashier.dto.product;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.List;
/**
@ -48,10 +60,4 @@ public class TbProductGroupDto implements Serializable {
private Long createdAt;
private Long updatedAt;
private Integer useTime;
private String saleStartTime;
private String saleEndTime;
}

View File

@ -1,13 +0,0 @@
package cn.ysk.cashier.dto.rabbit;
import lombok.Data;
@Data
public class StockRecordMsg {
private Integer shopId;
private Integer skuId;
private Integer productId;
private String type;
private Integer subType;
private Integer number;
}

View File

@ -1,22 +0,0 @@
package cn.ysk.cashier.dto.shop;
import lombok.Data;
import org.hibernate.validator.constraints.Range;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Data
public class ShopInfoUpdateDTO {
@NotNull
private Integer shopId;
@NotNull
private String openId;
private String note;
@Range(min = 0, max = 1)
private Integer state;
private Integer type;
private String nickName;
private String avatar;
}

View File

@ -1,14 +0,0 @@
package cn.ysk.cashier.dto.shop;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Data
public class ShopMsgRemoveDTO {
@NotNull
private Integer shopId;
@NotBlank
private String openId;
}

View File

@ -1,15 +0,0 @@
package cn.ysk.cashier.dto.shop;
import lombok.Data;
import org.hibernate.validator.constraints.Range;
import javax.validation.constraints.NotNull;
@Data
public class ShopMsgStateDTO {
@NotNull
private Integer shopId;
@Range(min = 0, max = 1)
private Integer state;
private Integer type;
}

View File

@ -9,7 +9,7 @@ import java.util.Date;
* @author GYJ
*/
@Data
public class ShopTableSaleInfoDto {
public class ShopTableSeleInfoDto {
private Integer shopId;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date startTime;

View File

@ -1,13 +0,0 @@
package cn.ysk.cashier.dto.shop;
import lombok.Data;
import javax.validation.constraints.NotNull;
@Data
public class ShopTypeDTO {
@NotNull
private Integer shopId;
@NotNull
private Integer type;
}

View File

@ -1,15 +0,0 @@
package cn.ysk.cashier.dto.shop;
import lombok.Data;
import javax.validation.constraints.NotNull;
@Data
public class ShopUserMsgState {
@NotNull
private Integer state;
@NotNull
private Integer shopId;
@NotNull
private Integer id;
}

View File

@ -49,8 +49,6 @@ public class TbPlussShopStaffDto implements Serializable {
/** 密码 */
private String password;
private String discountType;
/** 最大优惠金额 */
private BigDecimal maxDiscountAmount;

View File

@ -1,40 +0,0 @@
package cn.ysk.cashier.dto.shop;
import cn.ysk.cashier.mybatis.entity.TbShopAd;
import lombok.Data;
import java.util.Date;
/**
* @author GYJ
*/
@Data
public class TbShopAdDto {
private Integer id;
private Integer shopId;
private String imgUrl;
private String linkPath;
private Integer borderRadius;
private String showPosition;
private String frequency;
private Integer status;
private Integer sort;
private Date createTime;
private Date updateTime;
public TbShopAd convertToTbShopAd() {
TbShopAd tbShopAd = new TbShopAd();
tbShopAd.setId(this.id);
tbShopAd.setShopId(this.shopId);
tbShopAd.setImgUrl(this.imgUrl);
tbShopAd.setLinkPath(this.linkPath);
tbShopAd.setBorderRadius(this.borderRadius);
tbShopAd.setShowPosition(this.showPosition);
tbShopAd.setFrequency(this.frequency);
tbShopAd.setStatus(this.status);
tbShopAd.setSort(this.sort);
tbShopAd.setCreateTime(this.createTime);
tbShopAd.setUpdateTime(this.updateTime);
return tbShopAd;
}
}

View File

@ -23,7 +23,6 @@ import javax.persistence.Column;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.List;
/**
* @website https://eladmin.vip
@ -187,16 +186,4 @@ public class TbShopInfoDto implements Serializable {
private String districts;
private String cities;
private String isCustom;
private String isReturn;
private String isMemberIn;
private String isMemberReturn;
private Integer isTableFee;
private BigDecimal tableFee;
private List<String> eatModel;
//程序码(零点八零首页)
private String smallQrcode;
private String paymentQrcode;
}

View File

@ -36,7 +36,4 @@ public class TbShopTableQueryCriteria{
@Query
private Integer areaId;
@Query
private Long qrcode;
}
}

View File

@ -1,29 +0,0 @@
package cn.ysk.cashier.dto.shoptable;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@Data
public class AddCartDTO {
@NotEmpty
private String masterId;
private Integer vipUserId;
@NotNull
private Integer productId;
@NotNull
private Integer skuId;
@NotNull
private Integer shopId;
@NotEmpty
private String tableId;
@NotNull
@Min(1)
private Integer num;
private boolean isPack;
private boolean isGift;
private Integer cartId;
private String note;
}

View File

@ -1,15 +0,0 @@
package cn.ysk.cashier.dto.shoptable;
import lombok.Data;
import org.hibernate.validator.constraints.Range;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@Data
public class BaseTableDTO {
@NotNull
private Integer shopId;
@NotEmpty
private String tableId;
}

View File

@ -1,11 +0,0 @@
package cn.ysk.cashier.dto.shoptable;
import lombok.Data;
import javax.validation.constraints.NotNull;
@Data
public class CarDTO {
@NotNull
private Integer shopId;
}

View File

@ -1,20 +0,0 @@
package cn.ysk.cashier.dto.shoptable;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@Data
public class ChoseCountDTO {
@NotEmpty
private String masterId;
@NotNull
private Integer shopId;
@NotEmpty
private String tableId;
@NotNull
@Min(1)
private Integer num;
}

View File

@ -1,19 +0,0 @@
package cn.ysk.cashier.dto.shoptable;
import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@Data
public class ChoseTableDTO {
@NotNull
private Integer shopId;
private Integer orderId;
@NotNull
private String newTableId;
@NotEmpty
private String oldTableId;
}

View File

@ -1,17 +0,0 @@
package cn.ysk.cashier.dto.shoptable;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@Data
public class ClearCartDTO {
@NotEmpty
private String masterId;
private Integer vipUserId;
@NotNull
private Long tableId;
@NotNull
private String shopId;
}

View File

@ -1,20 +0,0 @@
package cn.ysk.cashier.dto.shoptable;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@Data
public class CreateOrderDTO {
@NotEmpty
private String masterId;
private Integer vipUserId;
@NotNull
private Integer shopId;
@NotEmpty
private String tableId;
private String note;
private boolean postPay;
private Integer orderId;
}

View File

@ -1,9 +0,0 @@
package cn.ysk.cashier.dto.shoptable;
import lombok.Data;
@Data
public class DeleteOrderDTO {
private Integer shopId;
private Integer orderId;
}

View File

@ -1,21 +0,0 @@
package cn.ysk.cashier.dto.shoptable;
import lombok.Data;
import org.hibernate.validator.constraints.Range;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@Data
public class PackCartDTO {
@NotEmpty
private String masterId;
private Integer vipUserId;
@NotNull
private Integer shopId;
@NotEmpty
private String tableId;
@NotNull
@Range(min = 0, max = 1)
private Integer state;
}

View File

@ -1,23 +0,0 @@
package cn.ysk.cashier.dto.shoptable;
import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@Data
public class PayDTO {
@NotNull
private Integer shopId;
@NotNull
private Integer orderId;
@NotEmpty
private String payType;
@Min(0)
@Max(1)
private Double discount;
private Integer vipUserId;
private String code;
}

View File

@ -1,20 +0,0 @@
package cn.ysk.cashier.dto.shoptable;
import lombok.Data;
import org.bouncycastle.asn1.cmc.PendInfo;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@Data
public class PendingDTO {
private String masterId;
@NotNull
private Integer shopId;
private String tableId;
private Integer vipUserId;
@NotNull
private Boolean isPending;
private Integer orderId;
private String note;
}

View File

@ -1,16 +0,0 @@
package cn.ysk.cashier.dto.shoptable;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@Data
public class RemoveCartDTO {
@NotNull
private Integer cartId;
@NotNull
private Integer shopId;
@NotNull
private Long tableId;
}

View File

@ -1,15 +0,0 @@
package cn.ysk.cashier.dto.shoptable;
import lombok.Data;
import javax.validation.constraints.NotNull;
@Data
public class ReturnOrderDTO {
@NotNull
private Integer cartId;
@NotNull
private Integer shopId;
@NotNull
private Long tableId;
}

View File

@ -1,28 +0,0 @@
package cn.ysk.cashier.dto.shoptable;
import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@Data
public class TableGenerateDTO {
@NotNull
private Integer shopId;
@NotEmpty
private String sign;
private Integer areaId;
@Min(1)
@NotNull
private Integer start;
@Min(2)
@Max(1000)
@NotNull
private Integer end;
@NotNull
@Min(1)
private Integer capacity;
private Integer autoClear = 1;
}

View File

@ -1,23 +0,0 @@
package cn.ysk.cashier.dto.shoptable;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@Data
public class UpdateCartDTO {
@NotNull
private Integer cartId;
@NotNull
private Integer skuId;
@NotNull
private Integer productId;
@NotNull
private Integer shopId;
@NotNull
@Min(0)
private Integer num;
}

View File

@ -1,22 +0,0 @@
package cn.ysk.cashier.dto.shoptable;
import lombok.Data;
import org.hibernate.validator.constraints.Range;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@Data
public class UpdateVipDTO {
@NotNull
private Integer shopId;
@NotEmpty
private String tableId;
@NotNull
private String masterId;
private Integer vipUserId;
@NotNull
@Range(min = 0, max = 1)
private Integer type;
}

View File

@ -1,17 +0,0 @@
package cn.ysk.cashier.enums;
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 cn.ysk.cashier.enums;
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

@ -18,13 +18,8 @@ package cn.ysk.cashier.mapper.shop;
import cn.ysk.cashier.base.BaseMapper;
import cn.ysk.cashier.pojo.shop.TbShopInfo;
import cn.ysk.cashier.dto.shop.TbShopInfoDto;
import cn.ysk.cashier.utils.ListUtil;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
import org.springframework.util.CollectionUtils;
import java.util.List;
import java.util.stream.Collectors;
/**
* @website https://eladmin.vip
@ -34,19 +29,4 @@ import java.util.stream.Collectors;
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface TbShopInfoMapper extends BaseMapper<TbShopInfoDto, TbShopInfo> {
// 自定义的字符串到整数列表的转换方法
default List<String> map(String value) {
return ListUtil.stringChangeStringList(value);
}
// 如果需要从DTO转回实体也可能需要实现反向的映射方法
default String map(List<String> values) {
if (!CollectionUtils.isEmpty(values)) {
return "";
}
// 将整数列表转换为由逗号分隔的字符串
return values.stream()
.map(String::valueOf)
.collect(Collectors.joining(","));
}
}

View File

@ -1,22 +0,0 @@
package cn.ysk.cashier.mybatis.Handler;
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;
import java.util.Date;
@Component
public class MyMetaObjectHandler implements MetaObjectHandler {
@Override
public void insertFill(MetaObject metaObject) {
this.strictInsertFill(metaObject, "createTime", Date.class, new Date());
}
@Override
public void updateFill(MetaObject metaObject) {
this.strictUpdateFill(metaObject, "updateTime", Date.class, new Date());
}
}

View File

@ -1,7 +1,6 @@
package cn.ysk.cashier.mybatis.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 com.baomidou.mybatisplus.extension.activerecord.Model;
@ -9,7 +8,6 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.List;
@Data
@EqualsAndHashCode(callSuper = true)
@ -24,8 +22,4 @@ public class Activate extends Model<Activate> {
private BigDecimal handselNum;
private String handselType;
private String isDel;
//是否赠送商品 0否 1是
private Integer isGiftPro;
@TableField(exist = false)
private List<TbActivateProduct> products;
}

View File

@ -2,8 +2,6 @@ package cn.ysk.cashier.mybatis.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
@ -14,7 +12,6 @@ import java.io.Serializable;
@SuppressWarnings("serial")
public class TagProductDepts extends Model<TagProductDepts> {
//标签id
@TableId(value = "tagId", type = IdType.NONE)
private Integer tagId;
//商品id
private Integer productId;

View File

@ -1,44 +0,0 @@
package cn.ysk.cashier.mybatis.entity;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
@Getter
@Setter
@Entity
@Table(name = "tb_activate")
public class TbActivate {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false)
private Integer id;
@Column(name = "shop_id")
private Integer shopId;
@Column(name = "min_num")
private Integer minNum;
@Column(name = "max_num")
private Integer maxNum;
@Column(name = "handsel_num", precision = 10, scale = 2)
private BigDecimal handselNum;
@Size(max = 20)
@Column(name = "handsel_type", length = 20)
private String handselType;
@Size(max = 20)
@Column(name = "is_del", length = 20)
private String isDel;
@Size(max = 255)
@Column(name = "is_user")
private String isUser;
}

View File

@ -1,119 +0,0 @@
package cn.ysk.cashier.mybatis.entity;
import java.util.Date;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
/**
* 活动商品赠送表(TbActivateInRecord)表实体类
*
* @author ww
* @since 2024-08-22 14:50:16
*/
@SuppressWarnings("serial")
public class TbActivateInRecord extends Model<TbActivateInRecord> {
private Integer id;
//会员id
private Integer vipUserId;
//商品id
private Integer proId;
//赠送数量
private Integer num;
//未使用数量
private Integer overNum;
//店铺id
private Integer shopId;
//来源活动id
private Integer sourceActId;
private Integer sourceFlowId;
private Date createTime;
private Date updateTime;
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 getProId() {
return proId;
}
public void setProId(Integer proId) {
this.proId = proId;
}
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 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,109 +0,0 @@
package cn.ysk.cashier.mybatis.entity;
import java.util.Date;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
/**
* 活动赠送商品使用记录表(TbActivateOutRecord)表实体类
*
* @author ww
* @since 2024-08-22 14:53:52
*/
@SuppressWarnings("serial")
public class TbActivateOutRecord extends Model<TbActivateOutRecord> {
private Integer id;
//商品赠送Id
private Integer giveId;
//商品id
private Integer proId;
//未使用数量
private Integer useNum;
//退单量
private Integer refNum;
//订单id
private String orderId;
//新建 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 getGiveId() {
return giveId;
}
public void setGiveId(Integer giveId) {
this.giveId = giveId;
}
public Integer getProId() {
return proId;
}
public void setProId(Integer proId) {
this.proId = proId;
}
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 getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
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,83 +0,0 @@
package cn.ysk.cashier.mybatis.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
/**
* 活动赠送商品表(TbActivateProduct)表实体类
*
* @author ww
* @since 2024-08-20 11:27:40
*/
@SuppressWarnings("serial")
public class TbActivateProduct extends Model<TbActivateProduct> {
private Integer id;
//活动Id
private Integer activateId;
//商品id
private Integer productId;
//数量
private Integer num;
@TableField(fill = FieldFill.INSERT)
private Date createTime;
@TableField(fill = FieldFill.UPDATE)
private Date updateTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getActivateId() {
return activateId;
}
public void setActivateId(Integer activateId) {
this.activateId = activateId;
}
public Integer getProductId() {
return productId;
}
public void setProductId(Integer productId) {
this.productId = productId;
}
public Integer getNum() {
return num;
}
public void setNum(Integer num) {
this.num = num;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}

View File

@ -1,76 +0,0 @@
package cn.ysk.cashier.mybatis.entity;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import javax.validation.constraints.Size;
import java.time.Instant;
@Getter
@Setter
@Entity
@Table(name = "tb_call_queue")
public class TbCallQueue {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false)
private Integer id;
@Column(name = "call_table_id")
private Integer callTableId;
@Size(max = 255)
@Column(name = "phone")
private String phone;
@Size(max = 255)
@Column(name = "name")
private String name;
@Size(max = 255)
@Column(name = "shop_name")
private String shopName;
@Column(name = "shop_id")
private Integer shopId;
@Column(name = "state")
private Byte state;
@Column(name = "create_time")
private Instant createTime;
@Column(name = "call_time")
private Instant callTime;
@Column(name = "call_count")
private Integer callCount;
@Column(name = "pass_time")
private Instant passTime;
@Column(name = "cancel_time")
private Instant cancelTime;
@Column(name = "confirm_time")
private Instant confirmTime;
@Size(max = 255)
@Column(name = "note")
private String note;
@Column(name = "user_id")
private Integer userId;
@Size(max = 255)
@Column(name = "open_id")
private String openId;
@Column(name = "sub_state")
private Integer subState;
@Column(name = "call_num")
private String callNum;
}

View File

@ -1,57 +0,0 @@
package cn.ysk.cashier.mybatis.entity;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import javax.validation.constraints.Size;
import java.time.Instant;
@Getter
@Setter
@Entity
@Table(name = "tb_call_table")
public class TbCallTable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false)
private Integer id;
@Size(max = 255)
@Column(name = "name")
private String name;
@Size(max = 255)
@Column(name = "note")
private String note;
@Column(name = "wait_time")
private Integer waitTime;
@Size(max = 255)
@Column(name = "prefix")
private String prefix;
@Column(name = "start")
private Integer start;
@Column(name = "near_num")
private Integer nearNum;
@Column(name = "state")
private Byte state;
@Column(name = "shop_id")
private Integer shopId;
@Size(max = 255)
@Column(name = "qrcode")
private String qrcode;
@Column(name = "create_time")
private Instant createTime;
@Column(name = "update_time")
private Instant updateTime;
}

View File

@ -2,6 +2,8 @@ package cn.ysk.cashier.mybatis.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import lombok.Data;
@ -12,7 +14,7 @@ import lombok.Data;
*/
@Table(name="tb_shop_user")
@Data
public class TbShopUser implements Serializable {
public class TbMShopUser implements Serializable {
/**
* (随机)
*/
@ -80,7 +82,7 @@ public class TbShopUser implements Serializable {
private String name;
/**
*
*
*/
private String head_img;
@ -140,12 +142,12 @@ public class TbShopUser implements Serializable {
private Integer sort;
/**
*
*
*/
private Long created_at;
/**
*
*
*/
private Long updated_at;
@ -172,7 +174,7 @@ public class TbShopUser implements Serializable {
if (getClass() != that.getClass()) {
return false;
}
TbShopUser other = (TbShopUser) that;
TbMShopUser other = (TbMShopUser) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
&& (this.getCredit_amount() == null ? other.getCredit_amount() == null : this.getCredit_amount().equals(other.getCredit_amount()))
@ -279,4 +281,4 @@ public class TbShopUser implements Serializable {
sb.append("]");
return sb.toString();
}
}
}

View File

@ -1,26 +0,0 @@
package cn.ysk.cashier.mybatis.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* @author GYJ
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("tb_mini_app_pages")
public class TbMiniAppPages extends Model<TbMiniAppPages> {
private Integer id;
private String icon;
private String name;
private String path;
private String description;
private Integer status;
private Integer sort;
private Date createTime;
private Date updateTime;
}

View File

@ -1,28 +0,0 @@
package cn.ysk.cashier.mybatis.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* @author GYJ
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("tb_shop_ad")
public class TbShopAd extends Model<TbShopAd> {
private Integer id;
private Integer shopId;
private String imgUrl;
private String linkPath;
private Integer borderRadius;
private String showPosition;
private String frequency;
private Integer status;
private Integer sort;
private Date createTime;
private Date updateTime;
}

View File

@ -3,7 +3,6 @@ package cn.ysk.cashier.mybatis.entity;
import java.util.Date;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import org.apache.commons.lang3.StringUtils;
/**
@ -19,13 +18,11 @@ public class TbShopExtend extends Model<TbShopExtend> {
//商户Id
private Integer shopId;
//img:图片text:文本
private String name;
private String type;
//自定义key
private String autokey;
//
private String value;
private String detail;
//更新时间
private Date updateTime;
//创建时间
@ -56,14 +53,6 @@ public class TbShopExtend extends Model<TbShopExtend> {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAutokey() {
return autokey;
}
@ -95,51 +84,5 @@ public class TbShopExtend extends Model<TbShopExtend> {
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getDetail() {
return detail;
}
public void setDetail(String detail) {
this.detail = detail;
}
/**
* index_bg店铺首页背景图
* my_bg 我的页面背景图
* member_bg会员卡页面背景图
* shopinfo_bg商品列表顶部背景图
* @param autokey
*/
public void initAutoKey(String autokey,Integer shopId) {
if (StringUtils.isBlank(name)) {
switch (autokey) {
case "index_bg":
this.name = "店铺首页背景图";
this.detail="建议尺寸: 375*600 ";
this.value = "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/indexs/shuangbackground.png";
break;
case "my_bg":
this.name = "我的页面背景图";
this.detail="建议尺寸: 375*200";
this.value = "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/myTopBack.png";
break;
case "member_bg":
this.name = "会员卡页面背景图";
this.detail="建议尺寸: 315*152";
this.value = "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/member_bg.png";
break;
case "shopinfo_bg":
this.name = "商品列表顶部背景图";
this.detail="建议尺寸: 375*120";
this.value = "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/shopDetails/topBanner.png";
break;
}
}
this.type="img";
this.shopId=shopId;
this.autokey = autokey;
}
}

View File

@ -1,34 +0,0 @@
package cn.ysk.cashier.mybatis.entity;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import java.time.Instant;
@Getter
@Setter
@Entity
@Table(name = "tb_shop_msg_state")
public class TbShopMsgState {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false)
private Integer id;
@Column(name = "shop_id")
private Integer shopId;
@Column(name = "type")
private Integer type;
@Column(name = "state")
private Integer state;
@Column(name = "create_time")
private Instant createTime;
@Column(name = "update_time")
private Instant updateTime;
}

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