Bladeren bron

接口增加修改

zhs 3 jaren geleden
bovenliggende
commit
e10120c340

File diff suppressed because it is too large
+ 3 - 41
src/main/java/com/travel/controller/IndexController.java


+ 4 - 4
src/main/java/com/travel/controller/PersonalController.java

@@ -215,7 +215,7 @@ public class PersonalController {
     public Map<String, Object> SendSms(User user, int type) {
         Map<String, Object> map = new HashMap<>();
         try {
-            DefaultProfile profile = DefaultProfile.getProfile("cn-hangzhou", "LTAI5tPxERgiaSgZXSmDNiya", "Y09YLpp6NJE67PF9iCXCNxngPZAPWK");
+            DefaultProfile profile = DefaultProfile.getProfile("cn-hangzhou", "LTAI5tBqqAPaSEWZ3JK1qC6m", "6IAqbAUf47CWUIGOTThpKYO2vMXuX4");
             IAcsClient client = new DefaultAcsClient(profile);
             CommonRequest request = new CommonRequest();
             request.setSysMethod(MethodType.POST);
@@ -224,14 +224,14 @@ public class PersonalController {
             request.setSysAction("SendSms");
             request.putQueryParameter("RegionId", "cn-hangzhou");
             request.putQueryParameter("PhoneNumbers", user.getPhone());//手机号
-            request.putQueryParameter("SignName", "阿里云短信测试");
+            request.putQueryParameter("SignName", "途丫");
             switch (type) {
                 case 1 :
-                    request.putQueryParameter("TemplateCode", "SMS_154950909");
+                    request.putQueryParameter("TemplateCode", "SMS_247415031");
                     request.putQueryParameter("TemplateParam", "{\"code\":\"" + user.getCaptcha() + "\"}");//验证码
                     break;
                 case 4 :
-                    request.putQueryParameter("TemplateCode", "SMS_154950909");
+                    request.putQueryParameter("TemplateCode", "SMS_247415031");
                     request.putQueryParameter("TemplateParam", "{\"code\":\"" + user.getCaptcha() + "\"}");//验证码
                     break;
             }

+ 2 - 2
src/main/java/com/travel/controller/SupplierController.java

@@ -178,11 +178,11 @@ public class SupplierController {
             request.putQueryParameter("SignName", "阿里云短信测试");
             switch (type) {
                 case 1 :
-                    request.putQueryParameter("TemplateCode", "SMS_154950909");
+                    request.putQueryParameter("TemplateCode", "SMS_242688296");
                     request.putQueryParameter("TemplateParam", "{\"code\":\"" + supplier.getCaptcha() + "\"}");//验证码
                     break;
                 case 4 :
-                    request.putQueryParameter("TemplateCode", "SMS_154950909");
+                    request.putQueryParameter("TemplateCode", "SMS_242688296");
                     request.putQueryParameter("TemplateParam", "{\"code\":\"" + supplier.getCaptcha() + "\"}");//验证码
                     break;
             }

+ 3 - 0
src/main/java/com/travel/mapper/IndexMapper.java

@@ -5,10 +5,13 @@ import com.travel.model.Travel;
 import org.apache.ibatis.annotations.Mapper;
 
 import java.util.List;
+import java.util.Map;
 
 @Mapper
 public interface IndexMapper {
     List<Travel> getIndex(Travel travel);
 
     List<IndexHome> getIndexHomeUrl(IndexHome indexHome);
+
+    List<Map<String, Object>> getDestination(IndexHome indexHome);
 }

+ 3 - 0
src/main/java/com/travel/service/IndexService.java

@@ -4,10 +4,13 @@ import com.travel.model.IndexHome;
 import com.travel.model.Travel;
 
 import java.util.List;
+import java.util.Map;
 
 public interface IndexService {
 
     List<Travel> getIndex(Travel travel);
 
     List<IndexHome> getIndexHomeUrl(IndexHome indexHome);
+
+    List<Map<String, Object>> getDestination(IndexHome indexHome);
 }

+ 6 - 0
src/main/java/com/travel/service/impl/IndexServiceImpl.java

@@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
+import java.util.Map;
 
 @Service
 public class IndexServiceImpl implements IndexService {
@@ -23,4 +24,9 @@ public class IndexServiceImpl implements IndexService {
     public List<IndexHome> getIndexHomeUrl(IndexHome indexHome) {
         return indexMapper.getIndexHomeUrl(indexHome);
     }
+
+    @Override
+    public List<Map<String, Object>> getDestination(IndexHome indexHome) {
+        return indexMapper.getDestination(indexHome);
+    }
 }

+ 5 - 0
src/main/resources/config/mapping/IndexMapper.xml

@@ -36,5 +36,10 @@
                 and category_id = #{type}
             </if>
         </trim>
+        order by sort_id
+    </select>
+    <!-- 查询指定内容 -->
+    <select id="getDestination" resultType="Map" parameterType="IndexHome">
+        select * from tuya_article_info where category_id = #{type} order by sort_id
     </select>
 </mapper>

+ 1 - 1
src/main/resources/config/mapping/PrivateOrderMapper.xml

@@ -168,7 +168,7 @@
             LEFT JOIN bus_private_ordering b ON a.demand_uuid = b.uuid
             LEFT JOIN ( SELECT COUNT ( * ) AS collectionNum, ordering_uuid FROM bus_collection WHERE type = '0' AND code = #{code} GROUP BY ordering_uuid ) f ON a.uuid = f.ordering_uuid
             LEFT JOIN ( SELECT COUNT ( * ) AS conllectionCount, ordering_uuid FROM bus_collection WHERE type = '0' GROUP BY ordering_uuid ) g ON a.uuid = g.ordering_uuid
-            LEFT JOIN ( SELECT order_type as orderType,demand_uuid FROM bus_private_ordering_type WHERE order_type != '0' GROUP BY demand_uuid,order_type ) h ON a.demand_uuid = h.demand_uuid
+            LEFT JOIN ( SELECT order_type as orderType,demand_uuid,code FROM bus_private_ordering_type WHERE order_type != '0' GROUP BY demand_uuid,order_type,code ) h ON a.demand_uuid = h.demand_uuid and a.code = h.code
             LEFT JOIN sys_supplier e ON a.code = e.code
         <trim prefix="WHERE" prefixOverrides="and | or">
             <if test="uuid != null and uuid != ''">

+ 56 - 13
src/main/resources/config/mapping/ReleaseTravelMapper.xml

@@ -112,7 +112,26 @@
                 </trim>
             ) e
         where
-            e.id not in (select top ${page} f.id from (select id,jdrq from bus_travel UNION ALL select id,jdrq from bus_supplier_route) f ORDER BY f.jdrq desc)
+            e.id not in (
+                select top ${page} f.id
+                from
+                (select id,jdrq
+                from bus_travel
+                <trim prefix="WHERE" prefixOverrides="and | or">
+                    <if test="destination != null and destination != ''">
+                        destination = #{destination}
+                    </if>
+                </trim>
+                UNION ALL
+                select
+                    id,jdrq
+                from bus_supplier_route
+                <trim prefix="WHERE" prefixOverrides="and | or">
+                    <if test="destination != null and destination != ''">
+                        destination = #{destination}
+                    </if>
+                </trim>
+                ) f ORDER BY f.jdrq desc)
         ORDER BY
             e.jdrq desc
     </select>
@@ -236,18 +255,42 @@
     <!-- 查询游记总数 -->
     <select id="getTravelCountAll" resultType="int">
         select count(*) as count
-        from bus_travel
-        <trim prefix="WHERE" prefixOverrides="and | or">
-            <if test="stateType != null and stateType != ''">
-                and state_type = #{stateType}
-            </if>
-            <if test="demandUuid != null and demandUuid != ''">
-                and demand_uuid = #{demandUuid}
-            </if>
-            <if test="code != null and code != ''">
-                and code = #{code}
-            </if>
-        </trim>
+        from
+            (
+                select id
+                from bus_travel
+                <trim prefix="WHERE" prefixOverrides="and | or">
+                    <if test="stateType != null and stateType != ''">
+                        and state_type = #{stateType}
+                    </if>
+                    <if test="demandUuid != null and demandUuid != ''">
+                        and demand_uuid = #{demandUuid}
+                    </if>
+                    <if test="code != null and code != ''">
+                        and code = #{code}
+                    </if>
+                    <if test="destination != null and destination != ''">
+                        destination = #{destination}
+                    </if>
+                </trim>
+                UNION ALL
+                select id
+                FROM bus_supplier_route
+                <trim prefix="WHERE" prefixOverrides="and | or">
+                    <if test="stateType != null and stateType != ''">
+                        and state_type = #{stateType}
+                    </if>
+                    <if test="demandUuid != null and demandUuid != ''">
+                        and demand_uuid = #{demandUuid}
+                    </if>
+                    <if test="code != null and code != ''">
+                        and code = #{code}
+                    </if>
+                    <if test="destination != null and destination != ''">
+                        destination = #{destination}
+                    </if>
+                </trim>
+            ) a
     </select>
     <!-- 查询游记总数个人 -->
     <select id="getTravelCount" resultType="int">