Subversion Repositories SmartDukaan

Rev

Rev 2084 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2084 Rev 2175
Line 59... Line 59...
59
 
59
 
60
 
60
 
61
echo "Generating content for one entities ${PROJECT_DIR}"
61
echo "Generating content for one entities ${PROJECT_DIR}"
62
echo "======================================================="
62
echo "======================================================="
63
cd ${PROJECT_DIR}/ContentStore
63
cd ${PROJECT_DIR}/ContentStore
64
java -cp ${M2_CLASSPATH}  in.shop2020.util.ContentGenerationUtility -t ONE -i ${ENTITY_ID} > ${CONTENT_LOG} 
64
java -cp ${M2_CLASSPATH}  in.shop2020.util.ContentGenerationUtility -t ONE -e ${ENTITY_ID} > ${CONTENT_LOG} 
65
echo "======================================================="
65
echo "======================================================="
66
echo "Content generation completed"
66
echo "Content generation completed"
67
 
67
 
68
/etc/init.d/tomcat6 start
68
/etc/init.d/tomcat6 start
69
/etc/init.d/apache2 restart
69
/etc/init.d/apache2 restart
70
echo "Tomcat restarted at `date +%c`"
70
echo "Tomcat restarted at `date +%c`"
71
 
71
 
72
echo "Dumping item, vendoritemmapping and vendoritempricing tables to be imported on staging and production servers"
72
echo "Dumping item, vendoritemmapping and vendoritempricing tables to be imported on staging and production servers"
73
echo "======================================================="
73
echo "======================================================="
74
cd ${PRGDIR}
74
cd ${PRGDIR}
-
 
75
mysql -uroot -pshop2020 catalog -e "SELECT CONCAT('UPDATE item SET id=',id,',product_group=',product_group,',brand=',brand,',model_number=',model_number,',model_name=',model_name,',color=',color,',category=',category,',comments=',comments,',catalog_item_id=',catalog_item_id,',feature_id=',feature_id,',feature_description=',feature_description,',mrp=',mrp,',mop=',mop,',sellingPrice=',sellingPrice,',dealerPrice=',dealerPrice,',transfer_price=',transfer_price,',weight=',weight,',addedOn=',addedOn,',updatedOn=',updatedOn,',startDate=',startDate,',retireDate=',retireDate,',status=',status,',status_description=',status_description,',bestDealText=',bestDealText,',bestDealValue=',bestDealValue,',bestSellingRank=',bestSellingRank,',hotspotCategory=',hotspotCategory,',defaultForEntity=',defaultForEntity,',preferredWarehouse=',preferredWarehouse,' WHERE ID=', id) FROM item WHERE catalog_item_id = ${ENTITY_ID}" | tail -n+2 > ${MYSQL_DUMP}
-
 
76
cat ${MYSQL_DUMP}
75
mysqldump -uroot -pshop2020 catalog --tables item vendoritemmapping vendoritempricing > ${MYSQL_DUMP}
77
#mysqldump -uroot -pshop2020 catalog --tables item vendoritemmapping vendoritempricing > ${MYSQL_DUMP}
76
 
-
 
-
 
78
#TODO Read data of only this catalog id and prepare some UPDATE statements. These statements should be executed on production  server
77
 
79
 
78
echo "Copying generated content to staging and production servers"
80
echo "Copying generated content to staging and production servers"
79
echo "======================================================="
81
echo "======================================================="
80
#Update media content on both staging and production
82
#Update media content on both staging and production
81
cd /var/lib/tomcat6/webapps/export
83
cd /var/lib/tomcat6/webapps/export