226 changed files with 14631 additions and 29 deletions
@ -0,0 +1,30 @@ |
|||
package com.epmet.constant; |
|||
|
|||
/** |
|||
* @author sun |
|||
* @dscription |
|||
*/ |
|||
public interface PublicUserLoginConstant { |
|||
|
|||
/** |
|||
* 初始化用户信息失败 |
|||
*/ |
|||
String SAVE_USER_EXCEPTION = "初始化用户信息失败"; |
|||
/** |
|||
* 是否登陆(true false) |
|||
*/ |
|||
String PARAMETER_EXCEPTION = "是否登陆值错误"; |
|||
/** |
|||
* 登陆验证 |
|||
*/ |
|||
String LOGON_EXCEPTION = "该手机号未注册"; |
|||
/** |
|||
* 注册验证 |
|||
*/ |
|||
String ZHU_CE_EXCEPTION = "该手机号已注册"; |
|||
/** |
|||
* 用户登陆 新增访问记录 |
|||
*/ |
|||
String SAVE_VISITED_EXCEPTION = "用户登陆,新增访问记录失败"; |
|||
|
|||
} |
|||
@ -0,0 +1,74 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.constant.PublicUserLoginConstant; |
|||
import com.epmet.dto.form.LoginByPhoneFormDTO; |
|||
import com.epmet.dto.form.PaWxCodeFormDTO; |
|||
import com.epmet.dto.form.PublicSendSmsCodeFormDTO; |
|||
import com.epmet.dto.result.UserTokenResultDTO; |
|||
import com.epmet.service.PublicUserLoginService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* 描述一下 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/7/8 18:29 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("publicuser") |
|||
public class PublicUserLoginController { |
|||
|
|||
@Autowired |
|||
private PublicUserLoginService publicUserLoginService; |
|||
|
|||
/** |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @param formDTO |
|||
* @author sun |
|||
* @description 解析wxcode获取用户信息并生成token |
|||
**/ |
|||
@PostMapping(value = "/wxcodetotoken") |
|||
public Result<UserTokenResultDTO> wxCodeToToken(@RequestBody PaWxCodeFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, PaWxCodeFormDTO.AddUserInternalGroup.class); |
|||
return new Result<UserTokenResultDTO>().ok(publicUserLoginService.wxCodeToToken(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO 手机号 |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author sun |
|||
* @Description 公众号登录-发送验证码 |
|||
**/ |
|||
@PostMapping(value = "/sendsmscode") |
|||
public Result sendSmsCode(@RequestBody PublicSendSmsCodeFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO,PublicSendSmsCodeFormDTO.AddUserShowGroup.class); |
|||
if(formDTO.getIsLogon()!=true&&formDTO.getIsLogon()!=false){ |
|||
throw new RenException(PublicUserLoginConstant.PARAMETER_EXCEPTION); |
|||
} |
|||
publicUserLoginService.sendSmsCode(formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author sun |
|||
* @Description 公众号-手机验证码登陆 |
|||
**/ |
|||
@PostMapping(value = "/loginbyphone") |
|||
public Result<UserTokenResultDTO> loginByPhone(@LoginUser TokenDto tokenDTO, @RequestBody LoginByPhoneFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, LoginByPhoneFormDTO.AddUserShowGroup.class, LoginByPhoneFormDTO.LoginByPhone.class); |
|||
return new Result<UserTokenResultDTO>().ok(publicUserLoginService.loginByPhone(tokenDTO, formDTO)); |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,38 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 手机验证码登陆接口入参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class LoginByPhoneFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 4193133227120225342L; |
|||
/** |
|||
* 添加用户操作的用户可见异常分组 |
|||
* 该分组用于校验需要返回给前端错误信息提示的列,需要继承CustomerClientShowGroup |
|||
* 返回错误码为8999,提示信息为DTO中具体的列的校验注解message的内容 |
|||
*/ |
|||
public interface AddUserShowGroup extends CustomerClientShowGroup { |
|||
} |
|||
|
|||
public interface LoginByPhone extends CustomerClientShowGroup{} |
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
@NotBlank(message = "手机号不能为空", groups = {AddUserShowGroup.class}) |
|||
private String phone; |
|||
|
|||
/** |
|||
* 验证码 |
|||
*/ |
|||
@NotBlank(message="验证码不能为空", groups = {LoginByPhone.class}) |
|||
private String smsCode; |
|||
|
|||
} |
|||
|
|||
@ -0,0 +1,23 @@ |
|||
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/8 18:32 |
|||
*/ |
|||
@Data |
|||
public class PaWxCodeFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -207861963128774742L; |
|||
public interface AddUserInternalGroup {} |
|||
/** |
|||
* wxCode |
|||
*/ |
|||
@NotBlank(message = "wxCode不能为空",groups = {AddUserInternalGroup.class}) |
|||
private String wxCode; |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 公众号手机号+验证码登录接口入参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class PublicSendSmsCodeFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -1852541457359282018L; |
|||
/** |
|||
* 添加用户操作的用户可见异常分组 |
|||
* 该分组用于校验需要返回给前端错误信息提示的列,需要继承CustomerClientShowGroup |
|||
* 返回错误码为8999,提示信息为DTO中具体的列的校验注解message的内容 |
|||
*/ |
|||
public interface AddUserShowGroup extends CustomerClientShowGroup { |
|||
} |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
@NotBlank(message = "手机号不能为空", groups = {AddUserShowGroup.class}) |
|||
private String phone; |
|||
/** |
|||
* 是否登陆(登陆:true 注册:false) |
|||
*/ |
|||
private Boolean isLogon; |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.dto.form.LoginByPhoneFormDTO; |
|||
import com.epmet.dto.form.PaWxCodeFormDTO; |
|||
import com.epmet.dto.form.PublicSendSmsCodeFormDTO; |
|||
import com.epmet.dto.result.UserTokenResultDTO; |
|||
|
|||
/** |
|||
* 描述一下 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/7/8 18:31 |
|||
*/ |
|||
public interface PublicUserLoginService { |
|||
|
|||
/** |
|||
* @return |
|||
* @param formDTO |
|||
* @author sun |
|||
* @description 解析wxcode获取用户信息并生成token |
|||
**/ |
|||
UserTokenResultDTO wxCodeToToken(PaWxCodeFormDTO formDTO); |
|||
|
|||
/** |
|||
* @param formDTO 手机号 |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author sun |
|||
* @Description 公众号登录-发送验证码 |
|||
**/ |
|||
void sendSmsCode(PublicSendSmsCodeFormDTO formDTO); |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author sun |
|||
* @Description 公众号-手机验证码登陆 |
|||
**/ |
|||
UserTokenResultDTO loginByPhone(TokenDto tokenDTO, LoginByPhoneFormDTO formDTO); |
|||
|
|||
} |
|||
@ -0,0 +1,237 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.epmet.common.token.constant.LoginConstant; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.CpUserDetailRedis; |
|||
import com.epmet.commons.tools.utils.DateUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.PhoneValidatorUtils; |
|||
import com.epmet.constant.PublicUserLoginConstant; |
|||
import com.epmet.constant.SmsTemplateConstant; |
|||
import com.epmet.dto.PaCustomerDTO; |
|||
import com.epmet.dto.PaUserDTO; |
|||
import com.epmet.dto.form.*; |
|||
import com.epmet.dto.result.CustomerUserResultDTO; |
|||
import com.epmet.dto.result.SaveUserResultDTO; |
|||
import com.epmet.dto.result.SendVerificationCodeResultDTO; |
|||
import com.epmet.dto.result.UserTokenResultDTO; |
|||
import com.epmet.feign.EpmetMessageOpenFeignClient; |
|||
import com.epmet.feign.EpmetThirdFeignClient; |
|||
import com.epmet.jwt.JwtTokenProperties; |
|||
import com.epmet.jwt.JwtTokenUtils; |
|||
import com.epmet.redis.CaptchaRedis; |
|||
import com.epmet.service.PublicUserLoginService; |
|||
import me.chanjar.weixin.common.error.WxErrorException; |
|||
import me.chanjar.weixin.mp.api.WxMpService; |
|||
import me.chanjar.weixin.mp.bean.result.WxMpOAuth2AccessToken; |
|||
import me.chanjar.weixin.mp.bean.result.WxMpUser; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 描述一下 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/7/8 18:31 |
|||
*/ |
|||
@Service |
|||
public class PublicUserLoginServiceImpl implements PublicUserLoginService { |
|||
private static final Logger logger = LoggerFactory.getLogger(PublicUserLoginServiceImpl.class); |
|||
private static final String SEND_SMS_CODE_ERROR = "发送短信验证码异常,手机号[%s],code[%s],msg[%s]"; |
|||
@Autowired |
|||
private WxMpService wxMpService; |
|||
@Autowired |
|||
private EpmetThirdFeignClient epmetThirdFeignClient; |
|||
@Autowired |
|||
private JwtTokenUtils jwtTokenUtils; |
|||
@Autowired |
|||
private JwtTokenProperties jwtTokenProperties; |
|||
@Autowired |
|||
private CpUserDetailRedis cpUserDetailRedis; |
|||
@Autowired |
|||
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; |
|||
@Autowired |
|||
private CaptchaRedis captchaRedis; |
|||
|
|||
|
|||
@Override |
|||
public UserTokenResultDTO wxCodeToToken(PaWxCodeFormDTO formDTO) { |
|||
//1.通过微信code获取用户基本信息
|
|||
WxMpUser wxMpUser = this.getWxMpUser(formDTO.getWxCode()); |
|||
|
|||
//2.将获取的用户基本信息初始化到数据库
|
|||
Result<SaveUserResultDTO> result = epmetThirdFeignClient.saveUser(wxMpUser); |
|||
if (!result.success()) { |
|||
throw new RenException(PublicUserLoginConstant.SAVE_USER_EXCEPTION); |
|||
} |
|||
SaveUserResultDTO resultDTO = result.getData(); |
|||
|
|||
//3.获取用户token
|
|||
String token = this.generateGovWxmpToken(resultDTO.getUserId()); |
|||
//4.保存到redis
|
|||
this.saveLatestGovTokenDto(resultDTO, wxMpUser, token); |
|||
UserTokenResultDTO userTokenResultDTO = new UserTokenResultDTO(); |
|||
userTokenResultDTO.setToken(token); |
|||
return userTokenResultDTO; |
|||
} |
|||
|
|||
private WxMpUser getWxMpUser(String wxCode) { |
|||
WxMpUser wxMpUser = null; |
|||
try { |
|||
WxMpOAuth2AccessToken wxMpOAuth2AccessToken = wxMpService.oauth2getAccessToken(wxCode); |
|||
wxMpUser = wxMpService.oauth2getUserInfo(wxMpOAuth2AccessToken, null); |
|||
} catch (WxErrorException e) { |
|||
logger.error("->[getWxMpUser]::error[{}]", "解析微信用户信息失败", e.getMessage()); |
|||
e.printStackTrace(); |
|||
throw new RenException("解析微信用户信息失败" + e.getMessage()); |
|||
} |
|||
if (null == wxMpUser ) { |
|||
logger.error("wxMpUser is null"); |
|||
throw new RenException("解析微信用户信息失败 wxMpUser is null"); |
|||
} |
|||
if(StringUtils.isBlank(wxMpUser.getUnionId())){ |
|||
logger.error("wxMpUser.getUnionId() is null"); |
|||
// throw new RenException("解析微信用户信息失败");
|
|||
} |
|||
return wxMpUser; |
|||
} |
|||
|
|||
/** |
|||
* @Description 生成token |
|||
**/ |
|||
private String generateGovWxmpToken(String userId) { |
|||
Map<String, Object> map = new HashMap<>(); |
|||
map.put("app", LoginConstant.APP_PUBLIC); |
|||
map.put("client", LoginConstant.CLIENT_MP); |
|||
map.put("userId", userId); |
|||
String token = jwtTokenUtils.createToken(map); |
|||
logger.info("app:" + LoginConstant.APP_PUBLIC + ";client:" + LoginConstant.CLIENT_MP + ";userId:" + userId + ";生成token[" + token + "]"); |
|||
return token; |
|||
} |
|||
|
|||
//保存tokenDto到redis
|
|||
private void saveLatestGovTokenDto(SaveUserResultDTO resultDTO, WxMpUser wxMpUser, String token) { |
|||
TokenDto tokenDTO = new TokenDto(); |
|||
int expire = jwtTokenProperties.getExpire(); |
|||
tokenDTO.setOpenId(wxMpUser.getOpenId()); |
|||
tokenDTO.setUnionId(wxMpUser.getUnionId()); |
|||
tokenDTO.setToken(token); |
|||
//首次初始化时还没有客户
|
|||
tokenDTO.setCustomerId(""); |
|||
tokenDTO.setUserId(resultDTO.getUserId()); |
|||
tokenDTO.setExpireTime(jwtTokenUtils.getExpiration(token).getTime()); |
|||
tokenDTO.setUpdateTime(System.currentTimeMillis()); |
|||
cpUserDetailRedis.set(tokenDTO, expire); |
|||
logger.info("截止时间:" + DateUtils.format(jwtTokenUtils.getExpiration(token), "yyyy-MM-dd HH:mm:ss")); |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO 手机号 |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author sun |
|||
* @Description 公众号登录-发送验证码 |
|||
**/ |
|||
@Override |
|||
public void sendSmsCode(PublicSendSmsCodeFormDTO formDTO) { |
|||
//1、校验手机号是否符合规范
|
|||
if (!PhoneValidatorUtils.isMobile(formDTO.getPhone())) { |
|||
logger.error(String.format(SEND_SMS_CODE_ERROR, formDTO.getPhone(), EpmetErrorCode.ERROR_PHONE.getCode(), EpmetErrorCode.ERROR_PHONE.getMsg())); |
|||
throw new RenException(EpmetErrorCode.ERROR_PHONE.getCode()); |
|||
} |
|||
//2、根据手机号校验用户是否存在
|
|||
Result<CustomerUserResultDTO> Result = epmetThirdFeignClient.checkPaUser(formDTO.getPhone()); |
|||
if (!Result.success()) { |
|||
logger.error(String.format(SEND_SMS_CODE_ERROR, formDTO.getPhone(), Result.getCode(), Result.getMsg())); |
|||
throw new RenException(Result.getCode()); |
|||
} |
|||
CustomerUserResultDTO ResultDTO = Result.getData(); |
|||
//登陆
|
|||
if (formDTO.getIsLogon() && null == ResultDTO.getPaUserResult()) { |
|||
throw new RenException(PublicUserLoginConstant.LOGON_EXCEPTION); |
|||
} |
|||
//注册
|
|||
if (!formDTO.getIsLogon() && null != ResultDTO.getPaUserResult()) { |
|||
throw new RenException(PublicUserLoginConstant.ZHU_CE_EXCEPTION); |
|||
} |
|||
//3、发送短信验证码
|
|||
SendVerificationCodeFormDTO sendVerificationCodeFormDTO = new SendVerificationCodeFormDTO(); |
|||
sendVerificationCodeFormDTO.setMobile(formDTO.getPhone()); |
|||
//登陆或注册对应的短息模板
|
|||
sendVerificationCodeFormDTO.setAliyunTemplateCode(formDTO.getIsLogon() ? SmsTemplateConstant.LGOIN_CONFIRM : SmsTemplateConstant.USER_REGISTER); |
|||
Result<SendVerificationCodeResultDTO> smsCodeResult = epmetMessageOpenFeignClient.sendVerificationCode(sendVerificationCodeFormDTO); |
|||
if (!smsCodeResult.success()) { |
|||
logger.error(String.format(SEND_SMS_CODE_ERROR, formDTO.getPhone(), smsCodeResult.getCode(), smsCodeResult.getMsg())); |
|||
throw new RenException(smsCodeResult.getCode()); |
|||
} |
|||
//4、保存短信验证码(删除现有短信验证码、将新的短信验证码存入Redis)
|
|||
captchaRedis.savePublicSmsCode(formDTO, smsCodeResult.getData().getCode()); |
|||
logger.info(String.format("发送短信验证码成功,手机号[%s]", formDTO.getPhone())); |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author sun |
|||
* @Description 公众号-手机验证码登陆 |
|||
**/ |
|||
@Override |
|||
public UserTokenResultDTO loginByPhone(TokenDto tokenDTO, LoginByPhoneFormDTO formDTO) { |
|||
//1.根据手机号查询到用户、客户信息
|
|||
Result<CustomerUserResultDTO> result = epmetThirdFeignClient.checkPaUser(formDTO.getPhone()); |
|||
if (!result.success()) { |
|||
logger.error(String.format("手机验证码登录异常,手机号[%s],code[%s],msg[%s]", formDTO.getPhone(), result.getCode(), result.getMsg())); |
|||
throw new RenException(result.getCode()); |
|||
} |
|||
CustomerUserResultDTO resultDTO = result.getData(); |
|||
|
|||
//2.用户不存在时不允许登陆
|
|||
PaUserDTO userDTO = resultDTO.getPaUserResult(); |
|||
if (null == userDTO || StringUtils.isBlank(userDTO.getId())) { |
|||
throw new RenException(PublicUserLoginConstant.LOGON_EXCEPTION); |
|||
} |
|||
|
|||
//3.校验验证码是否正确
|
|||
String rightSmsCode = captchaRedis.getPublicSmsCode(formDTO.getPhone()); |
|||
if (!formDTO.getSmsCode().equals(rightSmsCode)) { |
|||
logger.error(String.format("验证码错误code[%s],msg[%s]", EpmetErrorCode.MOBILE_CODE_ERROR.getCode(), EpmetErrorCode.MOBILE_CODE_ERROR.getMsg())); |
|||
throw new RenException(EpmetErrorCode.MOBILE_CODE_ERROR.getCode()); |
|||
} |
|||
//获取缓存中的token
|
|||
TokenDto redisTokenDTO = cpUserDetailRedis.get(LoginConstant.APP_PUBLIC, LoginConstant.CLIENT_MP, userDTO.getId(), TokenDto.class); |
|||
if (redisTokenDTO == null) { |
|||
return null; |
|||
} |
|||
|
|||
//4.判断是否存在客户信息,是否需要生成新的token
|
|||
PaCustomerDTO customerDTO = resultDTO.getPaCustomerResult(); |
|||
if (null != customerDTO && !StringUtils.isBlank(customerDTO.getId())) { |
|||
redisTokenDTO.setCustomerId(customerDTO.getId()); |
|||
int expire = jwtTokenProperties.getExpire(); |
|||
cpUserDetailRedis.set(redisTokenDTO, expire); |
|||
} |
|||
|
|||
//5.登陆成功,访问记录表新增访问记录(访问记录新增失败不应影响用户登陆)
|
|||
SaveUserVisitedFormDTO visited = new SaveUserVisitedFormDTO(); |
|||
visited.setUserId(userDTO.getId()); |
|||
visited.setLogonUserId(tokenDTO.getUserId()); |
|||
visited.setPhone(formDTO.getPhone()); |
|||
Result visitedResult = epmetThirdFeignClient.saveUserVisited(visited); |
|||
if(!visitedResult.success()){ |
|||
logger.error(PublicUserLoginConstant.SAVE_VISITED_EXCEPTION); |
|||
} |
|||
|
|||
//6.返回token
|
|||
UserTokenResultDTO userTokenResultDTO = new UserTokenResultDTO(); |
|||
userTokenResultDTO.setToken(redisTokenDTO.getToken()); |
|||
return userTokenResultDTO; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,35 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<parent> |
|||
<artifactId>epmet-third</artifactId> |
|||
<groupId>com.epmet</groupId> |
|||
<version>2.0.0</version> |
|||
</parent> |
|||
|
|||
|
|||
<artifactId>epmet-third-client</artifactId> |
|||
<packaging>jar</packaging> |
|||
|
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>epmet-commons-tools</artifactId> |
|||
<version>2.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.github.binarywang</groupId> |
|||
<artifactId>weixin-java-mp</artifactId> |
|||
<version>3.6.0</version> |
|||
<scope>compile</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
<build> |
|||
<finalName>${project.artifactId}</finalName> |
|||
</build> |
|||
|
|||
</project> |
|||
@ -0,0 +1,86 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 授权回调url反参表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Data |
|||
public class AuthCodeDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 授权方APPID |
|||
*/ |
|||
private String authAppid; |
|||
|
|||
/** |
|||
* 授权码 |
|||
*/ |
|||
private String authCode; |
|||
|
|||
/** |
|||
* 有效期 10min |
|||
*/ |
|||
private Integer expiresIn; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,91 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 授权信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Data |
|||
public class AuthorizationInfoDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 授权方 appid |
|||
*/ |
|||
private String authorizerAppid; |
|||
|
|||
/** |
|||
* 接口调用令牌(在授权的公众号/小程序具备 API 权限时,才有此返回值) |
|||
*/ |
|||
private String authorizerAccessToken; |
|||
|
|||
/** |
|||
* authorizer_access_token 的有效期(在授权的公众号/小程序具备API权限时,才有此返回值),单位:秒 |
|||
*/ |
|||
private Integer expiresIn; |
|||
|
|||
/** |
|||
* 刷新令牌(在授权的公众号具备API权限时,才有此返回值),刷新令牌主要用于第三方平台获取和刷新已授权用户的 authorizer_access_token。一旦丢失,只能让用户重新授权,才能再次拿到新的刷新令牌。用户重新授权后,之前的刷新令牌会失效 |
|||
*/ |
|||
private String authorizerRefreshToken; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,76 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 授权方的刷新令牌表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Data |
|||
public class AuthorizerRefreshTokenDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 授权方的刷新令牌 |
|||
*/ |
|||
private String authorizerRefreshToken; |
|||
|
|||
/** |
|||
* 授权方appid |
|||
*/ |
|||
private String authorizerAppid; |
|||
|
|||
/** |
|||
* 删除标识 0-否,1-是 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,96 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 代码审核j结果 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Data |
|||
public class CodeAuditResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 代码ID |
|||
*/ |
|||
private String codeId; |
|||
|
|||
/** |
|||
* 审核ID |
|||
*/ |
|||
private String auditId; |
|||
|
|||
/** |
|||
* 审核结果 审核中:auditing,审核成功audit_success,审核被拒绝audit_failed,已撤回:withdrawn,审核延后:delay |
|||
*/ |
|||
private String result; |
|||
|
|||
/** |
|||
* 原因 |
|||
*/ |
|||
private String reason; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 是否删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,121 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 客户代码关联表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Data |
|||
public class CodeCustomerDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 客户名 |
|||
*/ |
|||
private String customerName; |
|||
|
|||
/** |
|||
* 小程序接口调用令牌ID |
|||
*/ |
|||
private String accessTokenId; |
|||
|
|||
/** |
|||
* 模板ID |
|||
*/ |
|||
private String templateId; |
|||
|
|||
/** |
|||
* 小程序类型 居民端resi,工作端work |
|||
*/ |
|||
private String type; |
|||
|
|||
/** |
|||
* APPID |
|||
*/ |
|||
private String appId; |
|||
|
|||
/** |
|||
* 自定义配置 |
|||
*/ |
|||
private String extJson; |
|||
|
|||
/** |
|||
* 代码版本号 |
|||
*/ |
|||
private String userVersion; |
|||
|
|||
/** |
|||
* 代码描述 |
|||
*/ |
|||
private String userDesc; |
|||
|
|||
/** |
|||
* 状态 未审核:unaudited,审核中:auditing,审核成功audit_success,审核被拒绝audit_failed,已撤回:withdrawn,审核延后:delay,发布成功release_success, 发布失败release_failed |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 是否删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,91 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 代码素材 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Data |
|||
public class CodeMediaDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 代码ID |
|||
*/ |
|||
private String codeId; |
|||
|
|||
/** |
|||
* 素材ID |
|||
*/ |
|||
private String mediaId; |
|||
|
|||
/** |
|||
* 素材名 |
|||
*/ |
|||
private String mediaName; |
|||
|
|||
/** |
|||
* 素材类型 图片(image)、语音(voice)、视频(video)和缩略图(thumb) |
|||
*/ |
|||
private String mediaType; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 是否删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,76 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 第三方平台调用凭证 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Data |
|||
public class ComponentAccessTokenDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 令牌 【第三方平台接口的调用凭据】 |
|||
*/ |
|||
private String componentAccessToken; |
|||
|
|||
/** |
|||
* 令牌有效期 单位:s 最长 60*60*2 |
|||
*/ |
|||
private Integer expiresIn; |
|||
|
|||
/** |
|||
* 删除状态 0:正常 1:删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,81 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 微信发送的ticket表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-08 |
|||
*/ |
|||
@Data |
|||
public class ComponentVerifyTicketDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 第三方平台ID |
|||
*/ |
|||
private String appid; |
|||
|
|||
/** |
|||
* component_verify_ticket |
|||
*/ |
|||
private String typeInfo; |
|||
|
|||
/** |
|||
* 票据内容 |
|||
*/ |
|||
private String componentVerifyTicket; |
|||
|
|||
/** |
|||
* 删除标识 0-否,1-是 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,96 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 客户代码操作历史 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Data |
|||
public class CustomerCodeOperationHistoryDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* ID |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 代码ID |
|||
*/ |
|||
private String codeId; |
|||
|
|||
/** |
|||
* 版本 |
|||
*/ |
|||
private String version; |
|||
|
|||
/** |
|||
* 操作类型 操作 上传upload,审核audit,撤回undo,发布release |
|||
*/ |
|||
private String operation; |
|||
|
|||
/** |
|||
* 描述 |
|||
*/ |
|||
private String describe; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 是否删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,91 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 客户小程序关系表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Data |
|||
public class CustomerMpDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* pa_customer的id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* resi,work |
|||
*/ |
|||
private String client; |
|||
|
|||
/** |
|||
* 小程序的appId |
|||
*/ |
|||
private Integer appId; |
|||
|
|||
/** |
|||
* 是否已经授权 0:未授权,1:已授权 |
|||
*/ |
|||
private Integer authorizationFlag; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,86 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 授权给开发者的权限集列表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Data |
|||
public class FuncInfoDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 权限类别 |
|||
*/ |
|||
private String funcscopeCategory; |
|||
|
|||
/** |
|||
* 权限ID |
|||
*/ |
|||
private String funcscopeId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 授权方APPID |
|||
*/ |
|||
private String authorizationInfoAppid; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,111 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 客户根组织信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Data |
|||
public class PaCustomerAgencyDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id,来源于customer.id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 根组织名称 |
|||
*/ |
|||
private String agencyName; |
|||
|
|||
/** |
|||
* 级别 |
|||
*/ |
|||
private String level; |
|||
|
|||
/** |
|||
* 地区编码 |
|||
*/ |
|||
private String areaCode; |
|||
|
|||
/** |
|||
* 省 |
|||
*/ |
|||
private String province; |
|||
|
|||
/** |
|||
* 市 |
|||
*/ |
|||
private String city; |
|||
|
|||
/** |
|||
* 区 |
|||
*/ |
|||
private String district; |
|||
|
|||
/** |
|||
* 党支部数量 |
|||
*/ |
|||
private Integer partybranchnum; |
|||
|
|||
/** |
|||
* 删除标识 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,76 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 客户信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Data |
|||
public class PaCustomerDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户id,本主键和oper_crm.customer.id一致 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户名称,默认是根组织名称 |
|||
*/ |
|||
private String customerName; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,86 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 用户组织关系表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Data |
|||
public class PaCustomerUserAgencyDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id,来源于pa_customer.id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* pa_customer_agency.id |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* pa_user.id |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 删除标识 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,86 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 公众号用户信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Data |
|||
public class PaUserDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* user表的id |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String phone; |
|||
|
|||
/** |
|||
* 姓 |
|||
*/ |
|||
private String realName; |
|||
|
|||
/** |
|||
* 1男2女0未知 |
|||
*/ |
|||
private String gender; |
|||
|
|||
/** |
|||
* 删除标识 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,91 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 公众号登陆记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Data |
|||
public class PaUserVisitedDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* user表的id |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 用户Id pa_user.id |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 登陆手机号对应的openId【pa_user_wechat表手机号对应的openId】 |
|||
*/ |
|||
private String wxOpenId; |
|||
|
|||
/** |
|||
* 登陆用户的openId |
|||
*/ |
|||
private String openId; |
|||
|
|||
/** |
|||
* 登陆用户使用的登陆手机号 |
|||
*/ |
|||
private String phone; |
|||
|
|||
/** |
|||
* 删除标识 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,121 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 公众号用户信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Data |
|||
public class PaUserWechatDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* user表的id |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 用户Id user.id |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 注册用户的微信openId |
|||
*/ |
|||
private String wxOpenId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String unionId; |
|||
|
|||
/** |
|||
* 1男2女0未知 |
|||
*/ |
|||
private String gender; |
|||
|
|||
/** |
|||
* 昵称 |
|||
*/ |
|||
private String nickname; |
|||
|
|||
/** |
|||
* 头像 |
|||
*/ |
|||
private String headImgUrl; |
|||
|
|||
/** |
|||
* 国家 |
|||
*/ |
|||
private String country; |
|||
|
|||
/** |
|||
* 省份 |
|||
*/ |
|||
private String province; |
|||
|
|||
/** |
|||
* 城市 |
|||
*/ |
|||
private String city; |
|||
|
|||
/** |
|||
* 语言 |
|||
*/ |
|||
private String language; |
|||
|
|||
/** |
|||
* 删除标识 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,76 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 预授权码历史记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Data |
|||
public class PreAuthTokenDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 预授权码 【第三方平台方实现授权托管的必备信息,每个预授权码有效期为 10 分钟。需要先获取令牌才能调用】 |
|||
*/ |
|||
private String preAuthToken; |
|||
|
|||
/** |
|||
* 预授权码有效期 单位:s 最长 60*60*2 |
|||
*/ |
|||
private Integer expiresIn; |
|||
|
|||
/** |
|||
* 删除状态 0:正常 1:删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,91 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 获取/刷新接口调用令牌记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Data |
|||
public class RefreshAuthorizerAccessTokenDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 授权方令牌 |
|||
*/ |
|||
private String authorizerAccessToken; |
|||
|
|||
/** |
|||
* 有效期,单位:秒 |
|||
*/ |
|||
private Integer expiresIn; |
|||
|
|||
/** |
|||
* 刷新令牌 |
|||
*/ |
|||
private String authorizerRefreshToken; |
|||
|
|||
/** |
|||
* 授权方APPID |
|||
*/ |
|||
private String authAppid; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,50 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/8 17:53 |
|||
*/ |
|||
@Data |
|||
public class AuthCodeFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -6163303184086480522L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 授权方AppId |
|||
*/ |
|||
private String authAppId; |
|||
|
|||
/** |
|||
* 授权码 |
|||
*/ |
|||
private String authCode; |
|||
|
|||
/** |
|||
* 有效期 10min |
|||
*/ |
|||
private Integer expiresIn; |
|||
|
|||
/** |
|||
* 删除状态 0:正常 1:已删除 |
|||
*/ |
|||
private Integer delFlag = 0; |
|||
|
|||
/** |
|||
* 创建者 |
|||
*/ |
|||
private String createdBy = "APP_USER"; |
|||
|
|||
/** |
|||
* 更新者 |
|||
*/ |
|||
private String updatedBy = "APP_USER"; |
|||
} |
|||
@ -0,0 +1,49 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/9 10:30 |
|||
*/ |
|||
@Data |
|||
public class AuthorizationInfoFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -1117036477221128930L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 授权方 appid |
|||
*/ |
|||
private String authorizerAppid; |
|||
|
|||
/** |
|||
* 接口调用令牌(在授权的公众号/小程序具备 API 权限时,才有此返回值) |
|||
*/ |
|||
private String authorizerAccessToken; |
|||
|
|||
/** |
|||
* authorizer_access_token 的有效期(在授权的公众号/小程序具备API权限时,才有此返回值),单位:秒 |
|||
*/ |
|||
private Integer expiresIn; |
|||
|
|||
/** |
|||
* 刷新令牌(在授权的公众号具备API权限时,才有此返回值),刷新令牌主要用于第三方平台获取和刷新已授权用户的 authorizer_access_token。一旦丢失,只能让用户重新授权,才能再次拿到新的刷新令牌。用户重新授权后,之前的刷新令牌会失效 |
|||
*/ |
|||
private String authorizerRefreshToken; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Integer delFlag = 0; |
|||
|
|||
private String createdBy = "APP_USER"; |
|||
|
|||
private String updatedBy = "APP_USER"; |
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/9 17:29 |
|||
*/ |
|||
@Data |
|||
public class AuthorizerAccessTokenFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 268927093061495006L; |
|||
|
|||
/** |
|||
* 授权方令牌 |
|||
*/ |
|||
private String authorizerAccessToken; |
|||
|
|||
/** |
|||
* 有效期,单位:秒 |
|||
*/ |
|||
private Integer expiresIn; |
|||
|
|||
/** |
|||
* 刷新令牌 |
|||
*/ |
|||
private String authorizerRefreshToken; |
|||
|
|||
/** |
|||
* 授权方APPID |
|||
*/ |
|||
private String authAppid; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
private Integer delFlag = 0; |
|||
|
|||
private String createdBy = "APP_USER"; |
|||
|
|||
private String updatedBy = "APP_USER"; |
|||
} |
|||
@ -0,0 +1,46 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/7/9 14:24 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class CodeUploadFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1295337818281424509L; |
|||
/** |
|||
* 小程序接口调用令牌ID |
|||
*/ |
|||
private String accessTokenId; |
|||
/** |
|||
* 小程序类型 居民端resi, 工作段work |
|||
*/ |
|||
private String type; |
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
/** |
|||
* 代码库中的代码模板 ID |
|||
*/ |
|||
private String templateId; |
|||
/** |
|||
* 第三方自定义的配置 |
|||
*/ |
|||
private String extJson; |
|||
/** |
|||
* 代码版本号 |
|||
*/ |
|||
private String userVersion; |
|||
/** |
|||
* 代码描述 |
|||
*/ |
|||
private String userDesc; |
|||
} |
|||
@ -0,0 +1,40 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/9 8:54 |
|||
*/ |
|||
@Data |
|||
public class ComponentAccessTokenFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -2860559047843944065L; |
|||
|
|||
/** |
|||
* 令牌 【第三方平台接口的调用凭据】 |
|||
*/ |
|||
private String componentAccessToken; |
|||
|
|||
/** |
|||
* 令牌有效期 单位:s 最长 60*60*2 |
|||
*/ |
|||
private Integer expiresIn; |
|||
|
|||
/** |
|||
* 删除状态 0:正常 1:删除 |
|||
*/ |
|||
private Integer delFlag = 0; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy = "APP_USER"; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy = "APP_USER"; |
|||
} |
|||
@ -0,0 +1,51 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/7 11:12 |
|||
*/ |
|||
@Data |
|||
public class ComponentVerifyTicketFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -6547893374373422628L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 第三方平台ID |
|||
*/ |
|||
private String appid; |
|||
|
|||
/** |
|||
* component_verify_ticket |
|||
*/ |
|||
private String typeInfo = "component_verify_ticket"; |
|||
|
|||
/** |
|||
* 票据内容 |
|||
*/ |
|||
private String componentVerifyTicket; |
|||
|
|||
/** |
|||
* 删除标识 0-否,1-是 |
|||
*/ |
|||
private String delFlag = "0"; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy = "APP_USER"; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy = "APP_USER"; |
|||
} |
|||
@ -0,0 +1,56 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 公众号-创建组织-接口入参 |
|||
*/ |
|||
@Data |
|||
public class CreateAgencyFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -6547893374373422628L; |
|||
|
|||
public interface AddUserInternalGroup {} |
|||
|
|||
/** |
|||
* 根组织名称 |
|||
*/ |
|||
@NotBlank(message = "组织名称不能为空") |
|||
private String agencyName; |
|||
|
|||
/** |
|||
* 级别 |
|||
*/ |
|||
@NotBlank(message = "组织级别不能为空") |
|||
private String level; |
|||
|
|||
/** |
|||
* 地区编码 |
|||
*/ |
|||
@NotBlank(message = "地区编码不能为空") |
|||
private String areaCode; |
|||
|
|||
/** |
|||
* 省(中国字) |
|||
*/ |
|||
private String province = ""; |
|||
|
|||
/** |
|||
* 市(中国字) |
|||
*/ |
|||
private String city = ""; |
|||
|
|||
/** |
|||
* 区(中国字) |
|||
*/ |
|||
private String district = ""; |
|||
|
|||
/** |
|||
* 党支部数量 |
|||
*/ |
|||
private Integer partyBranchNum = 0; |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/9 10:43 |
|||
*/ |
|||
@Data |
|||
public class FuncInfoFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 5468844633023377254L; |
|||
|
|||
/** |
|||
* 权限类别 |
|||
*/ |
|||
private String funcscopeCategory; |
|||
|
|||
/** |
|||
* 权限ID |
|||
*/ |
|||
private String funcscopeId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 授权方APPID |
|||
*/ |
|||
private String authorizationInfoAppid; |
|||
|
|||
private Integer delFlag = 0; |
|||
|
|||
private String createdBy = "APP_USER"; |
|||
|
|||
private String updatedBy = "APP_USER"; |
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 公众号-查询我的信息-接口入参 |
|||
*/ |
|||
@Data |
|||
public class MyInfoFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -6547893374373422628L; |
|||
|
|||
public interface AddUserInternalGroup { |
|||
} |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
@NotBlank(message = "客户Id不能为空", groups = {MyInfoFormDTO.AddUserInternalGroup.class}) |
|||
private String customerId; |
|||
|
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/9 9:15 |
|||
*/ |
|||
@Data |
|||
public class PreAuthTokenFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 2970040842154724385L; |
|||
|
|||
/** |
|||
* 预授权码 【第三方平台方实现授权托管的必备信息,每个预授权码有效期为 10 分钟。需要先获取令牌才能调用】 |
|||
*/ |
|||
private String preAuthToken; |
|||
|
|||
/** |
|||
* 预授权码有效期 单位:s 最长 60*60*2 |
|||
*/ |
|||
private Integer expiresIn; |
|||
|
|||
/** |
|||
* 删除状态 0:正常 1:删除 |
|||
*/ |
|||
private Integer delFlag = 0; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy = "APP_USER"; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy = "APP_USER"; |
|||
|
|||
} |
|||
@ -0,0 +1,54 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 公众号-手机号注册-接口入参 |
|||
*/ |
|||
@Data |
|||
public class RegisterFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -6547893374373422628L; |
|||
|
|||
public interface AddUserInternalGroup { |
|||
} |
|||
|
|||
public interface AddUserShowGroup extends CustomerClientShowGroup { |
|||
} |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
@NotBlank(message = "手机号不能为空", groups = {AddUserInternalGroup.class, AddUserShowGroup.class}) |
|||
private String phone; |
|||
|
|||
/** |
|||
* 手机短信验证码 |
|||
*/ |
|||
@NotBlank(message = "验证码不能为空", groups = {AddUserShowGroup.class}) |
|||
private String smsCode; |
|||
|
|||
/** |
|||
* 姓氏 |
|||
*/ |
|||
@NotBlank(message = "姓氏不能为空", groups = {AddUserShowGroup.class}) |
|||
private String surName; |
|||
|
|||
/** |
|||
* 性别 1男2女0未知 |
|||
*/ |
|||
@NotNull(message = "用户性别不能为空", groups = {AddUserShowGroup.class}) |
|||
private Integer gender; |
|||
|
|||
/** |
|||
* token中userId |
|||
*/ |
|||
private String userId; |
|||
|
|||
} |
|||
@ -0,0 +1,34 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 公众号-用户登陆新增访问记录-接口入参 |
|||
*/ |
|||
@Data |
|||
public class SaveUserVisitedFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -6547893374373422628L; |
|||
|
|||
public interface AddUserInternalGroup {} |
|||
|
|||
/** |
|||
* 登陆手机号对应的userId |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 登陆人userId |
|||
*/ |
|||
private String logonUserId; |
|||
|
|||
/** |
|||
* 登陆手机号 |
|||
*/ |
|||
private String phone; |
|||
|
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/6 9:57 |
|||
*/ |
|||
@Data |
|||
public class ThirdPlatformEventFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -8855993636150332559L; |
|||
|
|||
public interface ThirdPlatForm extends CustomerClientShowGroup{} |
|||
|
|||
/** |
|||
* 时间戳 |
|||
*/ |
|||
@NotBlank(message = "timeStamp不能为空",groups = {ThirdPlatForm.class}) |
|||
private String timeStamp; |
|||
|
|||
/** |
|||
* 随机数 |
|||
*/ |
|||
@NotBlank(message = "nonce不能为空",groups = {ThirdPlatForm.class}) |
|||
private String nonce; |
|||
|
|||
/** |
|||
* 消息体签名 |
|||
*/@NotBlank(message = "msgSignature不能为空",groups = {ThirdPlatForm.class}) |
|||
|
|||
private String msgSignature; |
|||
|
|||
/** |
|||
* 消息体 |
|||
*/ |
|||
@NotBlank(message = "postData不能为空",groups = {ThirdPlatForm.class}) |
|||
private String postData; |
|||
|
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/7 10:28 |
|||
*/ |
|||
@Data |
|||
public class WeChatPlatformAuthCodeFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -9047434066325122697L; |
|||
|
|||
/** |
|||
* 预授权码 |
|||
*/ |
|||
private String authCode; |
|||
|
|||
/** |
|||
* 有效期,单位:秒 |
|||
*/ |
|||
private Integer expiresIn; |
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 公众号-查询组织级别-接口返参 |
|||
*/ |
|||
@Data |
|||
public class AgencyLevelListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3253989119352850315L; |
|||
|
|||
/** |
|||
* 机关级别(社区级:community, 乡(镇、街道)级:street, 区县级: district, 市级: city 省级:province) |
|||
*/ |
|||
private String levelKey; |
|||
/** |
|||
* 级别对应的名称 |
|||
*/ |
|||
private String levelName; |
|||
|
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 权限集列表 |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/8 13:39 |
|||
*/ |
|||
@Data |
|||
public class AuthorizationInfoResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3253989119352850315L; |
|||
|
|||
/** |
|||
* 授权方 appid |
|||
*/ |
|||
private String authorizer_appid; |
|||
|
|||
/** |
|||
* 接口调用令牌(在授权的公众号/小程序具备 API 权限时,才有此返回值) |
|||
*/ |
|||
private String authorizer_access_token; |
|||
|
|||
/** |
|||
* authorizer_access_token 的有效期(在授权的公众号/小程序具备API权限时,才有此返回值),单位:秒 |
|||
*/ |
|||
private Integer expires_in; |
|||
|
|||
/** |
|||
* 刷新令牌(在授权的公众号具备API权限时,才有此返回值),刷新令牌主要用于第三方平台获取和刷新已授权用户的 authorizer_access_token。 |
|||
* 一旦丢失,只能让用户重新授权,才能再次拿到新的刷新令牌。用户重新授权后,之前的刷新令牌会失效 |
|||
*/ |
|||
private String authorizer_refresh_token; |
|||
|
|||
/** |
|||
* 授权给开发者的权限集列表 |
|||
*/ |
|||
private List<Map> func_info; |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 公众号-创建组织-接口返参 |
|||
*/ |
|||
@Data |
|||
public class CreateAgencyResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3253989119352850315L; |
|||
|
|||
/** |
|||
* 新增客户Id |
|||
*/ |
|||
private String customerId; |
|||
/** |
|||
* 包含customerId的token |
|||
*/ |
|||
private String token; |
|||
|
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import com.epmet.dto.PaCustomerDTO; |
|||
import com.epmet.dto.PaUserDTO; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 根据手机号查询用户信息、客户信息-接口返参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class CustomerUserResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 5214475907074876716L; |
|||
|
|||
/** |
|||
* 用户信息 |
|||
*/ |
|||
private PaUserDTO paUserResult; |
|||
/** |
|||
* 用户对应的客户信息 |
|||
*/ |
|||
private PaCustomerDTO paCustomerResult; |
|||
} |
|||
@ -0,0 +1,53 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 公众号-查询我的信息-接口返参 |
|||
*/ |
|||
@Data |
|||
public class MyInfoResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3253989119352850315L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId = ""; |
|||
/** |
|||
* 组织名称 |
|||
*/ |
|||
private String agencyName = ""; |
|||
/** |
|||
* 组织级别 |
|||
*/ |
|||
private String level = ""; |
|||
/** |
|||
* 省 |
|||
*/ |
|||
private String province = ""; |
|||
/** |
|||
* 市 |
|||
*/ |
|||
private String city = ""; |
|||
/** |
|||
* 区 |
|||
*/ |
|||
private String district = ""; |
|||
/** |
|||
* 党支部数量 |
|||
*/ |
|||
private Integer partyBranchNum; |
|||
/** |
|||
* 居民端授权状态(0:未授权,1:已授权) |
|||
*/ |
|||
private Integer resiAuthorization; |
|||
/** |
|||
* 政府端授权状态(0:未授权,1:已授权) |
|||
*/ |
|||
private Integer workAuthorization; |
|||
|
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/6 9:08 |
|||
*/ |
|||
@Data |
|||
public class ResultBean implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -1528288965079007980L; |
|||
|
|||
private Object data; |
|||
|
|||
private String msg; |
|||
|
|||
private String errorMsg; |
|||
|
|||
private Integer code; |
|||
|
|||
} |
|||
@ -0,0 +1,21 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 授权用户信息时新增或更新用户信息-接口返参 |
|||
*/ |
|||
@Data |
|||
public class SaveUserResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3253989119352850315L; |
|||
|
|||
/** |
|||
* 新增或已有用户的Id |
|||
*/ |
|||
private String userId; |
|||
|
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/9 17:01 |
|||
*/ |
|||
@Data |
|||
public class WillOverDueResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -9073227815312384742L; |
|||
|
|||
/** |
|||
* 授权方令牌 |
|||
*/ |
|||
private String authorizerAccessToken; |
|||
|
|||
/** |
|||
* 刷新令牌 |
|||
*/ |
|||
private String authorizerRefreshToken; |
|||
|
|||
/** |
|||
* 授权方AppId |
|||
*/ |
|||
private String authAppId; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,52 @@ |
|||
package com.epmet.feign; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.SaveUserVisitedFormDTO; |
|||
import com.epmet.dto.result.CustomerUserResultDTO; |
|||
import com.epmet.dto.result.SaveUserResultDTO; |
|||
import com.epmet.feign.fallback.EpmetThirdFeignClientFallback; |
|||
import me.chanjar.weixin.mp.bean.result.WxMpUser; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
/** |
|||
* 本服务对外开放的API,其他服务通过引用此client调用该服务 |
|||
* |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/5 14:45 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = EpmetThirdFeignClientFallback.class) |
|||
|
|||
public interface EpmetThirdFeignClient { |
|||
|
|||
/** |
|||
* @param wxMpUser |
|||
* @return |
|||
* @Author sun |
|||
* @Description 根据openId新增或更新用户信息 |
|||
**/ |
|||
@PostMapping(value = "third/pauser/saveuser", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|||
Result<SaveUserResultDTO> saveUser(@RequestBody WxMpUser wxMpUser); |
|||
|
|||
/** |
|||
* @param phone |
|||
* @return |
|||
* @Author sun |
|||
* @Description 根据手机号查询公众号用户基本信息,校验用户是否存在 |
|||
**/ |
|||
@PostMapping(value = "third/pauser/checkpauser/{phone}") |
|||
Result<CustomerUserResultDTO> checkPaUser(@PathVariable("phone") String phone); |
|||
|
|||
/** |
|||
* @param visited |
|||
* @return |
|||
* @Author sun |
|||
* @Description 用户登陆,新增访问记录数据 |
|||
**/ |
|||
@PostMapping(value = "third/pauservisited/saveuservisited") |
|||
Result saveUserVisited(@RequestBody SaveUserVisitedFormDTO visited); |
|||
} |
|||
@ -0,0 +1,34 @@ |
|||
package com.epmet.feign.fallback; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.ModuleUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.SaveUserVisitedFormDTO; |
|||
import com.epmet.dto.result.CustomerUserResultDTO; |
|||
import com.epmet.dto.result.SaveUserResultDTO; |
|||
import com.epmet.feign.EpmetThirdFeignClient; |
|||
import me.chanjar.weixin.mp.bean.result.WxMpUser; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/5 14:46 |
|||
*/ |
|||
@Component |
|||
public class EpmetThirdFeignClientFallback implements EpmetThirdFeignClient { |
|||
|
|||
@Override |
|||
public Result<SaveUserResultDTO> saveUser(WxMpUser wxMpUser) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPMET_THIRD_SERVER, "saveUser", wxMpUser); |
|||
} |
|||
|
|||
@Override |
|||
public Result<CustomerUserResultDTO> checkPaUser(String phone) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPMET_THIRD_SERVER, "checkPaUser", phone); |
|||
} |
|||
|
|||
@Override |
|||
public Result saveUserVisited(SaveUserVisitedFormDTO visited) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPMET_THIRD_SERVER, "saveUserVisited", visited); |
|||
} |
|||
} |
|||
@ -0,0 +1,31 @@ |
|||
HELP.md |
|||
target/ |
|||
!.mvn/wrapper/maven-wrapper.jar |
|||
!**/src/main/** |
|||
!**/src/test/** |
|||
|
|||
### STS ### |
|||
.apt_generated |
|||
.classpath |
|||
.factorypath |
|||
.project |
|||
.settings |
|||
.springBeans |
|||
.sts4-cache |
|||
|
|||
### IntelliJ IDEA ### |
|||
.idea |
|||
*.iws |
|||
*.iml |
|||
*.ipr |
|||
|
|||
### NetBeans ### |
|||
/nbproject/private/ |
|||
/nbbuild/ |
|||
/dist/ |
|||
/nbdist/ |
|||
/.nb-gradle/ |
|||
build/ |
|||
|
|||
### VS Code ### |
|||
.vscode/ |
|||
@ -0,0 +1,11 @@ |
|||
FROM java:8 |
|||
|
|||
RUN export LANG="zh_CN.UTF-8" |
|||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime |
|||
RUN echo 'Asia/Shanghai' > /etc/timezone |
|||
|
|||
COPY ./target/*.jar ./app.jar |
|||
|
|||
EXPOSE 8110 |
|||
|
|||
ENTRYPOINT ["sh", "-c", "$RUN_INSTRUCT"] |
|||
@ -0,0 +1,17 @@ |
|||
version: "3.7" |
|||
services: |
|||
epmet-third-server: |
|||
container_name: epmet-third-server-dev |
|||
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.6 |
|||
ports: |
|||
- "8110:8110" |
|||
network_mode: host # 使用现有网络 |
|||
volumes: |
|||
- "/opt/epmet-cloud-logs/dev:/logs" |
|||
environment: |
|||
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" |
|||
deploy: |
|||
resources: |
|||
limits: |
|||
cpus: '0.1' |
|||
memory: 250M |
|||
@ -0,0 +1,17 @@ |
|||
version: "3.7" |
|||
services: |
|||
epmet-third-server: |
|||
container_name: epmet-third-server-test |
|||
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-third-server:0.0.1 |
|||
ports: |
|||
- "8110:8110" |
|||
network_mode: host # 使用现有网络 |
|||
volumes: |
|||
- "/opt/epmet-cloud-logs/test:/logs" |
|||
environment: |
|||
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" |
|||
deploy: |
|||
resources: |
|||
limits: |
|||
cpus: '0.1' |
|||
memory: 250M |
|||
@ -0,0 +1,224 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
<version>0.0.6</version> |
|||
|
|||
<parent> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>epmet-third</artifactId> |
|||
<version>2.0.0</version> |
|||
</parent> |
|||
|
|||
<artifactId>epmet-third-server</artifactId> |
|||
<packaging>jar</packaging> |
|||
|
|||
<properties> |
|||
<aliyun.core.version>3.2.2</aliyun.core.version> |
|||
<aliyun.dysmsapi.version>1.1.0</aliyun.dysmsapi.version> |
|||
<qcloud.qcloudsms.version>1.0.5</qcloud.qcloudsms.version> |
|||
<freemarker.version>2.3.28</freemarker.version> |
|||
</properties> |
|||
|
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>epmet-third-client</artifactId> |
|||
<version>2.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>epmet-commons-tools</artifactId> |
|||
<version>2.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>epmet-commons-mybatis</artifactId> |
|||
<version>2.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-web</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework</groupId> |
|||
<artifactId>spring-context-support</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-actuator</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.alibaba.cloud</groupId> |
|||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.alibaba.cloud</groupId> |
|||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.aliyun</groupId> |
|||
<artifactId>aliyun-java-sdk-core</artifactId> |
|||
<version>${aliyun.core.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.aliyun</groupId> |
|||
<artifactId>aliyun-java-sdk-dysmsapi</artifactId> |
|||
<version>${aliyun.dysmsapi.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.github.qcloudsms</groupId> |
|||
<artifactId>qcloudsms</artifactId> |
|||
<version>${qcloud.qcloudsms.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.sun.mail</groupId> |
|||
<artifactId>javax.mail</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.freemarker</groupId> |
|||
<artifactId>freemarker</artifactId> |
|||
<version>${freemarker.version}</version> |
|||
</dependency> |
|||
<!-- 替换Feign原生httpclient --> |
|||
<dependency> |
|||
<groupId>io.github.openfeign</groupId> |
|||
<artifactId>feign-httpclient</artifactId> |
|||
<version>10.3.0</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.flywaydb</groupId> |
|||
<artifactId>flyway-core</artifactId> |
|||
<!--<version>5.1.1</version>--> |
|||
</dependency> |
|||
|
|||
<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp --> |
|||
<dependency> |
|||
<groupId>com.squareup.okhttp3</groupId> |
|||
<artifactId>okhttp</artifactId> |
|||
<version>4.0.0</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-test</artifactId> |
|||
<scope>test</scope> |
|||
<exclusions> |
|||
<exclusion> |
|||
<groupId>org.junit.vintage</groupId> |
|||
<artifactId>junit-vintage-engine</artifactId> |
|||
</exclusion> |
|||
</exclusions> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.dom4j</groupId> |
|||
<artifactId>dom4j</artifactId> |
|||
<version>2.1.3</version> |
|||
<scope>compile</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.github.binarywang</groupId> |
|||
<artifactId>weixin-java-common</artifactId> |
|||
<version>3.6.0</version> |
|||
<scope>compile</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>epmet-common-clienttoken</artifactId> |
|||
<version>2.0.0</version> |
|||
<scope>compile</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
<build> |
|||
<finalName>${project.artifactId}</finalName> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>org.apache.maven.plugins</groupId> |
|||
<artifactId>maven-surefire-plugin</artifactId> |
|||
<configuration> |
|||
<skipTests>true</skipTests> |
|||
</configuration> |
|||
</plugin> |
|||
</plugins> |
|||
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory> |
|||
<resources> |
|||
<resource> |
|||
<filtering>true</filtering> |
|||
<directory>${basedir}/src/main/resources</directory> |
|||
</resource> |
|||
</resources> |
|||
</build> |
|||
<profiles> |
|||
<profile> |
|||
<id>dev</id> |
|||
<activation> |
|||
<activeByDefault>true</activeByDefault> |
|||
</activation> |
|||
<properties> |
|||
<server.port>8110</server.port> |
|||
<spring.profiles.active>dev</spring.profiles.active> |
|||
|
|||
<!-- 数据库配置--> |
|||
<spring.datasource.druid.url> |
|||
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_third?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]> |
|||
</spring.datasource.druid.url> |
|||
<spring.datasource.druid.username>epmet_third_user</spring.datasource.druid.username> |
|||
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password> |
|||
<!-- redis配置 --> |
|||
<spring.redis.index>0</spring.redis.index> |
|||
<spring.redis.host>192.168.1.130</spring.redis.host> |
|||
<spring.redis.port>6379</spring.redis.port> |
|||
<spring.redis.password>123456</spring.redis.password> |
|||
<!-- nacos --> |
|||
<nacos.register-enabled>true</nacos.register-enabled> |
|||
<nacos.server-addr>122.152.200.70:8848</nacos.server-addr> |
|||
<nacos.discovery.namespace>fcd6fc8f-ca3a-4b01-8026-2b05cdc5976b</nacos.discovery.namespace> |
|||
<nacos.config.namespace></nacos.config.namespace> |
|||
<nacos.config.group></nacos.config.group> |
|||
<nacos.config-enabled>false</nacos.config-enabled> |
|||
<nacos.ip/> |
|||
|
|||
<spring.flyway.enabled>false</spring.flyway.enabled> |
|||
</properties> |
|||
</profile> |
|||
<profile> |
|||
<id>test</id> |
|||
<!--<activation> |
|||
<activeByDefault>true</activeByDefault> |
|||
</activation>--> |
|||
<properties> |
|||
<server.port>8110</server.port> |
|||
<spring.profiles.active>test</spring.profiles.active> |
|||
|
|||
<!-- 数据库配置--> |
|||
<spring.datasource.druid.url> |
|||
<![CDATA[jdbc:mysql://rm-m5ef9t617j6o5eup7.mysql.rds.aliyuncs.com:3306/epmet_third?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]> |
|||
</spring.datasource.druid.url> |
|||
<spring.datasource.druid.username>epmet</spring.datasource.druid.username> |
|||
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password> |
|||
<!-- redis配置 --> |
|||
<spring.redis.index>0</spring.redis.index> |
|||
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host> |
|||
<spring.redis.port>6379</spring.redis.port> |
|||
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password> |
|||
<!-- nacos --> |
|||
<nacos.register-enabled>true</nacos.register-enabled> |
|||
<nacos.server-addr>192.168.10.150:8848</nacos.server-addr> |
|||
<nacos.discovery.namespace>67e3c350-533e-4d7c-9f8f-faf1b4aa82ae</nacos.discovery.namespace> |
|||
<nacos.config.namespace></nacos.config.namespace> |
|||
<nacos.config.group></nacos.config.group> |
|||
<nacos.config-enabled>false</nacos.config-enabled> |
|||
<nacos.ip/> |
|||
|
|||
<spring.flyway.enabled>true</spring.flyway.enabled> |
|||
</properties> |
|||
</profile> |
|||
</profiles> |
|||
|
|||
</project> |
|||
@ -0,0 +1,17 @@ |
|||
package com.epmet; |
|||
|
|||
import org.springframework.boot.SpringApplication; |
|||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; |
|||
import org.springframework.cloud.openfeign.EnableFeignClients; |
|||
|
|||
@SpringBootApplication |
|||
@EnableDiscoveryClient |
|||
@EnableFeignClients |
|||
public class EpmetThirdApplication { |
|||
|
|||
public static void main(String[] args) { |
|||
SpringApplication.run(EpmetThirdApplication.class, args); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,40 @@ |
|||
package com.epmet.aspect; |
|||
|
|||
import com.epmet.commons.tools.aspect.BaseRequestLogAspect; |
|||
import org.aspectj.lang.ProceedingJoinPoint; |
|||
import org.aspectj.lang.annotation.Around; |
|||
import org.aspectj.lang.annotation.Aspect; |
|||
import org.springframework.core.annotation.Order; |
|||
import org.springframework.stereotype.Component; |
|||
import org.springframework.web.context.request.RequestAttributes; |
|||
import org.springframework.web.context.request.RequestContextHolder; |
|||
import org.springframework.web.context.request.ServletRequestAttributes; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
|
|||
/** |
|||
* 日志/异常处理切面实现,调用父类方法完成日志记录和异常处理。 |
|||
*/ |
|||
@Aspect |
|||
@Component |
|||
@Order(0) |
|||
public class RequestLogAspect extends BaseRequestLogAspect { |
|||
|
|||
@Override |
|||
@Around(value = "execution(* com.epmet.controller.*Controller*.*(..)) ") |
|||
public Object proceed(ProceedingJoinPoint point) throws Throwable { |
|||
return super.proceed(point, getRequest()); |
|||
} |
|||
|
|||
/** |
|||
* 获取Request对象 |
|||
* |
|||
* @return |
|||
*/ |
|||
private HttpServletRequest getRequest() { |
|||
RequestAttributes ra = RequestContextHolder.getRequestAttributes(); |
|||
ServletRequestAttributes sra = (ServletRequestAttributes) ra; |
|||
return sra.getRequest(); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
/** |
|||
* Copyright (c) 2018 人人开源 All rights reserved. |
|||
* |
|||
* https://www.renren.io
|
|||
* |
|||
* 版权所有,侵权必究! |
|||
*/ |
|||
|
|||
package com.epmet.config; |
|||
|
|||
import com.epmet.commons.tools.config.ModuleConfig; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* 模块配置信息 |
|||
* |
|||
* @author Mark sunlightcs@gmail.com |
|||
* @since 1.0.0 |
|||
*/ |
|||
@Service |
|||
public class ModuleConfigImpl implements ModuleConfig { |
|||
@Override |
|||
public String getName() { |
|||
return "epmetthird"; |
|||
} |
|||
} |
|||
@ -0,0 +1,45 @@ |
|||
package com.epmet.constant; |
|||
|
|||
/** |
|||
* @Description |
|||
* @author zxc |
|||
*/ |
|||
public interface ModuleConstant { |
|||
|
|||
String FUNC_INFO = "func_info"; |
|||
|
|||
//获得授权事件的票据 如下
|
|||
String UTF8 = "UTF-8"; |
|||
String MSG_SIGNATURE = "msg_signature"; |
|||
String TIMESTAMP = "timestamp"; |
|||
String NONCE = "nonce"; |
|||
String INFO_TYPE = "InfoType"; |
|||
String TICKET_UNDERLINE_KEY = "component_verify_ticket"; |
|||
String TICKET_KEY = "ComponentVerifyTicket"; |
|||
String UNAUTHORIZED = "unauthorized"; |
|||
String NULL_CHAR = ""; |
|||
String SUCCESS = "success"; |
|||
|
|||
// 获取 component_access_token 如下
|
|||
String COMPONENT_APPID = "component_appid"; |
|||
String COMPONENT_APPSECRET = "component_appsecret"; |
|||
String COMPONENT_ACCESS_TOKEN = "component_access_token"; |
|||
String EXPIRES_IN = "expires_in"; |
|||
|
|||
//获取预授权码 如下
|
|||
String PRE_AUTH_CODE = "pre_auth_code"; |
|||
|
|||
//使用授权码获取授权信息 如下
|
|||
String AUTHORIZATION_CODE = "authorization_code"; |
|||
String AUTHORIZATION_INFO = "authorization_info"; |
|||
|
|||
//获取/刷新接口调用令牌 如下
|
|||
String AUTHORIZER_APPID = "authorizer_appid"; |
|||
String AUTHORIZER_REFRESH_TOKEN = "authorizer_refresh_token"; |
|||
String AUTHORIZER_ACCESS_TOKEN = "authorizer_access_token"; |
|||
|
|||
//授权回调URL 如下
|
|||
String AUTH_CODE = "auth_code"; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,63 @@ |
|||
package com.epmet.constant; |
|||
|
|||
/** |
|||
* @Description 公众号-常量 |
|||
* @author sun |
|||
*/ |
|||
public interface PaConstant { |
|||
|
|||
/** |
|||
* 手机号注册 |
|||
*/ |
|||
String PHONE_EXCEPTION = "手机号已存在,不允许再次注册"; |
|||
/** |
|||
* 更新用户信息失败 |
|||
*/ |
|||
String UPDATE_USER_EXCEPTION = "更新用户信息失败"; |
|||
/** |
|||
* 根据userId查询pa_user_wechat表失败 |
|||
*/ |
|||
String SELECT_WECHAT_EXCEPTION = "获取用户微信信息失败"; |
|||
/** |
|||
* 保存用户访问记录数据失败 |
|||
*/ |
|||
String SAVE_VISITED_EXCEPTION = "保存用户访问记录数据失败"; |
|||
|
|||
/** |
|||
* 组织级别对应的key、name |
|||
*/ |
|||
String PROVINCE_KEY = "province"; |
|||
String PROVINCE_NAME = "省级"; |
|||
String CITY_KEY = "city"; |
|||
String CITY_NAME = "区县级"; |
|||
String STREET_KEY = "street"; |
|||
String STREET_NAME = "乡(镇、街道)级"; |
|||
String COMMUNITY_KEY = "community"; |
|||
String COMMUNITY_NAME = "社区级"; |
|||
|
|||
/** |
|||
* 客户小程序关系表小程序所属端 |
|||
*/ |
|||
String RESI_CLIENT = "resi"; |
|||
String WORK_CLIENT = "work"; |
|||
|
|||
/** |
|||
* 查询客户组织信息失败 |
|||
*/ |
|||
String SELECT_AGENCY_EXCEPTION = "获取客户组织信息失败"; |
|||
/** |
|||
* 查询客户小程序授权信息失败 |
|||
*/ |
|||
String CUSTOMER_MP_EXCEPTION = "获取客户小程序授权信息失败"; |
|||
|
|||
/** |
|||
* 客户小程序所属端key值 |
|||
*/ |
|||
String CLIENT_RESI = "resi"; |
|||
String CLIENT_WORK = "work"; |
|||
|
|||
/** |
|||
* 获取缓存中token信息失败 |
|||
*/ |
|||
String TOKEN_EXCEPTION = "token已过期"; |
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
package com.epmet.constant; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/8 17:59 |
|||
*/ |
|||
public interface ThirdApiConstant { |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
String API_CREATE_PREAUTHCODE_URL = "https://api.weixin.qq.com/cgi-bin/component/api_create_preauthcode"; |
|||
|
|||
/** |
|||
* 使用授权码获取授权信息请求地址 |
|||
*/ |
|||
String API_QUERY_AUTH_URL = "https://api.weixin.qq.com/cgi-bin/component/api_query_auth"; |
|||
|
|||
/** |
|||
* 获取令牌请求地址 |
|||
*/ |
|||
String API_COMPONENT_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/component/api_component_token"; |
|||
|
|||
String API_AUTHORIZER_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/component/api_authorizer_token"; |
|||
|
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
package com.epmet.constant; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/6 9:48 |
|||
*/ |
|||
public interface ThirdPlatformConstant { |
|||
|
|||
/** |
|||
* 第三方平台appId |
|||
*/ |
|||
String PLATFORM_APP_ID = "****************"; |
|||
|
|||
/** |
|||
* 第三方平台 secret |
|||
*/ |
|||
String PLATFORM_APP_SECRET = "****************"; |
|||
|
|||
/** |
|||
* 第三方平台 消息加解密Key |
|||
*/ |
|||
String PLATFORM_AES_KEY = "****************"; |
|||
|
|||
/** |
|||
* 第三方平台 消息校验Token |
|||
*/ |
|||
String PLATFORM_COMPONENT_TOKEN = "****************"; |
|||
|
|||
} |
|||
@ -0,0 +1,45 @@ |
|||
package com.epmet.constant; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/8 18:16 |
|||
*/ |
|||
public interface ThirdRedisKeyConstant { |
|||
|
|||
/** |
|||
* : |
|||
*/ |
|||
String COLON = ":"; |
|||
|
|||
/** |
|||
* component_verify_ticket 【令牌】目录 |
|||
*/ |
|||
String TICKET_REDIS_KEY = "epmet:wechartthird:componentverifyticket"; |
|||
|
|||
/** |
|||
* pre_auth_code 预授权码 |
|||
*/ |
|||
String PRE_AUTH_CODE_REDIS_KEY = "epmet:wechartthird:preauthcode"; |
|||
|
|||
/** |
|||
* component_access_token |
|||
*/ |
|||
String ACCESS_TOKEN_REDIS_KEY = "epmet:wechartthird:componentaccesstoken"; |
|||
|
|||
/** |
|||
* authorizer_refresh_token 刷新令牌,获取授权信息时得到 |
|||
*/ |
|||
String AUTHORIZER_REFRESH_TOKEN_REDIS_KEY = "epmet:wechartthird:authorizerrefreshtoken"; |
|||
|
|||
/** |
|||
* auth_code 授权码 |
|||
*/ |
|||
String AUTH_CODE_REDIS_KEY = "epmet:wechartthird:authcode"; |
|||
|
|||
/** |
|||
* authorization_info 授权信息 |
|||
*/ |
|||
String AUTH_INFO_REDIS_KEY = "epmet:wechartthird:authinfo"; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,49 @@ |
|||
package com.epmet.constant; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/10 9:27 |
|||
*/ |
|||
public interface ThirdRunTimeInfoConstant { |
|||
|
|||
String AUTH_TICKET = "====================授权票据【ComponentVerifyTicket】:【%s】===================="; |
|||
|
|||
String ERROR_TICKET = "微信开放平台,第三方平台获取【验证票据】失败"; |
|||
|
|||
String END_TICKET = "==============================结束授权事件接收URL================================="; |
|||
|
|||
String START_RECEIVE = "==============================开始授权事件接收URL================================="; |
|||
|
|||
String URL_TICKET = "授权事件接收URL,验证票据"; |
|||
|
|||
String SUCCESS_TICKET = "第三方平台授权事件接收URL,验证票据成功"; |
|||
|
|||
String ERROR_URL_TICKET = "第三方平台授权事件接收URL,验证票据异常"; |
|||
|
|||
String SUCCESS_ACCESS_TOKEN = "====================结束执行定时任务获取令牌【component_access_token】===================="; |
|||
|
|||
String FAILURE_ACCESS_TOKEN = "微信开放平台,第三方平台获取【令牌】失败"; |
|||
|
|||
String ENCRYPT = "Encrypt:%s"; |
|||
|
|||
String MSG = "msg:%s"; |
|||
|
|||
String START_GET_COMPONENT_ACCESS_TOKEN = "====================开始执行定时任务获取令牌【component_access_token】===================="; |
|||
|
|||
String START_DELETE_COMPONENT_ACCESS_TOKEN = "====================开始逻辑删除【component_access_token】===================="; |
|||
|
|||
String START_GET_PRE_AUTH_CODE = "====================开始执行定时任务获取预授权码【pre_auth_code】===================="; |
|||
|
|||
String POST_RESULT = "====================返回post结果:%s"; |
|||
|
|||
String FAILURE_GET_PRE_AUTH_CODE = "微信开放平台,第三方平台获取【预授权码】失败"; |
|||
|
|||
String END_GET_PRE_AUTH_CODE = "====================结束获取预授权码【pre_auth_code】===================="; |
|||
|
|||
String START_GET_AUTH_INFO = "=====================开始获取【authorization_info】====================="; |
|||
|
|||
String START_INSERT_FUNC_INFO = "================================开始插入【func_info】===================================="; |
|||
|
|||
String END_GET_AUTH_INFO = "=====================结束获取【authorization_info】====================="; |
|||
|
|||
} |
|||
@ -0,0 +1,36 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.service.ComponentVerifyTicketService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestParam; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/10 9:04 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("redirectauthcode") |
|||
public class AuthRedirectController { |
|||
|
|||
@Autowired |
|||
private ComponentVerifyTicketService componentVerifyTicketService; |
|||
|
|||
/** |
|||
* @Description 授权回调URL |
|||
* @param |
|||
* @author zxc |
|||
*/ |
|||
public Result redirectUri(HttpServletRequest request, HttpServletResponse response, @LoginUser TokenDto tokenDto, @RequestParam("authAppId")String authAppId){ |
|||
componentVerifyTicketService.redirectUri(request,response,tokenDto,authAppId); |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,84 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.dto.CodeAuditResultDTO; |
|||
import com.epmet.service.CodeAuditResultService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 代码审核j结果 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("codeauditresult") |
|||
public class CodeAuditResultController { |
|||
|
|||
@Autowired |
|||
private CodeAuditResultService codeAuditResultService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<CodeAuditResultDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<CodeAuditResultDTO> page = codeAuditResultService.page(params); |
|||
return new Result<PageData<CodeAuditResultDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<CodeAuditResultDTO> get(@PathVariable("id") String id){ |
|||
CodeAuditResultDTO data = codeAuditResultService.get(id); |
|||
return new Result<CodeAuditResultDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody CodeAuditResultDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
codeAuditResultService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody CodeAuditResultDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
codeAuditResultService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
codeAuditResultService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.CodeUploadFormDTO; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription 代码管理 |
|||
* @date 2020/7/9 11:02 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("code") |
|||
public class CodeController { |
|||
|
|||
/** |
|||
* 代码上传 |
|||
* @author zhaoqifeng |
|||
* @date 2020/7/9 14:23 |
|||
* @param |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
*/ |
|||
@PostMapping("upload") |
|||
public Result upload(@RequestBody CodeUploadFormDTO formDTO) { |
|||
return new Result<>(); |
|||
} |
|||
} |
|||
@ -0,0 +1,84 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.dto.CodeCustomerDTO; |
|||
import com.epmet.service.CodeCustomerService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 客户代码关联表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("codecustomer") |
|||
public class CodeCustomerController { |
|||
|
|||
@Autowired |
|||
private CodeCustomerService codeCustomerService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<CodeCustomerDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<CodeCustomerDTO> page = codeCustomerService.page(params); |
|||
return new Result<PageData<CodeCustomerDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<CodeCustomerDTO> get(@PathVariable("id") String id){ |
|||
CodeCustomerDTO data = codeCustomerService.get(id); |
|||
return new Result<CodeCustomerDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody CodeCustomerDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
codeCustomerService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody CodeCustomerDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
codeCustomerService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
codeCustomerService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,84 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.dto.CodeMediaDTO; |
|||
import com.epmet.service.CodeMediaService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 代码素材 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("codemedia") |
|||
public class CodeMediaController { |
|||
|
|||
@Autowired |
|||
private CodeMediaService codeMediaService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<CodeMediaDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<CodeMediaDTO> page = codeMediaService.page(params); |
|||
return new Result<PageData<CodeMediaDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<CodeMediaDTO> get(@PathVariable("id") String id){ |
|||
CodeMediaDTO data = codeMediaService.get(id); |
|||
return new Result<CodeMediaDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody CodeMediaDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
codeMediaService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody CodeMediaDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
codeMediaService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
codeMediaService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.service.ComponentVerifyTicketService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
|
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/6 9:07 |
|||
*/ |
|||
@Slf4j |
|||
@RestController |
|||
@RequestMapping("verifyticket") |
|||
public class ComponentVerifyTicketController { |
|||
|
|||
@Autowired |
|||
private ComponentVerifyTicketService componentVerifyTicketService; |
|||
|
|||
/** |
|||
* @Description 获取验证票据3 |
|||
* @author zxc |
|||
*/ |
|||
@PostMapping(value = "/callback") |
|||
public String componentVerifyTicket(HttpServletRequest request, HttpServletResponse response) { |
|||
return componentVerifyTicketService.componentVerifyTicket(request,response); |
|||
} |
|||
} |
|||
@ -0,0 +1,84 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.dto.CustomerCodeOperationHistoryDTO; |
|||
import com.epmet.service.CustomerCodeOperationHistoryService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 客户代码操作历史 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("customercodeoperationhistory") |
|||
public class CustomerCodeOperationHistoryController { |
|||
|
|||
@Autowired |
|||
private CustomerCodeOperationHistoryService customerCodeOperationHistoryService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<CustomerCodeOperationHistoryDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<CustomerCodeOperationHistoryDTO> page = customerCodeOperationHistoryService.page(params); |
|||
return new Result<PageData<CustomerCodeOperationHistoryDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<CustomerCodeOperationHistoryDTO> get(@PathVariable("id") String id){ |
|||
CustomerCodeOperationHistoryDTO data = customerCodeOperationHistoryService.get(id); |
|||
return new Result<CustomerCodeOperationHistoryDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody CustomerCodeOperationHistoryDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
customerCodeOperationHistoryService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody CustomerCodeOperationHistoryDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
customerCodeOperationHistoryService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
customerCodeOperationHistoryService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,94 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.dto.CustomerMpDTO; |
|||
import com.epmet.excel.CustomerMpExcel; |
|||
import com.epmet.service.CustomerMpService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 客户小程序关系表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("customermp") |
|||
public class CustomerMpController { |
|||
|
|||
@Autowired |
|||
private CustomerMpService customerMpService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<CustomerMpDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<CustomerMpDTO> page = customerMpService.page(params); |
|||
return new Result<PageData<CustomerMpDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<CustomerMpDTO> get(@PathVariable("id") String id){ |
|||
CustomerMpDTO data = customerMpService.get(id); |
|||
return new Result<CustomerMpDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody CustomerMpDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
customerMpService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody CustomerMpDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
customerMpService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
customerMpService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<CustomerMpDTO> list = customerMpService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, CustomerMpExcel.class); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,94 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.dto.PaCustomerAgencyDTO; |
|||
import com.epmet.excel.PaCustomerAgencyExcel; |
|||
import com.epmet.service.PaCustomerAgencyService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 客户根组织信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("pacustomeragency") |
|||
public class PaCustomerAgencyController { |
|||
|
|||
@Autowired |
|||
private PaCustomerAgencyService paCustomerAgencyService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<PaCustomerAgencyDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<PaCustomerAgencyDTO> page = paCustomerAgencyService.page(params); |
|||
return new Result<PageData<PaCustomerAgencyDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<PaCustomerAgencyDTO> get(@PathVariable("id") String id){ |
|||
PaCustomerAgencyDTO data = paCustomerAgencyService.get(id); |
|||
return new Result<PaCustomerAgencyDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody PaCustomerAgencyDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
paCustomerAgencyService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody PaCustomerAgencyDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
paCustomerAgencyService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
paCustomerAgencyService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<PaCustomerAgencyDTO> list = paCustomerAgencyService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, PaCustomerAgencyExcel.class); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,93 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.dto.form.CreateAgencyFormDTO; |
|||
import com.epmet.dto.form.MyInfoFormDTO; |
|||
import com.epmet.dto.form.RegisterFormDTO; |
|||
import com.epmet.dto.result.AgencyLevelListResultDTO; |
|||
import com.epmet.dto.result.CreateAgencyResultDTO; |
|||
import com.epmet.dto.result.MyInfoResultDTO; |
|||
import com.epmet.service.*; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 公众号用户的注册、客户创建、跟组织创建 ,查询我的详情等等...api写在这 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/7/8 17:18 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("pacustomer") |
|||
public class PaCustomerController { |
|||
|
|||
@Autowired |
|||
private PaUserService paUserService; |
|||
@Autowired |
|||
private PaCustomerService paCustomerService; |
|||
@Autowired |
|||
private PaCustomerAgencyService paCustomerAgencyService; |
|||
@Autowired |
|||
private PaCustomerUserAgencyService paCustomerUserAgencyService; |
|||
@Autowired |
|||
private CustomerMpService customerMpService; |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return |
|||
* @Author sun |
|||
* @Description 公众号-手机号注册 |
|||
**/ |
|||
@PostMapping("register") |
|||
public Result register(@LoginUser TokenDto tokenDTO, @RequestBody RegisterFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, RegisterFormDTO.AddUserInternalGroup.class, RegisterFormDTO.AddUserShowGroup.class); |
|||
formDTO.setUserId(tokenDTO.getUserId()); |
|||
paCustomerService.register(formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @return |
|||
* @Author sun |
|||
* @Description 公众号-查询组织级别 |
|||
**/ |
|||
@PostMapping("agencylevellist") |
|||
public Result<List<AgencyLevelListResultDTO>> agencyLevelList() { |
|||
return new Result<List<AgencyLevelListResultDTO>>().ok(paCustomerService.agencyLevelList()); |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return |
|||
* @Author sun |
|||
* @Description 公众号-创建组织 |
|||
**/ |
|||
@PostMapping("createagency") |
|||
public Result<CreateAgencyResultDTO> createAgency(@LoginUser TokenDto tokenDTO, @RequestBody CreateAgencyFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, DefaultGroup.class); |
|||
return new Result<CreateAgencyResultDTO>().ok(paCustomerService.createAgency(tokenDTO, formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return |
|||
* @Author sun |
|||
* @Description 公众号-查询我的信息 |
|||
**/ |
|||
@PostMapping("myinfo") |
|||
public Result<MyInfoResultDTO> myInfo(@LoginUser TokenDto tokenDTO, @RequestBody MyInfoFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, MyInfoFormDTO.AddUserInternalGroup.class); |
|||
return new Result<MyInfoResultDTO>().ok(paCustomerService.myInfo(formDTO)); |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,94 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.dto.PaCustomerUserAgencyDTO; |
|||
import com.epmet.excel.PaCustomerUserAgencyExcel; |
|||
import com.epmet.service.PaCustomerUserAgencyService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 用户组织关系表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("pacustomeruseragency") |
|||
public class PaCustomerUserAgencyController { |
|||
|
|||
@Autowired |
|||
private PaCustomerUserAgencyService paCustomerUserAgencyService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<PaCustomerUserAgencyDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<PaCustomerUserAgencyDTO> page = paCustomerUserAgencyService.page(params); |
|||
return new Result<PageData<PaCustomerUserAgencyDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<PaCustomerUserAgencyDTO> get(@PathVariable("id") String id){ |
|||
PaCustomerUserAgencyDTO data = paCustomerUserAgencyService.get(id); |
|||
return new Result<PaCustomerUserAgencyDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody PaCustomerUserAgencyDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
paCustomerUserAgencyService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody PaCustomerUserAgencyDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
paCustomerUserAgencyService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
paCustomerUserAgencyService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<PaCustomerUserAgencyDTO> list = paCustomerUserAgencyService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, PaCustomerUserAgencyExcel.class); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,119 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.dto.PaUserDTO; |
|||
import com.epmet.dto.result.CustomerUserResultDTO; |
|||
import com.epmet.dto.result.SaveUserResultDTO; |
|||
import com.epmet.excel.PaUserExcel; |
|||
import com.epmet.service.PaUserService; |
|||
import me.chanjar.weixin.mp.bean.result.WxMpUser; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 公众号用户信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("pauser") |
|||
public class PaUserController { |
|||
|
|||
@Autowired |
|||
private PaUserService paUserService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<PaUserDTO>> page(@RequestParam Map<String, Object> params) { |
|||
PageData<PaUserDTO> page = paUserService.page(params); |
|||
return new Result<PageData<PaUserDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<PaUserDTO> get(@PathVariable("id") String id) { |
|||
PaUserDTO data = paUserService.get(id); |
|||
return new Result<PaUserDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody PaUserDTO dto) { |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
paUserService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody PaUserDTO dto) { |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
paUserService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids) { |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
paUserService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<PaUserDTO> list = paUserService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, PaUserExcel.class); |
|||
} |
|||
|
|||
/** |
|||
* @param wxMpUser |
|||
* @return |
|||
* @Author sun |
|||
* @Description 根据openId新增或更新用户信息 |
|||
**/ |
|||
@PostMapping(value = "/saveuser") |
|||
public Result<SaveUserResultDTO> saveUser(@RequestBody WxMpUser wxMpUser) { |
|||
return new Result<SaveUserResultDTO>().ok(paUserService.saveUser(wxMpUser)); |
|||
} |
|||
|
|||
/** |
|||
* @param phone |
|||
* @return |
|||
* @Author sun |
|||
* @Description 根据手机号查询公众号用户基本信息,校验用户是否存在 |
|||
**/ |
|||
@PostMapping(value = "/checkpauser/{phone}") |
|||
public Result<CustomerUserResultDTO> checkPaUser(@PathVariable("phone") String phone) { |
|||
return new Result<CustomerUserResultDTO>().ok(paUserService.checkPaUser(phone)); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,107 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.dto.PaUserVisitedDTO; |
|||
import com.epmet.dto.form.SaveUserVisitedFormDTO; |
|||
import com.epmet.excel.PaUserVisitedExcel; |
|||
import com.epmet.service.PaUserVisitedService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 公众号登陆记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("pauservisited") |
|||
public class PaUserVisitedController { |
|||
|
|||
@Autowired |
|||
private PaUserVisitedService paUserVisitedService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<PaUserVisitedDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<PaUserVisitedDTO> page = paUserVisitedService.page(params); |
|||
return new Result<PageData<PaUserVisitedDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<PaUserVisitedDTO> get(@PathVariable("id") String id){ |
|||
PaUserVisitedDTO data = paUserVisitedService.get(id); |
|||
return new Result<PaUserVisitedDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody PaUserVisitedDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
paUserVisitedService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody PaUserVisitedDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
paUserVisitedService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
paUserVisitedService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<PaUserVisitedDTO> list = paUserVisitedService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, PaUserVisitedExcel.class); |
|||
} |
|||
|
|||
/** |
|||
* @param visited |
|||
* @return |
|||
* @Author sun |
|||
* @Description 用户登陆,新增访问记录数据 |
|||
**/ |
|||
@PostMapping(value = "/saveuservisited") |
|||
public Result saveUserVisited(@RequestBody SaveUserVisitedFormDTO visited) { |
|||
paUserVisitedService.saveUserVisited(visited); |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,94 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.dto.PaUserWechatDTO; |
|||
import com.epmet.excel.PaUserWechatExcel; |
|||
import com.epmet.service.PaUserWechatService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 公众号用户信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("pauserwechat") |
|||
public class PaUserWechatController { |
|||
|
|||
@Autowired |
|||
private PaUserWechatService paUserWechatService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<PaUserWechatDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<PaUserWechatDTO> page = paUserWechatService.page(params); |
|||
return new Result<PageData<PaUserWechatDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<PaUserWechatDTO> get(@PathVariable("id") String id){ |
|||
PaUserWechatDTO data = paUserWechatService.get(id); |
|||
return new Result<PaUserWechatDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody PaUserWechatDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
paUserWechatService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody PaUserWechatDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
paUserWechatService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
paUserWechatService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<PaUserWechatDTO> list = paUserWechatService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, PaUserWechatExcel.class); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,66 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import org.apache.commons.codec.digest.DigestUtils; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.apache.logging.log4j.LogManager; |
|||
import org.apache.logging.log4j.Logger; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestParam; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Collections; |
|||
|
|||
/** |
|||
* 党群e事通公众号(客服号) |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/7/8 12:43 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("pa") |
|||
public class PublicAccountCallBackController { |
|||
private Logger logger = LogManager.getLogger(); |
|||
/** |
|||
* @param signature 微信加密签名,signature结合了开发者填写的token参数和请求中的timestamp参数、nonce参数。 |
|||
* @param timestamp 时间戳 |
|||
* @param nonce 随机数 |
|||
* @param echostr 随机字符串 |
|||
* @return java.lang.String |
|||
* @author yinzuomei |
|||
* @description 确认此次GET请求来自微信服务器,请原样返回echostr参数内容,则接入生效,成为开发者成功,否则接入失败 |
|||
* @Date 2020/7/8 12:47 |
|||
**/ |
|||
@GetMapping(value = "/callback") |
|||
public String wxServerValdation(@RequestParam("signature") String signature, |
|||
@RequestParam("timestamp") String timestamp, |
|||
@RequestParam("nonce") String nonce, |
|||
@RequestParam("echostr") String echostr) { |
|||
if (StringUtils.isEmpty(signature) || StringUtils.isEmpty(timestamp) || StringUtils.isEmpty(nonce) || StringUtils.isEmpty(echostr)) { |
|||
logger.warn("入参错误"); |
|||
return ""; |
|||
} |
|||
ArrayList<String> list = new ArrayList<String>(); |
|||
list.add(nonce); |
|||
list.add(timestamp); |
|||
//这是第5步中你设置的Token
|
|||
list.add("12345678Yzm"); |
|||
Collections.sort(list); |
|||
String sha1Singnature = DigestUtils.sha1Hex(list.get(0) + list.get(1) + list.get(2)); |
|||
if (sha1Singnature.equals(signature)) { |
|||
logger.info("校验成功"); |
|||
return echostr; |
|||
} else { |
|||
logger.warn("校验失败"); |
|||
return ""; |
|||
} |
|||
} |
|||
|
|||
@GetMapping(value = "test") |
|||
public Result test(){ |
|||
return new Result<>().ok("test"); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,34 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.exception.AesException; |
|||
import com.epmet.service.WarrantService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.dom4j.DocumentException; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.io.IOException; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/10 10:41 |
|||
*/ |
|||
@Slf4j |
|||
@RestController |
|||
@RequestMapping("warrant") |
|||
public class WarrantController { |
|||
|
|||
@Autowired |
|||
private WarrantService warrantService; |
|||
|
|||
@RequestMapping(value ="/{APPID}/callback") |
|||
public void acceptMessageAndEvent(HttpServletRequest request, @PathVariable("APPID") String appid, |
|||
HttpServletResponse response)throws IOException, DocumentException, AesException { |
|||
warrantService.acceptMessageAndEvent(request, appid, response); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,52 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.service.ComponentVerifyTicketService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/8 15:06 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("wechatthird") |
|||
public class WeChatNotifyController { |
|||
|
|||
@Autowired |
|||
private ComponentVerifyTicketService componentVerifyTicketService; |
|||
|
|||
/** |
|||
* @Description 定时获取 (令牌,component_access_token) |
|||
* 令牌(component_access_token)是第三方平台接口的调用凭据。令牌的获取是有限制的,每个令牌的有效期为 2 小时 |
|||
* @param |
|||
* @author zxc |
|||
*/ |
|||
@PostMapping("componentaccesstoken") |
|||
public Result getComponentAccessToken() { |
|||
componentVerifyTicketService.getComponentAccessToken(); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 获取预授权码 |
|||
* @param |
|||
* @author zxc |
|||
*/ |
|||
@PostMapping("preauthcode") |
|||
public Result preAuthCode(){ |
|||
componentVerifyTicketService.preAuthCode(); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 获取/刷新接口调用令牌 |
|||
* @author zxc |
|||
*/ |
|||
@PostMapping("refreshtoken") |
|||
public Result refreshToken(){ |
|||
componentVerifyTicketService.refreshToken(); |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,36 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.form.AuthCodeFormDTO; |
|||
import com.epmet.entity.AuthCodeEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 授权回调url反参表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-08 |
|||
*/ |
|||
@Mapper |
|||
public interface AuthCodeDao extends BaseDao<AuthCodeEntity> { |
|||
|
|||
void insertRedirectAuthCode(AuthCodeFormDTO formDTO); |
|||
|
|||
} |
|||
@ -0,0 +1,49 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.form.AuthorizationInfoFormDTO; |
|||
import com.epmet.entity.AuthorizationInfoEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* 授权信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-08 |
|||
*/ |
|||
@Mapper |
|||
public interface AuthorizationInfoDao extends BaseDao<AuthorizationInfoEntity> { |
|||
|
|||
/** |
|||
* @Description 插入 授权信息 |
|||
* @param formDTO |
|||
* @author zxc |
|||
*/ |
|||
void insertAuthorizationInfo(AuthorizationInfoFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Description 逻辑删除授权信息 |
|||
* @param customerId |
|||
* @author zxc |
|||
*/ |
|||
void updateOldAuthorizationInfo(@Param("customerId")String customerId); |
|||
|
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.AuthorizerRefreshTokenEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 授权方的刷新令牌表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-08 |
|||
*/ |
|||
@Mapper |
|||
public interface AuthorizerRefreshTokenDao extends BaseDao<AuthorizerRefreshTokenEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.CodeAuditResultEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 代码审核j结果 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Mapper |
|||
public interface CodeAuditResultDao extends BaseDao<CodeAuditResultEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.CodeCustomerEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 客户代码关联表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Mapper |
|||
public interface CodeCustomerDao extends BaseDao<CodeCustomerEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.CodeMediaEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 代码素材 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-09 |
|||
*/ |
|||
@Mapper |
|||
public interface CodeMediaDao extends BaseDao<CodeMediaEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,43 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.form.ComponentAccessTokenFormDTO; |
|||
import com.epmet.entity.ComponentAccessTokenEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 第三方平台调用凭证 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-08 |
|||
*/ |
|||
@Mapper |
|||
public interface ComponentAccessTokenDao extends BaseDao<ComponentAccessTokenEntity> { |
|||
|
|||
/** |
|||
* @Description 插入component_access_token信息 |
|||
* @param formDTO |
|||
* @author zxc |
|||
*/ |
|||
void insertComponentAccessToken(ComponentAccessTokenFormDTO formDTO); |
|||
|
|||
void updateOldComponentAccessToken(); |
|||
|
|||
} |
|||
@ -0,0 +1,36 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.form.ComponentVerifyTicketFormDTO; |
|||
import com.epmet.entity.ComponentVerifyTicketEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 微信发送的ticket表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-08 |
|||
*/ |
|||
@Mapper |
|||
public interface ComponentVerifyTicketDao extends BaseDao<ComponentVerifyTicketEntity> { |
|||
|
|||
void insertComponentVerifyTicket(ComponentVerifyTicketFormDTO formDTO); |
|||
|
|||
} |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue