| @@ -407,6 +407,17 @@ | |||
| </properties> | |||
| </profile> | |||
| <profile> | |||
| <id>test-liantong-mobilebox</id> | |||
| <properties> | |||
| <!-- 环境标识,需要与配置文件的名称相对应 --> | |||
| <activatedProperties>test-liantong-mobilebox</activatedProperties> | |||
| <nacos.host>39.107.77.235</nacos.host> | |||
| <nacos.port>18848</nacos.port> | |||
| <nacos.namespace>d4f6cba7-30ad-427c-83dd-c6f9cef117ad</nacos.namespace> | |||
| </properties> | |||
| </profile> | |||
| </profiles> | |||
| <build> | |||
| @@ -1,6 +0,0 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <module version="4"> | |||
| <component name="SonarLintModuleSettings"> | |||
| <option name="uniqueId" value="247b44a0-c300-405f-a076-027db3e8eac7" /> | |||
| </component> | |||
| </module> | |||
| @@ -1,6 +0,0 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <module version="4"> | |||
| <component name="SonarLintModuleSettings"> | |||
| <option name="uniqueId" value="be41b8e4-9859-47b2-a6fe-9edd67df019c" /> | |||
| </component> | |||
| </module> | |||
| @@ -0,0 +1,15 @@ | |||
| package com.xueyi.nlt.api.nlt.domain.vo; | |||
| import lombok.Data; | |||
| import lombok.NoArgsConstructor; | |||
| @Data | |||
| @NoArgsConstructor | |||
| public class DmLandingLlmUploadVo { | |||
| private String category; | |||
| private String question; | |||
| private String answer; | |||
| } | |||
| @@ -2,11 +2,14 @@ package com.xueyi.nlt.api.nlt.feign; | |||
| import com.alibaba.fastjson2.JSONObject; | |||
| import com.xueyi.common.core.web.result.AjaxResult; | |||
| import com.xueyi.nlt.api.nlt.domain.vo.DmLandingLlmUploadVo; | |||
| import com.xueyi.nlt.api.nlt.domain.vo.DmLandingLlmVo; | |||
| import com.xueyi.nlt.api.nlt.feign.factory.RemoteLandingLlmFallbackFactory; | |||
| import com.xueyi.nlt.api.nlt.feign.factory.RemoteQAFallbackFactory; | |||
| import org.springframework.cloud.openfeign.FeignClient; | |||
| import org.springframework.http.MediaType; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import org.springframework.web.multipart.MultipartFile; | |||
| /** | |||
| * 问答服务 | |||
| @@ -25,4 +28,11 @@ public interface RemoteLandingLlmService { | |||
| @ResponseBody | |||
| JSONObject query(@RequestBody JSONObject jsonObject); | |||
| @PostMapping(value = "/uploadFile/uploadLearningFile",consumes = MediaType.MULTIPART_FORM_DATA_VALUE) | |||
| @ResponseBody | |||
| JSONObject uploadLearningFile(@RequestParam(value = "category") String category,@RequestPart(value = "fileToUpload") MultipartFile file); | |||
| @PostMapping(value = "/index/addInstruction") | |||
| @ResponseBody | |||
| JSONObject addInstruction(@RequestBody DmLandingLlmUploadVo vo); | |||
| } | |||
| @@ -2,12 +2,14 @@ package com.xueyi.nlt.api.nlt.feign.factory; | |||
| import com.alibaba.fastjson2.JSONObject; | |||
| import com.xueyi.common.core.web.result.AjaxResult; | |||
| import com.xueyi.nlt.api.nlt.domain.vo.DmLandingLlmUploadVo; | |||
| import com.xueyi.nlt.api.nlt.domain.vo.DmLandingLlmVo; | |||
| import com.xueyi.nlt.api.nlt.feign.RemoteLandingLlmService; | |||
| import com.xueyi.nlt.api.nlt.feign.RemoteQAService; | |||
| import lombok.extern.slf4j.Slf4j; | |||
| import org.springframework.cloud.openfeign.FallbackFactory; | |||
| import org.springframework.stereotype.Component; | |||
| import org.springframework.web.multipart.MultipartFile; | |||
| /** | |||
| * 会议室服务 降级处理 | |||
| @@ -37,6 +39,16 @@ public class RemoteLandingLlmFallbackFactory implements FallbackFactory<RemoteLa | |||
| jResult.put("data",""); | |||
| return jResult; | |||
| } | |||
| @Override | |||
| public JSONObject uploadLearningFile(String category, MultipartFile file) { | |||
| return null; | |||
| } | |||
| @Override | |||
| public JSONObject addInstruction(DmLandingLlmUploadVo vo) { | |||
| return null; | |||
| } | |||
| }; | |||
| } | |||
| } | |||
| @@ -0,0 +1,25 @@ | |||
| package com.xueyi.system.api.digitalmans.domain.dto; | |||
| import com.xueyi.system.api.digitalmans.domain.po.DmH5MenuPo; | |||
| import com.xueyi.system.api.digitalmans.domain.po.DmModelPo; | |||
| import com.xueyi.system.api.resource.domain.po.DmResourcesPo; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import java.io.Serial; | |||
| import java.util.List; | |||
| /** | |||
| * 模型 数据传输对象 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class DmH5MenuDto extends DmH5MenuPo { | |||
| @Serial | |||
| private static final long serialVersionUID = 1L; | |||
| protected List<DmScreenIconDto> dmScreenIconDto; | |||
| } | |||
| @@ -41,6 +41,6 @@ public class DmModelDto extends DmModelPo { | |||
| protected String name; | |||
| // @Correlation(groupName = Model_DmModelIcon_GROUP, keyType = OperateConstants.SubKeyType.RECEIVE) | |||
| protected List<DmScreenIconDto> dmScreenIconDtos; | |||
| protected List<DmH5MenuDto> H5Menus; | |||
| } | |||
| @@ -20,8 +20,8 @@ import java.io.Serial; | |||
| @Data | |||
| @NoArgsConstructor | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @TableName("dm_model_icon_merge") | |||
| public class DmModelIconMerge extends TBasisEntity { | |||
| @TableName("dm_menu_icon_merge") | |||
| public class DmMenuIconMerge extends TBasisEntity { | |||
| @Serial | |||
| private static final long serialVersionUID = 1L; | |||
| @@ -29,24 +29,26 @@ public class DmModelIconMerge extends TBasisEntity { | |||
| /** 招待任务id */ | |||
| @Correlations({ | |||
| @Correlation(groupName = MergeGroup.Model_DmModelIcon_GROUP, keyType = OperateConstants.SubKeyType.MERGE_MAIN), | |||
| @Correlation(groupName = MergeGroup.Icon_DmModelIcon_GROUP, keyType = OperateConstants.SubKeyType.MERGE_SLAVE) | |||
| @Correlation(groupName = MergeGroup.Menu_DmMenuIcon_GROUP, keyType = OperateConstants.SubKeyType.MERGE_MAIN), | |||
| @Correlation(groupName = MergeGroup.Icon_DmMenuIcon_GROUP, keyType = OperateConstants.SubKeyType.MERGE_SLAVE) | |||
| }) | |||
| protected Long modelId; | |||
| protected Long menuId;; | |||
| /** 访客id */ | |||
| @Correlations({ | |||
| @Correlation(groupName = MergeGroup.Icon_DmModelIcon_GROUP, keyType = OperateConstants.SubKeyType.MERGE_MAIN), | |||
| @Correlation(groupName = MergeGroup.Model_DmModelIcon_GROUP, keyType = OperateConstants.SubKeyType.MERGE_SLAVE) | |||
| @Correlation(groupName = MergeGroup.Icon_DmMenuIcon_GROUP, keyType = OperateConstants.SubKeyType.MERGE_MAIN), | |||
| @Correlation(groupName = MergeGroup.Menu_DmMenuIcon_GROUP, keyType = OperateConstants.SubKeyType.MERGE_SLAVE) | |||
| }) | |||
| protected Long iconId; | |||
| /** 优先级 */ | |||
| protected Integer pos; | |||
| public DmModelIconMerge(Long modelId, Long iconId, Integer pos) { | |||
| this.modelId = modelId; | |||
| public DmMenuIconMerge(Long iconId, Long menuId, Integer pos) { | |||
| this.iconId = iconId; | |||
| this.menuId = menuId; | |||
| this.pos = pos; | |||
| } | |||
| } | |||
| @@ -13,4 +13,7 @@ public interface MergeGroup { | |||
| String Resource_DmBroadcastResource_GROUP = "Resource_DmBroadcastResource_GROUP"; | |||
| String Model_DmModelIcon_GROUP = "Model_DmModelIcon_GROUP"; | |||
| String Icon_DmModelIcon_GROUP = "Icon_DmModelIcon_GROUP"; | |||
| String Icon_DmMenuIcon_GROUP = "Icon_DmMenuIcon_GROUP"; | |||
| String Menu_DmMenuIcon_GROUP = "Menu_DmMenuIcon_GROUP"; | |||
| } | |||
| @@ -0,0 +1,40 @@ | |||
| package com.xueyi.system.api.digitalmans.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.xueyi.common.core.annotation.Excel; | |||
| import com.xueyi.common.core.web.entity.base.BaseEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import java.io.Serial; | |||
| import java.util.Date; | |||
| import static com.xueyi.common.core.constant.basic.EntityConstants.REMARK; | |||
| /** | |||
| * 数字人设备管理 持久化对象 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @TableName(value = "dm_h5_menu", excludeProperty = { REMARK }) | |||
| public class DmH5MenuPo extends BaseEntity { | |||
| @Serial | |||
| private static final long serialVersionUID = 1L; | |||
| /** 租户名 */ | |||
| @Excel(name = "父节点id") | |||
| protected Long parentId; | |||
| /** 菜单名 */ | |||
| @Excel(name = "菜单名") | |||
| protected String title; | |||
| /** 菜单类型 */ | |||
| @Excel(name = "菜单类型") | |||
| protected String menuType; | |||
| } | |||
| @@ -0,0 +1,36 @@ | |||
| package com.xueyi.system.api.digitalmans.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.xueyi.common.core.annotation.Excel; | |||
| import com.xueyi.common.core.web.tenant.base.TBaseEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import java.io.Serial; | |||
| import static com.xueyi.common.core.constant.basic.EntityConstants.*; | |||
| /** | |||
| * 数字人主界面图标 持久化对象 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @TableName(value = "dm_h5_tenant_menu_merge", excludeProperty = { STATUS,SORT,CREATE_TIME,CREATE_BY,UPDATE_TIME,UPDATE_BY,DEL_FLAG,REMARK }) | |||
| public class DmH5TenantMenuPo extends TBaseEntity { | |||
| @Serial | |||
| private static final long serialVersionUID = 1L; | |||
| /** 图片id */ | |||
| @Excel(name = "图片id") | |||
| protected Long menuId; | |||
| /** 广播id */ | |||
| @Excel(name = "广播id") | |||
| protected Long tenantId; | |||
| } | |||
| @@ -18,15 +18,15 @@ import static com.xueyi.common.core.constant.basic.EntityConstants.*; | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @TableName(value = "dm_model_icon_merge", excludeProperty = { STATUS,SORT,CREATE_TIME,CREATE_BY,UPDATE_TIME,UPDATE_BY,DEL_FLAG,REMARK }) | |||
| public class DmModelIconPo extends TBaseEntity { | |||
| @TableName(value = "dm_menu_icon_merge", excludeProperty = { STATUS,SORT,CREATE_TIME,CREATE_BY,UPDATE_TIME,UPDATE_BY,DEL_FLAG,REMARK }) | |||
| public class DmMenuIconPo extends TBaseEntity { | |||
| @Serial | |||
| private static final long serialVersionUID = 1L; | |||
| /** 图片id */ | |||
| @Excel(name = "图片id") | |||
| protected Long modelId; | |||
| protected Long menuId; | |||
| /** 广播id */ | |||
| @Excel(name = "广播id") | |||
| @@ -35,6 +35,8 @@ public class DmScreenIconPo extends TBaseEntity { | |||
| @Excel(name = "状态", readConverterExp = "0=:正常;1:停用") | |||
| protected String status; | |||
| protected String url; | |||
| /** 备注 */ | |||
| @Excel(name = "备注") | |||
| protected String remark; | |||
| @@ -0,0 +1,16 @@ | |||
| package com.xueyi.system.api.digitalmans.domain.query; | |||
| import com.xueyi.system.api.digitalmans.domain.po.DmH5MenuPo; | |||
| import lombok.Data; | |||
| import lombok.NoArgsConstructor; | |||
| /** | |||
| * 数字人设备管理 持久化对象 | |||
| * 菜单查询对象 dm_h5_menu | |||
| */ | |||
| @Data | |||
| @NoArgsConstructor | |||
| public class DmH5MenuQuery extends DmH5MenuPo { | |||
| } | |||
| @@ -0,0 +1,24 @@ | |||
| package com.xueyi.system.api.digitalmans.feign; | |||
| import com.xueyi.common.core.constant.basic.SecurityConstants; | |||
| import com.xueyi.common.core.constant.basic.ServiceConstants; | |||
| import com.xueyi.common.core.web.result.R; | |||
| import com.xueyi.system.api.digitalmans.domain.dto.DmH5MenuDto; | |||
| import com.xueyi.system.api.digitalmans.domain.query.DmH5MenuQuery; | |||
| import com.xueyi.system.api.digitalmans.domain.vo.DmBatchQuestionsVo; | |||
| import com.xueyi.system.api.digitalmans.domain.vo.DmReceptionVo; | |||
| import com.xueyi.system.api.organize.feign.factory.RemoteUserFallbackFactory; | |||
| import org.springframework.cloud.openfeign.FeignClient; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import java.util.List; | |||
| @FeignClient(contextId = "remoteModelService", value = ServiceConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class) | |||
| public interface RemoteModelService { | |||
| @GetMapping("/model/inner/menu_list") | |||
| @ResponseBody | |||
| public R<List<DmH5MenuDto>> getMenuList(@RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
| } | |||
| @@ -1,6 +0,0 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <module version="4"> | |||
| <component name="SonarLintModuleSettings"> | |||
| <option name="uniqueId" value="be06f51a-0801-4f8b-8a91-bd836ed8ecf6" /> | |||
| </component> | |||
| </module> | |||
| @@ -52,6 +52,25 @@ | |||
| <artifactId>spring-kafka</artifactId> | |||
| </dependency> | |||
| <!-- Feign框架核心 --> | |||
| <dependency> | |||
| <groupId>io.github.openfeign</groupId> | |||
| <artifactId>feign-core</artifactId> | |||
| <version>11.1</version> | |||
| </dependency> | |||
| <!-- 支持表单格式,文件上传格式 --> | |||
| <dependency> | |||
| <groupId>io.github.openfeign.form</groupId> | |||
| <artifactId>feign-form</artifactId> | |||
| <version>3.8.0</version> | |||
| </dependency> | |||
| <!-- 文件操作工具类 --> | |||
| <dependency> | |||
| <groupId>commons-io</groupId> | |||
| <artifactId>commons-io</artifactId> | |||
| <version>2.11.0</version> | |||
| </dependency> | |||
| <!-- XueYi Common Log --> | |||
| <dependency> | |||
| <groupId>com.xueyi</groupId> | |||
| @@ -11,6 +11,8 @@ import com.xueyi.common.log.enums.BusinessType; | |||
| import com.xueyi.common.security.annotation.Logical; | |||
| import com.xueyi.common.security.annotation.RequiresPermissions; | |||
| import com.xueyi.common.web.entity.controller.BaseController; | |||
| import com.xueyi.nlt.api.nlt.domain.vo.DmLandingLlmUploadVo; | |||
| import com.xueyi.nlt.api.nlt.feign.RemoteLandingLlmService; | |||
| import com.xueyi.system.api.digitalmans.domain.vo.DmBroadcastVo; | |||
| import com.xueyi.system.api.meeting.feign.RemoteMeetingService; | |||
| import com.xueyi.system.api.organize.domain.po.SysUserPo; | |||
| @@ -27,8 +29,10 @@ import com.xueyi.system.resource.domain.dto.DmResourcesDto; | |||
| import com.xueyi.system.resource.domain.model.DmResourcesConverter; | |||
| import com.xueyi.system.resource.mapper.DmResourcesMapper; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.mock.web.MockMultipartFile; | |||
| import org.springframework.validation.annotation.Validated; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import org.springframework.web.multipart.MultipartFile; | |||
| import java.io.Serializable; | |||
| import java.time.LocalDateTime; | |||
| @@ -61,6 +65,9 @@ public class DmBroadcastController extends BaseController<DmBroadcastQuery, DmBr | |||
| @Autowired | |||
| private IDmDigitalmanService digitalmanService; | |||
| @Autowired | |||
| private RemoteLandingLlmService remoteLandingLlmService; | |||
| @Autowired | |||
| private ISysUserService sysUserService; | |||
| @@ -154,6 +161,11 @@ public class DmBroadcastController extends BaseController<DmBroadcastQuery, DmBr | |||
| broadcast.setId(id); | |||
| broadcast.setCreateTime(LocalDateTime.now()); | |||
| broadcastManager.addBroadcastResourceMerge(id, broadcast.getResourceList()); | |||
| DmLandingLlmUploadVo vo = new DmLandingLlmUploadVo(); | |||
| vo.setCategory("dgmeta"); | |||
| vo.setQuestion(broadcast.getName()); | |||
| vo.setAnswer(String.valueOf(id)); | |||
| remoteLandingLlmService.addInstruction(vo); | |||
| return super.add(broadcast); | |||
| } | |||
| @@ -167,6 +179,7 @@ public class DmBroadcastController extends BaseController<DmBroadcastQuery, DmBr | |||
| public AjaxResult edit(@Validated({V_E.class}) @RequestBody DmBroadcastDto broadcast) { | |||
| broadcastManager.editBroadcastResourceMerge(broadcast.getId(), broadcast.getResourceList()); | |||
| broadcast.setUpdateTime(LocalDateTime.now()); | |||
| return super.edit(broadcast); | |||
| } | |||
| @@ -192,6 +205,10 @@ public class DmBroadcastController extends BaseController<DmBroadcastQuery, DmBr | |||
| return super.batchRemove(idList); | |||
| } | |||
| // private mockFile (String text) { | |||
| // MultipartFile uploadfile = new MockMultipartFile("file", "test.mp3", "multipart/form-data", text.getBytes()); | |||
| // } | |||
| /** | |||
| * 获取播报选择框列表 | |||
| */ | |||
| @@ -1,13 +1,17 @@ | |||
| package com.xueyi.system.digitalmans.controller; | |||
| import com.xueyi.common.core.web.result.AjaxResult; | |||
| import com.xueyi.common.core.web.result.R; | |||
| import com.xueyi.common.core.web.validate.V_A; | |||
| import com.xueyi.common.core.web.validate.V_E; | |||
| import com.xueyi.common.log.annotation.Log; | |||
| import com.xueyi.common.log.enums.BusinessType; | |||
| import com.xueyi.common.security.annotation.InnerAuth; | |||
| import com.xueyi.common.security.annotation.RequiresPermissions; | |||
| import com.xueyi.common.web.entity.controller.BaseController; | |||
| import com.xueyi.system.api.digitalmans.domain.dto.DmH5MenuDto; | |||
| import com.xueyi.system.api.digitalmans.domain.dto.DmModelDto; | |||
| import com.xueyi.system.api.digitalmans.domain.query.DmH5MenuQuery; | |||
| import com.xueyi.system.digitalmans.domain.dto.DmModelUploadDto; | |||
| import com.xueyi.system.digitalmans.domain.query.DmModelQuery; | |||
| import com.xueyi.system.digitalmans.service.IDmModelService; | |||
| @@ -35,6 +39,17 @@ public class DmModelController extends BaseController<DmModelQuery, DmModelDto, | |||
| return "模型" ; | |||
| } | |||
| /** | |||
| * 查询模型列表 | |||
| */ | |||
| @InnerAuth | |||
| @GetMapping("/inner/menu_list") | |||
| public R<List<DmH5MenuDto>> getMenuList() { | |||
| DmH5MenuQuery query = new DmH5MenuQuery(); | |||
| // 获取H5列表 | |||
| return R.ok(super.baseService.selectH5MenuList(query)); | |||
| } | |||
| /** | |||
| * 查询模型列表 | |||
| */ | |||
| @@ -0,0 +1,37 @@ | |||
| package com.xueyi.system.digitalmans.controller.api; | |||
| import com.xueyi.common.core.constant.basic.SecurityConstants; | |||
| import com.xueyi.common.core.web.result.AjaxResult; | |||
| import com.xueyi.common.core.web.result.R; | |||
| import com.xueyi.system.api.device.domain.vo.DeviceTenantSourceMergeVo; | |||
| import com.xueyi.system.api.digitalmans.domain.dto.DmH5MenuDto; | |||
| import com.xueyi.system.api.digitalmans.feign.RemoteModelService; | |||
| import com.xueyi.system.resource.controller.api.BaseApiController; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import java.util.List; | |||
| @RestController | |||
| @RequestMapping("/api/menu/") | |||
| public class DmMenuApiController extends BaseApiController { | |||
| private static final Logger log = LoggerFactory.getLogger(DmMenuApiController.class); | |||
| @Autowired | |||
| RemoteModelService remoteModelService; | |||
| @GetMapping(value = "list/{devId}") | |||
| @ResponseBody | |||
| public AjaxResult list(@PathVariable(value = "devId") String devId) { | |||
| DeviceTenantSourceMergeVo vo = super.getDeviceTenantSourceMergeVo(devId); | |||
| R<List<DmH5MenuDto>> listR = remoteModelService.getMenuList(vo.getTenantId(),vo.getSourceSlave(), SecurityConstants.INNER); | |||
| if (listR.isOk()) { | |||
| return AjaxResult.success(listR.getData()); | |||
| } | |||
| log.error("获取菜单列表失败{}",listR.getMsg()); | |||
| return AjaxResult.error("获取菜单列表失败"); | |||
| } | |||
| } | |||
| @@ -1,10 +1,14 @@ | |||
| package com.xueyi.system.digitalmans.manager; | |||
| import com.xueyi.system.api.digitalmans.domain.dto.DmH5MenuDto; | |||
| import com.xueyi.system.api.digitalmans.domain.dto.DmModelDto; | |||
| import com.xueyi.system.api.digitalmans.domain.query.DmH5MenuQuery; | |||
| import com.xueyi.system.digitalmans.domain.dto.DmModelUploadDto; | |||
| import com.xueyi.system.digitalmans.domain.query.DmModelQuery; | |||
| import com.xueyi.common.web.entity.manager.IBaseManager; | |||
| import java.util.List; | |||
| /** | |||
| * 模型管理 数据封装层 | |||
| * | |||
| @@ -13,4 +17,6 @@ import com.xueyi.common.web.entity.manager.IBaseManager; | |||
| public interface IDmModelManager extends IBaseManager<DmModelQuery, DmModelDto> { | |||
| int uploadResourceByResourceId(DmModelUploadDto dto); | |||
| List<DmH5MenuDto> selectH5MenuList(DmH5MenuQuery query); | |||
| } | |||
| @@ -1,28 +1,19 @@ | |||
| package com.xueyi.system.digitalmans.manager.impl; | |||
| import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
| import com.xueyi.common.core.constant.basic.OperateConstants; | |||
| import com.xueyi.common.web.entity.domain.SlaveRelation; | |||
| import com.xueyi.system.api.digitalmans.domain.dto.DmH5MenuDto; | |||
| import com.xueyi.system.api.digitalmans.domain.dto.DmScreenIconDto; | |||
| import com.xueyi.system.api.digitalmans.domain.po.DmModelIconPo; | |||
| import com.xueyi.system.api.digitalmans.domain.po.DmScreenIconPo; | |||
| import com.xueyi.system.digitalmans.controller.DmQAndAController; | |||
| import com.xueyi.system.api.digitalmans.domain.po.*; | |||
| import com.xueyi.system.api.digitalmans.domain.query.DmH5MenuQuery; | |||
| import com.xueyi.system.digitalmans.domain.dto.DmModelUploadDto; | |||
| import com.xueyi.system.api.digitalmans.domain.po.DmDigitalmanPo; | |||
| import com.xueyi.system.api.digitalmans.domain.po.DmModelPo; | |||
| import com.xueyi.system.api.digitalmans.domain.dto.DmModelDto; | |||
| import com.xueyi.system.api.digitalmans.domain.merge.DmModelIconMerge; | |||
| import com.xueyi.system.digitalmans.domain.model.DmScreenIconConverter; | |||
| import com.xueyi.system.digitalmans.domain.query.DmModelQuery; | |||
| import com.xueyi.system.digitalmans.domain.model.DmModelConverter; | |||
| import com.xueyi.system.digitalmans.mapper.DmDigitalmanMapper; | |||
| import com.xueyi.system.digitalmans.mapper.DmModelIconMapper; | |||
| import com.xueyi.system.digitalmans.mapper.DmModelMapper; | |||
| import com.xueyi.system.digitalmans.mapper.*; | |||
| import com.xueyi.common.web.entity.manager.impl.BaseManagerImpl; | |||
| import com.xueyi.system.digitalmans.manager.IDmModelManager; | |||
| import com.xueyi.system.api.resource.domain.po.DmResourcesPo; | |||
| import com.xueyi.system.digitalmans.mapper.DmScreenIconMapper; | |||
| import com.xueyi.system.digitalmans.mapper.merge.DmModelIconMergeMapper; | |||
| import com.xueyi.system.resource.domain.po.DmBackgroundPo; | |||
| import com.xueyi.system.resource.domain.po.DmScreenOffPo; | |||
| import com.xueyi.system.resource.mapper.DmBackgroundMapper; | |||
| @@ -37,8 +28,7 @@ import java.io.Serializable; | |||
| import java.util.ArrayList; | |||
| import java.util.Arrays; | |||
| import java.util.List; | |||
| import static com.xueyi.system.api.digitalmans.domain.merge.MergeGroup.Model_DmModelIcon_GROUP; | |||
| import java.util.stream.Collectors; | |||
| /** | |||
| @@ -50,6 +40,7 @@ import static com.xueyi.system.api.digitalmans.domain.merge.MergeGroup.Model_DmM | |||
| public class DmModelManager extends BaseManagerImpl<DmModelQuery, DmModelDto, DmModelPo, DmModelMapper, DmModelConverter> implements IDmModelManager { | |||
| private static final Logger log = LoggerFactory.getLogger(DmModelManager.class); | |||
| @Autowired | |||
| DmResourcesMapper dmResourcesMapper; | |||
| @@ -66,7 +57,13 @@ public class DmModelManager extends BaseManagerImpl<DmModelQuery, DmModelDto, Dm | |||
| DmDigitalmanMapper digitalmanMapper; | |||
| @Autowired | |||
| DmModelIconMapper dmModelIconMapper; | |||
| DmMenuIconMapper dmMenuIconMapper; | |||
| @Autowired | |||
| DmH5TenantMenuMapper h5TenantMenuMapper; | |||
| @Autowired | |||
| DmH5MenuMapper h5MenuMapper; | |||
| @Autowired | |||
| DmScreenIconMapper dmScreenIconMapper; | |||
| @@ -127,22 +124,51 @@ public class DmModelManager extends BaseManagerImpl<DmModelQuery, DmModelDto, Dm | |||
| modelDto.setRIcon(dmResourcesMapper.selectById(modelDto.getIconId())); | |||
| } | |||
| // 获取主界面icon | |||
| List<DmModelIconPo> modelIconList = dmModelIconMapper.selectModelIconListByModelId(modelDto.getId()); | |||
| log.info("主界面icon列表:{}", modelIconList); | |||
| if (modelIconList != null && modelIconList.size() > 0) { | |||
| List<DmScreenIconDto> screenIconDtos = new ArrayList<>(); | |||
| modelIconList.forEach(iconItem-> { | |||
| // 获取icon | |||
| DmScreenIconPo iconPo = dmScreenIconMapper.selectById(iconItem.getIconId()); | |||
| DmScreenIconDto temp = screenIconConverter.mapperDto(iconPo); | |||
| DmResourcesPo resourcesPo = dmResourcesMapper.selectById(iconPo.getResourceId()); | |||
| temp.setPos(iconItem.getPos()); | |||
| temp.setIconUrl(resourcesPo.getUrl()); | |||
| screenIconDtos.add(temp); | |||
| }); | |||
| modelDto.setDmScreenIconDtos(screenIconDtos); | |||
| } | |||
| // 获取菜单列表 | |||
| // List<DmH5MenuPo> menuPos = h5TenantMenuMapper.selectTenantMenuList(); | |||
| List<DmH5MenuPo> menuPos = h5MenuMapper.selectH5MenuList(); | |||
| log.info("菜单列表:{}", menuPos); | |||
| List<DmH5MenuDto> h5MenuDtos = new ArrayList<>(); | |||
| // 根据列表获取icon集合 | |||
| menuPos.forEach(item->{ | |||
| DmH5MenuDto h5MenuDto = new DmH5MenuDto(); | |||
| h5MenuDto.setId(item.getId()); | |||
| h5MenuDto.setTitle(item.getTitle()); | |||
| List<DmMenuIconPo> menuIconPos = dmMenuIconMapper.selectMenuIconListByMenuId(item.getId()); | |||
| if (menuIconPos != null && menuIconPos.size() > 0) { | |||
| List<DmScreenIconPo> iconPos = dmScreenIconMapper.selectBatchIds(menuIconPos.stream().map(DmMenuIconPo::getIconId).collect(Collectors.toList())); | |||
| List<DmScreenIconDto> tmpDtos = screenIconConverter.mapperDto(iconPos); | |||
| tmpDtos.forEach(item2-> { | |||
| for (DmMenuIconPo menuIconPo : menuIconPos) { | |||
| if (item2.getId().equals(menuIconPo.getIconId())) { | |||
| item2.setPos(menuIconPo.getPos()); | |||
| } | |||
| } | |||
| }); | |||
| h5MenuDto.setDmScreenIconDto(tmpDtos); | |||
| } | |||
| h5MenuDtos.add(h5MenuDto); | |||
| }); | |||
| modelDto.setH5Menus(h5MenuDtos); | |||
| // // 获取主界面icon | |||
| // List<DmMenuIconPo> modelIconList = dmMenuIconMapper.selectModelIconListByModelId(modelDto.getId()); | |||
| log.info("主界面icon列表:{}", h5MenuDtos); | |||
| // if (modelIconList != null && modelIconList.size() > 0) { | |||
| // List<DmScreenIconDto> screenIconDtos = new ArrayList<>(); | |||
| // modelIconList.forEach(iconItem-> { | |||
| // // 获取icon | |||
| // DmScreenIconPo iconPo = dmScreenIconMapper.selectById(iconItem.getIconId()); | |||
| // DmScreenIconDto temp = screenIconConverter.mapperDto(iconPo); | |||
| // DmResourcesPo resourcesPo = dmResourcesMapper.selectById(iconPo.getResourceId()); | |||
| // temp.setPos(iconItem.getPos()); | |||
| // temp.setIconUrl(resourcesPo.getUrl()); | |||
| // screenIconDtos.add(temp); | |||
| // }); | |||
| // modelDto.setDmScreenIconDtos(screenIconDtos); | |||
| // } | |||
| return modelDto; | |||
| } | |||
| @@ -183,40 +209,74 @@ public class DmModelManager extends BaseManagerImpl<DmModelQuery, DmModelDto, Dm | |||
| DmDigitalmanPo po = digitalmanMapper.selectById(dto.getManId()); | |||
| po.setName(dto.getName()); | |||
| digitalmanMapper.updateById(po); | |||
| //更新主界面icon | |||
| List<DmModelIconPo> iconPos = dmModelIconMapper.selectModelIconListByModelId(dto.getId()); | |||
| if (iconPos != null && iconPos.size() > 0) { | |||
| // 删除原有icon | |||
| dmModelIconMapper.deleteMerge(iconPos.get(0)); | |||
| } | |||
| log.info("主界面icon列表:{}",dto.getDmScreenIconDtos()); | |||
| if (dto.getDmScreenIconDtos() != null && dto.getDmScreenIconDtos().size() > 0) { | |||
| // 新增icon | |||
| for (DmScreenIconDto screenIconDto : dto.getDmScreenIconDtos()) { | |||
| DmScreenIconPo screenIconPo = new DmScreenIconPo(); | |||
| if (screenIconDto.getId() != null && screenIconDto.getId().doubleValue() > 0) { | |||
| // 更新模型-主界面icon关系 | |||
| screenIconPo = dmScreenIconMapper.selectById(screenIconDto.getId()); | |||
| screenIconPo.setName(screenIconDto.getName()); | |||
| screenIconPo.setResourceId(screenIconDto.getResourceId()); | |||
| screenIconPo.setBroadcastId(screenIconDto.getBroadcastId()); | |||
| dmScreenIconMapper.updateById(screenIconPo); | |||
| } else { | |||
| screenIconPo = new DmScreenIconPo(); | |||
| screenIconPo.setName(screenIconDto.getName()); | |||
| screenIconPo.setResourceId(screenIconDto.getResourceId()); | |||
| screenIconPo.setBroadcastId(screenIconDto.getBroadcastId()); | |||
| dmScreenIconMapper.insert(screenIconPo); | |||
| //遍历菜单并更新icon | |||
| dto.getH5Menus().forEach(item-> { | |||
| List<DmMenuIconPo> screenIconPos = dmMenuIconMapper.selectMenuIconListByMenuId(item.getId()); | |||
| if (screenIconPos != null && screenIconPos.size() > 0) { | |||
| // 删除原有icon | |||
| dmMenuIconMapper.deleteMerge(item.getId()); | |||
| } | |||
| log.info("主界面icon列表:{}",screenIconPos); | |||
| if(item.getDmScreenIconDto() != null && item.getDmScreenIconDto().size() > 0) { | |||
| for (DmScreenIconDto screenIconDto : item.getDmScreenIconDto()) { | |||
| DmScreenIconPo screenIconPo = new DmScreenIconPo(); | |||
| if (screenIconDto.getId() != null && screenIconDto.getId().doubleValue() > 0) { | |||
| // 更新模型-主界面icon关系 | |||
| screenIconPo = dmScreenIconMapper.selectById(screenIconDto.getId()); | |||
| screenIconPo.setName(screenIconDto.getName()); | |||
| screenIconPo.setResourceId(screenIconDto.getResourceId()); | |||
| screenIconPo.setBroadcastId(screenIconDto.getBroadcastId()); | |||
| screenIconPo.setUrl(screenIconDto.getUrl()); | |||
| dmScreenIconMapper.updateById(screenIconPo); | |||
| } else { | |||
| if (screenIconDto.getPos() == null) { | |||
| continue; | |||
| } | |||
| screenIconPo = new DmScreenIconPo(); | |||
| screenIconPo.setName(screenIconDto.getName()); | |||
| screenIconPo.setResourceId(screenIconDto.getResourceId()); | |||
| screenIconPo.setBroadcastId(screenIconDto.getBroadcastId()); | |||
| screenIconPo.setUrl(screenIconDto.getUrl()); | |||
| dmScreenIconMapper.insert(screenIconPo); | |||
| } | |||
| // 新增模型-主界面icon关系 | |||
| DmMenuIconPo iconPo = new DmMenuIconPo(); | |||
| iconPo.setMenuId(item.getId()); | |||
| iconPo.setIconId(screenIconPo.getId()); | |||
| iconPo.setPos(screenIconDto.getPos()); | |||
| dmMenuIconMapper.insertMerge(iconPo); | |||
| } | |||
| // 新增模型-主界面icon关系 | |||
| DmModelIconPo iconPo = new DmModelIconPo(); | |||
| iconPo.setModelId(dto.getId()); | |||
| iconPo.setIconId(screenIconPo.getId()); | |||
| iconPo.setPos(screenIconDto.getPos()); | |||
| dmModelIconMapper.insertMerge(iconPo); | |||
| } | |||
| } | |||
| }); | |||
| return super.update(dto); | |||
| } | |||
| @Override | |||
| public List<DmH5MenuDto> selectH5MenuList(DmH5MenuQuery query) { | |||
| List<DmH5MenuPo> h5MenuPos = h5MenuMapper.selectH5MenuList(); | |||
| List<DmH5MenuDto> results = new ArrayList<>(); | |||
| h5MenuPos.forEach(item -> { | |||
| DmH5MenuDto dto = new DmH5MenuDto(); | |||
| dto.setId(item.getId()); | |||
| dto.setName(item.getName()); | |||
| List<DmMenuIconPo> menuIconPos = dmMenuIconMapper.selectMenuIconListByMenuId(item.getId()); | |||
| if (menuIconPos != null && menuIconPos.size() > 0) { | |||
| List<DmScreenIconDto> screenIconDtos = new ArrayList<>(); | |||
| menuIconPos.forEach(item2 -> { | |||
| DmScreenIconPo screenIconPo = dmScreenIconMapper.selectById(item2.getIconId()); | |||
| DmScreenIconDto screenIconDto = screenIconConverter.mapperDto(screenIconPo); | |||
| screenIconDto.setPos(item2.getPos()); | |||
| screenIconDtos.add(screenIconDto); | |||
| }); | |||
| dto.setDmScreenIconDto(screenIconDtos); | |||
| } | |||
| results.add(dto); | |||
| }); | |||
| return results; | |||
| } | |||
| } | |||
| @@ -1,8 +1,5 @@ | |||
| package com.xueyi.system.digitalmans.manager.impl; | |||
| import com.xueyi.common.core.constant.basic.OperateConstants; | |||
| import com.xueyi.common.web.entity.domain.SlaveRelation; | |||
| import com.xueyi.system.api.digitalmans.domain.merge.DmModelIconMerge; | |||
| import com.xueyi.system.api.digitalmans.domain.po.DmScreenIconPo; | |||
| import com.xueyi.system.api.digitalmans.domain.dto.DmScreenIconDto; | |||
| import com.xueyi.system.digitalmans.domain.query.DmScreenIconQuery; | |||
| @@ -10,14 +7,8 @@ import com.xueyi.system.digitalmans.domain.model.DmScreenIconConverter; | |||
| import com.xueyi.system.digitalmans.mapper.DmScreenIconMapper; | |||
| import com.xueyi.common.web.entity.manager.impl.BaseManagerImpl; | |||
| import com.xueyi.system.digitalmans.manager.IDmScreenIconManager; | |||
| import com.xueyi.system.digitalmans.mapper.merge.DmModelIconMergeMapper; | |||
| import org.springframework.stereotype.Component; | |||
| import java.util.ArrayList; | |||
| import java.util.List; | |||
| import static com.xueyi.system.api.digitalmans.domain.merge.MergeGroup.Icon_DmModelIcon_GROUP; | |||
| /** | |||
| * 数字人主界面图标管理 数据封装层处理 | |||
| * | |||
| @@ -0,0 +1,18 @@ | |||
| package com.xueyi.system.digitalmans.mapper; | |||
| import com.xueyi.common.datasource.annotation.Isolate; | |||
| import com.xueyi.common.datasource.annotation.Master; | |||
| import com.xueyi.system.api.digitalmans.domain.po.DmH5MenuPo; | |||
| import java.util.List; | |||
| /** | |||
| * 数字人主界面图标管理 数据层 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Master | |||
| public interface DmH5MenuMapper { | |||
| List<DmH5MenuPo> selectH5MenuList(); | |||
| } | |||
| @@ -0,0 +1,18 @@ | |||
| package com.xueyi.system.digitalmans.mapper; | |||
| import com.xueyi.common.datasource.annotation.Isolate; | |||
| import com.xueyi.system.api.digitalmans.domain.po.DmH5MenuPo; | |||
| import com.xueyi.system.api.digitalmans.domain.po.DmH5TenantMenuPo; | |||
| import java.util.List; | |||
| /** | |||
| * 数字人主界面图标管理 数据层 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Isolate | |||
| public interface DmH5TenantMenuMapper { | |||
| List<DmH5MenuPo> selectTenantMenuList(); | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package com.xueyi.system.digitalmans.mapper; | |||
| import com.xueyi.common.datasource.annotation.Isolate; | |||
| import com.xueyi.system.api.digitalmans.domain.po.DmMenuIconPo; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import java.util.List; | |||
| /** | |||
| * 数字人主界面图标管理 数据层 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Isolate | |||
| public interface DmMenuIconMapper { | |||
| List<DmMenuIconPo> selectMenuIconListByMenuId(@Param("menuId") Long menuId); | |||
| int insertMerge(DmMenuIconPo menuIconPo); | |||
| int deleteMerge(@Param("menuId")Long menuId); | |||
| } | |||
| @@ -1,23 +0,0 @@ | |||
| package com.xueyi.system.digitalmans.mapper; | |||
| import com.xueyi.common.datasource.annotation.Isolate; | |||
| import com.xueyi.common.web.entity.mapper.BaseMapper; | |||
| import com.xueyi.system.api.digitalmans.domain.dto.DmScreenIconDto; | |||
| import com.xueyi.system.api.digitalmans.domain.po.DmModelIconPo; | |||
| import com.xueyi.system.api.digitalmans.domain.po.DmScreenIconPo; | |||
| import com.xueyi.system.digitalmans.domain.query.DmScreenIconQuery; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import java.util.List; | |||
| /** | |||
| * 数字人主界面图标管理 数据层 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Isolate | |||
| public interface DmModelIconMapper { | |||
| List<DmModelIconPo> selectModelIconListByModelId(@Param("modelId") Long modelId); | |||
| int insertMerge(DmModelIconPo modelIconPo); | |||
| int deleteMerge(DmModelIconPo modelIconPo); | |||
| } | |||
| @@ -2,7 +2,7 @@ package com.xueyi.system.digitalmans.mapper.merge; | |||
| import com.xueyi.common.datasource.annotation.Isolate; | |||
| import com.xueyi.common.web.entity.mapper.BasicMapper; | |||
| import com.xueyi.system.api.digitalmans.domain.merge.DmModelIconMerge; | |||
| import com.xueyi.system.api.digitalmans.domain.merge.DmMenuIconMerge; | |||
| /** | |||
| * 任务访客关联 数据层 | |||
| @@ -10,5 +10,5 @@ import com.xueyi.system.api.digitalmans.domain.merge.DmModelIconMerge; | |||
| * @author xueyi | |||
| */ | |||
| @Isolate | |||
| public interface DmModelIconMergeMapper extends BasicMapper<DmModelIconMerge> { | |||
| public interface DmModelIconMergeMapper extends BasicMapper<DmMenuIconMerge> { | |||
| } | |||
| @@ -1,10 +1,14 @@ | |||
| package com.xueyi.system.digitalmans.service; | |||
| import com.xueyi.system.api.digitalmans.domain.dto.DmH5MenuDto; | |||
| import com.xueyi.system.api.digitalmans.domain.query.DmH5MenuQuery; | |||
| import com.xueyi.system.digitalmans.domain.dto.DmModelUploadDto; | |||
| import com.xueyi.system.digitalmans.domain.query.DmModelQuery; | |||
| import com.xueyi.system.api.digitalmans.domain.dto.DmModelDto; | |||
| import com.xueyi.common.web.entity.service.IBaseService; | |||
| import java.util.List; | |||
| /** | |||
| * 模型管理 服务层 | |||
| * | |||
| @@ -12,4 +16,6 @@ import com.xueyi.common.web.entity.service.IBaseService; | |||
| */ | |||
| public interface IDmModelService extends IBaseService<DmModelQuery, DmModelDto> { | |||
| int uploadResource(DmModelUploadDto dto); | |||
| List<DmH5MenuDto> selectH5MenuList(DmH5MenuQuery query); | |||
| } | |||
| @@ -1,6 +1,8 @@ | |||
| package com.xueyi.system.digitalmans.service.impl; | |||
| import com.xueyi.system.api.digitalmans.domain.dto.DmH5MenuDto; | |||
| import com.xueyi.system.api.digitalmans.domain.dto.DmModelDto; | |||
| import com.xueyi.system.api.digitalmans.domain.query.DmH5MenuQuery; | |||
| import com.xueyi.system.digitalmans.domain.dto.DmModelUploadDto; | |||
| import com.xueyi.system.digitalmans.domain.query.DmModelQuery; | |||
| import com.xueyi.system.digitalmans.service.IDmModelService; | |||
| @@ -41,4 +43,9 @@ public class DmModelServiceImpl extends BaseServiceImpl<DmModelQuery, DmModelDto | |||
| public int uploadResource(DmModelUploadDto dto) { | |||
| return modelManager.uploadResourceByResourceId(dto); | |||
| } | |||
| @Override | |||
| public List<DmH5MenuDto> selectH5MenuList(DmH5MenuQuery query) { | |||
| return baseManager.selectH5MenuList(query); | |||
| } | |||
| } | |||
| @@ -0,0 +1,24 @@ | |||
| <?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.xueyi.system.digitalmans.mapper.DmH5MenuMapper"> | |||
| <resultMap type="DmH5TenantMenuPo" id="DmH5TenantMenuPoResult"> | |||
| <result property="menuId" column="menu_id" /> | |||
| <result property="tenantId" column="tenant_id" /> | |||
| </resultMap> | |||
| <resultMap type="DmH5MenuPo" id="DmH5MenuPoResult"> | |||
| <result property="menuId" column="menu_id" /> | |||
| <result property="tenantId" column="tenant_id" /> | |||
| </resultMap> | |||
| <select id="selectH5MenuList" resultMap="DmH5MenuPoResult"> | |||
| select m.id, m.title from dm_h5_menu as m | |||
| order by m.sort | |||
| </select> | |||
| </mapper> | |||
| @@ -0,0 +1,25 @@ | |||
| <?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.xueyi.system.digitalmans.mapper.DmH5TenantMenuMapper"> | |||
| <resultMap type="DmH5TenantMenuPo" id="DmH5TenantMenuPoResult"> | |||
| <result property="menuId" column="menu_id" /> | |||
| <result property="tenantId" column="tenant_id" /> | |||
| </resultMap> | |||
| <resultMap type="DmH5MenuPo" id="DmH5MenuPoResult"> | |||
| <result property="menuId" column="menu_id" /> | |||
| <result property="tenantId" column="tenant_id" /> | |||
| </resultMap> | |||
| <select id="selectTenantMenuList" resultMap="DmH5MenuPoResult"> | |||
| select m.id, m.title from dm_h5_tenant_menu_merge as s | |||
| where s.tenant_id = #{tenantId} | |||
| order by m.sort | |||
| </select> | |||
| </mapper> | |||
| @@ -0,0 +1,27 @@ | |||
| <?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.xueyi.system.digitalmans.mapper.DmMenuIconMapper"> | |||
| <resultMap type="DmMenuIconPo" id="DmMenuIconResult"> | |||
| <result property="menuId" column="menu_id" /> | |||
| <result property="iconId" column="icon_id" /> | |||
| <result property="pos" column="pos" /> | |||
| </resultMap> | |||
| <select id="selectMenuIconListByMenuId" resultMap="DmMenuIconResult"> | |||
| select s.menu_id, s.icon_id,s.pos from dm_menu_icon_merge as s | |||
| where menu_id = #{menuId} | |||
| </select> | |||
| <insert id="insertMerge" parameterType="DmMenuIconPo" > | |||
| insert into dm_menu_icon_merge(menu_id,icon_id,pos) values(#{menuId},#{iconId},#{pos}) | |||
| </insert> | |||
| <delete id="deleteMerge" > | |||
| delete from dm_menu_icon_merge where menu_id = #{menuId} | |||
| </delete> | |||
| </mapper> | |||
| @@ -1,27 +0,0 @@ | |||
| <?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.xueyi.system.digitalmans.mapper.DmModelIconMapper"> | |||
| <resultMap type="DmModelIconPo" id="DmModelIconResult"> | |||
| <result property="modelId" column="model_id" /> | |||
| <result property="iconId" column="icon_id" /> | |||
| <result property="pos" column="pos" /> | |||
| </resultMap> | |||
| <select id="selectModelIconListByModelId" resultMap="DmModelIconResult"> | |||
| select s.model_id, s.icon_id,s.pos from dm_model_icon_merge as s | |||
| where model_id = #{modelId} | |||
| </select> | |||
| <insert id="insertMerge" parameterType="DmModelIconPo" > | |||
| insert into dm_model_icon_merge(model_id,icon_id,pos) values(#{modelId},#{iconId},#{pos}) | |||
| </insert> | |||
| <delete id="deleteMerge" parameterType="DmModelIconPo" > | |||
| delete from dm_model_icon_merge where model_id = #{modelId} | |||
| </delete> | |||
| </mapper> | |||
| @@ -1,6 +0,0 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <module version="4"> | |||
| <component name="SonarLintModuleSettings"> | |||
| <option name="uniqueId" value="a231fd41-2b5f-4b07-b1fe-c41fe53d7a18" /> | |||
| </component> | |||
| </module> | |||