+ // check if sku group of name request.getProductName() and request.getProductTypeId() exist, if not, insert new sku group, and set corresponding sku_group_id in product
+ @Select("select count(*) from destination where level=#{level}")
+ Integer countByLevel(Integer level);
+
+ @Select("select * from destination where destination_name like CONCAT('%',CONCAT(#{query},'%')) or description like CONCAT('%',CONCAT(#{query},'%')) order by created_date desc")
+ @Select("select * from destination where destination_name like CONCAT('%',CONCAT(#{query},'%')) or description like CONCAT('%',CONCAT(#{query},'%')) and level=#{level} order by created_date desc")
+ @Select("select count(*) from destination where destination_name like CONCAT('%',CONCAT(#{query},'%')) or description like CONCAT('%',CONCAT(#{query},'%'))")
+ Integer countByQuery(String query);
+
+ @Select("select count(*) from destination where destination_name like CONCAT('%',CONCAT(#{query},'%')) or description like CONCAT('%',CONCAT(#{query},'%')) and leve=#{level}")
+ @Select("select * from hichina_line where name like CONCAT('%',CONCAT(#{query},'%')) or description like CONCAT('%',CONCAT(#{query},'%')) order by created_date desc")
+ @Select("select pm.attribute_id, a.attribute_name, a.data_type from hichina_product p inner join product_type_attribute_mapping pm on p.product_type_id=pm.product_type_id inner join product_attribute a on a.attribute_id=pm.attribute_id where p.sku_id=#{skuId}")
+ @Select("select sku_id, product_type_name, product_name, product_content, created_time from hichina_product p inner join hichina_product_type t on p.product_type_id=t.product_type_id where p.product_type_id=#{productTypeId} and product_name like CONCAT('%',CONCAT(#{query},'%')) and product_content like CONCAT('%',CONCAT(#{query},'%')) ")
+ @Select("select sku_id, product_type_name, product_name, product_content, created_time from hichina_product p inner join hichina_product_type t on p.product_type_id=t.product_type_id ")
+ List<HichinaProductDTO> findAllProduct();
+
+
+ @Select("select sku_id, product_type_name, product_name, product_content, created_time from hichina_product p inner join hichina_product_type t on p.product_type_id=t.product_type_id where product_name like CONCAT('%',CONCAT(#{query},'%')) and product_content like CONCAT('%',CONCAT(#{query},'%')) ")
+ @Select("select sku_id, product_type_name, product_name, product_content, created_time from hichina_product p inner join hichina_product_type t on p.product_type_id=t.product_type_id where p.product_type_id=#{productTypeId} ")
+ @Select("select sku_id, product_type_name, product_name, product_content, created_time from hichina_product p inner join hichina_product_type t on p.product_type_id=t.product_type_id where p.sku_id=#{skuId} ")
+ @Select("select count(*) from hichina_product where product_type_id=#{productTypeId} and product_name like CONCAT('%',CONCAT(#{query},'%')) and product_content like CONCAT('%',CONCAT(#{query},'%')) ")
+ int countByProductTypeIdAndQuery(String productTypeId, String query);
+
+ @Select("select count(*) from hichina_product where product_name like CONCAT('%',CONCAT(#{query},'%')) and product_content like CONCAT('%',CONCAT(#{query},'%')) ")
+ int countByQuery(String query);
+
+ @Update("update hichina_product SET product_type_id=#{productTypeId}, sku_group_id=#{skuGroupId}, product_name=#{productName}, product_content=#{productContent}, created_time=#{createdTime} where sku_id=#{skuId}")
+ void updateBySkuId(HichinaProduct product);
+
+ @Select("select count(*) from hichina_product where product_type_id=#{productTypeId}")
+ @Insert("INSERT INTO product_sku_group(sku_group_id, sku_group_name, product_type_id, created_date) VALUES(#{skuGroupId},#{skuGroupName}, #{productTypeId}, #{createdDate})")
+ void insert(ProductSkuGroup productSkuGroup);
+
+ @Update("update product_sku_group SET sku_group_name=#{skuGroupName}, product_type_id=#{productTypeId}, created_date=#{createdDate}, enabled=#{enabled} where sku_group_id=#{skuGroupId}")
+ void update(ProductSkuGroup group);
+
+ @Select("select * from product_sku_group where sku_group_name=#{name} and product_type_id=#{productTypeId}")
+ @Select("select temp.sku_group_id, temp.sku_group_name, temp.product_type_id, t.product_type_name, temp.product_count, temp.enabled from (select g.sku_group_id , g.sku_group_name , g.product_type_id , g.enabled, count(p.sku_id) as product_count from product_sku_group g inner join hichina_product p on g.sku_group_id = p.sku_group_id group by g.sku_group_id , g.sku_group_name , g.product_type_id order by g.created_date desc) temp inner join hichina_product_type t on t.product_type_id = temp.product_type_id")
+ List<SkuGroupStatsDTO> findAllSkuGroupStats();
+
+ @Select("select count(*) from (select g.sku_group_id , g.sku_group_name , g.product_type_id , count(p.sku_id) as product_count from product_sku_group g inner join hichina_product p on g.sku_group_id = p.sku_group_id group by g.sku_group_id , g.sku_group_name , g.product_type_id order by g.created_date desc) temp inner join hichina_product_type t on t.product_type_id = temp.product_type_id")
+ Integer countAllSkuGroupStats();
+
+ @Select("select temp.sku_group_id, temp.sku_group_name, temp.product_type_id, t.product_type_name, temp.product_count, temp.enabled from (select g.sku_group_id , g.sku_group_name , g.product_type_id , g.enabled, count(p.sku_id) as product_count from product_sku_group g inner join hichina_product p on g.sku_group_id = p.sku_group_id group by g.sku_group_id , g.sku_group_name , g.product_type_id order by g.created_date desc) temp inner join hichina_product_type t on t.product_type_id = temp.product_type_id where temp.sku_group_name like CONCAT('%',CONCAT(#{query},'%'))")
+ @Select("select count(*) from (select g.sku_group_id , g.sku_group_name , g.product_type_id , count(p.sku_id) as product_count from product_sku_group g inner join hichina_product p on g.sku_group_id = p.sku_group_id group by g.sku_group_id , g.sku_group_name , g.product_type_id order by g.created_date desc) temp inner join hichina_product_type t on t.product_type_id = temp.product_type_id where temp.sku_group_name like CONCAT('%',CONCAT(#{query},'%'))")
+ @Select("select a.attribute_name, pm.attribute_id, pm.attribute_value, pm.data_type from product_sku_int_attribute_mapping pm inner join product_attribute a on a.attribute_id=pm.attribute_id where sku_id=#{skuId}")
+ @Select("select a.attribute_name, pm.attribute_id, pm.attribute_value, pm.data_type from product_sku_timestamp_attribute_mapping pm inner join product_attribute a on a.attribute_id=pm.attribute_id where sku_id=#{skuId}")
+ @Select("select a.attribute_name, pm.attribute_id, pm.attribute_value, pm.data_type from product_sku_varchar_attribute_mapping pm inner join product_attribute a on a.attribute_id=pm.attribute_id where sku_id=#{skuId}")
+ "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.",
+ "deprecated": "Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility",