Compare commits
257 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
ae1a748ef2 | |
|
|
1add18e7dd | |
|
|
cb4fa67e48 | |
|
|
50a2773b5a | |
|
|
f739b3b1a6 | |
|
|
bf735b1a31 | |
|
|
2e6518a975 | |
|
|
61b92e07ba | |
|
|
0ed1e068ed | |
|
|
80edd84c4f | |
|
|
c3597cd28e | |
|
|
35d66973bc | |
|
|
bdad979450 | |
|
|
260bf68c23 | |
|
|
c063c19532 | |
|
|
6096f91b6c | |
|
|
50e0f09be8 | |
|
|
09252dda7c | |
|
|
db545ee118 | |
|
|
fec443ce6c | |
|
|
c618c712f3 | |
|
|
98bb93516f | |
|
|
4e81e0fca1 | |
|
|
28eb1496b9 | |
|
|
81b6454557 | |
|
|
72a3057126 | |
|
|
b7fc525623 | |
|
|
f458e6f77e | |
|
|
7b91549664 | |
|
|
10373ab45f | |
|
|
a08d181e77 | |
|
|
50faef4a20 | |
|
|
782a152243 | |
|
|
5e59b19cec | |
|
|
8f002b689d | |
|
|
dfe0bb6154 | |
|
|
4bd99e7f6e | |
|
|
1cb099702a | |
|
|
37d16054c4 | |
|
|
3174c9abf3 | |
|
|
fed5b28ce2 | |
|
|
53512a0b37 | |
|
|
be701b46ec | |
|
|
8247b3b4bd | |
|
|
963920fd2a | |
|
|
0b645bd695 | |
|
|
44329cc64e | |
|
|
37be5a521e | |
|
|
d63861ac13 | |
|
|
1b9b088e43 | |
|
|
6e31bb6251 | |
|
|
4b5c272cd9 | |
|
|
5480d0eb5f | |
|
|
be4f8cbbdd | |
|
|
923c204c3c | |
|
|
b1219a114b | |
|
|
94e875008b | |
|
|
e823832cdb | |
|
|
cce10b9475 | |
|
|
68b9b1ab98 | |
|
|
e131095e45 | |
|
|
c2843ecc3d | |
|
|
a941cf56f2 | |
|
|
7b62f75cca | |
|
|
68a96b405d | |
|
|
e9297f49a1 | |
|
|
1c5fb88b38 | |
|
|
d6756ee2e3 | |
|
|
26f6af0256 | |
|
|
77f01cabdc | |
|
|
33a0722c8c | |
|
|
b0392f70e1 | |
|
|
9ea2ecf552 | |
|
|
52410b73f1 | |
|
|
a68b7ee991 | |
|
|
71bc936074 | |
|
|
297ccc0233 | |
|
|
417451f432 | |
|
|
0fe0722893 | |
|
|
a0274410a8 | |
|
|
fcc1d47a24 | |
|
|
bfd96a1d52 | |
|
|
dc176f6e46 | |
|
|
59843ce046 | |
|
|
6059797e1a | |
|
|
98145e92ec | |
|
|
8c9926c1a7 | |
|
|
73030b7d91 | |
|
|
41ee71b594 | |
|
|
979a3a6ade | |
|
|
17fc234975 | |
|
|
09c6cd178a | |
|
|
fcff40f72b | |
|
|
221ad5a8d4 | |
|
|
8558343524 | |
|
|
1df8e2cf1f | |
|
|
e48029a9a4 | |
|
|
489b3597d6 | |
|
|
2ca427f808 | |
|
|
e9711dffe3 | |
|
|
d7fe7cf40a | |
|
|
543d770d98 | |
|
|
30407b1715 | |
|
|
2e5cc6ab92 | |
|
|
b01812bce9 | |
|
|
58a3ac0ed0 | |
|
|
6863fbc100 | |
|
|
4929e467ab | |
|
|
d78a7a7ac6 | |
|
|
6ba0544243 | |
|
|
bbcd6edf20 | |
|
|
f0476f05e0 | |
|
|
48aab9eeac | |
|
|
078a986e6b | |
|
|
d272efa45f | |
|
|
29ccf35e5f | |
|
|
f9931b50ea | |
|
|
f6e473b8bb | |
|
|
98bc995b71 | |
|
|
96791306f2 | |
|
|
b4f113e811 | |
|
|
01d92b3812 | |
|
|
e16d9dfcb1 | |
|
|
64e89d5ed6 | |
|
|
28874a59f1 | |
|
|
12e7379cbf | |
|
|
a2e16bf05d | |
|
|
f8a9022064 | |
|
|
ce54b66205 | |
|
|
8381287036 | |
|
|
112206d2ec | |
|
|
16f07f2f40 | |
|
|
52dce24fb8 | |
|
|
614ffc9abf | |
|
|
532dec69e3 | |
|
|
9e26fad331 | |
|
|
c408e8e168 | |
|
|
2a6c54ba47 | |
|
|
bffa05f07f | |
|
|
91e2e0caaf | |
|
|
d981259995 | |
|
|
a9e5ad8229 | |
|
|
edadbb5662 | |
|
|
7d37e58206 | |
|
|
91751b0f32 | |
|
|
7f78921eda | |
|
|
e3e0c93502 | |
|
|
df0570860d | |
|
|
7d1571628f | |
|
|
4e5c560d95 | |
|
|
0d8aa662e4 | |
|
|
beea5e902c | |
|
|
98cf4f2f6d | |
|
|
376af15266 | |
|
|
f00ad6a46c | |
|
|
972ab851c8 | |
|
|
aa7c5d3744 | |
|
|
b9157ddc6b | |
|
|
1cb0d9c80f | |
|
|
830271a838 | |
|
|
b388b3a044 | |
|
|
049f52499e | |
|
|
d6b8919294 | |
|
|
fcfe0a2f53 | |
|
|
a90c441988 | |
|
|
d6bbe73d58 | |
|
|
2567044da8 | |
|
|
15de68b704 | |
|
|
2252f4edcb | |
|
|
ea86b42847 | |
|
|
53275cd5de | |
|
|
b5fc56c0aa | |
|
|
a74612f5a6 | |
|
|
95e37c2048 | |
|
|
e35cb8ad3c | |
|
|
635625842a | |
|
|
53fd7e24c0 | |
|
|
cf62b77128 | |
|
|
58eb528047 | |
|
|
4909ebe807 | |
|
|
fa868cce31 | |
|
|
5f2950ab72 | |
|
|
8da97add53 | |
|
|
2250bda5c1 | |
|
|
e3f68dc486 | |
|
|
ff07ab528e | |
|
|
0ec21c31e9 | |
|
|
8d73b216ef | |
|
|
2ad3ca3ef8 | |
|
|
341b54bd6b | |
|
|
89810ae9b9 | |
|
|
5643faab22 | |
|
|
c51e0ec580 | |
|
|
96f1dcb768 | |
|
|
9f6f7c2a78 | |
|
|
e1499150f9 | |
|
|
e6b8414366 | |
|
|
085ae733e2 | |
|
|
9b8ec56b96 | |
|
|
d10a9671a9 | |
|
|
7da10ca43e | |
|
|
a21e361b4e | |
|
|
e8f9af93e8 | |
|
|
fcaba6d511 | |
|
|
b13a48d5e5 | |
|
|
3807eb43ce | |
|
|
7eab45ae49 | |
|
|
89582d3bc8 | |
|
|
1de1edb537 | |
|
|
df95c09724 | |
|
|
a53e9f7ab4 | |
|
|
8e0f237e2e | |
|
|
e938911e4a | |
|
|
0c5192e86e | |
|
|
5732e6974f | |
|
|
1cfc94b22a | |
|
|
adee84544d | |
|
|
7c122565fc | |
|
|
2ec29a3825 | |
|
|
b8a60a1549 | |
|
|
d32f9705a0 | |
|
|
62ca02cdc4 | |
|
|
4a8bce3c34 | |
|
|
199e787d92 | |
|
|
7271e77b05 | |
|
|
a183d2bfec | |
|
|
fa566a7057 | |
|
|
3d9e4ee511 | |
|
|
f808912006 | |
|
|
5fe0e2a83b | |
|
|
9d8bb72a7e | |
|
|
a0930151a8 | |
|
|
441ecf38f1 | |
|
|
9bfa67d71b | |
|
|
9ec06de8cd | |
|
|
cd6d6f2e07 | |
|
|
27f7d07f27 | |
|
|
b08ff62d86 | |
|
|
7715b758f1 | |
|
|
6e03ad4997 | |
|
|
c35df24d2d | |
|
|
eb32bedc25 | |
|
|
a7de11423f | |
|
|
e53037232f | |
|
|
fd5b79d6ec | |
|
|
7f1c028fed | |
|
|
66ae922dc4 | |
|
|
0e9996bcf0 | |
|
|
d862eb43be | |
|
|
5cf796ac83 | |
|
|
220c717085 | |
|
|
8e1aa5bc19 | |
|
|
bff2ad2250 | |
|
|
260d6eb7d7 | |
|
|
b218436a1c | |
|
|
3d43f5f114 | |
|
|
9e13d1ff98 |
|
|
@ -74,4 +74,6 @@ public interface CacheKey {
|
||||||
*/
|
*/
|
||||||
String PRODUCT = "PRODUCT:";
|
String PRODUCT = "PRODUCT:";
|
||||||
String SONG_URL = "song:";
|
String SONG_URL = "song:";
|
||||||
|
|
||||||
|
String VIPCODE = "VIPCODE:";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,11 @@ import cn.hutool.poi.excel.ExcelUtil;
|
||||||
import cn.hutool.poi.excel.ExcelWriter;
|
import cn.hutool.poi.excel.ExcelWriter;
|
||||||
import cn.ysk.cashier.exception.BadRequestException;
|
import cn.ysk.cashier.exception.BadRequestException;
|
||||||
import org.apache.poi.ss.usermodel.*;
|
import org.apache.poi.ss.usermodel.*;
|
||||||
|
import org.apache.poi.ss.util.CellRangeAddress;
|
||||||
import org.apache.poi.util.IOUtils;
|
import org.apache.poi.util.IOUtils;
|
||||||
import org.apache.poi.xssf.streaming.SXSSFSheet;
|
import org.apache.poi.xssf.streaming.SXSSFSheet;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
@ -37,10 +39,8 @@ import java.io.*;
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* File工具类,扩展 hutool 工具包
|
* File工具类,扩展 hutool 工具包
|
||||||
|
|
@ -270,7 +270,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void downloadExcelAndMerge(List<Map<String, Object>> list, int colSize, HttpServletResponse response, ArrayList<Integer> mergeRowIndex) throws IOException {
|
public static void downloadExcelAndMerge(ConcurrentLinkedQueue<Map<String, Object>> list, int colSize, HttpServletResponse response, List<Integer> mergeRowIndex) throws IOException {
|
||||||
String tempPath = SYS_TEM_DIR + IdUtil.fastSimpleUUID() + ".xlsx";
|
String tempPath = SYS_TEM_DIR + IdUtil.fastSimpleUUID() + ".xlsx";
|
||||||
File file = new File(tempPath);
|
File file = new File(tempPath);
|
||||||
ExcelWriter writer = ExcelUtil.getWriter(file);
|
ExcelWriter writer = ExcelUtil.getWriter(file);
|
||||||
|
|
|
||||||
|
|
@ -257,6 +257,15 @@ 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 普通缓存放入并设置时间
|
* 普通缓存放入并设置时间
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -96,8 +96,7 @@ public class LogServiceImpl implements LogService {
|
||||||
String value = SpelUtil.generateKeyBySpEL(split[1], joinPoint);
|
String value = SpelUtil.generateKeyBySpEL(split[1], joinPoint);
|
||||||
// 描述
|
// 描述
|
||||||
log.setDescription(split[0] + ":" + value);
|
log.setDescription(split[0] + ":" + value);
|
||||||
}
|
} else if (split.length == 3) {
|
||||||
if (split.length == 3) {
|
|
||||||
// String v1 = SpelUtil.generateKeyBySpEL(split[1], joinPoint);
|
// String v1 = SpelUtil.generateKeyBySpEL(split[1], joinPoint);
|
||||||
String v2 = SpelUtil.generateKeyBySpEL(split[2], joinPoint);
|
String v2 = SpelUtil.generateKeyBySpEL(split[2], joinPoint);
|
||||||
if (methodName.contains("createOutAndONOperate")) {
|
if (methodName.contains("createOutAndONOperate")) {
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,10 @@
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-validation</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 代码生成模块 -->
|
<!-- 代码生成模块 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||||
@EnableAsync
|
@EnableAsync
|
||||||
@RestController
|
@RestController
|
||||||
@Api(hidden = true)
|
@Api(hidden = true)
|
||||||
@SpringBootApplication
|
|
||||||
@EnableTransactionManagement
|
@EnableTransactionManagement
|
||||||
|
@SpringBootApplication
|
||||||
@EnableJpaAuditing(auditorAwareRef = "auditorAware")
|
@EnableJpaAuditing(auditorAwareRef = "auditorAware")
|
||||||
public class AppRun {
|
public class AppRun {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,10 @@ public class RabbitConfig {
|
||||||
public static final String EXCHANGE_STOCK_RECORD = "exchange.stock.record";
|
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 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
|
@Bean
|
||||||
Queue stockRecordSaleQueue() {
|
Queue stockRecordSaleQueue() {
|
||||||
return new Queue(QUEUE_STOCK_RECORD_SALE);
|
return new Queue(QUEUE_STOCK_RECORD_SALE);
|
||||||
|
|
@ -27,4 +31,14 @@ public class RabbitConfig {
|
||||||
Binding binding(Queue stockRecordSaleQueue, DirectExchange stockRecordExchange) {
|
Binding binding(Queue stockRecordSaleQueue, DirectExchange stockRecordExchange) {
|
||||||
return BindingBuilder.bind(stockRecordSaleQueue).to(stockRecordExchange).with(ROUTING_STOCK_RECORD_SALE);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -43,6 +43,7 @@ import cn.ysk.cashier.config.security.service.dto.JwtUserDto;
|
||||||
import cn.ysk.cashier.config.security.service.OnlineUserService;
|
import cn.ysk.cashier.config.security.service.OnlineUserService;
|
||||||
import cn.ysk.cashier.pojo.shop.TbShopInfo;
|
import cn.ysk.cashier.pojo.shop.TbShopInfo;
|
||||||
import cn.ysk.cashier.repository.shop.TbShopInfoRepository;
|
import cn.ysk.cashier.repository.shop.TbShopInfoRepository;
|
||||||
|
import org.springframework.data.repository.query.Param;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
|
@ -232,6 +233,14 @@ public class AuthorizationController {
|
||||||
return ResponseEntity.ok(imgResult);
|
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("退出登录")
|
@ApiOperation("退出登录")
|
||||||
@AnonymousDeleteMapping(value = "/logout")
|
@AnonymousDeleteMapping(value = "/logout")
|
||||||
public ResponseEntity<Object> logout(HttpServletRequest request) {
|
public ResponseEntity<Object> logout(HttpServletRequest request) {
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,7 @@ public class TokenProvider implements InitializingBean {
|
||||||
.getBody();
|
.getBody();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param token 需要检查的token
|
* @param token 需要检查的token
|
||||||
*/
|
*/
|
||||||
|
|
@ -137,4 +138,17 @@ public class TokenProvider implements InitializingBean {
|
||||||
}
|
}
|
||||||
return null;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
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";
|
||||||
|
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -101,6 +101,12 @@ public class TbConsInfo implements Serializable {
|
||||||
@ApiModelProperty(value = "消耗总量")
|
@ApiModelProperty(value = "消耗总量")
|
||||||
private BigDecimal stockConsume;
|
private BigDecimal stockConsume;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Column(name = "`is_check`")
|
||||||
|
@ApiModelProperty(value = "是否检测库存")
|
||||||
|
private String isCheck;
|
||||||
|
|
||||||
public void copy(TbConsInfo source){
|
public void copy(TbConsInfo source){
|
||||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ import javax.persistence.*;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin
|
||||||
|
|
@ -74,6 +75,11 @@ public class ViewConInfoFlow implements Serializable {
|
||||||
private BigDecimal balance;
|
private BigDecimal balance;
|
||||||
|
|
||||||
|
|
||||||
|
@Column(name = "`status`")
|
||||||
|
@ApiModelProperty(value = "status")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Column(name = "`product_id`")
|
@Column(name = "`product_id`")
|
||||||
@ApiModelProperty(value = "商品id")
|
@ApiModelProperty(value = "商品id")
|
||||||
|
|
@ -84,6 +90,48 @@ public class ViewConInfoFlow implements Serializable {
|
||||||
@ApiModelProperty(value = "商品名称")
|
@ApiModelProperty(value = "商品名称")
|
||||||
private String productName;
|
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){
|
public void copy(ViewConInfoFlow source){
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,18 @@ public interface RabbitConstants {
|
||||||
String CONS_COLLECT_ROUTINGKEY_PUT = "cons_collect_routingkey_put";
|
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";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ public class TbProskuConController {
|
||||||
} catch (BadRequestException be) {
|
} catch (BadRequestException be) {
|
||||||
throw new Exception(be.getMessage());
|
throw new Exception(be.getMessage());
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
throw new Exception("相同商品耗材信息不允许添加");
|
throw new Exception("相同商品耗材信息不允许添加");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,4 +77,7 @@ public class TbConsInfoDto implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
private String contypeCode;
|
private String contypeCode;
|
||||||
|
|
||||||
|
|
||||||
|
private String isCheck;
|
||||||
}
|
}
|
||||||
|
|
@ -68,4 +68,6 @@ public class TbConsInfoFlowDto implements Serializable {
|
||||||
private Integer orderId;
|
private Integer orderId;
|
||||||
|
|
||||||
private String orderNo;
|
private String orderNo;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -21,6 +21,7 @@ import lombok.Data;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin
|
||||||
|
|
@ -49,4 +50,24 @@ public class ViewConInfoFlowDto implements Serializable {
|
||||||
private String productId;
|
private String productId;
|
||||||
|
|
||||||
private String productName;
|
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;
|
||||||
}
|
}
|
||||||
|
|
@ -18,4 +18,7 @@ public class ViewConInfoFlowQueryCriteria{
|
||||||
|
|
||||||
@Query
|
@Query
|
||||||
private String shopId;
|
private String shopId;
|
||||||
|
|
||||||
|
@Query
|
||||||
|
private String conTypeCode;
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package cn.ysk.cashier.cons.service.impl;
|
package cn.ysk.cashier.cons.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.ysk.cashier.cons.domain.*;
|
import cn.ysk.cashier.cons.domain.*;
|
||||||
import cn.ysk.cashier.cons.repository.TbConsInfoFlowRepository;
|
import cn.ysk.cashier.cons.repository.TbConsInfoFlowRepository;
|
||||||
import cn.ysk.cashier.cons.repository.TbConsInfoRepository;
|
import cn.ysk.cashier.cons.repository.TbConsInfoRepository;
|
||||||
|
|
@ -81,9 +82,9 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
||||||
@Override
|
@Override
|
||||||
public List<TbConsInfoDto> queryAll(TbConsInfoQueryCriteria criteria) {
|
public List<TbConsInfoDto> queryAll(TbConsInfoQueryCriteria criteria) {
|
||||||
|
|
||||||
List<TbConsInfoDto> list= tbConsInfoMapper.toDto(tbConsInfoRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, criteria, criteriaBuilder)));
|
List<TbConsInfoDto> list = tbConsInfoMapper.toDto(tbConsInfoRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, criteria, criteriaBuilder)));
|
||||||
if(Objects.nonNull(list)&&list.size()>0){
|
if (Objects.nonNull(list) && list.size() > 0) {
|
||||||
list.parallelStream().forEach(it->{
|
list.parallelStream().forEach(it -> {
|
||||||
it.setContypeCode(tbConsTypeRepository.findById(it.getConTypeId()).orElseGet(TbConsType::new).getConTypeCode());
|
it.setContypeCode(tbConsTypeRepository.findById(it.getConTypeId()).orElseGet(TbConsType::new).getConTypeCode());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -115,14 +116,31 @@ 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.setConTypeName(tbConsType.getConTypeName());
|
||||||
resource.setLasterInStock(BigDecimal.ZERO);
|
resource.setLasterInStock(BigDecimal.ZERO);
|
||||||
resource.setStockNumber(BigDecimal.ZERO);
|
resource.setStockNumber(BigDecimal.ZERO);
|
||||||
resource.setStatus("1");
|
resource.setStatus("1");
|
||||||
resource.setStockConsume(BigDecimal.ZERO);
|
resource.setStockConsume(BigDecimal.ZERO);
|
||||||
resource.setCreateTime(new Timestamp(System.currentTimeMillis()));
|
resource.setCreateTime(new Timestamp(System.currentTimeMillis()));
|
||||||
tbConsInfoRepository.save(resource);
|
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);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return tbConsInfoMapper.toDto(new TbConsInfo());
|
return tbConsInfoMapper.toDto(new TbConsInfo());
|
||||||
}
|
}
|
||||||
|
|
@ -137,12 +155,14 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
||||||
throw new Exception("耗材信息不存在");
|
throw new Exception("耗材信息不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
tbConsInfo.setConName(resource.getConName());
|
tbConsInfo.setConName(ObjectUtil.isEmpty(resource.getConName())||ObjectUtil.isNull(resource.getConName())?tbConsInfo.getConName():resource.getConName());
|
||||||
tbConsInfo.setPrice(resource.getPrice());
|
tbConsInfo.setPrice(ObjectUtil.isEmpty(resource.getPrice())||ObjectUtil.isNull(resource.getPrice())?tbConsInfo.getPrice():resource.getPrice());
|
||||||
tbConsInfo.setConUnit(resource.getConUnit());
|
tbConsInfo.setConUnit(ObjectUtil.isEmpty(resource.getConUnit())||ObjectUtil.isNull(resource.getConUnit())?tbConsInfo.getConUnit(): resource.getConUnit());
|
||||||
tbConsInfo.setConWarning(resource.getConWarning());
|
tbConsInfo.setConWarning(ObjectUtil.isEmpty(resource.getConWarning())||ObjectUtil.isNull(resource.getConWarning())?tbConsInfo.getConWarning():resource.getConWarning());
|
||||||
tbConsInfo.setStatus(resource.getStatus());
|
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.setUpdateTime(new Timestamp(System.currentTimeMillis()));
|
tbConsInfo.setUpdateTime(new Timestamp(System.currentTimeMillis()));
|
||||||
|
|
||||||
tbConsInfoRepository.save(tbConsInfo);
|
tbConsInfoRepository.save(tbConsInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -164,9 +184,9 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
||||||
map.put("耗材名称", tbConsInfo.getConName());
|
map.put("耗材名称", tbConsInfo.getConName());
|
||||||
map.put("耗材类型代码", tbConsInfo.getContypeCode());
|
map.put("耗材类型代码", tbConsInfo.getContypeCode());
|
||||||
map.put("单位", tbConsInfo.getConUnit());
|
map.put("单位", tbConsInfo.getConUnit());
|
||||||
map.put("价格",tbConsInfo.getPrice());
|
map.put("价格", tbConsInfo.getPrice());
|
||||||
map.put("耗材预警值",tbConsInfo.getConWarning());
|
map.put("耗材预警值", tbConsInfo.getConWarning());
|
||||||
map.put("库存",tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()));
|
map.put("库存", tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()));
|
||||||
list.add(map);
|
list.add(map);
|
||||||
}
|
}
|
||||||
FileUtil.downloadExcel(list, response);
|
FileUtil.downloadExcel(list, response);
|
||||||
|
|
@ -175,7 +195,7 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void stockInOut(SuppFlow resources) throws Exception {
|
public void stockInOut(SuppFlow resources) throws Exception {
|
||||||
log.info("resources:{}",JSON.toJSONString(resources));
|
log.info("resources:{}", JSON.toJSONString(resources));
|
||||||
if (Objects.isNull(resources)) {
|
if (Objects.isNull(resources)) {
|
||||||
throw new Exception("参数错误");
|
throw new Exception("参数错误");
|
||||||
}
|
}
|
||||||
|
|
@ -185,9 +205,9 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
||||||
throw new Exception("店铺信息不存在");
|
throw new Exception("店铺信息不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
TbShopPurveyor purveyor=null;
|
TbShopPurveyor purveyor = null;
|
||||||
TbProductStockOperate stockOperate = new TbProductStockOperate();
|
TbProductStockOperate stockOperate = new TbProductStockOperate();
|
||||||
if(Objects.nonNull(resources.getSupplierId())){
|
if (Objects.nonNull(resources.getSupplierId())) {
|
||||||
purveyor = tbShopPurveyorRepository.getById(resources.getSupplierId());
|
purveyor = tbShopPurveyorRepository.getById(resources.getSupplierId());
|
||||||
if (Objects.nonNull(purveyor)) {
|
if (Objects.nonNull(purveyor)) {
|
||||||
stockOperate.setPurveyorId(resources.getSupplierId().toString());
|
stockOperate.setPurveyorId(resources.getSupplierId().toString());
|
||||||
|
|
@ -197,7 +217,7 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
||||||
|
|
||||||
stockOperate.setShopId(tbShopInfo.getId().toString());
|
stockOperate.setShopId(tbShopInfo.getId().toString());
|
||||||
stockOperate.setStockSnap("");
|
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<>();
|
Map<String, String> operatorSnapMap = new HashMap<>();
|
||||||
operatorSnapMap.put("name", tbShopInfo.getShopName());
|
operatorSnapMap.put("name", tbShopInfo.getShopName());
|
||||||
operatorSnapMap.put("account", tbShopInfo.getAccount());
|
operatorSnapMap.put("account", tbShopInfo.getAccount());
|
||||||
|
|
@ -209,11 +229,11 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
||||||
stockOperate.setUpdatedAt(System.currentTimeMillis());
|
stockOperate.setUpdatedAt(System.currentTimeMillis());
|
||||||
stockOperate.setStatus("normal");
|
stockOperate.setStatus("normal");
|
||||||
|
|
||||||
JSONArray array=new JSONArray();
|
JSONArray array = new JSONArray();
|
||||||
|
|
||||||
|
|
||||||
for (SuppFlow.ConInfos conInfos : resources.getList()) {
|
for (SuppFlow.ConInfos conInfos : resources.getList()) {
|
||||||
JSONObject object=new JSONObject();
|
JSONObject object = new JSONObject();
|
||||||
|
|
||||||
TbConsInfo info = tbConsInfoRepository.getById(conInfos.getConInfold());
|
TbConsInfo info = tbConsInfoRepository.getById(conInfos.getConInfold());
|
||||||
if (Objects.isNull(info)) {
|
if (Objects.isNull(info)) {
|
||||||
|
|
@ -227,19 +247,19 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
||||||
|
|
||||||
TbShopPurveyorTransact purveyorTransact = new TbShopPurveyorTransact();
|
TbShopPurveyorTransact purveyorTransact = new TbShopPurveyorTransact();
|
||||||
purveyorTransact.setShopId(tbShopInfo.getId().toString());
|
purveyorTransact.setShopId(tbShopInfo.getId().toString());
|
||||||
purveyorTransact.setPurveyorName(Objects.isNull(purveyor)?"":purveyor.getPurveyorName());
|
purveyorTransact.setPurveyorName(Objects.isNull(purveyor) ? "" : purveyor.getPurveyorName());
|
||||||
purveyorTransact.setPurveyorId(Objects.isNull(purveyor)?"":purveyor.getId().toString());
|
purveyorTransact.setPurveyorId(Objects.isNull(purveyor) ? "" : purveyor.getId().toString());
|
||||||
purveyorTransact.setRemark(resources.getRemark());
|
purveyorTransact.setRemark(resources.getRemark());
|
||||||
purveyorTransact.setCreatedAt(System.currentTimeMillis());
|
purveyorTransact.setCreatedAt(System.currentTimeMillis());
|
||||||
purveyorTransact.setUpdatedAt(System.currentTimeMillis());
|
purveyorTransact.setUpdatedAt(System.currentTimeMillis());
|
||||||
|
|
||||||
suppFlow.setConInfoId(info.getConTypeId());
|
suppFlow.setConInfoId(info.getConTypeId());
|
||||||
suppFlow.setShopId(resources.getShopId());
|
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.setType(resources.getType());
|
||||||
suppFlow.setStockNumber(conInfos.getStockNumber());
|
suppFlow.setStockNumber(conInfos.getStockNumber());
|
||||||
|
|
||||||
BigDecimal amount=info.getStockNumber().subtract(info.getStockConsume());
|
BigDecimal amount = info.getStockNumber().subtract(info.getStockConsume());
|
||||||
|
|
||||||
|
|
||||||
if ("in".equals(resources.getType())) {
|
if ("in".equals(resources.getType())) {
|
||||||
|
|
@ -259,19 +279,17 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
||||||
purveyorTransact.setWaitAmount((resources.getAccountsPayable().subtract(resources.getActualPayment())));
|
purveyorTransact.setWaitAmount((resources.getAccountsPayable().subtract(resources.getActualPayment())));
|
||||||
purveyorTransact.setType("cons_in");
|
purveyorTransact.setType("cons_in");
|
||||||
|
|
||||||
object.put("number",conInfos.getStockNumber());
|
object.put("number", conInfos.getStockNumber());
|
||||||
} else if("out".equals(resources.getType())) {
|
} else if ("out".equals(resources.getType())) {
|
||||||
stockOperate.setSubType(-1);
|
stockOperate.setSubType(-1);
|
||||||
|
|
||||||
if(conInfos.getStockNumber().compareTo(info.getStockNumber())>0){
|
if (conInfos.getStockNumber().compareTo(info.getStockNumber()) > 0) {
|
||||||
throw new BadRequestException("出库数量大于现有的库存数量");
|
throw new BadRequestException("出库数量大于现有的库存数量");
|
||||||
}
|
}
|
||||||
|
|
||||||
info.setStockNumber(info.getStockNumber().subtract(conInfos.getStockNumber()));
|
info.setStockNumber(info.getStockNumber().subtract(conInfos.getStockNumber()));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
suppFlow.setBalance(info.getStockNumber().subtract(info.getStockConsume()).subtract(conInfos.getStockNumber()));
|
suppFlow.setBalance(info.getStockNumber().subtract(info.getStockConsume()).subtract(conInfos.getStockNumber()));
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -284,16 +302,16 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
||||||
|
|
||||||
purveyorTransact.setWaitAmount((resources.getAccountsPayable().subtract(resources.getActualPayment())).negate());
|
purveyorTransact.setWaitAmount((resources.getAccountsPayable().subtract(resources.getActualPayment())).negate());
|
||||||
purveyorTransact.setType("cons_out");
|
purveyorTransact.setType("cons_out");
|
||||||
object.put("number",conInfos.getStockNumber());
|
object.put("number", conInfos.getStockNumber());
|
||||||
}else {
|
} else {
|
||||||
throw new BadRequestException("错误操作类型");
|
throw new BadRequestException("错误操作类型");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
object.put("stockNumber",amount);
|
object.put("stockNumber", amount);
|
||||||
|
|
||||||
object.put("name",info.getConName());
|
object.put("name", info.getConName());
|
||||||
object.put("unitName",info.getConUnit());
|
object.put("unitName", info.getConUnit());
|
||||||
array.add(object);
|
array.add(object);
|
||||||
|
|
||||||
suppFlow.setPrice(conInfos.getPrice());
|
suppFlow.setPrice(conInfos.getPrice());
|
||||||
|
|
@ -347,7 +365,7 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
||||||
XSSFSheet sheet = xssfWorkbook.getSheetAt(0);
|
XSSFSheet sheet = xssfWorkbook.getSheetAt(0);
|
||||||
XSSFRow row = null;
|
XSSFRow row = null;
|
||||||
|
|
||||||
List<TbConsInfo> consInfos=new ArrayList<>();
|
List<TbConsInfo> consInfos = new ArrayList<>();
|
||||||
for (int i = 1; i < sheet.getPhysicalNumberOfRows(); i++) {
|
for (int i = 1; i < sheet.getPhysicalNumberOfRows(); i++) {
|
||||||
row = sheet.getRow(i);
|
row = sheet.getRow(i);
|
||||||
if (row != null) {
|
if (row != null) {
|
||||||
|
|
@ -411,7 +429,7 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
||||||
TbConsInfo consInfo = tbConsInfoRepository.findByConCode(cell0.toString());
|
TbConsInfo consInfo = tbConsInfoRepository.findByConCode(cell0.toString());
|
||||||
if (ObjectUtil.isEmpty(consInfo) || ObjectUtil.isNull(consInfo)) {
|
if (ObjectUtil.isEmpty(consInfo) || ObjectUtil.isNull(consInfo)) {
|
||||||
consInfo = new 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.setShopId(Integer.valueOf(shopId));
|
||||||
consInfo.setConTypeId(tbConsType.getId());
|
consInfo.setConTypeId(tbConsType.getId());
|
||||||
consInfo.setConTypeName(tbConsType.getConTypeName());
|
consInfo.setConTypeName(tbConsType.getConTypeName());
|
||||||
|
|
@ -467,7 +485,7 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
TbConsInfo consInfo = new TbConsInfo();
|
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.setShopId(Integer.valueOf(shopId));
|
||||||
consInfo.setConTypeId(tbConsType.getId());
|
consInfo.setConTypeId(tbConsType.getId());
|
||||||
consInfo.setConTypeName(tbConsType.getConTypeName());
|
consInfo.setConTypeName(tbConsType.getConTypeName());
|
||||||
|
|
@ -503,7 +521,7 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args){
|
public static void main(String[] args) {
|
||||||
System.out.println(UUID.randomUUID().toString());
|
System.out.println(UUID.randomUUID().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,8 @@ public class TbProskuConServiceImpl implements TbProskuConService {
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public TbProskuConDto create(List<ProskuInfo> resources) throws BadRequestException,Exception {
|
public TbProskuConDto create(List<ProskuInfo> resources) throws BadRequestException,Exception {
|
||||||
|
|
||||||
|
log.info("List<ProskuInfo> resources:{}",JSONUtil.toJSONString(resources));
|
||||||
for (ProskuInfo resource : resources) {
|
for (ProskuInfo resource : resources) {
|
||||||
TbProduct product= tbProductRepository.getById(resource.getProductId());
|
TbProduct product= tbProductRepository.getById(resource.getProductId());
|
||||||
if(Objects.isNull(product)){
|
if(Objects.isNull(product)){
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,185 +0,0 @@
|
||||||
/*
|
|
||||||
* 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);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -28,18 +28,29 @@ public class TbVersionController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
|
@Log("版本管理 新增")
|
||||||
@ApiOperation("新增版本")
|
@ApiOperation("新增版本")
|
||||||
public ResponseEntity<Object> createTbVersion(@Validated @RequestBody TbVersion resources){
|
public ResponseEntity<Object> createTbVersion(@Validated @RequestBody TbVersion resources){
|
||||||
return new ResponseEntity<>(tbVersionService.create(resources),HttpStatus.CREATED);
|
return new ResponseEntity<>(tbVersionService.create(resources),HttpStatus.CREATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping
|
@PutMapping
|
||||||
|
@Log("版本管理 修改")
|
||||||
@ApiOperation("修改版本")
|
@ApiOperation("修改版本")
|
||||||
public ResponseEntity<Object> updateTbVersion(@Validated @RequestBody TbVersion resources){
|
public ResponseEntity<Object> updateTbVersion(@Validated @RequestBody TbVersion resources){
|
||||||
tbVersionService.update(resources);
|
tbVersionService.update(resources);
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
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
|
@DeleteMapping
|
||||||
@ApiOperation("删除版本")
|
@ApiOperation("删除版本")
|
||||||
public ResponseEntity<Object> deleteTbVersion(@RequestBody Integer[] ids) {
|
public ResponseEntity<Object> deleteTbVersion(@RequestBody Integer[] ids) {
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ public class TbOrderInfoController {
|
||||||
|
|
||||||
@PostMapping("/date")
|
@PostMapping("/date")
|
||||||
@ApiOperation("查询订单")
|
@ApiOperation("查询订单")
|
||||||
@AnonymousPostMapping
|
|
||||||
public ResponseEntity<Object> queryTbOrderInfo(@RequestBody TbOrderInfoQueryCriteria criteria){
|
public ResponseEntity<Object> queryTbOrderInfo(@RequestBody TbOrderInfoQueryCriteria criteria){
|
||||||
return new ResponseEntity<>(tbOrderInfoService.queryAllPage(criteria),HttpStatus.OK);
|
return new ResponseEntity<>(tbOrderInfoService.queryAllPage(criteria),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,220 @@
|
||||||
|
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
|
||||||
|
|
||||||
|
@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
|
||||||
|
) {
|
||||||
|
pendingDTO.setIsPending(true);
|
||||||
|
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("/updateVip")
|
||||||
|
@Log("代客下单 查询购物车")
|
||||||
|
@ApiOperation("代客下单 查询购物车 /shop/table")
|
||||||
|
public ResponseEntity<Object> updateVip(
|
||||||
|
@Validated @RequestBody UpdateVipDTO updateVipDTO
|
||||||
|
) {
|
||||||
|
return ResponseEntity.ok(tbShopTableService.updateVip(updateVipDTO));
|
||||||
|
}
|
||||||
|
|
||||||
|
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()));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package cn.ysk.cashier.controller.product;
|
package cn.ysk.cashier.controller.product;
|
||||||
|
|
||||||
|
import cn.ysk.cashier.annotation.AnonymousAccess;
|
||||||
import cn.ysk.cashier.annotation.Log;
|
import cn.ysk.cashier.annotation.Log;
|
||||||
import cn.ysk.cashier.dto.product.TbProductSortCriteria;
|
import cn.ysk.cashier.dto.product.TbProductSortCriteria;
|
||||||
import cn.ysk.cashier.vo.TbProductVo;
|
import cn.ysk.cashier.vo.TbProductVo;
|
||||||
|
|
@ -32,6 +33,8 @@ public class TbProductController {
|
||||||
return new ResponseEntity<>(tbProductService.queryAll(criteria, false),HttpStatus.OK);
|
return new ResponseEntity<>(tbProductService.queryAll(criteria, false),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询/productForAdmin")
|
@ApiOperation("查询/productForAdmin")
|
||||||
public ResponseEntity<Object> queryTbProductForAdmin(TbProductQueryCriteria criteria){
|
public ResponseEntity<Object> queryTbProductForAdmin(TbProductQueryCriteria criteria){
|
||||||
|
|
@ -49,12 +52,15 @@ public class TbProductController {
|
||||||
public Object queryTbProductInfo(@PathVariable("product") Integer product)throws Exception{
|
public Object queryTbProductInfo(@PathVariable("product") Integer product)throws Exception{
|
||||||
return tbProductService.findByProductId(product);
|
return tbProductService.findByProductId(product);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping ("/productList")
|
@GetMapping ("/productList")
|
||||||
@ApiOperation("查询/product")
|
@ApiOperation("查询/product")
|
||||||
public Object queryTbProductInfo(@RequestParam List<String> productList){
|
public Object queryTbProductInfo(@RequestParam List<String> productList){
|
||||||
return tbProductService.findByProductList(productList);
|
return tbProductService.findByProductList(productList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/upProSort")
|
@PostMapping("/upProSort")
|
||||||
@ApiOperation("修改商品排序")
|
@ApiOperation("修改商品排序")
|
||||||
public ResponseEntity<Object> upProSort(@RequestBody TbProductSortCriteria param){
|
public ResponseEntity<Object> upProSort(@RequestBody TbProductSortCriteria param){
|
||||||
|
|
|
||||||
|
|
@ -36,12 +36,12 @@ public class TbProductGroupController {
|
||||||
@Resource
|
@Resource
|
||||||
private TbProductService tbProductService;
|
private TbProductService tbProductService;
|
||||||
|
|
||||||
@ApiOperation("导出数据")
|
// @ApiOperation("导出数据")
|
||||||
@GetMapping(value = "/download")
|
// @GetMapping(value = "/download")
|
||||||
@PreAuthorize("@el.check('tbProductGroup:list')")
|
// @PreAuthorize("@el.check('tbProductGroup:list')")
|
||||||
public void exportTbProductGroup(HttpServletResponse response, TbProductGroupQueryCriteria criteria) throws IOException {
|
// public void exportTbProductGroup(HttpServletResponse response, TbProductGroupQueryCriteria criteria) throws IOException {
|
||||||
tbProductGroupService.download(tbProductGroupService.queryAll(criteria), response);
|
// tbProductGroupService.download(tbProductGroupService.queryAll(criteria), response);
|
||||||
}
|
// }
|
||||||
|
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@ApiOperation("查询product/group")
|
@ApiOperation("查询product/group")
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,78 @@
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
package cn.ysk.cashier.controller.shop;
|
||||||
|
|
||||||
|
import cn.hutool.core.map.MapProxy;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.core.util.URLUtil;
|
||||||
|
import cn.ysk.cashier.exception.BadRequestException;
|
||||||
|
import cn.ysk.cashier.system.enums.ParamsEnum;
|
||||||
|
import cn.ysk.cashier.system.service.ParamsService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.nio.charset.Charset;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺支付相关接口
|
||||||
|
*
|
||||||
|
* @author tankaikai
|
||||||
|
* @since 2024-09-24 16:56
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "店铺支付相关接口")
|
||||||
|
@RequestMapping(value = {"/api/shop-pay-api", "/api/shopPayApi"})
|
||||||
|
public class ShopPayApiController {
|
||||||
|
|
||||||
|
private final ParamsService paramsService;
|
||||||
|
|
||||||
|
@GetMapping("getOrderPayUrl")
|
||||||
|
@ApiOperation("获取店铺订单支付URL")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "orderId", value = "订单id", paramType = "query", required = true, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "shopId", value = "店铺id", paramType = "query", required = true, dataType = "String"),
|
||||||
|
})
|
||||||
|
public ResponseEntity url(@RequestParam Map<String, Object> params) {
|
||||||
|
MapProxy mapProxy = MapProxy.create(params);
|
||||||
|
String shopId = mapProxy.getStr("shopId");
|
||||||
|
String orderId = mapProxy.getStr("orderId");
|
||||||
|
try {
|
||||||
|
if (StrUtil.isBlank(shopId)) {
|
||||||
|
throw new BadRequestException("店铺id不能为空");
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(orderId)) {
|
||||||
|
throw new BadRequestException("订单id不能为空");
|
||||||
|
}
|
||||||
|
String baseUrl = paramsService.getValue(ParamsEnum.SHOP_ORDER_PAY_BASE_URL.name());
|
||||||
|
String buildUrl = URLUtil.buildQuery(params, Charset.defaultCharset());
|
||||||
|
String fullUrl = baseUrl.concat("?").concat(buildUrl);
|
||||||
|
return ResponseEntity.ok().body(fullUrl);
|
||||||
|
} catch (BadRequestException e) {
|
||||||
|
return ResponseEntity.badRequest().body(e.getMessage());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("获取店铺订单支付URL异常", e);
|
||||||
|
return ResponseEntity.ok().body("获取店铺订单支付URL异常");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
package cn.ysk.cashier.controller.shop;
|
||||||
|
|
||||||
|
import cn.ysk.cashier.dto.shop.ShopPrinterDTO;
|
||||||
|
import cn.ysk.cashier.service.shop.ShopPrinterService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺打印机配置
|
||||||
|
*
|
||||||
|
* @author tankaikai
|
||||||
|
* @since 2024-09-24 16:56
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "店铺配置-打印机设置")
|
||||||
|
@RequestMapping("/api/shop-config/printer")
|
||||||
|
public class ShopPrinterController {
|
||||||
|
|
||||||
|
private final ShopPrinterService shopPrinterService;
|
||||||
|
|
||||||
|
@GetMapping("page")
|
||||||
|
@ApiOperation("分页")
|
||||||
|
public ResponseEntity page(@RequestParam Map<String, Object> params) {
|
||||||
|
Map<String, Object> page = shopPrinterService.page(params);
|
||||||
|
return ResponseEntity.ok().body(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
@ApiOperation("列表")
|
||||||
|
public ResponseEntity list(@RequestParam Map<String, Object> params) {
|
||||||
|
List<ShopPrinterDTO> list = shopPrinterService.list(params);
|
||||||
|
return ResponseEntity.ok().body(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("{id}")
|
||||||
|
@ApiOperation("详情")
|
||||||
|
public ResponseEntity get(@PathVariable("id") Integer id) {
|
||||||
|
ShopPrinterDTO data = shopPrinterService.get(id);
|
||||||
|
return ResponseEntity.ok().body(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@ApiOperation("保存")
|
||||||
|
public ResponseEntity save(@RequestBody ShopPrinterDTO dto) {
|
||||||
|
shopPrinterService.save(dto);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@ApiOperation("修改")
|
||||||
|
public ResponseEntity update(@RequestBody ShopPrinterDTO dto) {
|
||||||
|
shopPrinterService.update(dto);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("{id}")
|
||||||
|
@ApiOperation("删除")
|
||||||
|
public ResponseEntity delete(@PathVariable("id") Integer id) {
|
||||||
|
shopPrinterService.delete(id);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("update-status")
|
||||||
|
@ApiOperation("停用或启用")
|
||||||
|
public ResponseEntity updateStatus(@RequestBody ShopPrinterDTO dto) {
|
||||||
|
shopPrinterService.updateStatus(dto.getId(), dto.getStatus());
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package cn.ysk.cashier.controller.shop;
|
package cn.ysk.cashier.controller.shop;
|
||||||
|
|
||||||
|
import cn.ysk.cashier.annotation.rest.AnonymousPostMapping;
|
||||||
import cn.ysk.cashier.dto.ShopSummaryDto;
|
import cn.ysk.cashier.dto.ShopSummaryDto;
|
||||||
import cn.ysk.cashier.service.SummaryService;
|
import cn.ysk.cashier.service.SummaryService;
|
||||||
import cn.ysk.cashier.vo.TbOrderPayCountVo;
|
import cn.ysk.cashier.vo.TbOrderPayCountVo;
|
||||||
|
|
@ -41,10 +42,8 @@ public class SummaryByDayController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "count")
|
@GetMapping(value = "count")
|
||||||
public List<TbOrderPayCountVo> summaryCount(@RequestParam String shopId,
|
public List<TbOrderPayCountVo> summaryCount(ShopSummaryDto summaryDto) {
|
||||||
@RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date startTime,
|
return summaryService.summaryCount(summaryDto);
|
||||||
@RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endTime) {
|
|
||||||
return summaryService.summaryCount(shopId, startTime, endTime);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,10 @@ package cn.ysk.cashier.controller.shop;
|
||||||
|
|
||||||
import cn.ysk.cashier.annotation.rest.AnonymousGetMapping;
|
import cn.ysk.cashier.annotation.rest.AnonymousGetMapping;
|
||||||
import cn.ysk.cashier.annotation.rest.AnonymousPostMapping;
|
import cn.ysk.cashier.annotation.rest.AnonymousPostMapping;
|
||||||
import cn.ysk.cashier.dto.ShopSummaryDto;
|
import cn.ysk.cashier.dto.shop.ShopTableSaleInfoDto;
|
||||||
import cn.ysk.cashier.dto.shop.ShopTableSeleInfoDto;
|
|
||||||
import cn.ysk.cashier.service.SummaryService;
|
import cn.ysk.cashier.service.SummaryService;
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
@ -66,8 +63,8 @@ public class SummaryController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/table/download")
|
@PostMapping("/table/download")
|
||||||
private void downloadShopSummaryTable(HttpServletResponse response, @RequestBody ShopTableSeleInfoDto exportRequest) throws IOException {
|
private void downloadShopSummaryTable(HttpServletResponse response, @RequestBody ShopTableSaleInfoDto exportRequest) throws IOException {
|
||||||
summaryService.downloadTableSeleInfo(exportRequest, response);
|
summaryService.downloadTableSaleInfo(exportRequest, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,8 +50,8 @@ public class TbDeviceStockController {
|
||||||
throw new RuntimeException("请先添加台桌");
|
throw new RuntimeException("请先添加台桌");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (downloadDto.getCount() > (shopTables.size() * 2)) {
|
if (downloadDto.getCount() > 500) {
|
||||||
throw new RuntimeException("最多可获取台桌数量的2倍");
|
throw new RuntimeException("最多可获取500个");
|
||||||
}
|
}
|
||||||
|
|
||||||
TbDeviceStock lastRecord = tbDeviceStockService.findLastRecord();
|
TbDeviceStock lastRecord = tbDeviceStockService.findLastRecord();
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,20 @@
|
||||||
package cn.ysk.cashier.controller.shop;
|
package cn.ysk.cashier.controller.shop;
|
||||||
|
|
||||||
import cn.ysk.cashier.annotation.Log;
|
import cn.ysk.cashier.annotation.Log;
|
||||||
|
import cn.ysk.cashier.dto.shop.TbPlussShopStaffQueryCriteria;
|
||||||
import cn.ysk.cashier.pojo.shop.TbPlussShopStaff;
|
import cn.ysk.cashier.pojo.shop.TbPlussShopStaff;
|
||||||
import cn.ysk.cashier.service.shop.TbPlussShopStaffService;
|
import cn.ysk.cashier.service.shop.TbPlussShopStaffService;
|
||||||
import cn.ysk.cashier.dto.shop.TbPlussShopStaffQueryCriteria;
|
import io.swagger.annotations.Api;
|
||||||
import org.springframework.data.domain.Pageable;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import io.swagger.annotations.*;
|
|
||||||
import java.io.IOException;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @website https://eladmin.vip
|
* @website https://eladmin.vip
|
||||||
|
|
@ -86,4 +88,4 @@ public class TbPlussShopStaffController {
|
||||||
// log.info("修改商户密码成功。");
|
// log.info("修改商户密码成功。");
|
||||||
// return new ResponseEntity<>(HttpStatus.OK);
|
// return new ResponseEntity<>(HttpStatus.OK);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,12 +1,9 @@
|
||||||
package cn.ysk.cashier.controller.shop;
|
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.entity.TbShopExtend;
|
||||||
import cn.ysk.cashier.mybatis.service.TbShopExtendService;
|
import cn.ysk.cashier.mybatis.service.TbShopExtendService;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
|
|
@ -35,38 +32,37 @@ public class TbShopExtendController {
|
||||||
|
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@ApiOperation("分页查询")
|
@ApiOperation("分页查询")
|
||||||
@AnonymousGetMapping
|
|
||||||
public ResponseEntity<Object> selectAll(TbShopExtendQueryCriteria criteria) {
|
public ResponseEntity<Object> selectAll(TbShopExtendQueryCriteria criteria) {
|
||||||
return new ResponseEntity<>(tbShopExtendService.queryAll(criteria), HttpStatus.OK);
|
return new ResponseEntity<>(tbShopExtendService.queryAll(criteria), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("{id}")
|
@GetMapping("{id}")
|
||||||
@ApiOperation("通过Id查询详情")
|
@ApiOperation("通过Id查询详情")
|
||||||
@AnonymousGetMapping
|
|
||||||
public TbShopExtend selectOne(@PathVariable Serializable id) {
|
public TbShopExtend selectOne(@PathVariable Serializable id) {
|
||||||
return tbShopExtendService.getById(id);
|
return tbShopExtendService.getById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@ApiOperation("新增")
|
@ApiOperation("新增")
|
||||||
@AnonymousPostMapping
|
|
||||||
public ResponseEntity<Object> insert(@RequestBody TbShopExtend tbShopExtend) {
|
public ResponseEntity<Object> insert(@RequestBody TbShopExtend tbShopExtend) {
|
||||||
tbShopExtend.setCreateTime(new Date());
|
tbShopExtend.setCreateTime(new Date());
|
||||||
return new ResponseEntity<>(tbShopExtendService.save(tbShopExtend), HttpStatus.CREATED);
|
tbShopExtendService.saveInfo(tbShopExtend);
|
||||||
|
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@ApiOperation("通过id修改")
|
@ApiOperation("通过id修改")
|
||||||
@AnonymousPutMapping
|
|
||||||
public ResponseEntity<Object> update(@RequestBody TbShopExtend tbShopExtend) {
|
public ResponseEntity<Object> update(@RequestBody TbShopExtend tbShopExtend) {
|
||||||
tbShopExtend.setUpdateTime(new Date());
|
if (tbShopExtend.getId() != null) {
|
||||||
tbShopExtendService.updateById(tbShopExtend);
|
tbShopExtendService.updateById(tbShopExtend);
|
||||||
|
} else {
|
||||||
|
tbShopExtendService.saveInfo(tbShopExtend);
|
||||||
|
}
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
@ApiOperation("删除")
|
@ApiOperation("删除")
|
||||||
@AnonymousDeleteMapping
|
|
||||||
public ResponseEntity<Object> delete(@RequestParam("idList") List<Long> idList) {
|
public ResponseEntity<Object> delete(@RequestParam("idList") List<Long> idList) {
|
||||||
tbShopExtendService.removeByIds(idList);
|
tbShopExtendService.removeByIds(idList);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
package cn.ysk.cashier.controller.shop;
|
||||||
|
|
||||||
|
import cn.ysk.cashier.annotation.Log;
|
||||||
|
import cn.ysk.cashier.dto.shop.TbShopPermissionDto;
|
||||||
|
import cn.ysk.cashier.service.TbShopPermissionService;
|
||||||
|
import cn.ysk.cashier.service.TbShopStaffPermissionService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "歌曲管理")
|
||||||
|
@RequestMapping("/api/tbShopPermission")
|
||||||
|
public class TbShopPermissionController {
|
||||||
|
private final TbShopPermissionService shopPermissionService;
|
||||||
|
|
||||||
|
private final TbShopStaffPermissionService shopStaffPermissionService;
|
||||||
|
|
||||||
|
@PostMapping()
|
||||||
|
@Log("新增店铺权限:#permissionDto.label")
|
||||||
|
public ResponseEntity<Object> insertShopPermission(@RequestBody TbShopPermissionDto permissionDto) {
|
||||||
|
return shopPermissionService.insert(permissionDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping()
|
||||||
|
@Log("修改店铺权限:#permissionDto.label")
|
||||||
|
public ResponseEntity<Object> updateShopPermission(@RequestBody TbShopPermissionDto permissionDto) {
|
||||||
|
return shopPermissionService.update(permissionDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
@Log("删除店铺权限:#id")
|
||||||
|
public ResponseEntity<Object> deleteShopPermission(@PathVariable Integer id) {
|
||||||
|
return shopPermissionService.delete(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/list")
|
||||||
|
public ResponseEntity<Object> getShopPermissionList() {
|
||||||
|
List<TbShopPermissionDto> permissionList = shopPermissionService.getShopPermissionList();
|
||||||
|
return ResponseEntity.ok(permissionList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/hasPermission")
|
||||||
|
public ResponseEntity<Object> hasPermission(Integer userId, String code) {
|
||||||
|
boolean hasPermission = shopStaffPermissionService.userHasPermission(userId, code);
|
||||||
|
return ResponseEntity.ok(hasPermission);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/staffPermissionList")
|
||||||
|
public ResponseEntity<Object> getStaffPermissionList(Integer userId) {
|
||||||
|
return ResponseEntity.ok(shopStaffPermissionService.getStaffPermissionList(userId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -16,10 +16,12 @@
|
||||||
package cn.ysk.cashier.controller.shop;
|
package cn.ysk.cashier.controller.shop;
|
||||||
|
|
||||||
import cn.ysk.cashier.annotation.Log;
|
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.pojo.shop.TbShopTable;
|
import cn.ysk.cashier.pojo.shop.TbShopTable;
|
||||||
import cn.ysk.cashier.service.shop.TbShopTableService;
|
import cn.ysk.cashier.service.shop.TbShopTableService;
|
||||||
import cn.ysk.cashier.dto.shop.TbShopTableQueryCriteria;
|
import cn.ysk.cashier.dto.shop.TbShopTableQueryCriteria;
|
||||||
import org.springframework.data.domain.Pageable;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
|
@ -84,4 +86,7 @@ public class TbShopTableController {
|
||||||
tbShopTableService.deleteAll(ids);
|
tbShopTableService.deleteAll(ids);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import cn.ysk.cashier.dto.shop.TbShopRechargeListDto;
|
||||||
import cn.ysk.cashier.dto.shop.TbShopUserQueryCriteria;
|
import cn.ysk.cashier.dto.shop.TbShopUserQueryCriteria;
|
||||||
import cn.ysk.cashier.exception.BadRequestException;
|
import cn.ysk.cashier.exception.BadRequestException;
|
||||||
import cn.ysk.cashier.mybatis.service.TbMShopUserService;
|
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.pojo.shop.TbShopUser;
|
||||||
import cn.ysk.cashier.service.shop.TbShopUserService;
|
import cn.ysk.cashier.service.shop.TbShopUserService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
|
@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lyf
|
* @author lyf
|
||||||
|
|
@ -36,6 +38,9 @@ public class TbShopUserController {
|
||||||
private final TbShopUserService tbShopUserService;
|
private final TbShopUserService tbShopUserService;
|
||||||
private final TbMShopUserService tbMShopUserService;
|
private final TbMShopUserService tbMShopUserService;
|
||||||
|
|
||||||
|
private final TbShopUserFlowService tbShopUserFlowService;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("导出数据")
|
@ApiOperation("导出数据")
|
||||||
@GetMapping(value = "/download")
|
@GetMapping(value = "/download")
|
||||||
public void exportTbShopUser(HttpServletResponse response, TbShopUserQueryCriteria criteria) throws IOException {
|
public void exportTbShopUser(HttpServletResponse response, TbShopUserQueryCriteria criteria) throws IOException {
|
||||||
|
|
@ -50,7 +55,6 @@ public class TbShopUserController {
|
||||||
|
|
||||||
@GetMapping("queryAllShopUser")
|
@GetMapping("queryAllShopUser")
|
||||||
@ApiOperation("查询商家用户")
|
@ApiOperation("查询商家用户")
|
||||||
@AnonymousGetMapping
|
|
||||||
public ResponseEntity<Object> queryAllShopUser(TbShopUserQueryCriteria criteria) {
|
public ResponseEntity<Object> queryAllShopUser(TbShopUserQueryCriteria criteria) {
|
||||||
return new ResponseEntity<>(tbShopUserService.queryShopUser(criteria), HttpStatus.OK);
|
return new ResponseEntity<>(tbShopUserService.queryShopUser(criteria), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
@ -96,4 +100,18 @@ public class TbShopUserController {
|
||||||
public void rechargeListDownload(HttpServletResponse response, @RequestBody TbShopRechargeListDto criteria) throws IOException {
|
public void rechargeListDownload(HttpServletResponse response, @RequestBody TbShopRechargeListDto criteria) throws IOException {
|
||||||
tbShopUserService.rechargeListDownload(response, criteria);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
package cn.ysk.cashier.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ScanPayDTO {
|
||||||
|
private Integer shopId;
|
||||||
|
private Integer orderId;
|
||||||
|
private String authCode;
|
||||||
|
}
|
||||||
|
|
@ -19,7 +19,9 @@ public class ShopSummaryDto {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCateId(String cateId) {
|
public void setCateId(String cateId) {
|
||||||
this.cateId = cateId;
|
if(StringUtils.isNotBlank(cateId)){
|
||||||
|
this.cateId = cateId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getShopId() {
|
public String getShopId() {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -14,7 +14,7 @@ public class TbVersionDto implements Serializable {
|
||||||
|
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
/** LDBL_APP;WX; */
|
/** PC;APP; */
|
||||||
private String source;
|
private String source;
|
||||||
|
|
||||||
/** ios;android; */
|
/** ios;android; */
|
||||||
|
|
@ -22,9 +22,12 @@ public class TbVersionDto implements Serializable {
|
||||||
|
|
||||||
/** 版本号 */
|
/** 版本号 */
|
||||||
private String version;
|
private String version;
|
||||||
|
/** 下载地址 */
|
||||||
|
private String url;
|
||||||
|
|
||||||
/** 0:不更新;1:更新 */
|
/** 是否强制更新 0:否 1:是 */
|
||||||
private Integer isUp;
|
private Integer isUp;
|
||||||
|
private Integer sel;
|
||||||
|
|
||||||
/** 更新提示内容 */
|
/** 更新提示内容 */
|
||||||
private String message;
|
private String message;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import lombok.Data;
|
||||||
public class TbVersionQueryCriteria{
|
public class TbVersionQueryCriteria{
|
||||||
|
|
||||||
@Query
|
@Query
|
||||||
/** LDBL-APP;WX; */
|
/** PC;APP; */
|
||||||
private String source;
|
private String source;
|
||||||
@Query
|
@Query
|
||||||
/** ios;android; */
|
/** ios;android; */
|
||||||
|
|
@ -21,7 +21,7 @@ public class TbVersionQueryCriteria{
|
||||||
/** 版本号 */
|
/** 版本号 */
|
||||||
private String version;
|
private String version;
|
||||||
@Query
|
@Query
|
||||||
/** 0:不更新;1:更新 */
|
/** 是否强制更新 0:否 1:是*/
|
||||||
private Integer isUp;
|
private Integer isUp;
|
||||||
|
|
||||||
private Integer pageSize;
|
private Integer pageSize;
|
||||||
|
|
|
||||||
|
|
@ -59,4 +59,7 @@ public class TbOrderDetailDto implements Serializable {
|
||||||
|
|
||||||
/** 打包费 */
|
/** 打包费 */
|
||||||
private BigDecimal packAmount;
|
private BigDecimal packAmount;
|
||||||
|
|
||||||
|
private Integer isVip;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -70,6 +70,8 @@ public class TbOrderInfoQueryCriteria{
|
||||||
@Query(type = Query.Type.BETWEEN)
|
@Query(type = Query.Type.BETWEEN)
|
||||||
private List<Long> createdAt;
|
private List<Long> createdAt;
|
||||||
|
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
|
||||||
@Query
|
@Query
|
||||||
private String tableName;
|
private String tableName;
|
||||||
|
|
@ -79,4 +81,18 @@ public class TbOrderInfoQueryCriteria{
|
||||||
public void setProductName(String productName) {
|
public void setProductName(String productName) {
|
||||||
if(StringUtils.isNotBlank(productName)) this.productName = 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,15 @@ import javax.persistence.Id;
|
||||||
public class StockCountDTO {
|
public class StockCountDTO {
|
||||||
private String shopId;
|
private String shopId;
|
||||||
@Id
|
@Id
|
||||||
|
private Long skuId;
|
||||||
private Long proId;
|
private Long proId;
|
||||||
private String proName;
|
private String proName;
|
||||||
private Integer isStock;
|
private Integer isStock;
|
||||||
private String skuName;
|
private String skuName;
|
||||||
private String unitName;
|
private String unitName;
|
||||||
|
// 消耗数
|
||||||
private Integer stockCount;
|
private Integer stockCount;
|
||||||
|
// 当前库存
|
||||||
private Integer stockNumber;
|
private Integer stockNumber;
|
||||||
private String specSnap;
|
private String specSnap;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package cn.ysk.cashier.dto.product;
|
package cn.ysk.cashier.dto.product;
|
||||||
|
|
||||||
|
import cn.ysk.cashier.annotation.Query;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
|
@ -11,6 +12,7 @@ public class StockQueryDto {
|
||||||
private Double num;
|
private Double num;
|
||||||
private Integer isStock;
|
private Integer isStock;
|
||||||
private String categoryId;
|
private String categoryId;
|
||||||
|
private String sort;
|
||||||
|
|
||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
if (StringUtils.isNotBlank(name)) {
|
if (StringUtils.isNotBlank(name)) {
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,10 @@
|
||||||
/*
|
|
||||||
* 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;
|
package cn.ysk.cashier.dto.product;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -60,4 +48,10 @@ public class TbProductGroupDto implements Serializable {
|
||||||
private Long createdAt;
|
private Long createdAt;
|
||||||
|
|
||||||
private Long updatedAt;
|
private Long updatedAt;
|
||||||
|
|
||||||
|
private Integer useTime;
|
||||||
|
|
||||||
|
private String saleStartTime;
|
||||||
|
|
||||||
|
private String saleEndTime;
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package cn.ysk.cashier.dto.shop;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author yijiegong
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ExportTableStsDataDto {
|
||||||
|
private String dateStr;
|
||||||
|
|
||||||
|
private List<Map<String, Object>> data;
|
||||||
|
|
||||||
|
private List<List<Integer>> mergeCells;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,152 @@
|
||||||
|
package cn.ysk.cashier.dto.shop;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺打印机配置
|
||||||
|
*
|
||||||
|
* @author tankaikai
|
||||||
|
* @since 2024-09-24 17:13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ShopPrinterDTO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冗余/遗留字段
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打印机类型:本地打印机-local USB打印机-USB 云打印机-network
|
||||||
|
*/
|
||||||
|
private String connectionType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打印机编号/IP地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打印机密钥/端口
|
||||||
|
*/
|
||||||
|
private String port;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打印类型 标签-label 出品-kitchen 小票-cash
|
||||||
|
*/
|
||||||
|
private String subType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 启用状态 0-启用 1-停用
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺id
|
||||||
|
*/
|
||||||
|
private String shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冗余/遗留字段
|
||||||
|
*/
|
||||||
|
private String categoryIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打印机品牌
|
||||||
|
* 云想印 = yxyPrinter
|
||||||
|
* 飞鹅 = fePrinter
|
||||||
|
* 本地 = local
|
||||||
|
* USB = printer
|
||||||
|
*/
|
||||||
|
private String contentType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private String createdAt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private String updatedAt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序码 从小到大升序排列
|
||||||
|
*/
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冗余/遗留字段
|
||||||
|
*/
|
||||||
|
private String vendorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冗余/遗留字段
|
||||||
|
*/
|
||||||
|
private String productId;
|
||||||
|
/**
|
||||||
|
* 冗余/遗留字段(打印机个性化配置,存储JSON数据)
|
||||||
|
*/
|
||||||
|
private String config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小票尺寸 58mm 80mm
|
||||||
|
*/
|
||||||
|
private String receiptSize;
|
||||||
|
/**
|
||||||
|
* 分类打印 0-所以 1-部分分类 2-部分商品
|
||||||
|
*/
|
||||||
|
private String classifyPrint;
|
||||||
|
/**
|
||||||
|
* 桌台打印 0-所有 1-部分
|
||||||
|
*/
|
||||||
|
private String tablePrint;
|
||||||
|
/**
|
||||||
|
* 打印数量 c1m1^2=顾客+商家[2张] m1^1=商家[1张] c1^1顾客[1张] c2m1^3顾客2+商家1[3张]
|
||||||
|
*/
|
||||||
|
private String printQty;
|
||||||
|
/**
|
||||||
|
* 打印方式 1-普通 2-单个菜
|
||||||
|
*/
|
||||||
|
private String printMethod;
|
||||||
|
/**
|
||||||
|
* 打印类型,JSON数组 1-确认退款单 2-交班单 3-排队取号
|
||||||
|
*/
|
||||||
|
private String printType;
|
||||||
|
/**
|
||||||
|
* 打印单据 0-全部打印 1-仅厨房 2-仅前台
|
||||||
|
*/
|
||||||
|
private String printReceipt;
|
||||||
|
|
||||||
|
|
||||||
|
public String getCreatedAt() {
|
||||||
|
if ("".equals(createdAt) || createdAt == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
return sdf.format(new Date(Long.valueOf(createdAt)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdatedAt() {
|
||||||
|
if ("".equals(updatedAt) || updatedAt == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
return sdf.format(new Date(Long.valueOf(updatedAt)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -9,7 +9,7 @@ import java.util.Date;
|
||||||
* @author GYJ
|
* @author GYJ
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class ShopTableSeleInfoDto {
|
public class ShopTableSaleInfoDto {
|
||||||
private Integer shopId;
|
private Integer shopId;
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date startTime;
|
private Date startTime;
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
package cn.ysk.cashier.dto.shop;
|
package cn.ysk.cashier.dto.shop;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -54,4 +55,6 @@ public class TbMerchantThirdApplyDto implements Serializable {
|
||||||
|
|
||||||
/** shopId */
|
/** shopId */
|
||||||
private Integer shopId;
|
private Integer shopId;
|
||||||
|
|
||||||
|
private String alipaySmallAppid;
|
||||||
}
|
}
|
||||||
|
|
@ -23,6 +23,7 @@ import lombok.Data;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -49,6 +50,8 @@ public class TbPlussShopStaffDto implements Serializable {
|
||||||
/** 密码 */
|
/** 密码 */
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
private String discountType;
|
||||||
|
|
||||||
/** 最大优惠金额 */
|
/** 最大优惠金额 */
|
||||||
private BigDecimal maxDiscountAmount;
|
private BigDecimal maxDiscountAmount;
|
||||||
|
|
||||||
|
|
@ -82,4 +85,6 @@ public class TbPlussShopStaffDto implements Serializable {
|
||||||
private Long updatedAt;
|
private Long updatedAt;
|
||||||
|
|
||||||
private String type;
|
private String type;
|
||||||
}
|
|
||||||
|
private List<TbShopPermissionDto> permissions;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -186,4 +186,10 @@ public class TbShopInfoDto implements Serializable {
|
||||||
private String districts;
|
private String districts;
|
||||||
|
|
||||||
private String cities;
|
private String cities;
|
||||||
|
|
||||||
|
private String isCustom;
|
||||||
|
|
||||||
|
private String isReturn;
|
||||||
|
private String isMemberIn;
|
||||||
|
private String isMemberReturn;
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package cn.ysk.cashier.dto.shop;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TbShopPermissionDto {
|
||||||
|
private Integer id;
|
||||||
|
//权限类型:staff 员工,
|
||||||
|
private String type;
|
||||||
|
//权限名称
|
||||||
|
private String label;
|
||||||
|
//权限code,为了区分采用汉语拼音
|
||||||
|
private String code;
|
||||||
|
//层级
|
||||||
|
private Integer level;
|
||||||
|
//上级ID
|
||||||
|
private Integer parentId;
|
||||||
|
//是否重要: 重要对应页面红色
|
||||||
|
private Integer isImportant;
|
||||||
|
//排序
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
private Integer hasPermission;
|
||||||
|
|
||||||
|
private List<TbShopPermissionDto> children;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
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(0)
|
||||||
|
private Integer num;
|
||||||
|
private boolean isPack;
|
||||||
|
private boolean isGift;
|
||||||
|
private Integer cartId;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package cn.ysk.cashier.dto.shoptable;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CarDTO {
|
||||||
|
@NotNull
|
||||||
|
private Integer shopId;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
package cn.ysk.cashier.dto.shoptable;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DeleteOrderDTO {
|
||||||
|
private Integer shopId;
|
||||||
|
private Integer orderId;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,119 @@
|
||||||
|
package cn.ysk.cashier.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (TbShopPermission)表实体类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-09-14 10:53:11
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public class TbShopPermission extends Model<TbShopPermission> {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
//权限类型:staff 员工,
|
||||||
|
private String type;
|
||||||
|
//权限名称
|
||||||
|
private String label;
|
||||||
|
//权限code,为了区分采用汉语拼音
|
||||||
|
private String code;
|
||||||
|
//层级
|
||||||
|
private Integer level;
|
||||||
|
//上级ID
|
||||||
|
private Integer parentId;
|
||||||
|
//是否重要: 重要对应页面红色
|
||||||
|
private Integer isImportant;
|
||||||
|
//排序
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabel(String label) {
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLevel() {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLevel(Integer level) {
|
||||||
|
this.level = level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getParentId() {
|
||||||
|
return parentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParentId(Integer parentId) {
|
||||||
|
this.parentId = parentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getIsImportant() {
|
||||||
|
return isImportant;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsImportant(Integer isImportant) {
|
||||||
|
this.isImportant = isImportant;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSort() {
|
||||||
|
return sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSort(Integer sort) {
|
||||||
|
this.sort = sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
package cn.ysk.cashier.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺员工权限关联表(TbShopStaffPermission)表实体类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-09-14 10:54:00
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public class TbShopStaffPermission extends Model<TbShopStaffPermission> {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
//权限ID
|
||||||
|
private Integer permissionId;
|
||||||
|
//员工ID
|
||||||
|
private Integer staffId;
|
||||||
|
//店铺ID
|
||||||
|
private Integer shopId;
|
||||||
|
//用户ID
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPermissionId() {
|
||||||
|
return permissionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPermissionId(Integer permissionId) {
|
||||||
|
this.permissionId = permissionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStaffId() {
|
||||||
|
return staffId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStaffId(Integer staffId) {
|
||||||
|
this.staffId = staffId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getShopId() {
|
||||||
|
return shopId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShopId(Integer shopId) {
|
||||||
|
this.shopId = shopId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Integer userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package cn.ysk.cashier.enums;
|
||||||
|
|
||||||
|
public enum TableStateEnum {
|
||||||
|
IDLE("idle"),
|
||||||
|
CLOSED("closed"), PAYING("paying"), PENDING("pending"), USING("using");
|
||||||
|
private String state = "closed";
|
||||||
|
|
||||||
|
TableStateEnum(String state) {
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getState() {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
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());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package cn.ysk.cashier.mybatis.entity;
|
package cn.ysk.cashier.mybatis.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
|
@ -8,6 +9,7 @@ import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
|
@ -22,4 +24,8 @@ public class Activate extends Model<Activate> {
|
||||||
private BigDecimal handselNum;
|
private BigDecimal handselNum;
|
||||||
private String handselType;
|
private String handselType;
|
||||||
private String isDel;
|
private String isDel;
|
||||||
|
//是否赠送商品 0否 1是
|
||||||
|
private Integer isGiftPro;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<TbActivateProduct> products;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ package cn.ysk.cashier.mybatis.entity;
|
||||||
|
|
||||||
import java.util.Date;
|
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.annotation.TableName;
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -12,6 +14,7 @@ import java.io.Serializable;
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class TagProductDepts extends Model<TagProductDepts> {
|
public class TagProductDepts extends Model<TagProductDepts> {
|
||||||
//标签id
|
//标签id
|
||||||
|
@TableId(value = "tagId", type = IdType.NONE)
|
||||||
private Integer tagId;
|
private Integer tagId;
|
||||||
//商品id
|
//商品id
|
||||||
private Integer productId;
|
private Integer productId;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,119 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,109 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,7 @@ package cn.ysk.cashier.mybatis.entity;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -18,11 +19,13 @@ public class TbShopExtend extends Model<TbShopExtend> {
|
||||||
//商户Id
|
//商户Id
|
||||||
private Integer shopId;
|
private Integer shopId;
|
||||||
//img:图片;text:文本;
|
//img:图片;text:文本;
|
||||||
|
private String name;
|
||||||
private String type;
|
private String type;
|
||||||
//自定义key
|
//自定义key
|
||||||
private String autokey;
|
private String autokey;
|
||||||
//值
|
//值
|
||||||
private String value;
|
private String value;
|
||||||
|
private String detail;
|
||||||
//更新时间
|
//更新时间
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
//创建时间
|
//创建时间
|
||||||
|
|
@ -53,6 +56,14 @@ public class TbShopExtend extends Model<TbShopExtend> {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
public String getAutokey() {
|
public String getAutokey() {
|
||||||
return autokey;
|
return autokey;
|
||||||
}
|
}
|
||||||
|
|
@ -84,5 +95,51 @@ public class TbShopExtend extends Model<TbShopExtend> {
|
||||||
public void setCreateTime(Date createTime) {
|
public void setCreateTime(Date createTime) {
|
||||||
this.createTime = 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,59 +1,51 @@
|
||||||
package cn.ysk.cashier.mybatis.entity;
|
package cn.ysk.cashier.mybatis.entity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import lombok.Getter;
|
||||||
import java.time.LocalDateTime;
|
import lombok.Setter;
|
||||||
import javax.persistence.Column;
|
|
||||||
import javax.persistence.GeneratedValue;
|
|
||||||
import javax.persistence.Id;
|
|
||||||
import javax.persistence.Table;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
import javax.persistence.*;
|
||||||
* 商家openid信息表
|
import javax.validation.constraints.Size;
|
||||||
* @TableName tb_shop_open_id
|
import java.time.Instant;
|
||||||
*/
|
|
||||||
@Table(name="tb_shop_open_id")
|
@Getter
|
||||||
@Data
|
@Setter
|
||||||
@EqualsAndHashCode
|
@Entity
|
||||||
public class TbShopOpenId implements Serializable {
|
@Table(name = "tb_shop_open_id")
|
||||||
/**
|
public class TbShopOpenId {
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Id
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@Column(name = "id", nullable = false)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
/**
|
@Column(name = "shop_id")
|
||||||
* 店铺id
|
|
||||||
*/
|
|
||||||
private Integer shopId;
|
private Integer shopId;
|
||||||
|
|
||||||
/**
|
@Size(max = 5000)
|
||||||
* 已经订阅消息的商家微信号
|
@Column(name = "open_id", length = 5000)
|
||||||
*/
|
|
||||||
private String openId;
|
private String openId;
|
||||||
|
|
||||||
/**
|
@Column(name = "status")
|
||||||
*
|
|
||||||
*/
|
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
/**
|
@Column(name = "create_time")
|
||||||
*
|
private Instant createTime;
|
||||||
*/
|
|
||||||
private LocalDateTime createTime;
|
|
||||||
|
|
||||||
/**
|
@Column(name = "update_time")
|
||||||
*
|
private Instant updateTime;
|
||||||
*/
|
|
||||||
private LocalDateTime updateTime;
|
|
||||||
|
|
||||||
/**
|
@Column(name = "type")
|
||||||
* 类型 -1 任意消息 0库存预警
|
|
||||||
*/
|
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
@Size(max = 255)
|
||||||
|
@Column(name = "nickname")
|
||||||
|
private String nickname;
|
||||||
|
|
||||||
|
@Size(max = 255)
|
||||||
|
@Column(name = "avatar")
|
||||||
|
private String avatar;
|
||||||
|
|
||||||
|
@Size(max = 255)
|
||||||
|
@Column(name = "note")
|
||||||
|
private String note;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@ package cn.ysk.cashier.mybatis.entity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import javax.persistence.Column;
|
|
||||||
import javax.persistence.GeneratedValue;
|
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -14,7 +12,7 @@ import lombok.Data;
|
||||||
*/
|
*/
|
||||||
@Table(name="tb_shop_user")
|
@Table(name="tb_shop_user")
|
||||||
@Data
|
@Data
|
||||||
public class TbMShopUser implements Serializable {
|
public class TbShopUser implements Serializable {
|
||||||
/**
|
/**
|
||||||
* (随机)
|
* (随机)
|
||||||
*/
|
*/
|
||||||
|
|
@ -82,7 +80,7 @@ public class TbMShopUser implements Serializable {
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private String head_img;
|
private String head_img;
|
||||||
|
|
||||||
|
|
@ -142,12 +140,12 @@ public class TbMShopUser implements Serializable {
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long created_at;
|
private Long created_at;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long updated_at;
|
private Long updated_at;
|
||||||
|
|
||||||
|
|
@ -174,7 +172,7 @@ public class TbMShopUser implements Serializable {
|
||||||
if (getClass() != that.getClass()) {
|
if (getClass() != that.getClass()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
TbMShopUser other = (TbMShopUser) that;
|
TbShopUser other = (TbShopUser) that;
|
||||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||||
&& (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
|
&& (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()))
|
&& (this.getCredit_amount() == null ? other.getCredit_amount() == null : this.getCredit_amount().equals(other.getCredit_amount()))
|
||||||
|
|
@ -281,4 +279,4 @@ public class TbMShopUser implements Serializable {
|
||||||
sb.append("]");
|
sb.append("]");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,39 +1,86 @@
|
||||||
|
/*
|
||||||
|
* 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.mybatis.entity;
|
package cn.ysk.cashier.mybatis.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
import cn.hutool.core.bean.copier.CopyOptions;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.*;
|
||||||
import javax.persistence.Id;
|
import java.io.Serializable;
|
||||||
import javax.persistence.Table;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author GYJ
|
* @author admin
|
||||||
*/
|
* @date 2024-09-02
|
||||||
|
**/
|
||||||
@Entity
|
@Entity
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("tb_shop_user_flow")
|
|
||||||
@Table(name="tb_shop_user_flow")
|
@Table(name="tb_shop_user_flow")
|
||||||
public class TbShopUserFlow extends Model<TbShopUserFlow> {
|
public class TbShopUserFlow implements Serializable {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@Column(name = "`id`")
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "`shop_user_id`")
|
||||||
|
@ApiModelProperty(value = "shopUserId")
|
||||||
private Integer shopUserId;
|
private Integer shopUserId;
|
||||||
|
|
||||||
|
@Column(name = "`amount`")
|
||||||
|
@ApiModelProperty(value = "amount")
|
||||||
private BigDecimal amount;
|
private BigDecimal amount;
|
||||||
|
|
||||||
|
@Column(name = "`balance`")
|
||||||
|
@ApiModelProperty(value = "balance")
|
||||||
private BigDecimal balance;
|
private BigDecimal balance;
|
||||||
|
|
||||||
|
@Column(name = "`biz_code`")
|
||||||
|
@ApiModelProperty(value = "bizCode")
|
||||||
private String bizCode;
|
private String bizCode;
|
||||||
|
|
||||||
|
@Column(name = "`biz_name`")
|
||||||
|
@ApiModelProperty(value = "bizName")
|
||||||
private String bizName;
|
private String bizName;
|
||||||
|
|
||||||
private Date createTime;
|
@Column(name = "`create_time`")
|
||||||
|
@ApiModelProperty(value = "createTime")
|
||||||
|
private Timestamp createTime;
|
||||||
|
|
||||||
|
@Column(name = "`type`")
|
||||||
|
@ApiModelProperty(value = "type")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
|
@Column(name = "`is_return`")
|
||||||
|
@ApiModelProperty(value = "是否退款 1 已退款 0 未退款")
|
||||||
|
private String isReturn;
|
||||||
|
|
||||||
|
@Column(name = "`update_time`")
|
||||||
|
@ApiModelProperty(value = "updateTime")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
|
||||||
|
@Column(name = "`remark`")
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
public void copy(TbShopUserFlow source){
|
||||||
|
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package cn.ysk.cashier.mybatis.mapper;
|
package cn.ysk.cashier.mybatis.mapper;
|
||||||
|
|
||||||
import cn.ysk.cashier.mybatis.entity.Activate;
|
import cn.ysk.cashier.mybatis.entity.Activate;
|
||||||
import cn.ysk.cashier.mybatis.entity.TbUserStorage;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
public interface ActivateMapper extends BaseMapper<Activate> {
|
public interface ActivateMapper extends BaseMapper<Activate> {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
package cn.ysk.cashier.mybatis.mapper;
|
||||||
|
|
||||||
|
import cn.ysk.cashier.mybatis.entity.TbOrderPayment;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
public interface MpOrderPaymentMapper extends BaseMapper<TbOrderPayment> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
package cn.ysk.cashier.mybatis.mapper;
|
||||||
|
|
||||||
|
import cn.ysk.cashier.pojo.shop.TbShopTable;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
public interface MpShopTableMapper extends BaseMapper<TbShopTable> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
package cn.ysk.cashier.mybatis.mapper;
|
||||||
|
|
||||||
|
import cn.ysk.cashier.pojo.TbUserInfo;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
public interface MpUserInfoMapper extends BaseMapper<TbUserInfo> {
|
||||||
|
}
|
||||||
|
|
@ -13,23 +13,24 @@ import org.apache.ibatis.annotations.Select;
|
||||||
public interface ShopUserMapper extends BaseMapper<TbShopUser> {
|
public interface ShopUserMapper extends BaseMapper<TbShopUser> {
|
||||||
|
|
||||||
@Select("<script>" +
|
@Select("<script>" +
|
||||||
"SELECT su.id as id, u.head_img as headImg, u.nick_name as nickName, u.sex as sex, " +
|
"SELECT su.id as id, su.user_id as user_id, su.head_img as headImg, su.name as nickName, su.sex as sex, " +
|
||||||
"su.amount as amount, u.total_score as totalScore, u.telephone as telephone, " +
|
"su.amount as amount, 0 as totalScore, su.telephone as telephone, u.last_log_in_at as lastLoginAt, " +
|
||||||
"u.birth_day as birthDay, su.is_vip as isVip, su.created_at as createAt, u.last_log_in_at as lastLoginAt " +
|
"su.birth_day as birthDay, su.is_vip as isVip, su.created_at as createAt " +
|
||||||
"FROM tb_shop_user su " +
|
"FROM tb_shop_user su " +
|
||||||
"LEFT JOIN tb_user_info u ON su.user_id = u.id " +
|
"left join tb_user_info u on u.id = su.user_id " +
|
||||||
"<where> " +
|
"<where> " +
|
||||||
"<if test='param.shopId != null and param.shopId != "" and param.shopId != 1'>" +
|
"<if test='param.shopId != null and param.shopId != "" and param.shopId != 1'>" +
|
||||||
"AND su.shop_id = #{param.shopId} " +
|
"AND su.shop_id = #{param.shopId} " +
|
||||||
"</if>" +
|
"</if>" +
|
||||||
"<if test='param.name != null and param.name != ""'>" +
|
"<if test='param.name != null and param.name != ""'>" +
|
||||||
"AND (u.nick_name like concat('%', #{param.name}, '%') or su.name LIKE concat( '%', #{param.name}, '%' ) " +
|
"AND (su.name like concat('%', #{param.name}, '%') or su.name LIKE concat( '%', #{param.name}, '%' ) " +
|
||||||
" or u.telephone like concat('%', #{param.name}, '%') or su.telephone like concat('%', #{param.name}, '%'))" +
|
" or su.telephone like concat('%', #{param.name}, '%') or su.telephone like concat('%', #{param.name}, '%'))" +
|
||||||
"</if>" +
|
"</if>" +
|
||||||
"<if test='isVip != null'>" +
|
"<if test='isVip != null'>" +
|
||||||
"AND su.is_vip=#{isVip}" +
|
"AND su.is_vip=#{isVip} " +
|
||||||
"</if>" +
|
"</if>" +
|
||||||
"</where>" +
|
"</where>" +
|
||||||
|
"order by su.created_at" +
|
||||||
"</script>")
|
"</script>")
|
||||||
IPage<ShopUserInfoVo> queryUser(TbShopUserQueryCriteria param, Integer isVip, Page pageInfo);
|
IPage<ShopUserInfoVo> queryUser(TbShopUserQueryCriteria param, Integer isVip, Page pageInfo);
|
||||||
|
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue