hanfucheng 1 vuosi sitten
vanhempi
commit
ef8644b3d2

+ 13 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/my/JnbNameAuthenticationController.java

@@ -3,6 +3,7 @@ package com.ruoyi.web.controller.my;
 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.R;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.poi.ExcelUtil;
@@ -56,7 +57,7 @@ public class JnbNameAuthenticationController extends BaseController {
     @PreAuthorize("@ss.hasPermi('nameAuthentication:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") String id) {
-        return success(jnbNameAuthenticationService.selectJnbNameAuthenticationById(id));
+        return AjaxResult.success(jnbNameAuthenticationService.selectJnbNameAuthenticationById(id));
     }
 
     /**
@@ -113,4 +114,15 @@ public class JnbNameAuthenticationController extends BaseController {
     public AjaxResult appletAdd(@RequestBody JnbNameAuthentication jnbNameAuthentication) {
         return toAjax(jnbNameAuthenticationService.insertJnbNameAuthentication(jnbNameAuthentication));
     }
+
+    /*
+    * 小程序-按登录人获取官方认证信息
+    *
+    * @author 韩福成
+    * @date 2024/3/6 14:42
+    */
+    @GetMapping(value = "getNameInfo/{userId}")
+    public R getNameInfo(@PathVariable("userId") String userId) {
+        return R.ok(jnbNameAuthenticationService.getNameInfo(userId));
+    }
 }

+ 12 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/my/JnbOfficialAuthenticationController.java

@@ -3,6 +3,7 @@ package com.ruoyi.web.controller.my;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 
+import com.ruoyi.common.core.domain.R;
 import com.sooka.jnb.my.domain.JnbOfficialAuthentication;
 import com.sooka.jnb.my.service.IJnbOfficialAuthenticationService;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -120,4 +121,15 @@ public class JnbOfficialAuthenticationController extends BaseController {
     public AjaxResult appletAdd(@RequestBody JnbOfficialAuthentication jnbOfficialAuthentication) {
         return toAjax(jnbOfficialAuthenticationService.insertJnbOfficialAuthentication(jnbOfficialAuthentication));
     }
+
+    /*
+     * 小程序-按登录人获取实名认证信息
+     *
+     * @author 韩福成
+     * @date 2024/3/6 14:42
+     */
+    @GetMapping(value = "getOfficialInfo/{userId}")
+    public R getOfficialInfo(@PathVariable("userId") String userId) {
+        return R.ok(jnbOfficialAuthenticationService.getOfficialInfo(userId));
+    }
 }

+ 8 - 0
sooka-jnb/src/main/java/com/sooka/jnb/my/mapper/JnbNameAuthenticationMapper.java

@@ -75,4 +75,12 @@ public interface JnbNameAuthenticationMapper {
      * @return 结果
      */
     public int deleteJnbNameAuthenticationByIds(String[] ids);
+
+    /*
+    * 小程序-按登录人获取实名认证信息
+    *
+    * @author 韩福成
+    * @date 2024/3/6 14:45
+    */
+    public JnbNameAuthentication getNameInfo(String userId);
 }

+ 8 - 0
sooka-jnb/src/main/java/com/sooka/jnb/my/mapper/JnbOfficialAuthenticationMapper.java

@@ -59,4 +59,12 @@ public interface JnbOfficialAuthenticationMapper {
      * @return 结果
      */
     public int deleteJnbOfficialAuthenticationByIds(String[] ids);
+
+    /*
+    * 小程序-按登录人获取官方认证信息
+    *
+    * @author 韩福成
+    * @date 2024/3/6 16:22
+    */
+    public JnbOfficialAuthentication getOfficialInfo(String userId);
 }

+ 8 - 0
sooka-jnb/src/main/java/com/sooka/jnb/my/service/IJnbNameAuthenticationService.java

@@ -67,4 +67,12 @@ public interface IJnbNameAuthenticationService {
      * @return 结果
      */
     public int deleteJnbNameAuthenticationById(String id);
+
+    /*
+    * 小程序-按登录人获取实名认证信息
+    *
+    * @author 韩福成
+    * @date 2024/3/6 14:43
+    */
+    public JnbNameAuthentication getNameInfo(String userId);
 }

+ 8 - 0
sooka-jnb/src/main/java/com/sooka/jnb/my/service/IJnbOfficialAuthenticationService.java

@@ -66,4 +66,12 @@ public interface IJnbOfficialAuthenticationService {
      * @return 结果
      */
     public int deleteJnbOfficialAuthenticationById(String id);
+
+    /*
+    * 小程序-按登录人获取官方认证信息
+    *
+    * @author 韩福成
+    * @date 2024/3/6 16:22
+    */
+    public JnbOfficialAuthentication getOfficialInfo(String userId);
 }

+ 11 - 0
sooka-jnb/src/main/java/com/sooka/jnb/my/service/impl/JnbNameAuthenticationServiceImpl.java

@@ -136,4 +136,15 @@ public class JnbNameAuthenticationServiceImpl implements IJnbNameAuthenticationS
         }
         return jnbNameAuthenticationMapper.updateJnbNameAuthentication(jnbNameAuthentication);
     }
+
+    /*
+    * 小程序-按登录人获取实名认证信息
+    *
+    * @author 韩福成
+    * @date 2024/3/6 14:44
+    */
+    @Override
+    public JnbNameAuthentication getNameInfo(String userId) {
+        return jnbNameAuthenticationMapper.getNameInfo(userId);
+    }
 }

+ 11 - 0
sooka-jnb/src/main/java/com/sooka/jnb/my/service/impl/JnbOfficialAuthenticationServiceImpl.java

@@ -137,4 +137,15 @@ public class JnbOfficialAuthenticationServiceImpl implements IJnbOfficialAuthent
         announcementService.insertAnnouncement(announcement);
         return jnbOfficialAuthenticationMapper.updateJnbOfficialAuthentication(jnbOfficialAuthentication);
     }
+
+    /*
+    *小程序-按登录人获取官方认证信息
+    *
+    * @author 韩福成
+    * @date 2024/3/6 16:22
+    */
+    @Override
+    public JnbOfficialAuthentication getOfficialInfo(String userId) {
+        return jnbOfficialAuthenticationMapper.getOfficialInfo(userId);
+    }
 }

+ 7 - 0
sooka-jnb/src/main/resources/mapper/my/JnbNameAuthenticationMapper.xml

@@ -119,4 +119,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </trim>
         where id = #{createBy}
     </update>
+
+    <select id="getNameInfo" parameterType="String" resultMap="JnbNameAuthenticationResult">
+        select a.id, a.name, a.phone, a.id_card, a.status,GROUP_CONCAT(b.path) path,a.create_time,a.create_by
+        from jnb_name_authentication a
+		left join jnb_authentication_img b on a.id = b.authentication_id
+        where a.create_by = #{userId}
+    </select>
 </mapper>

+ 15 - 0
sooka-jnb/src/main/resources/mapper/my/JnbOfficialAuthenticationMapper.xml

@@ -100,4 +100,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+
+    <select id="getOfficialInfo" parameterType="String" resultMap="JnbOfficialAuthenticationResult">
+        SELECT
+            a.id,
+            a.enterprise_name,
+            a.phone,
+            a.legal_name,
+            a.STATUS,
+            GROUP_CONCAT( b.path ) path,
+            a.create_time
+        FROM
+            jnb_official_authentication a
+            LEFT JOIN jnb_authentication_img b ON a.id = b.authentication_id
+        where a.create_by = #{userId}
+    </select>
 </mapper>