LIVE_YE %!s(int64=2) %!d(string=hai) anos
pai
achega
ba08189fc5
Modificáronse 18 ficheiros con 1313 adicións e 2 borrados
  1. 108 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/enterprise/EnterpriseApplyController.java
  2. 104 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/enterprise/EnterprisePhotoController.java
  3. 9 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/kaoqin/RecordInfoController.java
  4. 202 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/EnterpriseApply.java
  5. 80 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/EnterprisePhoto.java
  6. 8 1
      ruoyi-system/src/main/java/com/ruoyi/system/domain/RecordInfo.java
  7. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/EnterpriseApplyMapper.java
  8. 63 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/EnterprisePhotoMapper.java
  9. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/RecordInfoMapper.java
  10. 63 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IEnterpriseApplyService.java
  11. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IEnterprisePhotoService.java
  12. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IRecordInfoService.java
  13. 213 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/EnterpriseApplyServiceImpl.java
  14. 93 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/EnterprisePhotoServiceImpl.java
  15. 11 1
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RecordInfoServiceImpl.java
  16. 141 0
      ruoyi-system/src/main/resources/mapper/system/EnterpriseApplyMapper.xml
  17. 74 0
      ruoyi-system/src/main/resources/mapper/system/EnterprisePhotoMapper.xml
  18. 18 0
      ruoyi-system/src/main/resources/mapper/system/RecordInfoMapper.xml

+ 108 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/enterprise/EnterpriseApplyController.java

@@ -0,0 +1,108 @@
+package com.ruoyi.web.controller.enterprise;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.EnterpriseApply;
+import com.ruoyi.system.service.IEnterpriseApplyService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 企业信息审核Controller
+ * 
+ * @author ruoyi
+ * @date 2023-02-20
+ */
+@RestController
+@RequestMapping("/system/apply")
+public class EnterpriseApplyController extends BaseController
+{
+    @Autowired
+    private IEnterpriseApplyService enterpriseApplyService;
+
+    /**
+     * 查询企业信息审核列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(EnterpriseApply enterpriseApply)
+    {
+        startPage();
+        List<EnterpriseApply> list = enterpriseApplyService.selectEnterpriseApplyList(enterpriseApply);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出企业信息审核列表
+     */
+    @Log(title = "企业信息审核", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, EnterpriseApply enterpriseApply)
+    {
+        List<EnterpriseApply> list = enterpriseApplyService.selectEnterpriseApplyList(enterpriseApply);
+        ExcelUtil<EnterpriseApply> util = new ExcelUtil<EnterpriseApply>(EnterpriseApply.class);
+        util.exportExcel(response, list, "企业信息审核数据");
+    }
+
+    /**
+     * 获取企业信息审核详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(enterpriseApplyService.selectEnterpriseApplyById(id));
+    }
+
+    /**
+     * 新增企业信息审核
+     */
+    @Log(title = "企业信息审核", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody EnterpriseApply enterpriseApply)
+    {
+        return toAjax(enterpriseApplyService.insertEnterpriseApply(enterpriseApply));
+    }
+
+    /**
+     * 修改企业信息审核
+     */
+    @Log(title = "企业信息审核", businessType = BusinessType.UPDATE)
+    @PostMapping(value = "/update")
+    public AjaxResult update(@RequestBody EnterpriseApply enterpriseApply)
+    {
+        return toAjax(enterpriseApplyService.updateEnterpriseApply(enterpriseApply));
+    }
+
+    /**
+     * 企业信息审核
+     */
+    @Log(title = "企业信息审核", businessType = BusinessType.UPDATE)
+    @PostMapping(value = "/put")
+    public AjaxResult edit(@RequestBody EnterpriseApply enterpriseApply)
+    {
+        return toAjax(enterpriseApplyService.edit(enterpriseApply));
+    }
+
+    /**
+     * 删除企业信息审核
+     */
+    @Log(title = "企业信息审核", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(enterpriseApplyService.deleteEnterpriseApplyByIds(ids));
+    }
+}

+ 104 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/enterprise/EnterprisePhotoController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.web.controller.enterprise;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.EnterprisePhoto;
+import com.ruoyi.system.service.IEnterprisePhotoService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 企业文件信息Controller
+ * 
+ * @author ruoyi
+ * @date 2023-02-20
+ */
+@RestController
+@RequestMapping("/system/photo")
+public class EnterprisePhotoController extends BaseController
+{
+    @Autowired
+    private IEnterprisePhotoService enterprisePhotoService;
+
+    /**
+     * 查询企业文件信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:photo:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(EnterprisePhoto enterprisePhoto)
+    {
+        startPage();
+        List<EnterprisePhoto> list = enterprisePhotoService.selectEnterprisePhotoList(enterprisePhoto);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出企业文件信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:photo:export')")
+    @Log(title = "企业文件信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, EnterprisePhoto enterprisePhoto)
+    {
+        List<EnterprisePhoto> list = enterprisePhotoService.selectEnterprisePhotoList(enterprisePhoto);
+        ExcelUtil<EnterprisePhoto> util = new ExcelUtil<EnterprisePhoto>(EnterprisePhoto.class);
+        util.exportExcel(response, list, "企业文件信息数据");
+    }
+
+    /**
+     * 获取企业文件信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:photo:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(enterprisePhotoService.selectEnterprisePhotoById(id));
+    }
+
+    /**
+     * 新增企业文件信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:photo:add')")
+    @Log(title = "企业文件信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody EnterprisePhoto enterprisePhoto)
+    {
+        return toAjax(enterprisePhotoService.insertEnterprisePhoto(enterprisePhoto));
+    }
+
+    /**
+     * 修改企业文件信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:photo:edit')")
+    @Log(title = "企业文件信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody EnterprisePhoto enterprisePhoto)
+    {
+        return toAjax(enterprisePhotoService.updateEnterprisePhoto(enterprisePhoto));
+    }
+
+    /**
+     * 删除企业文件信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:photo:remove')")
+    @Log(title = "企业文件信息", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(enterprisePhotoService.deleteEnterprisePhotoByIds(ids));
+    }
+}

+ 9 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/kaoqin/RecordInfoController.java

@@ -113,6 +113,15 @@ public class  RecordInfoController extends BaseController
         return recordInfoService.numberInfo();
     }
 
+    /***
+     * 查询未读消息条数
+     */
+    @GetMapping("/number")
+    public AjaxResult number()
+    {
+        return recordInfoService.number();
+    }
+
     /**
      * 将消息改为已读状态
      */

+ 202 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/EnterpriseApply.java

@@ -0,0 +1,202 @@
+package com.ruoyi.system.domain;
+
+import com.ruoyi.common.core.domain.entity.SysRole;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+import java.util.List;
+
+/**
+ * 企业信息审核对象 enterprise_apply
+ * 
+ * @author ruoyi
+ * @date 2023-02-20
+ */
+public class EnterpriseApply extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 企业名称 */
+    @Excel(name = "企业名称")
+    private String name;
+
+    /** 统一社会信用代码 */
+    @Excel(name = "统一社会信用代码")
+    private String coding;
+
+    /** 法人名称 */
+    @Excel(name = "法人名称")
+    private String legalPersonName;
+
+    /** 证件类型 1:身份证号码,2:护照,3:港澳通行证 */
+    @Excel(name = "证件类型 1:身份证号码,2:护照,3:港澳通行证")
+    private String cardType;
+
+    /** 法人证件号 */
+    @Excel(name = "法人证件号")
+    private String legalPersonCard;
+
+    /** 法人联系号码 */
+    @Excel(name = "法人联系号码")
+    private String phone;
+
+    /** 审核结果,0: 未操作 1:不同意,2:同意 */
+    @Excel(name = "审核结果,0: 未操作 1:不同意,2:同意")
+    private String isAudit;
+
+    /** 申请人id */
+    private Long userId;
+
+    /** 申请人姓名 */
+    @Excel(name = "申请人姓名")
+    private String userName;
+
+    /** 申请人手机号 */
+    @Excel(name = "申请人手机号")
+    private String userPhone;
+
+    /** 审核意见 */
+    @Excel(name = "审核意见")
+    private String auditOpinion;
+
+    private List<EnterprisePhoto> enterprisePhotoList;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
+    public void setCoding(String coding) 
+    {
+        this.coding = coding;
+    }
+
+    public String getCoding() 
+    {
+        return coding;
+    }
+    public void setLegalPersonName(String legalPersonName) 
+    {
+        this.legalPersonName = legalPersonName;
+    }
+
+    public String getLegalPersonName() 
+    {
+        return legalPersonName;
+    }
+    public void setCardType(String cardType) 
+    {
+        this.cardType = cardType;
+    }
+
+    public String getCardType() 
+    {
+        return cardType;
+    }
+    public void setLegalPersonCard(String legalPersonCard) 
+    {
+        this.legalPersonCard = legalPersonCard;
+    }
+
+    public String getLegalPersonCard() 
+    {
+        return legalPersonCard;
+    }
+    public void setPhone(String phone) 
+    {
+        this.phone = phone;
+    }
+
+    public String getPhone() 
+    {
+        return phone;
+    }
+    public void setIsAudit(String isAudit) 
+    {
+        this.isAudit = isAudit;
+    }
+
+    public String getIsAudit() 
+    {
+        return isAudit;
+    }
+    public void setAuditOpinion(String auditOpinion) 
+    {
+        this.auditOpinion = auditOpinion;
+    }
+
+    public String getAuditOpinion() 
+    {
+        return auditOpinion;
+    }
+
+    public List<EnterprisePhoto> getEnterprisePhotoList() {
+        return enterprisePhotoList;
+    }
+
+    public void setEnterprisePhotoList(List<EnterprisePhoto> enterprisePhotoList) {
+        this.enterprisePhotoList = enterprisePhotoList;
+    }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public String getUserPhone() {
+        return userPhone;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public void setUserPhone(String userPhone) {
+        this.userPhone = userPhone;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("name", getName())
+            .append("coding", getCoding())
+            .append("legalPersonName", getLegalPersonName())
+            .append("cardType", getCardType())
+            .append("legalPersonCard", getLegalPersonCard())
+            .append("phone", getPhone())
+            .append("isAudit", getIsAudit())
+            .append("auditOpinion", getAuditOpinion())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 80 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/EnterprisePhoto.java

@@ -0,0 +1,80 @@
+package com.ruoyi.system.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 企业文件信息对象 enterprise_photo
+ * 
+ * @author ruoyi
+ * @date 2023-02-20
+ */
+public class EnterprisePhoto extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 企业信息审核表id */
+    @Excel(name = "企业信息审核表id")
+    private Long enterpriseId;
+
+    /** 图片地址 */
+    @Excel(name = "图片地址")
+    private String path;
+
+    /** 图片类型 1:营业执照,2:身份证正面,3:身份证反面 */
+    @Excel(name = "图片类型 1:营业执照,2:身份证正面,3:身份证反面")
+    private String type;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setEnterpriseId(Long enterpriseId) 
+    {
+        this.enterpriseId = enterpriseId;
+    }
+
+    public Long getEnterpriseId() 
+    {
+        return enterpriseId;
+    }
+    public void setPath(String path) 
+    {
+        this.path = path;
+    }
+
+    public String getPath() 
+    {
+        return path;
+    }
+    public void setType(String type) 
+    {
+        this.type = type;
+    }
+
+    public String getType() 
+    {
+        return type;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("enterpriseId", getEnterpriseId())
+            .append("path", getPath())
+            .append("type", getType())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 8 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/RecordInfo.java

@@ -64,8 +64,11 @@ public class RecordInfo extends BaseEntity
 
     private Long userId;
 
+    public String getCertified() {
+        return certified;
+    }
 
-    public void setId(Long id) 
+    public void setId(Long id)
     {
         this.id = id;
     }
@@ -179,6 +182,10 @@ public class RecordInfo extends BaseEntity
         this.userId = userId;
     }
 
+    public void setCertified(String certified) {
+        this.certified = certified;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/EnterpriseApplyMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.EnterpriseApply;
+
+/**
+ * 企业信息审核Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-02-20
+ */
+public interface EnterpriseApplyMapper 
+{
+    /**
+     * 查询企业信息审核
+     * 
+     * @param id 企业信息审核主键
+     * @return 企业信息审核
+     */
+    public EnterpriseApply selectEnterpriseApplyById(Long id);
+
+    /**
+     * 查询企业信息审核列表
+     * 
+     * @param enterpriseApply 企业信息审核
+     * @return 企业信息审核集合
+     */
+    public List<EnterpriseApply> selectEnterpriseApplyList(EnterpriseApply enterpriseApply);
+
+    /**
+     * 新增企业信息审核
+     * 
+     * @param enterpriseApply 企业信息审核
+     * @return 结果
+     */
+    public int insertEnterpriseApply(EnterpriseApply enterpriseApply);
+
+    /**
+     * 修改企业信息审核
+     * 
+     * @param enterpriseApply 企业信息审核
+     * @return 结果
+     */
+    public int updateEnterpriseApply(EnterpriseApply enterpriseApply);
+
+    /**
+     * 删除企业信息审核
+     * 
+     * @param id 企业信息审核主键
+     * @return 结果
+     */
+    public int deleteEnterpriseApplyById(Long id);
+
+    /**
+     * 批量删除企业信息审核
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteEnterpriseApplyByIds(Long[] ids);
+}

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

@@ -0,0 +1,63 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.EnterprisePhoto;
+
+/**
+ * 企业文件信息Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-02-20
+ */
+public interface EnterprisePhotoMapper 
+{
+    /**
+     * 查询企业文件信息
+     * 
+     * @param id 企业文件信息主键
+     * @return 企业文件信息
+     */
+    public EnterprisePhoto selectEnterprisePhotoById(Long id);
+
+    /**
+     * 查询企业文件信息列表
+     * 
+     * @param enterprisePhoto 企业文件信息
+     * @return 企业文件信息集合
+     */
+    public List<EnterprisePhoto> selectEnterprisePhotoList(EnterprisePhoto enterprisePhoto);
+
+    /**
+     * 新增企业文件信息
+     * 
+     * @param enterprisePhoto 企业文件信息
+     * @return 结果
+     */
+    public int insertEnterprisePhoto(EnterprisePhoto enterprisePhoto);
+
+    /**
+     * 修改企业文件信息
+     * 
+     * @param enterprisePhoto 企业文件信息
+     * @return 结果
+     */
+    public int updateEnterprisePhoto(EnterprisePhoto enterprisePhoto);
+
+    /**
+     * 删除企业文件信息
+     * 
+     * @param id 企业文件信息主键
+     * @return 结果
+     */
+    public int deleteEnterprisePhotoById(Long id);
+
+    /**
+     * 批量删除企业文件信息
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteEnterprisePhotoByIds(Long[] ids);
+
+    void deleteEnterprisePhotoByEnterpriseId(Long id);
+}

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/RecordInfoMapper.java

@@ -65,4 +65,6 @@ public interface RecordInfoMapper
     int updateRecordInfoIsChange(Long[] ids);
 
     void updateIsReadByAddresseeId(String userId);
+
+    int number(RecordInfo recordInfo);
 }

+ 63 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IEnterpriseApplyService.java

@@ -0,0 +1,63 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.EnterpriseApply;
+
+/**
+ * 企业信息审核Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-02-20
+ */
+public interface IEnterpriseApplyService 
+{
+    /**
+     * 查询企业信息审核
+     * 
+     * @param id 企业信息审核主键
+     * @return 企业信息审核
+     */
+    public EnterpriseApply selectEnterpriseApplyById(Long id);
+
+    /**
+     * 查询企业信息审核列表
+     * 
+     * @param enterpriseApply 企业信息审核
+     * @return 企业信息审核集合
+     */
+    public List<EnterpriseApply> selectEnterpriseApplyList(EnterpriseApply enterpriseApply);
+
+    /**
+     * 新增企业信息审核
+     * 
+     * @param enterpriseApply 企业信息审核
+     * @return 结果
+     */
+    public int insertEnterpriseApply(EnterpriseApply enterpriseApply);
+
+    /**
+     * 修改企业信息审核
+     * 
+     * @param enterpriseApply 企业信息审核
+     * @return 结果
+     */
+    public int updateEnterpriseApply(EnterpriseApply enterpriseApply);
+
+    /**
+     * 批量删除企业信息审核
+     * 
+     * @param ids 需要删除的企业信息审核主键集合
+     * @return 结果
+     */
+    public int deleteEnterpriseApplyByIds(Long[] ids);
+
+    /**
+     * 删除企业信息审核信息
+     * 
+     * @param id 企业信息审核主键
+     * @return 结果
+     */
+    public int deleteEnterpriseApplyById(Long id);
+
+    int edit(EnterpriseApply enterpriseApply);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IEnterprisePhotoService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.EnterprisePhoto;
+
+/**
+ * 企业文件信息Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-02-20
+ */
+public interface IEnterprisePhotoService 
+{
+    /**
+     * 查询企业文件信息
+     * 
+     * @param id 企业文件信息主键
+     * @return 企业文件信息
+     */
+    public EnterprisePhoto selectEnterprisePhotoById(Long id);
+
+    /**
+     * 查询企业文件信息列表
+     * 
+     * @param enterprisePhoto 企业文件信息
+     * @return 企业文件信息集合
+     */
+    public List<EnterprisePhoto> selectEnterprisePhotoList(EnterprisePhoto enterprisePhoto);
+
+    /**
+     * 新增企业文件信息
+     * 
+     * @param enterprisePhoto 企业文件信息
+     * @return 结果
+     */
+    public int insertEnterprisePhoto(EnterprisePhoto enterprisePhoto);
+
+    /**
+     * 修改企业文件信息
+     * 
+     * @param enterprisePhoto 企业文件信息
+     * @return 结果
+     */
+    public int updateEnterprisePhoto(EnterprisePhoto enterprisePhoto);
+
+    /**
+     * 批量删除企业文件信息
+     * 
+     * @param ids 需要删除的企业文件信息主键集合
+     * @return 结果
+     */
+    public int deleteEnterprisePhotoByIds(Long[] ids);
+
+    /**
+     * 删除企业文件信息信息
+     * 
+     * @param id 企业文件信息主键
+     * @return 结果
+     */
+    public int deleteEnterprisePhotoById(Long id);
+}

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IRecordInfoService.java

@@ -64,4 +64,6 @@ public interface IRecordInfoService
     AjaxResult numberInfo();
 
     int isChange(Long[] ids);
+
+    AjaxResult number();
 }

+ 213 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/EnterpriseApplyServiceImpl.java

@@ -0,0 +1,213 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.ruoyi.common.core.domain.entity.SysDept;
+import com.ruoyi.common.core.domain.entity.SysRole;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.system.domain.EnterprisePhoto;
+import com.ruoyi.system.domain.SysRoleDept;
+import com.ruoyi.system.mapper.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.domain.EnterpriseApply;
+import com.ruoyi.system.service.IEnterpriseApplyService;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 企业信息审核Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-02-20
+ */
+@Service
+public class EnterpriseApplyServiceImpl implements IEnterpriseApplyService 
+{
+    @Autowired
+    private EnterpriseApplyMapper enterpriseApplyMapper;
+
+    @Autowired
+    private EnterprisePhotoMapper enterprisePhotoMapper;
+
+    @Autowired
+    private SysRoleMapper roleMapper;
+
+    @Autowired
+    private SysUserRoleMapper userRoleMapper;
+
+    @Autowired
+    private SysUserServiceImpl sysUserServiceImpl;
+    @Autowired
+    private SysUserMapper userMapper;
+
+
+    @Autowired
+    private SysDeptMapper deptMapper;
+
+    @Autowired
+    private SysRoleDeptMapper sysRoleDeptMapper;
+
+
+    /**
+     * 查询企业信息审核
+     * 
+     * @param id 企业信息审核主键
+     * @return 企业信息审核
+     */
+    @Override
+    public EnterpriseApply selectEnterpriseApplyById(Long id)
+    {
+        return enterpriseApplyMapper.selectEnterpriseApplyById(id);
+    }
+
+    /**
+     * 查询企业信息审核列表
+     * 
+     * @param enterpriseApply 企业信息审核
+     * @return 企业信息审核
+     */
+    @Override
+    public List<EnterpriseApply> selectEnterpriseApplyList(EnterpriseApply enterpriseApply)
+    {
+        return enterpriseApplyMapper.selectEnterpriseApplyList(enterpriseApply);
+    }
+
+    /**
+     * 新增企业信息审核
+     * 
+     * @param enterpriseApply 企业信息审核
+     * @return 结果
+     */
+    @Override
+    public int insertEnterpriseApply(EnterpriseApply enterpriseApply)
+    {
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        enterpriseApply.setUserId(user.getUserId());
+        enterpriseApply.setUserName(user.getUserName());
+        enterpriseApply.setUserPhone(user.getPhonenumber());
+        enterpriseApply.setCreateTime(DateUtils.getNowDate());
+        int count = enterpriseApplyMapper.insertEnterpriseApply(enterpriseApply);
+        //保存图片信息
+        List<EnterprisePhoto> enterprisePhotoList  = enterpriseApply.getEnterprisePhotoList();
+        for (EnterprisePhoto enterprisePhoto : enterprisePhotoList) {
+            enterprisePhoto.setEnterpriseId(enterpriseApply.getId());
+            enterprisePhotoMapper.insertEnterprisePhoto(enterprisePhoto);
+        }
+        return count;
+    }
+
+    /**
+     * 修改企业信息审核
+     * 
+     * @param enterpriseApply 企业信息审核
+     * @return 结果
+     */
+    @Override
+    @Transactional
+    public int updateEnterpriseApply(EnterpriseApply enterpriseApply)
+    {
+        try{
+            //修改图片信息
+            //删除所有图片信息
+            enterprisePhotoMapper.deleteEnterprisePhotoByEnterpriseId(enterpriseApply.getId());
+            //保存图片信息
+            List<EnterprisePhoto> enterprisePhotoList  = enterpriseApply.getEnterprisePhotoList();
+            for (EnterprisePhoto enterprisePhoto : enterprisePhotoList) {
+                enterprisePhoto.setEnterpriseId(enterpriseApply.getId());
+                enterprisePhotoMapper.insertEnterprisePhoto(enterprisePhoto);
+            }
+            enterpriseApply.setUpdateTime(DateUtils.getNowDate());
+            //重置申请状态和打回理由
+            enterpriseApply.setIsAudit("0");
+            enterpriseApply.setAuditOpinion("");
+            return enterpriseApplyMapper.updateEnterpriseApply(enterpriseApply);
+        }catch (Exception e){
+            e.getMessage();
+            return 0;
+        }
+    }
+
+    /**
+     * 批量删除企业信息审核
+     * 
+     * @param ids 需要删除的企业信息审核主键
+     * @return 结果
+     */
+    @Override
+    public int deleteEnterpriseApplyByIds(Long[] ids)
+    {
+        return enterpriseApplyMapper.deleteEnterpriseApplyByIds(ids);
+    }
+
+    /**
+     * 删除企业信息审核信息
+     * 
+     * @param id 企业信息审核主键
+     * @return 结果
+     */
+    @Override
+    public int deleteEnterpriseApplyById(Long id)
+    {
+        return enterpriseApplyMapper.deleteEnterpriseApplyById(id);
+    }
+
+    @Override
+    @Transactional
+    public int edit(EnterpriseApply enterpriseApply) {
+        try{
+            enterpriseApply.setUpdateTime(DateUtils.getNowDate());
+            if("1".equals(enterpriseApply.getIsAudit() )){
+                //审核通过
+                // 删除用户与角色关联
+                userRoleMapper.deleteUserRoleByUserId(enterpriseApply.getUserId());
+                //生成管理员角色与人员中间表
+                SysRole info = roleMapper.checkRoleKeyUnique("conservator");
+                if(info == null){
+                    //新增一个管理员角色
+                    info = new SysRole();
+                    info.setRoleName("管理员");
+                    info.setRoleKey("conservator");
+                    info.setRoleSort(3);
+                    info.setDataScope("1");
+                    info.setStatus("0");
+                    info.setDelFlag("0");
+                    info.setRemark("管理员");
+                    roleMapper.insertRole(info);
+                }
+                // 新增用户与角色管理
+                Long[] roleIds = {info.getRoleId()};
+                sysUserServiceImpl.insertUserRole(enterpriseApply.getUserId(),roleIds);
+
+                //新增部门信息
+                SysDept dept = new SysDept();
+                dept.setParentId(0L);
+                dept.setAncestors( "0," + dept.getParentId());
+                dept.setDeptName(enterpriseApply.getName());
+                dept.setLeader(enterpriseApply.getLegalPersonName());
+                dept.setPhone(enterpriseApply.getPhone());
+                deptMapper.insertDept(dept);
+                //新增角色与部门关联
+                List<SysRoleDept> list = new ArrayList<SysRoleDept>();
+                SysRoleDept rd = new SysRoleDept();
+                rd.setRoleId(info.getRoleId());
+                rd.setDeptId(dept.getDeptId());
+                list.add(rd);
+                sysRoleDeptMapper.batchRoleDept(list);
+                //修改人员信息(新增部门信息)
+                SysUser applyForUser = new SysUser();
+                applyForUser.setUserId(enterpriseApply.getUserId());
+                applyForUser.setDeptId(dept.getDeptId());
+                applyForUser.setApplyFor("1");
+                userMapper.updateUser(applyForUser);
+
+            }
+            return enterpriseApplyMapper.updateEnterpriseApply(enterpriseApply);
+        }catch (Exception e){
+            e.getMessage();
+            return 0;
+        }
+    }
+}

+ 93 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/EnterprisePhotoServiceImpl.java

@@ -0,0 +1,93 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.EnterprisePhotoMapper;
+import com.ruoyi.system.domain.EnterprisePhoto;
+import com.ruoyi.system.service.IEnterprisePhotoService;
+
+/**
+ * 企业文件信息Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-02-20
+ */
+@Service
+public class EnterprisePhotoServiceImpl implements IEnterprisePhotoService 
+{
+    @Autowired
+    private EnterprisePhotoMapper enterprisePhotoMapper;
+
+    /**
+     * 查询企业文件信息
+     * 
+     * @param id 企业文件信息主键
+     * @return 企业文件信息
+     */
+    @Override
+    public EnterprisePhoto selectEnterprisePhotoById(Long id)
+    {
+        return enterprisePhotoMapper.selectEnterprisePhotoById(id);
+    }
+
+    /**
+     * 查询企业文件信息列表
+     * 
+     * @param enterprisePhoto 企业文件信息
+     * @return 企业文件信息
+     */
+    @Override
+    public List<EnterprisePhoto> selectEnterprisePhotoList(EnterprisePhoto enterprisePhoto)
+    {
+        return enterprisePhotoMapper.selectEnterprisePhotoList(enterprisePhoto);
+    }
+
+    /**
+     * 新增企业文件信息
+     * 
+     * @param enterprisePhoto 企业文件信息
+     * @return 结果
+     */
+    @Override
+    public int insertEnterprisePhoto(EnterprisePhoto enterprisePhoto)
+    {
+        return enterprisePhotoMapper.insertEnterprisePhoto(enterprisePhoto);
+    }
+
+    /**
+     * 修改企业文件信息
+     * 
+     * @param enterprisePhoto 企业文件信息
+     * @return 结果
+     */
+    @Override
+    public int updateEnterprisePhoto(EnterprisePhoto enterprisePhoto)
+    {
+        return enterprisePhotoMapper.updateEnterprisePhoto(enterprisePhoto);
+    }
+
+    /**
+     * 批量删除企业文件信息
+     * 
+     * @param ids 需要删除的企业文件信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteEnterprisePhotoByIds(Long[] ids)
+    {
+        return enterprisePhotoMapper.deleteEnterprisePhotoByIds(ids);
+    }
+
+    /**
+     * 删除企业文件信息信息
+     * 
+     * @param id 企业文件信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteEnterprisePhotoById(Long id)
+    {
+        return enterprisePhotoMapper.deleteEnterprisePhotoById(id);
+    }
+}

+ 11 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RecordInfoServiceImpl.java

@@ -105,7 +105,7 @@ public class RecordInfoServiceImpl implements IRecordInfoService
         SysUser user = SecurityUtils.getLoginUser().getUser();
         RecordInfo recordInfo = new RecordInfo();
         recordInfo.setAddresseeId(String.valueOf(user.getUserId()));
-        recordInfo.setIsRead("0");
+        recordInfo.setCertified("0");
         List<RecordInfo> list = recordInfoMapper.selectRecordInfoList(recordInfo);
         Map<String,Object> map = new HashMap<>();
         map.put("total",list.size());
@@ -117,4 +117,14 @@ public class RecordInfoServiceImpl implements IRecordInfoService
     public int isChange(Long[] ids) {
         return recordInfoMapper.updateRecordInfoIsChange(ids);
     }
+
+    @Override
+    public AjaxResult number() {
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        RecordInfo recordInfo = new RecordInfo();
+        recordInfo.setAddresseeId(String.valueOf(user.getUserId()));
+        recordInfo.setCertified("0");
+        int count = recordInfoMapper.number(recordInfo);
+        return AjaxResult.success("成功",count);
+    }
 }

+ 141 - 0
ruoyi-system/src/main/resources/mapper/system/EnterpriseApplyMapper.xml

@@ -0,0 +1,141 @@
+<?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.EnterpriseApplyMapper">
+    
+    <resultMap type="EnterpriseApply" id="EnterpriseApplyResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="coding"    column="coding"    />
+        <result property="legalPersonName"    column="legal_person_name"    />
+        <result property="cardType"    column="card_type"    />
+        <result property="legalPersonCard"    column="legal_person_card"    />
+        <result property="phone"    column="phone"    />
+        <result property="isAudit"    column="is_audit"    />
+        <result property="userId"    column="user_id"    />
+        <result property="userName"    column="user_name"    />
+        <result property="userPhone"    column="user_phone"    />
+        <result property="auditOpinion"    column="audit_opinion"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+
+        <collection  property="enterprisePhotoList"   javaType="java.util.List"    resultMap="EnterprisePhotoResult" />
+    </resultMap>
+
+
+    <resultMap type="EnterprisePhoto" id="EnterprisePhotoResult">
+        <result property="id"    column="id"    />
+        <result property="enterpriseId"    column="enterprise_id"    />
+        <result property="path"    column="path"    />
+        <result property="type"    column="type"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+
+    <sql id="selectEnterpriseApplyVo">
+        select a.id, a.name, a.coding, a.legal_person_name, a.card_type, a.legal_person_card, a.phone, a.is_audit, a.user_id, a.user_name, a.user_phone,
+               a.audit_opinion, a.create_by, a.create_time, a.update_by, a.
+            update_time, a.remark, p.path,p.type,p.remark
+        from enterprise_apply a
+        left join enterprise_photo p on p.enterprise_id = a.id
+    </sql>
+
+    <select id="selectEnterpriseApplyList" parameterType="EnterpriseApply" resultMap="EnterpriseApplyResult">
+        <include refid="selectEnterpriseApplyVo"/>
+        <where>  
+            <if test="name != null  and name != ''"> and a.name like concat('%', #{name}, '%')</if>
+            <if test="coding != null  and coding != ''"> and a.coding = #{coding}</if>
+            <if test="legalPersonName != null  and legalPersonName != ''"> and a.legal_person_name like concat('%', #{legalPersonName}, '%')</if>
+            <if test="cardType != null  and cardType != ''"> and a.card_type = #{cardType}</if>
+            <if test="legalPersonCard != null  and legalPersonCard != ''"> and a.legal_person_card = #{legalPersonCard}</if>
+            <if test="phone != null  and phone != ''"> and a.phone = #{phone}</if>
+            <if test="isAudit != null  and isAudit != ''"> and a.is_audit = #{isAudit}</if>
+            <if test="userName != null  and userName != ''"> and a.user_name like concat('%', #{userName}, '%')</if>
+            <if test="userPhone != null  and userPhone != ''"> and a.user_phone = #{userPhone}</if>
+            <if test="auditOpinion != null  and auditOpinion != ''"> and a.audit_opinion = #{auditOpinion}</if>
+        </where>
+    </select>
+    
+    <select id="selectEnterpriseApplyById" parameterType="Long" resultMap="EnterpriseApplyResult">
+        <include refid="selectEnterpriseApplyVo"/>
+        where a.id = #{id}
+    </select>
+        
+    <insert id="insertEnterpriseApply" parameterType="EnterpriseApply" useGeneratedKeys="true" keyProperty="id">
+        insert into enterprise_apply
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null">name,</if>
+            <if test="coding != null">coding,</if>
+            <if test="legalPersonName != null">legal_person_name,</if>
+            <if test="cardType != null">card_type,</if>
+            <if test="legalPersonCard != null">legal_person_card,</if>
+            <if test="phone != null">phone,</if>
+            <if test="isAudit != null">is_audit,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="userName != null">user_name,</if>
+            <if test="userPhone != null">user_phone,</if>
+            <if test="auditOpinion != null">audit_opinion,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null">#{name},</if>
+            <if test="coding != null">#{coding},</if>
+            <if test="legalPersonName != null">#{legalPersonName},</if>
+            <if test="cardType != null">#{cardType},</if>
+            <if test="legalPersonCard != null">#{legalPersonCard},</if>
+            <if test="phone != null">#{phone},</if>
+            <if test="isAudit != null">#{isAudit},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="userName != null">#{userName},</if>
+            <if test="userPhone != null">#{userPhone},</if>
+            <if test="auditOpinion != null">#{auditOpinion},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateEnterpriseApply" parameterType="EnterpriseApply">
+        update enterprise_apply
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null">name = #{name},</if>
+            <if test="coding != null">coding = #{coding},</if>
+            <if test="legalPersonName != null">legal_person_name = #{legalPersonName},</if>
+            <if test="cardType != null">card_type = #{cardType},</if>
+            <if test="legalPersonCard != null">legal_person_card = #{legalPersonCard},</if>
+            <if test="phone != null">phone = #{phone},</if>
+            <if test="isAudit != null">is_audit = #{isAudit},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="userName != null">user_name = #{userName},</if>
+            <if test="userPhone != null">user_phone = #{userPhone},</if>
+            <if test="auditOpinion != null">audit_opinion = #{auditOpinion},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteEnterpriseApplyById" parameterType="Long">
+        delete from enterprise_apply where id = #{id}
+    </delete>
+
+    <delete id="deleteEnterpriseApplyByIds" parameterType="String">
+        delete from enterprise_apply where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 74 - 0
ruoyi-system/src/main/resources/mapper/system/EnterprisePhotoMapper.xml

@@ -0,0 +1,74 @@
+<?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.EnterprisePhotoMapper">
+    
+    <resultMap type="EnterprisePhoto" id="EnterprisePhotoResult">
+        <result property="id"    column="id"    />
+        <result property="enterpriseId"    column="enterprise_id"    />
+        <result property="path"    column="path"    />
+        <result property="type"    column="type"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectEnterprisePhotoVo">
+        select id, enterprise_id, path, type, remark from enterprise_photo
+    </sql>
+
+    <select id="selectEnterprisePhotoList" parameterType="EnterprisePhoto" resultMap="EnterprisePhotoResult">
+        <include refid="selectEnterprisePhotoVo"/>
+        <where>  
+            <if test="enterpriseId != null "> and enterprise_id = #{enterpriseId}</if>
+            <if test="path != null  and path != ''"> and path = #{path}</if>
+            <if test="type != null  and type != ''"> and type = #{type}</if>
+        </where>
+    </select>
+    
+    <select id="selectEnterprisePhotoById" parameterType="Long" resultMap="EnterprisePhotoResult">
+        <include refid="selectEnterprisePhotoVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertEnterprisePhoto" parameterType="EnterprisePhoto" useGeneratedKeys="true" keyProperty="id">
+        insert into enterprise_photo
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="enterpriseId != null">enterprise_id,</if>
+            <if test="path != null">path,</if>
+            <if test="type != null">type,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="enterpriseId != null">#{enterpriseId},</if>
+            <if test="path != null">#{path},</if>
+            <if test="type != null">#{type},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateEnterprisePhoto" parameterType="EnterprisePhoto">
+        update enterprise_photo
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
+            <if test="path != null">path = #{path},</if>
+            <if test="type != null">type = #{type},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteEnterprisePhotoById" parameterType="Long">
+        delete from enterprise_photo where id = #{id}
+    </delete>
+
+    <delete id="deleteEnterprisePhotoByIds" parameterType="String">
+        delete from enterprise_photo where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <delete id="deleteEnterprisePhotoByEnterpriseId" parameterType="EnterprisePhoto">
+        delete from enterprise_photo where enterprise_id = #{enterpriseId}
+    </delete>
+</mapper>

+ 18 - 0
ruoyi-system/src/main/resources/mapper/system/RecordInfoMapper.xml

@@ -149,4 +149,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update record_info set certified = '1' where addressee_id = #{userId} and is_read = '0'
     </update>
 
+    <select id="number" parameterType="Long">
+        select count(1) from record_info
+        <where>
+            <if test="title != null  and title != ''"> and title = #{title}</if>
+            <if test="content != null  and content != ''"> and content = #{content}</if>
+            <if test="senderId != null  and senderId != ''"> and sender_id = #{senderId}</if>
+            <if test="senderName != null  and senderName != ''"> and sender_name like concat('%', #{senderName}, '%')</if>
+            <if test="addresseeId != null  and addresseeId != ''"> and addressee_id = #{addresseeId}</if>
+            <if test="addresseeName != null  and addresseeName != ''"> and addressee_name like concat('%', #{addresseeName}, '%')</if>
+            <if test="isRead != null  and isRead != ''"> and is_read = #{isRead}</if>
+            <if test="certified != null  and certified != ''"> and certified = #{certified}</if>
+            <if test="infoType != null  and infoType != ''"> and info_type = #{infoType}</if>
+            <if test="createTime != null "> and create_time = #{createTime}</if>
+            <if test="userId != null  and userId != ''"> and (sender_id = #{userId} or addressee_id = #{userId}) </if>
+        </where>
+        order by create_time desc
+    </select>
+
 </mapper>