Merge remote-tracking branch 'origin/master'
| | |
| | | trim: true |
| | | }) |
| | | } |
| | | export function couponData (data) { |
| | | return request.post('/business/workbench/couponData', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | export function integralData (data) { |
| | | return request.post('/business/workbench/integralData', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | |
| | | <div class="info-item" > |
| | | <div class="info-item-a">è¿è¿ç¨æ·ç§¯åï¼<span class="orange"> {{(info.returnMemberIntegral||0)}}</span></div> |
| | | <div class="info-item-a">è¿è¿ç»éå积åï¼<span class="orange">{{info.returnCustomerIntegral || 0 }}</span></div> |
| | | <div class="info-item-a"></div> |
| | | <div class="info-item-a">ç»éåéé¢ï¼<span class="orange"> ï¿¥{{(info.shopSettlement||0).toFixed(2)}}</span></div> |
| | | </div> |
| | | <div class="info-item"></div> |
| | | <div class="header"> |
| | |
| | | <div class="change-style"> |
| | | <div class="count-left"> |
| | | <div class="item-title" style="display: flex;"> |
| | | <span style="flex: 1">ç»éåIOP10</span> |
| | | <span style="flex: 1">ç»éåTOP10</span> |
| | | <div class="tab-item" style="text-align: right;flex: 1.5; "> |
| | | <span v-for="(item,index) in tabs1" :key="'tab'+index" :class="item.index==tabIndex1?'active-tab tab-btn':'tab-btn'" @click="changeTab1(item)">{{item.name}}</span> |
| | | </div> |
| | |
| | | <div class="tab-title" style="display: flex;align-items: center; "> |
| | | <span style="">è¥éæ°æ®åæ</span> |
| | | <div class="tab-item" style="margin-left: 20px;" > |
| | | <el-date-picker style="width: 110px;height: 22px;margin-right: 10px;" v-model="searchForm.topYear2" type="year" |
| | | <el-date-picker style="width: 110px;height: 22px;margin-right: 10px;" v-model="searchForm.topYear2" type="year" @change="changeYear" |
| | | clearable value-format="yyyy" format="yyyy'年'" placeholder="年份" ></el-date-picker> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="change-style"> |
| | | <div class="count-left"> |
| | | <div class="item-title">积ååæ¾ç±»åå æ¯</div> |
| | | <div class="bottom2" style="display: flex"> |
| | | <div ref="integralCount" style="flex: 1"></div> |
| | | <div style="flex: 1;font-size: 14px;font-weight: 500;"> |
| | | <div>累计æ¶èï¼{{10000}}</div> |
| | | <div>ç´¯è®¡ä¼æ éé¢ï¼ï¿¥{{10000 }}</div> |
| | | <div class="bottom2" style="display: flex;align-items: center"> |
| | | <div ref="integralCount" style="flex: 1;min-height: 200px;"></div> |
| | | <div style="flex: 1;font-size: 14px;font-weight: 500;margin-left: 20px;"> |
| | | <div>ç´¯è®¡åæ¾æ°éï¼{{( dataList4.num || 0 ) +( dataList4.num1 || 0 )+( dataList4.num2 || 0 )+( dataList4.num3 || 0 )}}</div> |
| | | <div>累计æ¶èï¼{{ dataList4.useNum || 0 }}</div> |
| | | <div>ç´¯è®¡ä¼æ éé¢ï¼ï¿¥{{(dataList4.price || 0 ).toFixed(2) }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="count-right"> |
| | | <div class="item-title">伿 å¸åæ¾ç±»åå æ¯</div> |
| | | <div class="bottom2"> |
| | | <div class="bottom2" style="display: flex"> |
| | | <div ref="couponCount" style="flex: 1"></div> |
| | | <div style="flex: 1;font-size: 14px;font-weight: 500;"> |
| | | <div>已使ç¨ä¼æ å¸ï¼{{10000}}</div> |
| | | <div>ç´¯è®¡ä¼æ éé¢ï¼ï¿¥{{10000 }}</div> |
| | | </div> |
| | | <div class="bottom2" style="display: flex;align-items: center"> |
| | | <div ref="couponCount" style="flex: 1;min-height: 200px;"></div> |
| | | <div style="flex: 1;font-size: 14px;font-weight: 500;margin-left: 20px;"> |
| | | <div>ç´¯è®¡åæ¾æ°éï¼{{( dataList3.num || 0 ) +( dataList3.num1 || 0 )}}</div> |
| | | <div>已使ç¨ä¼æ å¸ï¼{{ dataList3.useNum || 0 }}</div> |
| | | <div>ç´¯è®¡ä¼æ éé¢ï¼ï¿¥{{(dataList3.price || 0 ).toFixed(2) }}</div> |
| | | <div>ä¿æäº¤æéé¢ï¼ï¿¥{{(dataList3.orderPrice || 0 ).toFixed(2) }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | loading1: false, |
| | | loading2: false, |
| | | loading3: false, |
| | | loading4: false, |
| | | loading5: false, |
| | | tabs2: [{ index: 0, name: 'æéé' }, { index: 1, name: 'æéå®é¢' }], |
| | | tabs1: [{ index: 0, name: 'æè®¢åé' }, { index: 1, name: 'æéå®é¢' }, { index: 2, name: 'æä¼åæ°' }], |
| | | tabs: [{ index: 0, name: '仿¥' }, { index: 1, name: 'è¿7æ¥' }, { index: 2, name: 'è¿30æ¥' }, { index: 3, name: 'è¿12æ' }], |
| | |
| | | }, |
| | | dataList1: [], |
| | | dataList2: [], |
| | | dataList4: [], |
| | | dataList3: [], |
| | | myChart0: null, |
| | | myChart1: null |
| | | myChart1: null, |
| | | myChart2: null, |
| | | myChart3: null |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | this.initTopData() |
| | | this.initShopRankData() |
| | | this.initGoodsRankData() |
| | | this.initIntegralData() |
| | | this.initCouponData() |
| | | }, |
| | | methods: { |
| | | changeYearMonth(){ |
| | | this.initGoodsRankData() |
| | | this.initShopRankData() |
| | | }, |
| | | changeYear(){ |
| | | this.initIntegralData() |
| | | this.initCouponData() |
| | | }, |
| | | initCouponData () { |
| | | this.loading4 = true |
| | | this.api.couponData({year: this.searchForm.topYear2}).then(res => { |
| | | res = res || {} |
| | | this.dataList3 = res |
| | | this.renderEchartOption3() |
| | | }).finally(() => { |
| | | this.loading4 = false |
| | | }) |
| | | }, |
| | | initIntegralData () { |
| | | this.loading5 = true |
| | | this.api.integralData({ year: this.searchForm.topYear2}).then(res => { |
| | | res = res || {} |
| | | this.dataList4 = res |
| | | this.renderEchartOption2() |
| | | }).finally(() => { |
| | | this.loading5 = false |
| | | }) |
| | | }, |
| | | initShopRankData () { |
| | | this.loading2 = true |
| | |
| | | res.cateList = res.cateList || [] |
| | | this.topData = res |
| | | this.renderEchartOption0() |
| | | this.renderEchartOption2() |
| | | this.renderEchartOption1() |
| | | }).finally(() => { |
| | | this.loading1 = false |
| | | }) |
| | |
| | | window.addEventListener('resize', () => { |
| | | this.myChart1.resize() |
| | | }) |
| | | this.myChart2 = echarts.init(this.$refs.integralCount) |
| | | window.addEventListener('resize', () => { |
| | | this.myChart2.resize() |
| | | }) |
| | | this.myChart3 = echarts.init(this.$refs.couponCount) |
| | | window.addEventListener('resize', () => { |
| | | this.myChart3.resize() |
| | | }) |
| | | this.renderEchartOption0() |
| | | this.renderEchartOption1() |
| | | this.renderEchartOption2() |
| | | this.renderEchartOption3() |
| | | }, |
| | | changeTab (item) { |
| | | if (this.loading1) { |
| | |
| | | ] |
| | | }) |
| | | }, |
| | | renderEchartOption2 () { |
| | | renderEchartOption1 () { |
| | | const series = [] |
| | | this.topData.cateList.forEach((item, index) => { |
| | | series.push( { |
| | |
| | | yAxis: { type: 'value' } , |
| | | series |
| | | }) |
| | | }, |
| | | renderEchartOption2() { |
| | | this.myChart2.setOption({ |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: this.dataList4.num || 0, name: 'æå¨å¢å ' }, |
| | | { value: this.dataList4.num1 || 0, name: 'é请好å' }, |
| | | { value: this.dataList4.num2 || 0, name: 'æ¶è´¹è¿å©' }, |
| | | { value: this.dataList4.num3 || 0, name: '注åèµ é' } |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }) |
| | | }, |
| | | renderEchartOption3() { |
| | | this.myChart3.setOption({ |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '伿 å¸åæ¾', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: this.dataList3.num1 || 0, name: 'ææ£å¸' }, |
| | | { value: this.dataList3.num || 0, name: '满åå¸' } |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | import com.doumee.core.utils.kuaidi100.ExpressUtils; |
| | | import com.doumee.dao.business.model.Goodsorder; |
| | | import com.doumee.dao.business.model.GoodsorderExport; |
| | | import com.doumee.dao.web.request.AfterSaleApplyRequest; |
| | | import com.doumee.service.business.AftersaleService; |
| | | import com.doumee.service.business.GoodsorderService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | |
| | | @Autowired |
| | | private GoodsorderService goodsorderService; |
| | | @Autowired |
| | | private AftersaleService aftersaleService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | |
| | | @ApiOperation("订å鿬¾") |
| | | @PostMapping("/orderRefund") |
| | | @RequiresPermissions("business:goodsorder:update") |
| | | public ApiResponse orderRefund(@RequestBody Goodsorder goodsorder) { |
| | | goodsorderService.orderRefund(goodsorder); |
| | | public ApiResponse orderRefund(@RequestBody AfterSaleApplyRequest goodsorder) { |
| | | aftersaleService.afterSaleApply(goodsorder); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | import com.doumee.dao.system.dto.CountDataDTO; |
| | | import com.doumee.dao.system.vo.BusinessDataCountVO; |
| | | import com.doumee.dao.system.vo.CountDataVO; |
| | | import com.doumee.dao.system.vo.NumberDataCountVO; |
| | | import com.doumee.service.business.FundService; |
| | | import com.doumee.service.business.WorkbenchService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | public ApiResponse<BusinessDataCountVO> businessData(@RequestBody CountDataDTO param) { |
| | | return ApiResponse.success(workbenchService.businessData(param)); |
| | | } |
| | | @ApiOperation("积ååæ¾æ°æ®ç»è®¡") |
| | | @PostMapping("/integralData") |
| | | public ApiResponse<NumberDataCountVO> integralData(@RequestBody CountDataDTO param) { |
| | | return ApiResponse.success(workbenchService.integralData(param)); |
| | | } |
| | | @ApiOperation("伿 å¸åæ¾æ°æ®ç»è®¡") |
| | | @PostMapping("/couponData") |
| | | public ApiResponse<NumberDataCountVO> couponData(@RequestBody CountDataDTO param) { |
| | | return ApiResponse.success(workbenchService.couponData(param)); |
| | | } |
| | | @ApiOperation("ç»éåTOP10") |
| | | @PostMapping("/shopRankList10") |
| | | public ApiResponse<List<BusinessDataCountVO>> shopRankList10(@RequestBody CountDataDTO param) { |
| | |
| | | import com.doumee.dao.business.model.MemberCoupon; |
| | | import com.doumee.dao.web.dto.CouponDTO; |
| | | import com.doumee.dao.web.response.MemberCouponResponse; |
| | | import com.github.yulichang.base.mapper.MPJJoinMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/03/21 15:48 |
| | | */ |
| | | public interface MemberCouponMapper extends BaseMapper<MemberCoupon> { |
| | | public interface MemberCouponMapper extends MPJJoinMapper<MemberCoupon> { |
| | | |
| | | |
| | | @Select(" select m.* " + |
| | |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="ç¨æ·",width = 10,index = 1) |
| | | private String nikeName; |
| | | @ApiModelProperty(value = "ç»è®¡æ°é") |
| | | @TableField(exist = false) |
| | | private Long num; |
| | | @ApiModelProperty(value = "å
³è订åå·å·") |
| | | @ExcelColumn(name="å
³è订åå·",width = 10,index = 10) |
| | | @TableField(exist = false) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.system.vo; |
| | | |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("积åã伿 å¸åæ¾ç»è®¡æ°æ®") |
| | | public class NumberDataCountVO { |
| | | @ApiModelProperty(value = "积åæå¨å¢å ãæ»¡å伿 叿°é") |
| | | private Long num; |
| | | @ApiModelProperty(value = "积åé请好åå¢å ãææ£å¸æ°æ®") |
| | | private Long num1; |
| | | @ApiModelProperty(value = "ç§¯åæ¶è´¹è¿å©å¢å ") |
| | | private Long num2; |
| | | @ApiModelProperty(value = "ç§¯åæ³¨åèµ éå¢å ") |
| | | private Long num3; |
| | | @ApiModelProperty(value = "累计æ¶è积åã累计使ç¨ä¼æ 叿°é") |
| | | private Long useNum; |
| | | @ApiModelProperty(value = "ç´¯è®¡ä¼æ éé¢") |
| | | private BigDecimal price; |
| | | @ApiModelProperty(value = "累计交æéé¢") |
| | | private BigDecimal orderPrice; |
| | | } |
| | |
| | | import com.doumee.dao.system.dto.CountDataDTO; |
| | | import com.doumee.dao.system.vo.BusinessDataCountVO; |
| | | import com.doumee.dao.system.vo.CountDataVO; |
| | | import com.doumee.dao.system.vo.NumberDataCountVO; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | public interface WorkbenchService { |
| | | |
| | | NumberDataCountVO integralData(CountDataDTO param); |
| | | NumberDataCountVO couponData(CountDataDTO param); |
| | | BusinessDataCountVO businessData(CountDataDTO param); |
| | | |
| | | List<BusinessDataCountVO> shopRankList10(CountDataDTO param); |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æä½å¤±è´¥ï¼è®¢åæªå®æï¼æ æ³é款ï¼"); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.system.vo.BusinessDataCountVO; |
| | | import com.doumee.dao.system.vo.CountDataVO; |
| | | import com.doumee.dao.system.vo.NumberDataCountVO; |
| | | import com.doumee.dao.web.dto.CollectDTO; |
| | | import com.doumee.dao.web.dto.MemberDTO; |
| | | import com.doumee.dao.web.dto.MultiFileDTO; |
| | |
| | | public class WorkbenchServiceImpl implements WorkbenchService { |
| | | @Autowired |
| | | private GoodsorderMapper goodsorderMapper; |
| | | @Autowired |
| | | private MemberCouponMapper memberCouponMapper; |
| | | @Autowired |
| | | private InviteRecordMapper inviteRecordMapper; |
| | | @Autowired |
| | | private IntegralMapper integralMapper; |
| | | @Autowired |
| | | private GoodsorderDetailMapper goodsorderDetailMapper; |
| | | @Override |
| | |
| | | return list1; |
| | | } |
| | | @Override |
| | | public NumberDataCountVO couponData(CountDataDTO param){ |
| | | NumberDataCountVO data = new NumberDataCountVO(); |
| | | //åæ¾ç±»åç»è®¡ |
| | | List<MemberCoupon> r1 = memberCouponMapper.selectList(new MPJLambdaWrapper<MemberCoupon>() |
| | | .select("(select count(t.id) )",MemberCoupon::getNum) |
| | | .select( MemberCoupon::getCouponType) |
| | | .apply(param.getYear()!=null,"YEAR ( t.CREATE_DATE )="+param.getYear() ) |
| | | .eq(MemberCoupon::getIsdeleted,Constants.ZERO) |
| | | .groupBy(MemberCoupon::getCouponType)); |
| | | if(r1!=null){ |
| | | for(MemberCoupon c : r1){ |
| | | if(Constants.equalsInteger(c.getCouponType(),Constants.ZERO)){ |
| | | data.setNum(Constants.formatLongNum(c.getNum()));//满åå¸ |
| | | }else{ |
| | | data.setNum1(Constants.formatLongNum(c.getNum()));//满åå¸ |
| | | } |
| | | } |
| | | } |
| | | //å·²ä½¿ç¨ |
| | | Long r2 = memberCouponMapper.selectCount(new MPJLambdaWrapper<MemberCoupon>() |
| | | .apply(param.getYear()!=null,"YEAR ( t.use_Date )="+param.getYear() ) |
| | | .eq(MemberCoupon::getIsdeleted,Constants.ZERO)); |
| | | data.setUseNum(Constants.formatLongNum(r2)); |
| | | //伿 éé¢å交æéé¢ |
| | | Goodsorder r3 = goodsorderMapper.selectOne(new MPJLambdaWrapper<Goodsorder>() |
| | | .select("(select sum(t.total_price) )",Goodsorder::getTotalPrice) |
| | | .select("(select sum(t.coupon_price) )",Goodsorder::getCouponPrice) |
| | | .apply(param.getYear()!=null,"YEAR ( t.CREATE_DATE )="+param.getYear() ) |
| | | .eq(Goodsorder::getIsdeleted,Constants.ZERO) |
| | | .in(Goodsorder::getStatus,Constants.OrderStatus.DONE.getKey(),Constants.OrderStatus.REFUND.getKey()) ); |
| | | if(r3!=null){ |
| | | data.setPrice(Constants.formatBigdecimal(r3.getCouponPrice())); |
| | | data.setOrderPrice(Constants.formatBigdecimal(r3.getTotalPrice())); |
| | | } |
| | | return data; |
| | | |
| | | } |
| | | @Override |
| | | public NumberDataCountVO integralData(CountDataDTO param){ |
| | | NumberDataCountVO data = new NumberDataCountVO(); |
| | | //åæ¾ç§¯åç±»åç»è®¡ |
| | | List<Integral> r1 = integralMapper.selectList(new MPJLambdaWrapper<Integral>() |
| | | .select("(select sum(t.num) )",Integral::getNum) |
| | | .select( Integral::getObjType) |
| | | .apply(param.getYear()!=null,"YEAR ( t.CREATE_DATE )="+param.getYear() ) |
| | | .eq(Integral::getIsdeleted,Constants.ZERO) |
| | | .eq(Integral::getType,Constants.ZERO) |
| | | .in(Integral::getObjType,Constants.IntegralObjType.REGISTER.getKey(), |
| | | Constants.IntegralObjType.INVITENEWUSER.getKey(), |
| | | Constants.IntegralObjType.ORDER_DONATE.getKey(), |
| | | Constants.IntegralObjType.SYSTEM_RECHARGE.getKey()) |
| | | .groupBy(Integral::getObjType)); |
| | | if(r1!=null){ |
| | | for(Integral c : r1){ |
| | | if(Constants.equalsInteger(c.getObjType(),Constants.IntegralObjType.SYSTEM_RECHARGE.getKey())){ |
| | | data.setNum(Constants.formatBigdecimal(c.getNum()).longValue());//平尿·»å |
| | | }else if(Constants.equalsInteger(c.getObjType(),Constants.IntegralObjType.INVITENEWUSER.getKey())){ |
| | | data.setNum1(Constants.formatBigdecimal(c.getNum()).longValue());//é请 |
| | | }else if(Constants.equalsInteger(c.getObjType(),Constants.IntegralObjType.ORDER_DONATE.getKey())){ |
| | | data.setNum2(Constants.formatBigdecimal(c.getNum()).longValue());//æ¶è´¹è¿å© |
| | | }else if(Constants.equalsInteger(c.getObjType(),Constants.IntegralObjType.REGISTER.getKey())){ |
| | | data.setNum3(Constants.formatBigdecimal(c.getNum()).longValue());//注å |
| | | } |
| | | } |
| | | } |
| | | //伿 éé¢å交æéé¢ |
| | | Goodsorder r3 = goodsorderMapper.selectOne(new MPJLambdaWrapper<Goodsorder>() |
| | | .select("(select sum(t.integral) )",Goodsorder::getIntegral) |
| | | .select("(select sum(t.use_integral) )",Goodsorder::getUseIntegral) |
| | | .apply(param.getYear()!=null,"YEAR ( t.CREATE_DATE )="+param.getYear() ) |
| | | .eq(Goodsorder::getIsdeleted,Constants.ZERO) |
| | | .in(Goodsorder::getStatus,Constants.OrderStatus.DONE.getKey(),Constants.OrderStatus.REFUND.getKey()) ); |
| | | if(r3!=null){ |
| | | data.setUseNum(Constants.formatBigdecimal(r3.getUseIntegral()).longValue()); |
| | | data.setPrice(Constants.formatBigdecimal(r3.getIntegral())); |
| | | } |
| | | return data; |
| | | |
| | | } |
| | | @Override |
| | | public BusinessDataCountVO businessData(CountDataDTO param) { |
| | | BusinessDataCountVO data = new BusinessDataCountVO(); |
| | | int dataType = param.getDateType();//0仿¥ 1è¿ä¸æ¥ 2è¿30æ¥ 3è¿1å¹´ |