Procházet zdrojové kódy

Merge remote-tracking branch 'origin/master'

qinhouyu před 1 rokem
rodič
revize
f3d3ee44a1

+ 18 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/highServer/JnbHighServerController.java

@@ -126,4 +126,22 @@ public class JnbHighServerController extends BaseController {
     public AjaxResult lifeServicesDetails(@PathVariable Long id) {
         return success(jnbHighServerService.lifeServicesDetails(id));
     }
+
+    /**
+     * 小程序获取旅游向导列表
+     */
+    @GetMapping("/travelGuideList")
+    public TableDataInfo getTravelGuide(JnbHighServer jnbHighServer) {
+        startPage();
+        List<JnbHighServerVO> list = jnbHighServerService.getTravelGuide(jnbHighServer);
+        return getDataTable(list);
+    }
+
+    /**
+     * 小程序获取旅游向导详情
+     */
+    @GetMapping("/travelGuideDetails/{id}")
+    public AjaxResult travelGuideDetails(@PathVariable Long id) {
+        return success(jnbHighServerService.travelGuideDetails(id));
+    }
 }

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

@@ -90,6 +90,19 @@ public class JnbNameAuthenticationController extends BaseController {
     }
 
     /*
+    * 审核实名认证
+    *
+    * @author 韩福成
+    * @date 2024/3/5 11:09
+    */
+    @PreAuthorize("@ss.hasPermi('nameAuthentication:edit')")
+    @Log(title = "审核实名认证", businessType = BusinessType.UPDATE)
+    @PutMapping("/through")
+    public AjaxResult through(@RequestBody JnbNameAuthentication jnbNameAuthentication) {
+        return toAjax(jnbNameAuthenticationService.through(jnbNameAuthentication));
+    }
+
+    /*
     * 小程序-提交实名认证
     *
     * @author 韩福成

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

@@ -97,6 +97,19 @@ public class JnbOfficialAuthenticationController extends BaseController {
     }
 
     /*
+    * 审核官方认证
+    *
+    * @author 韩福成
+    * @date 2024/3/5 13:55
+    */
+    @PreAuthorize("@ss.hasPermi('officialAuthentication:edit')")
+    @Log(title = "审核官方认证", businessType = BusinessType.UPDATE)
+    @PutMapping("/through")
+    public AjaxResult through(@RequestBody JnbOfficialAuthentication jnbOfficialAuthentication) {
+        return toAjax(jnbOfficialAuthenticationService.through(jnbOfficialAuthentication));
+    }
+
+    /*
     * 小程序-官方认证提交
     *
     * @author 韩福成

+ 7 - 0
sooka-jnb/src/main/java/com/sooka/jnb/highServer/mapper/JnbHighServerMapper.java

@@ -68,4 +68,11 @@ public interface JnbHighServerMapper {
     List<JnbHighServerVO> getLifeServices(JnbHighServer jnbHighServer);
 
     JnbHighServerVO lifeServicesDetails(Long id);
+
+    List<JnbHighServerVO> getTravelGuide(JnbHighServer jnbHighServer);
+
+    JnbHighServerVO travelGuideDetails(Long id);
+
+    void updateLikeNumber(@Param("id") Long id, @Param("type") Integer type);
+    void updateWatchNumber(@Param("id") Long id, @Param("type") Integer type);
 }

+ 4 - 0
sooka-jnb/src/main/java/com/sooka/jnb/highServer/service/IJnbHighServerService.java

@@ -67,4 +67,8 @@ public interface IJnbHighServerService {
     List<JnbHighServerVO> getLifeServices(JnbHighServer jnbHighServer);
 
     JnbHighServerVO lifeServicesDetails(Long id);
+
+    List<JnbHighServerVO> getTravelGuide(JnbHighServer jnbHighServer);
+
+    JnbHighServerVO travelGuideDetails(Long id);
 }

+ 24 - 0
sooka-jnb/src/main/java/com/sooka/jnb/highServer/service/impl/JnbHighServerServiceImpl.java

@@ -150,6 +150,8 @@ public class JnbHighServerServiceImpl implements IJnbHighServerService {
         if (StringUtils.isNotEmpty(jnbHighServerVO.getImgUrlList())) {
             jnbHighServerVO.setPictureList(Arrays.asList(jnbHighServerVO.getImgUrlList().split(",")));
         }
+        jnbHighServerMapper.updateLikeNumber(id,5);
+        jnbHighServerMapper.updateWatchNumber(id,5);
         return jnbHighServerVO;
     }
 
@@ -170,6 +172,28 @@ public class JnbHighServerServiceImpl implements IJnbHighServerService {
         if (StringUtils.isNotEmpty(jnbHighServerVO.getImgUrlList())) {
             jnbHighServerVO.setPictureList(Arrays.asList(jnbHighServerVO.getImgUrlList().split(",")));
         }
+        jnbHighServerMapper.updateLikeNumber(id,6);
+        jnbHighServerMapper.updateWatchNumber(id,6);
+        return jnbHighServerVO;
+    }
+
+    @Override
+    public List<JnbHighServerVO> getTravelGuide(JnbHighServer jnbHighServer) {
+        List<JnbHighServerVO> list = jnbHighServerMapper.getTravelGuide(jnbHighServer);
+        for (JnbHighServerVO var : list) {
+            if (StringUtils.isNotEmpty(var.getImgUrlList())) {
+                var.setPictureList(Arrays.asList(var.getImgUrlList().split(",")));
+            }
+        }
+        return list;
+    }
+
+    @Override
+    public JnbHighServerVO travelGuideDetails(Long id) {
+        JnbHighServerVO jnbHighServerVO = jnbHighServerMapper.travelGuideDetails(id);
+        if (StringUtils.isNotEmpty(jnbHighServerVO.getImgUrlList())) {
+            jnbHighServerVO.setPictureList(Arrays.asList(jnbHighServerVO.getImgUrlList().split(",")));
+        }
         return jnbHighServerVO;
     }
 }

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

@@ -52,6 +52,14 @@ public interface IJnbNameAuthenticationService {
      */
     public int deleteJnbNameAuthenticationByIds(String[] ids);
 
+    /*
+    * 审核
+    *
+    * @author 韩福成
+    * @date 2024/3/5 11:10
+    */
+    public int through(JnbNameAuthentication jnbNameAuthentication);
+
     /**
      * 删除实名认证信息
      *

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

@@ -51,6 +51,14 @@ public interface IJnbOfficialAuthenticationService {
      */
     public int deleteJnbOfficialAuthenticationByIds(String[] ids);
 
+    /*
+    * 审核官方认证
+    *
+    * @author 韩福成
+    * @date 2024/3/5 13:56
+    */
+    public int through(JnbOfficialAuthentication jnbOfficialAuthentication);
+
     /**
      * 删除官方认证信息
      *

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

@@ -1,15 +1,19 @@
 package com.sooka.jnb.my.service.impl;
 
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.DictUtils;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.uuid.IdUtils;
+import com.sooka.jnb.my.domain.Announcement;
 import com.sooka.jnb.my.domain.JnbAuthenticationImg;
 import com.sooka.jnb.my.domain.JnbNameAuthentication;
 import com.sooka.jnb.my.mapper.JnbNameAuthenticationMapper;
+import com.sooka.jnb.my.service.IAnnouncementService;
 import com.sooka.jnb.my.service.IJnbNameAuthenticationService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.text.SimpleDateFormat;
 import java.util.List;
 
 /**
@@ -23,6 +27,9 @@ public class JnbNameAuthenticationServiceImpl implements IJnbNameAuthenticationS
     @Autowired
     private JnbNameAuthenticationMapper jnbNameAuthenticationMapper;
 
+    @Autowired
+    private IAnnouncementService announcementService;
+
     /**
      * 查询实名认证
      *
@@ -106,4 +113,24 @@ public class JnbNameAuthenticationServiceImpl implements IJnbNameAuthenticationS
     public int deleteJnbNameAuthenticationById(String id) {
         return jnbNameAuthenticationMapper.deleteJnbNameAuthenticationById(id);
     }
+
+    /*
+    * 审核
+    *
+    * @author 韩福成
+    * @date 2024/3/5 11:10
+    */
+    @Override
+    public int through(JnbNameAuthentication jnbNameAuthentication) {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        String data = simpleDateFormat.format(jnbNameAuthentication.getCreateTime());
+        Announcement announcement = new Announcement();
+        announcement.setUserId(IdUtils.simpleUUID());
+        announcement.setCreateBy(SecurityUtils.getUserId().toString());
+        String type = DictUtils.getDictLabel("examine_state",jnbNameAuthentication.getStatus());
+        announcement.setAnnouncementTitle(type+":[实名认证]");
+        announcement.setAnnouncementBody("您在"+data+"发起的[实名认证]信息已["+type+"]");
+        announcementService.insertAnnouncement(announcement);
+        return jnbNameAuthenticationMapper.updateJnbNameAuthentication(jnbNameAuthentication);
+    }
 }

+ 29 - 2
sooka-jnb/src/main/java/com/sooka/jnb/my/service/impl/JnbOfficialAuthenticationServiceImpl.java

@@ -1,18 +1,22 @@
 package com.sooka.jnb.my.service.impl;
 
-import java.util.List;
-
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.DictUtils;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.uuid.IdUtils;
+import com.sooka.jnb.my.domain.Announcement;
 import com.sooka.jnb.my.domain.JnbAuthenticationImg;
 import com.sooka.jnb.my.domain.JnbOfficialAuthentication;
 import com.sooka.jnb.my.mapper.JnbNameAuthenticationMapper;
 import com.sooka.jnb.my.mapper.JnbOfficialAuthenticationMapper;
+import com.sooka.jnb.my.service.IAnnouncementService;
 import com.sooka.jnb.my.service.IJnbOfficialAuthenticationService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.text.SimpleDateFormat;
+import java.util.List;
+
 /**
  * 官方认证Service业务层处理
  *
@@ -27,6 +31,9 @@ public class JnbOfficialAuthenticationServiceImpl implements IJnbOfficialAuthent
     @Autowired
     private JnbNameAuthenticationMapper jnbNameAuthenticationMapper;
 
+    @Autowired
+    private IAnnouncementService announcementService;
+
     /**
      * 查询官方认证
      *
@@ -110,4 +117,24 @@ public class JnbOfficialAuthenticationServiceImpl implements IJnbOfficialAuthent
     public int deleteJnbOfficialAuthenticationById(String id) {
         return jnbOfficialAuthenticationMapper.deleteJnbOfficialAuthenticationById(id);
     }
+
+    /*
+    * 审核官方认证
+    *
+    * @author 韩福成
+    * @date 2024/3/5 13:56
+    */
+    @Override
+    public int through(JnbOfficialAuthentication jnbOfficialAuthentication) {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        String data = simpleDateFormat.format(jnbOfficialAuthentication.getCreateTime());
+        Announcement announcement = new Announcement();
+        announcement.setUserId(IdUtils.simpleUUID());
+        announcement.setCreateBy(SecurityUtils.getUserId().toString());
+        String type = DictUtils.getDictLabel("examine_state",jnbOfficialAuthentication.getStatus());
+        announcement.setAnnouncementTitle(type+":[官方认证]");
+        announcement.setAnnouncementBody("您在"+data+"发起的[官方认证]信息已["+type+"]");
+        announcementService.insertAnnouncement(announcement);
+        return jnbOfficialAuthenticationMapper.updateJnbOfficialAuthentication(jnbOfficialAuthentication);
+    }
 }

+ 44 - 0
sooka-jnb/src/main/resources/mapper/highServer/JnbHighServerMapper.xml

@@ -177,4 +177,48 @@
         where jhs.del_flag = 0 and jhs.type = 6 and jhs.id = #{id}
         GROUP BY jhs.id
     </select>
+
+    <select id="getTravelGuide" resultType="com.sooka.jnb.highServer.vo.JnbHighServerVO">
+        SELECT jhs.id,
+               title_name,
+               text_details,
+               jhs.type as type,
+               jhs.create_by,
+               jhs.create_time,
+               jhs.update_by,
+               jhs.update_time,
+               GROUP_CONCAT(jhsi.id)       AS imgId,
+               GROUP_CONCAT(jhsi.img_url)  AS imgUrlList,
+               jhs.like_num,
+               jhs.watch_num
+        FROM jnb_high_server jhs
+                 left JOIN jnb_high_server_img jhsi ON jhs.id = jhsi.server_id and jhs.type = jhsi.type and jhsi.del_flag = 0
+        where jhs.del_flag = 0 and jhs.type = 1
+        GROUP BY jhs.id
+        order by create_time,watch_num,like_num desc
+    </select>
+    <select id="travelGuideDetails" resultType="com.sooka.jnb.highServer.vo.JnbHighServerVO">
+        SELECT jhs.id,
+               title_name,
+               text_details,
+               jhs.type as type,
+               jhs.create_by,
+               jhs.create_time,
+               jhs.update_by,
+               jhs.update_time,
+               GROUP_CONCAT(jhsi.id) AS imgId,
+               GROUP_CONCAT(jhsi.img_url) AS imgUrlList,
+               jhs.like_num,
+               jhs.watch_num
+        FROM jnb_high_server jhs
+                 left JOIN jnb_high_server_img jhsi ON jhs.id = jhsi.server_id and jhs.type = jhsi.type and jhsi.del_flag = 0
+        where jhs.del_flag = 0 and jhs.type = 1 and jhs.id = #{id}
+        GROUP BY jhs.id
+    </select>
+    <update id="updateLikeNumber">
+        update jnb_high_server set like_num = like_num + 1 where id = #{id} and type = #{type}
+    </update>
+    <update id="updateWatchNumber">
+        update jnb_high_server set watch_num = watch_num + 1 where id = #{id} and type = #{type}
+    </update>
 </mapper>

+ 2 - 1
sooka-jnb/src/main/resources/mapper/my/JnbNameAuthenticationMapper.xml

@@ -30,10 +30,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
             <if test="idCard != null  and idCard != ''"> and id_card = #{idCard}</if>
             <if test="status != null  and status != ''"> and status = #{status}</if>
+        order by create_time desc
     </select>
     
     <select id="selectJnbNameAuthenticationById" parameterType="String" resultMap="JnbNameAuthenticationResult">
-        select a.id, a.name, a.phone, a.id_card, a.status,GROUP_CONCAT(b.path) path
+        select a.id, a.name, a.phone, a.id_card, a.status,GROUP_CONCAT(b.path) path,a.create_time
         from jnb_name_authentication a
 		left join jnb_authentication_img b on a.id = b.authentication_id
         where a.id = #{id}

+ 2 - 1
sooka-jnb/src/main/resources/mapper/my/JnbOfficialAuthenticationMapper.xml

@@ -38,7 +38,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             a.phone,
             a.legal_name,
             a.STATUS,
-            GROUP_CONCAT( b.path ) path
+            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