From 259e4e82680e290ac09c8cfdd4e9a8e80efbd631 Mon Sep 17 00:00:00 2001 From: zhaotianfeng <12345678> Date: Mon, 9 Sep 2024 22:33:49 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=92=8A-=E7=A4=BC=E5=93=81=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CardGiftActiveController.java | 2 +- .../cardGiftActive/entity/CardGiftActive.java | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGiftActive/controller/CardGiftActiveController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGiftActive/controller/CardGiftActiveController.java index e82b5fa60..686d92f59 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGiftActive/controller/CardGiftActiveController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGiftActive/controller/CardGiftActiveController.java @@ -27,7 +27,7 @@ import java.util.List; * @since 2024-08-21 16:47:40 */ @RestController -@RequestMapping("cardGiftActive") +@RequestMapping("/cardGiftActive") public class CardGiftActiveController extends BaseController { /** * 服务对象 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGiftActive/entity/CardGiftActive.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGiftActive/entity/CardGiftActive.java index 4b22321b3..a24144b0a 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGiftActive/entity/CardGiftActive.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGiftActive/entity/CardGiftActive.java @@ -2,8 +2,11 @@ package com.fuint.business.marketingActivity.cardGiftActive.entity; import java.util.Date; +import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.extension.activerecord.Model; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.io.Serializable; @@ -17,6 +20,7 @@ import java.io.Serializable; @Data public class CardGiftActive extends Model { //主键 + @TableId(type = IdType.AUTO) private Integer id; //活动编号 private String activeNum; @@ -25,8 +29,10 @@ public class CardGiftActive extends Model { //礼品卡金额 private Double cardAmount; //有效期开始时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") private Date effectiveTimeStart; //有效期结束时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") private Date effectiveTimeEnd; //卡类型比如纸卡 使用数据字典 card_gift_type private String cardType; @@ -39,10 +45,12 @@ public class CardGiftActive extends Model { //创建者 private String createBy; //创建时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") private Date createTime; //更新者 private String updateBy; //更新时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") private Date updateTime; //所属连锁店id private Integer chainStorId; From 0e081c89693c70f31fe20ea3c8fbf9e23b3bfacf Mon Sep 17 00:00:00 2001 From: zhaotianfeng <12345678> Date: Mon, 9 Sep 2024 22:59:21 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=92=8A-=E7=A4=BC=E5=93=81=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/EventMarketing/giftBlock.js | 42 +- .../views/EventMarketing/giftBlock/index.vue | 1372 ++++++++++------- 2 files changed, 817 insertions(+), 597 deletions(-) diff --git a/fuintAdmin/src/api/EventMarketing/giftBlock.js b/fuintAdmin/src/api/EventMarketing/giftBlock.js index da58bfbc1..e3fd5570c 100644 --- a/fuintAdmin/src/api/EventMarketing/giftBlock.js +++ b/fuintAdmin/src/api/EventMarketing/giftBlock.js @@ -1,13 +1,53 @@ import request from '@/utils/request' +// 上传文件 +export function uploadFile(data,activeNum,interType) { + return request({ + url: '/cardGiftActive/importCardInfo?activeNum='+activeNum+'&interType='+interType, + method: 'post', + data: data, + headers: { + 'Content-Type': 'multipart/form-data' + } + }) +} + // 分页查询列表 export function getList(query) { return request({ - url: 'business/marketingActivity/cardGift', + url: '/cardGiftActive', method: 'get', params: query }) } + +//修改 +export function updateId(data) { + return request({ + url: '/cardGiftActive', + method: 'put', + data: data + }) +} + +//新增 +export function add(data) { + return request({ + url: '/cardGiftActive', + method: 'post', + data: data + }) +} +//下载模板 +export function downloadTemplate() { + return request({ + url: 'business/marketingActivity/cardGift/template', + method: 'get', + responseType: 'blob' + }) +} + + export function getListtj(query) { return request({ url: 'business/marketingActivity/cardGift/list/11', diff --git a/fuintAdmin/src/views/EventMarketing/giftBlock/index.vue b/fuintAdmin/src/views/EventMarketing/giftBlock/index.vue index 329f74873..e9c12545b 100644 --- a/fuintAdmin/src/views/EventMarketing/giftBlock/index.vue +++ b/fuintAdmin/src/views/EventMarketing/giftBlock/index.vue @@ -1,25 +1,149 @@