Browse Source

+ 与会企业行程

chen.cheng 11 months ago
parent
commit
11aa1cede7

+ 9 - 3
pom.xml

@@ -3,7 +3,7 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 	<modelVersion>4.0.0</modelVersion>
-	
+
     <groupId>com.ruoyi</groupId>
     <artifactId>ruoyi</artifactId>
     <version>3.8.8</version>
@@ -11,7 +11,7 @@
     <name>ruoyi</name>
     <url>http://www.ruoyi.vip</url>
     <description>若依管理系统</description>
-    
+
     <properties>
         <ruoyi.version>3.8.8</ruoyi.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -31,6 +31,7 @@
         <poi.version>4.1.2</poi.version>
         <velocity.version>2.3</velocity.version>
         <jwt.version>0.9.1</jwt.version>
+        <forest.version>1.5.9</forest.version>
     </properties>
 
     <!-- 依赖声明 -->
@@ -182,6 +183,11 @@
                 <version>${ruoyi.version}</version>
             </dependency>
 
+            <dependency>
+                <groupId>com.dtflys.forest</groupId>
+                <artifactId>forest-spring-boot-starter</artifactId>
+                <version>${forest.version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 
@@ -235,4 +241,4 @@
         </pluginRepository>
     </pluginRepositories>
 
-</project>
+</project>

+ 11 - 8
ruoyi-admin/pom.xml

@@ -60,7 +60,10 @@
             <groupId>com.ruoyi</groupId>
             <artifactId>ruoyi-generator</artifactId>
         </dependency>
-
+        <dependency>
+            <groupId>com.dtflys.forest</groupId>
+            <artifactId>forest-spring-boot-starter</artifactId>
+        </dependency>
     </dependencies>
 
     <build>
@@ -80,17 +83,17 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>   
-                <groupId>org.apache.maven.plugins</groupId>   
-                <artifactId>maven-war-plugin</artifactId>   
-                <version>3.1.0</version>   
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>3.1.0</version>
                 <configuration>
                     <failOnMissingWebXml>false</failOnMissingWebXml>
                     <warName>${project.artifactId}</warName>
-                </configuration>   
-           </plugin>   
+                </configuration>
+           </plugin>
         </plugins>
         <finalName>${project.artifactId}</finalName>
     </build>
 
-</project>
+</project>

+ 2 - 0
ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java

@@ -1,5 +1,6 @@
 package com.ruoyi;
 
+import com.dtflys.forest.springboot.annotation.ForestScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
@@ -10,6 +11,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
  * @author ruoyi
  */
 @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
+@ForestScan(basePackages = "com.ruoyi.system.rest")
 public class RuoYiApplication
 {
     public static void main(String[] args)

+ 5 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/cp/CpsContentInfoController.java

@@ -8,7 +8,10 @@ import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.system.domain.CpsContentInfo;
+import com.ruoyi.system.domain.vo.WeChatVO;
+import com.ruoyi.system.rest.WechatService;
 import com.ruoyi.system.service.ICpsContentInfoService;
+import com.ruoyi.web.core.config.WeChatCfg;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.DeleteMapping;
@@ -22,6 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
 
 import javax.servlet.http.HttpServletResponse;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 发布内容Controller
@@ -47,6 +51,7 @@ public class CpsContentInfoController extends BaseController {
         return getDataTable(list);
     }
 
+
     /**
      * 导出发布内容列表
      */

+ 134 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/cp/CpsMeetingUsrController.java

@@ -0,0 +1,134 @@
+package com.ruoyi.web.controller.cp;
+
+import com.ruoyi.common.annotation.Anonymous;
+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.domain.model.WeChatUser;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.framework.web.service.TokenService;
+import com.ruoyi.system.domain.CpsMeetingUsr;
+import com.ruoyi.system.domain.vo.WeChatVO;
+import com.ruoyi.system.rest.WechatService;
+import com.ruoyi.system.service.ICpsMeetingUsrService;
+import com.ruoyi.web.core.config.WeChatCfg;
+import org.apache.commons.collections4.MapUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.web.bind.annotation.CrossOrigin;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * cps_meeting_usr与会人员信息Controller
+ *
+ * @author ruoyi
+ * @date 2024-08-18
+ */
+@RestController
+@CrossOrigin
+@RequestMapping("/cp/usr")
+public class CpsMeetingUsrController extends BaseController {
+    @Autowired
+    private ICpsMeetingUsrService cpsMeetingUsrService;
+
+
+    @Autowired
+    private WeChatCfg weChatCfg;
+
+    @Autowired
+    private WechatService wechatService;
+
+    @Autowired
+    private TokenService tokenService;
+
+    @PostMapping("/wx/login")
+    @Anonymous
+    public AjaxResult login(@RequestBody WeChatUser wxUser) {
+        Map session = wechatService.getSession(weChatCfg.getAppid(), weChatCfg.getAppSecret(), wxUser.getCode());
+        String openId = MapUtils.getString(session, "openid");
+        String sessionKey = MapUtils.getString(session, "session_key");
+        wxUser.setOpenid(openId);
+        wxUser.setSessionKey(sessionKey);
+        CpsMeetingUsr weChatUser = cpsMeetingUsrService.getWeChatUser(wxUser);
+        UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(wxUser.getOpenid(), wxUser.getSessionKey());
+        authenticationToken.setDetails(wxUser);
+        SecurityContextHolder.getContext().setAuthentication(authenticationToken);
+        String token = tokenService.createToken(wxUser);
+        // 生成token
+        return AjaxResult.success(new HashMap<String, Object>() {{
+            put("token", token);
+            put("user", weChatUser);
+        }});
+    }
+
+    /**
+     * 查询cps_meeting_usr与会人员信息列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(CpsMeetingUsr cpsMeetingUsr) {
+        startPage();
+        List<CpsMeetingUsr> list = cpsMeetingUsrService.selectCpsMeetingUsrList(cpsMeetingUsr);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出cps_meeting_usr与会人员信息列表
+     */
+    @Log(title = "cps_meeting_usr与会人员信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, CpsMeetingUsr cpsMeetingUsr) {
+        List<CpsMeetingUsr> list = cpsMeetingUsrService.selectCpsMeetingUsrList(cpsMeetingUsr);
+        ExcelUtil<CpsMeetingUsr> util = new ExcelUtil<CpsMeetingUsr>(CpsMeetingUsr.class);
+        util.exportExcel(response, list, "cps_meeting_usr与会人员信息数据");
+    }
+
+    /**
+     * 获取cps_meeting_usr与会人员信息详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(cpsMeetingUsrService.selectCpsMeetingUsrById(id));
+    }
+
+    /**
+     * 新增cps_meeting_usr与会人员信息
+     */
+    @Log(title = "cps_meeting_usr与会人员信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody CpsMeetingUsr cpsMeetingUsr) {
+        return toAjax(cpsMeetingUsrService.insertCpsMeetingUsr(cpsMeetingUsr));
+    }
+
+    /**
+     * 修改cps_meeting_usr与会人员信息
+     */
+    @Log(title = "cps_meeting_usr与会人员信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody CpsMeetingUsr cpsMeetingUsr) {
+        return toAjax(cpsMeetingUsrService.updateCpsMeetingUsr(cpsMeetingUsr));
+    }
+
+    /**
+     * 删除cps_meeting_usr与会人员信息
+     */
+    @Log(title = "cps_meeting_usr与会人员信息", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(cpsMeetingUsrService.deleteCpsMeetingUsrByIds(ids));
+    }
+}

+ 27 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/core/config/WeChatCfg.java

@@ -0,0 +1,27 @@
+package com.ruoyi.web.core.config;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+@ConfigurationProperties(prefix = "wechat")
+public class WeChatCfg {
+    private String appid;
+    private String appSecret;
+
+    public String getAppid() {
+        return appid;
+    }
+
+    public void setAppid(String appid) {
+        this.appid = appid;
+    }
+
+    public String getAppSecret() {
+        return appSecret;
+    }
+
+    public void setAppSecret(String appSecret) {
+        this.appSecret = appSecret;
+    }
+}

+ 3 - 0
ruoyi-admin/src/main/resources/application-hm.yml

@@ -81,3 +81,6 @@ spring:
         wall:
           config:
             multi-statement-allow: true
+wechat:
+  appid: wxf385eefdd03327fd
+  app-secret: 7bca97ad298a17539c7c75a5bf337063

+ 13 - 2
ruoyi-admin/src/main/resources/application.yml

@@ -65,8 +65,19 @@ spring:
     restart:
       # 热部署开关
       enabled: true
-
-
+forest:
+  max-connections: 1000        # 连接池最大连接数
+  connect-timeout: 3000        # 连接超时时间,单位为毫秒
+  read-timeout: 3000           # 数据读取超时时间,单位为毫秒
+  backend: okhttp3 # 配置后端HTTP API为 okhttp3
+  ## 日志总开关,打开/关闭Forest请求/响应日志(默认为 true)
+  log-enabled: true
+  ## 打开/关闭Forest请求日志(默认为 true)
+  log-request: true
+  ## 打开/关闭Forest响应状态日志(默认为 true)
+  log-response-status: true
+  ## 打开/关闭Forest响应内容日志(默认为 false)
+  log-response-content: true
 # token配置
 token:
   # 令牌自定义标识

+ 7 - 7
ruoyi-admin/src/main/resources/logback.xml

@@ -11,7 +11,7 @@
 			<pattern>${log.pattern}</pattern>
 		</encoder>
 	</appender>
-	
+
 	<!-- 系统日志输出 -->
 	<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
 	    <file>${log.path}/sys-info.log</file>
@@ -34,7 +34,7 @@
             <onMismatch>DENY</onMismatch>
         </filter>
 	</appender>
-	
+
 	<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
 	    <file>${log.path}/sys-error.log</file>
         <!-- 循环政策:基于时间创建日志文件 -->
@@ -56,7 +56,7 @@
             <onMismatch>DENY</onMismatch>
         </filter>
     </appender>
-	
+
 	<!-- 用户访问日志输出  -->
     <appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender">
 		<file>${log.path}/sys-user.log</file>
@@ -70,7 +70,7 @@
             <pattern>${log.pattern}</pattern>
         </encoder>
     </appender>
-	
+
 	<!-- 系统模块日志级别控制  -->
 	<logger name="com.ruoyi" level="info" />
 	<!-- Spring日志级别控制  -->
@@ -79,15 +79,15 @@
 	<root level="info">
 		<appender-ref ref="console" />
 	</root>
-	
+
 	<!--系统操作日志-->
     <root level="info">
         <appender-ref ref="file_info" />
         <appender-ref ref="file_error" />
     </root>
-	
+
 	<!--系统用户操作日志-->
     <logger name="sys-user" level="info">
         <appender-ref ref="sys-user"/>
     </logger>
-</configuration> 
+</configuration>

+ 113 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/WeChatUser.java

@@ -0,0 +1,113 @@
+package com.ruoyi.common.core.domain.model;
+
+public class WeChatUser extends LoginUser {
+    private static final long serialVersionUID = 1L;
+
+
+    /**
+     * 用户的唯一标识
+     */
+    private String openid;
+
+    /**
+     * 微信会话秘钥
+     */
+    private String sessionKey;
+
+    /**
+     * 昵称
+     */
+    private String nickName;
+
+    /**
+     * 手机号码
+     */
+    private String tel;
+
+    /**
+     * 性别,0-未知 1-男性,2-女性
+     */
+    private Integer gender;
+    private String region;
+
+    /**
+     * 用户头像URL
+     */
+    private String avatarUrl;
+
+    private String code;
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getOpenid() {
+        return openid;
+    }
+
+    public void setOpenid(String openid) {
+        this.openid = openid;
+    }
+
+    public String getSessionKey() {
+        return sessionKey;
+    }
+
+    public void setSessionKey(String sessionKey) {
+        this.sessionKey = sessionKey;
+    }
+
+    public String getNickName() {
+        return nickName;
+    }
+
+    public void setNickName(String nickName) {
+        this.nickName = nickName;
+    }
+
+    public String getTel() {
+        return tel;
+    }
+
+    public void setTel(String tel) {
+        this.tel = tel;
+    }
+
+    public Integer getGender() {
+        return gender;
+    }
+
+    public void setGender(Integer gender) {
+        this.gender = gender;
+    }
+
+    public String getRegion() {
+        return region;
+    }
+
+    public void setRegion(String region) {
+        this.region = region;
+    }
+
+    public String getAvatarUrl() {
+        return avatarUrl;
+    }
+
+    public void setAvatarUrl(String avatarUrl) {
+        this.avatarUrl = avatarUrl;
+    }
+
+    @Override
+    public String getUsername() {
+        return this.openid;
+    }
+
+    @Override
+    public String getPassword() {
+        return this.sessionKey;
+    }
+}

+ 5 - 1
ruoyi-system/pom.xml

@@ -22,7 +22,11 @@
             <groupId>com.ruoyi</groupId>
             <artifactId>ruoyi-common</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.dtflys.forest</groupId>
+            <artifactId>forest-spring-boot-starter</artifactId>
+        </dependency>
 
     </dependencies>
 
-</project>
+</project>

+ 133 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/CpsMeetingUsr.java

@@ -0,0 +1,133 @@
+package com.ruoyi.system.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * cps_meeting_usr与会人员信息对象 cps_meeting_usr
+ *
+ * @author ruoyi
+ * @date 2024-08-18
+ */
+public class CpsMeetingUsr extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 文件路径
+     */
+    @Excel(name = "文件路径")
+    private String usrName;
+
+    /**
+     * 文件名称
+     */
+    @Excel(name = "文件名称")
+    private String tel;
+
+    /**
+     * 微信开放id
+     */
+    @Excel(name = "微信开放id")
+    private String openId;
+
+    /**
+     * 与会人员企业
+     */
+    @Excel(name = "与会人员企业")
+    private Long enterpriseId;
+
+    /**
+     * 参会行程信息
+     */
+    @Excel(name = "参会行程信息")
+    private Long tripId;
+
+    private String enterpriseName;
+    private String tripName;
+
+    private String avatarUrl;
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setUsrName(String usrName) {
+        this.usrName = usrName;
+    }
+
+    public String getUsrName() {
+        return usrName;
+    }
+
+    public void setTel(String tel) {
+        this.tel = tel;
+    }
+
+    public String getTel() {
+        return tel;
+    }
+
+    public void setOpenId(String openId) {
+        this.openId = openId;
+    }
+
+    public String getOpenId() {
+        return openId;
+    }
+
+    public void setEnterpriseId(Long enterpriseId) {
+        this.enterpriseId = enterpriseId;
+    }
+
+    public Long getEnterpriseId() {
+        return enterpriseId;
+    }
+
+    public void setTripId(Long tripId) {
+        this.tripId = tripId;
+    }
+
+    public Long getTripId() {
+        return tripId;
+    }
+
+    public String getEnterpriseName() {
+        return enterpriseName;
+    }
+
+    public void setEnterpriseName(String enterpriseName) {
+        this.enterpriseName = enterpriseName;
+    }
+
+    public String getTripName() {
+        return tripName;
+    }
+
+    public void setTripName(String tripName) {
+        this.tripName = tripName;
+    }
+
+    public String getAvatarUrl() {
+        return avatarUrl;
+    }
+
+    public void setAvatarUrl(String avatarUrl) {
+        this.avatarUrl = avatarUrl;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId()).append("usrName", getUsrName()).append("tel", getTel()).append("openId", getOpenId()).append("enterpriseId", getEnterpriseId()).append("tripId", getTripId()).append("updateTime", getUpdateTime()).append("createTime", getCreateTime()).append("createBy", getCreateBy()).append("updateBy", getUpdateBy()).toString();
+    }
+}

+ 13 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/WeChatVO.java

@@ -0,0 +1,13 @@
+package com.ruoyi.system.domain.vo;
+
+public class WeChatVO {
+    private String code;
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+}

+ 63 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/CpsMeetingUsrMapper.java

@@ -0,0 +1,63 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.CpsMeetingUsr;
+
+import java.util.List;
+
+/**
+ * cps_meeting_usr与会人员信息Mapper接口
+ *
+ * @author ruoyi
+ * @date 2024-08-18
+ */
+public interface CpsMeetingUsrMapper {
+    /**
+     * 查询cps_meeting_usr与会人员信息
+     *
+     * @param id cps_meeting_usr与会人员信息主键
+     * @return cps_meeting_usr与会人员信息
+     */
+    public CpsMeetingUsr selectCpsMeetingUsrById(Long id);
+
+    /**
+     * 查询cps_meeting_usr与会人员信息列表
+     *
+     * @param cpsMeetingUsr cps_meeting_usr与会人员信息
+     * @return cps_meeting_usr与会人员信息集合
+     */
+    public List<CpsMeetingUsr> selectCpsMeetingUsrList(CpsMeetingUsr cpsMeetingUsr);
+
+    /**
+     * 新增cps_meeting_usr与会人员信息
+     *
+     * @param cpsMeetingUsr cps_meeting_usr与会人员信息
+     * @return 结果
+     */
+    public int insertCpsMeetingUsr(CpsMeetingUsr cpsMeetingUsr);
+
+    /**
+     * 修改cps_meeting_usr与会人员信息
+     *
+     * @param cpsMeetingUsr cps_meeting_usr与会人员信息
+     * @return 结果
+     */
+    public int updateCpsMeetingUsr(CpsMeetingUsr cpsMeetingUsr);
+
+    /**
+     * 删除cps_meeting_usr与会人员信息
+     *
+     * @param id cps_meeting_usr与会人员信息主键
+     * @return 结果
+     */
+    public int deleteCpsMeetingUsrById(Long id);
+
+    /**
+     * 批量删除cps_meeting_usr与会人员信息
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteCpsMeetingUsrByIds(Long[] ids);
+
+    public Integer exitUser(String openId);
+}

+ 13 - 0
ruoyi-system/src/main/java/com/ruoyi/system/rest/WechatService.java

@@ -0,0 +1,13 @@
+package com.ruoyi.system.rest;
+
+import com.dtflys.forest.annotation.BaseRequest;
+import com.dtflys.forest.annotation.Get;
+import com.dtflys.forest.annotation.Var;
+
+import java.util.Map;
+
+@BaseRequest(baseURL = "https://api.weixin.qq.com", sslProtocol = "TLS")
+public interface WechatService {
+    @Get(url = "/sns/jscode2session?appid={APPID}&secret={APP_SECRET}&js_code={code}&grant_type=authorization_code", dataType = "json")
+    Map getSession(@Var("APPID") String appid, @Var("APP_SECRET") String appSecret, @Var("code") String code);
+}

+ 67 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ICpsMeetingUsrService.java

@@ -0,0 +1,67 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.common.core.domain.model.WeChatUser;
+import com.ruoyi.system.domain.CpsMeetingUsr;
+
+import java.util.List;
+
+/**
+ * cps_meeting_usr与会人员信息Service接口
+ *
+ * @author ruoyi
+ * @date 2024-08-18
+ */
+public interface ICpsMeetingUsrService {
+    /**
+     * 查询cps_meeting_usr与会人员信息
+     *
+     * @param id cps_meeting_usr与会人员信息主键
+     * @return cps_meeting_usr与会人员信息
+     */
+    public CpsMeetingUsr selectCpsMeetingUsrById(Long id);
+
+    /**
+     * 查询cps_meeting_usr与会人员信息列表
+     *
+     * @param cpsMeetingUsr cps_meeting_usr与会人员信息
+     * @return cps_meeting_usr与会人员信息集合
+     */
+    public List<CpsMeetingUsr> selectCpsMeetingUsrList(CpsMeetingUsr cpsMeetingUsr);
+
+    /**
+     * 新增cps_meeting_usr与会人员信息
+     *
+     * @param cpsMeetingUsr cps_meeting_usr与会人员信息
+     * @return 结果
+     */
+    public int insertCpsMeetingUsr(CpsMeetingUsr cpsMeetingUsr);
+
+    /**
+     * 修改cps_meeting_usr与会人员信息
+     *
+     * @param cpsMeetingUsr cps_meeting_usr与会人员信息
+     * @return 结果
+     */
+    public int updateCpsMeetingUsr(CpsMeetingUsr cpsMeetingUsr);
+
+    /**
+     * 批量删除cps_meeting_usr与会人员信息
+     *
+     * @param ids 需要删除的cps_meeting_usr与会人员信息主键集合
+     * @return 结果
+     */
+    public int deleteCpsMeetingUsrByIds(Long[] ids);
+
+    /**
+     * 删除cps_meeting_usr与会人员信息信息
+     *
+     * @param id cps_meeting_usr与会人员信息主键
+     * @return 结果
+     */
+    public int deleteCpsMeetingUsrById(Long id);
+
+    Boolean existCpsMeetingUsr(String openId);
+
+    CpsMeetingUsr getWeChatUser(WeChatUser user);
+
+}

+ 113 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CpsMeetingUsrServiceImpl.java

@@ -0,0 +1,113 @@
+package com.ruoyi.system.service.impl;
+
+import com.ruoyi.common.core.domain.model.WeChatUser;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.CpsMeetingUsr;
+import com.ruoyi.system.mapper.CpsMeetingUsrMapper;
+import com.ruoyi.system.service.ICpsMeetingUsrService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * cps_meeting_usr与会人员信息Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2024-08-18
+ */
+@Service
+public class CpsMeetingUsrServiceImpl implements ICpsMeetingUsrService {
+    @Autowired
+    private CpsMeetingUsrMapper cpsMeetingUsrMapper;
+
+    /**
+     * 查询cps_meeting_usr与会人员信息
+     *
+     * @param id cps_meeting_usr与会人员信息主键
+     * @return cps_meeting_usr与会人员信息
+     */
+    @Override
+    public CpsMeetingUsr selectCpsMeetingUsrById(Long id) {
+        return cpsMeetingUsrMapper.selectCpsMeetingUsrById(id);
+    }
+
+    /**
+     * 查询cps_meeting_usr与会人员信息列表
+     *
+     * @param cpsMeetingUsr cps_meeting_usr与会人员信息
+     * @return cps_meeting_usr与会人员信息
+     */
+    @Override
+    public List<CpsMeetingUsr> selectCpsMeetingUsrList(CpsMeetingUsr cpsMeetingUsr) {
+        return cpsMeetingUsrMapper.selectCpsMeetingUsrList(cpsMeetingUsr);
+    }
+
+    /**
+     * 新增cps_meeting_usr与会人员信息
+     *
+     * @param cpsMeetingUsr cps_meeting_usr与会人员信息
+     * @return 结果
+     */
+    @Override
+    public int insertCpsMeetingUsr(CpsMeetingUsr cpsMeetingUsr) {
+        cpsMeetingUsr.setCreateTime(DateUtils.getNowDate());
+        return cpsMeetingUsrMapper.insertCpsMeetingUsr(cpsMeetingUsr);
+    }
+
+    /**
+     * 修改cps_meeting_usr与会人员信息
+     *
+     * @param cpsMeetingUsr cps_meeting_usr与会人员信息
+     * @return 结果
+     */
+    @Override
+    public int updateCpsMeetingUsr(CpsMeetingUsr cpsMeetingUsr) {
+        cpsMeetingUsr.setUpdateTime(DateUtils.getNowDate());
+        return cpsMeetingUsrMapper.updateCpsMeetingUsr(cpsMeetingUsr);
+    }
+
+    /**
+     * 批量删除cps_meeting_usr与会人员信息
+     *
+     * @param ids 需要删除的cps_meeting_usr与会人员信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCpsMeetingUsrByIds(Long[] ids) {
+        return cpsMeetingUsrMapper.deleteCpsMeetingUsrByIds(ids);
+    }
+
+    /**
+     * 删除cps_meeting_usr与会人员信息信息
+     *
+     * @param id cps_meeting_usr与会人员信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCpsMeetingUsrById(Long id) {
+        return cpsMeetingUsrMapper.deleteCpsMeetingUsrById(id);
+    }
+
+    @Override
+    public Boolean existCpsMeetingUsr(String openId) {
+        return cpsMeetingUsrMapper.exitUser(openId) > 0;
+    }
+
+    @Override
+    public CpsMeetingUsr getWeChatUser(WeChatUser wxUser) {
+        if (!existCpsMeetingUsr(wxUser.getOpenid())) {
+            CpsMeetingUsr cpsMeetingUsr = new CpsMeetingUsr() {{
+                setUsrName(wxUser.getNickName());
+                setOpenId(wxUser.getOpenid());
+                setTel(wxUser.getTel());
+                setAvatarUrl(wxUser.getAvatarUrl());
+            }};
+            insertCpsMeetingUsr(cpsMeetingUsr);
+            return cpsMeetingUsr;
+        }
+        return selectCpsMeetingUsrList(new CpsMeetingUsr() {{
+            setOpenId(wxUser.getOpenid());
+        }}).get(0);
+    }
+}

+ 119 - 0
ruoyi-system/src/main/resources/mapper/system/CpsMeetingUsrMapper.xml

@@ -0,0 +1,119 @@
+<?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.system.mapper.CpsMeetingUsrMapper">
+
+    <resultMap type="com.ruoyi.system.domain.CpsMeetingUsr" id="CpsMeetingUsrResult">
+        <result property="id" column="id"/>
+        <result property="usrName" column="usr_name"/>
+        <result property="tel" column="tel"/>
+        <result property="openId" column="open_id"/>
+        <result property="enterpriseId" column="enterprise_id"/>
+        <result property="tripId" column="trip_id"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="createTime" column="create_time"/>
+        <result property="createBy" column="create_by"/>
+        <result property="updateBy" column="update_by"/>
+    </resultMap>
+
+    <sql id="selectCpsMeetingUsrVo">
+        SELECT usr.id,
+               usr_name,
+               usr.tel,
+               open_id,
+               usr.enterprise_id,
+               usr.trip_id,
+               trip.trip_name,
+               avatar_url,
+               enterprise.enterprise_name,
+               usr.update_time,
+               usr.create_time,
+               usr.create_by,
+               usr.update_by
+        FROM cps_meeting_usr usr
+                 LEFT JOIN cps_meeting_enterprise enterprise ON usr.enterprise_id = enterprise.id
+                 LEFT JOIN cps_meeting_enterprise_trip_info trip ON usr.trip_id = trip.id
+    </sql>
+
+    <select id="selectCpsMeetingUsrList" parameterType="com.ruoyi.system.domain.CpsMeetingUsr"
+            resultType="com.ruoyi.system.domain.CpsMeetingUsr">
+        <include refid="selectCpsMeetingUsrVo"/>
+        <where>
+            <if test="usrName != null  and usrName != ''">and usr_name like concat('%', #{usrName}, '%')</if>
+            <if test="tel != null  and tel != ''">and usr.tel = #{tel}</if>
+            <if test="openId != null  and openId != ''">and open_id = #{openId}</if>
+            <if test="enterpriseId != null ">and usr.enterprise_id = #{enterpriseId}</if>
+            <if test="tripId != null ">and usr.trip_id = #{tripId}</if>
+        </where>
+    </select>
+
+    <select id="selectCpsMeetingUsrById" parameterType="Long" resultMap="CpsMeetingUsrResult">
+        <include refid="selectCpsMeetingUsrVo"/>
+        where usr.id = #{id}
+    </select>
+
+    <insert id="insertCpsMeetingUsr" parameterType="com.ruoyi.system.domain.CpsMeetingUsr" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into cps_meeting_usr
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="usrName != null">usr_name,</if>
+            <if test="tel != null">tel,</if>
+            <if test="openId != null">open_id,</if>
+            <if test="enterpriseId != null">enterprise_id,</if>
+            <if test="tripId != null">trip_id,</if>
+            <if test="avatarUrl != null">avatar_url,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="usrName != null">#{usrName},</if>
+            <if test="tel != null">#{tel},</if>
+            <if test="openId != null">#{openId},</if>
+            <if test="enterpriseId != null">#{enterpriseId},</if>
+            <if test="tripId != null">#{tripId},</if>
+            <if test="avatarUrl != null">#{avatarUrl},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+        </trim>
+    </insert>
+
+    <update id="updateCpsMeetingUsr" parameterType="com.ruoyi.system.domain.CpsMeetingUsr">
+        update cps_meeting_usr
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="usrName != null">usr_name = #{usrName},</if>
+            <if test="tel != null">tel = #{tel},</if>
+            <if test="openId != null">open_id = #{openId},</if>
+            <if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
+            <if test="tripId != null">trip_id = #{tripId},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCpsMeetingUsrById" parameterType="Long">
+        delete
+        from cps_meeting_usr
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteCpsMeetingUsrByIds" parameterType="String">
+        delete from cps_meeting_usr where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    <select id="exitUser" resultType="java.lang.Integer">
+        -- 判断是否存在openid的数据
+        select count(1)
+        from cps_meeting_usr
+        where open_id = #{openId}
+    </select>
+</mapper>

+ 1 - 1
ruoyi-ui/src/views/cp/fileInfo/index.vue

@@ -115,7 +115,7 @@
           <file-upload v-model="form.uri"
                        :limit="1"
                        :file-size="50"
-                       :file-type='[ "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt","pdf", "mp4","svg"]'
+                       :file-type='[ "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt","pdf", "mp4","svg","png"]'
                        @input="fileInputCall" />
         </el-form-item>
         <el-form-item label="文件名称" prop="fileName">