53 changed files with 358 additions and 155 deletions
@ -0,0 +1,35 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 描述一下 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2020/7/2 14:28 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ResiWxPhoneFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 4381236451736209332L; |
||||
|
public interface AddUserInternalGroup {} |
||||
|
/** |
||||
|
* 微信code |
||||
|
*/ |
||||
|
@NotBlank(message = "wxCode不能为空",groups = {AddUserInternalGroup.class}) |
||||
|
private String wxCode; |
||||
|
|
||||
|
/** |
||||
|
* 用户信息 |
||||
|
*/ |
||||
|
@NotBlank(message = "encryptedData不能为空",groups = {AddUserInternalGroup.class}) |
||||
|
private String encryptedData; |
||||
|
|
||||
|
/** |
||||
|
* 加密算法的初始向量 |
||||
|
*/ |
||||
|
@NotBlank(message = "iv不能为空",groups = {AddUserInternalGroup.class}) |
||||
|
private String iv; |
||||
|
} |
||||
@ -0,0 +1,31 @@ |
|||||
|
package com.epmet.commons.tools.aspect;/** |
||||
|
* @author jianjun liu |
||||
|
* @email liujianjun@yunzongnet.com |
||||
|
* @date 2020-07-02 14:08 |
||||
|
**/ |
||||
|
|
||||
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.web.bind.annotation.ControllerAdvice; |
||||
|
import org.springframework.web.bind.annotation.ExceptionHandler; |
||||
|
|
||||
|
import javax.servlet.ServletException; |
||||
|
|
||||
|
/** |
||||
|
* desc: |
||||
|
* |
||||
|
* @author lyn |
||||
|
* @date 2020/7/2 14:08 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@ControllerAdvice |
||||
|
public class ServletExceptionHandler { |
||||
|
|
||||
|
@ExceptionHandler(ServletException.class) |
||||
|
public Result globalException(ServletException e) { |
||||
|
log.error("globalException", e); |
||||
|
return new Result<String>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg()); |
||||
|
|
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue