Browse Source

statistics add userAttrType

wangming 6 days ago
parent
commit
0865c4bb5b

+ 17 - 17
yami-shop-platform/src/main/java/com/yami/shop/platform/controller/SkuController.java

@@ -45,65 +45,65 @@ public class SkuController {
     @GetMapping("/skuStatisticsList")
     @ApiOperation(value = "对账单汇总表(商品)-列表")
     public R<IPage<SkuStatisticsVo>> skuStatisticsList(PageParam<SkuStatisticsPo> page, SkuStatisticsPo po) {
-        if (po.getChannelIds().contains(0L)){
+        if (po.getChannelIds().contains(0L)) {
             List<IdNameVo> idNameVos = channelService.queryMyChannel(SecurityUtils.getSysUser().getUserId());
-            if (!idNameVos.isEmpty()){
+            if (!idNameVos.isEmpty()) {
                 List<Long> ids = idNameVos.stream().map(IdNameVo::getId).collect(Collectors.toList());
                 po.setChannelIds(ids);
             }
         }
-        if (po.getUserAttrType()==null){
+        if (po.getUserAttrType() == null) {
             po.setUserAttrType("1");
         }
-        return R.SUCCESS(skuService.skuStatisticsList(page,po));
+        return R.SUCCESS(skuService.skuStatisticsList(page, po));
     }
 
-    @GetMapping(value = "/skuStatisticsExcel",produces =  MediaType.APPLICATION_OCTET_STREAM_VALUE)
+    @GetMapping(value = "/skuStatisticsExcel", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
     @ApiOperation("对账单汇总表(商品)-导出")
     public void skuStatisticsExcel(HttpServletResponse response, SkuStatisticsPo po) {
-        if (po.getChannelIds().contains(0L)){
+        if (po.getChannelIds().contains(0L)) {
             List<IdNameVo> idNameVos = channelService.queryMyChannel(SecurityUtils.getSysUser().getUserId());
-            if (!idNameVos.isEmpty()){
+            if (!idNameVos.isEmpty()) {
                 List<Long> ids = idNameVos.stream().map(IdNameVo::getId).collect(Collectors.toList());
                 po.setChannelIds(ids);
             }
         }
-        if (po.getUserAttrType()==null){
+        if (po.getUserAttrType() == null) {
             po.setUserAttrType("1");
         }
-        skuService.skuStatisticsExcel(response,po);
+        skuService.skuStatisticsExcel(response, po);
     }
 
     @GetMapping("/freightStatisticsList")
     @ApiOperation(value = "运费明细表-列表")
     public R<IPage<FreightStatisticsVo>> freightStatisticsList(PageParam<FreightStatisticsPo> page, FreightStatisticsPo po) {
-        if (po.getChannelIds().contains(0L)){
+        if (po.getChannelIds().contains(0L)) {
             List<IdNameVo> idNameVos = channelService.queryMyChannel(SecurityUtils.getSysUser().getUserId());
-            if (!idNameVos.isEmpty()){
+            if (!idNameVos.isEmpty()) {
                 List<Long> ids = idNameVos.stream().map(IdNameVo::getId).collect(Collectors.toList());
                 po.setChannelIds(ids);
             }
         }
-        if (po.getUserAttrType()==null){
+        if (po.getUserAttrType() == null) {
             po.setUserAttrType("1");
         }
-        return R.SUCCESS(skuService.freightStatisticsList(page,po));
+        return R.SUCCESS(skuService.freightStatisticsList(page, po));
     }
 
     @GetMapping("/freightStatisticsExcel")
     @ApiOperation("运费明细表-导出")
     public R<Void> freightStatisticsExcel(HttpServletResponse response, FreightStatisticsPo po) {
-        if (po.getChannelIds().contains(0L)){
+        if (po.getChannelIds().contains(0L)) {
             List<IdNameVo> idNameVos = channelService.queryMyChannel(SecurityUtils.getSysUser().getUserId());
-            if (!idNameVos.isEmpty()){
+            if (!idNameVos.isEmpty()) {
                 List<Long> ids = idNameVos.stream().map(IdNameVo::getId).collect(Collectors.toList());
                 po.setChannelIds(ids);
             }
         }
-        if (po.getUserAttrType()==null){
+        if (po.getUserAttrType() == null) {
             po.setUserAttrType("1");
         }
-        skuService.freightStatisticsExcel(response,po);
+        skuService.freightStatisticsExcel(response, po);
         return R.SUCCESS();
     }
 

+ 0 - 1
yami-shop-service/src/main/resources/mapper/SkuMapper.xml

@@ -747,5 +747,4 @@
         </if>
     </select>
 
-
 </mapper>