953954216 5 months ago
parent
commit
3ab8875ba6

+ 4 - 13
ruoyi-modules/mz-organization-jg/src/main/java/com/ruoyi/organization/domain/YljgJgjs.java

@@ -2,25 +2,13 @@ package com.ruoyi.organization.domain;
 
 import com.baomidou.mybatisplus.annotation.*;
 import com.ruoyi.common.core.web.domain.BaseEntity;
+import com.ruoyi.system.validate.*;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
-
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
-
 import com.ruoyi.common.core.annotation.Excel;
-import com.ruoyi.system.validate.group.AddGroup;
-import org.hibernate.validator.constraints.Range;
-import com.ruoyi.system.validate.DictV;
-import com.ruoyi.system.validate.DateV;
-import com.ruoyi.system.validate.MobileV;
-import com.ruoyi.system.validate.PhoneV;
-import com.ruoyi.system.validate.IdCardV;
-import com.ruoyi.system.validate.NumberV;
-
-import javax.validation.constraints.Digits;
-import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.Size;
 
 /**
@@ -57,10 +45,13 @@ public class YljgJgjs extends BaseEntity
 
     @ApiModelProperty(value = "咨询联系人")
     @Size(max = 50, message = "{咨询联系人}")
+    @ChineseV(message = "{咨询联系人}")
+    @EncryptionV
     private String zxlxr;
 
     @ApiModelProperty(value = "咨询联系电话")
     @Size(max = 20, message = "{咨询联系电话}")
+    @EncryptionV
     private String zxlxdh;
 
     @ApiModelProperty(value = "服务内容")

+ 5 - 1
ruoyi-modules/mz-organization-jg/src/main/java/com/ruoyi/organization/mapper/YljgJgjsMapper.java

@@ -1,17 +1,21 @@
 package com.ruoyi.organization.mapper;
 
 import java.util.List;
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.ruoyi.organization.domain.YljgJgjs;
 import com.ruoyi.common.datascope.utils.BaseMapperPlus;
 
 /**
  * 机构介绍Mapper接口
- * 
+ *
  * @author ruoyi
  * @date 2023-07-17
  */
 public interface YljgJgjsMapper extends BaseMapperPlus<YljgJgjs> {
 
+    @InterceptorIgnore(tenantLine = "true")
+    public List<YljgJgjs> selectListMM();
     public YljgJgjs selectByJgid(String id);
 
     int deleteYljgJgjsByJgIds(String jgid);

+ 8 - 7
ruoyi-modules/mz-organization-jg/src/main/java/com/ruoyi/organization/service/IYljgJgjsService.java

@@ -5,15 +5,15 @@ import com.ruoyi.organization.domain.YljgJgjs;
 
 /**
  * 机构介绍Service接口
- * 
+ *
  * @author ruoyi
  * @date 2023-07-17
  */
-public interface IYljgJgjsService 
+public interface IYljgJgjsService
 {
     /**
      * 查询机构介绍
-     * 
+     *
      * @param id 机构介绍主键
      * @return 机构介绍
      */
@@ -21,15 +21,16 @@ public interface IYljgJgjsService
 
     /**
      * 查询机构介绍列表
-     * 
+     *
      * @param yljgJgjs 机构介绍
      * @return 机构介绍集合
      */
     public List<YljgJgjs> selectYljgJgjsList(YljgJgjs yljgJgjs);
+    public void updatejm();
 
     /**
      * 新增机构介绍
-     * 
+     *
      * @param yljgJgjs 机构介绍
      * @return 结果
      */
@@ -37,7 +38,7 @@ public interface IYljgJgjsService
 
     /**
      * 修改机构介绍
-     * 
+     *
      * @param yljgJgjs 机构介绍
      * @return 结果
      */
@@ -45,7 +46,7 @@ public interface IYljgJgjsService
 
     /**
      * 批量删除机构介绍
-     * 
+     *
      * @param ids 需要删除的机构介绍主键集合
      * @return 结果
      */

+ 22 - 1
ruoyi-modules/mz-organization-jg/src/main/java/com/ruoyi/organization/service/impl/YljgJgjsServiceImpl.java

@@ -1,5 +1,6 @@
 package com.ruoyi.organization.service.impl;
 
+import java.util.ArrayList;
 import java.util.List;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -8,7 +9,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ruoyi.organization.mapper.YljgJgjsMapper;
 import com.ruoyi.organization.domain.YljgJgjs;
 import com.ruoyi.organization.service.IYljgJgjsService;
-import org.springframework.transaction.annotation.Transactional;
 
 /**
  * 机构介绍Service业务层处理
@@ -46,6 +46,27 @@ public class YljgJgjsServiceImpl implements IYljgJgjsService
         return yljgJgjsMapper.selectList(new LambdaQueryWrapper<>(yljgJgjs));
     }
 
+
+    @Override
+    public void updatejm()
+    {
+
+        List<YljgJgjs> list = yljgJgjsMapper.selectListMM();
+        List<YljgJgjs> ll = new ArrayList<>();
+        list.forEach(item->{
+            System.out.println("AAAAA:  " + item.getId());
+            YljgJgjs y = new YljgJgjs();
+            y.setId(item.getId());
+            y.setZxlxr(item.getZxlxr());
+            y.setZxlxdh(item.getZxlxdh());
+            yljgJgjsMapper.updateById(y);
+//            ll.add(y);
+        });
+
+
+    }
+
+
     /**
      * 新增机构介绍
      *

+ 11 - 0
ruoyi-modules/mz-organization-jg/src/main/resources/mapper/organization/YljgJgjsMapper.xml

@@ -8,8 +8,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="id"    column="id"    />
         <result property="jgid"    column="jgid"    />
         <result property="jgjs"    column="jgjs"    />
+        <result property="zxlxr"    column="zxlxr"    />
+        <result property="zxlxdh"    column="zxlxdh"    />
+        <result property="fwnr"    column="fwnr"    />
+        <result property="fwtd"    column="fwtd"    />
+        <result property="fwsj"    column="fwsj"    />
+        <result property="fwfw"    column="fwfw"    />
+        <result property="fwsm"    column="fwsm"    />
     </resultMap>
 
+    <select id="selectListMM"  resultMap="YljgJgjsResult">
+        select * from yljg_jgjs where zxlxr is not null or zxlxdh is not null
+    </select>
+
     <select id="selectByJgid" parameterType="YljgJgjs" resultMap="YljgJgjsResult">
         select id,jgid,jgjs,zxlxr,zxlxdh,fwnr,fwtd,fwsj,fwfw,fwsm from yljg_jgjs where jgid=#{jgid}
     </select>

+ 8 - 7
ruoyi-modules/mz-organization/src/main/java/com/ruoyi/organization/controller/YljgJgjsController.java

@@ -25,7 +25,7 @@ import com.ruoyi.common.core.web.page.TableDataInfo;
 
 /**
  * 机构介绍Controller
- * 
+ *
  * @author ruoyi
  * @date 2023-07-17
  */
@@ -88,12 +88,13 @@ public class YljgJgjsController extends BaseController
         return toAjax(yljgJgjsService.insertYljgJgjs(yljgJgjs),yljgJgjs.getId());
     }
 
-    /**
-     * 修改机构介绍
-     */
-//    @RequiresPermissions("organization:jgjs:edit")
-    @Log(title = "机构介绍", businessType = BusinessType.UPDATE)
-    @PutMapping
+
+    @GetMapping("/updatejm")
+    public void updatejm()
+    {
+        yljgJgjsService.updatejm();
+    }
+
     public AjaxResult edit(@Validated @RequestBody YljgJgjs yljgJgjs)
     {
         return toAjax(yljgJgjsService.updateYljgJgjs(yljgJgjs));

+ 2 - 1
ruoyi-ui/src/views/organization/jggl/jcxx/index.vue

@@ -1623,7 +1623,8 @@ export default {
         this.loading = true
         getJgjs(id).then(response1 => {
             if(response1.data!=null) {
-              this.form2 = response1.data;
+              this.form2 = decryptData_ECB(response1.data, ["zxlxr", "zxlxdh"], [1, 2]);
+
               this.form2.zt="1";
             }else{
               this.form2.zt="0";

+ 1 - 1
ruoyi-ui/src/views/organization/jggl/sqJcxx/index.vue

@@ -1983,7 +1983,7 @@ export default {
         this.loading = true
         getJgjs(id).then(response1 => {
           if(response1.data!=null) {
-            this.form2 = response1.data;
+            this.form2 =  decryptData_ECB(response1.data, ["zxlxr", "zxlxdh"], [1, 2]);
             this.form2.zt="1";
           }else{
             this.form2.zt="0";