Compare commits
6 Commits
24ea4bfc32
...
test
| Author | SHA1 | Date | |
|---|---|---|---|
| 57bcc75f99 | |||
| cb0691dd01 | |||
| 3f0a11d201 | |||
| 639252d04e | |||
| 94fce3b08f | |||
| 6a94645076 |
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
* 店铺用户余额修改
|
||||
*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -147,6 +147,27 @@ public class AShopUserServiceImpl implements AShopUserService {
|
||||
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)
|
||||
|
||||
@@ -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.";
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user