feat:接口设计&接口实现
This commit is contained in:
parent
275e72ce8e
commit
dbcc776b18
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
@ -21,6 +21,16 @@
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-openfeign-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.8.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.axzo.im.center</groupId>
|
||||
<artifactId>im-center-common</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.axzo.framework</groupId>
|
||||
<artifactId>axzo-common-domain</artifactId>
|
||||
@ -30,4 +40,11 @@
|
||||
<artifactId>axzo-common-web</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>axzo</id>
|
||||
<name>axzo repository</name>
|
||||
<url>https://nexus.axzo.cn/repository/axzo/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</project>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.im.center:im-center-common:unknown" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.8.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:3.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.4.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.4.13" level="project" />
|
||||
@ -40,7 +40,7 @@
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.32" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.maokai:maokai-common:2.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="module" module-name="im-center-common" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.basics:basics-common:2.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.3.13" level="project" />
|
||||
@ -58,7 +58,6 @@
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.hutool:hutool-core:5.8.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.framework:axzo-auth-spring-boot-starter:2.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.8.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.framework:axzo-common:2.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:transmittable-thread-local:2.2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.framework:axzo-core:2.0.0-SNAPSHOT" level="project" />
|
||||
@ -160,6 +159,5 @@
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.im.center:im-center-common:unknown" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@ -6,26 +6,26 @@
|
||||
<parent>
|
||||
<artifactId>im-center</artifactId>
|
||||
<groupId>cn.axzo.im.center</groupId>
|
||||
<version>${revision}</version>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>im-center-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-openfeign-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.8.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-openfeign-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.im.center</groupId>
|
||||
<artifactId>im-center-common</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.axzo.framework</groupId>
|
||||
@ -36,4 +36,11 @@
|
||||
<artifactId>axzo-common-web</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>axzo</id>
|
||||
<name>axzo repository</name>
|
||||
<url>https://nexus.axzo.cn/repository/axzo/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</project>
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package cn.axzo.im.center.api.feign;
|
||||
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
import cn.axzo.im.center.api.vo.req.RobotAccountReq;
|
||||
import cn.axzo.im.center.api.vo.req.UserAccountReq;
|
||||
import cn.axzo.im.center.api.vo.resp.UserAccountResp;
|
||||
import cn.azxo.framework.common.model.CommonResponse;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@ -28,7 +28,7 @@ public interface AccountApi {
|
||||
* @return 返回云信IM账户
|
||||
*/
|
||||
@PostMapping("api/im/user/account/generate")
|
||||
CommonResponse<UserAccountResp> generateAccount(@RequestBody @Validated UserAccountReq userAccountReq);
|
||||
ApiResult<UserAccountResp> generateAccount(@RequestBody @Validated UserAccountReq userAccountReq);
|
||||
|
||||
/**
|
||||
* 生成机器人网易云信IM账户,机器人只有一个PC端,不需要appType来区分
|
||||
@ -36,6 +36,6 @@ public interface AccountApi {
|
||||
* @return 返回云信IM账户
|
||||
*/
|
||||
@PostMapping("api/im/robot/account/generate")
|
||||
CommonResponse<UserAccountResp> generateRobotAccount(@RequestBody @Validated RobotAccountReq robotAccountReq);
|
||||
ApiResult<UserAccountResp> generateRobotAccount(@RequestBody @Validated RobotAccountReq robotAccountReq);
|
||||
|
||||
}
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
package cn.axzo.im.center.api.feign;
|
||||
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
import cn.axzo.im.center.api.vo.req.MessageInfo;
|
||||
import cn.axzo.im.center.api.vo.resp.RobotInfoResp;
|
||||
import cn.azxo.framework.common.model.CommonResponse;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@ -25,6 +24,6 @@ public interface MessageApi {
|
||||
* @return 机器人成功创建信息
|
||||
*/
|
||||
@PostMapping("api/im/message/dispatch")
|
||||
CommonResponse<MessageResp> sendMessage(@RequestBody @Validated MessageInfo messageInfo);
|
||||
ApiResult<MessageInfo> sendMessage(@RequestBody @Validated MessageInfo messageInfo);
|
||||
|
||||
}
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
package cn.axzo.im.center.api.feign;
|
||||
|
||||
import cn.axzo.framework.domain.page.Page;
|
||||
import cn.axzo.framework.domain.web.result.ApiPageResult;
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
import cn.axzo.im.center.api.vo.req.RobotInfoReq;
|
||||
import cn.axzo.im.center.api.vo.req.RobotQuery;
|
||||
import cn.axzo.im.center.api.vo.req.RobotPageQuery;
|
||||
import cn.axzo.im.center.api.vo.req.UpdateRobotInfoReq;
|
||||
import cn.axzo.im.center.api.vo.resp.RobotInfoResp;
|
||||
import cn.azxo.framework.common.model.CommonResponse;
|
||||
import cn.axzo.im.center.api.vo.resp.RobotMsgTemplateResp;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -32,7 +34,7 @@ public interface RobotInfoApi {
|
||||
* @return 机器人成功创建信息
|
||||
*/
|
||||
@PostMapping("api/im/robot/basic/save")
|
||||
CommonResponse<RobotInfoResp> saveRobotInfo(@RequestBody @Validated RobotInfoReq robotInfoReq);
|
||||
ApiResult<RobotInfoResp> saveRobotInfo(@RequestBody @Validated RobotInfoReq robotInfoReq);
|
||||
|
||||
/**
|
||||
* 更新机器人信息
|
||||
@ -40,7 +42,7 @@ public interface RobotInfoApi {
|
||||
* @return 机器人成功更新信息
|
||||
*/
|
||||
@PostMapping("api/im/robot/basic/update")
|
||||
CommonResponse<RobotInfoResp> updateRobotInfo(@RequestBody @Validated UpdateRobotInfoReq updateRobotInfoReq);
|
||||
ApiResult<RobotInfoResp> updateRobotInfo(@RequestBody @Validated UpdateRobotInfoReq updateRobotInfoReq);
|
||||
|
||||
/**
|
||||
* 查询机器人信息
|
||||
@ -48,25 +50,18 @@ public interface RobotInfoApi {
|
||||
* @return 机器人信息
|
||||
*/
|
||||
@GetMapping("api/im/robot/basic/{robotId}")
|
||||
CommonResponse<RobotInfoResp> queryRobotTagInfo(@PathVariable("robotId") Long robotId);
|
||||
ApiResult<RobotInfoResp> queryRobotInfo(@PathVariable("robotId") Long robotId);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* OMS-PC端-查询机器人列表
|
||||
* @param robotQuery 机器人查询条件
|
||||
* @param robotPageQuery 机器人查询条件
|
||||
* @return 机器人列表信息
|
||||
*/
|
||||
@GetMapping("api/im/robot/basic/list")
|
||||
CommonResponse<Page<RobotInfoResp>> queryRobotList(@RequestBody RobotQuery robotQuery);
|
||||
@GetMapping("api/im/robot/page")
|
||||
ApiPageResult<RobotInfoResp> queryRobotList(@RequestBody RobotPageQuery robotPageQuery);
|
||||
|
||||
/**
|
||||
* 生成网易云信IM账户
|
||||
* @param robotInfoRequest 生成云信账户参数
|
||||
* @return 返回云信IM账户
|
||||
*/
|
||||
@PostMapping("api/im/robot/account/generate")
|
||||
CommonResponse<RobotInfoResp> generateAccount(@RequestBody @Validated RobotInfoReq robotInfoRequest);
|
||||
|
||||
|
||||
/**
|
||||
@ -74,7 +69,7 @@ public interface RobotInfoApi {
|
||||
* @return 所有机器人的列表信息,包含标签、以及消息模板信息
|
||||
*/
|
||||
@GetMapping("api/im/robot/msgTemplate/list")
|
||||
CommonResponse<List<RobotMsgTemplateResp>> queryRunningRobots();
|
||||
ApiResult<List<RobotMsgTemplateResp>> queryRunningRobots();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
package cn.axzo.im.center.api.feign;
|
||||
|
||||
import cn.axzo.framework.domain.page.PageResp;
|
||||
import cn.axzo.framework.domain.web.result.ApiPageResult;
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
import cn.axzo.im.center.api.vo.req.RobotTagQuery;
|
||||
import cn.axzo.im.center.api.vo.req.RobotTagReq;
|
||||
import cn.axzo.im.center.api.vo.req.UpdateRobotTagReq;
|
||||
import cn.axzo.im.center.api.vo.resp.RobotTagResp;
|
||||
import cn.azxo.framework.common.model.CommonResponse;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import cn.azxo.framework.common.model.Page;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -30,7 +32,7 @@ public interface RobotTagApi {
|
||||
* @return 机器人标签创建完成信息
|
||||
*/
|
||||
@PostMapping("api/im/robot/tag/save")
|
||||
CommonResponse<RobotTagResp> saveRobotTag(@RequestBody @Validated RobotTagReq robotTagRequest);
|
||||
ApiResult<RobotTagResp> saveRobotTag(@RequestBody @Validated RobotTagReq robotTagRequest);
|
||||
|
||||
/**
|
||||
* 更新机器人标签信息
|
||||
@ -39,7 +41,7 @@ public interface RobotTagApi {
|
||||
* @return 机器人标签更新完成信息
|
||||
*/
|
||||
@PostMapping("api/im/robot/tag/update")
|
||||
CommonResponse<RobotTagResp> updateRobotTag(@RequestBody @Validated UpdateRobotTagReq robotTagRequest);
|
||||
ApiResult<RobotTagResp> updateRobotTag(@RequestBody @Validated UpdateRobotTagReq robotTagRequest);
|
||||
|
||||
/**
|
||||
* 查询机器人标签信息
|
||||
@ -48,7 +50,7 @@ public interface RobotTagApi {
|
||||
* @return 单个机器人标签信息
|
||||
*/
|
||||
@GetMapping("api/im/robot/tag/{robotTagId}")
|
||||
CommonResponse<RobotTagResp> queryRobotTagInfo(@PathVariable("robotTagId") Long robotTagId);
|
||||
ApiResult<RobotTagResp> queryRobotTagInfo(@PathVariable("robotTagId") Long robotTagId);
|
||||
|
||||
|
||||
/**
|
||||
@ -57,7 +59,7 @@ public interface RobotTagApi {
|
||||
* @param robotTagQuery 机器人标签查询条件
|
||||
* @return 返回机器人标签列表
|
||||
*/
|
||||
@GetMapping("api/im/robot/tag/list")
|
||||
CommonResponse<Page<RobotTagResp>> queryRobotTagList(@RequestBody RobotTagQuery robotTagQuery);
|
||||
@GetMapping("api/im/robot/tag/page")
|
||||
ApiPageResult<RobotTagResp> queryRobotTagList(@RequestBody RobotTagQuery robotTagQuery);
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package cn.axzo.im.center.api.vo.req;
|
||||
|
||||
import cn.axzo.basics.common.page.PageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@ -10,18 +11,7 @@ import lombok.Data;
|
||||
* @date 2023/10/9 16:01
|
||||
*/
|
||||
@Data
|
||||
public class RobotQuery {
|
||||
|
||||
/**
|
||||
* 页码(从第1页开始)
|
||||
*/
|
||||
private Long pageNum;
|
||||
|
||||
/**
|
||||
* 每页条数
|
||||
*/
|
||||
private Long pageSize;
|
||||
|
||||
public class RobotPageQuery extends PageRequest {
|
||||
|
||||
/**
|
||||
* 机器人昵称
|
||||
@ -1,5 +1,6 @@
|
||||
package cn.axzo.im.center.api.vo.req;
|
||||
|
||||
import cn.axzo.basics.common.page.PageRequest;
|
||||
import lombok.*;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@ -17,17 +18,7 @@ import lombok.experimental.Accessors;
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class RobotTagQuery {
|
||||
|
||||
/**
|
||||
* 页码(从第1页开始)
|
||||
*/
|
||||
private Long pageNum;
|
||||
|
||||
/**
|
||||
* 每页条数
|
||||
*/
|
||||
private Long pageSize;
|
||||
public class RobotTagQuery extends PageRequest {
|
||||
|
||||
/**
|
||||
* 机器人Tag名称
|
||||
|
||||
@ -26,7 +26,7 @@ public class UpdateRobotTagReq {
|
||||
* 机器人TagID
|
||||
*/
|
||||
@NotNull(message = "机器人TagID不能为空")
|
||||
private Integer tagId;
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 机器人Tag名称
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package cn.axzo.im.center.api.vo.resp;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
* im-center
|
||||
*
|
||||
|
||||
@ -15,7 +15,7 @@ public class RobotTagResp {
|
||||
/**
|
||||
* 机器人标签Id
|
||||
*/
|
||||
private Integer tagId;
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 机器人Tag名称
|
||||
@ -43,5 +43,5 @@ public class RobotTagResp {
|
||||
/**
|
||||
* 机器人使用数量
|
||||
*/
|
||||
private Integer robotUseCount;
|
||||
private Integer useCount;
|
||||
}
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
cn\axzo\im\center\api\feign\RobotTagApi.class
|
||||
cn\axzo\im\center\api\vo\req\RobotInfoReq.class
|
||||
cn\axzo\im\center\api\vo\req\UpdateRobotInfoReq.class
|
||||
cn\axzo\im\center\api\vo\req\UserAccountReq.class
|
||||
cn\axzo\im\center\api\vo\req\UpdateRobotTagReq$UpdateRobotTagReqBuilder.class
|
||||
cn\axzo\im\center\api\vo\resp\RobotInfoResp.class
|
||||
cn\axzo\im\center\api\vo\req\RobotTagReq$RobotTagReqBuilder.class
|
||||
cn\axzo\im\center\api\vo\req\RobotTagQuery$RobotTagQueryBuilder.class
|
||||
cn\axzo\im\center\api\AppTypeEnum.class
|
||||
cn\axzo\im\center\api\vo\req\MessageInfo.class
|
||||
cn\axzo\im\center\api\vo\resp\UserAccountResp.class
|
||||
cn\axzo\im\center\api\vo\resp\MessageTemplateResp.class
|
||||
cn\axzo\im\center\api\vo\resp\MessageResp.class
|
||||
cn\axzo\im\center\api\vo\req\RobotTagQuery.class
|
||||
cn\axzo\im\center\api\vo\req\RobotAccountReq.class
|
||||
cn\axzo\im\center\api\vo\resp\RobotMsgTemplateResp.class
|
||||
cn\axzo\im\center\api\feign\AccountApi.class
|
||||
cn\axzo\im\center\api\vo\req\UpdateRobotTagReq.class
|
||||
cn\axzo\im\center\api\vo\resp\RobotTagResp.class
|
||||
cn\axzo\im\center\api\vo\req\RobotQuery.class
|
||||
cn\axzo\im\center\api\vo\req\RobotTagReq.class
|
||||
cn\axzo\im\center\api\feign\RobotInfoApi.class
|
||||
cn\axzo\im\center\api\feign\MessageApi.class
|
||||
@ -1,13 +1,24 @@
|
||||
D:\IM\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\req\RobotTagQuery.java
|
||||
D:\IM\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\req\UserAccountReq.java
|
||||
D:\IM\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\req\RobotInfoReq.java
|
||||
D:\IM\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\resp\RobotTagResp.java
|
||||
D:\IM\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\resp\UserAccountResp.java
|
||||
D:\IM\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\feign\UserAccountApi.java
|
||||
D:\IM\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\resp\RobotInfoResp.java
|
||||
D:\IM\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\feign\RobotInfoApi.java
|
||||
D:\IM\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\req\MessageInfo.java
|
||||
D:\IM\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\req\RobotQuery.java
|
||||
D:\IM\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\feign\MessageApi.java
|
||||
D:\IM\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\feign\RobotTagApi.java
|
||||
D:\IM\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\req\RobotTagReq.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\nim\CheckSumUtil.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\req\RobotQuery.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\feign\AccountApi.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\feign\RobotTagApi.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\feign\MessageApi.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\AppTypeEnum.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\resp\UserAccountResp.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\req\RobotAccountReq.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\nim\NimService.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\req\UserAccountReq.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\resp\MessageTemplateResp.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\req\RobotTagReq.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\resp\RobotTagResp.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\req\RobotInfoReq.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\req\UpdateRobotTagReq.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\nim\AppKeyUtil.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\req\MessageInfo.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\feign\RobotInfoApi.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\nim\Register.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\req\RobotTagQuery.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\resp\MessageResp.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\resp\RobotInfoResp.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\req\UpdateRobotInfoReq.java
|
||||
D:\im-center\im-center-api\src\main\java\cn\axzo\im\center\api\vo\resp\RobotMsgTemplateResp.java
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
@ -51,4 +51,11 @@
|
||||
<artifactId>basics-profiles-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>axzo</id>
|
||||
<name>axzo repository</name>
|
||||
<url>https://nexus.axzo.cn/repository/axzo/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</project>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<artifactId>im-center</artifactId>
|
||||
<groupId>cn.axzo.im.center</groupId>
|
||||
<version>${revision}</version>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>im-center-common</artifactId>
|
||||
@ -50,5 +50,11 @@
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>axzo</id>
|
||||
<name>axzo repository</name>
|
||||
<url>https://nexus.axzo.cn/repository/axzo/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</project>
|
||||
@ -0,0 +1,27 @@
|
||||
package cn.axzo.maokai.common.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
|
||||
/**
|
||||
* App终端类型
|
||||
*
|
||||
* @version V1.0
|
||||
* @author zuoqinbo
|
||||
* @date 2023/10/9 16:01
|
||||
*/
|
||||
@Getter
|
||||
public enum AppTypeEnum {
|
||||
|
||||
WORKER("worker", "工人端"),
|
||||
ENTERPRISE("enterprise", "企业端");
|
||||
|
||||
private String code;
|
||||
|
||||
private String message;
|
||||
|
||||
AppTypeEnum(String code, String message) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,66 +0,0 @@
|
||||
package cn.axzo.maokai.common.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
public enum ApprovalStatusEnum {
|
||||
CANCEL(0, "撤销", "撤销"),
|
||||
AUDITING(10, "审核中", "认证中"),
|
||||
AUDIT_REFUSE(20, "审核拒绝", "认证失败"),
|
||||
AUDIT_PASS(30, "审核通过", "已认证"),
|
||||
;
|
||||
|
||||
@EnumValue
|
||||
@JsonValue
|
||||
private final Integer value;
|
||||
private final String desc;
|
||||
|
||||
private final String certification;
|
||||
|
||||
public Integer getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
public String getCertification() {
|
||||
return certification;
|
||||
}
|
||||
|
||||
ApprovalStatusEnum(final Integer value, final String desc, final String certification) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
this.certification = certification;
|
||||
}
|
||||
|
||||
public static String toDesc(Integer value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
ApprovalStatusEnum[] values = ApprovalStatusEnum.values();
|
||||
for (ApprovalStatusEnum item : values) {
|
||||
if (item.value.equals(value)) {
|
||||
return item.getDesc();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
public static String toCertification(Integer value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
ApprovalStatusEnum[] values = ApprovalStatusEnum.values();
|
||||
for (ApprovalStatusEnum item : values) {
|
||||
if (item.value.equals(value)) {
|
||||
return item.getCertification();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
package cn.axzo.maokai.common.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public enum KeyWordTypeEnum {
|
||||
NAME(1, "姓名"),
|
||||
JOB(2, "岗位"),
|
||||
PHONE(3, "手机号"),
|
||||
ID_NUMBER(4, "身份证号");
|
||||
|
||||
@EnumValue
|
||||
@JsonValue
|
||||
private final Integer value;
|
||||
private final String desc;
|
||||
|
||||
public static KeyWordTypeEnum getByType(Integer value) {
|
||||
return Arrays.stream(values()).filter(o -> o.getValue().equals(value)).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
KeyWordTypeEnum(final Integer value, final String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
package cn.axzo.maokai.common.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
/**
|
||||
* 主体类型
|
||||
*/
|
||||
public enum MainBodyTypeEnum {
|
||||
OU(1, "企业"),
|
||||
CORPS(2, "团队"),
|
||||
;
|
||||
|
||||
@EnumValue
|
||||
@JsonValue
|
||||
private final Integer value;
|
||||
private final String desc;
|
||||
|
||||
public static String toDesc(Integer mainBodyType) {
|
||||
if (mainBodyType == null) {
|
||||
return "";
|
||||
}
|
||||
MainBodyTypeEnum[] values = MainBodyTypeEnum.values();
|
||||
for (MainBodyTypeEnum item : values) {
|
||||
if (item.value.equals(mainBodyType)) {
|
||||
return item.getDesc();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
MainBodyTypeEnum(final Integer value, final String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
@ -1,52 +0,0 @@
|
||||
package cn.axzo.maokai.common.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 资质类型
|
||||
*/
|
||||
public enum QualificationsTypeEnum {
|
||||
PRIMARY_CONTRACTING_UNIT(1, "施工单位"),
|
||||
CONSTRUCTION_UNIT(2, "建设单位"),
|
||||
SUPERVISION_UNIT(3, "监理单位"),
|
||||
LABOR_SUBCONTRACTING(4, "劳务分包"),
|
||||
PROFESSIONAL_SUBCONTRACTING(5, "专业分包"),
|
||||
;
|
||||
|
||||
@EnumValue
|
||||
@JsonValue
|
||||
private final Integer value;
|
||||
private final String desc;
|
||||
|
||||
public Integer getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
QualificationsTypeEnum(final Integer value, final String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static QualificationsTypeEnum getByValue(Integer value) {
|
||||
return Arrays.stream(values()).filter(o -> o.getValue().equals(value)).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
public static String toDesc(Integer value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
for (QualificationsTypeEnum item : values()) {
|
||||
if (item.value.equals(value)) {
|
||||
return item.desc;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@ -1,52 +0,0 @@
|
||||
package cn.axzo.maokai.common.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
/**
|
||||
* 注册类型:1:单位注册 2:施工资质注册 3:单位注册、施工资质注册
|
||||
*/
|
||||
public enum RegisterTypeEnum {
|
||||
OU_CORPS_REGISTER(1, "单位注册"),
|
||||
QUA_REGISTER(2, "施工资质注册"),
|
||||
OU_CORPS_QUA_REGISTER(3, "单位注册、施工资质注册"),
|
||||
;
|
||||
|
||||
@EnumValue
|
||||
@JsonValue
|
||||
private final Integer value;
|
||||
private final String desc;
|
||||
|
||||
public Integer getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
RegisterTypeEnum(final Integer value, final String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public boolean apply(Integer registerType) {
|
||||
if (registerType == null) {
|
||||
return false;
|
||||
}
|
||||
return registerType.equals(this.value);
|
||||
}
|
||||
|
||||
public static String toDesc(Integer value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
RegisterTypeEnum[] values = RegisterTypeEnum.values();
|
||||
for (RegisterTypeEnum item : values) {
|
||||
if (item.value.equals(value)) {
|
||||
return item.getDesc();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
D:\IM\im-center\im-center-common\src\main\java\cn\axzo\maokai\common\enums\MainBodyTypeEnum.java
|
||||
D:\IM\im-center\im-center-common\src\main\java\cn\axzo\maokai\common\enums\QualificationsTypeEnum.java
|
||||
D:\IM\im-center\im-center-common\src\main\java\cn\axzo\maokai\common\enums\RegisterTypeEnum.java
|
||||
D:\IM\im-center\im-center-common\src\main\java\cn\axzo\maokai\common\package-info.java
|
||||
D:\IM\im-center\im-center-common\src\main\java\cn\axzo\maokai\common\enums\ApprovalStatusEnum.java
|
||||
D:\IM\im-center\im-center-common\src\main\java\cn\axzo\maokai\common\enums\RobotStatusEnum.java
|
||||
D:\IM\im-center\im-center-common\src\main\java\cn\axzo\maokai\common\enums\KeyWordTypeEnum.java
|
||||
D:\im-center\im-center-common\src\main\java\cn\axzo\maokai\common\enums\RegisterTypeEnum.java
|
||||
D:\im-center\im-center-common\src\main\java\cn\axzo\maokai\common\enums\ApprovalStatusEnum.java
|
||||
D:\im-center\im-center-common\src\main\java\cn\axzo\maokai\common\enums\QualificationsTypeEnum.java
|
||||
D:\im-center\im-center-common\src\main\java\cn\axzo\maokai\common\enums\RobotStatusEnum.java
|
||||
D:\im-center\im-center-common\src\main\java\cn\axzo\maokai\common\enums\KeyWordTypeEnum.java
|
||||
D:\im-center\im-center-common\src\main\java\cn\axzo\maokai\common\enums\MainBodyTypeEnum.java
|
||||
D:\im-center\im-center-common\src\main\java\cn\axzo\maokai\common\package-info.java
|
||||
|
||||
@ -63,10 +63,6 @@
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-web:5.4.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.4.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.framework:axzo-common-webmvc:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.framework:axzo-common-web:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.framework.framework:axzo-common-context:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.4.15" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.3.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.4.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.4.13" level="project" />
|
||||
@ -196,10 +192,6 @@
|
||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.industry:data-collection-api:2.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:3.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:3.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-core:10.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:10.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.elise:elise-msg:2.0.0-SNAPSHOT" level="project" />
|
||||
@ -213,7 +205,13 @@
|
||||
<orderEntry type="library" name="Maven: cn.axzo.basics:basics-profiles-api:2.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.basics:basics-profiles-dto:2.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="module" module-name="im-center-api" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.framework.rocketmq:axzo-common-rocketmq:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:3.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" />
|
||||
<orderEntry type="module" module-name="im-center-common" />
|
||||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct-jdk8:1.4.2.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct-processor:1.4.2.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.framework:axzo-common-domain:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.framework:axzo-common-core:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jooq:jool:0.9.12" level="project" />
|
||||
@ -229,6 +227,11 @@
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.11.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.15" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-text:1.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.framework:axzo-common-web:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.framework.framework:axzo-common-context:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.4.15" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.axzo.framework.rocketmq:axzo-common-rocketmq:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.rocketmq:rocketmq-spring-boot-starter:2.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.rocketmq:rocketmq-spring-boot:2.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.rocketmq:rocketmq-client:4.9.1" level="project" />
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>im-center</artifactId>
|
||||
<groupId>cn.axzo.im.center</groupId>
|
||||
<version>${revision}</version>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
@ -21,10 +21,11 @@
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>cn.axzo.trade</groupId>-->
|
||||
<!-- <artifactId>trade-web-spring-boot-starter</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.8.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.axzo.framework</groupId>
|
||||
<artifactId>axzo-web-spring-boot-starter</artifactId>
|
||||
@ -160,5 +161,11 @@
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>axzo</id>
|
||||
<name>axzo repository</name>
|
||||
<url>https://nexus.axzo.cn/repository/axzo/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</project>
|
||||
|
||||
@ -0,0 +1,64 @@
|
||||
package cn.axzo.im.controller;
|
||||
|
||||
import cn.axzo.framework.domain.page.PageResp;
|
||||
import cn.axzo.framework.domain.web.result.ApiPageResult;
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
import cn.axzo.im.center.api.feign.RobotInfoApi;
|
||||
import cn.axzo.im.center.api.vo.req.RobotInfoReq;
|
||||
import cn.axzo.im.center.api.vo.req.RobotPageQuery;
|
||||
import cn.axzo.im.center.api.vo.req.UpdateRobotInfoReq;
|
||||
import cn.axzo.im.center.api.vo.resp.RobotInfoResp;
|
||||
import cn.axzo.im.center.api.vo.resp.RobotMsgTemplateResp;
|
||||
import cn.axzo.im.service.RobotInfoService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* im-center
|
||||
*
|
||||
* @author zuoqinbo
|
||||
* @version V1.0
|
||||
* @date 2023/10/11 11:42
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
public class RobotInfoController implements RobotInfoApi {
|
||||
|
||||
@Resource
|
||||
private RobotInfoService infoService;
|
||||
|
||||
@Override
|
||||
public ApiResult<RobotInfoResp> saveRobotInfo(RobotInfoReq robotInfoReq) {
|
||||
RobotInfoResp robotTagResp = infoService.saveRobotInfo(robotInfoReq);
|
||||
return ApiResult.ok(robotTagResp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResult<RobotInfoResp> updateRobotInfo(UpdateRobotInfoReq updateRobotInfoReq) {
|
||||
RobotInfoResp robotTagResp = infoService.updateRobotInfo(updateRobotInfoReq);
|
||||
return ApiResult.ok(robotTagResp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResult<RobotInfoResp> queryRobotInfo(Long robotId) {
|
||||
RobotInfoResp robotTagResp = infoService.queryRobotInfo(robotId);
|
||||
return ApiResult.ok(robotTagResp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiPageResult<RobotInfoResp> queryRobotList(RobotPageQuery robotQuery) {
|
||||
PageResp<RobotInfoResp> robotTagRespPage = infoService.queryRobotInfoList(robotQuery);
|
||||
return ApiPageResult.ok(robotTagRespPage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResult<List<RobotMsgTemplateResp>> queryRunningRobots() {
|
||||
List<RobotMsgTemplateResp> robotTagResp = infoService.queryRunningRobotList();
|
||||
return ApiResult.ok(robotTagResp);
|
||||
}
|
||||
}
|
||||
@ -4,11 +4,18 @@ import cn.axzo.basics.common.BeanMapper;
|
||||
import cn.axzo.framework.domain.page.PageResp;
|
||||
import cn.axzo.framework.domain.web.result.ApiPageResult;
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
import cn.azxo.framework.common.model.CommonResponse;
|
||||
import cn.axzo.im.center.api.feign.RobotTagApi;
|
||||
import cn.axzo.im.center.api.vo.req.RobotTagQuery;
|
||||
import cn.axzo.im.center.api.vo.req.RobotTagReq;
|
||||
import cn.axzo.im.center.api.vo.req.UpdateRobotTagReq;
|
||||
import cn.axzo.im.center.api.vo.resp.RobotTagResp;
|
||||
import cn.axzo.im.service.RobotTagService;
|
||||
import cn.azxo.framework.common.model.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@ -17,25 +24,30 @@ import java.util.List;
|
||||
@RequiredArgsConstructor
|
||||
public class RobotTagController implements RobotTagApi {
|
||||
|
||||
private final RobotTagService robotTagService;
|
||||
@Resource
|
||||
private RobotTagService robotTagService;
|
||||
|
||||
@Override
|
||||
public CommonResponse<RobotTagResp> saveRobotTag(RobotTagReq robotTagRequest) {
|
||||
return null;
|
||||
public ApiResult<RobotTagResp> saveRobotTag(RobotTagReq robotTagRequest) {
|
||||
RobotTagResp robotTagResp = robotTagService.saveRobotTag(robotTagRequest);
|
||||
return ApiResult.ok(robotTagResp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResponse<RobotTagResp> updateRobotTag(RobotTagReq robotTagRequest) {
|
||||
return null;
|
||||
public ApiResult<RobotTagResp> updateRobotTag(UpdateRobotTagReq robotTagRequest) {
|
||||
RobotTagResp robotTagResp = robotTagService.updateRobotTag(robotTagRequest);
|
||||
return ApiResult.ok(robotTagResp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResponse<RobotTagResp> queryRobotTagInfo(Long robotTagId) {
|
||||
return null;
|
||||
public ApiResult<RobotTagResp> queryRobotTagInfo(Long robotTagId) {
|
||||
RobotTagResp robotTagResp = robotTagService.queryRobotTagInfo(robotTagId);
|
||||
return ApiResult.ok(robotTagResp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResponse<Page<RobotTagResp>> queryRobotTagList(RobotTagQuery robotTagQuery) {
|
||||
return null;
|
||||
public ApiPageResult<RobotTagResp> queryRobotTagList(RobotTagQuery robotTagQuery) {
|
||||
PageResp<RobotTagResp> robotTagRespPage = robotTagService.queryRobotTagList(robotTagQuery);
|
||||
return ApiPageResult.ok(robotTagRespPage);
|
||||
}
|
||||
}
|
||||
@ -1,9 +1,15 @@
|
||||
package cn.axzo.im.dao.repository;
|
||||
|
||||
import cn.axzo.im.entity.RobotInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import cn.axzo.im.center.api.vo.req.RobotPageQuery;
|
||||
import cn.axzo.im.dao.mapper.RobotInfoMapper;
|
||||
import cn.axzo.im.entity.RobotInfo;
|
||||
import cn.axzo.im.enums.RobotStatus;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* im
|
||||
@ -14,5 +20,48 @@ import cn.axzo.im.dao.mapper.RobotInfoMapper;
|
||||
*/
|
||||
@Service
|
||||
public class RobotInfoDao extends ServiceImpl<RobotInfoMapper, RobotInfo> {
|
||||
|
||||
/**
|
||||
* 查询机器人标签列表,支持分页查询
|
||||
*
|
||||
* @param robotInfoQuery
|
||||
* @return
|
||||
*/
|
||||
public IPage<RobotInfo> queryRobotInfoOfPage(RobotPageQuery robotInfoQuery) {
|
||||
IPage<RobotInfo> pageOfRobotInfo = lambdaQuery().eq(RobotInfo::getIsDelete, 0)
|
||||
.like(StringUtils.isNoneBlank(robotInfoQuery.getNickName()),
|
||||
RobotInfo::getNickName,
|
||||
robotInfoQuery.getNickName())
|
||||
.eq(StringUtils.isNoneBlank(robotInfoQuery.getStatus()),
|
||||
RobotInfo::getStatus, robotInfoQuery.getStatus())
|
||||
.eq(StringUtils.isNoneBlank(robotInfoQuery.getImAccount()),
|
||||
RobotInfo::getImAccount, robotInfoQuery.getImAccount())
|
||||
.orderByDesc(RobotInfo::getUpdateAt)
|
||||
.page(robotInfoQuery.toPage());
|
||||
return pageOfRobotInfo;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询机器人目前所有运行中的机器人
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<RobotInfo> queryRunningRobotList() {
|
||||
List<RobotInfo> pageOfRobotInfo = lambdaQuery().eq(RobotInfo::getIsDelete, 0)
|
||||
.eq(RobotInfo::getStatus, RobotStatus.ENABLED.getCode())
|
||||
.orderByDesc(RobotInfo::getUpdateAt).list();
|
||||
return pageOfRobotInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存机器人标签
|
||||
*
|
||||
* @param robotInfo 机器人标签参数
|
||||
* @return
|
||||
*/
|
||||
public RobotInfo saveOrUpdateRobotInfo(RobotInfo robotInfo) {
|
||||
saveOrUpdate(robotInfo);
|
||||
return robotInfo;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package cn.axzo.im.dao.repository;
|
||||
|
||||
import cn.axzo.basics.common.BeanMapper;
|
||||
import cn.axzo.im.center.api.vo.req.RobotTagQuery;
|
||||
import cn.axzo.im.entity.RobotTag;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import cn.axzo.im.dao.mapper.RobotTagMapper;
|
||||
@ -19,13 +20,13 @@ import org.springframework.stereotype.Repository;
|
||||
public class RobotTagDao extends ServiceImpl<RobotTagMapper, RobotTag> {
|
||||
|
||||
/**
|
||||
* 获取组织人员
|
||||
* 查询机器人标签列表,支持分页查询
|
||||
*
|
||||
* @param robotTagQuery
|
||||
* @return
|
||||
*/
|
||||
public IPage<RobotTag> queryRobotTagOfPage(RobotTagQuery robotTagQuery) {
|
||||
IPage<RobotTag> page = lambdaQuery().eq(RobotTag::getIsDelete, 0)
|
||||
IPage<RobotTag> pageOfRobotTag = lambdaQuery().eq(RobotTag::getIsDelete, 0)
|
||||
.like(StringUtils.isNoneBlank(robotTagQuery.getTagName()),
|
||||
RobotTag::getTagName,
|
||||
robotTagQuery.getTagName())
|
||||
@ -33,19 +34,18 @@ public class RobotTagDao extends ServiceImpl<RobotTagMapper, RobotTag> {
|
||||
RobotTag::getStatus, robotTagQuery.getStatus())
|
||||
.orderByDesc(RobotTag::getWeight)
|
||||
.page(robotTagQuery.toPage());
|
||||
return page;
|
||||
return pageOfRobotTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存单位联系人
|
||||
* 保存机器人标签
|
||||
*
|
||||
* @param dto
|
||||
* @param robotTag 机器人标签参数
|
||||
* @return
|
||||
*/
|
||||
public RobotTag saveRobotTag(RobotTag robotTag) {
|
||||
RobotTag contact = BeanMapper.map(robotTag, RobotTag.class);
|
||||
saveOrUpdate(contact);
|
||||
return contact;
|
||||
public RobotTag saveOrUpdateRobotTag(RobotTag robotTag) {
|
||||
saveOrUpdate(robotTag);
|
||||
return robotTag;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
package cn.axzo.im.nim;
|
||||
|
||||
import cn.axzo.maokai.common.enums.AppTypeEnum;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* im-center
|
||||
*
|
||||
* @author zuoqinbo
|
||||
* @version V1.0
|
||||
* @date 2023/10/11 9:44
|
||||
*/
|
||||
@Resource
|
||||
public class AppKeyUtil {
|
||||
|
||||
|
||||
public static String generateAccount(String sourceAccount, AppTypeEnum appType ){
|
||||
Register register = new Register();
|
||||
String account = NimService.registerAccount(register);
|
||||
return account;
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package cn.axzo.im.center.api.vo.nim;
|
||||
package cn.axzo.im.nim;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package cn.axzo.im.center.api.vo.nim;
|
||||
package cn.axzo.im.nim;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package cn.axzo.im.center.api.vo.nim;
|
||||
package cn.axzo.im.nim;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
@ -17,6 +17,7 @@ import java.util.UUID;
|
||||
* @date 2023/10/10 18:46
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class NimService {
|
||||
|
||||
private static final String NIM_ACCOUNT_CREATE_URL = " https://api.netease.im/nimserver/user/create.action";
|
||||
@ -49,6 +50,11 @@ public class NimService {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param register
|
||||
* @return
|
||||
*/
|
||||
public static String registerAccount(Register register) {
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("accid", register.getAccid());
|
||||
@ -1,4 +1,4 @@
|
||||
package cn.axzo.im.center.api.vo.nim;
|
||||
package cn.axzo.im.nim;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@ -0,0 +1,82 @@
|
||||
package cn.axzo.im.service;
|
||||
|
||||
import cn.axzo.basics.common.BeanMapper;
|
||||
import cn.axzo.framework.domain.page.PageResp;
|
||||
import cn.axzo.im.center.api.vo.req.RobotInfoReq;
|
||||
import cn.axzo.im.center.api.vo.req.RobotPageQuery;
|
||||
import cn.axzo.im.center.api.vo.req.UpdateRobotInfoReq;
|
||||
import cn.axzo.im.center.api.vo.resp.RobotInfoResp;
|
||||
import cn.axzo.im.center.api.vo.resp.RobotMsgTemplateResp;
|
||||
import cn.axzo.im.dao.repository.RobotInfoDao;
|
||||
import cn.axzo.im.dao.repository.RobotInfoDao;
|
||||
import cn.axzo.im.entity.RobotInfo;
|
||||
import cn.axzo.im.utils.BeanConvertUtils;
|
||||
import cn.azxo.framework.common.model.CommonResponse;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* im
|
||||
*
|
||||
* @author zuoqinbo
|
||||
* @version V1.0
|
||||
* @date 2023/10/10 10:06
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
public class RobotInfoService {
|
||||
|
||||
@Resource
|
||||
private RobotInfoDao robotInfoDao;
|
||||
|
||||
|
||||
public RobotInfoResp saveRobotInfo(@Valid RobotInfoReq robotInfoRequest) {
|
||||
RobotInfo robotInfo = BeanConvertUtils.copyBean(robotInfoRequest, RobotInfo.class);
|
||||
robotInfo = robotInfoDao.saveOrUpdateRobotInfo(robotInfo);
|
||||
if (robotInfo != null) {
|
||||
RobotInfoResp robotInfoResp = BeanMapper.map(robotInfo, RobotInfoResp.class);
|
||||
return robotInfoResp;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public RobotInfoResp updateRobotInfo(@Valid UpdateRobotInfoReq updateRobotInfoReq) {
|
||||
RobotInfo robotInfo = BeanConvertUtils.copyBean(updateRobotInfoReq, RobotInfo.class);
|
||||
robotInfo = robotInfoDao.saveOrUpdateRobotInfo(robotInfo);
|
||||
if (robotInfo != null) {
|
||||
RobotInfoResp robotInfoResp = BeanMapper.map(robotInfo, RobotInfoResp.class);
|
||||
return robotInfoResp;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public RobotInfoResp queryRobotInfo(Long robotInfoId) {
|
||||
RobotInfo robotInfo = robotInfoDao.getById(robotInfoId);
|
||||
if (robotInfo != null) {
|
||||
RobotInfoResp robotInfoResp = BeanMapper.map(robotInfo, RobotInfoResp.class);
|
||||
return robotInfoResp;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public PageResp<RobotInfoResp> queryRobotInfoList(RobotPageQuery robotInfoQuery) {
|
||||
IPage<RobotInfo> robotInfoIPage = robotInfoDao.queryRobotInfoOfPage(robotInfoQuery);
|
||||
List<RobotInfoResp> list = BeanMapper.copyList(robotInfoIPage.getRecords(), RobotInfoResp.class);
|
||||
PageResp<RobotInfoResp> pageOfRobotInfoResp = PageResp.list(robotInfoIPage.getCurrent(), robotInfoIPage.getSize(),
|
||||
robotInfoIPage.getTotal(), list);
|
||||
return pageOfRobotInfoResp;
|
||||
}
|
||||
|
||||
public List<RobotMsgTemplateResp> queryRunningRobotList() {
|
||||
List<RobotInfo> runningRobots = robotInfoDao.queryRunningRobotList();
|
||||
List<RobotMsgTemplateResp> msgTemplateResps = BeanMapper.copyList(runningRobots, RobotMsgTemplateResp.class);
|
||||
return msgTemplateResps;
|
||||
}
|
||||
}
|
||||
@ -1,56 +0,0 @@
|
||||
package cn.axzo.im.service;
|
||||
|
||||
import cn.axzo.im.api.feign.RobotInfoApi;
|
||||
import cn.axzo.im.api.vo.Page;
|
||||
import cn.axzo.im.api.vo.req.RobotInfoReq;
|
||||
import cn.axzo.im.api.vo.req.RobotQuery;
|
||||
import cn.axzo.im.api.vo.resp.RobotInfoResp;
|
||||
import cn.azxo.framework.common.model.CommonResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* im
|
||||
*
|
||||
* @author zuoqinbo
|
||||
* @version V1.0
|
||||
* @date 2023/10/10 10:06
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
public class RobotInfoServiceImpl implements RobotInfoApi {
|
||||
|
||||
@Resource
|
||||
private RobotInfoDao robotInfoDao;
|
||||
|
||||
@Override
|
||||
public CommonResponse<RobotInfoResp> saveRobotInfo(RobotInfoReq robotInfoReq) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResponse<RobotInfoResp> updateRobotInfo(RobotInfoReq robotInfoReq) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResponse<RobotInfoResp> queryRobotTagInfo(Long robotId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public CommonResponse<Page<RobotInfoResp>> queryRobotList(RobotQuery robotQuery) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResponse<RobotInfoResp> generateAccount(RobotInfoReq robotInfoRequest) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
package cn.axzo.im.service;
|
||||
|
||||
import cn.axzo.basics.common.BeanMapper;
|
||||
import cn.axzo.framework.domain.page.PageResp;
|
||||
import cn.axzo.im.center.api.vo.req.RobotTagQuery;
|
||||
import cn.axzo.im.center.api.vo.req.RobotTagReq;
|
||||
import cn.axzo.im.center.api.vo.req.UpdateRobotTagReq;
|
||||
import cn.axzo.im.center.api.vo.resp.RobotTagResp;
|
||||
import cn.axzo.im.dao.repository.RobotInfoDao;
|
||||
import cn.axzo.im.entity.RobotTag;
|
||||
import cn.axzo.im.dao.repository.RobotTagDao;
|
||||
import cn.axzo.im.utils.BeanConvertUtils;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* 机器人标签服务
|
||||
*
|
||||
* @author zuoqinbo
|
||||
* @version V1.0
|
||||
* @date 2023/10/10 10:06
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
public class RobotTagService {
|
||||
|
||||
@Resource
|
||||
private RobotTagDao robotTagDao;
|
||||
|
||||
@Resource
|
||||
private RobotInfoDao robotInfoDao;
|
||||
|
||||
|
||||
public RobotTagResp saveRobotTag(@Valid RobotTagReq robotTagRequest) {
|
||||
RobotTag robotTag = BeanConvertUtils.copyBean(robotTagRequest, RobotTag.class);
|
||||
robotTag = robotTagDao.saveOrUpdateRobotTag(robotTag);
|
||||
if (robotTag != null) {
|
||||
RobotTagResp robotTagResp = BeanMapper.map(robotTag, RobotTagResp.class);
|
||||
return robotTagResp;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public RobotTagResp updateRobotTag(@Valid UpdateRobotTagReq updateRobotTagReq) {
|
||||
RobotTag robotTag = BeanConvertUtils.copyBean(updateRobotTagReq, RobotTag.class);
|
||||
robotTag = robotTagDao.saveOrUpdateRobotTag(robotTag);
|
||||
if (robotTag != null) {
|
||||
RobotTagResp robotTagResp = BeanMapper.map(robotTag, RobotTagResp.class);
|
||||
return robotTagResp;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public RobotTagResp queryRobotTagInfo(Long robotTagId) {
|
||||
RobotTag robotTag = robotTagDao.getById(robotTagId);
|
||||
if (robotTag != null) {
|
||||
RobotTagResp robotTagResp = BeanMapper.map(robotTag, RobotTagResp.class);
|
||||
return robotTagResp;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public PageResp<RobotTagResp> queryRobotTagList(RobotTagQuery robotTagQuery) {
|
||||
IPage<RobotTag> robotTagIPage = robotTagDao.queryRobotTagOfPage(robotTagQuery);
|
||||
List<RobotTagResp> list = BeanMapper.copyList(robotTagIPage.getRecords(), RobotTagResp.class);
|
||||
PageResp<RobotTagResp> pageOfRobotTagResp = PageResp.list(robotTagIPage.getCurrent(), robotTagIPage.getSize(),
|
||||
robotTagIPage.getTotal(), list);
|
||||
return pageOfRobotTagResp;
|
||||
}
|
||||
}
|
||||
@ -1,64 +0,0 @@
|
||||
package cn.axzo.im.service;
|
||||
|
||||
import cn.axzo.im.api.feign.RobotTagApi;
|
||||
import cn.axzo.im.api.vo.Page;
|
||||
import cn.axzo.im.api.vo.req.RobotTagQuery;
|
||||
import cn.axzo.im.api.vo.req.RobotTagReq;
|
||||
import cn.axzo.im.api.vo.resp.RobotTagResp;
|
||||
import cn.axzo.im.entity.RobotTag;
|
||||
import cn.axzo.im.dao.repository.RobotTagDao;
|
||||
import cn.axzo.im.utils.BeanConvertUtils;
|
||||
import cn.azxo.framework.common.model.CommonResponse;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* im
|
||||
*
|
||||
* @author zuoqinbo
|
||||
* @version V1.0
|
||||
* @date 2023/10/10 10:06
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
public class RobotTagServiceImpl implements RobotTagApi {
|
||||
|
||||
@Resource
|
||||
private RobotTagDao robotTagDao;
|
||||
|
||||
@Override
|
||||
public CommonResponse<RobotTagResp> saveRobotTag(RobotTagReq robotTagRequest) {
|
||||
RobotTag robotTag = BeanConvertUtils.copyBean(robotTagRequest, RobotTag.class);
|
||||
robotTagDao.saveOrUpdate(robotTag);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResponse<RobotTagResp> updateRobotTag(RobotTagReq robotTagRequest) {
|
||||
RobotTag robotTag = BeanConvertUtils.copyBean(robotTagRequest, RobotTag.class);
|
||||
robotTagDao.saveOrUpdate(robotTag);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResponse<RobotTagResp> queryRobotTagInfo(Long robotTagId) {
|
||||
RobotTag robotTag = robotTagDao.getById(robotTagId);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResponse<Page<RobotTagResp>> queryRobotTagList(RobotTagQuery robotTagQuery) {
|
||||
IPage<RobotTag> robotTagIPage = robotTagDao.queryRobotTagOfPage(robotTagQuery);
|
||||
|
||||
CommonResponse commonResponse = new CommonResponse();
|
||||
|
||||
commonResponse.setData(robotTagIPage);
|
||||
|
||||
return commonResponse;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user