feat:REQ-1419 代码逻辑优化
This commit is contained in:
parent
711292701c
commit
124abe6d28
@ -15,7 +15,7 @@ import java.util.UUID;
|
|||||||
public class CheckSumUtil {
|
public class CheckSumUtil {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
String appSecret = "784adefc4be7";
|
String appSecret = "0d1ada41f74f";
|
||||||
//加点注释
|
//加点注释
|
||||||
String nonce = UUID.randomUUID().toString();
|
String nonce = UUID.randomUUID().toString();
|
||||||
String curTime = System.currentTimeMillis() / 1000 + "";
|
String curTime = System.currentTimeMillis() / 1000 + "";
|
||||||
|
|||||||
@ -196,8 +196,8 @@ public class AccountService {
|
|||||||
AppTypeEnum[] target = new AppTypeEnum[1];
|
AppTypeEnum[] target = new AppTypeEnum[1];
|
||||||
if (StringUtils.isNotEmpty(accountAbsentQuery.getAppType())) {
|
if (StringUtils.isNotEmpty(accountAbsentQuery.getAppType())) {
|
||||||
AppTypeEnum appTypeEnum = AppTypeEnum.isValidAppType(accountAbsentQuery.getAppType());
|
AppTypeEnum appTypeEnum = AppTypeEnum.isValidAppType(accountAbsentQuery.getAppType());
|
||||||
if (appTypeEnum == null) {
|
if (appTypeEnum == null || AppTypeEnum.SYSTEM == appTypeEnum) {
|
||||||
throw new ServiceException("请求参数AppType=[" + accountAbsentQuery.getAppType() + "]异常!");
|
throw new ServiceException("请求参数AppType=[" + accountAbsentQuery.getAppType() + "]不支持!");
|
||||||
}
|
}
|
||||||
target[0] = appTypeEnum;
|
target[0] = appTypeEnum;
|
||||||
} else {
|
} else {
|
||||||
@ -212,7 +212,7 @@ public class AccountService {
|
|||||||
userAccountAll.addAll(userAccountRespList);
|
userAccountAll.addAll(userAccountRespList);
|
||||||
} else {
|
} else {
|
||||||
if (appTypeEnum == AppTypeEnum.SYSTEM) {
|
if (appTypeEnum == AppTypeEnum.SYSTEM) {
|
||||||
log.warn("PersonId=["+accountAbsentQuery.getPersonId()+"],不允许创建AppType=[system]账户!");
|
log.warn("PersonId=[" + accountAbsentQuery.getPersonId() + "],不允许创建AppType=[system]账户!");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
UserAccountReq userAccountReq = new UserAccountReq();
|
UserAccountReq userAccountReq = new UserAccountReq();
|
||||||
|
|||||||
@ -1,13 +1,25 @@
|
|||||||
INSERT INTO pudge.im_robot_tag (id, tag_name, weight, status, color, is_delete, create_at, update_at)
|
-- 创建机器人标签信息 --
|
||||||
|
INSERT INTO im_robot_tag (id, tag_name, weight, status, color, is_delete, create_at, update_at)
|
||||||
VALUES (1, '测试-标签', 888, 1, ' 4688FA', 0, '2023-10-25 18:14:32', '2023-10-25 18:14:36');
|
VALUES (1, '测试-标签', 888, 1, ' 4688FA', 0, '2023-10-25 18:14:32', '2023-10-25 18:14:36');
|
||||||
INSERT INTO pudge.im_robot_msg_template (id, robot_id, msg_template_list, is_delete, create_at, update_at)
|
|
||||||
|
-- 创建机器人消息模板信息信息 msg_template_list 每隔环境需要确认--
|
||||||
|
INSERT INTO im_robot_msg_template (id, robot_id, msg_template_list, is_delete, create_at, update_at)
|
||||||
VALUES (1, 'zuoqinbo', '["72710b6e822040c1b6e385707eb2e7f2"]', 0, '2023-10-25 18:23:30', '2023-10-25 18:23:31');
|
VALUES (1, 'zuoqinbo', '["72710b6e822040c1b6e385707eb2e7f2"]', 0, '2023-10-25 18:23:30', '2023-10-25 18:23:31');
|
||||||
INSERT INTO pudge.im_robot_info (id, robot_id, nick_name, status, tag_name_list, head_image_url, im_account, is_delete,
|
|
||||||
|
-- 创建机器人信息 --
|
||||||
|
INSERT INTO im_robot_info (id, robot_id, nick_name, status, tag_name_list, head_image_url, im_account, is_delete,
|
||||||
create_at, update_at)
|
create_at, update_at)
|
||||||
VALUES (1, 'zuoqinbo', '测试-机器人', 'enabled', '[1]',
|
VALUES (1, 'zuoqinbo', '测试-机器人', 'enabled', '[1]',
|
||||||
'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F51ac4285-13e6-44c1-b588-c521c0b8fba9%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1700303913&t=e058c7db6d48e7705b5b6fbb7fd14194',
|
'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F51ac4285-13e6-44c1-b588-c521c0b8fba9%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1700303913&t=e058c7db6d48e7705b5b6fbb7fd14194',
|
||||||
'zuoqinbo_system', 0, '2023-10-25 18:13:40', '2023-10-25 18:13:41');
|
'zuoqinbo_system', 0, '2023-10-25 18:13:40', '2023-10-25 18:13:41');
|
||||||
INSERT INTO pudge.im_account_register (id, account_id, account_wrapper, app_key, channel_provider, im_account,
|
|
||||||
|
-- 创建机器人IM账户信息 --
|
||||||
|
INSERT INTO im_account_register (id, account_id, account_wrapper, app_key, channel_provider, im_account,
|
||||||
account_type, app_type, token, is_delete, create_at, update_at)
|
account_type, app_type, token, is_delete, create_at, update_at)
|
||||||
VALUES (1, 'zuoqinbo', 'zuoqinbo_system', '0f85615ab0972611ac59147fb79709ad', 'NIM', 'zuoqinbo_system', 'robot',
|
VALUES (1, 'zuoqinbo', 'zuoqinbo_system', '0f85615ab0972611ac59147fb79709ad', 'NIM', 'zuoqinbo_system', 'robot',
|
||||||
'system', '8a76dd6ba2de27a689a798507daeaf1f', 0, '2023-10-25 18:21:05', '2023-10-25 18:21:07');
|
'system', '8a76dd6ba2de27a689a798507daeaf1f', 0, '2023-10-25 18:21:05', '2023-10-25 18:21:07');
|
||||||
|
|
||||||
|
-- 调用机器人更新信息接口 才会同步改账户信息到云信IM系统---
|
||||||
|
-- http://dev-app.axzo.cn/im-center/api/im/robot/basic/update --
|
||||||
|
|
||||||
|
-- POST {"robotId":"zuoqinbo","nickName":"系统机器人","tagNameList":[20,21,22],"status":"enabled"} --
|
||||||
Loading…
Reference in New Issue
Block a user