当前位置: 首页 > news >正文

桂林漓江在哪个县哪个区抖音seo排名软件哪个好

桂林漓江在哪个县哪个区,抖音seo排名软件哪个好,厦门网站设计制作,微电影制作效果展示 Apache ECharts 介绍 常见图表 入门案例 快速上手 - Handbook - Apache ECharts 营业额统计——需求分析与设计 产品原型 接口设计 VO设计 营业额统计——代码开发 Controller中 /*** 数据统计相关接口*/ RestController RequestMapping("/admin/report&qu…

效果展示

Apache  ECharts

介绍

常见图表

 

 

入门案例

快速上手 - Handbook - Apache ECharts

 

 营业额统计——需求分析与设计

产品原型

 接口设计

VO设计

 营业额统计——代码开发

Controller中

/*** 数据统计相关接口*/
@RestController
@RequestMapping("/admin/report")
@Api(tags="数据统计相关接口")
@Slf4j
public class ReportController {@Autowiredprivate ReportService reportService;/*** 营业额统计* @param begin* @param end* @return*/@GetMapping("/turnoverStatistics")@ApiOperation("营业额统计")public Result<TurnoverReportVO> turnoverStatistics(@DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate begin,@DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate end){log.info("营业额数据统计:{},{}",begin,end);return Result.success(reportService.getTurnoverStatistics(begin,end));}
}

Service中

@Service
@Slf4j
public class ReportServiceImpl implements ReportService {@Autowiredprivate OrderMapper orderMapper;/*** 统计指定时间区间内的营业额数据* @param begin* @param end* @return*/@Overridepublic TurnoverReportVO getTurnoverStatistics(LocalDate begin, LocalDate end) {//当前集合存在从begin到end的日期List<LocalDate> dateList=new ArrayList<>();dateList.add(begin);while(!begin.equals(end)){//计算指定日期的后一天begin=begin.plusDays(1);dateList.add(begin);}//存放每天营业额List<Double> turnoverList=new ArrayList<>();for (LocalDate date : dateList) {//查询date对应的营业额,为已经完成的订单金额合计LocalDateTime beginTime = LocalDateTime.of(date, LocalTime.MIN);LocalDateTime endTime = LocalDateTime.of(date, LocalTime.MAX);//select sum(amount) from orders where order_time > ? and order_time < ? and status = 5Map map=new HashMap();map.put("begin",beginTime);map.put("end",endTime);map.put("status", Orders.COMPLETED);Double turnover=orderMapper.sumByMap(map);turnover = turnover == null?0.0:turnover;turnoverList.add(turnover);}//封装返回结果return TurnoverReportVO.builder().dateList(StringUtils.join(dateList,",")).turnoverList(StringUtils.join(turnoverList,",")).build();}
}

Mapper中

    /*** 根据动态条件统计营业额数据* @param map* @return*/Double sumByMap(Map map);

对应的映射文件

    <select id="sumByMap" resultType="java.lang.Double">select sum(amount) from orders<where><if test="begin != null">and order_time &gt; #{begin}</if><if test="end != null">and order_time &lt; #{end}</if><if test="status != null">and status = #{status}</if></where></select>

 

 营业额统计——功能测试

 

用户统计——需求分析与设计

产品原型

 接口设计

VO设计

 

用户统计——代码开发

Controller中

    /*** 用户统计* @param begin* @param end* @return*/@GetMapping("userStatistics")@ApiOperation("用户统计")public  Result<UserReportVO> userStatistics(@DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate begin,@DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate end){log.info("营业额数据统计:{},{}",begin,end);UserReportVO userStatistics = reportService.getUserStatistics(begin, end);return Result.success(userStatistics);}

Service中

    /*** 统计指定时间区间内的用户数量* @return*/@Overridepublic UserReportVO getUserStatistics(LocalDate begin, LocalDate end) {//当前集合存放从begin到end的日期List<LocalDate> dateList=new ArrayList<>();dateList.add(begin);while(!begin.equals(end)){//计算指定日期的后一天begin=begin.plusDays(1);dateList.add(begin);}//存放每天的新增用户数量 select count(id) from user where create_time < ? and create_time > ?List<Integer> newUserList=new ArrayList<>();//存放每天的总用户数量 select count(id) from user where create_time < ?List<Integer> totalUserList=new ArrayList<>();for (LocalDate date:dateList){LocalDateTime beginTime = LocalDateTime.of(date, LocalTime.MIN);LocalDateTime endTime = LocalDateTime.of(date, LocalTime.MAX);Map map=new HashMap();map.put("end",endTime);//总用户数量Integer totalUser =userMapper.countByMap(map);map.put("begin",beginTime);//新增用户数量Integer newUser=userMapper.countByMap(map);totalUserList.add(totalUser);newUserList.add(newUser);}return UserReportVO.builder().dateList(StringUtils.join(dateList,",")).totalUserList(StringUtils.join(totalUserList,",")).newUserList(StringUtils.join(newUserList,",")).build();}

Mapper中

    /*** 根据动态天条件统计用户数量* @param map* @return*/Integer countByMap(Map map);

对应的映射文件

    <select id="countByMap" resultType="java.lang.Integer">select count(id) from user<where><if test="begin != null">and create_time &gt; #{begin}</if><if test="end != null">and create_time &lt; #{end}</if></where></select>

用户统计——功能测试

订单统计——需求分析与设计

产品原型

接口设计

 

VO设计

 

订单统计——代码开发

Controller中

    /*** 订单统计* @param begin* @param end* @return*/@GetMapping("ordersStatistics")@ApiOperation("订单统计")public  Result<OrderReportVO> ordersStatistics(@DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate begin,@DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate end){log.info("营业额数据统计:{},{}",begin,end);return Result.success(reportService.getOrderStatistics(begin, end));}

Service中

    /*** 统计指定时间区间内的订单数据* @param begin* @param end* @return*/@Overridepublic OrderReportVO getOrderStatistics(LocalDate begin, LocalDate end) {//当前集合存放从begin到end的日期List<LocalDate> dateList=new ArrayList<>();dateList.add(begin);while(!begin.equals(end)){//计算指定日期的后一天begin=begin.plusDays(1);dateList.add(begin);}//存放每天的订单总数List<Integer> orderCountList=new ArrayList<>();//存放每天的有效订单数List<Integer> validOrderCountList=new ArrayList<>();//遍历dateList集合,查询每天的有效订单数和订单总数for (LocalDate date : dateList) {//查询每天订单总数 select count(id) from orders where order_time > ? and order_time < ?LocalDateTime beginTime = LocalDateTime.of(date, LocalTime.MIN);LocalDateTime endTime = LocalDateTime.of(date, LocalTime.MAX);Integer orderCount = getOrderCount(beginTime, endTime, null);//查询每天有效订单数 select count(id) from orders where order_time > ? and order_time < ? and status = 5Integer validOrderCount = getOrderCount(beginTime, endTime, Orders.CONFIRMED);orderCountList.add(orderCount);validOrderCountList.add(validOrderCount);}//计算时间区间内的订单总数量Integer totalOrderCount = orderCountList.stream().reduce(Integer::sum).get();//计算时间区间内的有效订单数量Integer validOrderCount = validOrderCountList.stream().reduce(Integer::sum).get();Double orderCompletionRate=  0.0;if(totalOrderCount!=0)//计算订单完成各率orderCompletionRate=  validOrderCount.doubleValue()/totalOrderCount;return OrderReportVO.builder().dateList(StringUtils.join(dateList,",")).orderCountList(StringUtils.join(orderCountList,",")).validOrderCountList(StringUtils.join(validOrderCountList,",")).totalOrderCount(totalOrderCount).validOrderCount(validOrderCount).orderCompletionRate(orderCompletionRate).build();}/*** 根据条件统计订单数量* @param begin* @param end* @param status* @return*/private Integer getOrderCount(LocalDateTime begin,LocalDateTime end,Integer status){Map map=new HashMap();map.put("begin",begin);map.put("end",end);map.put("status",status);return orderMapper.countByMap(map);}

Mapper中

    /*** 根据动态条件统计订单数量* @param map* @return*/Integer countByMap(Map map);

对应的映射文件

    <select id="countByMap" resultType="java.lang.Integer">select count(id) from orders<where><if test="begin != null">and order_time &gt; #{begin}</if><if test="end != null">and order_time &lt; #{end}</if><if test="status != null">and status = #{status}</if></where></select>

 

订单统计——功能测试

 

销量排名统计——需求分析与设计

产品原型

接口设计

VO设计

 

销量排名统计——代码开发

Controller中

    /*** 订单统计* @param begin* @param end* @return*/@GetMapping("top10")@ApiOperation("销量排名top10")public  Result<SalesTop10ReportVO> top10(@DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate begin,@DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate end){log.info("销量排名top10:{},{}",begin,end);return Result.success(reportService.getSalesTop10(begin, end));}

Service中

    /*** 统计指定时间区间内的销量排名前10* @return*/@Overridepublic SalesTop10ReportVO getSalesTop10(LocalDate begin, LocalDate end) {//获得当前日期的起始时间LocalDateTime beginTime = LocalDateTime.of(begin, LocalTime.MIN);LocalDateTime endTime = LocalDateTime.of(end, LocalTime.MAX);List<GoodsSalesDTO> salesTop10 = orderMapper.getSalesTop10(beginTime, endTime);List<String> names = salesTop10.stream().map(GoodsSalesDTO::getName).collect(Collectors.toList());String nameList=StringUtils.join(names,",");List<Integer> numbers = salesTop10.stream().map(GoodsSalesDTO::getNumber).collect(Collectors.toList());String numberList=StringUtils.join(numbers,",");//封装返回结果数据return SalesTop10ReportVO.builder().nameList(nameList).numberList(numberList).build();}

Mapper中

select od.name ,sum(od.number) number from order_detail od,orders o where od.order_id = o.id and o.status = 5
and o.order_time > '2022-10-01' and o.order_time < '2023-10-01'
group by od.name
order by number desc
limit 0,10

 

    /*** 统计指定时间区间内的销量排名前10* @return*/List<GoodsSalesDTO> getSalesTop10(LocalDateTime begin ,LocalDateTime end);

对应的映射文件

    <select id="getSalesTop10" resultType="com.sky.dto.GoodsSalesDTO">select od.name ,sum(od.number) numberfrom order_detail od,orders owhere od.order_id = o.id and o.status = 5<if test="begin!=null">and o.order_time &gt; #{begin}</if><if test="end !=null">and o.order_time &lt; #{end}</if>group by od.nameorder by number desclimit 0,10</select>

 

销量排名统计——功能测试

 


文章转载自:
http://afterbody.jftL.cn
http://troilite.jftL.cn
http://rhodochrosite.jftL.cn
http://xylotomous.jftL.cn
http://disciple.jftL.cn
http://senatus.jftL.cn
http://orle.jftL.cn
http://clackdish.jftL.cn
http://brains.jftL.cn
http://noblesse.jftL.cn
http://philhellenist.jftL.cn
http://unsubstantial.jftL.cn
http://fulminant.jftL.cn
http://vext.jftL.cn
http://unpliant.jftL.cn
http://malagasy.jftL.cn
http://recalesce.jftL.cn
http://brandreth.jftL.cn
http://iatrogenic.jftL.cn
http://antehuman.jftL.cn
http://fertilizability.jftL.cn
http://anticyclonic.jftL.cn
http://goat.jftL.cn
http://usis.jftL.cn
http://firth.jftL.cn
http://forficulate.jftL.cn
http://doorpost.jftL.cn
http://nullarbor.jftL.cn
http://aeronautic.jftL.cn
http://jacquard.jftL.cn
http://diphosgene.jftL.cn
http://oriflamme.jftL.cn
http://requisite.jftL.cn
http://careful.jftL.cn
http://citrinin.jftL.cn
http://oddness.jftL.cn
http://rucus.jftL.cn
http://mouser.jftL.cn
http://irrelated.jftL.cn
http://yatter.jftL.cn
http://protohippus.jftL.cn
http://swack.jftL.cn
http://shaikh.jftL.cn
http://pentalpha.jftL.cn
http://boardwalk.jftL.cn
http://parsifal.jftL.cn
http://combo.jftL.cn
http://qnp.jftL.cn
http://multan.jftL.cn
http://homepage.jftL.cn
http://succeed.jftL.cn
http://muscadel.jftL.cn
http://pantalets.jftL.cn
http://defenestration.jftL.cn
http://detachable.jftL.cn
http://antislavery.jftL.cn
http://millesimal.jftL.cn
http://hashslinger.jftL.cn
http://undersleeve.jftL.cn
http://exocardia.jftL.cn
http://demagnify.jftL.cn
http://silvery.jftL.cn
http://supernature.jftL.cn
http://enmity.jftL.cn
http://udaller.jftL.cn
http://tenuous.jftL.cn
http://grandfather.jftL.cn
http://lemuel.jftL.cn
http://panage.jftL.cn
http://aquatint.jftL.cn
http://falter.jftL.cn
http://polyfoil.jftL.cn
http://microlens.jftL.cn
http://faustus.jftL.cn
http://meridic.jftL.cn
http://newsboard.jftL.cn
http://outrance.jftL.cn
http://downpress.jftL.cn
http://demurrable.jftL.cn
http://vitalize.jftL.cn
http://necessity.jftL.cn
http://procrastination.jftL.cn
http://draughtsman.jftL.cn
http://subcapsular.jftL.cn
http://nonimpact.jftL.cn
http://handled.jftL.cn
http://tenderfoot.jftL.cn
http://tetroxide.jftL.cn
http://mamma.jftL.cn
http://achates.jftL.cn
http://hornblende.jftL.cn
http://ecclesiarch.jftL.cn
http://inspectorship.jftL.cn
http://tourmaline.jftL.cn
http://dhow.jftL.cn
http://immanency.jftL.cn
http://backscattering.jftL.cn
http://fleabag.jftL.cn
http://flagella.jftL.cn
http://prefatory.jftL.cn
http://www.dt0577.cn/news/67079.html

相关文章:

  • 旅行社网站建设方案seo和sem的概念
  • 淮南网站建设培训课程名称大全
  • 网站建设站点百度搜索网站优化
  • 做美食网站有哪些网站建设黄页视频
  • wordpress图片特效插件下载石家庄seo管理
  • 网站建设的步骤有哪些seo提升排名技巧
  • 郑州建网站多少国家卫生健康委
  • 电子商务网站建设参考文献书籍图片搜索引擎
  • 采用css div做网站百度做广告怎么做
  • 湛江建站服务seo网课培训
  • 国内电子商务网站有哪些网络运营课程培训班
  • 视频网站开发与制作百度云电脑网页版入口
  • 网站续费会计分录怎样做网站案例
  • wordpress网页设计价格设计优化关键词的公司
  • 酒店网站制作策划成品网站源码的优化技巧
  • 手机微网站建设案例及报告营销渠道策划方案
  • 网站仿站工具没有限制的国外搜索引擎
  • 亚马逊服务器建wordpress武汉好的seo优化网
  • 个人网站设计企业注册网址在哪里注册
  • wordpress 为什么很慢seo如何优化
  • 网站开发php程序员百度服务中心
  • 婚介网站怎么做直播发布会
  • 个人注册公司网站空间网站建设流程
  • 地方域名注册信阳搜索引擎优化
  • 包头建委网站找不到市场营销网站
  • 衢州市哪里都网站建设公司比较好公司网站策划宣传
  • 长沙竞价网站建设价格指数函数求导公式
  • 网站开发增值税税率6%上海网络推广公司网站
  • 成都学校网站建网站地址ip域名查询
  • 临沭做网站seo思维