diff --git a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/DownloadRecordController.java b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/DownloadRecordController.java index 49183dc..5ae1dda 100644 --- a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/DownloadRecordController.java +++ b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/DownloadRecordController.java @@ -6,7 +6,6 @@ import com.mcwl.resource.domain.request.RequestDownload; import com.mcwl.resource.domain.vo.PageVo; import com.mcwl.resource.service.impl.DownloadRecordServiceImpl; import io.swagger.annotations.Api; -import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -79,7 +78,7 @@ public class DownloadRecordController { return downloadRecordService.deleteDownloadRecord(ids); } - @ApiModelProperty(value = "根据文件名查询详情") + @ApiOperation(value = "根据文件名查询详情") @PostMapping("/selectFileByName") public R selectByFileName(@RequestBody RequestDownload requestDownload){ diff --git a/mcwl-admin/src/main/java/com/mcwl/web/controller/system/SysLoginController.java b/mcwl-admin/src/main/java/com/mcwl/web/controller/system/SysLoginController.java index 5d49c89..11959fe 100644 --- a/mcwl-admin/src/main/java/com/mcwl/web/controller/system/SysLoginController.java +++ b/mcwl-admin/src/main/java/com/mcwl/web/controller/system/SysLoginController.java @@ -3,6 +3,7 @@ package com.mcwl.web.controller.system; import com.alibaba.fastjson2.JSONObject; import com.mcwl.common.annotation.Anonymous; import com.mcwl.common.constant.Constants; +import com.mcwl.common.constant.HttpStatus; import com.mcwl.common.constant.QueueConstants; import com.mcwl.common.constant.RedisConstants; import com.mcwl.common.core.domain.AjaxResult; @@ -60,13 +61,13 @@ public class SysLoginController public AjaxResult code(@RequestParam String phone){ if (StringUtils.isEmpty(phone)){ - return AjaxResult.error("请输入手机号"); + return AjaxResult.error(HttpStatus.SHOW_ERROR_MSG,"请输入手机号"); } //校验验证码是否存在 if (redisCache.hasKey(RedisConstants.CODE_PHONE+phone)){ - return AjaxResult.error("请勿重复发送"); + return AjaxResult.error(HttpStatus.SHOW_ERROR_MSG,"请勿重复发送"); } //生成验证码 diff --git a/mcwl-common/pom.xml b/mcwl-common/pom.xml index 76a0c9d..eb9195a 100644 --- a/mcwl-common/pom.xml +++ b/mcwl-common/pom.xml @@ -408,6 +408,20 @@ spring-boot-starter-websocket + + + + + + + + + + + + + + diff --git a/mcwl-framework/src/main/java/com/mcwl/framework/config/SecurityConfig.java b/mcwl-framework/src/main/java/com/mcwl/framework/config/SecurityConfig.java index f181d48..d9c0900 100644 --- a/mcwl-framework/src/main/java/com/mcwl/framework/config/SecurityConfig.java +++ b/mcwl-framework/src/main/java/com/mcwl/framework/config/SecurityConfig.java @@ -165,7 +165,8 @@ public class SecurityConfig { "/personalCenter/selectByUserIdImage", "/personalCenter/likeModel", "/personalCenter/likeWorkFlow", - "/personalCenter/likeImage" + "/personalCenter/likeImage", + "/api/ucenter/wx/**" ).permitAll() // 静态资源,可匿名访问 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/domain/DownloadRecord.java b/mcwl-resource/src/main/java/com/mcwl/resource/domain/DownloadRecord.java index 5ae7718..77544db 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/domain/DownloadRecord.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/domain/DownloadRecord.java @@ -104,4 +104,7 @@ public class DownloadRecord { @ApiModelProperty(value = "下载类型(0模型 1工作流)") private Integer downloadType; + @ApiModelProperty(value = "触发词") + private String triggerWords; + } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/domain/ModelProduct.java b/mcwl-resource/src/main/java/com/mcwl/resource/domain/ModelProduct.java index c93821a..9cde0d6 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/domain/ModelProduct.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/domain/ModelProduct.java @@ -135,6 +135,12 @@ public class ModelProduct extends BaseEntity { @ApiModelProperty(value = "删除标志(0代表存在 2代表删除)") private String delFlag; + /** + * 是否收费 + */ + @ApiModelProperty(value = "是否收费 0收费 1免费") + private Integer isFree; + /** * 商品价格 */ diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/DownloadRecordServiceImpl.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/DownloadRecordServiceImpl.java index f0c3be6..7f0ca1b 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/DownloadRecordServiceImpl.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/DownloadRecordServiceImpl.java @@ -2,7 +2,6 @@ package com.mcwl.resource.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.mcwl.common.constant.DictConstants; import com.mcwl.common.constant.HttpStatus; import com.mcwl.common.core.domain.R; import com.mcwl.common.utils.SecurityUtils; @@ -12,7 +11,6 @@ import com.mcwl.resource.domain.request.RequestDownload; import com.mcwl.resource.domain.vo.PageVo; import com.mcwl.resource.mapper.*; import com.mcwl.resource.service.DownloadRecordService; -import com.mcwl.system.init.DictInit; import com.mcwl.system.mapper.SysUserMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -171,12 +169,12 @@ public class DownloadRecordServiceImpl implements DownloadRecordService { } List downloadRecords = downloadRecordMapper.selectList(wrapper); - if (requestDownload.getType() != 999){ - //翻译底模 - for (DownloadRecord downloadRecord : downloadRecords) { - downloadRecord.setModelVersionType(DictInit.getDictValue(DictConstants.MODE_VERSION_TYPE,downloadRecord.getModelVersionType())); - } - } +// if (requestDownload.getType() != 999){ +// //翻译底模 +// for (DownloadRecord downloadRecord : downloadRecords) { +// downloadRecord.setModelVersionType(DictInit.getDictValue(DictConstants.MODE_VERSION_TYPE,downloadRecord.getModelVersionType())); +// } +// } return R.ok(downloadRecords); } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/FileServiceImpl.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/FileServiceImpl.java index 02ee8ae..efdf2c8 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/FileServiceImpl.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/FileServiceImpl.java @@ -1,5 +1,6 @@ package com.mcwl.resource.service.impl; +import com.mcwl.common.constant.HttpStatus; import com.mcwl.common.core.domain.AjaxResult; import com.mcwl.common.core.domain.R; import com.mcwl.common.utils.StringUtils; @@ -33,7 +34,7 @@ public class FileServiceImpl implements FileService { if (StringUtils.isEmpty(type)){ - return AjaxResult.error("请输入type"); + return AjaxResult.error(HttpStatus.SHOW_ERROR_MSG,"请输入type"); } if (type.equals("model")) { @@ -41,7 +42,7 @@ public class FileServiceImpl implements FileService { ModelVersion modelVersion = versionMapper.selectByEncryptionFileName(name); if (modelVersion == null) { - return AjaxResult.error("文件不存在"); + return AjaxResult.error(HttpStatus.SHOW_ERROR_MSG,"文件不存在"); } return AjaxResult.success(modelVersion); @@ -49,13 +50,13 @@ public class FileServiceImpl implements FileService { WorkFlowVersion workFlowVersion = workFlowVersionMapper.selectByFileName(name); if (workFlowVersion == null) { - return AjaxResult.error("文件不存在"); + return AjaxResult.error(HttpStatus.SHOW_ERROR_MSG,"文件不存在"); } return AjaxResult.success(workFlowVersion); } - return AjaxResult.error("type不合法"); + return AjaxResult.error(HttpStatus.SHOW_ERROR_MSG,"type不合法"); } @Override @@ -63,7 +64,7 @@ public class FileServiceImpl implements FileService { if (StringUtils.isEmpty(type)){ - return AjaxResult.error("请输入type"); + return AjaxResult.error(HttpStatus.SHOW_ERROR_MSG,"请输入type"); } if (type.equals("model")) { @@ -84,7 +85,7 @@ public class FileServiceImpl implements FileService { return AjaxResult.success(1); } - return AjaxResult.error("type不合法"); + return AjaxResult.error(HttpStatus.SHOW_ERROR_MSG,"type不合法"); } 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 037e35d..a38ab1a 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 @@ -3,6 +3,7 @@ package com.mcwl.system.service.impl; import com.alibaba.fastjson2.JSONObject; import com.mcwl.common.annotation.DataScope; import com.mcwl.common.constant.CacheConstants; +import com.mcwl.common.constant.HttpStatus; import com.mcwl.common.constant.UserConstants; import com.mcwl.common.core.domain.AjaxResult; import com.mcwl.common.core.domain.entity.SysRole; @@ -639,7 +640,7 @@ public class SysUserServiceImpl implements ISysUserService if (3<=s){ - return AjaxResult.error("次数上限"); + return AjaxResult.error(HttpStatus.SHOW_ERROR_MSG,"次数上限"); }else { //次数+1 s++; @@ -653,7 +654,7 @@ public class SysUserServiceImpl implements ISysUserService //查看身份证是否唯一 SysUser user = userMapper.selectByIdCard(sysUser.getIdCard()); if (user != null){ - return AjaxResult.error("该信息已绑定"); + return AjaxResult.error(HttpStatus.SHOW_ERROR_MSG,"该信息已绑定"); } //校验 String s1 = VerifyCard.idCard(sysUser.getName(), sysUser.getIdCard()); @@ -661,12 +662,13 @@ public class SysUserServiceImpl implements ISysUserService Integer code = jsonObject.getInteger("code"); if (code != 200){ - return AjaxResult.error(jsonObject.getString("msg")); + return AjaxResult.error(HttpStatus.SHOW_ERROR_MSG,jsonObject.getString("msg")); } JSONObject data = jsonObject.getJSONObject("data"); String desc = data.getString("desc"); if (desc.equals("不一致")){ - return AjaxResult.error("请填写正确信息"); + + return AjaxResult.error(HttpStatus.SHOW_ERROR_MSG,"请填写正确信息"); } log.info("实名认证校验的结果:{}",s1); //修改数据库