| @@ -0,0 +1,29 @@ | |||||
| INSERT INTO `mall_permission` (`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) | |||||
| VALUES | |||||
| (963, '商户会员消费列表', 2, 'Y', NULL, 1, NULL, NULL, 'merchantConsumeList', 'icon-xiaofeijilu', 0, 963); | |||||
| DROP TABLE IF EXISTS `mall_sale_type` ; | |||||
| CREATE TABLE `mall_sale_type` ( | |||||
| `id` bigint(64) NOT NULL, | |||||
| `name` varchar(32) DEFAULT NULL COMMENT '销售类型', | |||||
| `type` tinyint(2) DEFAULT NULL COMMENT '资源类型1:尊享全能版 2:尊享营销版 3.速享版', | |||||
| `period` tinyint(2) DEFAULT NULL COMMENT '有效期(单位月)', | |||||
| `menus` json DEFAULT NULL COMMENT '菜单列表', | |||||
| PRIMARY KEY (`id`), | |||||
| UNIQUE `id_UNIQUE` USING BTREE (`id`) comment '' | |||||
| ) ENGINE=`InnoDB` ROW_FORMAT=DYNAMIC COMMENT='系统销售表' CHECKSUM=0 DELAY_KEY_WRITE=0; | |||||
| INSERT INTO `mall_sale_type` | |||||
| (`id`,`name`, `type`, `period`, `menus`) | |||||
| VALUES | |||||
| (1, '尊享全能版', 1, 12, | |||||
| '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 50, 101, 102, 103, 104, 105, 106, 107, 108, 201, 202, 203, 204, 205, 206, 211, 212, 221, 222, 251, 299, 300, 301, 302, 303, 304, 305, 306, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 501, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 651, 661, 662, 663, 671, 672, 673,674, 675, 681, 682, 683, 684, 685, 691, 692, 693, 694, 695, 701, 702, 703, 711, 712, 713, 901, 902, 903, 931, 932, 951, 952, 961, 962,963, 965, 966, 967, 968, 1001, 1002, 1003, 1004]' | |||||
| ), | |||||
| (2, '尊享营销版', 2, 12, | |||||
| '[1, 2, 4, 5, 6, 7, 8, 9, 10, 50, 101, 102, 103, 104, 105, 106, 107, 201, 202, 203, 204, 205, 211, 212, 221, 222, 251, 409, 410, 411, 416, 501, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 651, 661, 662, 663, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 691, 692, 693, 694, 695, 701, 702, 703, 711, 712, 713, 901, 902, 903, 931, 932, 951, 961]' | |||||
| ), | |||||
| (3, '速享版', 3, 1, | |||||
| '[2, 4, 5, 6, 7, 10, 50, 201, 202, 205, 211, 212, 221, 222, 251, 409, 410, 411, 416, 501, 502, 503, 504, 505, 506, 507, 508, 511, 512, 513, 521, 522, 523, 531, 532, 533, 591, 592, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 621, 622, 623, 624, 625, 626, 641, 642, 643, 644, 645, 651, 661, 662, 663, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 691, 692, 693, 694, 695, 701, 702, 703, 711, 712, 713, 901, 902, 903, 931, 932]' | |||||
| ) | |||||
| ; | |||||
| @@ -0,0 +1 @@ | |||||
| update mall_permission set module_color='#ad368a',module_color_num='173,54,138' where name = '招商管理'; | |||||
| @@ -1,28 +1,45 @@ | |||||
| package com.iformall.domain.vo; | package com.iformall.domain.vo; | ||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||||
| import com.iformall.domain.po.BaseEntity; | import com.iformall.domain.po.BaseEntity; | ||||
| import lombok.Data; | import lombok.Data; | ||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||
| import lombok.ToString; | import lombok.ToString; | ||||
| import java.util.Date; | |||||
| @Data | @Data | ||||
| @ToString(callSuper = true) | @ToString(callSuper = true) | ||||
| @EqualsAndHashCode(callSuper = true) | @EqualsAndHashCode(callSuper = true) | ||||
| public class WxMerchantTradeDetailVo extends BaseEntity { | public class WxMerchantTradeDetailVo extends BaseEntity { | ||||
| @Excel(name="会员昵称",width = 20,orderNum = "1") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "会员昵称", name = "userName") | @io.swagger.annotations.ApiModelProperty(value = "会员昵称", name = "userName") | ||||
| protected String userName; | protected String userName; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "封面图", name = "cover") | |||||
| private String cover; | |||||
| @io.swagger.annotations.ApiModelProperty(value="商户名",name="merchantName") | |||||
| private String merchantName; | |||||
| @io.swagger.annotations.ApiModelProperty(value="联系人",name="linkName") | |||||
| private String linkName; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "消费会员人数", name = "consumeCount") | |||||
| private Integer consumeCount; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "消费会员人次(去重)", name = "consumeCountP") | |||||
| private Integer consumeCountP; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "会员消费金额", name = "tradeAmt") | |||||
| @Excel(name="手机号码",width = 20,orderNum = "2") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "手机号码", name = "phone") | |||||
| private String phone; | |||||
| @Excel(name="核销券名称",width = 20,orderNum = "3") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "券名称", name = "couponName") | |||||
| private String couponName; | |||||
| @Excel(name="券价格",width = 20,orderNum = "4") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "券价格", name = "couponSale") | |||||
| private Integer couponSale; | |||||
| @Excel(name="券面额",width = 20,orderNum = "5") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "核销券面额", name = "couponPrice") | |||||
| private Integer couponPrice; | |||||
| @Excel(name="消费金额",width = 20,orderNum = "6") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "消费金额", name = "tradeAmt") | |||||
| private Integer tradeAmt; | private Integer tradeAmt; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "交易时间", name = "tradeDate") | |||||
| private Date tradeDate; | |||||
| @Excel(name="交易时间",width = 20,orderNum = "7") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "交易时间", name = "tradeDate") | |||||
| private Date tradeDateStr; | |||||
| } | } | ||||
| @@ -3,6 +3,7 @@ package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| import com.iformall.domain.dto.WxMerchantDto; | import com.iformall.domain.dto.WxMerchantDto; | ||||
| import com.iformall.domain.vo.WxMerchantTradeDetailVo; | |||||
| import com.iformall.domain.vo.WxMerchantTradeVo; | import com.iformall.domain.vo.WxMerchantTradeVo; | ||||
| import com.iformall.domain.vo.WxMerchantVo; | import com.iformall.domain.vo.WxMerchantVo; | ||||
| @@ -30,5 +31,7 @@ public interface WxMerchantMapper extends CommonMapper<WxMerchant, Long> { | |||||
| List<WxMerchantTradeVo> userTradeList(WxMerchant wxMerchant); | List<WxMerchantTradeVo> userTradeList(WxMerchant wxMerchant); | ||||
| List<WxMerchantTradeDetailVo> userTradeDetailList(WxMerchant wxMerchant); | |||||
| } | } | ||||
| @@ -7,6 +7,7 @@ import com.iformall.domain.po.WxBillOtherDeposit; | |||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| import com.iformall.domain.po.WxProfitSharingReceiver; | import com.iformall.domain.po.WxProfitSharingReceiver; | ||||
| import com.iformall.domain.vo.WxMerchantSimpleVo; | import com.iformall.domain.vo.WxMerchantSimpleVo; | ||||
| import com.iformall.domain.vo.WxMerchantTradeDetailVo; | |||||
| import com.iformall.domain.vo.WxMerchantTradeVo; | import com.iformall.domain.vo.WxMerchantTradeVo; | ||||
| import com.iformall.domain.vo.WxMerchantVo; | import com.iformall.domain.vo.WxMerchantVo; | ||||
| import org.springframework.web.bind.annotation.ModelAttribute; | import org.springframework.web.bind.annotation.ModelAttribute; | ||||
| @@ -30,7 +31,7 @@ public interface WxMerchantService { | |||||
| * @param pageSize | * @param pageSize | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| PageInfo<WxMerchantTradeVo> userTradeDetailList(WxMerchant record, Integer pageIndex, Integer pageSize); | |||||
| PageInfo<WxMerchantTradeDetailVo> userTradeDetailList(WxMerchant record, Integer pageIndex, Integer pageSize); | |||||
| /** | /** | ||||
| @@ -11,6 +11,7 @@ import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.dto.WxMerchantDto; | import com.iformall.domain.dto.WxMerchantDto; | ||||
| import com.iformall.domain.po.*; | import com.iformall.domain.po.*; | ||||
| import com.iformall.domain.vo.WxMerchantSimpleVo; | import com.iformall.domain.vo.WxMerchantSimpleVo; | ||||
| import com.iformall.domain.vo.WxMerchantTradeDetailVo; | |||||
| import com.iformall.domain.vo.WxMerchantTradeVo; | import com.iformall.domain.vo.WxMerchantTradeVo; | ||||
| import com.iformall.domain.vo.WxMerchantVo; | import com.iformall.domain.vo.WxMerchantVo; | ||||
| import com.iformall.enums.*; | import com.iformall.enums.*; | ||||
| @@ -32,7 +33,6 @@ import javax.servlet.http.HttpServletResponse; | |||||
| import java.util.*; | import java.util.*; | ||||
| import java.util.stream.Collectors; | import java.util.stream.Collectors; | ||||
| /** | /** | ||||
| * @author gongbiao | * @author gongbiao | ||||
| */ | */ | ||||
| @@ -751,4 +751,9 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| List<WxMerchantTradeVo> datalist = wxMerchantMapper.userTradeList(record); | List<WxMerchantTradeVo> datalist = wxMerchantMapper.userTradeList(record); | ||||
| excelService.exportExcel(datalist, null, "商户会员消费列表", WxMerchantTradeVo.class, "商户会员消费列表.xlsx", response, false); | excelService.exportExcel(datalist, null, "商户会员消费列表", WxMerchantTradeVo.class, "商户会员消费列表.xlsx", response, false); | ||||
| } | } | ||||
| @Override | |||||
| public PageInfo<WxMerchantTradeDetailVo> userTradeDetailList(WxMerchant record, Integer pageIndex, Integer pageSize) { | |||||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMerchantMapper.userTradeDetailList(record)); | |||||
| } | |||||
| } | } | ||||
| @@ -474,5 +474,14 @@ | |||||
| </if> | </if> | ||||
| </select> | </select> | ||||
| <select id="userTradeDetailList" parameterType="com.iformall.domain.po.WxMerchant" resultType="com.iformall.domain.vo.WxMerchantTradeDetailVo"> | |||||
| select c.`nick_name` 'userName',c.`phone`,co.title couponName,co.`sale_price` couponSale ,co.price couponPrice, co.price tradeAmt,o.create_date tradeDate | |||||
| from wx_coupon_order o | |||||
| left join wx_coupon co on(o.`coupon_id`=co.id) | |||||
| left join wx_coupon_merchant cm on(cm.product_id=co.id) | |||||
| inner join wx_c_user_basic_info c on(o.c_user_id=c.id) | |||||
| where o.coupon_order_status=1 and o.tenant_id=#{tenantId} order by o.create_date desc | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||