The main propose of this article is to establish optimal ordering strategy for general merchandise under the stochastic demand. Because the customer arrival time is random and the purchasing quantity is also a random variable. For some merchandise, its sales conditions can be partitioned into three periods: peak-time period, off-peak-time period and holidays. Because of the demands for different goods are not the same, so we need to collect the interval time between customers and the transaction data, and then we apply the statistical theory to predict the demand and its distribution. In addition, we build up an inventory model and according to the optimization technique and numerical analysis method, the article can find out the optimal ordering quantity and reorder point to minimize the total expected cost. The sensitivity analysis was taken to realize the influence of parameters. Finally, three conclusions are drawn for practical applications and future studies.