6 Commits

Author SHA1 Message Date
57bcc75f99 ip变更 2026-06-30 11:12:19 +08:00
cb0691dd01 店铺会员 2026-06-30 10:03:55 +08:00
3f0a11d201 店铺会员信息修改 2026-06-29 18:15:40 +08:00
639252d04e 扫码付款订单 过期 2026-05-27 16:59:26 +08:00
94fce3b08f 店铺用户不存在 2026-05-27 16:35:31 +08:00
6a94645076 二维码打印 2026-05-18 09:56:18 +08:00
15 changed files with 103 additions and 22 deletions

View File

@@ -150,6 +150,17 @@ public class ShopUserController {
return CzgResult.success(shopUserService.updateInfo(StpKit.USER.getHeadShopIdBySession(), shopUserEditDTO));
}
/**
* 店铺会员信息修改
*
* @return 是否成功
*/
@SaAdminCheckPermission(parentName = "店铺用户",value = "shopUser:edit", name = "店铺用户修改")
@PutMapping("/editVip")
public CzgResult<Boolean> editVip(@RequestBody @Validated ShopUserVipEditDTO vipEditDTO) {
return CzgResult.success(shopUserService.editVip(vipEditDTO));
}
/**
* 店铺用户余额修改
*

View File

@@ -1,13 +1,13 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.1.42:3306/czg_cashier?useUnicode=true&characterEncoding=utf-8
url: jdbc:mysql://192.168.1.43:3306/czg_cashier?useUnicode=true&characterEncoding=utf-8
username: root
password: Chaozg123.
data:
redis:
host: 192.168.1.42
host: 192.168.1.43
port: 6379
password: Chaozg123.
timeout: 1000

View File

@@ -2,7 +2,7 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.1.42:3306/czg_cashier?useUnicode=true&characterEncoding=utf-8
url: jdbc:mysql://192.168.1.43:3306/czg_cashier?useUnicode=true&characterEncoding=utf-8
username: root
password: Chaozg123.

View File

@@ -1,13 +1,13 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.1.42:3306/czg_cashier?useUnicode=true&characterEncoding=utf-8
url: jdbc:mysql://192.168.1.43:3306/czg_cashier?useUnicode=true&characterEncoding=utf-8
username: root
password: Chaozg123.
data:
redis:
host: 192.168.1.42
host: 192.168.1.43
port: 6379
password: Chaozg123.
timeout: 1000

View File

@@ -2,13 +2,13 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.1.42:3306/czg_cashier?useUnicode=true&characterEncoding=utf-8
url: jdbc:mysql://192.168.1.43:3306/czg_cashier?useUnicode=true&characterEncoding=utf-8
username: root
password: Chaozg123.
data:
redis:
host: 192.168.1.42
host: 192.168.1.43
port: 6379
password: Chaozg123.
timeout: 1000

View File

@@ -1,7 +1,7 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.1.42:3306/czg_cashier?useUnicode=true&characterEncoding=utf-8
url: jdbc:mysql://192.168.1.43:3306/czg_cashier?useUnicode=true&characterEncoding=utf-8
username: root
password: Chaozg123.

View File

@@ -1,13 +1,13 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.1.42:3306/czg_cashier?useUnicode=true&characterEncoding=utf-8
url: jdbc:mysql://192.168.1.43:3306/czg_cashier?useUnicode=true&characterEncoding=utf-8
username: root
password: Chaozg123.
data:
redis:
host: 192.168.1.42
host: 192.168.1.43
port: 6379
password: Chaozg123.
timeout: 1000

View File

@@ -2,13 +2,13 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.1.42:3306/czg_cashier?useUnicode=true&characterEncoding=utf-8
url: jdbc:mysql://192.168.1.43:3306/czg_cashier?useUnicode=true&characterEncoding=utf-8
username: root
password: Chaozg123.
data:
redis:
host: 192.168.1.42
host: 192.168.1.43
port: 6379
password: Chaozg123.
timeout: 1000

View File

@@ -2,13 +2,13 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.1.42:3306/czg_cashier?useUnicode=true&characterEncoding=utf-8
url: jdbc:mysql://192.168.1.43:3306/czg_cashier?useUnicode=true&characterEncoding=utf-8
username: root
password: Chaozg123.
data:
redis:
host: 192.168.1.42
host: 192.168.1.43
port: 6379
password: Chaozg123.
timeout: 1000

View File

@@ -0,0 +1,37 @@
package com.czg.account.dto.shopuser;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.time.LocalDateTime;
/**
* @author Administrator
*/
@Data
public class ShopUserVipEditDTO {
/**
* 对应shopUserid
*/
private Long id;
/**
* 是否会员 0否 1是
*/
private Integer isVip;
/**
* 会员等级id
*/
private Long memberLevelId;
/**
* 会员开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDateTime startTime;
/**
* 会员结束时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDateTime endTime;
}

View File

@@ -7,7 +7,6 @@ import com.mybatisflex.core.paginate.Page;
import jakarta.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.List;
/**
* 商户储值会员 服务层。
@@ -20,11 +19,14 @@ public interface AShopUserService {
Page<ShopUser> getPage(String key, Integer isVip);
Page<ShopUserDTO> getPage(String key, Integer isVip, BigDecimal amount);
Page<ShopUser> getPushEventUser(SmsPushEventUser smsPushEventUser);
Page<ShopUser> getAcPushEventUser(SmsPushEventUser smsPushEventUser);
void exportUserList(String key, Integer isVip, HttpServletResponse response);
Boolean editVip(ShopUserVipEditDTO vipEditDTO);
Boolean add(Long shopId, ShopUserAddDTO shopUserAddDTO);

View File

@@ -2,7 +2,6 @@ package com.czg.service.account.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.DesensitizedUtil;
import cn.hutool.core.util.StrUtil;
import com.czg.account.dto.shopuser.*;
import com.czg.account.entity.ShopInfo;
@@ -38,6 +37,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
@@ -143,10 +143,31 @@ public class AShopUserServiceImpl implements AShopUserService {
List<ShopUserDTO> dtoList = shopUserMapper.selectPageByKeyAndIsVip(mainIdByShopId, isVip, key, null);
// 将 dtoList 转换为 ShopUserExportDTO 列表
List<ShopUserExportDTO> exportList = BeanUtil.copyToList(dtoList, ShopUserExportDTO.class);
List<ShopUserExportDTO> exportList = BeanUtil.copyToList(dtoList, ShopUserExportDTO.class);
ExcelExportUtil.exportToResponse(exportList, ShopUserExportDTO.class, shopInfo == null ? "店铺用户列表" : shopInfo.getShopName() + "_用户列表", response);
}
@Override
public Boolean editVip(ShopUserVipEditDTO vipEditDTO) {
ShopUser shopUser = getUserInfo(vipEditDTO.getId());
if (vipEditDTO.getIsVip() != null && vipEditDTO.getIsVip() == 1) {
shopUser.setIsVip(vipEditDTO.getIsVip());
if (vipEditDTO.getMemberLevelId() != null) {
shopUser.setMemberLevelId(vipEditDTO.getMemberLevelId());
if (shopUser.getStartTime() == null) {
shopUser.setStartTime(LocalDateTime.now());
}
shopUser.setEndTime(vipEditDTO.getEndTime());
}
} else if (vipEditDTO.getIsVip() != null && vipEditDTO.getIsVip() == 0) {
shopUser.setIsVip(0);
shopUser.setStartTime(null);
shopUser.setEndTime(null);
shopUser.setMemberLevelId(null);
}
return shopUserService.updateById(shopUser, false);
}
@Override
public Boolean updateInfo(Long shopId, ShopUserEditDTO shopUserEditDTO) {
@@ -193,7 +214,15 @@ public class AShopUserServiceImpl implements AShopUserService {
@Override
public ShopUser getDetail(Integer id, Integer userId) {
Long mainId = shopInfoService.getMainIdByShopId(StpKit.USER.getShopId());
ShopUser shopUser = shopUserService.getOne(new QueryWrapper().eq(ShopUser::getMainShopId, mainId).eq(ShopUser::getId, id).eq(ShopUser::getUserId, userId));
ShopUser shopUser;
if (id == null) {
shopUser = shopUserService.getShopUserInfo(StpKit.USER.getShopId(), userId);
} else {
shopUser = shopUserService.getById(id);
if (shopUser == null) {
throw new CzgException("用户不存在");
}
}
long count = couponRecordService.count(new QueryWrapper()
.eq(MkShopCouponRecord::getShopUserId, shopUser.getId())
.eq(MkShopCouponRecord::getStatus, 0)

View File

@@ -17,7 +17,7 @@ import java.util.Map;
*/
public class CodeGen {
// private final static String BASE_URL = "rm-bp1kn7h89nz62cno1ro.mysql.rds.aliyuncs.com";
private final static String BASE_URL = "192.168.1.42";
private final static String BASE_URL = "192.168.1.43";
private final static String PORT = "3306";
private final static String USERNAME = "root";
private final static String PASSWORD = "Chaozg123.";

View File

@@ -484,8 +484,8 @@ public interface PrinterImpl {
* @param pickupNumber 取餐号
* @return 元数据
*/
default String buildOnlyKitchenPrintData(String pickupNumber, OrderDetail orderDetail) {
PrintSignLabel signLabelInfo = getSignLabelInfo();
default String buildOnlyKitchenPrintData(Integer isCode, String pickupNumber, OrderDetail orderDetail) {
PrintLabel signLabelInfo = getSignLabelInfo();
StringBuilder builder = new StringBuilder();
builder.append(formatLabel(pickupNumber, signLabelInfo.centerBold))
.append(signLabelInfo.br);

View File

@@ -1419,7 +1419,9 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
param.setWaitCall(false);
param.setVipPrice(false);
param.setPackFee(BigDecimal.ZERO);
return initOrderInfo(param, shopInfo, null);
OrderInfo orderInfo = initOrderInfo(param, shopInfo, null);
redisService.set(RedisCst.classKeyExpired.EXPIRED_ORDER + orderInfo.getId(), "", 60 * 15);
return orderInfo;
}
/**