Commit 82b82afb authored by zhangfeng's avatar zhangfeng

Merge branch 'release-feat-zhangfeng' into 'release'

Release feat zhangfeng

See merge request !29
parents e71f5ef0 e6d0eeed
......@@ -11,7 +11,7 @@
Target Server Version : 80031 (8.0.31)
File Encoding : 65001
Date: 15/08/2024 11:03:15
Date: 18/10/2024 09:26:20
*/
SET NAMES utf8mb4;
......@@ -35,6 +35,6 @@ CREATE TABLE `member_user_address` (
`updater` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
`deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员收货地址表' ROW_FORMAT = DYNAMIC;
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员收货地址表' ROW_FORMAT = DYNAMIC;
SET FOREIGN_KEY_CHECKS = 1;
......@@ -11,7 +11,7 @@
Target Server Version : 80031 (8.0.31)
File Encoding : 65001
Date: 15/08/2024 11:03:24
Date: 18/10/2024 09:26:20
*/
SET NAMES utf8mb4;
......@@ -33,6 +33,6 @@ CREATE TABLE `member_user_level_config` (
`update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '是否删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员等级配置表' ROW_FORMAT = DYNAMIC;
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员等级配置表' ROW_FORMAT = DYNAMIC;
SET FOREIGN_KEY_CHECKS = 1;
......@@ -11,7 +11,7 @@
Target Server Version : 80031 (8.0.31)
File Encoding : 65001
Date: 15/08/2024 11:03:34
Date: 18/10/2024 09:26:20
*/
SET NAMES utf8mb4;
......@@ -33,6 +33,6 @@ CREATE TABLE `member_user_score` (
`updater` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
`deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员积分表' ROW_FORMAT = DYNAMIC;
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员积分表' ROW_FORMAT = DYNAMIC;
SET FOREIGN_KEY_CHECKS = 1;
......@@ -11,7 +11,7 @@
Target Server Version : 80031 (8.0.31)
File Encoding : 65001
Date: 15/08/2024 11:03:47
Date: 18/10/2024 09:26:54
*/
SET NAMES utf8mb4;
......
......@@ -11,7 +11,7 @@
Target Server Version : 80031 (8.0.31)
File Encoding : 65001
Date: 15/08/2024 11:03:55
Date: 18/10/2024 09:27:05
*/
SET NAMES utf8mb4;
......@@ -34,6 +34,6 @@ CREATE TABLE `member_user_score_detail_releation` (
`update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '是否删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = tis620 COLLATE = tis620_thai_ci COMMENT = '会员积分详情关联表' ROW_FORMAT = DYNAMIC;
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = tis620 COLLATE = tis620_thai_ci COMMENT = '会员积分详情关联表' ROW_FORMAT = DYNAMIC;
SET FOREIGN_KEY_CHECKS = 1;
......@@ -11,7 +11,7 @@
Target Server Version : 80031 (8.0.31)
File Encoding : 65001
Date: 15/08/2024 11:04:03
Date: 18/10/2024 09:27:20
*/
SET NAMES utf8mb4;
......
......@@ -11,7 +11,7 @@
Target Server Version : 80031 (8.0.31)
File Encoding : 65001
Date: 06/09/2024 11:23:57
Date: 18/10/2024 09:27:30
*/
SET NAMES utf8mb4;
......@@ -26,8 +26,8 @@ CREATE TABLE `score_rule` (
`code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规则编号',
`type` int NOT NULL COMMENT '指标类型',
`title_zh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '规则标题中文',
`title_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '规则标题英文',
`desc_zh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '规则说明中文',
`title_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '规则标题英文',
`desc_zh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '规则说明中文',
`desc_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '规则说明英文',
`cover_image_zh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '封面图中文',
`cover_image_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '封面图英文',
......@@ -47,6 +47,6 @@ CREATE TABLE `score_rule` (
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新者',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '积分规则表' ROW_FORMAT = DYNAMIC;
SET FOREIGN_KEY_CHECKS = 1;
/*
Navicat Premium Data Transfer
Source Server : jiedao-uat
Source Server Type : MySQL
Source Server Version : 80031 (8.0.31)
Source Host : 159.75.224.138:2297
Source Schema : jiedao
Target Server Type : MySQL
Target Server Version : 80031 (8.0.31)
File Encoding : 65001
Date: 18/10/2024 09:27:40
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for score_rule_share_fail_trigger
-- ----------------------------
DROP TABLE IF EXISTS `score_rule_share_fail_trigger`;
CREATE TABLE `score_rule_share_fail_trigger` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`share_record_id` bigint NOT NULL COMMENT '分享记录id',
`trigger_time` datetime NOT NULL COMMENT '点击时间',
`ip_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '点击ip',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;
SET FOREIGN_KEY_CHECKS = 1;
/*
Navicat Premium Data Transfer
Source Server : jiedao-uat
Source Server Type : MySQL
Source Server Version : 80031 (8.0.31)
Source Host : 159.75.224.138:2297
Source Schema : jiedao
Target Server Type : MySQL
Target Server Version : 80031 (8.0.31)
File Encoding : 65001
Date: 18/10/2024 09:27:47
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for score_rule_share_record
-- ----------------------------
DROP TABLE IF EXISTS `score_rule_share_record`;
CREATE TABLE `score_rule_share_record` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分享编号',
`member_id` bigint NOT NULL COMMENT '会员id',
`rule_id` bigint NOT NULL COMMENT '积分规则id',
`total_score` int NULL DEFAULT 0 COMMENT '总积分',
`last_trigger_time` datetime NULL DEFAULT NULL COMMENT '最后触发时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
`update_time` datetime NOT NULL COMMENT '更新时间',
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新者',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 64 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '分享记录表' ROW_FORMAT = DYNAMIC;
SET FOREIGN_KEY_CHECKS = 1;
......@@ -11,7 +11,7 @@
Target Server Version : 80031 (8.0.31)
File Encoding : 65001
Date: 15/08/2024 11:04:36
Date: 18/10/2024 09:28:59
*/
SET NAMES utf8mb4;
......@@ -31,7 +31,7 @@ CREATE TABLE `ecw_reward` (
`img_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '英文礼品图片',
`img_fr` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '法文礼品图片',
`points_require` int NOT NULL COMMENT '兑换所需积分',
`node_id` int NOT NULL COMMENT '兑换网点',
`node_id` int NOT NULL COMMENT '提货点id(对应仓库warehouse_id)',
`exchange_count` int NULL DEFAULT 0 COMMENT '已兑换次数',
`quantity_remain` int NOT NULL COMMENT '剩余数量',
`start_time` datetime NULL DEFAULT NULL COMMENT '活动开始时间',
......@@ -49,6 +49,6 @@ CREATE TABLE `ecw_reward` (
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `unique_code`(`code` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 38 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '礼品' ROW_FORMAT = DYNAMIC;
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '礼品' ROW_FORMAT = DYNAMIC;
SET FOREIGN_KEY_CHECKS = 1;
......@@ -11,7 +11,7 @@
Target Server Version : 80031 (8.0.31)
File Encoding : 65001
Date: 06/09/2024 11:26:34
Date: 18/10/2024 09:29:09
*/
SET NAMES utf8mb4;
......@@ -27,6 +27,7 @@ CREATE TABLE `ecw_reward_redeem` (
`member_id` bigint NOT NULL COMMENT '会员id',
`reward_id` bigint NOT NULL COMMENT '礼品id',
`status` int NULL DEFAULT NULL COMMENT '兑换状态',
`hold_score_before_redeem` int NULL DEFAULT 0 COMMENT '兑换前持有的积分',
`score_count` int NOT NULL COMMENT '积分数量',
`reward_count` int NOT NULL COMMENT '兑换数量',
`redeem_type` int NOT NULL COMMENT '兑换方式',
......
......@@ -50,11 +50,24 @@ public class AppAuthController {
// if (StringUtils.isNotBlank(mobile)) {
// reqVO.setMobile(mobile);
// }
String token = authService.reg(reqVO, getClientIP(), getUserAgent());
String token = authService.reg(reqVO, getClientIP(), getUserAgent(), true);
// 返回结果
return success(AppAuthLoginRespVO.builder().token(token).build());
}
@PostMapping("/share-page/reg")
@ApiOperation("分享页面使用手机注册")
@OperateLog(enable = false)
@Idempotent(timeout = 5)
public CommonResult<Boolean> sharePageReg(@RequestBody @Valid AppAuthRegReqVO reqVO) {
String mobileCode = reqVO.getAreaCode() + StrUtil.COLON + reqVO.getMobile();
paramValidatorApi.validatorMobile(mobileCode);
authService.reg(reqVO, getClientIP(), getUserAgent(), false);
// 返回结果
return success(true);
}
@PostMapping("/login")
@ApiOperation("使用手机 + 密码登录")
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
......@@ -110,7 +123,7 @@ public class AppAuthController {
}
@PostMapping("/update-password")
@ApiOperation(value = "修改用户密码",notes = "用户修改密码时使用")
@ApiOperation(value = "修改用户密码", notes = "用户修改密码时使用")
@PreAuthenticated
@Idempotent(timeout = 5)
public CommonResult<Boolean> updatePassword(@RequestBody @Valid AppAuthUpdatePasswordReqVO reqVO) {
......@@ -129,7 +142,7 @@ public class AppAuthController {
}
@PostMapping("/update-control-password")
@ApiOperation(value = "修改用户控货密码",notes = "用户修改控货密码时使用")
@ApiOperation(value = "修改用户控货密码", notes = "用户修改控货密码时使用")
@PreAuthenticated
public CommonResult<Boolean> updateControlPassword(@RequestBody @Valid AppAuthUpdatePasswordReqVO reqVO) {
authService.updateControlPassword(getLoginUserId(), reqVO);
......
......@@ -22,7 +22,7 @@ public interface MemberAuthService extends SecurityAuthFrameworkService {
* @param userAgent 用户 UA
* @return 身份令牌,使用 JWT 方式
*/
String reg(@Valid AppAuthRegReqVO reqVO, String userIp, String userAgent);
String reg(@Valid AppAuthRegReqVO reqVO, String userIp, String userAgent, Boolean isAutoLogin);
/**
* 检查号码是否唯一
......
......@@ -111,7 +111,7 @@ public class MemberAuthServiceImpl implements MemberAuthService {
}
@Override
public String reg(@Valid AppAuthRegReqVO reqVO, String userIp, String userAgent) {
public String reg(@Valid AppAuthRegReqVO reqVO, String userIp, String userAgent, Boolean isAutoLogin) {
// 校验验证码
smsCodeApi.useSmsCode(AuthConvert.INSTANCE.convert(reqVO, SmsSceneEnum.MEMBER_REG.getScene(), userIp));
......@@ -134,6 +134,9 @@ public class MemberAuthServiceImpl implements MemberAuthService {
.setContent("手机注册成功");
userOperationLogService.createUserOperationLog(userOperationLogCreateReqVO);
if (!isAutoLogin) {
return null;
}
// 执行登陆
this.createLoginLog(user.getMobile(), LoginLogTypeEnum.LOGIN_USERNAME, LoginResultEnum.SUCCESS);
LoginUser loginUser = AuthConvert.INSTANCE.convert(user);
......
......@@ -109,20 +109,12 @@ public interface ScoreRuleService extends IService<ScoreRuleDO> {
ScoreRuleDO getEnabledOrderVScoreRuleByTransportType(Integer transportType);
/**
* 根据类型获取已启用积分规则
* 根据类型获取已启用积分规则(仅推荐和注册)
* @param scoreRuleType
* @return
*/
ScoreRuleDO getEnableScoreRuleByType(ScoreRuleTypeEnum scoreRuleType);
/**
* 根据类型获取已启用积分规则(带运输类型)
* @param scoreRuleType
* @param transportType
* @return
*/
ScoreRuleDO getEnableScoreRuleByType(ScoreRuleTypeEnum scoreRuleType, TransportTypeEnum transportType);
List<WarehouseTreeRegionSimpleVO> getWarehouseTreeRegionListSimple();
/**
......@@ -151,4 +143,10 @@ public interface ScoreRuleService extends IService<ScoreRuleDO> {
* @return
*/
Boolean setScoreRuleSwitch(SwitchReqVo switchReqVo);
/**
* 获取当前时间已启用的订单V值规则
* @return
*/
List<ScoreRuleDO> getEnableOrderVRule();
}
package cn.iocoder.boot.module.order.api;
import cn.iocoder.boot.module.order.api.dto.OrderItemRespDTO;
import cn.iocoder.boot.module.order.api.dto.OrderOperateLogDTO;
import cn.iocoder.boot.module.order.api.dto.OrderRespDTO;
import java.util.List;
......@@ -21,6 +22,10 @@ public interface OrderApi {
* 根据订单id获取所有订单项
*/
List<OrderItemRespDTO> getOrderItemsByOrderId(Long orderId);
/**
* 添加订单操作日志
*/
void createOrderOperateLog(OrderOperateLogDTO orderId);
/**
......
package cn.iocoder.boot.module.order.api.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* 订单操作日志 DTO
*/
@Data
public class OrderOperateLogDTO {
@ApiModelProperty(value = "订单ID", required = true)
@NotNull(message = "订单ID不能为空")
private Long orderId;
@ApiModelProperty(value = "变更后订单详情数据")
private String body;
@ApiModelProperty(value = "请求地址")
private String requestUrl;
@ApiModelProperty(value = "变更类型")
private String type;
@ApiModelProperty(value = "变更描述")
private String msg;
@ApiModelProperty(value = "备注说明")
private String note;
@ApiModelProperty(value = "操作人类型:1 会员 2 管理员")
private Integer userType;
@ApiModelProperty(value = "创建者")
private String creator;
@ApiModelProperty(value = "创建者名称")
private String creatorName;
}
package cn.iocoder.boot.module.order.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
@Data
......
......@@ -13,6 +13,8 @@ import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderObjective.OrderObjectiveDO;
import cn.iocoder.yudao.module.order.service.order.*;
import cn.iocoder.yudao.module.order.service.order.impl.OrderItemServiceImpl;
import cn.iocoder.yudao.module.order.service.orderOperateLog.OrderOperateLogService;
import cn.iocoder.yudao.module.order.vo.orderOperateLog.OrderOperateLogCreateReqVO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.google.common.base.Joiner;
import org.springframework.beans.BeanUtils;
......@@ -45,6 +47,8 @@ public class OrderApiImpl implements OrderApi {
private OrderItemServiceImpl orderItemService;
@Resource
private OrderConsignorService orderConsignorService;
@Resource
private OrderOperateLogService orderOperateLogService;
@Override
public OrderRespDTO getOrder(Long id, String orderNo) {
......@@ -101,6 +105,13 @@ public class OrderApiImpl implements OrderApi {
return null;
}
@Override
public void createOrderOperateLog(OrderOperateLogDTO orderOperateLogDTO) {
OrderOperateLogCreateReqVO createReqVO = new OrderOperateLogCreateReqVO();
BeanUtils.copyProperties(orderOperateLogDTO, createReqVO);
orderOperateLogService.createOrderAsyncOperateLog(createReqVO);
}
@Override
public boolean mergeOrder(Long customerIdSaved, Long customerIdDeleted) {
......
......@@ -95,7 +95,15 @@ public class RewardRedeemServiceImpl extends AbstractService<RewardRedeemMapper,
if (id == null) {
return null;
}
return rewardRedeemMapper.detail(id);
RewardRedeemPageRespVO detail = rewardRedeemMapper.detail(id);
if (detail != null && detail.getEntrance() != PlatformTypeEnum.BACKEND.getValue()) {
detail.setCreatorName(detail.getMemberNameZh());
// 刚创建时更新人显示为兑换人
if (detail.getUpdateTime().equals(detail.getCreateTime())) {
detail.setUpdaterName(detail.getMemberNameZh());
}
}
return detail;
}
@Override
......
......@@ -1058,7 +1058,7 @@ score.rule.update.error = only disabled rule can update
score.rule.delete.error = only disabled rule can delete
score.rule.status.error = score rule status error
score.rule.status.not.enable = score rule status not enable
score.rule.unique.check.error = The same rule already exists during the validity period
score.rule.unique.check.error = The same rule already exists during the validity period: {}
score.rule.transport.type.error = transport type error
score.rule.time.error = score rule time error
score.rule.period.error = score rule period error
......
......@@ -1059,7 +1059,7 @@ score.rule.update.error = \u53EA\u6709\u672A\u542F\u7528\u89C4\u5219\u53EF\u4EE5
score.rule.delete.error = \u53EA\u6709\u672A\u542F\u7528\u53EF\u4EE5\u5220\u9664
score.rule.status.error = \u79EF\u5206\u89C4\u5219\u72B6\u6001\u9519\u8BEF
score.rule.status.not.enable = \u79EF\u5206\u89C4\u5219\u672A\u542F\u7528
score.rule.unique.check.error = \u6709\u6548\u671F\u5185\u5DF2\u5B58\u5728\u76F8\u540C\u89C4\u5219
score.rule.unique.check.error = \u6709\u6548\u671F\u5185\u5DF2\u5B58\u5728\u76F8\u540C\u89C4\u5219\uFF1A{}
score.rule.transport.type.error = \u8FD0\u8F93\u7C7B\u578B\u9519\u8BEF
score.rule.time.error = \u6D3B\u52A8\u65F6\u95F4\u4E0D\u5408\u6CD5
score.rule.period.error = \u8FC7\u671F\u65F6\u95F4\u9519\u8BEF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment