235 changed files with 8855 additions and 190 deletions
@ -0,0 +1,79 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.dingtalk.api.DefaultDingTalkClient; |
|||
import com.dingtalk.api.DingTalkClient; |
|||
import com.dingtalk.api.request.OapiGettokenRequest; |
|||
import com.dingtalk.api.request.OapiSnsGetuserinfoBycodeRequest; |
|||
import com.dingtalk.api.request.OapiUserGetbyunionidRequest; |
|||
import com.dingtalk.api.request.OapiV2UserGetRequest; |
|||
import com.dingtalk.api.response.OapiGettokenResponse; |
|||
import com.dingtalk.api.response.OapiSnsGetuserinfoBycodeResponse; |
|||
import com.dingtalk.api.response.OapiUserGetbyunionidResponse; |
|||
import com.dingtalk.api.response.OapiV2UserGetResponse; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.taobao.api.ApiException; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.RequestParam; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* 免登第三方网站 |
|||
* |
|||
* @author openapi@dingtalk |
|||
*/ |
|||
@RestController("dingtalk") |
|||
public class DingdingLoginController { |
|||
|
|||
/** |
|||
* 获取授权用户的个人信息 openapi@dingtalk |
|||
* |
|||
* @return |
|||
* @throws Exception ServiceResult<Map<String,Object>> 2020-11-4 |
|||
*/ |
|||
@RequestMapping(value = "/auth", method = RequestMethod.GET) |
|||
public Result<String> getDdScan(@RequestParam("code") String code) throws Exception { |
|||
// 获取access_token,注意正式代码要有异常流处理
|
|||
String access_token = this.getToken(); |
|||
|
|||
// 通过临时授权码获取授权用户的个人信息
|
|||
DefaultDingTalkClient client2 = new DefaultDingTalkClient("https://oapi.dingtalk.com/sns/getuserinfo_bycode"); |
|||
OapiSnsGetuserinfoBycodeRequest reqBycodeRequest = new OapiSnsGetuserinfoBycodeRequest(); |
|||
|
|||
reqBycodeRequest.setTmpAuthCode(code); |
|||
OapiSnsGetuserinfoBycodeResponse bycodeResponse = client2.execute(reqBycodeRequest, "yourAppId", "yourAppSecret"); |
|||
|
|||
// 根据unionid获取userid
|
|||
String unionid = bycodeResponse.getUserInfo().getUnionid(); |
|||
DingTalkClient clientDingTalkClient = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/user/getbyunionid"); |
|||
OapiUserGetbyunionidRequest reqGetbyunionidRequest = new OapiUserGetbyunionidRequest(); |
|||
reqGetbyunionidRequest.setUnionid(unionid); |
|||
OapiUserGetbyunionidResponse oapiUserGetbyunionidResponse = clientDingTalkClient.execute(reqGetbyunionidRequest, access_token); |
|||
|
|||
// 根据userId获取用户信息
|
|||
String userid = oapiUserGetbyunionidResponse.getResult().getUserid(); |
|||
DingTalkClient clientDingTalkClient2 = new DefaultDingTalkClient( |
|||
"https://oapi.dingtalk.com/topapi/v2/user/get"); |
|||
OapiV2UserGetRequest reqGetRequest = new OapiV2UserGetRequest(); |
|||
reqGetRequest.setUserid(userid); |
|||
//reqGetRequest.setLang("zh_CN");
|
|||
OapiV2UserGetResponse rspGetResponse = clientDingTalkClient2.execute(reqGetRequest, access_token); |
|||
System.out.println(rspGetResponse.getBody()); |
|||
return new Result<String>().ok(rspGetResponse.getBody()); |
|||
} |
|||
private String getToken() throws RuntimeException { |
|||
try { |
|||
DefaultDingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/gettoken"); |
|||
OapiGettokenRequest request = new OapiGettokenRequest(); |
|||
|
|||
request.setAppkey("dingiopfbtn8mktfoaf0"); |
|||
request.setAppsecret("RcmHIoP5KFLZSM5wzpYhvCKMMKEzLoWPtqu3OqOEBD6myg4IT8oVw4AwvRkKYKJz"); |
|||
request.setHttpMethod("GET"); |
|||
OapiGettokenResponse response = client.execute(request); |
|||
return response.getAccessToken(); |
|||
} catch (ApiException e) { |
|||
throw new RuntimeException(); |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,73 @@ |
|||
package com.epmet.dto.dingres; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yzm |
|||
* @Date 2022/9/22 14:16 |
|||
*/ |
|||
@Data |
|||
public class DingUserDetailDTO { |
|||
// 接口文档:https://open.dingtalk.com/document/isvapp-server/query-user-details
|
|||
/** |
|||
* 员工的userId。 |
|||
*/ |
|||
private String userid; |
|||
|
|||
/** |
|||
* 员工在当前开发者企业账号范围内的唯一标识。 |
|||
*/ |
|||
private String unionid; |
|||
|
|||
/** |
|||
* 员工姓名。 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 头像。 |
|||
* <p> |
|||
* 说明 员工使用默认头像,不返回该字段,手动设置头像会返回 |
|||
*/ |
|||
private String avatar; |
|||
/** |
|||
* 国际电话区号。 |
|||
* <p> |
|||
* 说明 第三方企业应用不返回该字段;如需获取state_code,可以使用钉钉统一授权套件方式获取。 |
|||
*/ |
|||
private String state_code; |
|||
/** |
|||
* 手机号码。 |
|||
* <p> |
|||
* 说明 |
|||
* 企业内部应用,只有应用开通通讯录邮箱等个人信息权限,才会返回该字段。 |
|||
* 第三方企业应用不返回该字段,如需获取mobile,可以使用钉钉统一授权套件方式获取。 |
|||
*/ |
|||
private String mobile; |
|||
/** |
|||
* 是否号码隐藏: |
|||
* <p> |
|||
* true:隐藏 |
|||
* <p> |
|||
* false:不隐藏 |
|||
* <p> |
|||
* 说明 隐藏手机号后,手机号在个人资料页隐藏,但仍可对其发DING、发起钉钉免费商务电话。 |
|||
*/ |
|||
private String hide_mobile; |
|||
/** |
|||
* 分机号。 |
|||
* <p> |
|||
* 说明 第三方企业应用不返回该参数。 |
|||
*/ |
|||
private String telephone; |
|||
|
|||
/** |
|||
* 员工的企业邮箱。 |
|||
* |
|||
* 如果员工的企业邮箱没有开通,返回信息中不包含该数据。 |
|||
* |
|||
* 说明 第三方企业应用不返回该参数。 |
|||
*/ |
|||
private String org_email; |
|||
} |
|||
|
@ -0,0 +1,54 @@ |
|||
package com.epmet.dto.dingres; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yzm |
|||
* @Date 2022/9/22 14:08 |
|||
*/ |
|||
@Data |
|||
public class V2UserGetuserinfoResDTO { |
|||
// 接口返参:https://open.dingtalk.com/document/orgapp-server/obtain-the-userid-of-a-user-by-using-the-log-free
|
|||
/** |
|||
* 用户的userid。 |
|||
*/ |
|||
private String userid; |
|||
/** |
|||
* 设备ID。 |
|||
*/ |
|||
private String device_id; |
|||
/** |
|||
* 是否是管理员。 |
|||
* <p> |
|||
* true:是 |
|||
* <p> |
|||
* false:不是 |
|||
*/ |
|||
private Boolean sys; |
|||
/** |
|||
* 级别。 |
|||
* <p> |
|||
* 1:主管理员 |
|||
* <p> |
|||
* 2:子管理员 |
|||
* <p> |
|||
* 100:老板 |
|||
* <p> |
|||
* 0:其他(如普通员工) |
|||
*/ |
|||
private Number sys_level; |
|||
/** |
|||
* 用户关联的unionId。 |
|||
*/ |
|||
private String associated_unionid; |
|||
/** |
|||
* 用户unionId。 |
|||
*/ |
|||
private String unionid; |
|||
/** |
|||
* 用户名字。 |
|||
*/ |
|||
private String name; |
|||
} |
|||
|
@ -0,0 +1,23 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yzm |
|||
* @Date 2022/9/22 10:42 |
|||
*/ |
|||
@Data |
|||
public class DingAppLoginMdFormDTO { |
|||
@NotBlank(message = "authCode不能为空") |
|||
private String authCode; |
|||
/** |
|||
* 第三方企业应用传应用的SuiteKey |
|||
*/ |
|||
@NotBlank(message = "miniAppId不能为空") |
|||
private String miniAppId; |
|||
|
|||
} |
|||
|
@ -0,0 +1,48 @@ |
|||
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 选择组织,进入首页入参Dto |
|||
* @Author yinzuomei |
|||
* @Date 2020/4/20 13:03 |
|||
*/ |
|||
@Data |
|||
public class GovWxmpEnteOrgByAccountFormDTO implements Serializable { |
|||
public interface AddUserInternalGroup {} |
|||
public interface AddUserShowGroup extends CustomerClientShowGroup {} |
|||
/** |
|||
* wxCode |
|||
*/ |
|||
@NotBlank(message = "wxCode不能为空",groups = {AddUserInternalGroup.class}) |
|||
private String wxCode; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
@NotBlank(message = "账号不能为空",groups = {AddUserShowGroup.class}) |
|||
private String userAccount; |
|||
|
|||
/** |
|||
* 选择的组织所属的id |
|||
*/ |
|||
@NotBlank(message = "客户id不能为空",groups = {AddUserInternalGroup.class}) |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 选择的要进入的组织(根组织id) |
|||
*/ |
|||
@NotBlank(message = "组织id不能为空",groups = {AddUserInternalGroup.class}) |
|||
private String rootAgencyId; |
|||
|
|||
/** |
|||
* desc:小程序appId |
|||
*/ |
|||
private String appId; |
|||
|
|||
} |
|||
|
@ -0,0 +1,41 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yzm |
|||
* @Date 2022/9/14 17:11 |
|||
*/ |
|||
@Data |
|||
public class ResiDingAppLoginFormDTO { |
|||
public interface InnerMiniApp {} |
|||
public interface ThirdMiniApp {} |
|||
/** |
|||
* 授权统一后的authCode |
|||
*/ |
|||
@NotBlank(message = "authCode不能为空",groups = InnerMiniApp.class) |
|||
private String authCode; |
|||
// /**
|
|||
// * 第三方企业应用传应用的SuiteKey
|
|||
// */
|
|||
// @NotBlank(message = "clientId不能为空")
|
|||
// private String clientId;
|
|||
/** |
|||
* 第三方企业应用传应用的SuiteKey |
|||
*/ |
|||
@NotBlank(message = "miniAppId不能为空",groups = InnerMiniApp.class) |
|||
private String miniAppId; |
|||
|
|||
// @NotBlank(message = "当前访问用户的企业corpId不能为空")
|
|||
// private String corpId;
|
|||
|
|||
/** |
|||
* third:第三方应用 |
|||
* company_customize:企业定制应用 |
|||
*/ |
|||
private String appType="company_customize"; |
|||
} |
|||
|
@ -0,0 +1,43 @@ |
|||
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 zhy |
|||
* @Date 2020/4/18 10:38 |
|||
*/ |
|||
@Data |
|||
public class StaffOrgByAccountFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 4193133227120225342L; |
|||
/** |
|||
* 添加用户操作的用户可见异常分组 |
|||
* 该分组用于校验需要返回给前端错误信息提示的列,需要继承CustomerClientShowGroup |
|||
* 返回错误码为8999,提示信息为DTO中具体的列的校验注解message的内容 |
|||
*/ |
|||
public interface AddUserShowGroup extends CustomerClientShowGroup { |
|||
} |
|||
|
|||
public interface GetMyOrgByPassWordGroup extends CustomerClientShowGroup { |
|||
} |
|||
public interface GetMyOrgByLoginWxmp extends CustomerClientShowGroup{} |
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
@NotBlank(message = "手机号不能为空", groups = {AddUserShowGroup.class}) |
|||
private String userAccount; |
|||
|
|||
/** |
|||
* 验证码 |
|||
*/ |
|||
@NotBlank(message="验证码不能为空", groups = {GetMyOrgByLoginWxmp.class}) |
|||
private String smsCode; |
|||
|
|||
@NotBlank(message = "密码不能为空",groups ={GetMyOrgByPassWordGroup.class}) |
|||
private String password; |
|||
} |
|||
|
@ -0,0 +1,48 @@ |
|||
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 appId、账号、验证码获取组织-接口入参 |
|||
* @Author zhy |
|||
*/ |
|||
@Data |
|||
public class ThirdStaffOrgByAccountFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 4193133227120225342L; |
|||
/** |
|||
* 添加用户操作的用户可见异常分组 |
|||
* 该分组用于校验需要返回给前端错误信息提示的列,需要继承CustomerClientShowGroup |
|||
* 返回错误码为8999,提示信息为DTO中具体的列的校验注解message的内容 |
|||
*/ |
|||
public interface AddUserShowGroup extends CustomerClientShowGroup { |
|||
} |
|||
|
|||
public interface GetMyOrgByPassWordGroup extends CustomerClientShowGroup { |
|||
} |
|||
public interface GetMyOrgByLoginWxmp extends CustomerClientShowGroup{} |
|||
/** |
|||
* 小程序appId |
|||
*/ |
|||
@NotBlank(message = "appId不能为空", groups = {AddUserShowGroup.class}) |
|||
private String appId; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
@NotBlank(message = "账号不能为空", groups = {AddUserShowGroup.class}) |
|||
private String userAccount; |
|||
|
|||
/** |
|||
* 验证码 |
|||
*/ |
|||
@NotBlank(message="验证码不能为空", groups = {GetMyOrgByLoginWxmp.class}) |
|||
private String smsCode; |
|||
|
|||
@NotBlank(message = "密码不能为空",groups ={GetMyOrgByPassWordGroup.class}) |
|||
private String password; |
|||
} |
|||
|
@ -0,0 +1,47 @@ |
|||
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 单客户-选择组织,进入首页入参Dto |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class ThirdWxmpEnteOrgByAccountFormDTO implements Serializable { |
|||
public interface AddUserInternalGroup {} |
|||
public interface AddUserShowGroup extends CustomerClientShowGroup {} |
|||
/** |
|||
* wxCode |
|||
*/ |
|||
@NotBlank(message = "wxCode不能为空",groups = {AddUserInternalGroup.class}) |
|||
private String wxCode; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
@NotBlank(message = "账号不能为空",groups = {AddUserShowGroup.class}) |
|||
private String userAccount; |
|||
|
|||
/** |
|||
* 选择的组织所属的id |
|||
*/ |
|||
@NotBlank(message = "客户id不能为空",groups = {AddUserInternalGroup.class}) |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 选择的要进入的组织(根组织id) |
|||
*/ |
|||
@NotBlank(message = "组织id不能为空",groups = {AddUserInternalGroup.class}) |
|||
private String rootAgencyId; |
|||
|
|||
/** |
|||
* 客户appId(exJson文件中获取) |
|||
*/ |
|||
@NotBlank(message = "appId不能为空",groups = {AddUserInternalGroup.class}) |
|||
private String appId; |
|||
} |
|||
|
@ -0,0 +1,44 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yzm |
|||
* @Date 2022/9/14 17:20 |
|||
*/ |
|||
@Data |
|||
public class ResiDingAppLoginResDTO { |
|||
private String authorization; |
|||
private String customerId; |
|||
private String gridId; |
|||
/** |
|||
* 网格名 |
|||
*/ |
|||
private String gridName; |
|||
/** |
|||
* 网格所属的组织id |
|||
*/ |
|||
private String agencyId; |
|||
/** |
|||
* 居民端用户id |
|||
*/ |
|||
private String epmetUserId; |
|||
|
|||
/** |
|||
* 5.获取用户手机号。使用用户个人access_token调用获取用户通讯录个人信息接口获取 |
|||
* 返参信息 |
|||
* 接口文档:https://open.dingtalk.com/document/isvapp-server/dingtalk-retrieve-user-information
|
|||
*/ |
|||
private String extInfo; |
|||
|
|||
/** |
|||
* 是否注册居民 |
|||
* true:已注册 |
|||
* false:未注册 |
|||
*/ |
|||
private Boolean regFlag; |
|||
|
|||
private String realName; |
|||
} |
|||
|
@ -0,0 +1,26 @@ |
|||
package com.epmet.commons.tools.dto.form; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/9/15 10:25 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class DingMiniInfoFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 2661531490851265637L; |
|||
|
|||
public interface DingMiniInfoForm{} |
|||
|
|||
@NotBlank(message = "miniAppId不能为空",groups = DingMiniInfoForm.class) |
|||
private String miniAppId; |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.epmet.commons.tools.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
@Data |
|||
public class HasOperPermissionFormDTO { |
|||
|
|||
/** |
|||
* uri |
|||
*/ |
|||
@NotBlank(message = "uri不能为空") |
|||
private String uri; |
|||
|
|||
/** |
|||
* http方法 |
|||
*/ |
|||
@NotBlank(message = "请求http方法不能为空") |
|||
private String method; |
|||
|
|||
@NotBlank(message = "操作者ID不能为空") |
|||
private String operId; |
|||
} |
@ -0,0 +1,13 @@ |
|||
package com.epmet.commons.tools.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class OperResouce { |
|||
|
|||
private String userId; |
|||
private String resourceUrl; |
|||
private String ResourceMethod; |
|||
|
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.epmet.commons.tools.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yzm |
|||
* @Date 2022/9/26 17:04 |
|||
*/ |
|||
@Data |
|||
public class YtHsjcResDTO { |
|||
private int code = 200; |
|||
private String msg = "请求成功"; |
|||
/** |
|||
* 响应数据 |
|||
*/ |
|||
private List<YtHsjcResDetailDTO> data; |
|||
private int total; |
|||
} |
@ -0,0 +1,48 @@ |
|||
package com.epmet.commons.tools.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yzm |
|||
* @Date 2022/9/26 17:10 |
|||
*/ |
|||
@Data |
|||
public class YtHsjcResDetailDTO { |
|||
private String id; |
|||
private String name; |
|||
private String card_no; |
|||
private String telephone; |
|||
private String address; |
|||
private String test_time; |
|||
private String depart_name; |
|||
private String county; |
|||
private String upload_time; |
|||
private String sample_result_pcr; |
|||
private String sample_time; |
|||
private String sampling_org_pcr; |
|||
|
|||
/* { |
|||
"code":"200", |
|||
"msg":"请求成功", |
|||
"data":[ |
|||
{ |
|||
"id":"6a31eb2d38c011eda054fa163ebc7ff4", |
|||
"name":"杨冠中",// 姓名
|
|||
"card_no":"372527198404130813",// 证件号码
|
|||
"telephone":"13697890860",// 电话
|
|||
"address":"保利香榭里公馆18-1-302",// 联系地址
|
|||
"test_time":"2022-09-20 12:52:28",// 检测时间
|
|||
"depart_name":"天仁医学检验实验室有限公司",// varchar
|
|||
"county":"莱山区",// 所属区县
|
|||
"upload_time":"2022-09-20 21:23:10",// 时间戳
|
|||
"sample_result_pcr":"2",// 核酸检测结果 1:阳性,2:阴性
|
|||
"sample_time":"2022-09-20 06:48:28",// 采样时间
|
|||
"sampling_org_pcr":"采样点327"// 核酸采样机构
|
|||
}, |
|||
] |
|||
"total":1 |
|||
} |
|||
*/ |
|||
} |
|||
|
@ -0,0 +1,79 @@ |
|||
package com.epmet.commons.tools.enums; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yzm |
|||
* @Date 2022/9/14 19:11 |
|||
*/ |
|||
public enum DingMiniAppEnum { |
|||
// 亿联云盘CorpId:dingd1e19e397c754c7735c2f4657eb6378f
|
|||
//
|
|||
// //各应用秘钥
|
|||
// 随手拍
|
|||
// SuiteId:27501006
|
|||
// AppId:119450
|
|||
// MiniAppId:5000000002934668
|
|||
// SuiteKey:suitew6ccvkquinmrghqy
|
|||
// SuiteSecret:TooAxiegdsE5BPP6xo1AxK1LdmaUoMpPMyomOcGcBSXtnsxRc8dEfyOlG56oSmEB
|
|||
//
|
|||
// 随时讲
|
|||
// SuiteId:27564007
|
|||
// AppId:119451
|
|||
// MiniAppId:5000000002934374
|
|||
// SuiteKey:suitezhyj12glsrp8em0f
|
|||
// SuiteSecret:-z5Q_lvMP6l7fTzlArEzUT8D_-5pvqBQaJMuTGHoXnz0nuiqGQMZ8aeya_cxTsN-
|
|||
//
|
|||
// 我的报事
|
|||
// SuiteId:27569006
|
|||
// AppId:119452
|
|||
// MiniAppId:5000000002934456
|
|||
// SuiteKey:suite5yxliro6wawv514w
|
|||
// SuiteSecret:aQxiPi7DwJSUa9HlbUU_L7Q4wGCLEDmgf__Ffx75cTn3jZwuHy9vdl-9Iv5FeyJU
|
|||
//
|
|||
// 实时动态
|
|||
// SuiteId:27458011
|
|||
// AppId:119453
|
|||
// MiniAppId:5000000002934488
|
|||
// SuiteKey:suitemcestnonr6y0xigc
|
|||
// SuiteSecret:kKCNCkfDhmLoVnl_wuAiScyDG4776mkTevuSBuiYhHg-Bvz1-vhb_4IA-Km7nK2I
|
|||
SSP("suitew6ccvkquinmrghqy", "随手拍", "TooAxiegdsE5BPP6xo1AxK1LdmaUoMpPMyomOcGcBSXtnsxRc8dEfyOlG56oSmEB"), |
|||
SSJ("suitezhyj12glsrp8em0f", "随时讲", "-z5Q_lvMP6l7fTzlArEzUT8D_-5pvqBQaJMuTGHoXnz0nuiqGQMZ8aeya_cxTsN-"), |
|||
MY_REPORT_EVENT("suite5yxliro6wawv514w", "我的报事", "aQxiPi7DwJSUa9HlbUU_L7Q4wGCLEDmgf__Ffx75cTn3jZwuHy9vdl-9Iv5FeyJU"), |
|||
SSDT("suitemcestnonr6y0xigc", "实时动态", "kKCNCkfDhmLoVnl_wuAiScyDG4776mkTevuSBuiYhHg-Bvz1-vhb_4IA-Km7nK2I"); |
|||
|
|||
private String suiteKey; |
|||
private String name; |
|||
private String suiteSecret; |
|||
|
|||
|
|||
DingMiniAppEnum(String suiteKey, String name, String suiteSecret) { |
|||
this.suiteKey = suiteKey; |
|||
this.name = name; |
|||
this.suiteSecret = suiteSecret; |
|||
} |
|||
|
|||
public static DingMiniAppEnum getEnum(String suiteKey) { |
|||
DingMiniAppEnum[] values = DingMiniAppEnum.values(); |
|||
for (DingMiniAppEnum value : values) { |
|||
if (value.getSuiteKey().equals(suiteKey)) { |
|||
return value; |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
|
|||
public String getSuiteKey() { |
|||
return suiteKey; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public String getSuiteSecret() { |
|||
return suiteSecret; |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,46 @@ |
|||
package com.epmet.commons.tools.feign; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.dto.form.HasOperPermissionFormDTO; |
|||
import com.epmet.commons.tools.dto.result.OperResouce; |
|||
import com.epmet.commons.tools.feign.fallback.CommonOperAccessOpenFeignClientFallbackFactory; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 运营端权限模块 |
|||
* @Author yinzuomei |
|||
* @Date 2020/5/21 15:17 本服务对外开放的API,其他服务通过引用此client调用该服务 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.OPER_ACCESS_SERVER, fallbackFactory = CommonOperAccessOpenFeignClientFallbackFactory.class) |
|||
//@FeignClient(name = ServiceConstant.OPER_ACCESS_SERVER, fallbackFactory = CommonOperAccessOpenFeignClientFallbackFactory.class, url = "http://localhost:8093")
|
|||
public interface CommonOperAccessOpenFeignClient { |
|||
/** |
|||
* @param |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author yinzuomei |
|||
* @Description 清空运营人员权限信息、菜单信息 |
|||
* @Date 2020/5/21 17:08 |
|||
**/ |
|||
@GetMapping("/oper/access/menu/clearoperuseraccess") |
|||
Result clearOperUserAccess(); |
|||
|
|||
/** |
|||
* 是否有该接口的权限 |
|||
* @return |
|||
*/ |
|||
@PostMapping("/oper/access/menu/hasPermission") |
|||
Result hasOperPermission(@RequestBody HasOperPermissionFormDTO form); |
|||
|
|||
/** |
|||
* 需要验证的菜单资源 |
|||
* @return |
|||
*/ |
|||
@PostMapping("/oper/access/menu/getExamineResourceUrls") |
|||
Result<List<OperResouce>> getExamineResourceUrls(); |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.epmet.commons.tools.feign; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.dto.form.DingMiniInfoFormDTO; |
|||
import com.epmet.commons.tools.feign.fallback.CommonThirdFeignClientFallBackFactory; |
|||
import com.epmet.commons.tools.redis.common.bean.DingMiniInfoCache; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zxc |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallbackFactory = CommonThirdFeignClientFallBackFactory.class) |
|||
// @FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallbackFactory = CommonAggFeignClientFallBackFactory.class,url = "localhost:8110")
|
|||
public interface CommonThirdFeignClient { |
|||
|
|||
@PostMapping("/third/dingTalk/getDingMiniInfo") |
|||
Result<DingMiniInfoCache> getDingMiniInfo(@RequestBody DingMiniInfoFormDTO formDTO); |
|||
|
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.epmet.commons.tools.feign.fallback; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.dto.form.HasOperPermissionFormDTO; |
|||
import com.epmet.commons.tools.dto.result.OperResouce; |
|||
import com.epmet.commons.tools.feign.CommonOperAccessOpenFeignClient; |
|||
import com.epmet.commons.tools.utils.ModuleUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 运营端权限模块 |
|||
* @Author yinzuomei |
|||
* @Date 2020/5/21 15:47 |
|||
*/ |
|||
//@Component
|
|||
public class CommonOperAccessOpenFeignClientFallback implements CommonOperAccessOpenFeignClient { |
|||
@Override |
|||
public Result clearOperUserAccess() { |
|||
return ModuleUtils.feignConError(ServiceConstant.OPER_ACCESS_SERVER, "clearOperUserAccess"); |
|||
|
|||
} |
|||
|
|||
@Override |
|||
public Result hasOperPermission(HasOperPermissionFormDTO form) { |
|||
return ModuleUtils.feignConError(ServiceConstant.OPER_ACCESS_SERVER, "hasOperPermission"); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<OperResouce>> getExamineResourceUrls() { |
|||
return ModuleUtils.feignConError(ServiceConstant.OPER_ACCESS_SERVER, "getExamineResourceUrls"); |
|||
} |
|||
} |
|||
|
@ -0,0 +1,19 @@ |
|||
package com.epmet.commons.tools.feign.fallback; |
|||
|
|||
import com.epmet.commons.tools.exception.ExceptionUtils; |
|||
import com.epmet.commons.tools.feign.CommonOperAccessOpenFeignClient; |
|||
import feign.hystrix.FallbackFactory; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
@Component |
|||
@Slf4j |
|||
public class CommonOperAccessOpenFeignClientFallbackFactory implements FallbackFactory<CommonOperAccessOpenFeignClient> { |
|||
private CommonOperAccessOpenFeignClientFallback fallback = new CommonOperAccessOpenFeignClientFallback(); |
|||
|
|||
@Override |
|||
public CommonOperAccessOpenFeignClient create(Throwable cause) { |
|||
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause))); |
|||
return fallback; |
|||
} |
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.epmet.commons.tools.feign.fallback; |
|||
|
|||
import com.epmet.commons.tools.exception.ExceptionUtils; |
|||
import com.epmet.commons.tools.feign.CommonThirdFeignClient; |
|||
import feign.hystrix.FallbackFactory; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
@Component |
|||
@Slf4j |
|||
public class CommonThirdFeignClientFallBackFactory implements FallbackFactory<CommonThirdFeignClient> { |
|||
|
|||
private CommonThirdFeignClientFallback fallback = new CommonThirdFeignClientFallback(); |
|||
|
|||
@Override |
|||
public CommonThirdFeignClient create(Throwable cause) { |
|||
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause))); |
|||
return fallback; |
|||
} |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.epmet.commons.tools.feign.fallback; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.dto.form.DingMiniInfoFormDTO; |
|||
import com.epmet.commons.tools.feign.CommonThirdFeignClient; |
|||
import com.epmet.commons.tools.redis.common.bean.DingMiniInfoCache; |
|||
import com.epmet.commons.tools.utils.ModuleUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* |
|||
* @Author zxc |
|||
* @Description |
|||
* @Date |
|||
**/ |
|||
@Component |
|||
public class CommonThirdFeignClientFallback implements CommonThirdFeignClient { |
|||
|
|||
@Override |
|||
public Result<DingMiniInfoCache> getDingMiniInfo(DingMiniInfoFormDTO formDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPMET_THIRD_SERVER, "getDingMiniInfo", formDTO); |
|||
} |
|||
} |
@ -0,0 +1,58 @@ |
|||
package com.epmet.commons.tools.redis.common; |
|||
|
|||
import com.epmet.commons.tools.dto.form.DingMiniInfoFormDTO; |
|||
import com.epmet.commons.tools.exception.EpmetException; |
|||
import com.epmet.commons.tools.feign.CommonThirdFeignClient; |
|||
import com.epmet.commons.tools.redis.RedisKeys; |
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import com.epmet.commons.tools.redis.common.bean.DingMiniInfoCache; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
import org.springframework.util.CollectionUtils; |
|||
|
|||
import javax.annotation.PostConstruct; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/9/15 10:01 |
|||
* @DESC |
|||
*/ |
|||
@Slf4j |
|||
@Component |
|||
public class CustomerDingDingRedis { |
|||
|
|||
@Autowired |
|||
private CommonThirdFeignClient thirdFeignClient; |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
private static CustomerDingDingRedis customerDingDingRedis; |
|||
|
|||
@PostConstruct |
|||
public void init() { |
|||
customerDingDingRedis = this; |
|||
customerDingDingRedis.thirdFeignClient = this.thirdFeignClient; |
|||
customerDingDingRedis.redisUtils = this.redisUtils; |
|||
} |
|||
|
|||
public static DingMiniInfoCache getDingMiniInfo(String miniAppId){ |
|||
String key = RedisKeys.getDingMiniInfoKey(miniAppId); |
|||
Map<String, Object> miniInfoMap = customerDingDingRedis.redisUtils.hGetAll(key); |
|||
if (!CollectionUtils.isEmpty(miniInfoMap)){ |
|||
return ConvertUtils.mapToEntity(miniInfoMap,DingMiniInfoCache.class); |
|||
} |
|||
Result<DingMiniInfoCache> dingMiniInfoResult = customerDingDingRedis.thirdFeignClient.getDingMiniInfo(new DingMiniInfoFormDTO(miniAppId)); |
|||
if (!dingMiniInfoResult.success()){ |
|||
throw new EpmetException("查询dingMiniInfo失败..."); |
|||
} |
|||
if (null == dingMiniInfoResult.getData()){ |
|||
return null; |
|||
} |
|||
return dingMiniInfoResult.getData(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,52 @@ |
|||
package com.epmet.commons.tools.redis.common.bean; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/9/15 10:11 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class DingMiniInfoCache implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -6956910978074595334L; |
|||
|
|||
private String id; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String suiteId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String appId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String miniAppId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String suiteName; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String suiteKey; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String suiteSecret; |
|||
|
|||
private String token; |
|||
|
|||
private String aesKey; |
|||
} |
@ -0,0 +1,89 @@ |
|||
package com.epmet.commons.tools.utils; |
|||
|
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
|
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2022/9/14 14:40 |
|||
*/ |
|||
public class NameUtils { |
|||
/** |
|||
* 复姓(两字),国内现存81个。末尾添加三字以上的部分满姓 |
|||
*/ |
|||
private static final String[] SURNAME_NOW = {"百里", "北堂", "北野", "北宫", "辟闾", "孛尔", "淳于", "成公", "陈生", "褚师", |
|||
"端木", "东方", "东郭", "东野", "东门", "第五", "大狐", "段干", "段阳", "带曰", "第二", "东宫", "公孙", "公冶", "公羊", |
|||
"公良", "公西", "公孟", "高堂", "高阳", "公析", "公肩", "公坚", "郭公", "谷梁", "毌将", "公乘", "毌丘", "公户", "公广", |
|||
"公仪", "公祖", "皇甫", "黄龙", "胡母", "何阳", "夹谷", "九方", "即墨", "梁丘", "闾丘", "洛阳", "陵尹", "冷富", "龙丘", |
|||
"令狐", "林彭", "南宫", "南郭", "女娲", "南伯", "南容", "南门", "南野", "欧阳", "欧侯", "濮阳", "青阳", "漆雕", "亓官", |
|||
"渠丘", "壤驷", "上官", "少室", "少叔", "司徒", "司马", "司空", "司寇", "士孙", "申屠", "申徒", "申鲜", "申叔", "夙沙", |
|||
"叔先", "叔仲", "侍其", "叔孙", "澹台", "太史", "太叔", "太公", "屠岸", "唐古", "闻人", "巫马", "微生", "王孙", "无庸", |
|||
"夏侯", "西门", "信平", "鲜于", "轩辕", "相里", "新垣", "徐离", "羊舌", "羊角", "延陵", "於陵", "伊祁", "吾丘", "乐正", |
|||
"只斤", "诸葛", "颛孙", "仲孙", "仲长", "钟离", "宗政", "主父", "中叔", "左人", "左丘", "宰父", "长儿", "仉督", "单于", |
|||
"叱干", "叱利", "车非", "车公", "车侯", "车长", "车绵", "独孤", "大野", "独吉", "达奚", "达官", "达仲", "达品", "哥舒", |
|||
"哥夜", "哥翰", "哥汗", "赫连", "呼延", "贺兰", "黑齿", "斛律", "斛粟", "贺若", "贺奴", "贺远", "贺元", "夹谷", "吉胡", |
|||
"吉利", "吉家", "可频", "慕容", "万俟", "万红", "万中", "抹捻", "纳兰", "纳西", "纳吉", "纳罕", "纳塞", "纳博", "纳称", |
|||
"纳勉", "普周", "仆固", "仆散", "蒲察", "屈突", "屈卢", "钳耳", "是云", "索卢", "厍狄", "拓跋", "同蹄", "秃发", "完颜", |
|||
"完明", "完忠", "宇文", "尉迟", "耶律", "耶红", "也先", "耶鲜", "耶闻", "长孙", "长南", "长北", "长西", "长红", "长元", |
|||
"长秋", "长寸", "长李", "长云", "萨嘛喇","赫舍里","萨克达","钮祜禄","他塔喇","喜塔腊","库雅喇","瓜尔佳","舒穆禄","索绰络", |
|||
"叶赫那拉","依尔觉罗","额尔德特","讷殷富察","叶赫那兰","爱新觉罗","依尔根觉罗"}; |
|||
|
|||
/** |
|||
* 获取复姓,非单字姓氏。未匹配上则依旧返回单字姓氏 |
|||
* @param name |
|||
* @return |
|||
*/ |
|||
public static String getSurNameComplex(String name){ |
|||
for (String s : SURNAME_NOW) { |
|||
if (name.startsWith(s)) { |
|||
return name.substring(0, s.length()); |
|||
} |
|||
} |
|||
return name.substring(0,1); |
|||
} |
|||
|
|||
/** |
|||
* 获取复姓名,去除姓氏后名 |
|||
* @param name |
|||
* @return |
|||
*/ |
|||
public static String getNameComplex(String name){ |
|||
for (String s : SURNAME_NOW) { |
|||
if (name.startsWith(s)) { |
|||
return name.substring(s.length()); |
|||
} |
|||
} |
|||
return name.substring(1); |
|||
} |
|||
|
|||
/** |
|||
* 获取姓氏与姓名<br> |
|||
* 姓名在两字时,首字为姓。<br> |
|||
* 姓名大于两字时,优先匹配复姓。<br> |
|||
* 姓氏未匹配且姓名多于5字时,姓与名均在姓氏中,名为空;少于5字时则采用第一个字为姓。<br> |
|||
* @param name 姓名 |
|||
* @return map类型数据,姓氏为key值“X”,名字为value值“M” |
|||
*/ |
|||
public static Map<String, String> getSurName(String name) { |
|||
Map<String,String> mapData = new HashMap<>(NumConstant.TWO); |
|||
if (name.length() > NumConstant.ZERO && name.length() <= NumConstant.TWO){ |
|||
mapData.put("X", name.substring(NumConstant.ZERO, NumConstant.ONE)); |
|||
mapData.put("M", name.substring(NumConstant.ONE)); |
|||
} else if (name.length() > NumConstant.TWO) { |
|||
for (String s : SURNAME_NOW) {//遍历复姓数组
|
|||
if (name.startsWith(s)) { |
|||
mapData.put("X", s); |
|||
mapData.put("M", name.substring(s.length())); |
|||
return mapData; |
|||
} |
|||
} |
|||
//姓氏没有匹配时采用第一个字为姓
|
|||
mapData.put("X", name.substring(NumConstant.ZERO, NumConstant.ONE)); |
|||
mapData.put("M", name.substring(NumConstant.ONE)); |
|||
} |
|||
return mapData; |
|||
} |
|||
} |
@ -0,0 +1,53 @@ |
|||
package com.epmet.commons.tools.utils; |
|||
|
|||
import com.alibaba.fastjson.JSON; |
|||
import com.epmet.commons.tools.dto.result.YtHsjcResDTO; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yzm |
|||
* @Date 2022/9/26 16:56 |
|||
*/ |
|||
@Slf4j |
|||
public class YtHsResUtils { |
|||
private static String URL = "http://10.2.2.60:8191/sjzt/server/hsjcxx"; |
|||
private static final String APP_KEY_VALUE = "DR4jF5Be7sCsqDmCamq2tmYCl"; |
|||
private static final String APP_KEY = "appkey"; |
|||
private static final String CARD_NO = "card_no"; |
|||
private static final String ROW_NUM = "ROWNUM"; |
|||
private static final String PAGE_SIZE = "PAGESIZE"; |
|||
/** |
|||
* desc:图片同步扫描 |
|||
* |
|||
* @return |
|||
*/ |
|||
public static YtHsjcResDTO hsjc(String cardNo, Integer rowNum, Integer pageSize) { |
|||
try { |
|||
//String param = String.format("&card_no=%s&ROWNUM=%s&PAGESIZE=%s", cardNo, rowNum, pageSize);
|
|||
//String apiUrl = url.concat(param);
|
|||
Map<String,Object> param = new HashMap<>(); |
|||
param.put(APP_KEY,APP_KEY_VALUE); |
|||
param.put(CARD_NO,cardNo); |
|||
param.put(ROW_NUM,rowNum); |
|||
param.put(PAGE_SIZE,pageSize); |
|||
log.info("hsjc api param:{}",param); |
|||
Result<String> result = HttpClientManager.getInstance().sendGet(URL, param); |
|||
log.info("hsjc api result:{}",JSON.toJSONString(result)); |
|||
if (result.success()) { |
|||
return JSON.parseObject(result.getData(), YtHsjcResDTO.class); |
|||
} |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
log.warn(String.format("烟台核酸检测结果查询异常cardNo:%s,异常信息:%s", cardNo, e.getMessage())); |
|||
} |
|||
YtHsjcResDTO resultResult = new YtHsjcResDTO(); |
|||
resultResult.setData(new ArrayList<>()); |
|||
return resultResult; |
|||
} |
|||
} |
|||
|
@ -0,0 +1,5 @@ |
|||
epmet: |
|||
oper-examine-resource-urls: |
|||
# 角色编辑 |
|||
- resourceUrl: /oper/access/operrole |
|||
resourceMethod: PUT |
@ -0,0 +1,40 @@ |
|||
package com.epmet.task; |
|||
|
|||
|
|||
import com.alibaba.fastjson.JSON; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.NatInfoScanTaskFormDTO; |
|||
import com.epmet.feign.EpmetUserOpenFeignClient; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @author zxc |
|||
* @dscription |
|||
* 大数据局部门配置on |
|||
* 根据范围搜索居民,调接口查询最近一次核酸检测记录 |
|||
* 检测时间 + 身份证 不存在就插入 |
|||
*/ |
|||
@Slf4j |
|||
@Component("natInfoScanTask") |
|||
public class NatInfoScanTask implements ITask { |
|||
|
|||
@Autowired |
|||
private EpmetUserOpenFeignClient userOpenFeignClient; |
|||
|
|||
@Override |
|||
public void run(String params) { |
|||
NatInfoScanTaskFormDTO formDTO = new NatInfoScanTaskFormDTO(); |
|||
if (StringUtils.isNotBlank(params)) { |
|||
formDTO = JSON.parseObject(params, NatInfoScanTaskFormDTO.class); |
|||
} |
|||
Result result = userOpenFeignClient.natInfoScanTask(formDTO); |
|||
if (result.success()) { |
|||
log.info("NatInfoScanTask定时任务执行成功"); |
|||
} else { |
|||
log.error("NatInfoScanTask定时任务执行失败:" + result.getMsg()); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,89 @@ |
|||
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 2022-09-14 |
|||
*/ |
|||
@Data |
|||
public class DingMiniInfoDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* ID |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String suiteId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String appId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String miniAppId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String suiteName; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String suiteKey; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String suiteSecret; |
|||
|
|||
private String token; |
|||
|
|||
private String aesKey; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,99 @@ |
|||
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 2022-09-14 |
|||
*/ |
|||
@Data |
|||
public class OpenSyncBizDataDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 第三方企业应用的suiteid加下划线0 |
|||
*/ |
|||
private String subscribeId; |
|||
|
|||
private String suiteKey; |
|||
|
|||
/** |
|||
* 第三方企业应用的corpid |
|||
*/ |
|||
private String corpId; |
|||
|
|||
/** |
|||
* 第三方企业应用的suiteid |
|||
*/ |
|||
private String bizId; |
|||
|
|||
/** |
|||
* 数据为Json格式 |
|||
*/ |
|||
private String bizData; |
|||
|
|||
/** |
|||
* 2:第三方企业应用票据; |
|||
4:企业授权变更,包含授权、解除授权、授权变更; |
|||
7:第三方企业应用变更,包含停用、启用、删除(删除保留授权); |
|||
13:企业用户变更,包含用户添加、修改、删除; |
|||
14:企业部门变更,包含部门添加、修改、删除; |
|||
15:企业角色变更,包含角色添加、修改、删除; |
|||
16:企业变更,包含企业修改、删除; |
|||
17:市场订单; |
|||
20:企业外部联系人变更,包含添加、修改、删除; |
|||
22:ISV自定义审批; |
|||
25:家校通讯录1.0(Deprecated)信息变更。家校通讯录升级,请查看家校通讯录2.0数据推送; |
|||
32:智能硬件绑定类型; |
|||
37:因订单到期或者用户退款等导致的服务关闭,目前仅推送因退款等导致的服务关闭; |
|||
50:家校通讯录2.0,部门信息变更; |
|||
51:家校通讯录2.0,人员信息变更; |
|||
63:应用试用记录回调信息; |
|||
66:工作台组件变更回调事件; |
|||
67:钉钉假期相关回调事件; |
|||
133:CRM客户动态相关数据回调事件; |
|||
137:人事平台员工异动V2相关数据回调事件; |
|||
139:异步转译通讯录id任务完成通知; |
|||
165:人事平台员工档案变动事件相关数据的回调事件; |
|||
175:人事解决方案变更事件; |
|||
*/ |
|||
private String bizType; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/9/14 14:52 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class ExemptLoginUserDetailFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -4333806195203619201L; |
|||
|
|||
public interface ExemptLoginUserDetailForm{} |
|||
|
|||
@NotBlank(message = "code不能为空",groups = ExemptLoginUserDetailForm.class) |
|||
private String code; |
|||
|
|||
@NotBlank(message = "corpId不能为空",groups = ExemptLoginUserDetailForm.class) |
|||
private String corpId; |
|||
|
|||
@NotBlank(message = "miniAppId不能为空",groups = ExemptLoginUserDetailForm.class) |
|||
private String miniAppId; |
|||
} |
@ -0,0 +1,71 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|||
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.DefaultGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.dto.DingMiniInfoDTO; |
|||
import com.epmet.service.DingMiniInfoService; |
|||
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 2022-09-14 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("dingMiniInfo") |
|||
public class DingMiniInfoController { |
|||
|
|||
@Autowired |
|||
private DingMiniInfoService dingMiniInfoService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<DingMiniInfoDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<DingMiniInfoDTO> page = dingMiniInfoService.page(params); |
|||
return new Result<PageData<DingMiniInfoDTO>>().ok(page); |
|||
} |
|||
|
|||
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
|||
public Result<DingMiniInfoDTO> get(@PathVariable("id") String id){ |
|||
DingMiniInfoDTO data = dingMiniInfoService.get(id); |
|||
return new Result<DingMiniInfoDTO>().ok(data); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("save") |
|||
public Result save(@RequestBody DingMiniInfoDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
dingMiniInfoService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@RequestBody DingMiniInfoDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
dingMiniInfoService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("delete") |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
dingMiniInfoService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,155 @@ |
|||
package com.epmet.controller.dingtalk; |
|||
|
|||
import com.alibaba.fastjson.JSON; |
|||
import com.alibaba.fastjson.JSONObject; |
|||
import com.aliyun.dingtalk.util.DingCallbackCrypto; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.dto.form.DingMiniInfoFormDTO; |
|||
import com.epmet.commons.tools.redis.common.bean.DingMiniInfoCache; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.dao.OpenSyncBizDataDao; |
|||
import com.epmet.dto.DingMiniInfoDTO; |
|||
import com.epmet.dto.form.ExemptLoginUserDetailFormDTO; |
|||
import com.epmet.entity.OpenSyncBizDataEntity; |
|||
import com.epmet.redis.DingDingCallbackRedis; |
|||
import com.epmet.service.DingTalkService; |
|||
import com.epmet.service.OpenSyncBizDataService; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* ISV 小程序回调信息处理 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/dingTalk") |
|||
public class CallbackController { |
|||
|
|||
private final Logger log = LoggerFactory.getLogger(getClass()); |
|||
|
|||
/** |
|||
* 创建应用,验证回调URL创建有效事件(第一次保存回调URL之前) |
|||
*/ |
|||
private static final String EVENT_CHECK_CREATE_SUITE_URL = "check_create_suite_url"; |
|||
|
|||
/** |
|||
* 创建应用,验证回调URL变更有效事件(第一次保存回调URL之后) |
|||
*/ |
|||
private static final String EVENT_CHECK_UPADTE_SUITE_URL = "check_update_suite_url"; |
|||
|
|||
/** |
|||
* suite_ticket推送事件 |
|||
*/ |
|||
private static final String EVENT_SUITE_TICKET = "suite_ticket"; |
|||
|
|||
/** |
|||
* 企业授权开通应用事件 |
|||
*/ |
|||
private static final String EVENT_TMP_AUTH_CODE = "tmp_auth_code"; |
|||
|
|||
private static final String EVENT_SYNC_HTTP_PUSH_HIGH = "SYNC_HTTP_PUSH_HIGH"; |
|||
|
|||
@Autowired |
|||
private OpenSyncBizDataService openSyncBizDataService; |
|||
@Autowired |
|||
private OpenSyncBizDataDao openSyncBizDataDao; |
|||
@Autowired |
|||
private DingDingCallbackRedis dingCallbackRedis; |
|||
@Autowired |
|||
private DingTalkService dingTalkService; |
|||
|
|||
@PostMapping(value = "dingCallback") |
|||
public Object dingCallback( |
|||
@RequestParam(value = "signature") String signature, |
|||
@RequestParam(value = "timestamp") Long timestamp, |
|||
@RequestParam(value = "nonce") String nonce, |
|||
@RequestParam(value = "suiteKey") String suiteKey, |
|||
@RequestBody(required = false) JSONObject body |
|||
) { |
|||
String params = "signature:" + signature + " timestamp:" + timestamp + " nonce:" + nonce + " body:" + body + "suiteKey::"+suiteKey; |
|||
try { |
|||
log.info("begin callback:" + params); |
|||
DingMiniInfoDTO dingMiniInfo = openSyncBizDataDao.getDingMiniInfo(suiteKey); |
|||
DingCallbackCrypto dingTalkEncryptor = new DingCallbackCrypto(dingMiniInfo.getToken(), dingMiniInfo.getAesKey(), suiteKey); |
|||
|
|||
// 从post请求的body中获取回调信息的加密数据进行解密处理
|
|||
String encrypt = body.getString("encrypt"); |
|||
String plainText = dingTalkEncryptor.getDecryptMsg(signature, timestamp.toString(), nonce, encrypt); |
|||
JSONObject callBackContent = JSON.parseObject(plainText); |
|||
|
|||
log.info("推来的消息体:"+plainText); |
|||
|
|||
// 根据回调事件类型做不同的业务处理
|
|||
String eventType = callBackContent.getString("EventType"); |
|||
if (EVENT_CHECK_CREATE_SUITE_URL.equals(eventType)) { |
|||
log.info("验证新创建的回调URL有效性: " + plainText); |
|||
} else if (EVENT_CHECK_UPADTE_SUITE_URL.equals(eventType)) { |
|||
log.info("验证更新回调URL有效性: " + plainText); |
|||
} else if (EVENT_SUITE_TICKET.equals(eventType)) { |
|||
// suite_ticket用于用签名形式生成accessToken(访问钉钉服务端的凭证),需要保存到应用的db。
|
|||
// 钉钉会定期向本callback url推送suite_ticket新值用以提升安全性。
|
|||
// 应用在获取到新的时值时,保存db成功后,返回给钉钉success加密串(如本demo的return)
|
|||
log.info("应用suite_ticket数据推送: " + plainText); |
|||
} else if (EVENT_TMP_AUTH_CODE.equals(eventType)) { |
|||
// 本事件应用应该异步进行授权开通企业的初始化,目的是尽最大努力快速返回给钉钉服务端。用以提升企业管理员开通应用体验
|
|||
// 即使本接口没有收到数据或者收到事件后处理初始化失败都可以后续再用户试用应用时从前端获取到corpId并拉取授权企业信息,进而初始化开通及企业。
|
|||
log.info("企业授权开通应用事件: " + plainText); |
|||
} else if (EVENT_SYNC_HTTP_PUSH_HIGH.equals(eventType)){ |
|||
List<Map<String, Object>> bizData = (List<Map<String, Object>>) callBackContent.get("bizData"); |
|||
if (CollectionUtils.isNotEmpty(bizData)){ |
|||
List<OpenSyncBizDataEntity> list = new ArrayList<>(); |
|||
bizData.forEach(b -> { |
|||
OpenSyncBizDataEntity e = new OpenSyncBizDataEntity(); |
|||
e.setSuiteKey(suiteKey); |
|||
e.setSubscribeId(b.get("subscribe_id").toString()); |
|||
e.setCorpId(b.get("corp_id").toString()); |
|||
e.setBizId(b.get("biz_id").toString()); |
|||
e.setBizData(b.get("biz_data").toString()); |
|||
e.setBizType(b.get("biz_type").toString()); |
|||
list.add(e); |
|||
openSyncBizDataService.delete(e); |
|||
if (e.getBizType().equals(NumConstant.TWO_STR)){ |
|||
Map<String,String> ticketMap = JSON.parseObject(e.getBizData(), Map.class); |
|||
dingCallbackRedis.set(suiteKey,ticketMap.get("suiteTicket")); |
|||
} |
|||
}); |
|||
openSyncBizDataService.insertBatch(list); |
|||
} |
|||
} else{ |
|||
// 其他类型事件处理
|
|||
} |
|||
|
|||
// 返回success的加密信息表示回调处理成功
|
|||
return dingTalkEncryptor.getEncryptedMap("success", timestamp, nonce); |
|||
} catch (Exception e) { |
|||
//失败的情况,应用的开发者应该通过告警感知,并干预修复
|
|||
log.error("process callback fail." + params, e); |
|||
return "fail"; |
|||
} |
|||
} |
|||
|
|||
@PostMapping("getExemptLoginUserDetail") |
|||
public Result<Object> getExemptLoginUserDetail(@RequestBody ExemptLoginUserDetailFormDTO formDTO){ |
|||
ValidatorUtils.validateEntity(formDTO, ExemptLoginUserDetailFormDTO.ExemptLoginUserDetailForm.class); |
|||
return new Result<Object>().ok(dingTalkService.getExemptLoginUserDetail(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* Desc: 获取钉钉小程序信息 |
|||
* @param formDTO |
|||
* @author zxc |
|||
* @date 2022/9/15 10:46 |
|||
*/ |
|||
@PostMapping("getDingMiniInfo") |
|||
public Result<DingMiniInfoCache> getDingMiniInfo(@RequestBody DingMiniInfoFormDTO formDTO){ |
|||
ValidatorUtils.validateEntity(formDTO, DingMiniInfoFormDTO.DingMiniInfoForm.class); |
|||
return new Result<DingMiniInfoCache>().ok(dingTalkService.getDingMiniInfo(formDTO)); |
|||
} |
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.DingMiniInfoEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 钉钉小程序信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-09-14 |
|||
*/ |
|||
@Mapper |
|||
public interface DingMiniInfoDao extends BaseDao<DingMiniInfoEntity> { |
|||
|
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.DingMiniInfoDTO; |
|||
import com.epmet.dto.OpenSyncBizDataDTO; |
|||
import com.epmet.entity.OpenSyncBizDataEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-09-14 |
|||
*/ |
|||
@Mapper |
|||
public interface OpenSyncBizDataDao extends BaseDao<OpenSyncBizDataEntity> { |
|||
|
|||
DingMiniInfoDTO getDingMiniInfo(@Param("suiteKey")String suiteKey); |
|||
|
|||
DingMiniInfoDTO getDingMiniInfoByAppId(@Param("miniAppId")String miniAppId); |
|||
|
|||
Integer delOpenSyncData(OpenSyncBizDataEntity e); |
|||
|
|||
List<OpenSyncBizDataDTO> getOpenSyncData(@Param("suiteKey")String suiteKey, @Param("bizType")String bizType,@Param("corpId")String corpId); |
|||
|
|||
} |
@ -0,0 +1,55 @@ |
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 钉钉小程序信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-09-14 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("ding_mini_info") |
|||
public class DingMiniInfoEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String suiteId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String appId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String miniAppId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String suiteName; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String suiteKey; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String suiteSecret; |
|||
|
|||
private String token; |
|||
|
|||
private String aesKey; |
|||
|
|||
} |
@ -0,0 +1,70 @@ |
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-09-14 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("open_sync_biz_data") |
|||
public class OpenSyncBizDataEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 第三方企业应用的suiteid加下划线0 |
|||
*/ |
|||
private String subscribeId; |
|||
|
|||
private String suiteKey; |
|||
|
|||
/** |
|||
* 第三方企业应用的corpid |
|||
*/ |
|||
private String corpId; |
|||
|
|||
/** |
|||
* 第三方企业应用的suiteid |
|||
*/ |
|||
private String bizId; |
|||
|
|||
/** |
|||
* 数据为Json格式 |
|||
*/ |
|||
private String bizData; |
|||
|
|||
/** |
|||
* 2:第三方企业应用票据; |
|||
4:企业授权变更,包含授权、解除授权、授权变更; |
|||
7:第三方企业应用变更,包含停用、启用、删除(删除保留授权); |
|||
13:企业用户变更,包含用户添加、修改、删除; |
|||
14:企业部门变更,包含部门添加、修改、删除; |
|||
15:企业角色变更,包含角色添加、修改、删除; |
|||
16:企业变更,包含企业修改、删除; |
|||
17:市场订单; |
|||
20:企业外部联系人变更,包含添加、修改、删除; |
|||
22:ISV自定义审批; |
|||
25:家校通讯录1.0(Deprecated)信息变更。家校通讯录升级,请查看家校通讯录2.0数据推送; |
|||
32:智能硬件绑定类型; |
|||
37:因订单到期或者用户退款等导致的服务关闭,目前仅推送因退款等导致的服务关闭; |
|||
50:家校通讯录2.0,部门信息变更; |
|||
51:家校通讯录2.0,人员信息变更; |
|||
63:应用试用记录回调信息; |
|||
66:工作台组件变更回调事件; |
|||
67:钉钉假期相关回调事件; |
|||
133:CRM客户动态相关数据回调事件; |
|||
137:人事平台员工异动V2相关数据回调事件; |
|||
139:异步转译通讯录id任务完成通知; |
|||
165:人事平台员工档案变动事件相关数据的回调事件; |
|||
175:人事解决方案变更事件; |
|||
*/ |
|||
private String bizType; |
|||
|
|||
} |
@ -0,0 +1,46 @@ |
|||
package com.epmet.redis; |
|||
|
|||
import com.alibaba.fastjson.JSON; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.exception.EpmetException; |
|||
import com.epmet.commons.tools.redis.RedisKeys; |
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import com.epmet.dao.OpenSyncBizDataDao; |
|||
import com.epmet.dto.OpenSyncBizDataDTO; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/9/14 10:32 |
|||
* @DESC |
|||
*/ |
|||
@Component |
|||
public class DingDingCallbackRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
@Autowired |
|||
private OpenSyncBizDataDao openSyncBizDataDao; |
|||
|
|||
public void set(String suiteKey,String suiteTicket){ |
|||
String key = RedisKeys.getSuiteTicketKey(suiteKey); |
|||
redisUtils.set(key,suiteTicket,-1); |
|||
} |
|||
|
|||
public String get(String suiteKey){ |
|||
String ticket = redisUtils.getString(RedisKeys.getSuiteTicketKey(suiteKey)); |
|||
if (StringUtils.isNotBlank(ticket)){ |
|||
return ticket; |
|||
} |
|||
List<OpenSyncBizDataDTO> openSyncData = openSyncBizDataDao.getOpenSyncData(suiteKey, NumConstant.TWO_STR, null); |
|||
if (null == openSyncData){ |
|||
throw new EpmetException("未查询到"+suiteKey+"的ticket"); |
|||
} |
|||
Map map = JSON.parseObject(openSyncData.get(NumConstant.ZERO).getBizData(), Map.class); |
|||
return map.get("suiteTicket").toString(); |
|||
} |
|||
} |
@ -0,0 +1,78 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.DingMiniInfoDTO; |
|||
import com.epmet.entity.DingMiniInfoEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 钉钉小程序信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-09-14 |
|||
*/ |
|||
public interface DingMiniInfoService extends BaseService<DingMiniInfoEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<DingMiniInfoDTO> |
|||
* @author generator |
|||
* @date 2022-09-14 |
|||
*/ |
|||
PageData<DingMiniInfoDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<DingMiniInfoDTO> |
|||
* @author generator |
|||
* @date 2022-09-14 |
|||
*/ |
|||
List<DingMiniInfoDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return DingMiniInfoDTO |
|||
* @author generator |
|||
* @date 2022-09-14 |
|||
*/ |
|||
DingMiniInfoDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-09-14 |
|||
*/ |
|||
void save(DingMiniInfoDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-09-14 |
|||
*/ |
|||
void update(DingMiniInfoDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-09-14 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.tools.dto.form.DingMiniInfoFormDTO; |
|||
import com.epmet.commons.tools.redis.common.bean.DingMiniInfoCache; |
|||
import com.epmet.dto.form.ExemptLoginUserDetailFormDTO; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/9/14 14:56 |
|||
* @DESC |
|||
*/ |
|||
public interface DingTalkService { |
|||
|
|||
Object getExemptLoginUserDetail(ExemptLoginUserDetailFormDTO formDTO); |
|||
|
|||
/** |
|||
* Desc: 获取钉钉小程序信息 |
|||
* @param formDTO |
|||
* @author zxc |
|||
* @date 2022/9/15 10:46 |
|||
*/ |
|||
DingMiniInfoCache getDingMiniInfo(DingMiniInfoFormDTO formDTO); |
|||
|
|||
} |
@ -0,0 +1,80 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.OpenSyncBizDataDTO; |
|||
import com.epmet.entity.OpenSyncBizDataEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-09-14 |
|||
*/ |
|||
public interface OpenSyncBizDataService extends BaseService<OpenSyncBizDataEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<OpenSyncBizDataDTO> |
|||
* @author generator |
|||
* @date 2022-09-14 |
|||
*/ |
|||
PageData<OpenSyncBizDataDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<OpenSyncBizDataDTO> |
|||
* @author generator |
|||
* @date 2022-09-14 |
|||
*/ |
|||
List<OpenSyncBizDataDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return OpenSyncBizDataDTO |
|||
* @author generator |
|||
* @date 2022-09-14 |
|||
*/ |
|||
OpenSyncBizDataDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-09-14 |
|||
*/ |
|||
void save(OpenSyncBizDataDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-09-14 |
|||
*/ |
|||
void update(OpenSyncBizDataDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-09-14 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
void delete(OpenSyncBizDataEntity condition); |
|||
} |
@ -0,0 +1,82 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.DingMiniInfoDao; |
|||
import com.epmet.dto.DingMiniInfoDTO; |
|||
import com.epmet.entity.DingMiniInfoEntity; |
|||
import com.epmet.service.DingMiniInfoService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 钉钉小程序信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-09-14 |
|||
*/ |
|||
@Service |
|||
public class DingMiniInfoServiceImpl extends BaseServiceImpl<DingMiniInfoDao, DingMiniInfoEntity> implements DingMiniInfoService { |
|||
|
|||
@Override |
|||
public PageData<DingMiniInfoDTO> page(Map<String, Object> params) { |
|||
IPage<DingMiniInfoEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, DingMiniInfoDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<DingMiniInfoDTO> list(Map<String, Object> params) { |
|||
List<DingMiniInfoEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, DingMiniInfoDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<DingMiniInfoEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<DingMiniInfoEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public DingMiniInfoDTO get(String id) { |
|||
DingMiniInfoEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, DingMiniInfoDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(DingMiniInfoDTO dto) { |
|||
DingMiniInfoEntity entity = ConvertUtils.sourceToTarget(dto, DingMiniInfoEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(DingMiniInfoDTO dto) { |
|||
DingMiniInfoEntity entity = ConvertUtils.sourceToTarget(dto, DingMiniInfoEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,68 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.aliyun.dingtalk.module.DingTalkResult; |
|||
import com.epmet.commons.tools.dto.form.DingMiniInfoFormDTO; |
|||
import com.epmet.commons.tools.redis.RedisKeys; |
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import com.epmet.commons.tools.redis.common.bean.DingMiniInfoCache; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.OpenSyncBizDataDao; |
|||
import com.epmet.dto.DingMiniInfoDTO; |
|||
import com.epmet.dto.form.ExemptLoginUserDetailFormDTO; |
|||
import com.epmet.redis.DingDingCallbackRedis; |
|||
import com.epmet.service.DingTalkService; |
|||
import com.taobao.dingtalk.client.DingTalkClientToken; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.util.CollectionUtils; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/9/14 14:57 |
|||
* @DESC |
|||
*/ |
|||
@Service |
|||
@Slf4j |
|||
public class DingTalkServiceImpl implements DingTalkService { |
|||
|
|||
@Autowired |
|||
private DingTalkClientToken dingTalkClientToken; |
|||
@Autowired |
|||
private OpenSyncBizDataDao openSyncBizDataDao; |
|||
@Autowired |
|||
private DingDingCallbackRedis dingCallbackRedis; |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
@Override |
|||
public Object getExemptLoginUserDetail(ExemptLoginUserDetailFormDTO formDTO) { |
|||
DingMiniInfoDTO dingMiniInfo = openSyncBizDataDao.getDingMiniInfoByAppId(formDTO.getMiniAppId()); |
|||
DingTalkResult<String> exemptLoginUserDetail = dingTalkClientToken.getExemptLoginUserDetail(formDTO.getCorpId(), dingMiniInfo.getSuiteKey(), dingMiniInfo.getSuiteSecret(), dingCallbackRedis.get(dingMiniInfo.getSuiteKey()), formDTO.getCode()); |
|||
return exemptLoginUserDetail.getData(); |
|||
} |
|||
|
|||
/** |
|||
* Desc: 获取钉钉小程序信息 |
|||
* @param formDTO |
|||
* @author zxc |
|||
* @date 2022/9/15 10:46 |
|||
*/ |
|||
@Override |
|||
public DingMiniInfoCache getDingMiniInfo(DingMiniInfoFormDTO formDTO) { |
|||
String key = RedisKeys.getDingMiniInfoKey(formDTO.getMiniAppId()); |
|||
Map<String, Object> dingMiniInfoMap = redisUtils.hGetAll(key); |
|||
if (!CollectionUtils.isEmpty(dingMiniInfoMap)) { |
|||
return ConvertUtils.mapToEntity(dingMiniInfoMap,DingMiniInfoCache.class); |
|||
} |
|||
DingMiniInfoDTO dingMiniInfo = openSyncBizDataDao.getDingMiniInfoByAppId(formDTO.getMiniAppId()); |
|||
if (null != dingMiniInfo){ |
|||
redisUtils.hMSet(key, BeanUtil.beanToMap(dingMiniInfo)); |
|||
return ConvertUtils.sourceToTarget(dingMiniInfo,DingMiniInfoCache.class); |
|||
} |
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,88 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.OpenSyncBizDataDao; |
|||
import com.epmet.dto.OpenSyncBizDataDTO; |
|||
import com.epmet.entity.OpenSyncBizDataEntity; |
|||
import com.epmet.service.OpenSyncBizDataService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-09-14 |
|||
*/ |
|||
@Service |
|||
public class OpenSyncBizDataServiceImpl extends BaseServiceImpl<OpenSyncBizDataDao, OpenSyncBizDataEntity> implements OpenSyncBizDataService { |
|||
|
|||
@Override |
|||
public PageData<OpenSyncBizDataDTO> page(Map<String, Object> params) { |
|||
IPage<OpenSyncBizDataEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, OpenSyncBizDataDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<OpenSyncBizDataDTO> list(Map<String, Object> params) { |
|||
List<OpenSyncBizDataEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, OpenSyncBizDataDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<OpenSyncBizDataEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<OpenSyncBizDataEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public OpenSyncBizDataDTO get(String id) { |
|||
OpenSyncBizDataEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, OpenSyncBizDataDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(OpenSyncBizDataDTO dto) { |
|||
OpenSyncBizDataEntity entity = ConvertUtils.sourceToTarget(dto, OpenSyncBizDataEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(OpenSyncBizDataDTO dto) { |
|||
OpenSyncBizDataEntity entity = ConvertUtils.sourceToTarget(dto, OpenSyncBizDataEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(OpenSyncBizDataEntity condition) { |
|||
baseDao.delOpenSyncData(condition); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,51 @@ |
|||
CREATE TABLE `ding_mini_info` ( |
|||
`ID` varchar(64) NOT NULL COMMENT 'ID', |
|||
`SUITE_ID` varchar(255) NOT NULL, |
|||
`APP_ID` varchar(255) NOT NULL, |
|||
`MINI_APP_ID` varchar(255) NOT NULL, |
|||
`SUITE_NAME` varchar(255) NOT NULL, |
|||
`SUITE_KEY` varchar(255) NOT NULL, |
|||
`SUITE_SECRET` varchar(255) NOT NULL, |
|||
`TOKEN` varchar(255) NOT NULL, |
|||
`AES_KEY` varchar(255) DEFAULT NULL, |
|||
`DEL_FLAG` int(11) NOT NULL, |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='钉钉小程序信息'; |
|||
|
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1', '1903117866', '119453', '5000000003010492', '随时讲', 'suiter5nqmiwzwq4lodee', 'hHKnno_nGouRjB5LVFn0k11O20CCEhf9gaiErLNN0lKUExe5VzZrB8tN9hdRrhPA', '', '', 0, 0, '授权给亿联科技', '2022-09-14 11:11:13', '授权给亿联科技', '2022-09-14 11:11:13'); |
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1001', '1905492491', '', '5000000003022462', '随手拍', 'dingu6fdnlcqbyr1fdxu', 'r-Fi8awDyD5rBCPS1NnoBEqkrq0InheNMkc0xAOKvkD0-47oDFiClbJRiFQy-JO1', '', NULL, 0, 0, '烟台企业内部应用', '2022-09-22 16:54:09', '烟台企业内部应用', '2022-09-22 16:54:16'); |
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1002', '1905441943', '', '5000000003021766', '随时讲', 'dinguizzwnfnvjs6nntz', 'uUqJYGyoOjOBcc1bC5jCD2lipOaUxbrdZyeXSWKq1JfX7tWQYNz6ZfvvybWBENKS', '', NULL, 0, 0, '烟台企业内部应用', '2022-09-22 16:55:25', '烟台企业内部应用', '2022-09-22 16:55:28'); |
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1003', '1905455843', '', '5000000003022737', '我的报事', 'dingllzzs6g8u7htteg5', 'fjTJe31Ot4FylmO_hWY-aRckikdPKA2u640GjiW68R4JItFG8picnwFd8d9gLFm_', '', NULL, 0, 0, '烟台企业内部应用', '2022-09-22 16:56:29', '烟台企业内部应用', '2022-09-22 16:56:37'); |
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1004', '1905486539', '', '5000000003022522', '实时动态', 'dingf8hpd485mlgaov7c', 'CmUSLH-M-tDgpwRTmiAXf9p3v-hLZ27J1kscxUg3118EKX4mV-JLJ073PMxC6We1', '', NULL, 0, 0, '烟台企业内部应用', '2022-09-22 16:57:21', '烟台企业内部应用', '2022-09-22 16:57:24'); |
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2', '1903003033', '', '5000000003009021', '随手拍', 'suite44k7hacfbfx4zazi', 'EtamucmdHdQMe5nM7YW0qwn2b3m6UJXEk3JAr3ICoisZdZdcIBXsFI1uUHf9xUrl', '', '', 0, 0, '授权给亿联科技', '2022-09-14 11:11:13', '授权给亿联科技', '2022-09-14 11:11:13'); |
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('27805834197073948', '27501006', '119450', '5000000002934668', '随手拍', 'suitew6ccvkquinmrghqy', 'TooAxiegdsE5BPP6xo1AxK1LdmaUoMpPMyomOcGcBSXtnsxRc8dEfyOlG56oSmEB', 'qN6Mg1XljdeHzVg2KeZGmBgY5', 'CzBxlN3uVCo6S3AzB8gfkUMBQxYsrRUdXRqX4XcYcyw', 0, 0, '亿联第三方企业应用', '2022-09-14 11:09:15', '亿联第三方企业应用', '2022-09-14 11:09:15'); |
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('27805834197073949', '27501007', '119451', '5000000002934374', '随时讲', 'suitezhyj12glsrp8em0f', '-z5Q_lvMP6l7fTzlArEzUT8D_-5pvqBQaJMuTGHoXnz0nuiqGQMZ8aeya_cxTsN-', 'rKs2lIN1Oe6K34AtASGOQDh', 'a7hsIIHVTiIB7SQwOiGNgxVo7zAigGUk4InTUNIikWy', 0, 0, '亿联第三方企业应用', '2022-09-14 11:11:13', '亿联第三方企业应用', '2022-09-14 11:11:13'); |
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('27805834197073950', '27501008', '119452', '5000000002934456', '我的报事', 'suite5yxliro6wawv514w', 'aQxiPi7DwJSUa9HlbUU_L7Q4wGCLEDmgf__Ffx75cTn3jZwuHy9vdl-9Iv5FeyJU', 'vTUvaf6QtOJZsa1h7Wkoteo', 'csRpvVFGL7Cf1N9ubajix8tDWhCllROhaxCHKFnbuAz', 0, 0, '亿联第三方企业应用', '2022-09-14 11:11:13', '亿联第三方企业应用', '2022-09-14 11:11:13'); |
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('27805834197073951', '27501009', '119453', '5000000002934488', '实时动态', 'suitemcestnonr6y0xigc', 'kKCNCkfDhmLoVnl_wuAiScyDG4776mkTevuSBuiYhHg-Bvz1-vhb_4IA-Km7nK2I', 'MvWLkZGbC', 'iSVLw69AeNXS8jgGefTG2ulkKWDQjcSsMBgkFMgfPuB', 0, 0, '亿联第三方企业应用', '2022-09-14 11:11:13', '亿联第三方企业应用', '2022-09-14 11:11:13'); |
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3', '1903155647', '', '5000000003010470', '我的报事', 'suitedwccu2wbepxvdebi', 'OHbAMPBzPWnTL-VqPuJ4ngnwBGLVoxKkkl12uY1CPvIhfX0NqcNJMGl21gQqNpd2', '', '', 0, 0, '授权给亿联科技', '2022-09-14 11:11:13', '授权给亿联科技', '2022-09-14 11:11:13'); |
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('4', '1903147702', '', '5000000003010661', '实时动态', 'suitekcbekxzjnlrlgft2', 'fMKaF1UsORAftH7LdqR-CpHOCLzA56Q8S5WN6fRAOAI7E7T-p-96SspOyc-8CdnO', '', '', 0, 0, '授权给亿联科技', '2022-09-14 11:11:13', '授权给亿联科技', '2022-09-14 11:11:13'); |
|||
|
|||
|
|||
CREATE TABLE `open_sync_biz_data` |
|||
( |
|||
`ID` varchar(64) NOT NULL, |
|||
`SUITE_KEY` varchar(255) DEFAULT NULL, |
|||
`SUBSCRIBE_ID` varchar(255) NOT NULL COMMENT '第三方企业应用的suiteid加下划线0', |
|||
`CORP_ID` varchar(255) NOT NULL COMMENT '第三方企业应用的corpid', |
|||
`BIZ_ID` varchar(255) NOT NULL COMMENT '第三方企业应用的suiteid', |
|||
`BIZ_DATA` json NOT NULL COMMENT '数据为Json格式', |
|||
`BIZ_TYPE` varchar(10) NOT NULL COMMENT '2:第三方企业应用票据;\n4:企业授权变更,包含授权、解除授权、授权变更;\n7:第三方企业应用变更,包含停用、启用、删除(删除保留授权);\n13:企业用户变更,包含用户添加、修改、删除;\n14:企业部门变更,包含部门添加、修改、删除;\n15:企业角色变更,包含角色添加、修改、删除;\n16:企业变更,包含企业修改、删除;\n17:市场订单;\n20:企业外部联系人变更,包含添加、修改、删除;\n22:ISV自定义审批;\n25:家校通讯录1.0(Deprecated)信息变更。家校通讯录升级,请查看家校通讯录2.0数据推送;\n32:智能硬件绑定类型;\n37:因订单到期或者用户退款等导致的服务关闭,目前仅推送因退款等导致的服务关闭;\n50:家校通讯录2.0,部门信息变更;\n51:家校通讯录2.0,人员信息变更;\n63:应用试用记录回调信息;\n66:工作台组件变更回调事件;\n67:钉钉假期相关回调事件;\n133:CRM客户动态相关数据回调事件;\n137:人事平台员工异动V2相关数据回调事件;\n139:异步转译通讯录id任务完成通知;\n165:人事平台员工档案变动事件相关数据的回调事件;\n175:人事解决方案变更事件;', |
|||
`DEL_FLAG` int(1) NOT NULL, |
|||
`REVISION` int(1) NOT NULL, |
|||
`CREATED_TIME` datetime NOT NULL, |
|||
`CREATED_BY` varchar(255) NOT NULL, |
|||
`UPDATED_TIME` datetime NOT NULL, |
|||
`UPDATED_BY` varchar(255) NOT NULL, |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE = InnoDB |
|||
DEFAULT CHARSET = utf8mb4; |
@ -0,0 +1,3 @@ |
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1005', '1912268145', '', '5000000003054196', '信息登记', 'dingtbmsztg41nmbclzi', '6mdIbt8xWkKOkGasxqQt44uNEri-KQWSmMX1u7weTMEuoGWwQsoYSyc0hBeoQGEj', '', NULL, 0, 0, '烟台企业内部应用', '2022-09-26 14:03:32', '烟台企业内部应用', '2022-09-26 14:03:40'); |
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1006', '1912172899', '', '5000000003054651', '疫情防控', 'dingye4npkwn5l8gate0', 'iOqq_5nURdTr-69DKukTfpzmkJIN5UBCQNlOdB-g6PucCC2UG-wrXmyC2XEylkuE', '', NULL, 0, 0, '烟台企业内部应用', '2022-09-26 14:04:39', '烟台企业内部应用', '2022-09-26 14:04:46'); |
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1007', '1912176853', '', '5000000003054757', '议事厅', 'ding56hee9xi5kxlmpbp', 'Y16WoB0qD0k8N7NY2J7HLyHGGAkhlBj9Bxkpa1cFuUUrTZlH2SfLvP4ZYnsvxC7f', '', NULL, 0, 0, '烟台企业内部应用', '2022-09-26 14:05:40', '烟台企业内部应用', '2022-09-26 14:05:43'); |
@ -0,0 +1,4 @@ |
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1008', '1914273833', '', '5000000003069546', '随手拍', 'dingpvk106h0eca7btlm', 'zLF8ld6pF40NLUxC2aRKP7yfXreRpSRJTCN48_kyAQtretSLBfSpFMX6prUOaH_Z', '', NULL, 0, 0, '烟台企业内部应用_慎礼社区', '2022-09-27 13:03:32', '烟台企业内部应用_慎礼社区', '2022-09-27 13:03:40'); |
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1009', '1914301613', '', '5000000003069487', '随时讲', 'ding1ept2iaynjxu2w6o', 'xSXSennTbJG8nc-IjjsrG1zEugNoCp2rLhT7pS0vInT7OnPZ5FgY3974aR9D-xd2', '', NULL, 0, 0, '烟台企业内部应用_慎礼社区', '2022-09-27 13:03:32', '烟台企业内部应用_慎礼社区', '2022-09-27 13:03:40'); |
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1010', '1914266905', '', '5000000003069391', '我的报事', 'dingpzsyljcsbu3fbac5', 'fWRzS2W59fwx__istOF23mHq1S0hAs64nZhcmljrSLLMYrceZVsz7GhgG4izZvhy', '', NULL, 0, 0, '烟台企业内部应用_慎礼社区', '2022-09-27 13:03:32', '烟台企业内部应用_慎礼社区', '2022-09-27 13:03:40'); |
|||
INSERT INTO `epmet_third`.`ding_mini_info` (`ID`, `SUITE_ID`, `APP_ID`, `MINI_APP_ID`, `SUITE_NAME`, `SUITE_KEY`, `SUITE_SECRET`, `TOKEN`, `AES_KEY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1011', '1914338340', '', '5000000003069669', '实时动态', 'dingflbhlrd1epy11irl', '47OE8jNuSj-JoOPBx7ZCqEii4fycnWtY2x97ndu3Mk2BOh9ElKMNuOGNU0zzshVn', '', NULL, 0, 0, '烟台企业内部应用_慎礼社区', '2022-09-27 13:03:32', '烟台企业内部应用_慎礼社区', '2022-09-27 13:03:40'); |
@ -0,0 +1,23 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.DingMiniInfoDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.DingMiniInfoEntity" id="dingMiniInfoMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="suiteId" column="SUITE_ID"/> |
|||
<result property="appId" column="APP_ID"/> |
|||
<result property="miniAppId" column="MINI_APP_ID"/> |
|||
<result property="suiteName" column="SUITE_NAME"/> |
|||
<result property="suiteKey" column="SUITE_KEY"/> |
|||
<result property="suiteSecret" column="SUITE_SECRET"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,30 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.OpenSyncBizDataDao"> |
|||
<delete id="delOpenSyncData"> |
|||
DELETE |
|||
FROM open_sync_biz_data |
|||
WHERE biz_id = #{bizId} |
|||
AND biz_type = #{bizType} |
|||
AND subscribe_id = #{subscribeId} |
|||
AND corp_id = #{corpId} |
|||
AND DEL_FLAG = 0 |
|||
</delete> |
|||
|
|||
<select id="getDingMiniInfo" resultType="com.epmet.dto.DingMiniInfoDTO"> |
|||
select * from ding_mini_info where del_flag = 0 and suite_key = #{suiteKey} |
|||
</select> |
|||
<select id="getDingMiniInfoByAppId" resultType="com.epmet.dto.DingMiniInfoDTO"> |
|||
select * from ding_mini_info where del_flag = 0 and mini_app_id = #{miniAppId} |
|||
</select> |
|||
<select id="getOpenSyncData" resultType="com.epmet.dto.OpenSyncBizDataDTO"> |
|||
select * FROM open_sync_biz_data |
|||
where del_flag = 0 |
|||
and biz_type = #{bizType} |
|||
and suite_key = #{suiteKey} |
|||
<if test='null != corpId and corpId != "" '> |
|||
and corp_id = #{corpId} |
|||
</if> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,28 @@ |
|||
package com.epmet; |
|||
|
|||
import com.taobao.dingtalk.client.DingTalkClientToken; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.junit.Test; |
|||
import org.junit.runner.RunWith; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.boot.test.context.SpringBootTest; |
|||
import org.springframework.test.context.junit4.SpringRunner; |
|||
|
|||
/** |
|||
* desc:redisson测试类 |
|||
*/ |
|||
@Slf4j |
|||
@RunWith(value = SpringRunner.class) |
|||
@SpringBootTest(classes = {EpmetThirdApplication.class}) |
|||
public class ThirdPlatformTest { |
|||
|
|||
|
|||
@Autowired |
|||
DingTalkClientToken dingTalkClientToken; |
|||
|
|||
@Test |
|||
public void sendText(){ |
|||
/* DingTalkResult<String> appAccessTokenToken = dingTalkClientToken.getAppAccessTokenToken(); |
|||
System.out.println("=======:"+JSON.toJSONString(appAccessTokenToken));*/ |
|||
} |
|||
} |
@ -0,0 +1,2 @@ |
|||
ALTER TABLE `epmet_gov_access`.`gov_menu` |
|||
ADD COLUMN `color` varchar(16) DEFAULT '' COMMENT '菜单颜色' AFTER `icon`; |
@ -0,0 +1,87 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.hibernate.validator.constraints.Length; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.Pattern; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author sun |
|||
* @dscription |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class AddStaffPyFromDTO implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
/** |
|||
* 新增人员所属类型Id |
|||
*/ |
|||
private String orgId; |
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
/** |
|||
* 新增人员所属类型【组织:agency;部门:dept;网格:grid】】 |
|||
*/ |
|||
private String orgType; |
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
@NotBlank(message = "姓名不能为空", groups = AddStaffPyFromDTO.AddStaff.class) |
|||
@Length(max = 15, message = "姓名仅允许输入15个字符", groups = AddStaffPyFromDTO.AddStaff.class) |
|||
private String name; |
|||
/** |
|||
* 人员ID |
|||
*/ |
|||
private String staffId; |
|||
/** |
|||
* 手机 |
|||
*/ |
|||
@NotBlank(message = "手机号不能为空", groups = AddStaffPyFromDTO.AddStaff.class) |
|||
@Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "请输入正确的手机号", groups = AddStaffPyFromDTO.AddStaff.class) |
|||
private String mobile; |
|||
/** |
|||
* 性别 |
|||
*/ |
|||
@NotNull(message = "性别不能为空", groups = AddStaffPyFromDTO.AddStaff.class) |
|||
private Integer gender; |
|||
/** |
|||
* 专兼职 |
|||
*/ |
|||
@NotBlank(message = "专兼职不能为空", groups = AddStaffPyFromDTO.AddStaff.class) |
|||
private String workType; |
|||
|
|||
/** |
|||
* 账户 |
|||
*/ |
|||
@NotBlank(message = "账号不能为空", groups = AddStaffPyFromDTO.AddStaff.class) |
|||
private String userAccount; |
|||
|
|||
/** |
|||
* 密码 |
|||
*/ |
|||
@NotBlank(message = "密码不能为空", groups = AddStaffPyFromDTO.AddStaff.class) |
|||
private String pwd; |
|||
|
|||
/** |
|||
* 角色id列表 |
|||
*/ |
|||
@NotNull(message = "角色不能为空", groups = AddStaffPyFromDTO.AddStaff.class) |
|||
private List<String> roles; |
|||
public interface AddStaff extends CustomerClientShowGroup {} |
|||
/** |
|||
* 来源app(政府端:gov、居民端:resi、运营端:oper) |
|||
*/ |
|||
private String app; |
|||
/** |
|||
* 来源client(PC端:web、微信小程序:wxmp) |
|||
*/ |
|||
private String client; |
|||
} |
@ -0,0 +1,82 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.hibernate.validator.constraints.Length; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.Pattern; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhy |
|||
* @dscription |
|||
* @date 2020/4/24 10:43 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class StaffSubmitAccountFromDTO implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
/** |
|||
* 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
/** |
|||
* 人员ID |
|||
*/ |
|||
private String staffId; |
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
@NotBlank(message = "姓名不能为空") |
|||
@Length(max = 15, message = "姓名仅允许输入15个字符") |
|||
private String name; |
|||
/** |
|||
* 手机 |
|||
*/ |
|||
@NotBlank(message = "手机号不能为空") |
|||
@Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "请输入正确的手机号") |
|||
private String mobile; |
|||
/** |
|||
* 性别 |
|||
*/ |
|||
@NotNull(message = "性别不能为空") |
|||
private Integer gender; |
|||
/** |
|||
* 性别 |
|||
*/ |
|||
@NotNull(message = "账号不能为空") |
|||
private String userAccount; |
|||
/** |
|||
* 密码 |
|||
*/ |
|||
private String pwd; |
|||
/** |
|||
* 专兼职 |
|||
*/ |
|||
@NotBlank(message = "专兼职不能为空") |
|||
private String workType; |
|||
/** |
|||
* 角色id列表 |
|||
*/ |
|||
@NotNull(message = "角色不能为空") |
|||
private List<String> roles; |
|||
/** |
|||
* 来源app(政府端:gov、居民端:resi、运营端:oper) |
|||
*/ |
|||
private String app; |
|||
/** |
|||
* 来源client(PC端:web、微信小程序:wxmp) |
|||
*/ |
|||
private String client; |
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
} |
@ -0,0 +1,111 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import com.epmet.dto.IcPropertyManagementDTO; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yzm |
|||
* @Date 2022/9/21 9:19 |
|||
*/ |
|||
@Data |
|||
public class IcNeighborHoodDetailDTO { |
|||
private String id; |
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 小区名称 |
|||
*/ |
|||
private String neighborHoodName; |
|||
|
|||
/** |
|||
* 组织id |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 组织名称--新版详情页面用于显示 |
|||
*/ |
|||
private String agencyName; |
|||
|
|||
/** |
|||
* 上级组织id |
|||
*/ |
|||
private String parentAgencyId; |
|||
|
|||
/** |
|||
* 组织的所有上级组织id |
|||
*/ |
|||
private String agencyPids; |
|||
|
|||
/** |
|||
* 网格id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 详细地址 |
|||
*/ |
|||
private String address; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
|
|||
/** |
|||
* 中心点位:经度 |
|||
*/ |
|||
private String longitude; |
|||
|
|||
/** |
|||
* 中心点位:纬度 |
|||
*/ |
|||
private String latitude; |
|||
|
|||
/** |
|||
* 坐标区域 |
|||
*/ |
|||
private String coordinates; |
|||
|
|||
/** |
|||
* 坐标位置 |
|||
*/ |
|||
private String location; |
|||
|
|||
/** |
|||
* 网格名称--新版详情页面用于显示 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 物业名称--新版详情页面用于显示 |
|||
*/ |
|||
private List<IcPropertyManagementDTO> propertyList; |
|||
|
|||
/** |
|||
* 小区编码 |
|||
*/ |
|||
private String coding; |
|||
|
|||
/** |
|||
* 小区系统编码 |
|||
*/ |
|||
private String sysCoding; |
|||
|
|||
/** |
|||
* 实有楼栋数 |
|||
*/ |
|||
private Integer realBuilding; |
|||
|
|||
/** |
|||
* 二维码地址 |
|||
*/ |
|||
private String qrcodeUrl; |
|||
} |
|||
|
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue