Offline stores are seriously challenged by online shops. To attract more customers to compete with online shops, the patterns of customer flows and their influence factors are important knowledge. To address this issue, we collected indoor positioning data of 534,641 and 59,160 customers in two shopping malls (i.e., Dayuecheng (DYC) in Beijing and Longhu (LH) in Chongqing, China) for one week, respectively. The temporal patterns of the customer flows show that (1) total customer flows are high on weekends and low midweek and (2) peak hourly flow is related to mealtimes for LH and only on weekdays for DYC. The difference in temporal patterns between the two malls may be attributed to the difference in their locations. The customer flows to stores reveal that the customer flows to clothing, food and general stores are the highest; specifically, in DYC, the order is clothing, food and general, while in LH, it is food, clothing and general. To identify the factors influencing customer flow, we applied linear regression to the inflow density of stores (customers per square meter) of two major classes (clothing and food stores), with 10 locational and social factors as independent variables. The results indicate that flow density is significantly influenced by store location, visibility (except for food stores in DYC) and reputation. Besides, the difference between the two store classes is that clothing stores are influenced by more convenience factors, including distance to an elevator and distance to the floor center (only for LH). Overall, the two shopping malls demonstrate similar customer flow patterns and influencing factors with some obvious differences also attributed to their layout, functions and locations.