Merge branch 'test' into dev
This commit is contained in:
@@ -106,11 +106,13 @@
|
||||
<version>6.1.4</version>
|
||||
</dependency>
|
||||
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.1.4</version>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.baomidou</groupId>-->
|
||||
@@ -120,12 +122,12 @@
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-generator</artifactId>
|
||||
<version>3.5.3.1</version>
|
||||
<version>3.5.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>3.5.3.1</version>
|
||||
<version>3.5.7</version>
|
||||
</dependency>
|
||||
|
||||
<!-- zxing生成二维码 -->
|
||||
@@ -165,9 +167,15 @@
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>pro</id>
|
||||
<id>pre</id>
|
||||
<properties>
|
||||
<env>pro</env>
|
||||
<env>pre</env>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>prod</id>
|
||||
<properties>
|
||||
<env>prod</env>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
@@ -2,26 +2,43 @@ package cn.ysk.cashier.cons;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public interface TableConstant {
|
||||
|
||||
String CART_SEAT_ID = "-999";
|
||||
|
||||
class OrderInfo {
|
||||
class ShopTable {
|
||||
@Getter
|
||||
public enum State {
|
||||
IDLE("idle"), CLOSED("closed"), PAYING("paying"), PENDING("pending"), USING("using"), CLEANING("cleaning");
|
||||
private final String value;
|
||||
|
||||
State(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class CashierCart {
|
||||
public static final String ID = "-999";
|
||||
|
||||
@Getter
|
||||
public enum Status {
|
||||
REFUNDING("refunding"), REFUND("refund"), CLOSED("closed"), CREATE("create"),
|
||||
UNPAID("unpaid"), PAYING("paying"), RETURN("return");
|
||||
UNPAID("unpaid"), PAYING("paying"), RETURN("return"), CANCEL("cancel");
|
||||
private final String value;
|
||||
|
||||
Status(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
public boolean equalsVals(String value) {
|
||||
return this.value.equals(value);
|
||||
}
|
||||
}
|
||||
|
||||
@Getter
|
||||
public enum UseType {
|
||||
TAKEOUT("takeout"),
|
||||
NONE_TABLE("dine-in"),
|
||||
DINE_IN_AFTER("dine-in-after"),
|
||||
DINE_IN_BEFORE("dine-in-before");
|
||||
private final String value;
|
||||
@@ -35,4 +52,137 @@ public interface TableConstant {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class OrderInfo {
|
||||
@Getter
|
||||
public enum Status {
|
||||
REFUNDING("refunding"), REFUND("refund"), CLOSED("closed"), CREATE("create"),
|
||||
UNPAID("unpaid"), PAYING("paying"), RETURN("return"), FINAL("final");
|
||||
private final String value;
|
||||
|
||||
Status(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public boolean equalsVals(String value) {
|
||||
return this.value.equals(value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Getter
|
||||
public enum UseType {
|
||||
TAKEOUT("takeout"),
|
||||
DINE_IN_AFTER("dine-in-after"),
|
||||
DINE_IN_BEFORE("dine-in-before"), NONE_TABLE("dine-in");
|
||||
private final String value;
|
||||
|
||||
UseType(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public boolean equalsVals(String value) {
|
||||
return this.value.equals(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class FreeDineRecord {
|
||||
@Getter
|
||||
public enum State {
|
||||
WAIT_PAY(0),
|
||||
SUCCESS_PAY(1),
|
||||
FAIL_PAY(2);
|
||||
private final Integer value;
|
||||
|
||||
State(Integer value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
@Getter
|
||||
public enum UseType {
|
||||
TAKEOUT("takeout"),
|
||||
DINE_IN_AFTER("dine-in-after"),
|
||||
DINE_IN_BEFORE("dine-in-before");
|
||||
private final String value;
|
||||
|
||||
UseType(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public boolean equalsVals(String value) {
|
||||
return this.value.equals(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ShopInfo {
|
||||
@Getter
|
||||
public enum EatModel {
|
||||
TAKEOUT("takeout"),
|
||||
DINE_IN("dine-in");
|
||||
private final String value;
|
||||
|
||||
EatModel(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public boolean equalsVals(String value) {
|
||||
return this.value.equals(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class MemberIn {
|
||||
@Getter
|
||||
public enum Type {
|
||||
NORMAL(0),
|
||||
FREE_DINE(1);
|
||||
private final Integer value;
|
||||
|
||||
Type(Integer value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public boolean equalsVals(Integer value) {
|
||||
return Objects.equals(this.value, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ActivateOutRecord {
|
||||
@Getter
|
||||
public enum Type {
|
||||
// 满减
|
||||
FULL_REDUCTION(1),
|
||||
// 商品
|
||||
PRODUCT(2);
|
||||
private final Integer value;
|
||||
|
||||
Type(Integer value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public boolean equalsVals(Integer value) {
|
||||
return Objects.equals(this.value, value);
|
||||
}
|
||||
}
|
||||
@Getter
|
||||
public enum Status {
|
||||
CREATE("create"),
|
||||
CANCEL("cancel"),
|
||||
// 商品
|
||||
CLOSED("closed");
|
||||
private final String value;
|
||||
|
||||
Status(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public boolean equalsVals(String value) {
|
||||
return this.value.equals(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +61,10 @@ public class TbConsInfo implements Serializable {
|
||||
@ApiModelProperty(value = "单位换算")
|
||||
private BigDecimal conUnitTwoConvert;
|
||||
|
||||
@Column(name = "`default_unit`")
|
||||
@ApiModelProperty(value = "默认入库单位")
|
||||
private String defaultUnit;
|
||||
|
||||
@Column(name = "`laster_in_stock`")
|
||||
@ApiModelProperty(value = "最近一次入库量")
|
||||
private BigDecimal lasterInStock;
|
||||
@@ -102,9 +106,6 @@ public class TbConsInfo implements Serializable {
|
||||
@ApiModelProperty(value = "是否检测库存")
|
||||
private String isCheck;
|
||||
|
||||
@Transient
|
||||
private List<Map<Integer, Object>> product;
|
||||
|
||||
public void copy(TbConsInfo source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
|
||||
@@ -63,6 +63,10 @@ public class TbConsInfoV2 implements Serializable {
|
||||
@ApiModelProperty(value = "单位换算")
|
||||
private BigDecimal conUnitTwoConvert;
|
||||
|
||||
@Column(name = "`default_unit`")
|
||||
@ApiModelProperty(value = "默认入库单位")
|
||||
private String defaultUnit;
|
||||
|
||||
|
||||
@Column(name = "`laster_in_stock`")
|
||||
@ApiModelProperty(value = "最近一次入库量")
|
||||
|
||||
@@ -39,6 +39,7 @@ public class TbConsInfoDto implements Serializable {
|
||||
private String conUnitTwo;
|
||||
|
||||
private BigDecimal conUnitTwoConvert;
|
||||
private String defaultUnit;
|
||||
|
||||
/** 最近一次入库量 */
|
||||
private BigDecimal lasterInStock;
|
||||
@@ -71,5 +72,4 @@ public class TbConsInfoDto implements Serializable {
|
||||
|
||||
private String isCheck;
|
||||
|
||||
private List<Map<Integer, Object>> product;
|
||||
}
|
||||
@@ -114,6 +114,8 @@ public class TbConsInfoFlowServiceImpl implements TbConsInfoFlowService {
|
||||
criteria.setBizCode(Arrays.asList("stockIn","cancelCart","init","stockIn","checkStockIn","stockOtherIn","cancelCart","createCart","stockout","checkStockOut","frmLoss"));
|
||||
break;
|
||||
}
|
||||
}else {
|
||||
criteria.setBizCode(Arrays.asList("stockIn","cancelCart","init","stockIn","checkStockIn","stockOtherIn","cancelCart","createCart","stockout","checkStockOut","frmLoss"));
|
||||
}
|
||||
Sort sort = Sort.by(Sort.Direction.DESC, "id");
|
||||
Pageable pageable = PageRequest.of(criteria.getPage(), criteria.getSize(), sort);
|
||||
|
||||
@@ -231,10 +231,20 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
||||
}
|
||||
BigDecimal changeStock = conInfos.getStockNumber();
|
||||
//副单位的实际修改值
|
||||
if (StringUtils.isNotBlank(conInfos.getUnit()) && conInfos.getUnit().equals(info.getConUnitTwo())) {
|
||||
if (StringUtils.isNotBlank(conInfos.getUnit())) {
|
||||
info.setDefaultUnit(conInfos.getUnit());
|
||||
if (conInfos.getUnit().equals(info.getConUnitTwo())) {
|
||||
changeStock = conInfos.getStockNumber().multiply(info.getConUnitTwoConvert()).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
} else if (StringUtils.isNotBlank(info.getConUnitTwo())
|
||||
&& StringUtils.isNotBlank(info.getDefaultUnit())
|
||||
&& info.getConUnitTwo().equals(info.getDefaultUnit())) {
|
||||
info.setDefaultUnit(info.getConUnitTwo());
|
||||
changeStock = conInfos.getStockNumber().multiply(info.getConUnitTwoConvert()).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
|
||||
|
||||
TbConsSuppFlow suppFlow = new TbConsSuppFlow();
|
||||
|
||||
TbConsInfoFlow flow = new TbConsInfoFlow();
|
||||
|
||||
@@ -1,82 +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.pojo.BotButtonConfig;
|
||||
import cn.ysk.cashier.service.BotButtonConfigService;
|
||||
import cn.ysk.cashier.dto.BotButtonConfigQueryCriteria;
|
||||
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.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author admin
|
||||
* @date 2023-10-31
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "buttonConfig管理")
|
||||
@RequestMapping("/api/botButtonConfig")
|
||||
public class BotButtonConfigController {
|
||||
|
||||
private final BotButtonConfigService botButtonConfigService;
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('botButtonConfig:list')")
|
||||
public void exportBotButtonConfig(HttpServletResponse response, BotButtonConfigQueryCriteria criteria) throws IOException {
|
||||
botButtonConfigService.download(botButtonConfigService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询buttonConfig")
|
||||
@PreAuthorize("@el.check('botButtonConfig:list')")
|
||||
public ResponseEntity<Object> queryBotButtonConfig(BotButtonConfigQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(botButtonConfigService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("新增buttonConfig")
|
||||
@PreAuthorize("@el.check('botButtonConfig:add')")
|
||||
public ResponseEntity<Object> createBotButtonConfig(@Validated @RequestBody BotButtonConfig resources){
|
||||
return new ResponseEntity<>(botButtonConfigService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改buttonConfig")
|
||||
@PreAuthorize("@el.check('botButtonConfig:edit')")
|
||||
public ResponseEntity<Object> updateBotButtonConfig(@Validated @RequestBody BotButtonConfig resources){
|
||||
botButtonConfigService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除buttonConfig")
|
||||
@PreAuthorize("@el.check('botButtonConfig:del')")
|
||||
public ResponseEntity<Object> deleteBotButtonConfig(@RequestBody Integer[] ids) {
|
||||
botButtonConfigService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -1,82 +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.pojo.BotConfig;
|
||||
import cn.ysk.cashier.service.BotConfigService;
|
||||
import cn.ysk.cashier.dto.BotConfigQueryCriteria;
|
||||
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.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author admin
|
||||
* @date 2023-10-31
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "botConfig管理")
|
||||
@RequestMapping("/api/botConfig")
|
||||
public class BotConfigController {
|
||||
|
||||
private final BotConfigService botConfigService;
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('botConfig:list')")
|
||||
public void exportBotConfig(HttpServletResponse response, BotConfigQueryCriteria criteria) throws IOException {
|
||||
botConfigService.download(botConfigService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询botConfig")
|
||||
@PreAuthorize("@el.check('botConfig:list')")
|
||||
public ResponseEntity<Object> queryBotConfig(BotConfigQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(botConfigService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("新增botConfig")
|
||||
@PreAuthorize("@el.check('botConfig:add')")
|
||||
public ResponseEntity<Object> createBotConfig(@Validated @RequestBody BotConfig resources){
|
||||
return new ResponseEntity<>(botConfigService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改botConfig")
|
||||
@PreAuthorize("@el.check('botConfig:edit')")
|
||||
public ResponseEntity<Object> updateBotConfig(@Validated @RequestBody BotConfig resources){
|
||||
botConfigService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除botConfig")
|
||||
@PreAuthorize("@el.check('botConfig:del')")
|
||||
public ResponseEntity<Object> deleteBotConfig(@RequestBody Integer[] ids) {
|
||||
botConfigService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -1,82 +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.pojo.BotUser;
|
||||
import cn.ysk.cashier.service.BotUserService;
|
||||
import cn.ysk.cashier.dto.BotUserQueryCriteria;
|
||||
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.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author admin
|
||||
* @date 2023-10-30
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "BotUserController管理")
|
||||
@RequestMapping("/api/botUser")
|
||||
public class BotUserController {
|
||||
|
||||
private final BotUserService botUserService;
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('botUser:list')")
|
||||
public void exportBotUser(HttpServletResponse response, BotUserQueryCriteria criteria) throws IOException {
|
||||
botUserService.download(botUserService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询BotUserController")
|
||||
@PreAuthorize("@el.check('botUser:list')")
|
||||
public ResponseEntity<Object> queryBotUser(BotUserQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(botUserService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("新增BotUserController")
|
||||
@PreAuthorize("@el.check('botUser:add')")
|
||||
public ResponseEntity<Object> createBotUser(@Validated @RequestBody BotUser resources){
|
||||
return new ResponseEntity<>(botUserService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改BotUserController")
|
||||
@PreAuthorize("@el.check('botUser:edit')")
|
||||
public ResponseEntity<Object> updateBotUser(@Validated @RequestBody BotUser resources){
|
||||
botUserService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除BotUserController")
|
||||
@PreAuthorize("@el.check('botUser:del')")
|
||||
public ResponseEntity<Object> deleteBotUser(@RequestBody Integer[] ids) {
|
||||
botUserService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -1,82 +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.pojo.BotUserFlow;
|
||||
import cn.ysk.cashier.service.BotUserFlowService;
|
||||
import cn.ysk.cashier.dto.BotUserFlowQueryCriteria;
|
||||
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.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author admin
|
||||
* @date 2023-10-30
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "accountFlow管理")
|
||||
@RequestMapping("/api/botUserFlow")
|
||||
public class BotUserFlowController {
|
||||
|
||||
private final BotUserFlowService botUserFlowService;
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('botUserFlow:list')")
|
||||
public void exportBotUserFlow(HttpServletResponse response, BotUserFlowQueryCriteria criteria) throws IOException {
|
||||
botUserFlowService.download(botUserFlowService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询accountFlow")
|
||||
@PreAuthorize("@el.check('botUserFlow:list')")
|
||||
public ResponseEntity<Object> queryBotUserFlow(BotUserFlowQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(botUserFlowService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("新增accountFlow")
|
||||
@PreAuthorize("@el.check('botUserFlow:add')")
|
||||
public ResponseEntity<Object> createBotUserFlow(@Validated @RequestBody BotUserFlow resources){
|
||||
return new ResponseEntity<>(botUserFlowService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改accountFlow")
|
||||
@PreAuthorize("@el.check('botUserFlow:edit')")
|
||||
public ResponseEntity<Object> updateBotUserFlow(@Validated @RequestBody BotUserFlow resources){
|
||||
botUserFlowService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除accountFlow")
|
||||
@PreAuthorize("@el.check('botUserFlow:del')")
|
||||
public ResponseEntity<Object> deleteBotUserFlow(@RequestBody Integer[] ids) {
|
||||
botUserFlowService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -1,82 +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.pojo.TbRenewalsPayLog;
|
||||
import cn.ysk.cashier.service.TbRenewalsPayLogService;
|
||||
import cn.ysk.cashier.dto.TbRenewalsPayLogQueryCriteria;
|
||||
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.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2023-11-07
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/renewals管理")
|
||||
@RequestMapping("/api/tbRenewalsPayLog")
|
||||
public class TbRenewalsPayLogController {
|
||||
|
||||
private final TbRenewalsPayLogService tbRenewalsPayLogService;
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbRenewalsPayLog:list')")
|
||||
public void exportTbRenewalsPayLog(HttpServletResponse response, TbRenewalsPayLogQueryCriteria criteria) throws IOException {
|
||||
tbRenewalsPayLogService.download(tbRenewalsPayLogService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询/shop/renewals")
|
||||
@PreAuthorize("@el.check('tbRenewalsPayLog:list')")
|
||||
public ResponseEntity<Object> queryTbRenewalsPayLog(TbRenewalsPayLogQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbRenewalsPayLogService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("新增/shop/renewals")
|
||||
@PreAuthorize("@el.check('tbRenewalsPayLog:add')")
|
||||
public ResponseEntity<Object> createTbRenewalsPayLog(@Validated @RequestBody TbRenewalsPayLog resources){
|
||||
return new ResponseEntity<>(tbRenewalsPayLogService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改/shop/renewals")
|
||||
@PreAuthorize("@el.check('tbRenewalsPayLog:edit')")
|
||||
public ResponseEntity<Object> updateTbRenewalsPayLog(@Validated @RequestBody TbRenewalsPayLog resources){
|
||||
tbRenewalsPayLogService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除/shop/renewals")
|
||||
@PreAuthorize("@el.check('tbRenewalsPayLog:del')")
|
||||
public ResponseEntity<Object> deleteTbRenewalsPayLog(@RequestBody Integer[] ids) {
|
||||
tbRenewalsPayLogService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package cn.ysk.cashier.controller;
|
||||
|
||||
import cn.ysk.cashier.dto.QueryReceiveDto;
|
||||
import cn.ysk.cashier.exception.BadRequestException;
|
||||
import cn.ysk.cashier.mybatis.entity.TbShopCoupon;
|
||||
import cn.ysk.cashier.mybatis.service.TbShopCouponService;
|
||||
import cn.ysk.cashier.mybatis.vo.TbShopCouponVo;
|
||||
import cn.ysk.cashier.utils.SecurityUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import cn.ysk.cashier.dto.TbShopCouponQueryCriteria;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 优惠券(TbShopCoupon)表控制层
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-10-22 15:43:24
|
||||
*/
|
||||
@Api(tags = "优惠券管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/tbShopCoupon")
|
||||
public class TbShopCouponController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private TbShopCouponService tbShopCouponService;
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("分页查询")
|
||||
public ResponseEntity<Object> selectAll(TbShopCouponQueryCriteria criteria) {
|
||||
return new ResponseEntity<>(tbShopCouponService.queryAll(criteria), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("通过Id查询详情")
|
||||
public TbShopCoupon selectOne(@PathVariable Integer id) {
|
||||
return tbShopCouponService.findById(id);
|
||||
}
|
||||
|
||||
@GetMapping("/product/{couponId}")
|
||||
@ApiOperation("查询赠送的商品")
|
||||
public ResponseEntity<Object> queryActivatePros(@PathVariable("couponId") Integer couponId){
|
||||
return new ResponseEntity<>(tbShopCouponService.findActivatePros(couponId),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("新增")
|
||||
public ResponseEntity<Object> insert(@RequestBody TbShopCouponVo tbShopCoupon) {
|
||||
if (tbShopCoupon.getType().equals(2) && CollectionUtils.isEmpty(tbShopCoupon.getProducts())) {
|
||||
throw new BadRequestException("赠送商品不可为空");
|
||||
}
|
||||
tbShopCoupon.setEditor(SecurityUtils.getCurrentUserNickName());
|
||||
return new ResponseEntity<>(tbShopCouponService.update(tbShopCoupon), HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("通过id修改")
|
||||
public ResponseEntity<Object> update(@RequestBody TbShopCouponVo tbShopCoupon) {
|
||||
if (tbShopCoupon.getType().equals(2) && CollectionUtils.isEmpty(tbShopCoupon.getProducts()))
|
||||
throw new BadRequestException("赠送商品不可为空");
|
||||
tbShopCouponService.update(tbShopCoupon);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除优惠券")
|
||||
public ResponseEntity<Object> delete(@RequestBody Integer[] ids) {
|
||||
tbShopCouponService.delete(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/queryReceive")
|
||||
@ApiOperation("领取详情")
|
||||
public ResponseEntity<Object> queryReceive(@Validated @RequestBody QueryReceiveDto param) {
|
||||
return new ResponseEntity<>(tbShopCouponService.queryReceive(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@DeleteMapping("receive")
|
||||
@ApiOperation("删除用户的券")
|
||||
public ResponseEntity<Object> deleteReceive(@RequestBody Integer[] ids) {
|
||||
tbShopCouponService.deleteReceive(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("activateByOrderId")
|
||||
@ApiOperation("根据订单id获取可用优惠券信息")
|
||||
public ResponseEntity<Object> activateByOrderIds(@RequestParam Integer shopId, @RequestParam Integer orderId, @RequestParam(required = false) Integer memberId) {
|
||||
return ResponseEntity.ok(tbShopCouponService.getActivateByOrderIds(shopId, orderId, memberId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
package cn.ysk.cashier.controller;
|
||||
|
||||
|
||||
import cn.ysk.cashier.annotation.rest.AnonymousPostMapping;
|
||||
import cn.ysk.cashier.dto.TbShopShareRecordQueryCriteria;
|
||||
import cn.ysk.cashier.mybatis.entity.TbShopShare;
|
||||
import cn.ysk.cashier.mybatis.service.TbShopShareRecordService;
|
||||
import cn.ysk.cashier.mybatis.service.TbShopShareService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 店铺分享(TbShopShare)表控制层
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-11-06 15:47:37
|
||||
*/
|
||||
@Api(tags = "分享")
|
||||
@RestController
|
||||
@RequestMapping("tbShopShare")
|
||||
public class TbShopShareController {
|
||||
|
||||
@Resource
|
||||
private TbShopShareService tbShopShareService;
|
||||
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private TbShopShareRecordService tbShopShareRecordService;
|
||||
|
||||
@PostMapping("byShare")
|
||||
@AnonymousPostMapping
|
||||
@ApiOperation("分页查询")
|
||||
public ResponseEntity<Object> selectAllByShare(@RequestBody TbShopShareRecordQueryCriteria criteria) {
|
||||
return new ResponseEntity<>(tbShopShareRecordService.selectAllByShare(criteria), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("byShopId")
|
||||
@ApiOperation("通过shopId查询详情")
|
||||
public ResponseEntity<?> getByShopId(@RequestParam Integer shopId) {
|
||||
return ResponseEntity.ok(tbShopShareService.getByShopId(shopId));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("新增")
|
||||
public ResponseEntity<Object> insert(@RequestBody TbShopShare tbShopShare) {
|
||||
return new ResponseEntity<>(tbShopShareService.save(tbShopShare), HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("通过id修改")
|
||||
public ResponseEntity<Object> update(@RequestBody TbShopShare tbShopShare) {
|
||||
tbShopShareService.updateById(tbShopShare);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除")
|
||||
public ResponseEntity<Object> delete(@RequestBody Integer[] ids) {
|
||||
tbShopShareService.removeByIds(Arrays.asList(ids));
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
package cn.ysk.cashier.controller.points;
|
||||
|
||||
import cn.hutool.core.map.MapProxy;
|
||||
import cn.ysk.cashier.dto.points.OrderDeductionPointsDTO;
|
||||
import cn.ysk.cashier.mybatis.entity.TbMemberPoints;
|
||||
import cn.ysk.cashier.mybatis.service.TbMemberPointsService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 会员积分
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/points/member-points")
|
||||
@Api(tags = "会员积分")
|
||||
public class TbMemberPointsController {
|
||||
|
||||
@Resource
|
||||
private TbMemberPointsService tbMemberPointsService;
|
||||
|
||||
@GetMapping("page")
|
||||
@ApiOperation("分页")
|
||||
public ResponseEntity page(@RequestParam Map<String, Object> params) {
|
||||
Map<String, Object> page = tbMemberPointsService.page(params);
|
||||
return ResponseEntity.ok().body(page);
|
||||
}
|
||||
|
||||
@GetMapping("{memberId}")
|
||||
@ApiOperation("获取会员积分等信息")
|
||||
public ResponseEntity getMemberPoints(@PathVariable("memberId") Long memberId) {
|
||||
TbMemberPoints memberPoints = tbMemberPointsService.getMemberPoints(memberId);
|
||||
return ResponseEntity.ok().body(memberPoints);
|
||||
}
|
||||
|
||||
@GetMapping("calc-usable-points")
|
||||
@ApiOperation("获取订单可用积分及抵扣金额")
|
||||
public ResponseEntity getMemberUsablePoints(@RequestParam Long memberId, @RequestParam BigDecimal orderAmount) {
|
||||
OrderDeductionPointsDTO usablePoints = tbMemberPointsService.getMemberUsablePoints(memberId, orderAmount);
|
||||
return ResponseEntity.ok().body(usablePoints);
|
||||
}
|
||||
|
||||
@GetMapping("calc-used-points")
|
||||
@ApiOperation("根据抵扣金额计算所需积分")
|
||||
public ResponseEntity calcUsedPoints(@RequestParam Long memberId, @RequestParam BigDecimal orderAmount, @RequestParam BigDecimal deductionAmount) {
|
||||
int points = tbMemberPointsService.calcUsedPoints(memberId, orderAmount, deductionAmount);
|
||||
return ResponseEntity.ok().body(points);
|
||||
}
|
||||
|
||||
@GetMapping("calc-deduction-amount")
|
||||
@ApiOperation("根据积分计算可抵扣金额")
|
||||
public ResponseEntity calcDeductionAmount(@RequestParam Long memberId, @RequestParam BigDecimal orderAmount, @RequestParam Integer points) {
|
||||
BigDecimal deductionAmount = tbMemberPointsService.calcDeductionAmount(memberId, orderAmount, points);
|
||||
return ResponseEntity.ok().body(deductionAmount);
|
||||
}
|
||||
|
||||
@PostMapping("payed-deduct-points")
|
||||
@ApiOperation("支付完成扣减积分(支付成功回调中使用)")
|
||||
public ResponseEntity deductPoints(@RequestBody Map<String, Object> params) {
|
||||
MapProxy proxy = MapProxy.create(params);
|
||||
Long memberId = proxy.getLong("memberId");
|
||||
Integer points = proxy.getInt("points");
|
||||
String content = proxy.getStr("content");
|
||||
Long orderId = proxy.getLong("orderId");
|
||||
boolean ret = tbMemberPointsService.deductPoints(memberId, points, content, orderId);
|
||||
return ResponseEntity.ok().body(ret);
|
||||
}
|
||||
|
||||
@PostMapping("consume-award-points")
|
||||
@ApiOperation("消费赠送积分(支付成功回调中使用)")
|
||||
public ResponseEntity consumeAwardPoints(@RequestBody Map<String, Object> params) {
|
||||
MapProxy proxy = MapProxy.create(params);
|
||||
Long memberId = proxy.getLong("memberId");
|
||||
Long orderId = proxy.getLong("orderId");
|
||||
tbMemberPointsService.consumeAwardPoints(memberId, orderId);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package cn.ysk.cashier.controller.points;
|
||||
|
||||
import cn.ysk.cashier.mybatis.service.TbMemberPointsLogService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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 javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 会员积分变动记录
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/points/member-points-log")
|
||||
@Api(tags = "会员积分变动记录")
|
||||
public class TbMemberPointsLogController {
|
||||
|
||||
@Resource
|
||||
private TbMemberPointsLogService tbMemberPointsLogService;
|
||||
|
||||
@GetMapping("page")
|
||||
@ApiOperation("分页")
|
||||
public ResponseEntity page(@RequestParam Map<String, Object> params) {
|
||||
Map<String, Object> page = tbMemberPointsLogService.page(params);
|
||||
return ResponseEntity.ok().body(page);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package cn.ysk.cashier.controller.points;
|
||||
|
||||
import cn.ysk.cashier.mybatis.entity.TbPointsBasicSetting;
|
||||
import cn.ysk.cashier.mybatis.service.TbPointsBasicSettingService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
|
||||
/**
|
||||
* 积分基本设置
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/points/basic-setting")
|
||||
@Api(tags = "积分基本设置")
|
||||
public class TbPointsBasicSettingController {
|
||||
|
||||
@Resource
|
||||
private TbPointsBasicSettingService tbPointsBasicSettingService;
|
||||
|
||||
@GetMapping("{shopId}")
|
||||
@ApiOperation("信息")
|
||||
public ResponseEntity get(@PathVariable("shopId") Long shopId) {
|
||||
TbPointsBasicSetting data = tbPointsBasicSettingService.getByShopId(shopId);
|
||||
return ResponseEntity.ok().body(data);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("保存")
|
||||
public ResponseEntity save(@RequestBody TbPointsBasicSetting entity) {
|
||||
tbPointsBasicSettingService.save(entity);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package cn.ysk.cashier.controller.points;
|
||||
|
||||
import cn.ysk.cashier.mybatis.entity.TbPointsExchangeRecord;
|
||||
import cn.ysk.cashier.mybatis.service.TbPointsExchangeRecordService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 积分兑换记录
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/points/exchange-record")
|
||||
@Api(tags = "积分兑换记录")
|
||||
public class TbPointsExchangeRecordController {
|
||||
|
||||
@Resource
|
||||
private TbPointsExchangeRecordService tbPointsExchangeRecordService;
|
||||
|
||||
@GetMapping("page")
|
||||
@ApiOperation("分页")
|
||||
public ResponseEntity page(@RequestParam Map<String, Object> params) {
|
||||
Map<String, Object> data = tbPointsExchangeRecordService.page(params);
|
||||
return ResponseEntity.ok().body(data);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("信息")
|
||||
public ResponseEntity get(@PathVariable("id") Long id) {
|
||||
TbPointsExchangeRecord data = tbPointsExchangeRecordService.get(id);
|
||||
return ResponseEntity.ok().body(data);
|
||||
}
|
||||
|
||||
@PostMapping("checkout")
|
||||
@ApiOperation("核销")
|
||||
public ResponseEntity checkout(@RequestBody TbPointsExchangeRecord record) {
|
||||
tbPointsExchangeRecordService.checkout(record.getCouponCode());
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
@PostMapping("cancel")
|
||||
@ApiOperation("取消")
|
||||
public ResponseEntity cancel(@RequestBody TbPointsExchangeRecord record) {
|
||||
tbPointsExchangeRecordService.cancel(record);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
@PostMapping("refund")
|
||||
@ApiOperation("退单")
|
||||
public ResponseEntity refund(@RequestBody TbPointsExchangeRecord record) {
|
||||
tbPointsExchangeRecordService.refund(record);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
@GetMapping("total")
|
||||
@ApiOperation("统计")
|
||||
public ResponseEntity total(@RequestParam Map<String, Object> params) {
|
||||
Map<String, Object> data = tbPointsExchangeRecordService.total(params);
|
||||
return ResponseEntity.ok().body(data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package cn.ysk.cashier.controller.points;
|
||||
|
||||
import cn.ysk.cashier.mybatis.entity.TbPointsGoodsSetting;
|
||||
import cn.ysk.cashier.mybatis.service.TbPointsGoodsSettingService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 积分商品设置
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/points/goods-setting")
|
||||
@Api(tags = "积分商品设置")
|
||||
public class TbPointsGoodsSettingController {
|
||||
|
||||
@Resource
|
||||
private TbPointsGoodsSettingService tbPointsGoodsSettingService;
|
||||
|
||||
@GetMapping("page")
|
||||
@ApiOperation("分页")
|
||||
public ResponseEntity page(@RequestParam Map<String, Object> params) {
|
||||
Map<String, Object> data = tbPointsGoodsSettingService.page(params);
|
||||
return ResponseEntity.ok().body(data);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("信息")
|
||||
public ResponseEntity get(@PathVariable("id") Long id) {
|
||||
TbPointsGoodsSetting data = tbPointsGoodsSettingService.getById(id);
|
||||
return ResponseEntity.ok().body(data);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("保存")
|
||||
public ResponseEntity save(@RequestBody TbPointsGoodsSetting entity) {
|
||||
boolean ret = tbPointsGoodsSettingService.save(entity);
|
||||
return ResponseEntity.ok().body(ret);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
public ResponseEntity update(@RequestBody TbPointsGoodsSetting dto) {
|
||||
boolean ret = tbPointsGoodsSettingService.update(dto);
|
||||
return ResponseEntity.ok().body(ret);
|
||||
}
|
||||
|
||||
@DeleteMapping("{id}")
|
||||
@ApiOperation("删除")
|
||||
public ResponseEntity delete(@PathVariable("id") Long id) {
|
||||
tbPointsGoodsSettingService.delete(id);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package cn.ysk.cashier.controller.product;
|
||||
|
||||
import cn.ysk.cashier.mybatis.service.TbPadLayoutService;
|
||||
import cn.ysk.cashier.pojo.product.TbPadLayout;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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 javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Pad商品布局版式
|
||||
* @author tankaikai
|
||||
* @since 2024-10-22 16:38
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/pad/layout")
|
||||
@Api(tags="Pad商品布局版式")
|
||||
public class TbPadLayoutController {
|
||||
|
||||
@Resource
|
||||
private TbPadLayoutService mpPadLayoutService;
|
||||
|
||||
@GetMapping("list")
|
||||
@ApiOperation("分页")
|
||||
public ResponseEntity list(@RequestParam Map<String, Object> params) {
|
||||
List<TbPadLayout> list = mpPadLayoutService.findList();
|
||||
return ResponseEntity.ok().body(list);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package cn.ysk.cashier.controller.product;
|
||||
|
||||
import cn.ysk.cashier.dto.product.PadProductCategoryDTO;
|
||||
import cn.ysk.cashier.mybatis.service.TbPadProductCategoryService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Pad商品自定义分类
|
||||
* @author tankaikai
|
||||
* @since 2024-10-22 16:38
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/pad/productCategory")
|
||||
@Api(tags="Pad商品自定义分类")
|
||||
public class TbPadProductCategoryController {
|
||||
|
||||
@Resource
|
||||
private TbPadProductCategoryService mpPadProductCategoryService;
|
||||
|
||||
@GetMapping("page")
|
||||
@ApiOperation("分页")
|
||||
public ResponseEntity page(@RequestParam Map<String, Object> params) {
|
||||
Map<String, Object> page = mpPadProductCategoryService.findPage(params);
|
||||
return ResponseEntity.ok().body(page);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("详情")
|
||||
public ResponseEntity get(@PathVariable("id") Long id) {
|
||||
PadProductCategoryDTO data = mpPadProductCategoryService.get(id);
|
||||
return ResponseEntity.ok().body(data);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("保存")
|
||||
public ResponseEntity save(@RequestBody PadProductCategoryDTO dto) {
|
||||
mpPadProductCategoryService.save(dto);
|
||||
return ResponseEntity.ok().body(dto.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
public ResponseEntity update(@RequestBody PadProductCategoryDTO dto) {
|
||||
mpPadProductCategoryService.update(dto);
|
||||
return ResponseEntity.ok().body(dto.getId());
|
||||
}
|
||||
|
||||
@DeleteMapping("{id}")
|
||||
@ApiOperation("删除")
|
||||
public ResponseEntity delete(@PathVariable("id") Long id) {
|
||||
mpPadProductCategoryService.delete(id);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
@PostMapping("sort")
|
||||
@ApiOperation("排序")
|
||||
public ResponseEntity sort(@RequestBody List<PadProductCategoryDTO> sortList) {
|
||||
mpPadProductCategoryService.sort(sortList);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
@PostMapping("copy/{id}")
|
||||
@ApiOperation("复制")
|
||||
public ResponseEntity copy(@PathVariable("id") Long id) {
|
||||
mpPadProductCategoryService.copy(id);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -147,7 +147,7 @@ public class TbPlaceController {
|
||||
@PostMapping("/order")
|
||||
@ApiOperation("代客下单 查询购物车 /shop/table")
|
||||
public ResponseEntity<Object> createOrder(@RequestBody CreateOrderDTO createOrderDTO) {
|
||||
return ResponseEntity.ok(tbShopTableService.createOrder(createOrderDTO, !createOrderDTO.isPostPay(), true));
|
||||
return ResponseEntity.ok(tbShopTableService.createOrder(createOrderDTO, false));
|
||||
}
|
||||
|
||||
@PostMapping("/pending")
|
||||
@@ -175,13 +175,23 @@ public class TbPlaceController {
|
||||
JSONObject userInfo = JSON.parseObject(JSON.toJSONString(redisUtils.get("online-token-" + token)));
|
||||
String userName = userInfo.getString("userName");
|
||||
String shopId = userInfo.getString("shopId");
|
||||
TbPlussShopStaff shopStaff = staffRepository.queryByAccount(userName, shopId);
|
||||
TbMerchantAccount merchantAccount = tbMerchantAccountMapper.selectOne(Wrappers.<TbMerchantAccount>lambdaQuery().eq(TbMerchantAccount::getAccount, shopStaff.getAccount()));
|
||||
TbPlussShopStaff shopStaff;
|
||||
if (userName.contains("@")) {
|
||||
shopStaff = staffRepository.queryMasterAccount(shopId);
|
||||
} else {
|
||||
shopStaff = staffRepository.queryByAccount(userName, shopId);
|
||||
}
|
||||
TbMerchantAccount merchantAccount = tbMerchantAccountMapper.selectOne(Wrappers.<TbMerchantAccount>lambdaQuery()
|
||||
.eq(TbMerchantAccount::getAccount, shopStaff.getAccount()));
|
||||
Integer accountId = merchantAccount.getId();
|
||||
Integer staffId = shopStaff.getId();
|
||||
List<TbToken> onlineUserList = tbTokenRepository.findListByAccountIdAndStaffId(accountId, staffId);
|
||||
if (CollUtil.isNotEmpty(onlineUserList)) {
|
||||
payDTO.setToken(onlineUserList.get(0).getToken());
|
||||
} else {
|
||||
payDTO.setShopId(Integer.valueOf(shopId));
|
||||
payDTO.setStaffId(staffId);
|
||||
payDTO.setLoginName(userName);
|
||||
}
|
||||
return ResponseEntity.ok(tbShopTableService.pay(payDTO));
|
||||
}
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
package cn.ysk.cashier.controller.product;
|
||||
|
||||
import cn.ysk.cashier.annotation.AnonymousAccess;
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.product.TbProductStockOperate;
|
||||
import cn.ysk.cashier.service.TbProductStockOperateService;
|
||||
import cn.ysk.cashier.dto.product.OutAndOnDto;
|
||||
import cn.ysk.cashier.dto.product.TbProductStockOperateQueryCriteria;
|
||||
import cn.ysk.cashier.pojo.product.TbProductStockOperate;
|
||||
import cn.ysk.cashier.service.TbProductStockOperateService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
@@ -40,6 +41,11 @@ public class TbProductStockOperateController {
|
||||
return new ResponseEntity<>(tbProductStockOperateService.queryAllPage(criteria),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/page")
|
||||
public ResponseEntity<Object> page(@RequestBody TbProductStockOperateQueryCriteria criteria){
|
||||
return new ResponseEntity<>(tbProductStockOperateService.queryAllPage(criteria),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
public ResponseEntity<Object> queryById(@PathVariable Integer id){
|
||||
return new ResponseEntity<>(tbProductStockOperateService.findById(id),HttpStatus.OK);
|
||||
|
||||
@@ -38,10 +38,6 @@ public class ShopPayApiController {
|
||||
|
||||
@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");
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.rest.AnonymousGetMapping;
|
||||
import cn.ysk.cashier.dto.ShopSummaryDto;
|
||||
import cn.ysk.cashier.service.SummaryService;
|
||||
import cn.ysk.cashier.vo.TbOrderPayCountVo;
|
||||
@@ -33,6 +34,7 @@ public class SummaryByDayController {
|
||||
|
||||
|
||||
@GetMapping
|
||||
@AnonymousGetMapping
|
||||
public Page<T> shopSummary(ShopSummaryDto summaryDto,
|
||||
@RequestParam(required = false, defaultValue = "0") Integer page,
|
||||
@RequestParam(required = false, defaultValue = "10") Integer size) {
|
||||
|
||||
@@ -26,7 +26,6 @@ public class SummaryController {
|
||||
|
||||
//营业板块 上
|
||||
@PostMapping("/trade")
|
||||
@AnonymousPostMapping
|
||||
private Object shopSummaryDate(@RequestBody BaseQueryDto param) {
|
||||
return summaryService.trade(param);
|
||||
}
|
||||
|
||||
@@ -1,92 +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.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.dto.shop.TbMerchantCouponDto;
|
||||
import cn.ysk.cashier.pojo.shop.TbMerchantCoupon;
|
||||
import cn.ysk.cashier.pojo.shop.TbPurchaseNotice;
|
||||
import cn.ysk.cashier.repository.shop.TbPurchaseNoticeRepository;
|
||||
import cn.ysk.cashier.service.shop.TbMerchantCouponService;
|
||||
import cn.ysk.cashier.dto.shop.TbMerchantCouponQueryCriteria;
|
||||
import cn.ysk.cashier.service.shop.TbPurchaseNoticeService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-03-20
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/coupon管理")
|
||||
@RequestMapping("/api/tbMerchantCoupon")
|
||||
public class TbMerchantCouponController {
|
||||
|
||||
private final TbMerchantCouponService tbMerchantCouponService;
|
||||
private final TbPurchaseNoticeRepository noticeRepository;
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
public void exportTbMerchantCoupon(HttpServletResponse response, TbMerchantCouponQueryCriteria criteria) throws IOException {
|
||||
tbMerchantCouponService.download(tbMerchantCouponService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
public ResponseEntity<Object> queryTbMerchantCoupon(TbMerchantCouponQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbMerchantCouponService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@ApiOperation("查询优惠卷")
|
||||
public ResponseEntity<Object> queryTbMerchantCouponById(@PathVariable("id")Integer id){
|
||||
Map result=new HashMap<>();
|
||||
TbMerchantCouponDto coupon = tbMerchantCouponService.findById(id);
|
||||
result.put("coupon",coupon);
|
||||
TbPurchaseNotice notice = noticeRepository.findByCouponId(id);
|
||||
result.put("notice",notice);
|
||||
return new ResponseEntity<>(result,HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增商家优惠卷:#resources.title")
|
||||
public ResponseEntity<Object> createTbMerchantCoupon(@Validated @RequestBody TbMerchantCoupon resources){
|
||||
return new ResponseEntity<>(tbMerchantCouponService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改商家优惠卷:#resources.title")
|
||||
public ResponseEntity<Object> updateTbMerchantCoupon(@Validated @RequestBody TbMerchantCoupon resources){
|
||||
tbMerchantCouponService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除商家优惠卷:#ids")
|
||||
public ResponseEntity<Object> deleteTbMerchantCoupon(@RequestBody Integer[] ids) {
|
||||
tbMerchantCouponService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -1,91 +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.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.shop.TbReceiptSales;
|
||||
import cn.ysk.cashier.dto.shop.TbReceiptSalesQueryCriteria;
|
||||
import cn.ysk.cashier.service.shop.TbReceiptSalesService;
|
||||
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.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-08
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/receiptSales管理")
|
||||
@RequestMapping("/api/tbReceiptSales")
|
||||
public class TbReceiptSalesController {
|
||||
|
||||
private final TbReceiptSalesService tbReceiptSalesService;
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbReceiptSales:list')")
|
||||
public void exportTbReceiptSales(HttpServletResponse response, TbReceiptSalesQueryCriteria criteria) throws IOException {
|
||||
tbReceiptSalesService.download(tbReceiptSalesService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询/shop/receiptSales")
|
||||
@PreAuthorize("@el.check('tbReceiptSales:list')")
|
||||
public ResponseEntity<Object> queryTbReceiptSales(TbReceiptSalesQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbReceiptSalesService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{shopId}")
|
||||
@ApiOperation("查询/shop/receiptSales")
|
||||
@PreAuthorize("@el.check('tbReceiptSales:info')")
|
||||
public Object queryTbReceiptSalesInfo(@PathVariable("shopId")Integer shopId){
|
||||
|
||||
return tbReceiptSalesService.findById(shopId);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("新增/shop/receiptSales")
|
||||
@PreAuthorize("@el.check('tbReceiptSales:add')")
|
||||
public ResponseEntity<Object> createTbReceiptSales(@Validated @RequestBody TbReceiptSales resources){
|
||||
return new ResponseEntity<>(tbReceiptSalesService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改/shop/receiptSales")
|
||||
@PreAuthorize("@el.check('tbReceiptSales:edit')")
|
||||
public ResponseEntity<Object> updateTbReceiptSales(@Validated @RequestBody TbReceiptSales resources){
|
||||
tbReceiptSalesService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除/shop/receiptSales")
|
||||
@PreAuthorize("@el.check('tbReceiptSales:del')")
|
||||
public ResponseEntity<Object> deleteTbReceiptSales(@RequestBody Integer[] ids) {
|
||||
tbReceiptSalesService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -1,95 +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.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopCashSpread;
|
||||
import cn.ysk.cashier.service.shop.TbShopCashSpreadService;
|
||||
import cn.ysk.cashier.dto.shop.TbShopCashSpreadQueryCriteria;
|
||||
import cn.ysk.cashier.utils.StringUtils;
|
||||
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.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-05
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/spread管理")
|
||||
@RequestMapping("/api/tbShopCashSpread")
|
||||
public class TbShopCashSpreadController {
|
||||
|
||||
private final TbShopCashSpreadService tbShopCashSpreadService;
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbShopCashSpread:list')")
|
||||
public void exportTbShopCashSpread(HttpServletResponse response, TbShopCashSpreadQueryCriteria criteria) throws IOException {
|
||||
tbShopCashSpreadService.download(tbShopCashSpreadService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询/shop/spread")
|
||||
@PreAuthorize("@el.check('tbShopCashSpread:list')")
|
||||
public ResponseEntity<Object> queryTbShopCashSpread(TbShopCashSpreadQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbShopCashSpreadService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
@GetMapping("/{shopId}")
|
||||
@ApiOperation("查询/shop/spread/info")
|
||||
@PreAuthorize("@el.check('tbShopCashSpread:info')")
|
||||
public Object queryTbShopCashSpreadInfo(@PathVariable("shopId") Integer shopId){
|
||||
TbShopCashSpread byShopId = tbShopCashSpreadService.findByShopId(shopId);
|
||||
String screenConfig = byShopId.getScreenConfig();
|
||||
return StringUtils.stringChangeMap(screenConfig);
|
||||
}
|
||||
@PostMapping
|
||||
@ApiOperation("新增/shop/spread")
|
||||
@PreAuthorize("@el.check('tbShopCashSpread:add')")
|
||||
public ResponseEntity<Object> createTbShopCashSpread(@Validated @RequestBody TbShopCashSpread resources){
|
||||
return new ResponseEntity<>(tbShopCashSpreadService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改/shop/spread")
|
||||
@PreAuthorize("@el.check('tbShopCashSpread:edit')")
|
||||
public ResponseEntity<Object> updateTbShopCashSpread(@Validated @RequestBody TbShopCashSpread resources){
|
||||
Integer update = tbShopCashSpreadService.update(resources);
|
||||
if (update>0){
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
|
||||
}
|
||||
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
||||
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除/shop/spread")
|
||||
@PreAuthorize("@el.check('tbShopCashSpread:del')")
|
||||
public ResponseEntity<Object> deleteTbShopCashSpread(@RequestBody String[] ids) {
|
||||
tbShopCashSpreadService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -1,83 +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.shop;
|
||||
|
||||
import cn.ysk.cashier.pojo.shop.TbShopCurrency;
|
||||
import cn.ysk.cashier.service.shop.TbShopCurrencyService;
|
||||
import cn.ysk.cashier.dto.shop.TbShopCurrencyQueryCriteria;
|
||||
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.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-05
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/currency管理")
|
||||
@RequestMapping("/api/tbShopCurrency")
|
||||
public class TbShopCurrencyController {
|
||||
|
||||
private final TbShopCurrencyService tbShopCurrencyService;
|
||||
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbShopCurrency:list')")
|
||||
public void exportTbShopCurrency(HttpServletResponse response, TbShopCurrencyQueryCriteria criteria) throws IOException {
|
||||
tbShopCurrencyService.download(tbShopCurrencyService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询/shop/currency")
|
||||
public ResponseEntity<Object> queryTbShopCurrency(TbShopCurrencyQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbShopCurrencyService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{shopId}")
|
||||
@ApiOperation("查询/shop/currency/info")
|
||||
public Object queryTbShopCurrencyInfo(@PathVariable("shopId") String shopId){
|
||||
return tbShopCurrencyService.findByShopId(shopId);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("新增/shop/currency")
|
||||
public ResponseEntity<Object> createTbShopCurrency(@Validated @RequestBody TbShopCurrency resources){
|
||||
return new ResponseEntity<>(tbShopCurrencyService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改/shop/currency")
|
||||
public ResponseEntity<Object> updateTbShopCurrency(@Validated @RequestBody TbShopCurrency resources){
|
||||
tbShopCurrencyService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除/shop/currency")
|
||||
public ResponseEntity<Object> deleteTbShopCurrency(@RequestBody Integer[] ids) {
|
||||
tbShopCurrencyService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -1,37 +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.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @description /
|
||||
* @author admin
|
||||
* @date 2023-10-31
|
||||
**/
|
||||
@Data
|
||||
public class BotButtonConfigDto implements Serializable {
|
||||
|
||||
private Integer id;
|
||||
|
||||
/** 按钮名称 */
|
||||
private String buttonName;
|
||||
|
||||
/** 按钮值 */
|
||||
private String buttonValue;
|
||||
}
|
||||
@@ -1,32 +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.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.ysk.cashier.annotation.Query;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author admin
|
||||
* @date 2023-10-31
|
||||
**/
|
||||
@Data
|
||||
public class BotButtonConfigQueryCriteria{
|
||||
|
||||
/** 精确 */
|
||||
@Query
|
||||
private String buttonName;
|
||||
}
|
||||
@@ -1,40 +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.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @description /
|
||||
* @author admin
|
||||
* @date 2023-10-31
|
||||
**/
|
||||
@Data
|
||||
public class BotConfigDto implements Serializable {
|
||||
|
||||
private Integer id;
|
||||
|
||||
/** 元素键值 */
|
||||
private String configKey;
|
||||
|
||||
/** 元素值 */
|
||||
private String configValue;
|
||||
|
||||
/** 描述 */
|
||||
private String remark;
|
||||
}
|
||||
@@ -1,36 +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.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.ysk.cashier.annotation.Query;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author admin
|
||||
* @date 2023-10-31
|
||||
**/
|
||||
@Data
|
||||
public class BotConfigQueryCriteria{
|
||||
|
||||
/** 精确 */
|
||||
@Query
|
||||
private String configKey;
|
||||
|
||||
/** 精确 */
|
||||
@Query
|
||||
private String configValue;
|
||||
}
|
||||
@@ -1,87 +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.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.sql.Timestamp;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @description /
|
||||
* @author admin
|
||||
* @date 2023-10-30
|
||||
**/
|
||||
@Data
|
||||
public class BotUserDto implements Serializable {
|
||||
|
||||
private Integer id;
|
||||
|
||||
private Integer fatherId;
|
||||
|
||||
/** 父级电报号 */
|
||||
private String fatherTelegramId;
|
||||
|
||||
/** 电报号 */
|
||||
private String userTelegramId;
|
||||
|
||||
/** 用户名称 */
|
||||
private String userName;
|
||||
|
||||
/** 组电报号 */
|
||||
private String groupTelegramId;
|
||||
|
||||
/** 用户代码 */
|
||||
private String userCode;
|
||||
|
||||
private String userPayPass;
|
||||
|
||||
private String bombStatus;
|
||||
|
||||
/** 用户状态 */
|
||||
private String botStatus;
|
||||
|
||||
/** 总充值 */
|
||||
private BigDecimal usdtRechargeTotal;
|
||||
|
||||
/** 总提现 */
|
||||
private BigDecimal usdtWithdrawTotal;
|
||||
|
||||
/** 总资金 */
|
||||
private BigDecimal balance;
|
||||
|
||||
/** 冻结资金 */
|
||||
private BigDecimal freezeBalance;
|
||||
|
||||
/** 版本号 */
|
||||
private Integer version;
|
||||
|
||||
/** 创建时间 */
|
||||
private Timestamp createTime;
|
||||
|
||||
/** 更新时间 */
|
||||
private Timestamp updateTime;
|
||||
|
||||
/** 语言 */
|
||||
private String userLanguage;
|
||||
|
||||
/** 质押资金 */
|
||||
private BigDecimal chipBalance;
|
||||
|
||||
/** 绑定时间 */
|
||||
private Timestamp fatherBindTime;
|
||||
}
|
||||
@@ -1,54 +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.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.sql.Timestamp;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @description /
|
||||
* @author admin
|
||||
* @date 2023-10-30
|
||||
**/
|
||||
@Data
|
||||
public class BotUserFlowDto implements Serializable {
|
||||
|
||||
private Integer id;
|
||||
|
||||
/** 电报号 */
|
||||
private String userTelegramId;
|
||||
|
||||
/** 用户名称 */
|
||||
private String userName;
|
||||
|
||||
/** 业务代码 */
|
||||
private String bizCode;
|
||||
|
||||
/** 变动金额 */
|
||||
private BigDecimal amount;
|
||||
|
||||
/** 变动前金额 */
|
||||
private BigDecimal oldBalance;
|
||||
|
||||
/** 变动后金额 */
|
||||
private BigDecimal newBalance;
|
||||
|
||||
/** 创建时间 */
|
||||
private Timestamp createTime;
|
||||
}
|
||||
@@ -1,40 +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.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.ysk.cashier.annotation.Query;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author admin
|
||||
* @date 2023-10-30
|
||||
**/
|
||||
@Data
|
||||
public class BotUserFlowQueryCriteria{
|
||||
|
||||
/** 精确 */
|
||||
@Query
|
||||
private String userTelegramId;
|
||||
|
||||
/** 精确 */
|
||||
@Query
|
||||
private String userName;
|
||||
|
||||
/** 精确 */
|
||||
@Query
|
||||
private String bizCode;
|
||||
}
|
||||
@@ -1,48 +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.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.ysk.cashier.annotation.Query;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author admin
|
||||
* @date 2023-10-30
|
||||
**/
|
||||
@Data
|
||||
public class BotUserQueryCriteria{
|
||||
|
||||
/** 精确 */
|
||||
@Query
|
||||
private String fatherTelegramId;
|
||||
|
||||
/** 精确 */
|
||||
@Query
|
||||
private String userTelegramId;
|
||||
|
||||
/** 精确 */
|
||||
@Query
|
||||
private String userName;
|
||||
|
||||
/** 精确 */
|
||||
@Query
|
||||
private String userCode;
|
||||
|
||||
/** 精确 */
|
||||
@Query
|
||||
private String botStatus;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package cn.ysk.cashier.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class CouponDto {
|
||||
private Integer shopId;
|
||||
private Integer userId;
|
||||
//-1已过期 1未使用 2已使用
|
||||
private Integer status;
|
||||
private Integer orderId;
|
||||
private BigDecimal amount;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package cn.ysk.cashier.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
@Data
|
||||
public class QueryReceiveDto extends BaseQueryDto{
|
||||
@NotBlank(message = "优惠券id 不可为空")
|
||||
private String couponId;
|
||||
//用户昵称 手机号 模糊
|
||||
private String value;
|
||||
//状态 0 未使用 1 已使用
|
||||
private Integer status;
|
||||
|
||||
private Integer page = 1;
|
||||
|
||||
private Integer size = 10;
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 活动赠送商品表(TbActivateProduct)表查询类
|
||||
* 活动赠送商品表(TbCouponProduct)表查询类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-08-20 11:27:40
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package cn.ysk.cashier.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 优惠券(TbShopCoupon)表查询类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-10-22 15:43:25
|
||||
*/
|
||||
@Data
|
||||
public class TbShopCouponQueryCriteria {
|
||||
private Integer shopId;
|
||||
private Integer type;
|
||||
private long page;
|
||||
private long size;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package cn.ysk.cashier.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* (TbShopShareRecord)表查询类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-11-08 09:17:38
|
||||
*/
|
||||
@Data
|
||||
public class TbShopShareRecordQueryCriteria {
|
||||
|
||||
private Integer shareId;
|
||||
//店铺Id
|
||||
private Integer shopId;
|
||||
//邀请人名称/被邀请人/昵称/手机号 模糊查询
|
||||
private String search;
|
||||
|
||||
//0 非新用户 1 未领取 2 已领取 3 已使用
|
||||
private Integer status;
|
||||
|
||||
private long page = 1;
|
||||
private long size = 10;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package cn.ysk.cashier.dto.order;
|
||||
|
||||
import cn.ysk.cashier.pojo.order.TbCashierCart;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class OrderCartInfoDTO {
|
||||
private BigDecimal totalAmount = BigDecimal.ZERO;
|
||||
private BigDecimal newAddTotalAmount = BigDecimal.ZERO;
|
||||
private List<TbCashierCart> newCashierCarts = new ArrayList<>();
|
||||
private List<TbCashierCart> cashierCarts = new ArrayList<>();
|
||||
private List<Integer> cashierCartIds = new ArrayList<>();
|
||||
private Integer orderId;
|
||||
private TbCashierCart seatCart;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package cn.ysk.cashier.dto.order;
|
||||
|
||||
import cn.ysk.cashier.mybatis.entity.TbActivateOutRecord;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopUser;
|
||||
import cn.ysk.cashier.vo.TbUserCouponVo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class OrderCouponInfoDTO {
|
||||
private TbShopUser shopUser;
|
||||
private List<TbActivateOutRecord> outRecordList = new ArrayList<>();
|
||||
// 满减优惠券
|
||||
private HashMap<Integer, TbUserCouponVo> fullReductionCouponMap = new HashMap<>();
|
||||
// 商品优惠券
|
||||
private HashMap<Integer, TbUserCouponVo> productCouponMap = new HashMap<>();
|
||||
private HashMap<Integer, List<TbUserCouponVo>> couponMap = new HashMap<>();
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package cn.ysk.cashier.dto.order;
|
||||
|
||||
import cn.ysk.cashier.pojo.order.TbOrderDetail;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class OrderPriceDTO {
|
||||
private BigDecimal originAmount = BigDecimal.ZERO;
|
||||
private BigDecimal totalAmount = BigDecimal.ZERO;
|
||||
private BigDecimal packAmount = BigDecimal.ZERO;
|
||||
private boolean hasNewInfo = false;
|
||||
private List<TbOrderDetail> newOrderDetailList = new ArrayList<>();
|
||||
private List<TbOrderDetail> removeOrderDetailList = new ArrayList<>();
|
||||
private List<Integer> removeOrderDetailIds = new ArrayList<>();
|
||||
private List<TbOrderDetail> orderDetailList = new ArrayList<>();
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package cn.ysk.cashier.dto.order;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
|
||||
@Data
|
||||
public class UserCouponInfoDTO {
|
||||
private Integer userCouponId;
|
||||
@Min(1)
|
||||
private Integer num;
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package cn.ysk.cashier.dto.points;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 获取会员可用积分
|
||||
* @author tankaikai
|
||||
* @since 2024-10-26 11:40
|
||||
*/
|
||||
@Data
|
||||
public class OrderDeductionPointsDTO {
|
||||
|
||||
/**
|
||||
* 本单最多可抵扣多少积分
|
||||
*/
|
||||
private Integer maxUsablePoints;
|
||||
/**
|
||||
* 根据策略计算出的最少可以抵扣的金额
|
||||
*/
|
||||
private BigDecimal minDeductionAmount;
|
||||
/**
|
||||
* 根据策略计算出的最多可以抵扣的金额
|
||||
*/
|
||||
private BigDecimal maxDeductionAmount;
|
||||
/**
|
||||
* 下单实付抵扣门槛(实付金额不低于这个值)
|
||||
*/
|
||||
private BigDecimal minPaymentAmount;
|
||||
/**
|
||||
* 下单积分抵扣门槛(每次使用不低于这个值)
|
||||
*/
|
||||
private Integer minDeductionPoints;
|
||||
/**
|
||||
* 会员账户积分
|
||||
*/
|
||||
private Integer accountPoints;
|
||||
/**
|
||||
* 订单金额 (扣除各类折扣)
|
||||
*/
|
||||
private BigDecimal orderAmount;
|
||||
/**
|
||||
* 使用的积分数量
|
||||
*/
|
||||
private Integer usedPoints;
|
||||
/**
|
||||
* 实际抵扣的金额
|
||||
*/
|
||||
private Integer deductionAmount;
|
||||
/**
|
||||
* 下单抵扣积分比例 1元=?积分
|
||||
*/
|
||||
private Integer equivalentPoints;
|
||||
/**
|
||||
* 不可抵扣原因
|
||||
*/
|
||||
private String unusableReason;
|
||||
/**
|
||||
* 是否可用
|
||||
*/
|
||||
private Boolean usable;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package cn.ysk.cashier.dto.product;
|
||||
|
||||
import cn.ysk.cashier.pojo.product.TbProduct;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Pad商品自定义分类
|
||||
*
|
||||
* @author tankaikai
|
||||
* @since 2024-10-22 17:07
|
||||
*/
|
||||
@Data
|
||||
public class PadProductCategoryDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 布局版式id
|
||||
*/
|
||||
private Long padLayoutId;
|
||||
|
||||
/**
|
||||
* 自定义名称
|
||||
*/
|
||||
private String customName;
|
||||
/**
|
||||
* 商品分类id
|
||||
*/
|
||||
private Long productCategoryId;
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String productNames;
|
||||
|
||||
/**
|
||||
* 布局版式代码
|
||||
*/
|
||||
private String padLayoutCode;
|
||||
|
||||
/**
|
||||
* 布局类型
|
||||
*/
|
||||
private String padLayoutName;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String productCategoryName;
|
||||
|
||||
/**
|
||||
* 商品id列表
|
||||
*/
|
||||
private List<Long> productIdList = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 商品列表
|
||||
*/
|
||||
private List<TbProduct> productList = new ArrayList<>();
|
||||
|
||||
}
|
||||
@@ -3,8 +3,6 @@ package cn.ysk.cashier.dto.product;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -39,6 +37,11 @@ public class TbProductGroupDto implements Serializable {
|
||||
|
||||
private String style;
|
||||
|
||||
/**
|
||||
* 排序方式 0-默认; 1-价格从高到低; 2-销量由高到低;
|
||||
*/
|
||||
private String sortMode;
|
||||
|
||||
/** 排序 */
|
||||
private Integer sort;
|
||||
|
||||
|
||||
@@ -15,9 +15,10 @@
|
||||
*/
|
||||
package cn.ysk.cashier.dto.product;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import cn.ysk.cashier.annotation.Query;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
@@ -34,6 +35,12 @@ public class TbProductStockOperateQueryCriteria{
|
||||
@Query(type = Query.Type.BETWEEN)
|
||||
private List<Long> createdAt;
|
||||
|
||||
@Query(type = Query.Type.IN)
|
||||
private List<String> type;
|
||||
|
||||
@Query(type = Query.Type.EQUAL)
|
||||
private String purveyorId;
|
||||
|
||||
private Integer page;
|
||||
|
||||
private Integer size;
|
||||
|
||||
@@ -199,4 +199,7 @@ public class TbShopInfoDto implements Serializable {
|
||||
//程序码(零点八零首页)
|
||||
private String smallQrcode;
|
||||
private String paymentQrcode;
|
||||
|
||||
private Integer isMemberPrice;
|
||||
private String consumeColony;
|
||||
}
|
||||
@@ -29,4 +29,6 @@ public class AddCartDTO {
|
||||
// 用餐类型
|
||||
@NotBlank
|
||||
private String useType;
|
||||
|
||||
private Integer vipUserId;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
package cn.ysk.cashier.dto.shoptable;
|
||||
|
||||
import cn.ysk.cashier.dto.order.UserCouponInfoDTO;
|
||||
import lombok.Data;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class CreateOrderDTO {
|
||||
@@ -17,5 +23,11 @@ public class CreateOrderDTO {
|
||||
private Integer orderId;
|
||||
@NotEmpty
|
||||
private String useType;
|
||||
private String vipUserId;
|
||||
private Integer vipUserId;
|
||||
// 使用的优惠券
|
||||
@Valid
|
||||
private List<UserCouponInfoDTO> userCouponInfos = new ArrayList<>();
|
||||
// 使用的积分抵扣数量
|
||||
private Integer pointsNum;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
package cn.ysk.cashier.dto.shoptable;
|
||||
|
||||
import cn.ysk.cashier.dto.order.UserCouponInfoDTO;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PayDTO {
|
||||
@@ -20,6 +24,13 @@ public class PayDTO {
|
||||
private Double discount;
|
||||
private Integer vipUserId;
|
||||
private String code;
|
||||
|
||||
private String token;
|
||||
// 使用的优惠券
|
||||
@Valid
|
||||
private List<UserCouponInfoDTO> userCouponInfos = new ArrayList<>();
|
||||
// 使用的积分抵扣数量
|
||||
private Integer pointsNum;
|
||||
private Integer staffId;
|
||||
private String loginName;
|
||||
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ public class ShopEatTypeInfoDTO {
|
||||
private boolean isNoneTable;
|
||||
// 是否增加masterId
|
||||
private boolean isIncrMaterId;
|
||||
private boolean isMemberPrice;
|
||||
private TbShopInfo shopInfo;
|
||||
private String useType;
|
||||
private Object shopId;
|
||||
|
||||
@@ -13,7 +13,7 @@ public class UpdateVipDTO {
|
||||
private String tableId;
|
||||
@NotNull
|
||||
private String masterId;
|
||||
|
||||
private Integer orderId;
|
||||
private Integer vipUserId;
|
||||
@NotNull
|
||||
@Range(min = 0, max = 1)
|
||||
|
||||
@@ -1,32 +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.mapper;
|
||||
|
||||
import cn.ysk.cashier.base.BaseMapper;
|
||||
import cn.ysk.cashier.pojo.BotButtonConfig;
|
||||
import cn.ysk.cashier.dto.BotButtonConfigDto;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author admin
|
||||
* @date 2023-10-31
|
||||
**/
|
||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface BotButtonConfigMapper extends BaseMapper<BotButtonConfigDto, BotButtonConfig> {
|
||||
|
||||
}
|
||||
@@ -1,32 +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.mapper;
|
||||
|
||||
import cn.ysk.cashier.base.BaseMapper;
|
||||
import cn.ysk.cashier.pojo.BotConfig;
|
||||
import cn.ysk.cashier.dto.BotConfigDto;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author admin
|
||||
* @date 2023-10-31
|
||||
**/
|
||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface BotConfigMapper extends BaseMapper<BotConfigDto, BotConfig> {
|
||||
|
||||
}
|
||||
@@ -1,32 +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.mapper;
|
||||
|
||||
import cn.ysk.cashier.base.BaseMapper;
|
||||
import cn.ysk.cashier.pojo.BotUserFlow;
|
||||
import cn.ysk.cashier.dto.BotUserFlowDto;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author admin
|
||||
* @date 2023-10-30
|
||||
**/
|
||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface BotUserFlowMapper extends BaseMapper<BotUserFlowDto, BotUserFlow> {
|
||||
|
||||
}
|
||||
@@ -1,32 +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.mapper;
|
||||
|
||||
import cn.ysk.cashier.base.BaseMapper;
|
||||
import cn.ysk.cashier.pojo.BotUser;
|
||||
import cn.ysk.cashier.dto.BotUserDto;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author admin
|
||||
* @date 2023-10-30
|
||||
**/
|
||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface BotUserMapper extends BaseMapper<BotUserDto, BotUser> {
|
||||
|
||||
}
|
||||
@@ -1,32 +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.mapper;
|
||||
|
||||
import cn.ysk.cashier.base.BaseMapper;
|
||||
import cn.ysk.cashier.pojo.TbRenewalsPayLog;
|
||||
import cn.ysk.cashier.dto.TbRenewalsPayLogDto;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2023-11-07
|
||||
**/
|
||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface TbRenewalsPayLogMapper extends BaseMapper<TbRenewalsPayLogDto, TbRenewalsPayLog> {
|
||||
|
||||
}
|
||||
@@ -1,32 +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.mapper.shop;
|
||||
|
||||
import cn.ysk.cashier.base.BaseMapper;
|
||||
import cn.ysk.cashier.pojo.shop.TbMerchantCoupon;
|
||||
import cn.ysk.cashier.dto.shop.TbMerchantCouponDto;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-03-20
|
||||
**/
|
||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface TbMerchantCouponMapper extends BaseMapper<TbMerchantCouponDto, TbMerchantCoupon> {
|
||||
|
||||
}
|
||||
@@ -1,32 +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.mapper.shop;
|
||||
|
||||
import cn.ysk.cashier.base.BaseMapper;
|
||||
import cn.ysk.cashier.pojo.shop.TbReceiptSales;
|
||||
import cn.ysk.cashier.dto.shop.TbReceiptSalesDto;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-08
|
||||
**/
|
||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface TbReceiptSalesMapper extends BaseMapper<TbReceiptSalesDto, TbReceiptSales> {
|
||||
|
||||
}
|
||||
@@ -1,32 +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.mapper.shop;
|
||||
|
||||
import cn.ysk.cashier.base.BaseMapper;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopCashSpread;
|
||||
import cn.ysk.cashier.dto.shop.TbShopCashSpreadDto;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-05
|
||||
**/
|
||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface TbShopCashSpreadMapper extends BaseMapper<TbShopCashSpreadDto, TbShopCashSpread> {
|
||||
|
||||
}
|
||||
@@ -1,32 +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.mapper.shop;
|
||||
|
||||
import cn.ysk.cashier.base.BaseMapper;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopCurrency;
|
||||
import cn.ysk.cashier.dto.shop.TbShopCurrencyDto;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-05
|
||||
**/
|
||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface TbShopCurrencyMapper extends BaseMapper<TbShopCurrencyDto, TbShopCurrency> {
|
||||
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package cn.ysk.cashier.mybatis.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tb_activate")
|
||||
public class Activate extends Model<Activate> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
private Integer shopId;
|
||||
private Integer minNum;
|
||||
private Integer maxNum;
|
||||
private BigDecimal handselNum;
|
||||
private String handselType;
|
||||
private String isDel;
|
||||
//是否赠送商品 0否 1是
|
||||
private Integer isGiftPro;
|
||||
@TableField(exist = false)
|
||||
private List<TbActivateProduct> products;
|
||||
}
|
||||
@@ -1,44 +1,127 @@
|
||||
package cn.ysk.cashier.mybatis.entity;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class TbActivate extends Model<TbActivate> {
|
||||
|
||||
@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;
|
||||
//充值金额
|
||||
private Integer amount;
|
||||
//赠送金额
|
||||
private Integer giftAmount;
|
||||
//赠送积分
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private Integer giftPoints;
|
||||
//是否使用优惠卷 0否 1是
|
||||
private Integer isUseCoupon;
|
||||
//优惠卷id
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private Integer couponId;
|
||||
@TableField(exist = false)
|
||||
private String couponName;
|
||||
//优惠卷数量
|
||||
private Integer num;
|
||||
|
||||
@Column(name = "min_num")
|
||||
private Integer minNum;
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
@Column(name = "max_num")
|
||||
private Integer maxNum;
|
||||
|
||||
@Column(name = "handsel_num", precision = 10, scale = 2)
|
||||
private BigDecimal handselNum;
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Size(max = 20)
|
||||
@Column(name = "handsel_type", length = 20)
|
||||
private String handselType;
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Size(max = 20)
|
||||
@Column(name = "is_del", length = 20)
|
||||
private String isDel;
|
||||
public Integer getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
@Size(max = 255)
|
||||
@Column(name = "is_user")
|
||||
private String isUser;
|
||||
public void setShopId(Integer shopId) {
|
||||
this.shopId = shopId;
|
||||
}
|
||||
|
||||
public Integer getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(Integer amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public Integer getGiftAmount() {
|
||||
return giftAmount;
|
||||
}
|
||||
|
||||
public void setGiftAmount(Integer giftAmount) {
|
||||
this.giftAmount = giftAmount;
|
||||
}
|
||||
|
||||
public Integer getIsUseCoupon() {
|
||||
return isUseCoupon;
|
||||
}
|
||||
|
||||
public void setIsUseCoupon(Integer isUseCoupon) {
|
||||
this.isUseCoupon = isUseCoupon;
|
||||
}
|
||||
|
||||
public Integer getCouponId() {
|
||||
return couponId;
|
||||
}
|
||||
|
||||
public void setCouponId(Integer couponId) {
|
||||
this.couponId = couponId;
|
||||
}
|
||||
|
||||
public String getCouponName() {
|
||||
return couponName;
|
||||
}
|
||||
|
||||
public void setCouponName(String couponName) {
|
||||
this.couponName = couponName;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public Integer getGiftPoints() {
|
||||
return giftPoints;
|
||||
}
|
||||
|
||||
public void setGiftPoints(Integer giftPoints) {
|
||||
this.giftPoints = giftPoints;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,25 +1,40 @@
|
||||
package cn.ysk.cashier.mybatis.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 活动商品赠送表(TbActivateInRecord)表实体类
|
||||
* 活动商品赠送记录表(TbActivateInRecord)表实体类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-08-22 14:50:16
|
||||
* @since 2024-11-08 09:53:21
|
||||
*/
|
||||
@Data
|
||||
@SuppressWarnings("serial")
|
||||
public class TbActivateInRecord extends Model<TbActivateInRecord> {
|
||||
|
||||
private Integer id;
|
||||
//会员id
|
||||
private Integer vipUserId;
|
||||
//卷Id (校验是否可用)
|
||||
private Integer couponId;
|
||||
//卷描述 满10减2/商品卷
|
||||
private String name;
|
||||
//1-满减 2-商品
|
||||
private Integer type;
|
||||
//商品id
|
||||
private Integer proId;
|
||||
//满多少金额
|
||||
private BigDecimal fullAmount;
|
||||
//减多少金额
|
||||
private BigDecimal discountAmount;
|
||||
//赠送数量
|
||||
private Integer num;
|
||||
//未使用数量
|
||||
@@ -30,90 +45,17 @@ public class TbActivateInRecord extends Model<TbActivateInRecord> {
|
||||
private Integer sourceActId;
|
||||
|
||||
private Integer sourceFlowId;
|
||||
|
||||
//可用开始时间
|
||||
private Date useStartTime;
|
||||
//可用结束时间
|
||||
private Date useEndTime;
|
||||
@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 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;
|
||||
}
|
||||
private String couponJson;
|
||||
//invited/activate
|
||||
private String source;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ 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;
|
||||
@@ -10,27 +12,32 @@ import java.io.Serializable;
|
||||
* 活动赠送商品使用记录表(TbActivateOutRecord)表实体类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-08-22 14:53:52
|
||||
* @since 2024-10-23 09:50:40
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class TbActivateOutRecord extends Model<TbActivateOutRecord> {
|
||||
|
||||
private Integer id;
|
||||
//商品赠送Id
|
||||
|
||||
private Integer shopId;
|
||||
//订单id
|
||||
private String orderId;
|
||||
//商品赠送Id tb_activate_in_record的id
|
||||
private Integer giveId;
|
||||
//商品id
|
||||
private Integer proId;
|
||||
//未使用数量
|
||||
//会员id
|
||||
private Integer vipUserId;
|
||||
//1-满减 2-商品
|
||||
private Integer type;
|
||||
//使用数量
|
||||
private Integer useNum;
|
||||
//退单量
|
||||
private Integer refNum;
|
||||
//订单id
|
||||
private String orderId;
|
||||
//新建: create, 完成: closed, 取消:cancel,
|
||||
private String status;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
@@ -42,6 +49,22 @@ public class TbActivateOutRecord extends Model<TbActivateOutRecord> {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
public void setShopId(Integer shopId) {
|
||||
this.shopId = shopId;
|
||||
}
|
||||
|
||||
public String getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(String orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Integer getGiveId() {
|
||||
return giveId;
|
||||
}
|
||||
@@ -50,12 +73,20 @@ public class TbActivateOutRecord extends Model<TbActivateOutRecord> {
|
||||
this.giveId = giveId;
|
||||
}
|
||||
|
||||
public Integer getProId() {
|
||||
return proId;
|
||||
public Integer getVipUserId() {
|
||||
return vipUserId;
|
||||
}
|
||||
|
||||
public void setProId(Integer proId) {
|
||||
this.proId = proId;
|
||||
public void setVipUserId(Integer vipUserId) {
|
||||
this.vipUserId = vipUserId;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Integer getUseNum() {
|
||||
@@ -74,14 +105,6 @@ public class TbActivateOutRecord extends Model<TbActivateOutRecord> {
|
||||
this.refNum = refNum;
|
||||
}
|
||||
|
||||
public String getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(String orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
package cn.ysk.cashier.mybatis.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 活动赠送商品表(TbActivateProduct)表实体类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-08-20 11:27:40
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class TbActivateProduct extends Model<TbActivateProduct> {
|
||||
|
||||
private Integer id;
|
||||
//活动Id
|
||||
private Integer activateId;
|
||||
//商品id
|
||||
private Integer productId;
|
||||
//数量
|
||||
private Integer num;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getActivateId() {
|
||||
return activateId;
|
||||
}
|
||||
|
||||
public void setActivateId(Integer activateId) {
|
||||
this.activateId = activateId;
|
||||
}
|
||||
|
||||
public Integer getProductId() {
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setProductId(Integer productId) {
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public Integer getNum() {
|
||||
return num;
|
||||
}
|
||||
|
||||
public void setNum(Integer num) {
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
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 lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 活动赠送商品表(TbActivateProduct)表实体类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-08-20 11:27:40
|
||||
*/
|
||||
@Data
|
||||
@SuppressWarnings("serial")
|
||||
public class TbCouponProduct extends Model<TbCouponProduct> {
|
||||
private Integer id;
|
||||
//活动Id
|
||||
private Integer couponId;
|
||||
//商品id
|
||||
private Integer productId;
|
||||
//数量
|
||||
private Integer num;
|
||||
@TableField(exist = false)
|
||||
private String name;
|
||||
@TableField(exist = false)
|
||||
private String coverImg;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
package cn.ysk.cashier.mybatis.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 会员积分
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
@TableName("tb_shop_user")
|
||||
public class TbMemberPoints {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
/**
|
||||
* 会员id
|
||||
*/
|
||||
@TableField(value = "id", insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
|
||||
private Long memberId;
|
||||
/**
|
||||
* 会员名称
|
||||
*/
|
||||
@TableField("name")
|
||||
private String memberName;
|
||||
/**
|
||||
* 会员头像
|
||||
*/
|
||||
@TableField("head_img")
|
||||
private String avatarUrl;
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@TableField("telephone")
|
||||
private String mobile;
|
||||
/**
|
||||
* 账户积分
|
||||
*/
|
||||
@TableField("account_points")
|
||||
private Integer accountPoints;
|
||||
/**
|
||||
* 最近一次积分变动时间
|
||||
*/
|
||||
@TableField("last_points_change_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date lastPointsChangeTime;
|
||||
/**
|
||||
* 最近一次浮动积分
|
||||
*/
|
||||
@TableField("last_float_points")
|
||||
private Integer lastFloatPoints;
|
||||
/**
|
||||
* 是否会员 1-是 0-否
|
||||
*/
|
||||
@TableField("is_vip")
|
||||
private Integer vip;
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package cn.ysk.cashier.mybatis.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 会员积分变动记录
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
@TableName("tb_member_points_log")
|
||||
public class TbMemberPointsLog {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
/**
|
||||
* 会员id
|
||||
*/
|
||||
private Long memberId;
|
||||
/**
|
||||
* 会员名称
|
||||
*/
|
||||
private String memberName;
|
||||
/**
|
||||
* 会员头像
|
||||
*/
|
||||
private String avatarUrl;
|
||||
/**
|
||||
* 摘要信息(如:兑换某个商品/消费多少钱/充值多少钱/新会员赠送积分等)
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String mobile;
|
||||
/**
|
||||
* 浮动类型 add-累加 subtract-扣减
|
||||
*/
|
||||
private String floatType;
|
||||
/**
|
||||
* 浮动积分(非0正负数)
|
||||
*/
|
||||
private Integer floatPoints;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package cn.ysk.cashier.mybatis.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 积分基本设置
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
@TableName("tb_points_basic_setting")
|
||||
public class TbPointsBasicSetting {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
/**
|
||||
* 开启消费赠送积分 1-开启 0-关闭
|
||||
*/
|
||||
private Integer enableRewards;
|
||||
/**
|
||||
* 赠积分适用群体 all-全部 vip-仅会员
|
||||
*/
|
||||
private String rewardsGroup;
|
||||
/**
|
||||
* 每消费xx元赠送1积分
|
||||
*/
|
||||
private BigDecimal consumeAmount;
|
||||
/**
|
||||
* 开启下单积分抵扣 1-开启 0-关闭
|
||||
*/
|
||||
private Integer enableDeduction;
|
||||
/**
|
||||
* 抵扣适用群体 all-全部 vip-仅会员
|
||||
*/
|
||||
private String deductionGroup;
|
||||
/**
|
||||
* 下单实付抵扣门槛
|
||||
*/
|
||||
private BigDecimal minPaymentAmount;
|
||||
/**
|
||||
* 下单最高抵扣比例
|
||||
*/
|
||||
private BigDecimal maxDeductionRatio;
|
||||
/**
|
||||
* 下单抵扣积分比例 1元=?积分
|
||||
*/
|
||||
private Integer equivalentPoints;
|
||||
/**
|
||||
* 开启积分商城 1-开启 0-关闭
|
||||
*/
|
||||
private Integer enablePointsMall;
|
||||
/**
|
||||
* 浏览模式 list-列表 grid-宫格
|
||||
*/
|
||||
private String browseMode;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
package cn.ysk.cashier.mybatis.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 积分兑换记录
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("tb_points_exchange_record")
|
||||
public class TbPointsExchangeRecord {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
/**
|
||||
* 积分商品id
|
||||
*/
|
||||
private Long pointsGoodsId;
|
||||
/**
|
||||
* 积分商品名称
|
||||
*/
|
||||
private String pointsGoodsName;
|
||||
/**
|
||||
* 商品图片URL
|
||||
*/
|
||||
private String goodsImageUrl;
|
||||
/**
|
||||
* 领取方式 self-自取 post-邮寄
|
||||
*/
|
||||
private String pickupMethod;
|
||||
/**
|
||||
* 会员id
|
||||
*/
|
||||
private Long memberId;
|
||||
/**
|
||||
* 会员名称
|
||||
*/
|
||||
private String memberName;
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String mobile;
|
||||
/**
|
||||
* 会员头像
|
||||
*/
|
||||
private String avatarUrl;
|
||||
/**
|
||||
* 消耗积分
|
||||
*/
|
||||
private Integer spendPoints;
|
||||
/**
|
||||
* 额外支付
|
||||
*/
|
||||
private BigDecimal extraPaymentAmount;
|
||||
/**
|
||||
* 兑换券券码
|
||||
*/
|
||||
private String couponCode;
|
||||
/**
|
||||
* 支付平台订单号
|
||||
*/
|
||||
private String payOrderId;
|
||||
/**
|
||||
* 渠道订单号(微信/支付宝订单号)
|
||||
*/
|
||||
private String channelTradeNo;
|
||||
/**
|
||||
* 支付方式 积分支付/积分+微信/积分+支付宝
|
||||
*/
|
||||
private String payMethod;
|
||||
/**
|
||||
* 支付类型 POINTS-积分 WECHAT-微信 ALIPAY-支付宝 UNIONPAY-银联云闪付
|
||||
*/
|
||||
private String payType;
|
||||
/**
|
||||
* 状态 unpaid-待支付 waiting-待自取 done-已完成 cancel-已取消
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 取消/退款原因
|
||||
*/
|
||||
private String cancelOrRefundReason;
|
||||
/**
|
||||
* 取消/退款时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date cancelOrRefundTime;
|
||||
/**
|
||||
* 实际支付时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date payTime;
|
||||
/**
|
||||
* 创建时间(下单时间)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间(核销时间)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(value = "count(*)", select = false, insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
|
||||
private Long count;
|
||||
|
||||
@TableField(value = "sum(extra_payment_amount)", select = false, insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 用户ip
|
||||
*/
|
||||
@JsonIgnore
|
||||
@TableField(exist = false)
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 微信openId/支付完userId
|
||||
*/
|
||||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||
@TableField(exist = false)
|
||||
private String openId;
|
||||
|
||||
/**
|
||||
* 拉起支付所需信息
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String payInfo;
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package cn.ysk.cashier.mybatis.entity;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 积分商品设置
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("tb_points_goods_setting")
|
||||
public class TbPointsGoodsSetting {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
/**
|
||||
* 商品类型 physical-实物 coupon-优惠劵
|
||||
*/
|
||||
private String goodsCategory;
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String goodsName;
|
||||
/**
|
||||
* 商品图片URL
|
||||
*/
|
||||
@TableField(value = "goods_image_url", updateStrategy = FieldStrategy.ALWAYS)
|
||||
private String goodsImageUrl;
|
||||
/**
|
||||
* 所需积分
|
||||
*/
|
||||
private Integer requiredPoints;
|
||||
/**
|
||||
* 额外价格
|
||||
*/
|
||||
private BigDecimal extraPrice;
|
||||
/**
|
||||
* 排序(权重),数字越高,显示约靠前
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer quantity;
|
||||
/**
|
||||
* 商品详情
|
||||
*/
|
||||
@TableField(value = "goods_description", updateStrategy = FieldStrategy.ALWAYS)
|
||||
private String goodsDescription;
|
||||
/**
|
||||
* 累计兑换数量
|
||||
*/
|
||||
private Integer totalExchangeCount;
|
||||
/**
|
||||
* 是否上架 1-是 0-否
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 逻辑删除标志 1-是 0-否
|
||||
*/
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,254 @@
|
||||
package cn.ysk.cashier.mybatis.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalTime;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 优惠券(TbShopCoupon)表实体类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-10-24 13:54:34
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class TbShopCoupon extends Model<TbShopCoupon> {
|
||||
//自增
|
||||
private Integer id;
|
||||
|
||||
private String shopId;
|
||||
//名称(无意义)
|
||||
private String title;
|
||||
//1-满减 2-商品
|
||||
private Integer type;
|
||||
//满多少金额
|
||||
private BigDecimal fullAmount;
|
||||
//减多少金额
|
||||
private BigDecimal discountAmount;
|
||||
//描述
|
||||
private String description;
|
||||
//发放数量
|
||||
private Integer number;
|
||||
//剩余数量
|
||||
private Integer leftNumber;
|
||||
//有效期类型,可选值为 fixed(固定时间)/custom(自定义时间)
|
||||
private String validityType;
|
||||
//有效天数
|
||||
private Integer validDays;
|
||||
//隔多少天生效
|
||||
private Integer daysToTakeEffect;
|
||||
//有效开始时间
|
||||
private Date validStartTime;
|
||||
//有效结束时间
|
||||
private Date validEndTime;
|
||||
//周 数组["周一","周二"]
|
||||
private String userDays;
|
||||
//all-全时段 custom-指定时段
|
||||
private String useTimeType;
|
||||
//可用开始时间
|
||||
private LocalTime useStartTime;
|
||||
//可用结束时间
|
||||
private LocalTime useEndTime;
|
||||
//已使用数量
|
||||
private Integer useNumber;
|
||||
//发放人
|
||||
private String editor;
|
||||
//状态0-关闭 1 正常
|
||||
private Integer status;
|
||||
|
||||
@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 String getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
public void setShopId(String shopId) {
|
||||
this.shopId = shopId;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public BigDecimal getFullAmount() {
|
||||
return fullAmount;
|
||||
}
|
||||
|
||||
public void setFullAmount(BigDecimal fullAmount) {
|
||||
this.fullAmount = fullAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getDiscountAmount() {
|
||||
return discountAmount;
|
||||
}
|
||||
|
||||
public void setDiscountAmount(BigDecimal discountAmount) {
|
||||
this.discountAmount = discountAmount;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Integer getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(Integer number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public Integer getLeftNumber() {
|
||||
return leftNumber;
|
||||
}
|
||||
|
||||
public void setLeftNumber(Integer leftNumber) {
|
||||
this.leftNumber = leftNumber;
|
||||
}
|
||||
|
||||
public String getValidityType() {
|
||||
return validityType;
|
||||
}
|
||||
|
||||
public void setValidityType(String validityType) {
|
||||
this.validityType = validityType;
|
||||
}
|
||||
|
||||
public Integer getValidDays() {
|
||||
return validDays;
|
||||
}
|
||||
|
||||
public void setValidDays(Integer validDays) {
|
||||
this.validDays = validDays;
|
||||
}
|
||||
|
||||
public Integer getDaysToTakeEffect() {
|
||||
return daysToTakeEffect;
|
||||
}
|
||||
|
||||
public void setDaysToTakeEffect(Integer daysToTakeEffect) {
|
||||
this.daysToTakeEffect = daysToTakeEffect;
|
||||
}
|
||||
|
||||
public Date getValidStartTime() {
|
||||
return validStartTime;
|
||||
}
|
||||
|
||||
public void setValidStartTime(Date validStartTime) {
|
||||
this.validStartTime = validStartTime;
|
||||
}
|
||||
|
||||
public Date getValidEndTime() {
|
||||
return validEndTime;
|
||||
}
|
||||
|
||||
public void setValidEndTime(Date validEndTime) {
|
||||
this.validEndTime = validEndTime;
|
||||
}
|
||||
|
||||
public String getUserDays() {
|
||||
return userDays;
|
||||
}
|
||||
|
||||
public void setUserDays(String userDays) {
|
||||
this.userDays = userDays;
|
||||
}
|
||||
|
||||
public String getUseTimeType() {
|
||||
return useTimeType;
|
||||
}
|
||||
|
||||
public void setUseTimeType(String useTimeType) {
|
||||
this.useTimeType = useTimeType;
|
||||
}
|
||||
|
||||
public LocalTime getUseStartTime() {
|
||||
return useStartTime;
|
||||
}
|
||||
|
||||
public void setUseStartTime(LocalTime useStartTime) {
|
||||
this.useStartTime = useStartTime;
|
||||
}
|
||||
|
||||
public LocalTime getUseEndTime() {
|
||||
return useEndTime;
|
||||
}
|
||||
|
||||
public void setUseEndTime(LocalTime useEndTime) {
|
||||
this.useEndTime = useEndTime;
|
||||
}
|
||||
|
||||
public Integer getUseNumber() {
|
||||
return useNumber;
|
||||
}
|
||||
|
||||
public void setUseNumber(Integer useNumber) {
|
||||
this.useNumber = useNumber;
|
||||
}
|
||||
|
||||
public String getEditor() {
|
||||
return editor;
|
||||
}
|
||||
|
||||
public void setEditor(String editor) {
|
||||
this.editor = editor;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,6 +150,12 @@ public class TbShopExtend extends Model<TbShopExtend> {
|
||||
this.value = "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/shopDetails/topBanner.png";
|
||||
this.title = "商品列表";
|
||||
break;
|
||||
case "ticket_logo":
|
||||
this.name = "小票logo图";
|
||||
this.detail="建议尺寸: 417*139";
|
||||
this.value = "https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/20241022/eeee8e85c66947e5bcaebf687381b5d6.png";
|
||||
this.title = "小票logo";
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.type="img";
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
package cn.ysk.cashier.mybatis.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.ysk.cashier.utils.JSONUtil;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店铺分享(TbShopShare)表实体类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-11-06 15:47:37
|
||||
*/
|
||||
@Data
|
||||
@SuppressWarnings("serial")
|
||||
public class TbShopShare extends Model<TbShopShare> {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
//店铺Id
|
||||
private Integer shopId;
|
||||
//标题
|
||||
private String title;
|
||||
//分享封面图
|
||||
private String shareImg;
|
||||
//邀请顶部图
|
||||
private String invitedImg;
|
||||
//被邀顶部图
|
||||
private String beInvitedImg;
|
||||
//活动开始时间
|
||||
private Date startTime;
|
||||
//活动结束时间
|
||||
private Date endTime;
|
||||
//新用户获得券
|
||||
private String newCoupon;
|
||||
//邀请num人数 可获奖励券
|
||||
private Integer invitedNum;
|
||||
//奖励券
|
||||
private String rewardCoupon;
|
||||
//获取方法 get-新用户领取获得 use-新用户使用获得
|
||||
private String getMethod;
|
||||
|
||||
private Integer status;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ShareCoupons> newCoupons;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ShareCoupons> rewardCoupons;
|
||||
|
||||
public void setNewCoupon(String newCoupon) {
|
||||
this.newCoupon = newCoupon;
|
||||
if(StringUtils.isNotBlank(newCoupon)){
|
||||
this.newCoupons = JSONUtil.parseJSONStrTList(newCoupon,ShareCoupons.class);
|
||||
}
|
||||
}
|
||||
|
||||
public void setRewardCoupon(String rewardCoupon) {
|
||||
this.rewardCoupon = rewardCoupon;
|
||||
if(StringUtils.isNotBlank(rewardCoupon)){
|
||||
this.rewardCoupons = JSONUtil.parseJSONStrTList(rewardCoupon,ShareCoupons.class);
|
||||
}
|
||||
}
|
||||
|
||||
public void setNewCoupons(List<ShareCoupons> newCoupons) {
|
||||
this.newCoupons = newCoupons;
|
||||
if(CollectionUtil.isNotEmpty(newCoupons)){
|
||||
this.newCoupon = JSONUtil.toJSONString(newCoupons);
|
||||
}
|
||||
}
|
||||
|
||||
public void setRewardCoupons(List<ShareCoupons> rewardCoupons) {
|
||||
this.rewardCoupons = rewardCoupons;
|
||||
if(CollectionUtil.isNotEmpty(rewardCoupons)){
|
||||
this.rewardCoupon = JSONUtil.toJSONString(rewardCoupons);
|
||||
}
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class ShareCoupons {
|
||||
//优惠券Id
|
||||
private Integer couponId;
|
||||
//优惠券名称
|
||||
private String couponName;
|
||||
//优惠券数量
|
||||
private Integer couponNum;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package cn.ysk.cashier.mybatis.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* (TbShopShareRecord)表实体类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-11-08 09:17:37
|
||||
*/
|
||||
@Data
|
||||
@SuppressWarnings("serial")
|
||||
public class TbShopShareRecord extends Model<TbShopShareRecord> {
|
||||
|
||||
private Integer id;
|
||||
//tb_shop_share 主键Id
|
||||
private Integer shareId;
|
||||
//店铺Id
|
||||
private Integer shopId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String invitedHeadImg;
|
||||
//邀请人id
|
||||
private Integer invitedId;
|
||||
//邀请人名称
|
||||
private String invitedName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String beInvitedHeadImg;
|
||||
//被邀请人Id
|
||||
private Integer beInvitedId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String beInvitedName;
|
||||
//奖励券获得方式 get/use 领取获得/使用获得
|
||||
private String method;
|
||||
//0 非新用户 1 未领取 2 已领取 3 已使用
|
||||
private Integer status;
|
||||
//生效时间/获得奖励的时间
|
||||
private Date rewardTime;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
package cn.ysk.cashier.mybatis.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tb_user_storage")
|
||||
public class TbUserStorage extends Model<TbUserStorage> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id; // 记录ID
|
||||
private Integer userId; // 用户ID
|
||||
private String shopId; // 用户ID
|
||||
private Integer productId;
|
||||
private Integer num;
|
||||
private Integer outNum;
|
||||
private Integer inNum;
|
||||
private Date createTime;
|
||||
private String account;
|
||||
private String unit;
|
||||
private String productName;
|
||||
private Integer skuId;
|
||||
private String skuName;
|
||||
private String imgUrl;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import cn.ysk.cashier.mybatis.entity.Activate;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
public interface ActivateMapper extends BaseMapper<Activate> {
|
||||
|
||||
|
||||
}
|
||||
@@ -15,7 +15,7 @@ public interface ShopUserMapper extends BaseMapper<TbShopUser> {
|
||||
@Select("<script>" +
|
||||
"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, 0 as totalScore, su.telephone as telephone, u.last_log_in_at as lastLoginAt, " +
|
||||
"su.birth_day as birthDay, su.is_vip as isVip, su.created_at as createAt " +
|
||||
"su.birth_day as birthDay, su.is_vip as isVip, su.created_at as createAt, su.account_points as accountPoints, su.last_points_change_time as lastPointsChangeTime, su.last_float_points as lastFloatPoints " +
|
||||
"FROM tb_shop_user su " +
|
||||
"left join tb_user_info u on u.id = su.user_id " +
|
||||
"<where> " +
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import cn.ysk.cashier.vo.TbUserCouponVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import cn.ysk.cashier.mybatis.entity.TbActivateInRecord;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 活动商品赠送表(TbActivateInRecord)表数据库访问层
|
||||
@@ -11,5 +17,47 @@ import cn.ysk.cashier.mybatis.entity.TbActivateInRecord;
|
||||
*/
|
||||
public interface TbActivateInRecordMapper extends BaseMapper<TbActivateInRecord> {
|
||||
|
||||
@Select("SELECT" +
|
||||
" pro.cover_img as productCover, " +
|
||||
" pro.name as productName, " +
|
||||
" inRecord.id as id," +
|
||||
" inRecord.full_amount as fullAmount," +
|
||||
" inRecord.discount_amount as discountAmount," +
|
||||
" inRecord.coupon_id as couponId," +
|
||||
" pro.id as proId," +
|
||||
" CASE" +
|
||||
" WHEN inRecord.type = 1 THEN inRecord.NAME" +
|
||||
" WHEN inRecord.type = 2 THEN pro.NAME" +
|
||||
" END AS `name`," +
|
||||
" inRecord.type," +
|
||||
" inRecord.over_num as num," +
|
||||
" inRecord.use_end_time as endTime" +
|
||||
" FROM" +
|
||||
" tb_activate_in_record inRecord" +
|
||||
" LEFT JOIN tb_product pro ON inRecord.pro_id = pro.id and pro.shop_id = #{shopId}" +
|
||||
" WHERE" +
|
||||
" inRecord.vip_user_id = #{vipUserId}" +
|
||||
" and inRecord.shop_id = #{shopId}" +
|
||||
" and inRecord.over_num != 0" +
|
||||
" and inRecord.use_start_time < now()" +
|
||||
" and inRecord.use_end_time > now()" +
|
||||
" order by inRecord.use_end_time asc")
|
||||
List<TbUserCouponVo> queryByVipIdAndShopId(@Param("vipUserId") Integer vipUserId, @Param("shopId") Integer shopId);
|
||||
|
||||
@Select("SELECT sum( over_num ) from tb_activate_in_record" +
|
||||
" where coupon_id = #{couponId} " +
|
||||
" and now() < use_end_time group by coupon_id ")
|
||||
Integer countNoUseCoupon(@Param("couponId") Integer couponId);
|
||||
|
||||
|
||||
@Update("update tb_activate_in_record" +
|
||||
" set over_num = #{overNum}" +
|
||||
" where id = #{id}")
|
||||
int updateOverNum(@Param("id") Integer id, @Param("overNum") Integer overNum);
|
||||
|
||||
@Update("update tb_activate_in_record" +
|
||||
" set over_num = over_num-#{overNum}" +
|
||||
" where id = #{id} and over_num-#{overNum} >= 0")
|
||||
int decrOverNum(@Param("id") Integer id, @Param("overNum") Integer decrOverNum);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import cn.ysk.cashier.dto.shop.TbShopUserQueryCriteria;
|
||||
import cn.ysk.cashier.mybatis.entity.TbActivate;
|
||||
import cn.ysk.cashier.vo.ShopUserInfoVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
@@ -11,6 +19,15 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface TbActivateMapper extends BaseMapper<TbActivate> {
|
||||
|
||||
|
||||
@Select("<script>" +
|
||||
"SELECT " +
|
||||
" * " +
|
||||
"FROM tb_activate act " +
|
||||
"where " +
|
||||
" act.coupon_id=#{couponId}" +
|
||||
"</script>")
|
||||
List<TbActivate> queActByCouponId(@Param("couponId") Integer couponId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@ package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import cn.ysk.cashier.mybatis.entity.TbActivateOutRecord;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
/**
|
||||
* 活动赠送商品使用记录表(TbActivateOutRecord)表数据库访问层
|
||||
@@ -11,5 +14,9 @@ import cn.ysk.cashier.mybatis.entity.TbActivateOutRecord;
|
||||
*/
|
||||
public interface TbActivateOutRecordMapper extends BaseMapper<TbActivateOutRecord> {
|
||||
|
||||
@Update("update tb_activate_out_record" +
|
||||
" set ref_num = ref_num + #{refNum}" +
|
||||
" where id = #{id}")
|
||||
int updateRefNum(@Param("id") Integer id, @Param("refNum") Integer refNum);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import cn.ysk.cashier.mybatis.entity.TbActivateProduct;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 活动赠送商品表(TbActivateProduct)表数据库访问层
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-08-20 11:27:40
|
||||
*/
|
||||
public interface TbActivateProductMapper extends BaseMapper<TbActivateProduct> {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import cn.ysk.cashier.mybatis.entity.TbCouponProduct;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 活动赠送商品表(TbActivateProduct)表数据库访问层
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-08-20 11:27:40
|
||||
*/
|
||||
public interface TbCouponProductMapper extends BaseMapper<TbCouponProduct> {
|
||||
|
||||
|
||||
@Select(" select " +
|
||||
" *" +
|
||||
" from tb_coupon_product " +
|
||||
" where " +
|
||||
" coupon_id = #{couponId}")
|
||||
List<TbCouponProduct> queryAllByCouponId(@Param("couponId") Integer couponId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import cn.ysk.cashier.mybatis.entity.TbMemberPointsLog;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 会员积分变动记录
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@Mapper
|
||||
public interface TbMemberPointsLogMapper extends BaseMapper<TbMemberPointsLog> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import cn.ysk.cashier.mybatis.entity.TbMemberPoints;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 会员积分
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@Mapper
|
||||
public interface TbMemberPointsMapper extends BaseMapper<TbMemberPoints> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import cn.ysk.cashier.pojo.product.TbPadLayout;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* Pad商品布局版式
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 2.0 2024-10-22
|
||||
*/
|
||||
@Mapper
|
||||
public interface TbPadLayoutMapper extends BaseMapper<TbPadLayout> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import cn.ysk.cashier.pojo.product.TbPadProductCategoryDetail;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* Pad商品自定义分类明细
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 2.0 2024-10-22
|
||||
*/
|
||||
@Mapper
|
||||
public interface TbPadProductCategoryDetailMapper extends BaseMapper<TbPadProductCategoryDetail> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import cn.ysk.cashier.dto.product.PadProductCategoryDTO;
|
||||
import cn.ysk.cashier.pojo.product.TbPadProductCategory;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Pad商品自定义分类
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 2.0 2024-10-22
|
||||
*/
|
||||
@Mapper
|
||||
public interface TbPadProductCategoryMapper extends BaseMapper<TbPadProductCategory> {
|
||||
|
||||
List<PadProductCategoryDTO> findList(Map<String, Object> params);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import cn.ysk.cashier.mybatis.entity.TbPointsBasicSetting;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 积分基本设置
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@Mapper
|
||||
public interface TbPointsBasicSettingMapper extends BaseMapper<TbPointsBasicSetting> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import cn.ysk.cashier.mybatis.entity.TbPointsExchangeRecord;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 积分兑换记录
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@Mapper
|
||||
public interface TbPointsExchangeRecordMapper extends BaseMapper<TbPointsExchangeRecord> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import cn.ysk.cashier.mybatis.entity.TbPointsGoodsSetting;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 积分商品设置
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 2.0 2024-10-25
|
||||
*/
|
||||
@Mapper
|
||||
public interface TbPointsGoodsSettingMapper extends BaseMapper<TbPointsGoodsSetting> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import cn.ysk.cashier.dto.QueryReceiveDto;
|
||||
import cn.ysk.cashier.pojo.shop.TbFullShopId;
|
||||
import cn.ysk.cashier.vo.QueryReceiveVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import cn.ysk.cashier.mybatis.entity.TbShopCoupon;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 优惠券(TbShopCoupon)表数据库访问层
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-10-22 15:43:25
|
||||
*/
|
||||
public interface TbShopCouponMapper extends BaseMapper<TbShopCoupon> {
|
||||
|
||||
@Select("<script>" +
|
||||
" SELECT" +
|
||||
" record.id, " +
|
||||
" vip.id as userId ," +
|
||||
" vip.`name`," +
|
||||
" vip.telephone as phone," +
|
||||
" record.create_time as receiveTime," +
|
||||
" record.update_time as useTime, " +
|
||||
" record.num ," +
|
||||
" record.over_num as overNum," +
|
||||
" record.source as source" +
|
||||
" FROM" +
|
||||
" tb_activate_in_record record" +
|
||||
" LEFT JOIN tb_shop_user vip " +
|
||||
" ON record.vip_user_id = vip.id AND vip.shop_id = #{param.shopId} " +
|
||||
" WHERE" +
|
||||
" record.coupon_id = #{param.couponId} " +
|
||||
" and record.shop_id = #{param.shopId} " +
|
||||
" <if test=\"param.value != null and param.value != '' \">" +
|
||||
" and (vip.name like concat('%', #{param.value}, '%') or vip.telephone like concat('%', #{param.value}, '%')) " +
|
||||
" </if>" +
|
||||
" <if test=\"param.status != null and param.status == 1\">" +
|
||||
" and record.over_num != record.num " +
|
||||
" </if>" +
|
||||
" <if test=\"param.status != null and param.status == 0\">" +
|
||||
" and record.over_num = record.num " +
|
||||
" </if>" +
|
||||
" <if test=\"param.startTime != null \">" +
|
||||
" and record.create_time > #{param.startTime} " +
|
||||
" </if>" +
|
||||
" <if test=\"param.endTime != null \">" +
|
||||
" and record.create_time < #{param.endTime} " +
|
||||
" </if>" +
|
||||
" order by record.create_time desc" +
|
||||
"</script>")
|
||||
Page<QueryReceiveVo> queryReceive(QueryReceiveDto param ,Page<QueryReceiveVo> page);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import cn.ysk.cashier.mybatis.entity.TbShopShare;
|
||||
|
||||
/**
|
||||
* 店铺分享(TbShopShare)表数据库访问层
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-11-06 15:47:37
|
||||
*/
|
||||
public interface TbShopShareMapper extends BaseMapper<TbShopShare> {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package cn.ysk.cashier.mybatis.mapper;
|
||||
|
||||
import cn.ysk.cashier.dto.TbShopShareRecordQueryCriteria;
|
||||
import cn.ysk.cashier.vo.TbUserCouponVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import cn.ysk.cashier.mybatis.entity.TbShopShareRecord;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (TbShopShareRecord)表数据库访问层
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-11-08 09:17:37
|
||||
*/
|
||||
public interface TbShopShareRecordMapper extends BaseMapper<TbShopShareRecord> {
|
||||
|
||||
@Select("<script> " +
|
||||
"SELECT" +
|
||||
" record.*," +
|
||||
" user1.nick_name AS invitedName," +
|
||||
" user2.nick_name AS beInvitedName," +
|
||||
" user1.head_img AS invitedHeadImg," +
|
||||
" user2.head_img AS beInvitedHeadImg " +
|
||||
"FROM" +
|
||||
" tb_shop_share_record record" +
|
||||
" LEFT JOIN tb_user_info user1 ON record.invited_id = user1.id " +
|
||||
" <if test=\"param.search != null and param.search != '' \"> " +
|
||||
" AND (user1.nick_name like concat('%', #{param.search}, '%') or user1.telephone like concat('%', #{param.search}, '%')) " +
|
||||
" </if> " +
|
||||
" LEFT JOIN tb_user_info user2 ON record.be_invited_id = user2.id " +
|
||||
" <if test=\"param.search != null and param.search != '' \"> " +
|
||||
" AND (user2.nick_name like concat('%', #{param.search}, '%') or user2.telephone like concat('%', #{param.search}, '%')) " +
|
||||
" </if> " +
|
||||
"WHERE" +
|
||||
" share_id = #{param.shareId}" +
|
||||
" <if test=\" param.status != null \"> " +
|
||||
" and record.status = #{param.status} "+
|
||||
" </if> " +
|
||||
"</script>")
|
||||
Page<TbShopShareRecord> selectAllByShare(@Param("param") TbShopShareRecordQueryCriteria param, Page page);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user