Pārlūkot izejas kodu

pc端控制整体评价是否可见

he.dujuan 3 gadi atpakaļ
vecāks
revīzija
967aca194e

+ 5 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/service/repository/DmServicePjRepository.java

@@ -26,6 +26,8 @@ import org.springframework.data.jpa.repository.Query;
 import org.springframework.data.repository.query.Param;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.Map;
+
 /**
 * @website https://el-admin.vip
 * @author sunmz
@@ -43,4 +45,7 @@ public interface DmServicePjRepository extends JpaRepository<DmServicePj, Intege
 
     @Query(value = "SELECT COUNT(1) FROM dm_service_pj WHERE to_days(pj_time) = to_days(now()) AND user_code = :userCode",nativeQuery = true)
     int servicePjApp(@Param("userCode") String userCode);
+
+    @Query(value = "SELECT DISTINCT enabled FROM dm_service_pj",nativeQuery = true)
+    Map<String,Object> enableApp();
 }

+ 2 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/service/service/DmServicePjService.java

@@ -97,4 +97,6 @@ public interface DmServicePjService {
     void download(List<DmServicePjDto> all, HttpServletResponse response) throws IOException;
 
     int servicePjApp(String userCode);
+
+    Map<String,Object> enableApp();
 }

+ 5 - 0
eladmin-system/src/main/java/me/zhengjie/modules/dm/service/service/impl/DmServicePjServiceImpl.java

@@ -132,4 +132,9 @@ public class DmServicePjServiceImpl implements DmServicePjService {
     public int servicePjApp(String userCode) {
         return dmServicePjRepository.servicePjApp(userCode);
     }
+
+    @Override
+    public Map<String,Object> enableApp() {
+        return dmServicePjRepository.enableApp();
+    }
 }

+ 7 - 0
eladmin-system/src/main/java/me/zhengjie/modules/thirdparty/v1/OpenApiController.java

@@ -145,5 +145,12 @@ public class OpenApiController {
         return new BaseResponse<>(orderItemRepository.hyFood());
     }
 
+    @AnonymousPostMapping(value = "/enableApp")
+    @Log("pc端控制整体评价是否可见")
+    @ApiOperation("pc端控制整体评价是否可见")
+    public BaseResponse<Object> enableApp(@RequestBody QueryPageParams<DmOrderItem> criteria){
+        SecurityUtils.CheckApiAuth(criteria);
+        return new BaseResponse<>(dmServicePjService.enableApp());
+    }
 
 }