221 changed files with 9947 additions and 471 deletions
@ -0,0 +1,12 @@ |
|||
package com.epmet.commons.tools.redis.common.bean; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class GridInfoCache { |
|||
private String gridId; |
|||
private String gridNamePath; |
|||
private String customerId; |
|||
private String pid; |
|||
private String pids; |
|||
} |
@ -0,0 +1,125 @@ |
|||
|
|||
package com.epmet.controller; |
|||
|
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
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; |
|||
import java.io.PrintWriter; |
|||
import java.security.MessageDigest; |
|||
import java.security.NoSuchAlgorithmException; |
|||
import java.util.Arrays; |
|||
|
|||
|
|||
/** |
|||
* desc:微信配置测试 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-08 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("wechat") |
|||
public class WxController { |
|||
private static Logger log = LoggerFactory.getLogger(WxController.class); |
|||
|
|||
|
|||
@RequestMapping("check") |
|||
public void doGet(HttpServletRequest request, HttpServletResponse response) { |
|||
log.debug("weixin get..."); |
|||
// 微信加密签名,signature结合了开发者填写的token参数和请求中的timestamp参数、nonce参数。
|
|||
String signature = request.getParameter("signature"); |
|||
// 时间戳
|
|||
String timestamp = request.getParameter("timestamp"); |
|||
// 随机数
|
|||
String nonce = request.getParameter("nonce"); |
|||
// 随机字符串
|
|||
String echostr = request.getParameter("echostr"); |
|||
|
|||
// 通过检验signature对请求进行校验,若校验成功则原样返回echostr,表示接入成功,否则接入失败
|
|||
PrintWriter out = null; |
|||
try { |
|||
out = response.getWriter(); |
|||
if (WxController.checkSignature(signature, timestamp, nonce)) { |
|||
log.debug("weixin get success...."); |
|||
out.print(echostr); |
|||
} |
|||
} catch (IOException e) { |
|||
e.printStackTrace(); |
|||
} finally { |
|||
if (out != null) |
|||
out.close(); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 与接口配置信息中的Token要一致 |
|||
*/ |
|||
private static String token = "o2opri3hschiwit"; |
|||
|
|||
/** |
|||
* 验证签名 |
|||
* |
|||
* @param signature |
|||
* @param timestamp |
|||
* @param nonce |
|||
* @return |
|||
*/ |
|||
public static boolean checkSignature(String signature, String timestamp, String nonce) { |
|||
String[] arr = new String[]{token, timestamp, nonce}; |
|||
// 将token、timestamp、nonce三个参数进行字典序排序
|
|||
Arrays.sort(arr); |
|||
StringBuilder content = new StringBuilder(); |
|||
for (int i = 0; i < arr.length; i++) { |
|||
content.append(arr[i]); |
|||
} |
|||
MessageDigest md = null; |
|||
String tmpStr = null; |
|||
|
|||
try { |
|||
md = MessageDigest.getInstance("SHA-1"); |
|||
// 将三个参数字符串拼接成一个字符串进行sha1加密
|
|||
byte[] digest = md.digest(content.toString().getBytes()); |
|||
tmpStr = byteToStr(digest); |
|||
} catch (NoSuchAlgorithmException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
|
|||
content = null; |
|||
// 将sha1加密后的字符串可与signature对比,标识该请求来源于微信
|
|||
return tmpStr != null ? tmpStr.equals(signature.toUpperCase()) : false; |
|||
} |
|||
|
|||
/** |
|||
* 将字节数组转换为十六进制字符串 |
|||
* |
|||
* @param byteArray |
|||
* @return |
|||
*/ |
|||
private static String byteToStr(byte[] byteArray) { |
|||
String strDigest = ""; |
|||
for (int i = 0; i < byteArray.length; i++) { |
|||
strDigest += byteToHexStr(byteArray[i]); |
|||
} |
|||
return strDigest; |
|||
} |
|||
|
|||
/** |
|||
* 将字节转换为十六进制字符串 |
|||
* |
|||
* @param mByte |
|||
* @return |
|||
*/ |
|||
private static String byteToHexStr(byte mByte) { |
|||
char[] Digit = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; |
|||
char[] tempArr = new char[2]; |
|||
tempArr[0] = Digit[(mByte >>> 4) & 0X0F]; |
|||
tempArr[1] = Digit[mByte & 0X0F]; |
|||
|
|||
String s = new String(tempArr); |
|||
return s; |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
alter table info_profile change column publish_staff_id PUBLISH_STAFF_ID varchar(64) not null comment '发布人id'; |
|||
alter table info_profile change column content CONTENT varchar(512) not null comment '内容概要,取前100字'; |
|||
alter table info_profile change column first_att_id FIRST_ATT_ID varchar(64) comment '默认附件表的第一个条用于展示'; |
|||
alter table info_profile change column total_receiver TOTAL_RECEIVER int(11) not null comment '应读人数'; |
|||
alter table info_profile change column read_total READ_TOTAL int(11) not null default '0' comment '已读人数,插入是为0'; |
|||
|
|||
alter table info change column publish_staff_id PUBLISH_STAFF_ID varchar(64)not null comment '发布人id'; |
|||
alter table info change column content CONTENT varchar(1024) not null comment '内容,这里存储全部的内容。'; |
|||
|
|||
alter table info_group_receivers change column info_receiver_group_id INFO_RECEIVER_GROUP_ID varchar(64) not null comment '群组id'; |
@ -0,0 +1,46 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/9/6 3:13 下午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class AllPartyFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -600409785611581009L; |
|||
|
|||
|
|||
/** |
|||
* 页码 |
|||
**/ |
|||
private Integer pageNo = NumConstant.ONE; |
|||
|
|||
/** |
|||
* 每页数据条数 |
|||
**/ |
|||
private Integer pageSize = NumConstant.TEN; |
|||
|
|||
/** |
|||
* 本月 monthly 总排行 all; |
|||
* */ |
|||
private String type; |
|||
|
|||
/** |
|||
* 认证成功的党员 的用户ID |
|||
* */ |
|||
private List<String> userIds; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
} |
@ -0,0 +1,49 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/9/6 3:12 下午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class AllPartyResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -5889648842876122793L; |
|||
|
|||
/** |
|||
* 排序 |
|||
**/ |
|||
private Integer ranking; |
|||
|
|||
/** |
|||
* 积分 |
|||
**/ |
|||
private Integer point; |
|||
|
|||
/** |
|||
* 头像 |
|||
**/ |
|||
private String userHeadPhoto; |
|||
|
|||
/** |
|||
* 名称 |
|||
**/ |
|||
private String realName; |
|||
|
|||
/** |
|||
* 用户id |
|||
**/ |
|||
private String userId; |
|||
|
|||
public AllPartyResultDTO() { |
|||
this.point = NumConstant.ZERO; |
|||
this.userHeadPhoto = ""; |
|||
this.realName = ""; |
|||
this.userId = ""; |
|||
} |
|||
} |
@ -0,0 +1,19 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description 第三方平台及其支持的action result |
|||
* @author wxz |
|||
* @date 2021.08.30 17:06:42 |
|||
*/ |
|||
@Data |
|||
public class ThirdPlatformActionsResultDTO { |
|||
|
|||
private String platformId; |
|||
private String platformKey; |
|||
private String platformName; |
|||
private String actionKey; |
|||
private String apiUrl; |
|||
|
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.epmet.dto.result.privateepmet; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description 获取accesstoken结果 |
|||
* @author wxz |
|||
* @date 2021.08.30 17:40:25 |
|||
*/ |
|||
@Data |
|||
public class GetAccessTokenResultDTO { |
|||
|
|||
// token
|
|||
private String accessToken; |
|||
// 有效时长
|
|||
private Long expireTime; |
|||
|
|||
} |
@ -0,0 +1,169 @@ |
|||
package com.epmet.apiservice.impl; |
|||
|
|||
import com.alibaba.fastjson.JSON; |
|||
import com.alibaba.fastjson.TypeReference; |
|||
import com.epmet.apiservice.ApiService; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.ExceptionUtils; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.feign.ResultDataResolver; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.HttpClientManager; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.constant.ThirdPlatformActions; |
|||
import com.epmet.dto.form.AuthorizerAccessTokenFormDTO; |
|||
import com.epmet.dto.form.ComponentAccessTokenFormDTO; |
|||
import com.epmet.dto.result.privateepmet.GetAccessTokenResultDTO; |
|||
import com.epmet.openapi.sdk.sign.OpenApiSignUtils; |
|||
import com.epmet.redis.ThirdPlatformCache; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
import java.util.UUID; |
|||
import java.util.concurrent.TimeUnit; |
|||
|
|||
@Component("pingyinPrivateEpmetApiService") |
|||
@Slf4j |
|||
public class PingyinPrivateEpmetApiService extends ApiService<Result> implements ResultDataResolver { |
|||
|
|||
// 认证方式
|
|||
private String authType = "take_token"; |
|||
|
|||
@Override |
|||
public String getAccessTokenHeaderName() { |
|||
return "AccessToken"; |
|||
} |
|||
|
|||
@Override |
|||
public String getAccessToken(String platformId) { |
|||
String accessTokenFromCache = super.getAccessTokenFromCache(platformId); |
|||
if (StringUtils.isBlank(accessTokenFromCache)) { |
|||
ThirdPlatformCache thirdPlatformInfo = super.getThirdPlatformInfo(platformId); |
|||
String apiUrl = getThirdPlatformActionUrl(platformId, ThirdPlatformActions.GET_ACCESS_TOKEN); |
|||
String baseUrl = thirdPlatformInfo.getBaseUrl(); |
|||
String platformKey = thirdPlatformInfo.getPlatformKey(); |
|||
String platformSecret = thirdPlatformInfo.getPlatformSecret(); |
|||
String uuid = UUID.randomUUID().toString(); |
|||
long currentTimeMillis = System.currentTimeMillis(); |
|||
|
|||
try { |
|||
String sign = createSign(platformKey, platformSecret, uuid, currentTimeMillis, authType, null); |
|||
log.info("【调用平阴私有化平台获取AccessToken】参数列表:sign:{}, app_id:{}, auth_type:{}, nonce:{}, timestamp:{}", sign, platformKey, platformSecret, uuid, currentTimeMillis); |
|||
String urlParams = super.convertQueryParams2String(constructCommonUrlParamsMap(platformKey, authType, uuid, currentTimeMillis, sign)); |
|||
String requestUrl = baseUrl.concat(apiUrl).concat(urlParams); |
|||
Result<String> stringResult = HttpClientManager.getInstance().sendPostByHttps(requestUrl, "{}"); |
|||
String remoteResultString = getResultDataOrThrowsException(stringResult, "【调用平阴私有化平台获取AccessToken】", EpmetErrorCode.SERVER_ERROR.getCode(), null); |
|||
Result<GetAccessTokenResultDTO> remoteResult = parsePlatformResponseResult(remoteResultString, GetAccessTokenResultDTO.class); |
|||
log.info("【调用平阴私有化平台获取AccessToken】结果:{}", remoteResultString); |
|||
accessTokenFromCache = remoteResult.getData().getAccessToken(); |
|||
//(15 * 60 * 1000)为提前获取token。对方token有效期2小时,我们设置有效期为1小时45分钟,留15分钟容错时间,防止时间差
|
|||
long expire = remoteResult.getData().getExpireTime() - System.currentTimeMillis() - (15 * 60 * 1000); |
|||
super.addAccessTokenToCache(platformId, accessTokenFromCache, expire, TimeUnit.MILLISECONDS); |
|||
} catch (Exception e) { |
|||
throw new RenException(ExceptionUtils.getErrorStackTrace(e)); |
|||
} |
|||
} |
|||
return accessTokenFromCache; |
|||
} |
|||
|
|||
/** |
|||
* @Description 创建签名 |
|||
* @param platformKey |
|||
* @param platformSecret |
|||
* @param nonce |
|||
* @param timeMillis |
|||
* @param authType |
|||
* @return java.lang.String |
|||
* @author wxz |
|||
* @date 2021.08.31 15:37:58 |
|||
*/ |
|||
private String createSign(String platformKey, String platformSecret, String nonce, Long timeMillis, String authType, Map<String, String> requestBodyMap) { |
|||
HashMap<String, String> contentMap = new HashMap<>(); |
|||
contentMap.put("app_id", platformKey); |
|||
contentMap.put("auth_type", authType); |
|||
contentMap.put("nonce", nonce); |
|||
contentMap.put("timestamp", String.valueOf(timeMillis)); |
|||
|
|||
if (requestBodyMap != null && requestBodyMap.size() > 0) { |
|||
contentMap.putAll(requestBodyMap); |
|||
} |
|||
|
|||
String sign; |
|||
try { |
|||
sign = OpenApiSignUtils.createSign(contentMap, platformSecret); |
|||
} catch (Exception e) { |
|||
String detail = ExceptionUtils.getErrorStackTrace(e); |
|||
log.error(detail); |
|||
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), "【平阴私有化平台apService】创建签名失败"); |
|||
} |
|||
return sign; |
|||
} |
|||
|
|||
/** |
|||
* @Description 构造url参数map |
|||
* @param platformKey |
|||
* @param authType |
|||
* @param nonce |
|||
* @param timeMillis |
|||
* @param sign |
|||
* @return java.util.Map<java.lang.String,java.lang.String> |
|||
* @author wxz |
|||
* @date 2021.08.31 14:19:41 |
|||
*/ |
|||
private Map<String, String> constructCommonUrlParamsMap(String platformKey, String authType, String nonce, Long timeMillis, String sign) { |
|||
HashMap<String, String> map = new HashMap<>(); |
|||
map.put("app_id", platformKey); |
|||
map.put("auth_type", authType); |
|||
map.put("nonce", nonce); |
|||
map.put("timestamp", String.valueOf(timeMillis)); |
|||
map.put("sign", sign); |
|||
return map; |
|||
} |
|||
|
|||
@Override |
|||
public <T> Result<T> parsePlatformResponseResult(String resultString, Class<T> clazz) { |
|||
Result<T> result; |
|||
try { |
|||
result = JSON.parseObject(resultString, new TypeReference<Result<T>>(clazz){}); |
|||
} catch (Exception e) { |
|||
String errorStackTrace = ExceptionUtils.getErrorStackTrace(e); |
|||
log.error(errorStackTrace); |
|||
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), "【调用平阴私有化服务器,解析返回结果失败】"); |
|||
} |
|||
if (!result.success()) { |
|||
throw new RenException(String.format("【请求平阴私有化平台】失败,返回结果string:%s", resultString)); |
|||
} |
|||
return result; |
|||
} |
|||
|
|||
@Override |
|||
public void pushComponentAccessToken(ComponentAccessTokenFormDTO form, String platformId, String platformKey) { |
|||
ThirdPlatformCache thirdPlatformInfo = getThirdPlatformInfo(platformId); |
|||
String nonce = UUID.randomUUID().toString(); |
|||
long timeMillis = System.currentTimeMillis(); |
|||
|
|||
Map<String, String> bodyMap = null; |
|||
try { |
|||
bodyMap = ConvertUtils.entityToMap(form); |
|||
} catch (Exception e) { |
|||
String detail = ExceptionUtils.getErrorStackTrace(e); |
|||
log.error(detail); |
|||
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), "【推送ComponentAccessToken】requestBody转化为map失败"); |
|||
} |
|||
|
|||
String sign = createSign(platformKey, thirdPlatformInfo.getPlatformSecret(), nonce, timeMillis, authType, bodyMap); |
|||
Map<String, String> urlParams = constructCommonUrlParamsMap(platformKey, authType, nonce, timeMillis, sign); |
|||
|
|||
String jsonString = JSON.toJSONString(form); |
|||
Result result = super.sendPostRequest(platformId, ThirdPlatformActions.PUSH_COMPONENT_ACCESS_TOKEN, jsonString, null, urlParams); |
|||
getResultDataOrThrowsException(result, "【平阴私有化平台】推送ComponentAccessToken", EpmetErrorCode.SERVER_ERROR.getCode(), null); |
|||
} |
|||
|
|||
@Override |
|||
public void pushAuthorizerAccessToken(AuthorizerAccessTokenFormDTO form, String platformId, String platformKey) { |
|||
|
|||
} |
|||
} |
@ -0,0 +1,50 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.AuthorizerAccessTokenFormDTO; |
|||
import com.epmet.dto.form.ComponentAccessTokenFormDTO; |
|||
import com.epmet.service.PrivateEpmetService; |
|||
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; |
|||
|
|||
/** |
|||
* @Description 私有化平台相关controller |
|||
* @author wxz |
|||
* @date 2021.08.30 15:18:51 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/private-epmet") |
|||
public class PrivateEpmetController { |
|||
|
|||
@Autowired |
|||
private PrivateEpmetService privateEpmetService; |
|||
|
|||
/** |
|||
* @Description 接收推送component access |
|||
* @param input |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @author wxz |
|||
* @date 2021.08.30 15:18:57 |
|||
*/ |
|||
@PostMapping("push-component-access-token") |
|||
public Result pushComponentAccessToken(@RequestBody ComponentAccessTokenFormDTO input) { |
|||
privateEpmetService.pushComponentAccessToken(input); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 接收推送AuthorizerTokens |
|||
* @param input |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @author wxz |
|||
* @date 2021.08.30 16:36:02 |
|||
*/ |
|||
@PostMapping("push-authorizer-tokens") |
|||
public Result pushAuthorizerTokens(@RequestBody AuthorizerAccessTokenFormDTO input) { |
|||
privateEpmetService.pushAuthorizerTokens(input); |
|||
return new Result(); |
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.ComponentAccessTokenFormDTO; |
|||
import com.epmet.service.ComponentVerifyTicketService; |
|||
import com.epmet.service.PrivateEpmetService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@RestController |
|||
@RequestMapping("test") |
|||
public class TestConttroller { |
|||
|
|||
@Autowired |
|||
private ComponentVerifyTicketService componentVerifyTicketService; |
|||
|
|||
@PostMapping("push-component-access-token") |
|||
public Result testPushComponentAccessToken() { |
|||
ComponentAccessTokenFormDTO form = new ComponentAccessTokenFormDTO(); |
|||
form.setComponentAccessToken("token..."); |
|||
form.setExpiresInTime(new Date()); |
|||
componentVerifyTicketService.pushComponentAccessToken2PrivateEpmetPlatforms(form); |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,19 @@ |
|||
package com.epmet.redis; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description 第三方平台缓存对象 |
|||
* @author wxz |
|||
* @date 2021.08.31 14:41:49 |
|||
*/ |
|||
@Data |
|||
public class ThirdPlatformCache { |
|||
//String platformKey, String platformSecret, String platformName, String apiService, String baseUrl
|
|||
private String platformId; |
|||
private String platformKey; |
|||
private String platformSecret; |
|||
private String platformName; |
|||
private String apiService; |
|||
private String baseUrl; |
|||
} |
@ -0,0 +1,19 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.dto.form.AuthorizerAccessTokenFormDTO; |
|||
import com.epmet.dto.form.ComponentAccessTokenFormDTO; |
|||
|
|||
public interface PrivateEpmetService { |
|||
void pushAuthorizerTokens(AuthorizerAccessTokenFormDTO input); |
|||
|
|||
/** |
|||
* @Description 推送component access token |
|||
* @param input |
|||
* @return void |
|||
* @author wxz |
|||
* @date 2021.08.30 16:17:48 |
|||
*/ |
|||
void pushComponentAccessToken(ComponentAccessTokenFormDTO input); |
|||
|
|||
void pushVerifyTicket(String ticket); |
|||
} |
@ -0,0 +1,71 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.epmet.constant.ThirdRunTimeInfoConstant; |
|||
import com.epmet.dao.AuthorizationInfoDao; |
|||
import com.epmet.dao.ComponentAccessTokenDao; |
|||
import com.epmet.dao.ComponentVerifyTicketDao; |
|||
import com.epmet.dto.form.AuthorizationInfoFormDTO; |
|||
import com.epmet.dto.form.AuthorizerAccessTokenFormDTO; |
|||
import com.epmet.dto.form.ComponentAccessTokenFormDTO; |
|||
import com.epmet.dto.result.AuthorizationInfoResultDTO; |
|||
import com.epmet.redis.RedisThird; |
|||
import com.epmet.service.PrivateEpmetService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.BeanUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
@Service |
|||
@Slf4j |
|||
public class PrivateEpmetServiceImpl implements PrivateEpmetService { |
|||
|
|||
@Autowired |
|||
private ComponentVerifyTicketDao componentVerifyTicketDao; |
|||
|
|||
@Autowired |
|||
private AuthorizationInfoDao authorizationInfoDao; |
|||
|
|||
@Autowired |
|||
private ComponentAccessTokenDao componentAccessTokenDao; |
|||
|
|||
@Autowired |
|||
private RedisThird redisThird; |
|||
|
|||
@Transactional(rollbackFor = RuntimeException.class) |
|||
@Override |
|||
public void pushAuthorizerTokens(AuthorizerAccessTokenFormDTO input) { |
|||
System.out.println("收到AuthorizerAccessTokenFormDTO:" + input); |
|||
|
|||
//AuthorizationInfoFormDTO authorizationInfo = new AuthorizationInfoFormDTO();
|
|||
//BeanUtils.copyProperties(input,authorizationInfo);
|
|||
//authorizationInfo.setAuthorizerAppid(input.getAuthAppid());
|
|||
////先逻辑删除,在插入
|
|||
//authorizationInfoDao.deleteOldAuthorizerAccessToken(input.getCustomerId(), input.getClientType());
|
|||
//authorizationInfoDao.insertAuthorizerAccessToken(input);
|
|||
////缓存 refreshAuthorizerAccessToken
|
|||
//redisThird.setAuthorizerRefreshToken(authorizationInfo);
|
|||
//AuthorizationInfoResultDTO resultDTO = new AuthorizationInfoResultDTO();
|
|||
//resultDTO.setAuthorizer_access_token(input.getAuthorizerAccessToken());
|
|||
//resultDTO.setAuthorizer_refresh_token(input.getAuthorizerRefreshToken());
|
|||
//resultDTO.setAuthorizer_appid(input.getAuthAppid());
|
|||
//resultDTO.setExpires_in(7200);
|
|||
//redisThird.setAuthInfo(resultDTO,input.getCustomerId(),input.getClientType());
|
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = RuntimeException.class) |
|||
public void pushComponentAccessToken(ComponentAccessTokenFormDTO componentAccessToken) { |
|||
System.out.println("收到componentAccessToken:" + componentAccessToken); |
|||
//先逻辑删,在插入
|
|||
//componentAccessTokenDao.deleteOldComponentAccessToken();
|
|||
//componentAccessTokenDao.insertComponentAccessToken(componentAccessToken);
|
|||
////存缓存
|
|||
//redisThird.setComponentAccessToken(componentAccessToken.getComponentAccessToken());
|
|||
} |
|||
|
|||
@Override |
|||
public void pushVerifyTicket(String ticket) { |
|||
|
|||
} |
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 15:41 |
|||
*/ |
|||
@Data |
|||
public class OrgFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -5975063766883885089L; |
|||
private String orgId; |
|||
private String orgType; |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 16:21 |
|||
*/ |
|||
@Data |
|||
public class AttachmentDTO implements Serializable { |
|||
private static final long serialVersionUID = 6505979559566901869L; |
|||
private String name; |
|||
private String format; |
|||
private String type; |
|||
private String url; |
|||
private Integer size; |
|||
private Integer duration; |
|||
|
|||
} |
@ -0,0 +1,56 @@ |
|||
/** |
|||
* 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 lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* 指南外链表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class ExternalLinkDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 链接说明 |
|||
*/ |
|||
private String description; |
|||
|
|||
/** |
|||
* 外部链接 |
|||
*/ |
|||
private String externalLink; |
|||
|
|||
/** |
|||
* 外部链接 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
} |
@ -0,0 +1,117 @@ |
|||
/** |
|||
* 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 lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 办事指南附件 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class GuideAttachmentDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 办事指南ID |
|||
*/ |
|||
private String guideId; |
|||
|
|||
/** |
|||
* 附件名 |
|||
*/ |
|||
private String attachmentName; |
|||
|
|||
/** |
|||
* 文件大小 单位byte |
|||
*/ |
|||
private Integer attachmentSize; |
|||
|
|||
/** |
|||
* 文件格式 word、excel、pdf |
|||
*/ |
|||
private String attachmentFormat; |
|||
|
|||
/** |
|||
* 类型 |
|||
*/ |
|||
private String attachmentType; |
|||
|
|||
/** |
|||
* 附件地址 |
|||
*/ |
|||
private String attachmentUrl; |
|||
|
|||
/** |
|||
* 语音或视频时长,秒 |
|||
*/ |
|||
private Integer duration; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 删除标识 0.未删除 1.已删除 |
|||
*/ |
|||
private Integer 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 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class GuideCategoryDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 分类名 |
|||
*/ |
|||
private String categoryName; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 状态 禁用disable 启用enable |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 删除标识 0未删除、1已删除 |
|||
*/ |
|||
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 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class GuideCollectionDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 指南ID |
|||
*/ |
|||
private String guideId; |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 用户所属客户端 居民端resi 工作端gov |
|||
*/ |
|||
private String app; |
|||
|
|||
/** |
|||
* 删除标识 0未删除、1已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,112 @@ |
|||
/** |
|||
* 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 lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 办事指南表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class GuideDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* ID 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 发布单位类型 机关agency 网格grid 部门dept |
|||
*/ |
|||
private String orgType; |
|||
|
|||
/** |
|||
* 发布单位ID |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 发布单位名称 |
|||
*/ |
|||
private String orgName; |
|||
|
|||
/** |
|||
* 所属组织机构ID(customer_agency.id) |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 所有上级组织ID,英文:隔开 |
|||
*/ |
|||
private String pids; |
|||
|
|||
/** |
|||
* 标题 |
|||
*/ |
|||
private String title; |
|||
|
|||
/** |
|||
* 分类ID |
|||
*/ |
|||
private String categoryCode; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
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 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class GuideExternalLinkDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 指南ID |
|||
*/ |
|||
private String guideId; |
|||
|
|||
/** |
|||
* 链接说明 |
|||
*/ |
|||
private String description; |
|||
|
|||
/** |
|||
* 外部链接 |
|||
*/ |
|||
private String externalLink; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 删除标识 0未删除、1已删除 |
|||
*/ |
|||
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 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class GuideModuleDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 指南ID |
|||
*/ |
|||
private String guideId; |
|||
|
|||
/** |
|||
* 模块ID |
|||
*/ |
|||
private String moduleId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String moduleContent; |
|||
|
|||
/** |
|||
* 删除标识 0未删除、1已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
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 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class GuideModuleDictDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 模块key |
|||
*/ |
|||
private String moduleValue; |
|||
|
|||
/** |
|||
* 模块名 |
|||
*/ |
|||
private String moduleName; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 状态 禁用disable 启用enable |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 删除标识 0未删除、1已删除 |
|||
*/ |
|||
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 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class GuideModuleDictDefaultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 模块key |
|||
*/ |
|||
private String moduleValue; |
|||
|
|||
/** |
|||
* 模块名 |
|||
*/ |
|||
private String moduleName; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 状态 禁用disable 启用enable |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 删除标识 0未删除、1已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,58 @@ |
|||
/** |
|||
* 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 lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* 指南模块字典表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class ModuleDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String guideModuleId; |
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String moduleId; |
|||
|
|||
/** |
|||
* 模块key |
|||
*/ |
|||
private String moduleValue; |
|||
|
|||
/** |
|||
* 模块名 |
|||
*/ |
|||
private String moduleName; |
|||
|
|||
/** |
|||
* 模块内容 |
|||
*/ |
|||
private String moduleContent; |
|||
} |
@ -0,0 +1,61 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.dto.AttachmentDTO; |
|||
import com.epmet.dto.ExternalLinkDTO; |
|||
import com.epmet.dto.ModuleDTO; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 10:24 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class GuideAddFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -7750999102010191460L; |
|||
/** |
|||
* 标题 |
|||
*/ |
|||
@NotBlank(message = "标题不能为空") |
|||
private String title; |
|||
/** |
|||
* 标题 |
|||
*/ |
|||
@NotBlank(message = "分类不能为空") |
|||
private String categoryCode; |
|||
/** |
|||
* 机关类型 机关agency 网格grid 部门dept |
|||
*/ |
|||
@NotBlank(message = "所属机关类型不能为空") |
|||
private String orgType; |
|||
/** |
|||
* 所属机关 |
|||
*/ |
|||
@NotBlank(message = "所属机关ID不能为空") |
|||
private String orgId; |
|||
/** |
|||
* 所属机关 |
|||
*/ |
|||
@NotBlank(message = "所属机关名不能为空") |
|||
private String orgName; |
|||
/** |
|||
* 外部链接 |
|||
*/ |
|||
private List<ExternalLinkDTO> externalLinks; |
|||
/** |
|||
* 内容模块 |
|||
*/ |
|||
private List<ModuleDTO> moduleList; |
|||
/** |
|||
* 附件 |
|||
*/ |
|||
private List<AttachmentDTO> attachmentList; |
|||
|
|||
} |
@ -0,0 +1,70 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.dto.AttachmentDTO; |
|||
import com.epmet.dto.ExternalLinkDTO; |
|||
import com.epmet.dto.ModuleDTO; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 10:24 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class GuideEditFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -7750999102010191460L; |
|||
/** |
|||
* 工作人员ID |
|||
*/ |
|||
private String staffId; |
|||
/** |
|||
* 指南ID |
|||
*/ |
|||
@NotBlank(message = "指南id不能为空") |
|||
private String guideId; |
|||
/** |
|||
* 标题 |
|||
*/ |
|||
@NotBlank(message = "标题不能为空") |
|||
private String title; |
|||
/** |
|||
* 标题 |
|||
*/ |
|||
@NotBlank(message = "分类不能为空") |
|||
private String categoryCode; |
|||
/** |
|||
* 机关类型 机关agency 网格grid 部门dept |
|||
*/ |
|||
@NotBlank(message = "所属机关类型不能为空") |
|||
private String orgType; |
|||
/** |
|||
* 所属机关 |
|||
*/ |
|||
@NotBlank(message = "所属机关ID不能为空") |
|||
private String orgId; |
|||
/** |
|||
* 所属机关 |
|||
*/ |
|||
@NotBlank(message = "所属机关名不能为空") |
|||
private String orgName; |
|||
/** |
|||
* 外部链接 |
|||
*/ |
|||
private List<ExternalLinkDTO> externalLinks; |
|||
/** |
|||
* 内容模块 |
|||
*/ |
|||
private List<ModuleDTO> moduleList; |
|||
/** |
|||
* 附件 |
|||
*/ |
|||
private List<AttachmentDTO> attachmentList; |
|||
|
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue