-->using userid and deviceid we have to check there is any data in register table(this is for check which device is having this app with this mobile number)
-->if yes
-->check trial_status is 0 or 1 in register table (trial_status from select query of userid & deviceid)
-->if 0 means show all palns in plan table
-->sent code is 1 for success & message & result
-->if 1 means show plans without trial plan
-->sent code is 1 for success & message & result
-->if no
-->show code is 2 for error & message is "this mobile number is register with another device please check"
-->using userid and deviceid ,we have to check there is any data in register table with deviceid and userid(this is for check which device is having this app with this mobile number)
-->if yes
-->get mobile and plan from application also get plan table all details using select query
-->check there is any match from select query of planid and given request plan id
-->if match
-->get usertype(1-free,0-payment) is 1 or 0
-->if 1 this is free plan
-->update details trial-status=1,status=2(activeplan),plan_type=1,startdate,enddate with 7days(dynamically get days from above select query) perid in register table by using mobilenumber
-->if 0 means this is paid plan
-->update details status=2(activeplan),plan_type=2(dynamic),startdate,enddate with 365days(dynamically get days from above select query) perid in register table by using mobilenumber
-->show code is 2 for error & message is "this mobile number is register with another device please check"
6.Listnews(GET)
==========
-->using userid and deviceid ,we have to check there is any data in register table with deviceid and userid(this is for check which device is having this app with this mobile number)
-->if yes
-->select news from news table with desc order and status=1
-->check there is any match from select query
-->if match
-->sent code 1 for success & message
-->if no
-->sent code 0 for no data & message
-->if no
-->show code is 2 for error & message is "this mobile number is register with another device please check"
7.Listcategories(GET)
================
-->using userid and deviceid ,we have to check there is any data in register table with deviceid and userid(this is for check which device is having this app with this mobile number)
-->if yes
-->select category from category table with status=1 & using these category id get marketcount from market_product table
-->sent all data to async method to get result from single object data
-->after get result , sent code 1 for success & message
-->if no
-->show code is 2 for error & message is "this mobile number is register with another device please check"
8.Listmarkets(GET)
============
-->using userid and deviceid ,we have to check there is any data in register table with deviceid and userid(this is for check which device is having this app with this mobile number)
-->if yes
-->select needed details
-->check there is any match from select query
-->if match
-->sent code 1 for success & message
-->if no
-->sent code 0 for no data & message
-->if no
-->show code is 2 for error & message is "this mobile number is register with another device please check"
9.Categorydetails(/categoryId(GET))
=================
-->using userid and deviceid ,we have to check there is any data in register table with deviceid and userid(this is for check which device is having this app with this mobile number)
-->if yes
-->select all details from product table by using categoryId with status=1
-->check there is any match from select query
-->if match
-->sent all data to async method to get result from single object data
-->sent code 1 for success & message
-->if no
-->sent code 0 for no data & message
-->if no
-->show code is 2 for error & message is "this mobile number is register with another device please check"
10.Total items from market count(this week (GET))
=========================
-->using userid and deviceid ,we have to check there is any data in register table with deviceid and userid(this is for check which device is having this app with this mobile number)
-->if yes
-->select all details from product_price table by using thisweek data(7days intervel) with status=1
-->check there is any match from select query
-->if match
-->sent code 1 for success & message
-->if no
-->sent code 0 for no data & message
-->if no
-->show code is 2 for error & message is "this mobile number is register with another device please check"
11.Recent News count(This week (GET))
==============
-->using userid and deviceid ,we have to check there is any data in register table with deviceid and userid(this is for check which device is having this app with this mobile number)
-->if yes
-->select all details from news table by using thisweek data(7days intervel) with status=1
-->check there is any match from select query
-->if match
-->sent code 1 for success & message
-->if no
-->sent code 0 for no data & message
-->if no
-->show code is 2 for error & message is "this mobile number is register with another device please check"
12. Statewise product with price(productId(GET)
==============
-->using userid and deviceid ,we have to check there is any data in register table with deviceid and userid(this is for check which device is having this app with this mobile number)
-->if yes
-->select all details from market and state table with status=1
-->check there is any match from select query
-->if match
-->pass that productid into productprice table and select needed data and using async method to join two query objects
-->receive query and sent code 1 for success & message
-->if no
-->sent code 0 for no data & message
-->if no
-->show code is 2 for error & message is "this mobile number is register with another device please check"
13.News category(This week (GET))
==============
-->using userid and deviceid ,we have to check there is any data in register table with deviceid and userid(this is for check which device is having this app with this mobile number)
-->if yes
-->select all details from newscategory table with status=1
-->check there is any match from select query
-->if match
-->sent code 1 for success & message
-->if no
-->sent code 0 for no data & message
-->if no
-->show code is 2 for error & message is "this mobile number is register with another device please check"
14.This Week news filter(This week (GET))
==============
-->using userid and deviceid ,we have to check there is any data in register table with deviceid and userid(this is for check which device is having this app with this mobile number)
-->if yes
-->select all details from news table by using thisweek data(7days intervel) with status=1
-->check there is any match from select query
-->if match
-->sent code 1 for success & message
-->if no
-->sent code 0 for no data & message
-->if no
-->show code is 2 for error & message is "this mobile number is register with another device please check"
14.Next week news filter(This week (GET))
==============
-->using userid and deviceid ,we have to check there is any data in register table with deviceid and userid(this is for check which device is having this app with this mobile number)
-->if yes
-->select all details from news table by using nextweek data(7days intervel) with status=1
-->check there is any match from select query
-->if match
-->sent code 1 for success & message
-->if no
-->sent code 0 for no data & message
-->if no
-->show code is 2 for error & message is "this mobile number is register with another device please check"
15.Last month news filter(This week (GET))
==============
-->using userid and deviceid ,we have to check there is any data in register table with deviceid and userid(this is for check which device is having this app with this mobile number)
-->if yes
-->select all details from news table by using lastmonth data(30days intervel) with status=1
-->check there is any match from select query
-->if match
-->sent code 1 for success & message
-->if no
-->sent code 0 for no data & message
-->if no
-->show code is 2 for error & message is "this mobile number is register with another device please check"
16.Custom range news filter(startdate ,enddate (GET))
==============
-->using userid and deviceid ,we have to check there is any data in register table with deviceid and userid(this is for check which device is having this app with this mobile number)
-->if yes
-->select all details from news table by using passing start date and end date with status=1
-->check there is any match from select query
-->if match
-->sent code 1 for success & message
-->if no
-->sent code 0 for no data & message
-->if no
-->show code is 2 for error & message is "this mobile number is register with another device please check"
-->using userid and deviceid ,we have to check there is any data in register table with deviceid and userid(this is for check which device is having this app with this mobile number)
-->if yes
-->select all details from newscategory table by using NewscategoryId with status=1
-->check there is any match from select query
-->if match
-->sent code 1 for success & message
-->if no
-->sent code 0 for no data & message
-->if no
-->show code is 2 for error & message is "this mobile number is register with another device please check"
18.List particular news (NewsId (GET))
==============
-->using userid and deviceid ,we have to check there is any data in register table with deviceid and userid(this is for check which device is having this app with this mobile number)
-->if yes
-->select all details from newstable by using NewsId with status=1
-->check there is any match from select query
-->if match
-->sent code 1 for success & message
-->if no
-->sent code 0 for no data & message
-->if no
-->show code is 2 for error & message is "this mobile number is register with another device please check"