insert into sys_user_openid
diff --git a/ruoyi-ui/src/components/FileUpload/index.vue b/ruoyi-ui/src/components/FileUpload/index.vue
index 5aa6e978..fdf15083 100644
--- a/ruoyi-ui/src/components/FileUpload/index.vue
+++ b/ruoyi-ui/src/components/FileUpload/index.vue
@@ -120,7 +120,7 @@ export default {
// 校检文件类型
if (this.fileType) {
const fileName = file.name.split('.');
- const fileExt = fileName[fileName.length - 1];
+ const fileExt = fileName[fileName.length - 1].toLocaleLowerCase();
const isTypeOk = this.fileType.indexOf(fileExt) >= 0;
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
diff --git a/ruoyi-ui/src/components/ImageUpload/index.vue b/ruoyi-ui/src/components/ImageUpload/index.vue
index cb2b93b9..bd937def 100644
--- a/ruoyi-ui/src/components/ImageUpload/index.vue
+++ b/ruoyi-ui/src/components/ImageUpload/index.vue
@@ -15,20 +15,26 @@
:headers="headers"
:file-list="fileList"
:on-preview="handlePictureCardPreview"
- :class="{hide: this.fileList.length >= this.limit}"
+ :class="{ hide: this.fileList.length >= this.limit }"
>
-
+
请上传
- 大小不超过 {{ fileSize }}MB
- 格式为 {{ fileType.join("/") }}
+
+ 大小不超过 {{ fileSize }}MB
+
+
+ 格式为 {{ fileType.join("/") }}
+
的文件
- {
+ this.fileList = list.map((item) => {
if (typeof item === "string") {
- if (item.indexOf(this.baseUrl) === -1 && item.indexOf('http') === -1) {
- item = { name: this.baseUrl + item, url: this.baseUrl + item };
+ if (item.indexOf(this.baseUrl) === -1 && item.indexOf("http") === -1) {
+ item = { name: this.baseUrl + item, url: this.baseUrl + item };
} else {
- item = { name: item, url: item };
+ item = { name: item, url: item };
}
}
return item;
@@ -107,8 +118,8 @@ export default {
}
},
deep: true,
- immediate: true
- }
+ immediate: true,
+ },
},
computed: {
// 是否显示提示
@@ -123,10 +134,12 @@ export default {
if (this.fileType.length) {
let fileExtension = "";
if (file.name.lastIndexOf(".") > -1) {
- fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
+ fileExtension = file.name
+ .slice(file.name.lastIndexOf(".") + 1)
+ .toLocaleLowerCase();
}
- isImg = this.fileType.some(type => {
- if (file.type.indexOf(type) > -1) return true;
+ isImg = this.fileType.some((type) => {
+ if (file.type.toLocaleLowerCase().indexOf(type) > -1) return true;
if (fileExtension && fileExtension.indexOf(type) > -1) return true;
return false;
});
@@ -135,7 +148,9 @@ export default {
}
if (!isImg) {
- this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}图片格式文件!`);
+ this.$modal.msgError(
+ `文件格式不正确, 请上传${this.fileType.join("/")}图片格式文件!`
+ );
return false;
}
if (this.fileSize) {
@@ -145,6 +160,12 @@ export default {
return false;
}
}
+ if(this.fileNameChk){
+ if (file.name.lastIndexOf("[") > -1 || file.name.lastIndexOf("]")) {
+ this.$modal.msgError(`文件名中不能包含英文[],请修改为中文〔〕或【】!`);
+ return false;
+ }
+ }
this.$modal.loading("正在上传图片,请稍候...");
this.number++;
},
@@ -167,8 +188,8 @@ export default {
},
// 删除图片
handleDelete(file) {
- const findex = this.fileList.map(f => f.name).indexOf(file.name);
- if(findex > -1) {
+ const findex = this.fileList.map((f) => f.name).indexOf(file.name);
+ if (findex > -1) {
this.fileList.splice(findex, 1);
this.$emit("input", this.listToString(this.fileList));
}
@@ -202,25 +223,25 @@ export default {
strs += list[i].url.replace(this.baseUrl, "") + separator;
}
}
- return strs != '' ? strs.substr(0, strs.length - 1) : '';
- }
- }
+ return strs != "" ? strs.substr(0, strs.length - 1) : "";
+ },
+ },
};
-
diff --git a/ruoyi-ui/src/views/wxsetting/wxAuth/index.vue b/ruoyi-ui/src/views/wxsetting/wxAuth/index.vue
index 0b9a8a82..632da0a8 100644
--- a/ruoyi-ui/src/views/wxsetting/wxAuth/index.vue
+++ b/ruoyi-ui/src/views/wxsetting/wxAuth/index.vue
@@ -1,7 +1,21 @@
-
-
+
+
+
+
+ 返回小程序
+
+
+
+
+
+
+ 返回小程序
+
+
+
+
diff --git a/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/ProjectController.java b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/ProjectController.java
index dcef1542..41492204 100644
--- a/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/ProjectController.java
+++ b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/ProjectController.java
@@ -7,6 +7,7 @@ import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.common.enums.ShiFouEnum;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.sign.Md5Utils;
@@ -43,6 +44,7 @@ public class ProjectController extends BaseController {
@GetMapping("/findProjectByDept")
public AjaxResult findProjectByDept(Long deptId){
SurProject surProject=new SurProject();
+ surProject.setProgressVisible(ShiFouEnum.FOU.getCode());
if(deptId==-1){
long roleId= SecurityUtils.getRoleId();
if(5==roleId||6==roleId||7==roleId){
@@ -57,12 +59,12 @@ public class ProjectController extends BaseController {
surProject.setDeptId(deptId);
}
List list=isurProjectService.selectSurProjectList(surProject);
- for (SurProject p :list){
+ //for (SurProject p :list){
//DateTime dt1= DateUtil.parse(p.getScheduledStartTime());
//DateTime dt2=DateUtil.parse(p.getPlannedCompletionTime());
//long days= DateUtil.between(dt1,dt2, DateUnit.DAY);
//p.setProjectTimeLimit(days);
- }
+ //}
return success(list);
}
diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/wxsetting/controller/WxAuthController.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/wxsetting/controller/WxAuthController.java
index 1f20eb56..799b61d6 100644
--- a/yanzhu-jh/src/main/java/com/yanzhu/jh/wxsetting/controller/WxAuthController.java
+++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/wxsetting/controller/WxAuthController.java
@@ -6,6 +6,9 @@ import com.ruoyi.common.constant.CacheConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.domain.SysUserOpenid;
+import com.ruoyi.system.service.ISysUserOpenidService;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.exception.WxErrorException;
@@ -36,6 +39,9 @@ public class WxAuthController extends BaseController {
@Autowired
private WxMpService wxMpService;
+ @Autowired
+ private ISysUserOpenidService sysUserOpenidService;
+
@Anonymous
@GetMapping("/auth")
@ResponseBody
@@ -123,4 +129,24 @@ public class WxAuthController extends BaseController {
response.sendRedirect(returnUrl + "&openid=" + openId);
}
+ /**
+ * @author :JiangYuQi
+ * @param: :
+ * @return: 重定向
+ * 获取用户信息类,最后重定向到指定url
+ */
+ @Anonymous
+ @GetMapping("/binding")
+ public AjaxResult binding(String openId,String msgOpenId) throws Exception {
+ /*当用户同意授权后,将小程序openId和公众号OpenId进行绑定*/
+ if(StringUtils.isNotBlank(openId)){
+ SysUserOpenid sysUserOpenid = sysUserOpenidService.selectSysUserOpenidByOpenId(openId);
+ if(sysUserOpenid!=null){
+ sysUserOpenid.setMsgOpenId(msgOpenId);
+ return toAjax(sysUserOpenidService.updateSysUserOpenid(sysUserOpenid));
+ }
+ }
+ return error();
+ }
+
}
diff --git a/yanzhu-jh/src/main/resources/mapper/project/SurProjectMapper.xml b/yanzhu-jh/src/main/resources/mapper/project/SurProjectMapper.xml
index c29fa2aa..293e6c93 100644
--- a/yanzhu-jh/src/main/resources/mapper/project/SurProjectMapper.xml
+++ b/yanzhu-jh/src/main/resources/mapper/project/SurProjectMapper.xml
@@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sur_project_userinfo spu on spu.project_id = sp.id
- sp.isDel = 0 and sp.progressVisible=0
+ sp.isDel = 0
and sp.deptId like concat('%', #{deptId}, '%')
and sp.projectName like concat('%', #{projectName}, '%')
and sp.projectCode = #{projectCode}
@@ -79,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and sp.projiectLevel = #{projiectLevel}
and sp.projectRegional = #{projectRegional}
and sp.projectAddress = #{projectAddress}
+ and sp.progressVisible = #{progressVisible}
and sp.projectNature = #{projectNature}
and sp.licenceNumber = #{licenceNumber}
and sp.projectApproval = #{projectApproval}