From 078fa26c7f7945d14d808f685d418972d64e29f8 Mon Sep 17 00:00:00 2001 From: Diyu0904 <1819728964@qq.com> Date: Tue, 4 Mar 2025 18:43:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E5=90=8D=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resource/MallProductController.java | 12 ++++++++++++ .../com/mcwl/resource/service/ModelService.java | 3 +++ .../resource/service/impl/ModelServiceImpl.java | 16 ++++++++++++++++ 3 files changed, 31 insertions(+) diff --git a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/MallProductController.java b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/MallProductController.java index e36ca0f..a7f3bee 100644 --- a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/MallProductController.java +++ b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/MallProductController.java @@ -238,6 +238,18 @@ public class MallProductController extends BaseController { return R.ok(modelProductPage); } + /** + * 校验模型名字是否唯一 + * @param name + * @return + */ + @ApiOperation(value = "校验模型名字是否唯一") + @GetMapping("/selectModelByName") + public R selectModelByName(@RequestParam String name){ + + return modelService.selectModelByName(name); + } + @ApiOperation(value = "个人中心更改背景") @GetMapping("/updateBackgroundImg") public R updateBackgroundImg(@RequestParam Long id,String path){ diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelService.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelService.java index 1fa207c..e406aa6 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelService.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelService.java @@ -43,4 +43,7 @@ public interface ModelService extends IService { PageInfo modelSquare(PageVo pageVo); + + R selectModelByName(String name); + } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelServiceImpl.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelServiceImpl.java index bca09c9..cc24a36 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelServiceImpl.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelServiceImpl.java @@ -114,6 +114,22 @@ public class ModelServiceImpl extends ServiceImpl impl return new PageInfo(responseModelProductList); } + @Override + public R selectModelByName(String name) { + + //根绝名字查找数据 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(ModelProduct::getModelName,name); + queryWrapper.eq(ModelProduct::getDelFlag,0); + + List modelProducts = postMapper.selectList(queryWrapper); + + if (modelProducts.size()>0){ + return R.ok(1); + } + return R.ok(0); + } + @Override public Page selectByUserId(MallProductVo mallProductVo) { From adf6cc178d93bb48f2925ac3e258b083e157c236 Mon Sep 17 00:00:00 2001 From: Diyu0904 <1819728964@qq.com> Date: Wed, 5 Mar 2025 13:09:36 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81=E4=B8=8B=E8=BD=BD=E6=96=87=E4=BB=B6=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=A8=A1=E5=9E=8B=E4=B8=8B=E8=BD=BD=E6=96=87=E4=BB=B6?= =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=E4=BF=AE=E6=94=B9=E9=82=80=E8=AF=B7?= =?UTF-8?q?=E7=A0=81=20=E6=96=B0=E5=A2=9E=E6=A8=A1=E5=9E=8B=E5=90=8D?= =?UTF-8?q?=E5=AD=97=E5=94=AF=E4=B8=80=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resource/ModelVersionController.java | 13 ++- .../resource/WorkFlowController.java | 3 +- .../resource/WorkFlowVersionController.java | 15 ++- .../mcwl/memberCenter/MemberCenterTest.java | 14 --- .../common/core/domain/entity/SysUser.java | 106 +++++++++++------- .../mcwl/resource/domain/ModelVersion.java | 6 + .../mcwl/resource/domain/WorkFlowVersion.java | 6 + .../resource/service/ModelVersionService.java | 2 +- .../resource/service/WorkFlowService.java | 1 + .../service/WorkFlowVersionService.java | 3 +- .../service/impl/ModelServiceImpl.java | 4 +- .../service/impl/ModelVersionServiceImpl.java | 18 ++- .../service/impl/WorkFlowServiceImpl.java | 1 + .../impl/WorkFlowVersionServiceImpl.java | 23 +++- .../mapper/resource/ModelVersionMapper.xml | 4 +- .../mapper/resource/WorkFlowVersionMapper.xml | 4 +- .../java/com/mcwl/system/init/DictInit.java | 1 - .../service/impl/SysUserServiceImpl.java | 10 +- .../resources/mapper/system/SysUserMapper.xml | 6 +- 19 files changed, 168 insertions(+), 72 deletions(-) delete mode 100644 mcwl-admin/src/test/java/com/mcwl/memberCenter/MemberCenterTest.java diff --git a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/ModelVersionController.java b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/ModelVersionController.java index f20fb4c..abc93e4 100644 --- a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/ModelVersionController.java +++ b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/ModelVersionController.java @@ -1,12 +1,12 @@ package com.mcwl.web.controller.resource; import com.mcwl.common.core.controller.BaseController; -import com.mcwl.common.core.domain.AjaxResult; import com.mcwl.common.core.domain.R; import com.mcwl.common.core.page.TableDataInfo; import com.mcwl.resource.domain.ModelVersion; import com.mcwl.resource.service.ModelVersionService; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -91,5 +91,16 @@ public class ModelVersionController extends BaseController { return R.ok(); } + /** + * 下载模型文件 + * @param id + * @return + */ + @ApiModelProperty(value = "下载模型文件") + @GetMapping("/modelFileDownload") + public R modelFileDownload(@RequestParam Long id){ + + return modelVersionService.modelFileDownload(id); + } } diff --git a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/WorkFlowController.java b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/WorkFlowController.java index 7ec29b5..6e14f24 100644 --- a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/WorkFlowController.java +++ b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/WorkFlowController.java @@ -6,8 +6,8 @@ import com.mcwl.common.core.controller.BaseController; import com.mcwl.common.core.domain.R; import com.mcwl.resource.domain.WorkFlow; import com.mcwl.resource.domain.dto.AddRequestWorkFlow; -import com.mcwl.resource.domain.response.ResponseWorkFlow; import com.mcwl.resource.domain.request.RequestWorkFlow; +import com.mcwl.resource.domain.response.ResponseWorkFlow; import com.mcwl.resource.domain.vo.PageVo; import com.mcwl.resource.service.WorkFlowService; import io.swagger.annotations.Api; @@ -181,4 +181,5 @@ public class WorkFlowController extends BaseController { + } diff --git a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/WorkFlowVersionController.java b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/WorkFlowVersionController.java index c346313..84aba8e 100644 --- a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/WorkFlowVersionController.java +++ b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/WorkFlowVersionController.java @@ -1,11 +1,10 @@ package com.mcwl.web.controller.resource; -import com.mcwl.common.core.domain.AjaxResult; import com.mcwl.common.core.domain.R; import com.mcwl.resource.domain.WorkFlowVersion; import com.mcwl.resource.service.WorkFlowVersionService; -import com.mcwl.resource.service.impl.WorkFlowVersionServiceImpl; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -43,4 +42,16 @@ public class WorkFlowVersionController { return workFlowVersionService.selectVersionByWorkId(workId); } + /** + * 下载工作流 + * @param id + * @return + */ + @ApiModelProperty("下载工作流") + @GetMapping("/workFlowFileDownload") + public R workFlowFileDownload(@RequestParam Long id){ + + return workFlowVersionService.workFlowFileDownload(id); + } + } diff --git a/mcwl-admin/src/test/java/com/mcwl/memberCenter/MemberCenterTest.java b/mcwl-admin/src/test/java/com/mcwl/memberCenter/MemberCenterTest.java deleted file mode 100644 index 2f7fdea..0000000 --- a/mcwl-admin/src/test/java/com/mcwl/memberCenter/MemberCenterTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.mcwl.memberCenter; - -import org.junit.Test; - - -public class MemberCenterTest { - - @Test - public void aaa() { - String s = "1,2,3,4,"; - System.out.println(s.split(",")); - } - -} diff --git a/mcwl-common/src/main/java/com/mcwl/common/core/domain/entity/SysUser.java b/mcwl-common/src/main/java/com/mcwl/common/core/domain/entity/SysUser.java index 373b3f5..012ca00 100644 --- a/mcwl-common/src/main/java/com/mcwl/common/core/domain/entity/SysUser.java +++ b/mcwl-common/src/main/java/com/mcwl/common/core/domain/entity/SysUser.java @@ -130,44 +130,21 @@ public class SysUser extends BaseEntity */ private String backgroundImg; + /** + * 邀请码 + */ + private String invitationCode; + + /** + * 邀请人名字 + */ + private String invitationName; public SysUser() { } - @Override - public String toString() { - return "SysUser{" + - "userId=" + userId + - ", deptId=" + deptId + - ", userName='" + userName + '\'' + - ", nickName='" + nickName + '\'' + - ", email='" + email + '\'' + - ", phonenumber='" + phonenumber + '\'' + - ", sex='" + sex + '\'' + - ", avatar='" + avatar + '\'' + - ", password='" + password + '\'' + - ", status='" + status + '\'' + - ", delFlag='" + delFlag + '\'' + - ", loginIp='" + loginIp + '\'' + - ", loginDate=" + loginDate + - ", dept=" + dept + - ", roles=" + roles + - ", roleIds=" + Arrays.toString(roleIds) + - ", postIds=" + Arrays.toString(postIds) + - ", roleId=" + roleId + - ", brief='" + brief + '\'' + - ", name='" + name + '\'' + - ", idCard='" + idCard + '\'' + - ", inviterUserId=" + inviterUserId + - ", freePoints=" + freePoints + - ", wallet=" + wallet + - ", isAttention=" + isAttention + - ", backgroundImg='" + backgroundImg + '\'' + - '}'; - } - public String getBackgroundImg() { return backgroundImg; } @@ -223,6 +200,7 @@ public class SysUser extends BaseEntity this.nickName = nickName; } + @Xss(message = "用户账号不能包含脚本字符") @NotBlank(message = "用户账号不能为空") @Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符") @@ -248,6 +226,14 @@ public class SysUser extends BaseEntity this.email = email; } + public Long getInviterUserId() { + return inviterUserId; + } + + public void setInviterUserId(Long inviterUserId) { + this.inviterUserId = inviterUserId; + } + @Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符") public String getPhonenumber() { @@ -403,13 +389,7 @@ public class SysUser extends BaseEntity this.brief = brief; } - public Long getInviterUserId() { - return inviterUserId; - } - public void setInviterUserId(Long inviterUserId) { - this.inviterUserId = inviterUserId; - } public Double getFreePoints() { return freePoints; @@ -434,4 +414,54 @@ public class SysUser extends BaseEntity public void setAttention(Boolean attention) { isAttention = attention; } + + public String getInvitationCode() { + return invitationCode; + } + + public void setInvitationCode(String invitationCode) { + this.invitationCode = invitationCode; + } + + @Override + public String toString() { + return "SysUser{" + + "userId=" + userId + + ", deptId=" + deptId + + ", userName='" + userName + '\'' + + ", nickName='" + nickName + '\'' + + ", email='" + email + '\'' + + ", phonenumber='" + phonenumber + '\'' + + ", sex='" + sex + '\'' + + ", avatar='" + avatar + '\'' + + ", password='" + password + '\'' + + ", status='" + status + '\'' + + ", delFlag='" + delFlag + '\'' + + ", loginIp='" + loginIp + '\'' + + ", loginDate=" + loginDate + + ", dept=" + dept + + ", roles=" + roles + + ", roleIds=" + Arrays.toString(roleIds) + + ", postIds=" + Arrays.toString(postIds) + + ", roleId=" + roleId + + ", brief='" + brief + '\'' + + ", name='" + name + '\'' + + ", idCard='" + idCard + '\'' + + ", inviterUserId=" + inviterUserId + + ", freePoints=" + freePoints + + ", wallet=" + wallet + + ", isAttention=" + isAttention + + ", backgroundImg='" + backgroundImg + '\'' + + ", invitationCode='" + invitationCode + '\'' + + ", invitationName='" + invitationName + '\'' + + '}'; + } + + public String getInvitationName() { + return invitationName; + } + + public void setInvitationName(String invitationName) { + this.invitationName = invitationName; + } } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/domain/ModelVersion.java b/mcwl-resource/src/main/java/com/mcwl/resource/domain/ModelVersion.java index d2690a0..f35041a 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/domain/ModelVersion.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/domain/ModelVersion.java @@ -183,6 +183,12 @@ public class ModelVersion extends BaseEntity { @ApiModelProperty(value = "删除标志(0代表存在 2代表删除)") private String delFlag; + /** + * 文件大小 + */ + @ApiModelProperty(value = "文件大小") + private String fileSize; + @ApiModelProperty(value = "高清修复列表") @TableField(exist = false) diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/domain/WorkFlowVersion.java b/mcwl-resource/src/main/java/com/mcwl/resource/domain/WorkFlowVersion.java index 8b63f2c..5d148b5 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/domain/WorkFlowVersion.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/domain/WorkFlowVersion.java @@ -91,4 +91,10 @@ public class WorkFlowVersion { */ @ApiModelProperty(value = "文件的key") private String objectKey; + + /** + * 文件大小 + */ + @ApiModelProperty(value = "文件大小") + private String fileSize; } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelVersionService.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelVersionService.java index bb47c35..96a4bca 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelVersionService.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelVersionService.java @@ -1,7 +1,6 @@ package com.mcwl.resource.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.mcwl.common.core.domain.AjaxResult; import com.mcwl.common.core.domain.R; import com.mcwl.resource.domain.ModelVersion; @@ -24,4 +23,5 @@ public interface ModelVersionService extends IService { List finbyid(Long id); + R modelFileDownload(Long id); } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/WorkFlowService.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/WorkFlowService.java index 8df67ca..9cfabbe 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/WorkFlowService.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/WorkFlowService.java @@ -45,4 +45,5 @@ public interface WorkFlowService extends IService { R selectWorkFlowVersionById(Long id); PageInfo workFlowList(PageVo pageVo); + } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/WorkFlowVersionService.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/WorkFlowVersionService.java index 49fb0ac..034e19f 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/WorkFlowVersionService.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/WorkFlowVersionService.java @@ -1,6 +1,5 @@ package com.mcwl.resource.service; -import com.mcwl.common.core.domain.AjaxResult; import com.mcwl.common.core.domain.R; import com.mcwl.resource.domain.WorkFlowVersion; @@ -15,4 +14,6 @@ import java.util.List; public interface WorkFlowVersionService { R> selectVersionByWorkId(Long workId); + + R workFlowFileDownload(Long id); } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelServiceImpl.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelServiceImpl.java index cc24a36..560e649 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelServiceImpl.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelServiceImpl.java @@ -125,9 +125,9 @@ public class ModelServiceImpl extends ServiceImpl impl List modelProducts = postMapper.selectList(queryWrapper); if (modelProducts.size()>0){ - return R.ok(1); + return R.ok(0); } - return R.ok(0); + return R.ok(1); } @Override diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelVersionServiceImpl.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelVersionServiceImpl.java index e740447..78b4731 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelVersionServiceImpl.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelVersionServiceImpl.java @@ -3,7 +3,6 @@ package com.mcwl.resource.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.mcwl.common.constant.DictConstants; -import com.mcwl.common.core.domain.AjaxResult; import com.mcwl.common.core.domain.R; import com.mcwl.common.utils.StringUtils; import com.mcwl.resource.domain.ModelVersion; @@ -88,12 +87,23 @@ public class ModelVersionServiceImpl extends ServiceImpl< ModelVersionMapper,Mo List modelVersions = baseMapper.selectList(modelVersionLambdaQueryWrapper); - for (ModelVersion modelVersion : modelVersions) { - - } +// for (ModelVersion modelVersion : modelVersions) { +// +// } return modelVersions; } + @Override + public R modelFileDownload(Long id) { + + ModelVersion modelVersion = modelVersionMapper.selectById(id); + if (modelVersion.getAllowDownloadImage().equals(0)){ + return R.fail("此文件不可下载"); + } + + return R.ok(); + } + } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/WorkFlowServiceImpl.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/WorkFlowServiceImpl.java index 726cafa..a02931c 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/WorkFlowServiceImpl.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/WorkFlowServiceImpl.java @@ -501,4 +501,5 @@ public class WorkFlowServiceImpl extends ServiceImpl i } + } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/WorkFlowVersionServiceImpl.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/WorkFlowVersionServiceImpl.java index 42123c9..8adfd5b 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/WorkFlowVersionServiceImpl.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/WorkFlowVersionServiceImpl.java @@ -1,9 +1,10 @@ package com.mcwl.resource.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.mcwl.common.core.domain.AjaxResult; import com.mcwl.common.core.domain.R; +import com.mcwl.resource.domain.WorkFlow; import com.mcwl.resource.domain.WorkFlowVersion; +import com.mcwl.resource.mapper.WorkFlowMapper; import com.mcwl.resource.mapper.WorkFlowVersionMapper; import com.mcwl.resource.service.WorkFlowVersionService; import org.springframework.beans.factory.annotation.Autowired; @@ -24,6 +25,9 @@ public class WorkFlowVersionServiceImpl implements WorkFlowVersionService { @Autowired private WorkFlowVersionMapper workFlowVersionMapper; + @Autowired + private WorkFlowMapper workFlowMapper; + @Override public R> selectVersionByWorkId(Long workId) { @@ -36,4 +40,21 @@ public class WorkFlowVersionServiceImpl implements WorkFlowVersionService { return R.ok(workFlowVersions); } + + @Override + public R workFlowFileDownload(Long id) { + + //查找数据 + WorkFlowVersion workFlowVersion = workFlowVersionMapper.selectById(id); + if (workFlowVersion == null){ + return R.fail("文件不存在"); + } + + WorkFlow workFlow = workFlowMapper.selectById(workFlowVersion.getWorkFlowId()); + if (workFlow.getDownload().equals(1)){ + return R.fail("该文件不允许下载"); + } + + return R.ok(workFlowVersion.getFilePath()); + } } diff --git a/mcwl-resource/src/main/resources/mapper/resource/ModelVersionMapper.xml b/mcwl-resource/src/main/resources/mapper/resource/ModelVersionMapper.xml index a54fc80..c499ea9 100644 --- a/mcwl-resource/src/main/resources/mapper/resource/ModelVersionMapper.xml +++ b/mcwl-resource/src/main/resources/mapper/resource/ModelVersionMapper.xml @@ -8,7 +8,7 @@ model_id,version_name,version_description,model_version_type, file_path,file_name, trigger_words, sampling, high, vae, cfg, is_free, is_public, is_encrypt, is_online_use, allow_download_image, allow_software_use, allow_fusion, allow_commercial_use, allow_usage, - is_exclusive_model, sample_image_paths, hide_image_gen_info, del_flag + is_exclusive_model, sample_image_paths, hide_image_gen_info, del_flag,file_size ) VALUES ( @@ -17,7 +17,7 @@ #{isFree}, #{isPublic}, #{isEncrypt}, #{isOnlineUse}, #{allowDownloadImage}, #{allowSoftwareUse}, #{allowFusion}, #{allowCommercialUse}, #{allowUsage}, #{isExclusiveModel}, - #{sampleImagePaths}, #{hideImageGenInfo},'0' + #{sampleImagePaths}, #{hideImageGenInfo},'0',#{fileSize} ) diff --git a/mcwl-resource/src/main/resources/mapper/resource/WorkFlowVersionMapper.xml b/mcwl-resource/src/main/resources/mapper/resource/WorkFlowVersionMapper.xml index 8dd7e2b..ad16fe9 100644 --- a/mcwl-resource/src/main/resources/mapper/resource/WorkFlowVersionMapper.xml +++ b/mcwl-resource/src/main/resources/mapper/resource/WorkFlowVersionMapper.xml @@ -7,11 +7,11 @@ INSERT INTO work_flow_version (version_name,version_description,file_path,image_paths,hide_gen_info,del_flag, - work_flow_id,file_name) + work_flow_id,file_name,file_size) VALUES (#{item.versionName}, #{item.versionDescription}, #{item.filePath}, #{item.imagePaths},#{item.hideGenInfo}, - 0,#{workFlow.id},#{item.fileName}) + 0,#{workFlow.id},#{item.fileName},#{item.fileSize}) diff --git a/mcwl-system/src/main/java/com/mcwl/system/init/DictInit.java b/mcwl-system/src/main/java/com/mcwl/system/init/DictInit.java index 3646131..1caedcb 100644 --- a/mcwl-system/src/main/java/com/mcwl/system/init/DictInit.java +++ b/mcwl-system/src/main/java/com/mcwl/system/init/DictInit.java @@ -39,7 +39,6 @@ public class DictInit implements ApplicationRunner { // 查询所有字典数据 查询所有状态为启用的正常的,sql太简单就不写了 List allDicts = sysDictDataMapper.selectDictDataList(dictData); - log.info("获取到的字典值:{}",allDicts); // 根据 dictType 分组 Map> groupedByType = allDicts.stream() diff --git a/mcwl-system/src/main/java/com/mcwl/system/service/impl/SysUserServiceImpl.java b/mcwl-system/src/main/java/com/mcwl/system/service/impl/SysUserServiceImpl.java index 8b60c23..4331292 100644 --- a/mcwl-system/src/main/java/com/mcwl/system/service/impl/SysUserServiceImpl.java +++ b/mcwl-system/src/main/java/com/mcwl/system/service/impl/SysUserServiceImpl.java @@ -10,6 +10,7 @@ import com.mcwl.common.core.domain.entity.SysUser; import com.mcwl.common.core.redis.RedisCache; import com.mcwl.common.exception.ServiceException; import com.mcwl.common.utils.SecurityUtils; +import com.mcwl.common.utils.ShareCodeUtils; import com.mcwl.common.utils.StringUtils; import com.mcwl.common.utils.VerifyCard; import com.mcwl.common.utils.bean.BeanValidators; @@ -601,13 +602,20 @@ public class SysUserServiceImpl implements ISysUserService @Override public void updateUserInfo(SysUser sysUser) { + if (sysUser.getInvitationCode() != null){ + Long aLong = ShareCodeUtils.codeToId(sysUser.getInvitationCode()); + sysUser.setInviterUserId(aLong); + } userMapper.updateUserInfo(sysUser); } @Override public SysUser selectUserInfoById(Long userId) { + SysUser sysUser = userMapper.selectUserInfoById(userId); - return userMapper.selectUserInfoById(userId); + SysUser sysUser1 = selectUserById(sysUser.getInviterUserId()); + sysUser.setInvitationName(sysUser1.getNickName()); + return sysUser; } @Override diff --git a/mcwl-system/src/main/resources/mapper/system/SysUserMapper.xml b/mcwl-system/src/main/resources/mapper/system/SysUserMapper.xml index e393b03..b2f368e 100644 --- a/mcwl-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/mcwl-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -151,7 +151,7 @@