Преглед на файлове

add short desc property for product

fengchang_fight преди 1 година
родител
ревизия
7debaaa728

+ 1 - 0
hichina-admin-backend/src/main/java/com/hichina/admin/hichinaadminbackend/config/Constants.java

@@ -19,5 +19,6 @@ public class Constants {
 
     public static String GENERALPRICE="e16df480-b17d-4442-91c2-d6c30d0d7ab0";
     public static String MAXNUM="720f4f2e-e114-4003-9806-bc56a9366278";
+    public static String SHORTDESC="f3cac6ed-8e87-4fb9-a912-bd87f483b4d5";
 
 }

+ 6 - 0
hichina-admin-backend/src/main/java/com/hichina/admin/hichinaadminbackend/service/InitDataService.java

@@ -98,6 +98,7 @@ public class InitDataService {
         insertPropertyIfNotExist("单房差", Constants.SINGLEDIFFPRICEPROP , "integer");
         insertPropertyIfNotExist("价格", Constants.GENERALPRICE , "integer");
         insertPropertyIfNotExist("最大数量", Constants.MAXNUM , "integer");
+        insertPropertyIfNotExist("简述", Constants.SHORTDESC , "string");
     }
 
     @Transactional
@@ -124,6 +125,7 @@ public class InitDataService {
         bindAttributeToProductType(Constants.CHILDPRICEPROP,Constants.TOURPRODUCTTYPE);
         bindAttributeToProductType(Constants.INFANTPRICEPROP,Constants.TOURPRODUCTTYPE);
         bindAttributeToProductType(Constants.SINGLEDIFFPRICEPROP,Constants.TOURPRODUCTTYPE);
+        bindAttributeToProductType(Constants.SHORTDESC,Constants.TOURPRODUCTTYPE);
 
         //机酒自由行
         bindAttributeToProductType(Constants.PRODUCTPROFILEIMAGEPROP,Constants.FLIGHTHOTELPRODUCTTYPE);
@@ -135,6 +137,7 @@ public class InitDataService {
         bindAttributeToProductType(Constants.CHILDPRICEPROP,Constants.FLIGHTHOTELPRODUCTTYPE);
         bindAttributeToProductType(Constants.INFANTPRICEPROP,Constants.FLIGHTHOTELPRODUCTTYPE);
         bindAttributeToProductType(Constants.SINGLEDIFFPRICEPROP,Constants.FLIGHTHOTELPRODUCTTYPE);
+        bindAttributeToProductType(Constants.SHORTDESC,Constants.FLIGHTHOTELPRODUCTTYPE);
 
         //机票package
         bindAttributeToProductType(Constants.PRODUCTPROFILEIMAGEPROP,Constants.FLIGHTPRODUCTTYPE);
@@ -145,6 +148,7 @@ public class InitDataService {
         bindAttributeToProductType(Constants.ADULTPRICEPROP,Constants.FLIGHTPRODUCTTYPE);
         bindAttributeToProductType(Constants.CHILDPRICEPROP,Constants.FLIGHTPRODUCTTYPE);
         bindAttributeToProductType(Constants.INFANTPRICEPROP,Constants.FLIGHTPRODUCTTYPE);
+        bindAttributeToProductType(Constants.SHORTDESC,Constants.FLIGHTPRODUCTTYPE);
 
         //酒店package
         bindAttributeToProductType(Constants.PRODUCTPROFILEIMAGEPROP,Constants.HOTELPRODUCTTYPE);
@@ -154,11 +158,13 @@ public class InitDataService {
         bindAttributeToProductType(Constants.TYPEOFPACKAGEPROP,Constants.HOTELPRODUCTTYPE);
         bindAttributeToProductType(Constants.GENERALPRICE,Constants.HOTELPRODUCTTYPE);
         bindAttributeToProductType(Constants.MAXNUM,Constants.HOTELPRODUCTTYPE);
+        bindAttributeToProductType(Constants.SHORTDESC,Constants.HOTELPRODUCTTYPE);
 
         //文创土特产
         bindAttributeToProductType(Constants.PRODUCTPROFILEIMAGEPROP,Constants.LOCALSPECIALTYPRODUCTTYPE);
         bindAttributeToProductType(Constants.SUPPLIERPROP,Constants.LOCALSPECIALTYPRODUCTTYPE);
         bindAttributeToProductType(Constants.TYPEOFPACKAGEPROP,Constants.LOCALSPECIALTYPRODUCTTYPE);
         bindAttributeToProductType(Constants.GENERALPRICE,Constants.LOCALSPECIALTYPRODUCTTYPE);
+        bindAttributeToProductType(Constants.SHORTDESC,Constants.LOCALSPECIALTYPRODUCTTYPE);
     }
 }

+ 1 - 1
hichina-admin-front/src/components/ProductEditorDialog.vue

@@ -154,7 +154,7 @@
                 outlined
                 type="textarea"
                 v-model="item.attributeValue"
-                :label="item.attributeName + '(最长200字符)'"
+                :label="item.attributeName"
                 :rules="[
                   (val) =>
                     val.length <= 200 || 'Please use maximum 200 characters',

+ 1 - 1
hichina-admin-front/src/pages/ProductSkuPage.vue

@@ -252,7 +252,7 @@
                     '[string]' + item.attribute_id
                   ]
                 "
-                :label="item.attribute_name + '(最长200字符)'"
+                :label="item.attribute_name"
                 :rules="[
                   (val) =>
                     val.length <= 200 || 'Please use maximum 200 characters',

Файловите разлики са ограничени, защото са твърде много
+ 343 - 343
hichina-admin-front/yarn.lock


+ 10 - 1
hichina-main-front-mobile-first/src/pages/ProductDetailPage.vue

@@ -39,7 +39,7 @@
           {{ productName }}
         </div>
         <div class="q-ml-md q-pl-md col" style="background-color: #fff9c6">
-          {{ removeHtmlTag(productDescription).substring(0, 300) }}...
+          {{ removeHtmlTag(shortProductDescription).substring(0, 500) }}...
         </div>
       </div>
     </div>
@@ -285,6 +285,7 @@ export default {
     const skusInGroup = { skus: [] };
     const productName = ref("");
     const productDescription = ref("");
+    const shortProductDescription = ref("");
     const productTypeId = ref("");
     const productTypeName = ref("");
     const packageCategories = ref([]);
@@ -318,6 +319,7 @@ export default {
     const ADULTPRICEPROP = "e228b843-e054-41f8-91dd-19663460df54";
     const CHILDPRICEPROP = "c4c845a7-4bef-46d8-a5ad-d72a5464e8b1";
     const INFANTPRICEPROP = "448406cb-b68f-439e-9da8-148d78ae8404";
+    const SHORTDESCRIPTIONPROP = "f3cac6ed-8e87-4fb9-a912-bd87f483b4d5";
 
     const forceRerender = async () => {
       // Remove MyComponent from the DOM
@@ -619,6 +621,12 @@ export default {
         skusInGroup.skus[indexToFilter]["hichinaProductBasicDTO"][
           "productContent"
         ];
+
+      shortProductDescription.value =
+        extractAttributeValueFromProductPropertyBag(
+          skusInGroup.skus[indexToFilter],
+          SHORTDESCRIPTIONPROP
+        );
     }
 
     function setActiveCate(item, index) {
@@ -786,6 +794,7 @@ export default {
       autoplay: ref(true),
       imageContainer,
       productDescription,
+      shortProductDescription,
       handleSelectDate,
       selectedDate,
       state,

Някои файлове не бяха показани, защото твърде много файлове са промени