lsw 1 年間 前
コミット
668c7c4d8a

+ 1 - 1
app/App.vue

@@ -30,7 +30,7 @@ button::after {
 /**挂载iconfont字体图标*/
 @font-face {
 	font-family: 'iconfont';
-	src: url('https://at.alicdn.com/t/c/font_4507607_jjjyuj383v.ttf?t=1713419783467') format('truetype');
+	src: url('https://at.alicdn.com/t/c/font_4507607_8bhjcwoky4e.ttf?t=1713424601890') format('truetype');
 	/* src: url('~@/static/font/iconfont.ttf') format('truetype'); */
 }
 .icon {

+ 5 - 1
app/components/card/card.vue

@@ -7,7 +7,7 @@
 				<view class="icon" v-html="icon"></view>
 			</view>
 		</view>
-		<view class="text">{{ text }}</view>
+		<view class="text" v-if="!read">{{ text }}</view>
 	</view>
 </template>
 <script>
@@ -41,6 +41,10 @@ export default {
 	},
 	methods: {
 		chooseImage() {
+			if (this.read) {
+				this.preview(this.fileName);
+				return;
+			}
 			//照片选择
 			uni.chooseImage({
 				count: 1, //默认9

+ 8 - 0
app/pages.json

@@ -40,6 +40,14 @@
 				"navigationBarTitleText" : "实名认证",
 				"enablePullDownRefresh" : false
 			}
+		},
+		{
+			"path" : "pages/company/index",
+			"style" : 
+			{
+				"navigationBarTitleText" : "关联企业",
+				"enablePullDownRefresh" : false
+			}
 		}
 	],
 	"tabBar": {

+ 21 - 8
app/pages/authentication/index.vue

@@ -1,6 +1,10 @@
 <template>
 	<view>
-		<view class="tips">
+		<view class="tips" v-if="item.isAuthentication === 1">
+			<text class="icon">&#xe600;</text>
+			<text>实名认证成功</text>
+		</view>
+		<view class="tips" v-else>
 			<text class="icon">&#xe634;</text>
 			<text>为保障资金安全,用户需进行实名认证,请务必认真填写</text>
 		</view>
@@ -8,23 +12,23 @@
 			<view class="form">
 				<view class="form_group">
 					<view class="lable re">姓名</view>
-					<input type="text" placeholder="请输入姓名" v-model="item.name" />
+					<input type="text" placeholder="请输入姓名" v-model="item.name" :disabled="item.isAuthentication === 1" />
 				</view>
 				<view class="form_group">
 					<view class="lable re">身份证</view>
-					<input type="text" placeholder="请输入姓名" v-model="item.idCard" />
+					<input type="text" placeholder="请输入姓名" v-model="item.idCard" :disabled="item.isAuthentication === 1" />
 				</view>
 			</view>
-			<u-divider text="上传本人二代身份证"></u-divider>
+			<u-divider text="本人二代身份证"></u-divider>
 			<view class="r">
 				<view class="r50">
-					<card v-model="item.p1" text="点击拍摄/上传人像面" icon="&#xe690;"></card>
+					<card v-model="item.p1" text="点击拍摄/上传人像面" icon="&#xe690;" :read="item.isAuthentication === 1"></card>
 				</view>
 				<view class="r50">
-					<card v-model="item.p2" text="点击拍摄/上传国徽面" icon="&#xe61f;"></card>
+					<card v-model="item.p2" text="点击拍摄/上传国徽面" icon="&#xe61f;" :read="item.isAuthentication === 1"></card>
 				</view>
 			</view>
-			<button class="btn" @click="save()">确定</button>
+			<button class="btn" @click="save()" v-if="item.isAuthentication != 1">确定</button>
 		</view>
 	</view>
 </template>
@@ -37,9 +41,18 @@ export default {
 		};
 	},
 	onLoad() {
-          		
+		this.getData();
 	},
 	methods: {
+		getData() {
+			this.http.request({
+				url: '/app/user/info',
+				data: this.item,
+				success: (res) => {
+					this.item = res.data.data;
+				}
+			});
+		},
 		save() {
 			let rule = [
 				{ name: 'name', checkType: 'notnull', errorMsg: '请输入姓名' },

+ 137 - 0
app/pages/company/index.vue

@@ -0,0 +1,137 @@
+<template>
+	<view class="notice">
+		<view class="tz_item" v-for="(item, index) in list" :key="index" @click="detail(item)">
+			<view class="ctop">
+				<text class="icon tb">&#xe734;</text>
+				<text class="tag">通知公告</text>
+				<view class="clear"></view>
+			</view>
+			<view class="content">
+				<view class="title omit">{{ item.title }}</view>
+			</view>
+			<view class="time">{{ item.createTime }}</view>
+			<view class="clear"></view>
+		</view>
+		<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
+		<u-empty v-if="!loadMore && list.length == 0"></u-empty>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			list: [],
+			param: { pageNum: 1, pageSize: 10, orderByColumn: 'createTime', isAsc: 'desc' },
+			loadMore: true
+		};
+	},
+	onLoad(e) {
+		this.getData();
+	},
+	methods: {
+		getData() {
+			this.http.request({
+				url: '/app/user/company/list',
+				data: this.param,
+				loading: 'false',
+				success: (res) => {
+					this.loadMore = res.data.pages > this.param.pageNum ? true : false;
+					res.data.rows.forEach((item) => {
+						item.createTime = uni.$u.timeFrom(Date.parse(item.createTime));
+						this.list.push(item);
+					});
+				}
+			});
+		},
+		detail(item) {
+			uni.navigateTo({
+				url: '/pages/notice/detail?id=' + item.id
+			});
+		},
+		//刷新数据
+		refresh() {
+			this.loadMore = true;
+			this.param.pageNum = 1;
+			this.list = [];
+			this.getData();
+		}
+	},
+	//下拉刷新
+	onPullDownRefresh() {
+		setTimeout(() => {
+			this.refresh();
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	//上拉加载
+	onReachBottom() {
+		if (this.loadMore) {
+			this.param.pageNum++;
+			this.getData();
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background-color: white;
+}
+.notice {
+	background-color: white;
+	.tz_item {
+		padding: 7px 15px 15px 15px;
+		color: $font-c;
+		margin-bottom: 10px;
+		border-bottom: 1px solid #f0f2f7;
+		cursor: pointer;
+		.ctop {
+			position: relative;
+			.bage {
+				position: absolute;
+				width: 8px;
+				height: 8px;
+				left: 23px;
+				top: 0px;
+				border: 1px solid white;
+				border-radius: 50%;
+				background-color: red;
+			}
+			.tb {
+				width: 30px;
+				height: 30px;
+				line-height: 28px;
+				text-align: center;
+				border-radius: 50%;
+				font-size: 20px;
+				margin-right: 5px;
+				float: left;
+				background-color: #4581fb;
+				color: white;
+			}
+			.tag {
+				float: left;
+				font-size: 14px;
+				font-weight: bold;
+				margin-top: 4px;
+				margin-left: 5px;
+			}
+		}
+		.content {
+			float: left;
+			width: 75%;
+			margin-top: 10px;
+			color: #717171;
+			.title {
+				font-size: 14px;
+			}
+		}
+		.time {
+			font-size: 14px;
+			padding: 10px 0px 0px 0px;
+			float: right;
+		}
+	}
+}
+</style>

+ 55 - 23
app/pages/index/index.vue

@@ -10,32 +10,41 @@
 		</view>
 		<view class="flow">
 			<view class="title">操作流程</view>
-			<view class="item">
-				<view class="tb"><view class="icon">&#xe600;</view></view>
+			<!--实名认证-->
+			<view class="item" @click="go('/pages/authentication/index')">
+				<view class="icon tb">&#xe600;</view>
 				<view class="con">
 					<view class="bt">实名认证</view>
 					<view class="bor" style="background: linear-gradient(to right, rgb(198 187 250), rgb(251 251 251))"></view>
-					<view class="zt">未实名</view>
+					<view class="zt">{{ !user.isAuthentication || user.isAuthentication == 0 ? '尚未提交资料' : '已提交资料' }}</view>
 				</view>
-				<view class="state">
+				<view class="state" v-if="user.isAuthentication === 1">
 					<text class="zt">已认证</text>
 					<text class="icon">&#xe62b;</text>
 				</view>
+				<view class="state" v-else>
+					<view class="go">去认证</view>
+				</view>
 			</view>
-			<view class="item">
-				<view class="tb"><view class="icon">&#xe600;</view></view>
+			<!--关联企业-->
+			<view class="item" @click="go('/pages/company/index')">
+				<view class="icon tb">&#xe623;</view>
 				<view class="con">
 					<view class="bt">关联企业</view>
-					<view class="bor" style="background: linear-gradient(to right, #eecce0,  rgb(253 253 253))"></view>
-					<view class="zt">未实名</view>
+					<view class="bor" style="background: linear-gradient(to right, #eecce0, rgb(253 253 253))"></view>
+					<view class="zt">{{ !user.isCompany || user.isCompany == 0 ? '尚未关联企业' : '已完成' }}</view>
 				</view>
-				<view class="state">
-					<text class="zt">已认证</text>
+				<view class="state" v-if="user.isCompany > 0">
+					<text class="zt">{{ user.isCompany }}家</text>
 					<text class="icon">&#xe62b;</text>
 				</view>
+				<view class="state" v-else>
+					<view class="go">去关联</view>
+				</view>
 			</view>
+			<!--开始接包-->
 			<view class="item">
-				<view class="tb"><view class="icon">&#xe600;</view></view>
+				<view class="icon tb">&#xe604;</view>
 				<view class="con">
 					<view class="bt">开始接包</view>
 					<view class="bor" style="background: linear-gradient(to right, #c9f1d4, rgb(250 255 252))"></view>
@@ -46,8 +55,9 @@
 					<text class="icon">&#xe62b;</text>
 				</view>
 			</view>
+			<!--电子签约-->
 			<view class="item">
-				<view class="tb"><view class="icon">&#xe600;</view></view>
+				<view class="icon tb">&#xe6ed;</view>
 				<view class="con">
 					<view class="bt">电子签约</view>
 					<view class="bor" style="background: linear-gradient(to right, #f6f6bf, rgb(246 246 246))"></view>
@@ -72,12 +82,22 @@ export default {
 		};
 	},
 	onShow() {
-		this.user = this.getUser();
+		if (this.hasLogin()) {
+			this.getUser();
+		}
 	},
 	onLoad() {
 		//this.getData();
 	},
 	methods: {
+		getUser() {
+			this.http.request({
+				url: '/app/user/info',
+				success: (res) => {
+					this.user = res.data.data;
+				}
+			});
+		},
 		getData() {
 			this.http.request({
 				url: this.http.urls.home_list,
@@ -87,6 +107,13 @@ export default {
 					});
 				}
 			});
+		},
+		go(url) {
+			if (this.hasLogin()) {
+				uni.navigateTo({ url: url });
+			} else {
+				uni.navigateTo({ url: '/pages/user/login' });
+			}
 		}
 	}
 };
@@ -94,7 +121,7 @@ export default {
 
 <style lang="scss">
 .main {
-	padding:5px 15px 15px 15px;
+	padding: 5px 15px 15px 15px;
 }
 .banner {
 }
@@ -109,18 +136,16 @@ export default {
 	.item {
 		background-color: white;
 		border-radius: 10px;
-		padding: 20px;
+		padding: 18px;
 		overflow: hidden;
 		margin-top: 12px;
 		.tb {
-			.icon {
-				float: left;
-				padding: 13px;
-				border: 1px solid $main-color;
-				color: $main-color;
-				border-radius: 50%;
-				font-size: 23px;
-			}
+			float: left;
+			padding: 13px;
+			border: 1px solid $main-color;
+			color: $main-color;
+			border-radius: 50%;
+			font-size: 23px;
 		}
 		.con {
 			float: left;
@@ -153,6 +178,13 @@ export default {
 			.icon {
 				color: #909090;
 			}
+			.go {
+				padding: 5px 12px;
+				font-size: 14px;
+				background-color: #5a7afc;
+				color: white;
+				border-radius: 20px;
+			}
 		}
 	}
 }

+ 1 - 1
app/pages/user/index.vue

@@ -44,7 +44,7 @@ export default {
 		};
 	},
 	onShow() {
-		 /* this.user = {
+/* 		  this.user = {
 			token: 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImU3ZDZmYWZkLTY2YzQtNDAwMC1iOTgyLWFjZWI3ZmEyNzU2NyJ9.Vl0vxvIzabGbBRSlMziU4EhoLEU-qHnOL_oQsLxwxMhxEecw2hYixMlgebTLR80OzaNaVUXrNrzCw0shAe-h6g'
 		};
 		uni.setStorageSync('user', this.user); */

+ 43 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/api/Api_RelateController.java

@@ -0,0 +1,43 @@
+package com.ruoyi.web.work.api;
+
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.web.work.api.config.BaseController;
+import com.ruoyi.web.work.domain.Relate;
+import com.ruoyi.web.work.service.IRelateService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 关联企业
+ *
+ * @author lsw
+ * @date 2024-04-18
+ */
+@RestController
+@RequestMapping("/app/relate")
+public class Api_RelateController extends BaseController {
+    @Autowired
+    private IRelateService relateService;
+
+    @GetMapping("/list")
+    public TableDataInfo list(Relate relate) {
+        relate.setUserId(getUser().getId());
+        startPage();
+        List<Relate> list = relateService.selectList(relate);
+        return getDataTable(list);
+    }
+
+    @PostMapping("/add")
+    public AjaxResult add(@RequestBody Relate relate) {
+        return relateService.add(relate);
+    }
+
+    @GetMapping("/remove/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(relateService.removeByIds(Arrays.asList(ids)));
+    }
+}

+ 5 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/work/api/Api_UserController.java

@@ -6,7 +6,6 @@ import com.ruoyi.web.work.domain.dto.AuthenticationDto;
 import com.ruoyi.web.work.domain.dto.LoginDto;
 import com.ruoyi.web.work.service.IUserService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.env.Environment;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -17,14 +16,16 @@ public class Api_UserController extends BaseController {
     @Autowired
     IUserService userService;
 
-    @Autowired
-    private Environment env;
-
     @PostMapping("/login")
     public AjaxResult login(@Validated @RequestBody LoginDto dto) {
         return userService.login(dto);
     }
 
+    /**
+     * 实名认证
+     *
+     * @return
+     */
     @PostMapping("/authentication")
     public AjaxResult authentication(@Validated @RequestBody AuthenticationDto dto) {
         return userService.authentication(dto);

+ 0 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/work/controller/CompanyController.java

@@ -5,7 +5,6 @@ import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
-import com.ruoyi.system.service.ISysUserService;
 import com.ruoyi.web.work.domain.Company;
 import com.ruoyi.web.work.service.ICompanyService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -28,9 +27,6 @@ public class CompanyController extends BaseController {
     @Autowired
     private ICompanyService companyService;
 
-    @Autowired
-    private ISysUserService userService;
-
 
     @PreAuthorize("@ss.hasPermi('work:company:list')")
     @GetMapping("/list")

+ 62 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/controller/RelateController.java

@@ -0,0 +1,62 @@
+package com.ruoyi.web.work.controller;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.web.work.domain.Relate;
+import com.ruoyi.web.work.service.IRelateService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 关联企业
+ * @author lsw
+ * @date 2024-04-18
+ */
+@RestController
+@RequestMapping("/work/relate")
+public class RelateController extends BaseController {
+    @Autowired
+    private IRelateService relateService;
+
+    @PreAuthorize("@ss.hasPermi('work:relate:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(Relate relate){
+        startPage();
+        List<Relate> list = relateService.selectList(relate);
+        return getDataTable(list);
+    }
+
+    @PreAuthorize("@ss.hasPermi('work:relate:query')")
+    @GetMapping(value = "/detail/{id}")
+    public AjaxResult detail(@PathVariable("id") Long id){
+        return AjaxResult.success(relateService.getById(id));
+    }
+
+    @PreAuthorize("@ss.hasPermi('work:relate:add')")
+    @Log(title = "关联企业", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    public AjaxResult add(@RequestBody Relate relate){
+        return toAjax(relateService.save(relate));
+    }
+
+    @PreAuthorize("@ss.hasPermi('work:relate:edit')")
+    @Log(title = "关联企业", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    public AjaxResult edit(@RequestBody Relate relate){
+        return toAjax(relateService.updateById(relate));
+    }
+
+    @PreAuthorize("@ss.hasPermi('work:relate:remove')")
+    @Log(title = "关联企业", businessType = BusinessType.DELETE)
+    @GetMapping("/remove/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids){
+        return toAjax(relateService.removeByIds(Arrays.asList(ids)));
+    }
+}

+ 50 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/Relate.java

@@ -0,0 +1,50 @@
+package com.ruoyi.web.work.domain;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+/**
+ * @author lsw
+ * @date 2024-04-18
+ */
+@Data
+@TableName(value = "tb_relate")
+@Accessors(chain = true)
+public class Relate{
+    private static final long serialVersionUID = 1L;
+
+    private Long id;
+
+    @ApiModelProperty(value = "关联用户")
+    private Long userId;
+
+    @NotNull(message = "关联企业不能为空")
+    @ApiModelProperty(value = "关联企业")
+    private Long companyId;
+
+    @ApiModelProperty(value = "状态:0=正常,1=停用")
+    private Integer state;
+
+    @TableField(fill = FieldFill.INSERT)
+    private String createBy;
+
+    @TableField(fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    @TableField(fill = FieldFill.UPDATE)
+    private String updateBy;
+
+    @TableField(fill = FieldFill.UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+
+}

+ 3 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/User.java

@@ -54,6 +54,9 @@ public class User{
     @ApiModelProperty(value = "是否认证")
     private Integer isAuthentication;
 
+    @ApiModelProperty(value = "是否关联企业(关联企业数)")
+    private Integer isCompany;
+
     @ApiModelProperty(value = "是否签署合同:0=未签,1=已签")
     private Integer isContract;
 

+ 18 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/mapper/RelateMapper.java

@@ -0,0 +1,18 @@
+package com.ruoyi.web.work.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.web.work.domain.Relate;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+/**
+ * @author lsw
+ * @date 2024-04-18
+ */
+public interface RelateMapper extends BaseMapper<Relate> {
+    List<Relate> selectList(Relate relate);
+
+    @Select("SELECT * FROM tb_relate WHERE user_id=#{userId} AND company_id=#{companyId}")
+    Relate check(Relate relate);
+}

+ 17 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/IRelateService.java

@@ -0,0 +1,17 @@
+package com.ruoyi.web.work.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.web.work.domain.Relate;
+
+import java.util.List;
+
+/**
+ * @author lsw
+ * @date 2024-04-18
+ */
+public interface IRelateService extends IService<Relate>{
+    List<Relate> selectList(Relate relate);
+
+    AjaxResult add(Relate relate);
+}

+ 49 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/RelateServiceImpl.java

@@ -0,0 +1,49 @@
+package com.ruoyi.web.work.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.web.work.api.util.AppUtil;
+import com.ruoyi.web.work.domain.Company;
+import com.ruoyi.web.work.domain.Relate;
+import com.ruoyi.web.work.mapper.RelateMapper;
+import com.ruoyi.web.work.service.ICompanyService;
+import com.ruoyi.web.work.service.IRelateService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * @author lsw
+ * @date 2024-04-18
+ */
+@Service
+public class RelateServiceImpl extends ServiceImpl<RelateMapper, Relate> implements IRelateService {
+    @Autowired
+    private RelateMapper relateMapper;
+
+    @Autowired
+    private ICompanyService companyService;
+
+    @Override
+    public List<Relate> selectList(Relate relate) {
+        return relateMapper.selectList(relate);
+    }
+
+    @Transactional
+    @Override
+    public AjaxResult add(Relate relate) {
+        Company company = companyService.getById(relate.getCompanyId());
+        if (company == null || company.getState() == 1) {
+            return AjaxResult.error("企业不存在或停用");
+        }
+        relate.setUserId(AppUtil.getUser().getId());
+        Relate check = relateMapper.check(relate);
+        if (check != null) {
+            return AjaxResult.error("你已关联该企业");
+        }
+        save(relate);
+        return AjaxResult.success();
+    }
+}

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/UserServiceImpl.java

@@ -64,7 +64,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
     @Override
     public AjaxResult authentication(AuthenticationDto dto) {
         User user = getById(AppUtil.getUser().getId());
-        if (user.getIsAuthentication() == 2) {
+        if (user.getIsAuthentication() == 1) {
             return AjaxResult.error("已经认证通过");
         }
         BeanUtils.copyProperties(dto, user);

+ 16 - 0
ruoyi-admin/src/main/resources/mapper/work/RelateMapper.xml

@@ -0,0 +1,16 @@
+<?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.ruoyi.web.work.mapper.RelateMapper">
+    
+    <select id="selectList" resultType="com.ruoyi.web.work.domain.Relate">
+        select * from tb_relate
+        <where>  
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="companyId != null "> and company_id = #{companyId}</if>
+            <if test="state != null "> and state = #{state}</if>
+        </where>
+    </select>
+
+</mapper>