Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop
合并之前代码,解决部分参数校验问题,解决消息发送加入到两个mq队列通道问题,取消两个无效maven依赖
This commit is contained in:
commit
87c82ce4d3
@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 买家端,意见反馈接口
|
||||
*
|
||||
@ -31,7 +33,7 @@ public class FeedbackBuyerController {
|
||||
|
||||
@ApiOperation(value = "添加意见反馈")
|
||||
@PostMapping()
|
||||
public ResultMessage<Object> save(Feedback feedback) {
|
||||
public ResultMessage<Object> save(@Valid Feedback feedback) {
|
||||
feedback.setUserName(UserContext.getCurrentUser().getNickName());
|
||||
feedbackService.save(feedback);
|
||||
return ResultUtil.success();
|
||||
|
@ -137,11 +137,11 @@
|
||||
<version>${jasypt-version}</version>
|
||||
</dependency>
|
||||
<!-- 模板引擎 -->
|
||||
<dependency>
|
||||
<groupId>com.ibeetl</groupId>
|
||||
<artifactId>beetl</artifactId>
|
||||
<version>${beetl-version}</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.ibeetl</groupId>-->
|
||||
<!-- <artifactId>beetl</artifactId>-->
|
||||
<!-- <version>${beetl-version}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- 阿里云核心包-->
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
@ -276,11 +276,11 @@
|
||||
<artifactId>logstash-logback-encoder</artifactId>
|
||||
<version>${logstash-logback-encoder}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.interceptor</groupId>
|
||||
<artifactId>javax.interceptor-api</artifactId>
|
||||
<version>${interceptor-api}</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>javax.interceptor</groupId>-->
|
||||
<!-- <artifactId>javax.interceptor-api</artifactId>-->
|
||||
<!-- <version>${interceptor-api}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-client</artifactId>
|
||||
|
@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
/**
|
||||
* 通知类站内信模版对象
|
||||
@ -21,22 +24,30 @@ public class NoticeMessage extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "站内信节点")
|
||||
@NotEmpty(message = "站内信节点不能为空")
|
||||
@Length(max = 50, message = "站内信节点名称太长,不能超过50")
|
||||
private String noticeNode;
|
||||
|
||||
@ApiModelProperty(value = "站内信标题")
|
||||
@NotEmpty(message = "站内信标题不能为空")
|
||||
@Length(max = 50, message = "站内信标题名称太长,不能超过50")
|
||||
private String noticeTitle;
|
||||
|
||||
@ApiModelProperty(value = "站内信内容")
|
||||
@NotEmpty(message = "站内信内容不能为空")
|
||||
@Length(max = 200, message = "站内信内容名称太长,不能超过200")
|
||||
private String noticeContent;
|
||||
/**
|
||||
* @see cn.lili.common.enums.SwitchEnum
|
||||
*/
|
||||
@NotEmpty(message = "站内信状态不能为空")
|
||||
@ApiModelProperty(value = "站内信是否开启")
|
||||
private String noticeStatus;
|
||||
/**
|
||||
* @see cn.lili.modules.message.entity.enums.NoticeMessageParameterEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "消息变量")
|
||||
@NotEmpty(message = "站内信状态不能为空")
|
||||
private String variable;
|
||||
|
||||
|
||||
|
@ -43,8 +43,6 @@ public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message> impl
|
||||
//保存站内信信息
|
||||
this.save(message);
|
||||
//发送站内信消息提醒
|
||||
String destination = rocketmqCustomProperties.getOtherTopic() + ":" + OtherTagsEnum.MESSAGE.name();
|
||||
rocketMQTemplate.asyncSend(destination, message, RocketmqSendCallbackBuilder.commonCallback());
|
||||
String noticeSendDestination = rocketmqCustomProperties.getNoticeSendTopic() + ":" + OtherTagsEnum.MESSAGE.name();
|
||||
rocketMQTemplate.asyncSend(noticeSendDestination, message, RocketmqSendCallbackBuilder.commonCallback());
|
||||
return true;
|
||||
|
@ -45,9 +45,11 @@ public class Feedback extends BaseIdEntity {
|
||||
private String context;
|
||||
|
||||
@ApiModelProperty(value = "手机号")
|
||||
@Length(max = 11, message = "手机号不能超过11位")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty(value = "图片,多个图片使用:(,)分割")
|
||||
@Length(max = 255, message = "图片上传太多啦,请选择删除掉")
|
||||
private String images;
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.lili.modules.payment.kit.plugin.alipay;
|
||||
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alipay.api.*;
|
||||
import com.alipay.api.domain.*;
|
||||
@ -950,7 +951,7 @@ public class AliPayApi {
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
valueStr = (i == values.length - 1) ? valueStr + values[i] : valueStr + values[i] + ",";
|
||||
}
|
||||
params.put(name, valueStr);
|
||||
params.put(name, HtmlUtil.unescape(valueStr));
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
@ -188,6 +188,9 @@ public class SeckillServiceImpl extends ServiceImpl<SeckillMapper, Seckill> impl
|
||||
if (PromotionStatusEnum.START.name().equals(seckillVO.getPromotionStatus())) {
|
||||
throw new ServiceException(ResultCode.PROMOTION_UPDATE_ERROR);
|
||||
}
|
||||
if (seckillVO.getEndTime() == null) {
|
||||
seckillVO.setEndTime(cn.hutool.core.date.DateUtil.endOfDay(seckillVO.getStartTime()));
|
||||
}
|
||||
PromotionTools.checkPromotionTime(seckillVO.getStartTime().getTime(), seckillVO.getEndTime().getTime());
|
||||
//更新到MYSQL中
|
||||
boolean result = this.updateById(seckillVO);
|
||||
|
@ -2,8 +2,7 @@ package cn.lili.modules.search.entity.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 搜索热词
|
||||
@ -16,9 +15,12 @@ import javax.validation.constraints.NotNull;
|
||||
public class HotWordsDTO {
|
||||
|
||||
@NotBlank(message = "搜索热词不能为空")
|
||||
@Size(max = 20, min = 1, message = "搜索热词长度限制在1-20")
|
||||
private String keywords;
|
||||
|
||||
@NotNull(message = "分数不能为空")
|
||||
@Max(value = 9999999999L,message = "分数不能大于9999999999")
|
||||
@Min(value = -9999999999L,message = "分数不能小于9999999999")
|
||||
private Integer point;
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ public class NoticeMessageManagerController {
|
||||
noticeMessage.setNoticeContent(noticeContent);
|
||||
noticeMessage.setNoticeTitle(noticeTitle);
|
||||
noticeMessageService.updateById(noticeMessage);
|
||||
ResultUtil.data(noticeMessage);
|
||||
return ResultUtil.data(noticeMessage);
|
||||
}
|
||||
throw new ResourceNotFoundException(ResultCode.NOTICE_NOT_EXIST.message());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user