|
|
@@ -90,6 +90,7 @@ import java.sql.PreparedStatement;
|
|
|
import java.sql.ResultSet;
|
|
|
import java.sql.SQLException;
|
|
|
import java.sql.Statement;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
|
|
@@ -2340,5 +2341,27 @@ public class ProductServiceImpl implements ProductService {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据起止时间统计未审核品牌数
|
|
|
+ *
|
|
|
+ * @param fromDate 开始时间
|
|
|
+ * @param toDate 截止时间
|
|
|
+ * @return 返回时间
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public ResultMap countProduct(Long fromDate, Long toDate) {
|
|
|
+ if (fromDate == null || toDate == null) {
|
|
|
+ //统计所有的未审核的品牌信息
|
|
|
+ Integer count = jdbcTemplate.queryForInt("select count(1) from products p left join product$private pp on p.pr_id = pp.pr_id where pp.pr_b2cenabled = 1;");
|
|
|
+ return ResultMap.success(count);
|
|
|
+ } else {
|
|
|
+ Date fromT = new Date(fromDate);
|
|
|
+ Date toT = new Date(toDate);
|
|
|
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ Integer count = jdbcTemplate.queryForInt("select count(1) from products p left join product$private pp on p.pr_id = pp.pr_id where pr_create_time < '" + dateFormat.format(toT) + "' and pr_create_time > '" + dateFormat.format(fromT) + "' and pp.pr_b2cenabled = 1;");
|
|
|
+ return ResultMap.success(count);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|