parent
078fa26c7f
commit
adf6cc178d
|
@ -1,12 +1,12 @@
|
||||||
package com.mcwl.web.controller.resource;
|
package com.mcwl.web.controller.resource;
|
||||||
|
|
||||||
import com.mcwl.common.core.controller.BaseController;
|
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.domain.R;
|
||||||
import com.mcwl.common.core.page.TableDataInfo;
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
import com.mcwl.resource.domain.ModelVersion;
|
import com.mcwl.resource.domain.ModelVersion;
|
||||||
import com.mcwl.resource.service.ModelVersionService;
|
import com.mcwl.resource.service.ModelVersionService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -91,5 +91,16 @@ public class ModelVersionController extends BaseController {
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载模型文件
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "下载模型文件")
|
||||||
|
@GetMapping("/modelFileDownload")
|
||||||
|
public R modelFileDownload(@RequestParam Long id){
|
||||||
|
|
||||||
|
return modelVersionService.modelFileDownload(id);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,8 @@ import com.mcwl.common.core.controller.BaseController;
|
||||||
import com.mcwl.common.core.domain.R;
|
import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.resource.domain.WorkFlow;
|
import com.mcwl.resource.domain.WorkFlow;
|
||||||
import com.mcwl.resource.domain.dto.AddRequestWorkFlow;
|
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.request.RequestWorkFlow;
|
||||||
|
import com.mcwl.resource.domain.response.ResponseWorkFlow;
|
||||||
import com.mcwl.resource.domain.vo.PageVo;
|
import com.mcwl.resource.domain.vo.PageVo;
|
||||||
import com.mcwl.resource.service.WorkFlowService;
|
import com.mcwl.resource.service.WorkFlowService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
@ -181,4 +181,5 @@ public class WorkFlowController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
package com.mcwl.web.controller.resource;
|
package com.mcwl.web.controller.resource;
|
||||||
|
|
||||||
import com.mcwl.common.core.domain.AjaxResult;
|
|
||||||
import com.mcwl.common.core.domain.R;
|
import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.resource.domain.WorkFlowVersion;
|
import com.mcwl.resource.domain.WorkFlowVersion;
|
||||||
import com.mcwl.resource.service.WorkFlowVersionService;
|
import com.mcwl.resource.service.WorkFlowVersionService;
|
||||||
import com.mcwl.resource.service.impl.WorkFlowVersionServiceImpl;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
@ -43,4 +42,16 @@ public class WorkFlowVersionController {
|
||||||
return workFlowVersionService.selectVersionByWorkId(workId);
|
return workFlowVersionService.selectVersionByWorkId(workId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载工作流
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("下载工作流")
|
||||||
|
@GetMapping("/workFlowFileDownload")
|
||||||
|
public R workFlowFileDownload(@RequestParam Long id){
|
||||||
|
|
||||||
|
return workFlowVersionService.workFlowFileDownload(id);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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(","));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -130,44 +130,21 @@ public class SysUser extends BaseEntity
|
||||||
*/
|
*/
|
||||||
private String backgroundImg;
|
private String backgroundImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邀请码
|
||||||
|
*/
|
||||||
|
private String invitationCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邀请人名字
|
||||||
|
*/
|
||||||
|
private String invitationName;
|
||||||
|
|
||||||
public SysUser()
|
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() {
|
public String getBackgroundImg() {
|
||||||
return backgroundImg;
|
return backgroundImg;
|
||||||
}
|
}
|
||||||
|
@ -223,6 +200,7 @@ public class SysUser extends BaseEntity
|
||||||
this.nickName = nickName;
|
this.nickName = nickName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Xss(message = "用户账号不能包含脚本字符")
|
@Xss(message = "用户账号不能包含脚本字符")
|
||||||
@NotBlank(message = "用户账号不能为空")
|
@NotBlank(message = "用户账号不能为空")
|
||||||
@Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符")
|
@Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符")
|
||||||
|
@ -248,6 +226,14 @@ public class SysUser extends BaseEntity
|
||||||
this.email = email;
|
this.email = email;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long getInviterUserId() {
|
||||||
|
return inviterUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInviterUserId(Long inviterUserId) {
|
||||||
|
this.inviterUserId = inviterUserId;
|
||||||
|
}
|
||||||
|
|
||||||
@Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符")
|
@Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符")
|
||||||
public String getPhonenumber()
|
public String getPhonenumber()
|
||||||
{
|
{
|
||||||
|
@ -403,13 +389,7 @@ public class SysUser extends BaseEntity
|
||||||
this.brief = brief;
|
this.brief = brief;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getInviterUserId() {
|
|
||||||
return inviterUserId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInviterUserId(Long inviterUserId) {
|
|
||||||
this.inviterUserId = inviterUserId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Double getFreePoints() {
|
public Double getFreePoints() {
|
||||||
return freePoints;
|
return freePoints;
|
||||||
|
@ -434,4 +414,54 @@ public class SysUser extends BaseEntity
|
||||||
public void setAttention(Boolean attention) {
|
public void setAttention(Boolean attention) {
|
||||||
isAttention = 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,6 +183,12 @@ public class ModelVersion extends BaseEntity {
|
||||||
@ApiModelProperty(value = "删除标志(0代表存在 2代表删除)")
|
@ApiModelProperty(value = "删除标志(0代表存在 2代表删除)")
|
||||||
private String delFlag;
|
private String delFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件大小
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "文件大小")
|
||||||
|
private String fileSize;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "高清修复列表")
|
@ApiModelProperty(value = "高清修复列表")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
|
|
@ -91,4 +91,10 @@ public class WorkFlowVersion {
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "文件的key")
|
@ApiModelProperty(value = "文件的key")
|
||||||
private String objectKey;
|
private String objectKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件大小
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "文件大小")
|
||||||
|
private String fileSize;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.mcwl.resource.service;
|
package com.mcwl.resource.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.mcwl.common.core.domain.AjaxResult;
|
|
||||||
import com.mcwl.common.core.domain.R;
|
import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.resource.domain.ModelVersion;
|
import com.mcwl.resource.domain.ModelVersion;
|
||||||
|
|
||||||
|
@ -24,4 +23,5 @@ public interface ModelVersionService extends IService<ModelVersion> {
|
||||||
|
|
||||||
List<ModelVersion> finbyid(Long id);
|
List<ModelVersion> finbyid(Long id);
|
||||||
|
|
||||||
|
R modelFileDownload(Long id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,4 +45,5 @@ public interface WorkFlowService extends IService<WorkFlow> {
|
||||||
R<RequestWorkFlow> selectWorkFlowVersionById(Long id);
|
R<RequestWorkFlow> selectWorkFlowVersionById(Long id);
|
||||||
|
|
||||||
PageInfo<ResponseWorkFlow> workFlowList(PageVo pageVo);
|
PageInfo<ResponseWorkFlow> workFlowList(PageVo pageVo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.mcwl.resource.service;
|
package com.mcwl.resource.service;
|
||||||
|
|
||||||
import com.mcwl.common.core.domain.AjaxResult;
|
|
||||||
import com.mcwl.common.core.domain.R;
|
import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.resource.domain.WorkFlowVersion;
|
import com.mcwl.resource.domain.WorkFlowVersion;
|
||||||
|
|
||||||
|
@ -15,4 +14,6 @@ import java.util.List;
|
||||||
|
|
||||||
public interface WorkFlowVersionService {
|
public interface WorkFlowVersionService {
|
||||||
R<List<WorkFlowVersion>> selectVersionByWorkId(Long workId);
|
R<List<WorkFlowVersion>> selectVersionByWorkId(Long workId);
|
||||||
|
|
||||||
|
R workFlowFileDownload(Long id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,9 +125,9 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
|
||||||
List<ModelProduct> modelProducts = postMapper.selectList(queryWrapper);
|
List<ModelProduct> modelProducts = postMapper.selectList(queryWrapper);
|
||||||
|
|
||||||
if (modelProducts.size()>0){
|
if (modelProducts.size()>0){
|
||||||
return R.ok(1);
|
return R.ok(0);
|
||||||
}
|
}
|
||||||
return R.ok(0);
|
return R.ok(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -3,7 +3,6 @@ package com.mcwl.resource.service.impl;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.mcwl.common.constant.DictConstants;
|
import com.mcwl.common.constant.DictConstants;
|
||||||
import com.mcwl.common.core.domain.AjaxResult;
|
|
||||||
import com.mcwl.common.core.domain.R;
|
import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.common.utils.StringUtils;
|
import com.mcwl.common.utils.StringUtils;
|
||||||
import com.mcwl.resource.domain.ModelVersion;
|
import com.mcwl.resource.domain.ModelVersion;
|
||||||
|
@ -88,12 +87,23 @@ public class ModelVersionServiceImpl extends ServiceImpl< ModelVersionMapper,Mo
|
||||||
|
|
||||||
List<ModelVersion> modelVersions = baseMapper.selectList(modelVersionLambdaQueryWrapper);
|
List<ModelVersion> modelVersions = baseMapper.selectList(modelVersionLambdaQueryWrapper);
|
||||||
|
|
||||||
for (ModelVersion modelVersion : modelVersions) {
|
// for (ModelVersion modelVersion : modelVersions) {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
|
||||||
return 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();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -501,4 +501,5 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package com.mcwl.resource.service.impl;
|
package com.mcwl.resource.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
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.common.core.domain.R;
|
||||||
|
import com.mcwl.resource.domain.WorkFlow;
|
||||||
import com.mcwl.resource.domain.WorkFlowVersion;
|
import com.mcwl.resource.domain.WorkFlowVersion;
|
||||||
|
import com.mcwl.resource.mapper.WorkFlowMapper;
|
||||||
import com.mcwl.resource.mapper.WorkFlowVersionMapper;
|
import com.mcwl.resource.mapper.WorkFlowVersionMapper;
|
||||||
import com.mcwl.resource.service.WorkFlowVersionService;
|
import com.mcwl.resource.service.WorkFlowVersionService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -24,6 +25,9 @@ public class WorkFlowVersionServiceImpl implements WorkFlowVersionService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private WorkFlowVersionMapper workFlowVersionMapper;
|
private WorkFlowVersionMapper workFlowVersionMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowMapper workFlowMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R<List<WorkFlowVersion>> selectVersionByWorkId(Long workId) {
|
public R<List<WorkFlowVersion>> selectVersionByWorkId(Long workId) {
|
||||||
|
|
||||||
|
@ -36,4 +40,21 @@ public class WorkFlowVersionServiceImpl implements WorkFlowVersionService {
|
||||||
|
|
||||||
return R.ok(workFlowVersions);
|
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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
model_id,version_name,version_description,model_version_type, file_path,file_name, trigger_words, sampling, high, vae, cfg,
|
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,
|
is_free, is_public, is_encrypt, is_online_use, allow_download_image,
|
||||||
allow_software_use, allow_fusion, allow_commercial_use, allow_usage,
|
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
|
VALUES
|
||||||
(
|
(
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
#{isFree}, #{isPublic}, #{isEncrypt}, #{isOnlineUse},
|
#{isFree}, #{isPublic}, #{isEncrypt}, #{isOnlineUse},
|
||||||
#{allowDownloadImage}, #{allowSoftwareUse}, #{allowFusion},
|
#{allowDownloadImage}, #{allowSoftwareUse}, #{allowFusion},
|
||||||
#{allowCommercialUse}, #{allowUsage}, #{isExclusiveModel},
|
#{allowCommercialUse}, #{allowUsage}, #{isExclusiveModel},
|
||||||
#{sampleImagePaths}, #{hideImageGenInfo},'0'
|
#{sampleImagePaths}, #{hideImageGenInfo},'0',#{fileSize}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
|
|
||||||
<insert id="addWorkFlowVersion">
|
<insert id="addWorkFlowVersion">
|
||||||
INSERT INTO work_flow_version (version_name,version_description,file_path,image_paths,hide_gen_info,del_flag,
|
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
|
VALUES
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(#{item.versionName}, #{item.versionDescription}, #{item.filePath}, #{item.imagePaths},#{item.hideGenInfo},
|
(#{item.versionName}, #{item.versionDescription}, #{item.filePath}, #{item.imagePaths},#{item.hideGenInfo},
|
||||||
0,#{workFlow.id},#{item.fileName})
|
0,#{workFlow.id},#{item.fileName},#{item.fileSize})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<update id="updateWorkFlowVersion">
|
<update id="updateWorkFlowVersion">
|
||||||
|
|
|
@ -39,7 +39,6 @@ public class DictInit implements ApplicationRunner {
|
||||||
|
|
||||||
// 查询所有字典数据 查询所有状态为启用的正常的,sql太简单就不写了
|
// 查询所有字典数据 查询所有状态为启用的正常的,sql太简单就不写了
|
||||||
List<SysDictData> allDicts = sysDictDataMapper.selectDictDataList(dictData);
|
List<SysDictData> allDicts = sysDictDataMapper.selectDictDataList(dictData);
|
||||||
log.info("获取到的字典值:{}",allDicts);
|
|
||||||
|
|
||||||
// 根据 dictType 分组
|
// 根据 dictType 分组
|
||||||
Map<String, List<SysDictData>> groupedByType = allDicts.stream()
|
Map<String, List<SysDictData>> groupedByType = allDicts.stream()
|
||||||
|
|
|
@ -10,6 +10,7 @@ import com.mcwl.common.core.domain.entity.SysUser;
|
||||||
import com.mcwl.common.core.redis.RedisCache;
|
import com.mcwl.common.core.redis.RedisCache;
|
||||||
import com.mcwl.common.exception.ServiceException;
|
import com.mcwl.common.exception.ServiceException;
|
||||||
import com.mcwl.common.utils.SecurityUtils;
|
import com.mcwl.common.utils.SecurityUtils;
|
||||||
|
import com.mcwl.common.utils.ShareCodeUtils;
|
||||||
import com.mcwl.common.utils.StringUtils;
|
import com.mcwl.common.utils.StringUtils;
|
||||||
import com.mcwl.common.utils.VerifyCard;
|
import com.mcwl.common.utils.VerifyCard;
|
||||||
import com.mcwl.common.utils.bean.BeanValidators;
|
import com.mcwl.common.utils.bean.BeanValidators;
|
||||||
|
@ -601,13 +602,20 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
@Override
|
@Override
|
||||||
public void updateUserInfo(SysUser sysUser) {
|
public void updateUserInfo(SysUser sysUser) {
|
||||||
|
|
||||||
|
if (sysUser.getInvitationCode() != null){
|
||||||
|
Long aLong = ShareCodeUtils.codeToId(sysUser.getInvitationCode());
|
||||||
|
sysUser.setInviterUserId(aLong);
|
||||||
|
}
|
||||||
userMapper.updateUserInfo(sysUser);
|
userMapper.updateUserInfo(sysUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SysUser selectUserInfoById(Long userId) {
|
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
|
@Override
|
||||||
|
|
|
@ -151,7 +151,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectUserInfoById" resultType="com.mcwl.common.core.domain.entity.SysUser">
|
<select id="selectUserInfoById" resultType="com.mcwl.common.core.domain.entity.SysUser">
|
||||||
select user_id,avatar,brief,nick_name,name,background_img from sys_user where user_id = #{userId}
|
select user_id,avatar,brief,nick_name,name,background_img,inviter_user_id from sys_user where user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByIdCard" resultType="com.mcwl.common.core.domain.entity.SysUser">
|
<select id="selectByIdCard" resultType="com.mcwl.common.core.domain.entity.SysUser">
|
||||||
select * from sys_user where id_card = #{idCard}
|
select * from sys_user where id_card = #{idCard}
|
||||||
|
@ -252,6 +252,10 @@
|
||||||
update sys_user set nick_name = #{nickName},
|
update sys_user set nick_name = #{nickName},
|
||||||
avatar = #{avatar},
|
avatar = #{avatar},
|
||||||
brief = #{brief}
|
brief = #{brief}
|
||||||
|
<!-- 动态判断 inviter_user_id 是否非空 -->
|
||||||
|
<if test="inviterUserId != null">
|
||||||
|
, inviter_user_id = #{inviterUserId}
|
||||||
|
</if>
|
||||||
where user_id = #{userId}
|
where user_id = #{userId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue