From 52379f54d0d07cad8d6481da1798a6f47554d513 Mon Sep 17 00:00:00 2001
From: cun-nan <19819293608@163.com>
Date: Tue, 19 Dec 2023 18:03:05 +0800
Subject: [PATCH 1/8] =?UTF-8?q?=E5=8A=A0=E6=B2=B9=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
fuintAdmin/src/components/map/imgUpload.vue | 43 +++++++++++++++----
.../src/views/staff/storeInfo/index.vue | 31 ++++++-------
gasStation-uni/pages/index/index.vue | 7 +++
gasStation-uni/pages/my/my.vue | 10 +++--
gasStation-uni/pages/refuel/refuel.vue | 3 +-
.../pagesRefuel/orderDetail/index.vue | 4 +-
6 files changed, 65 insertions(+), 33 deletions(-)
diff --git a/fuintAdmin/src/components/map/imgUpload.vue b/fuintAdmin/src/components/map/imgUpload.vue
index 5a3daf29c..53870c0e0 100644
--- a/fuintAdmin/src/components/map/imgUpload.vue
+++ b/fuintAdmin/src/components/map/imgUpload.vue
@@ -17,11 +17,21 @@
:on-preview="handlePictureCardPreview"
:class="{hide: this.fileList.length >= this.limit}"
>
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -72,7 +82,8 @@ export default {
type: Boolean,
default: true
},
- imgUrl:""
+ imgUrl:"",
+ doorUrl:"",
},
data() {
return {
@@ -86,7 +97,8 @@ export default {
headers: {
"Access-Token" : getToken(),
},
- fileList: []
+ fileList: [],
+ doorList:[],
};
},
watch: {
@@ -118,6 +130,7 @@ export default {
},
},
created() {
+ // this.dialogImageUrl = this.baseUrl + this.imgUrl;
this.handlePictureCardPreview();
},
methods: {
@@ -194,7 +207,6 @@ export default {
},
// 预览
handlePictureCardPreview(file) {
- // console.log(file,this.baseUrl , this.imgUrl)
if (this.imgUrl != "" && this.imgUrl != undefined){
this.dialogImageUrl = this.baseUrl + this.imgUrl;
}else {
@@ -202,6 +214,21 @@ export default {
this.dialogImageUrl = file.url;
}
}
+ if (this.doorUrl != "" && this.doorUrl != undefined && this.doorUrl != []){
+ let list = JSON.parse(this.doorUrl)
+ list.forEach(item => {
+ let data = {name:"",url:""}
+ data.name = item.split("/")[item.split("/").length-1]
+ data.url = this.baseUrl + item
+ this.fileList.push(data)
+ // this.dialogImageUrl = this.baseUrl + item;
+ // this.doorList.push(this.baseUrl + item);
+ })
+ }else {
+ if (file!=undefined){
+ this.dialogImageUrl = file.url;
+ }
+ }
// this.dialogVisible = true;
},
// 对象转成指定字符串分隔
diff --git a/fuintAdmin/src/views/staff/storeInfo/index.vue b/fuintAdmin/src/views/staff/storeInfo/index.vue
index 6dc9d6b53..ecc2eeea2 100644
--- a/fuintAdmin/src/views/staff/storeInfo/index.vue
+++ b/fuintAdmin/src/views/staff/storeInfo/index.vue
@@ -7,12 +7,12 @@
@@ -62,7 +62,6 @@ import {listQRCode} from "@/api/staff/qrcode";
import {ljStoreInfo, updateStore} from "@/api/staff/store";
import mapComponment from "@/components/map/mapComponent.vue";
import imgUpload from "@/components/ImageUpload/index.vue"
-import { getToken } from '@/utils/auth'
import imgUpload1 from "@/components/map/imgUpload.vue"
export default {
@@ -80,15 +79,7 @@ export default {
},
data(){
return{
- testImgUrl:"",
- // 图片根目录
- imagePath: process.env.VUE_APP_SERVER_URL,
- dataForm:{},
- // 上传地址
- uploadAction: process.env.VUE_APP_SERVER_URL + 'backendApi/file/upload',
- uploadHeader: { 'Access-Token' : getToken() },
- // 隐藏上传
- hideUpload: false,
+ flag:false,
// 上传文件列表
uploadFiles: [
{name:"nihao",
@@ -138,15 +129,17 @@ export default {
getImgUrl(val){
let list = val.split("/static")
this.store.logo = "/static"+list[list.length-1]
- // this.store.logo = val
- console.log(this.store.logo)
},
// 获取图片url地址
getDoorImgUrl(val){
- // console.log(val)
- // let list = val.split("/")
- // this.form.logo = list[list.length-1]
- this.store.doorstepPhoto = val
+ let list = val.split(",")
+ let doorUrl = []
+ list.forEach(item => {
+ doorUrl.push("/static"+item.split("/static")[1])
+ })
+ // console.log(list,doorUrl)
+ this.store.doorstepPhoto = JSON.stringify(doorUrl)
+ // this.store.doorstepPhoto = val
},
getForm(data){
if (data != undefined){
@@ -160,6 +153,7 @@ export default {
ljStoreInfo().then(response => {
this.store = response.data
console.log(response.data)
+ this.$emit("getUrl",this.store)
this.form.lat = this.store.latitude;
this.form.lng = this.store.longitude;
this.form.address = this.store.address;
@@ -167,6 +161,7 @@ export default {
this.welfare = this.store.welfare.split(",")
}
this.$refs.mapRef.initAMap();
+ this.flag = true;
})
},
diff --git a/gasStation-uni/pages/index/index.vue b/gasStation-uni/pages/index/index.vue
index 674ab6fdc..1753e0357 100644
--- a/gasStation-uni/pages/index/index.vue
+++ b/gasStation-uni/pages/index/index.vue
@@ -243,6 +243,13 @@
_this.welfare.push(response.data.welfare)
}
}
+ if (response.data.doorstepPhoto != undefined && response.data.doorstepPhoto != null && response.data.doorstepPhoto != ""){
+ let list = JSON.parse(response.data.doorstepPhoto)
+ _this.list3 = [];
+ list.forEach(item => {
+ _this.list3.push(_this.baseUrl + item)
+ })
+ }
}).catch((res) => {
uni.showLoading({
title: res + "---" + 1
diff --git a/gasStation-uni/pages/my/my.vue b/gasStation-uni/pages/my/my.vue
index 11c1a125f..e1f8055ee 100644
--- a/gasStation-uni/pages/my/my.vue
+++ b/gasStation-uni/pages/my/my.vue
@@ -263,10 +263,12 @@
url: '/business/userManager/user/getUserBalance',
method: 'get',
}).then(res => {
- console.log(res)
+ // console.log(res,111222)
if (res.code == 200) {
this.cardBalance = res.data.cardBalance,
+ if (res.data.refuelMoney!=null && res.data.refuelMoney!=""){
this.refuelMoney = JSON.parse(res.data.refuelMoney);
+ }
}
})
},
@@ -276,7 +278,7 @@
method: 'get',
params: this.query
}).then(res => {
- console.log(res)
+ // console.log(res)
if (res.code == 200) {
this.cardsList = res.data.records
}
@@ -285,13 +287,13 @@
// 查询我的积分
getUserInfoList() {
request({
- url: '/business/userManager/user/getByUniApp',
+ url: 'business/userManager/user/getByUniApp',
method: 'get',
params: {
chainStoreId: this.chainStoreId
}
}).then((res) => {
- if (res.code == 200) {
+ if (res.code == 200 && res.data!=null) {
this.myPoints = res.data.points
}
})
diff --git a/gasStation-uni/pages/refuel/refuel.vue b/gasStation-uni/pages/refuel/refuel.vue
index f82e57553..fb5038d53 100644
--- a/gasStation-uni/pages/refuel/refuel.vue
+++ b/gasStation-uni/pages/refuel/refuel.vue
@@ -8,7 +8,8 @@
-
+
+
{{store.name}}{{store.description ? "("+store.description+")" : ""}}
diff --git a/gasStation-uni/pagesRefuel/orderDetail/index.vue b/gasStation-uni/pagesRefuel/orderDetail/index.vue
index e6e2b481f..e4cff2853 100644
--- a/gasStation-uni/pagesRefuel/orderDetail/index.vue
+++ b/gasStation-uni/pagesRefuel/orderDetail/index.vue
@@ -285,8 +285,8 @@
}
},
onLoad(e) {
- // this.orderNo = e.orderNo
- this.orderNo = "20231201114800ebe24b"
+ this.orderNo = e.orderNo
+ // this.orderNo = "2345202312191043054f3328"
},
onShow() {
this.getOilOrder();
From 89010cb79dd830051ad9598c08d7be8f5e222713 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com>
Date: Wed, 20 Dec 2023 14:30:37 +0800
Subject: [PATCH 2/8] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=AB=AF?=
=?UTF-8?q?=E6=96=B0=E4=BA=BA=E6=9C=89=E7=A4=BC=E6=B4=BB=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ActiveNewlywedsRecordsController.java | 115 ++++++++++++++++
.../entity/ActiveNewlywedsRecords.java | 127 ++++++++++++++++++
.../mapper/ActiveNewlywedsRecordsMapper.java | 15 +++
.../ActiveNewlywedsRecordsService.java | 15 +++
.../ActiveNewlywedsRecordsServiceImpl.java | 19 +++
.../ActiveRecommendRecordsController.java | 94 +++++++++++++
.../entity/ActiveRecommendRecords.java | 127 ++++++++++++++++++
.../mapper/ActiveRecommendRecordsMapper.java | 15 +++
.../ActiveRecommendRecordsService.java | 15 +++
.../ActiveRecommendRecordsServiceImpl.java | 19 +++
.../controller/CardValueRecordController.java | 2 +-
.../impl/CardValueRecordServiceImpl.java | 48 ++++++-
12 files changed, 607 insertions(+), 4 deletions(-)
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlywedsRecords.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/mapper/ActiveNewlywedsRecordsMapper.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsRecordsService.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsRecordsServiceImpl.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommendRecords.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/mapper/ActiveRecommendRecordsMapper.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java
new file mode 100644
index 000000000..2cd6dbf7f
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java
@@ -0,0 +1,115 @@
+package com.fuint.business.marketingActivity.activeNewlyweds.controller;
+
+
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.api.ApiController;
+import com.baomidou.mybatisplus.extension.api.R;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlyweds;
+import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsRecords;
+import com.fuint.business.marketingActivity.activeNewlyweds.service.ActiveNewlywedsRecordsService;
+import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.util.TokenUtil;
+import com.fuint.framework.web.BaseController;
+import com.fuint.framework.web.ResponseObject;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 新人有礼记录表(ActiveNewlywedsRecords)表控制层
+ *
+ * @author makejava
+ * @since 2023-12-20 14:12:53
+ */
+@RestController
+@RequestMapping("business/marketingActivity/activeNewlywedsRecords")
+public class ActiveNewlywedsRecordsController extends BaseController {
+ /**
+ * 服务对象
+ */
+ @Resource
+ private ActiveNewlywedsRecordsService activeNewlywedsRecordsService;
+
+ /**
+ * 分页查询所有数据
+ * @param pageNo
+ * @param pageSize
+ * @param activeNewlywedsRecords
+ * @return
+ */
+ @GetMapping
+ public ResponseObject selectAll(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
+ @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
+ @Param("activeNewlywedsRecords") ActiveNewlywedsRecords activeNewlywedsRecords) {
+ Page page = new Page(pageNo, pageSize);
+ return getSuccessResult(this.activeNewlywedsRecordsService.page(page, new QueryWrapper<>(activeNewlywedsRecords)));
+ }
+
+ /**
+ * 判断是否已经参加过新人有礼活动接口
+ * @param activeNewlywedsRecords
+ * @return
+ */
+ @GetMapping("applet")
+ public ResponseObject isJoined(@Param("activeNewlywedsRecords") ActiveNewlywedsRecords activeNewlywedsRecords) {
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(ActiveNewlywedsRecords::getInviteeUserId,TokenUtil.getNowAccountInfo().getId());
+ List list = this.activeNewlywedsRecordsService.list(queryWrapper);
+ if (list.size() == 0){
+ return getSuccessResult("可以参加新人活动");
+ }else {
+ return getSuccessResult("不可以参加新人活动");
+ }
+ }
+
+ /**
+ * 通过主键查询单条数据
+ *
+ * @param id 主键
+ * @return 单条数据
+ */
+ @GetMapping("{id}")
+ public ResponseObject selectOne(@PathVariable Serializable id) {
+ return getSuccessResult(this.activeNewlywedsRecordsService.getById(id));
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param activeNewlywedsRecords 实体对象
+ * @return 新增结果
+ */
+ @PostMapping
+ public ResponseObject insert(@RequestBody ActiveNewlywedsRecords activeNewlywedsRecords) {
+ return getSuccessResult(this.activeNewlywedsRecordsService.save(activeNewlywedsRecords));
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param activeNewlywedsRecords 实体对象
+ * @return 修改结果
+ */
+ @PutMapping
+ public ResponseObject update(@RequestBody ActiveNewlywedsRecords activeNewlywedsRecords) {
+ return getSuccessResult(this.activeNewlywedsRecordsService.updateById(activeNewlywedsRecords));
+ }
+
+ /**
+ * 删除数据
+ *
+ * @param idList 主键结合
+ * @return 删除结果
+ */
+ @DeleteMapping
+ public ResponseObject delete(@RequestParam("idList") List idList) {
+ return getSuccessResult(this.activeNewlywedsRecordsService.removeByIds(idList));
+ }
+}
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlywedsRecords.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlywedsRecords.java
new file mode 100644
index 000000000..3a777b50e
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlywedsRecords.java
@@ -0,0 +1,127 @@
+package com.fuint.business.marketingActivity.activeNewlyweds.entity;
+
+import java.util.Date;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import java.io.Serializable;
+
+/**
+ * 新人有礼记录表(ActiveNewlywedsRecords)表实体类
+ *
+ * @author makejava
+ * @since 2023-12-20 14:12:54
+ */
+@SuppressWarnings("serial")
+public class ActiveNewlywedsRecords extends Model {
+ //主键id
+ private Integer id;
+ //活动id
+ private Integer activeNewlywedsId;
+ //所属连锁店id
+ private Integer chainStoreId;
+ //所属店铺id
+ private Integer storeId;
+ //用户id
+ private String userId;
+ //被邀请人id
+ private String inviteeUserId;
+ //创建者
+ private String createBy;
+ //创建时间
+ private Date createTime;
+ //更新者
+ private String updateBy;
+ //更新时间
+ private Date updateTime;
+
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Integer getActiveNewlywedsId() {
+ return activeNewlywedsId;
+ }
+
+ public void setActiveNewlywedsId(Integer activeNewlywedsId) {
+ this.activeNewlywedsId = activeNewlywedsId;
+ }
+
+ public Integer getChainStoreId() {
+ return chainStoreId;
+ }
+
+ public void setChainStoreId(Integer chainStoreId) {
+ this.chainStoreId = chainStoreId;
+ }
+
+ public Integer getStoreId() {
+ return storeId;
+ }
+
+ public void setStoreId(Integer storeId) {
+ this.storeId = storeId;
+ }
+
+ public String getUserId() {
+ return userId;
+ }
+
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ public String getInviteeUserId() {
+ return inviteeUserId;
+ }
+
+ public void setInviteeUserId(String inviteeUserId) {
+ this.inviteeUserId = inviteeUserId;
+ }
+
+ public String getCreateBy() {
+ return createBy;
+ }
+
+ public void setCreateBy(String createBy) {
+ this.createBy = createBy;
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getUpdateBy() {
+ return updateBy;
+ }
+
+ public void setUpdateBy(String updateBy) {
+ this.updateBy = updateBy;
+ }
+
+ public Date getUpdateTime() {
+ return updateTime;
+ }
+
+ public void setUpdateTime(Date updateTime) {
+ this.updateTime = updateTime;
+ }
+
+ /**
+ * 获取主键值
+ *
+ * @return 主键值
+ */
+ @Override
+ protected Serializable pkVal() {
+ return this.id;
+ }
+ }
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/mapper/ActiveNewlywedsRecordsMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/mapper/ActiveNewlywedsRecordsMapper.java
new file mode 100644
index 000000000..baad355a1
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/mapper/ActiveNewlywedsRecordsMapper.java
@@ -0,0 +1,15 @@
+package com.fuint.business.marketingActivity.activeNewlyweds.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsRecords;
+
+/**
+ * 新人有礼记录表(ActiveNewlywedsRecords)表数据库访问层
+ *
+ * @author makejava
+ * @since 2023-12-20 14:12:53
+ */
+public interface ActiveNewlywedsRecordsMapper extends BaseMapper {
+
+}
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsRecordsService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsRecordsService.java
new file mode 100644
index 000000000..840cb84ce
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsRecordsService.java
@@ -0,0 +1,15 @@
+package com.fuint.business.marketingActivity.activeNewlyweds.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsRecords;
+
+/**
+ * 新人有礼记录表(ActiveNewlywedsRecords)表服务接口
+ *
+ * @author makejava
+ * @since 2023-12-20 14:12:54
+ */
+public interface ActiveNewlywedsRecordsService extends IService {
+
+}
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsRecordsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsRecordsServiceImpl.java
new file mode 100644
index 000000000..893a38682
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsRecordsServiceImpl.java
@@ -0,0 +1,19 @@
+package com.fuint.business.marketingActivity.activeNewlyweds.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fuint.business.marketingActivity.activeNewlyweds.mapper.ActiveNewlywedsRecordsMapper;
+import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsRecords;
+import com.fuint.business.marketingActivity.activeNewlyweds.service.ActiveNewlywedsRecordsService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 新人有礼记录表(ActiveNewlywedsRecords)表服务实现类
+ *
+ * @author makejava
+ * @since 2023-12-20 14:12:54
+ */
+@Service("activeNewlywedsRecordsService")
+public class ActiveNewlywedsRecordsServiceImpl extends ServiceImpl implements ActiveNewlywedsRecordsService {
+
+}
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java
new file mode 100644
index 000000000..a9bb4b1d8
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java
@@ -0,0 +1,94 @@
+package com.fuint.business.marketingActivity.activeRecommend.controller;
+
+
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.api.ApiController;
+import com.baomidou.mybatisplus.extension.api.R;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendRecords;
+import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendRecordsService;
+import com.fuint.framework.web.BaseController;
+import com.fuint.framework.web.ResponseObject;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 邀请有礼记录表(ActiveRecommendRecords)表控制层
+ *
+ * @author makejava
+ * @since 2023-12-20 14:13:16
+ */
+@RestController
+@RequestMapping("business/marketingActivity/activeRecommendRecords")
+public class ActiveRecommendRecordsController extends BaseController {
+ /**
+ * 服务对象
+ */
+ @Resource
+ private ActiveRecommendRecordsService activeRecommendRecordsService;
+
+ /**
+ * 分页查询所有数据
+ * @param pageNo
+ * @param pageSize
+ * @param activeRecommendRecords
+ * @return
+ */
+ @GetMapping
+ public ResponseObject selectAll(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
+ @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
+ @Param("activeRecommendRecords") ActiveRecommendRecords activeRecommendRecords) {
+ Page page = new Page(pageNo, pageSize);
+ return getSuccessResult(this.activeRecommendRecordsService.page(page, new QueryWrapper<>(activeRecommendRecords)));
+ }
+
+ /**
+ * 通过主键查询单条数据
+ *
+ * @param id 主键
+ * @return 单条数据
+ */
+ @GetMapping("{id}")
+ public ResponseObject selectOne(@PathVariable Serializable id) {
+ return getSuccessResult(this.activeRecommendRecordsService.getById(id));
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param activeRecommendRecords 实体对象
+ * @return 新增结果
+ */
+ @PostMapping
+ public ResponseObject insert(@RequestBody ActiveRecommendRecords activeRecommendRecords) {
+ return getSuccessResult(this.activeRecommendRecordsService.save(activeRecommendRecords));
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param activeRecommendRecords 实体对象
+ * @return 修改结果
+ */
+ @PutMapping
+ public ResponseObject update(@RequestBody ActiveRecommendRecords activeRecommendRecords) {
+ return getSuccessResult(this.activeRecommendRecordsService.updateById(activeRecommendRecords));
+ }
+
+ /**
+ * 删除数据
+ *
+ * @param idList 主键结合
+ * @return 删除结果
+ */
+ @DeleteMapping
+ public ResponseObject delete(@RequestParam("idList") List idList) {
+ return getSuccessResult(this.activeRecommendRecordsService.removeByIds(idList));
+ }
+}
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommendRecords.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommendRecords.java
new file mode 100644
index 000000000..9de2253b3
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommendRecords.java
@@ -0,0 +1,127 @@
+package com.fuint.business.marketingActivity.activeRecommend.entity;
+
+import java.util.Date;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import java.io.Serializable;
+
+/**
+ * 邀请有礼记录表(ActiveRecommendRecords)表实体类
+ *
+ * @author makejava
+ * @since 2023-12-20 14:13:16
+ */
+@SuppressWarnings("serial")
+public class ActiveRecommendRecords extends Model {
+ //主键id
+ private Integer id;
+ //活动id
+ private Integer activeNewlywedsId;
+ //所属连锁店id
+ private Integer chainStoreId;
+ //所属店铺id
+ private Integer storeId;
+ //用户id
+ private String userId;
+ //被邀请人id
+ private String inviteeUserId;
+ //创建者
+ private String createBy;
+ //创建时间
+ private Date createTime;
+ //更新者
+ private String updateBy;
+ //更新时间
+ private Date updateTime;
+
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Integer getActiveNewlywedsId() {
+ return activeNewlywedsId;
+ }
+
+ public void setActiveNewlywedsId(Integer activeNewlywedsId) {
+ this.activeNewlywedsId = activeNewlywedsId;
+ }
+
+ public Integer getChainStoreId() {
+ return chainStoreId;
+ }
+
+ public void setChainStoreId(Integer chainStoreId) {
+ this.chainStoreId = chainStoreId;
+ }
+
+ public Integer getStoreId() {
+ return storeId;
+ }
+
+ public void setStoreId(Integer storeId) {
+ this.storeId = storeId;
+ }
+
+ public String getUserId() {
+ return userId;
+ }
+
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ public String getInviteeUserId() {
+ return inviteeUserId;
+ }
+
+ public void setInviteeUserId(String inviteeUserId) {
+ this.inviteeUserId = inviteeUserId;
+ }
+
+ public String getCreateBy() {
+ return createBy;
+ }
+
+ public void setCreateBy(String createBy) {
+ this.createBy = createBy;
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getUpdateBy() {
+ return updateBy;
+ }
+
+ public void setUpdateBy(String updateBy) {
+ this.updateBy = updateBy;
+ }
+
+ public Date getUpdateTime() {
+ return updateTime;
+ }
+
+ public void setUpdateTime(Date updateTime) {
+ this.updateTime = updateTime;
+ }
+
+ /**
+ * 获取主键值
+ *
+ * @return 主键值
+ */
+ @Override
+ protected Serializable pkVal() {
+ return this.id;
+ }
+ }
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/mapper/ActiveRecommendRecordsMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/mapper/ActiveRecommendRecordsMapper.java
new file mode 100644
index 000000000..9363f1f3e
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/mapper/ActiveRecommendRecordsMapper.java
@@ -0,0 +1,15 @@
+package com.fuint.business.marketingActivity.activeRecommend.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendRecords;
+
+/**
+ * 邀请有礼记录表(ActiveRecommendRecords)表数据库访问层
+ *
+ * @author makejava
+ * @since 2023-12-20 14:13:16
+ */
+public interface ActiveRecommendRecordsMapper extends BaseMapper {
+
+}
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java
new file mode 100644
index 000000000..af06d3de9
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java
@@ -0,0 +1,15 @@
+package com.fuint.business.marketingActivity.activeRecommend.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendRecords;
+
+/**
+ * 邀请有礼记录表(ActiveRecommendRecords)表服务接口
+ *
+ * @author makejava
+ * @since 2023-12-20 14:13:16
+ */
+public interface ActiveRecommendRecordsService extends IService {
+
+}
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java
new file mode 100644
index 000000000..31a3a97f4
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java
@@ -0,0 +1,19 @@
+package com.fuint.business.marketingActivity.activeRecommend.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fuint.business.marketingActivity.activeRecommend.mapper.ActiveRecommendRecordsMapper;
+import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendRecords;
+import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendRecordsService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 邀请有礼记录表(ActiveRecommendRecords)表服务实现类
+ *
+ * @author makejava
+ * @since 2023-12-20 14:13:16
+ */
+@Service("activeRecommendRecordsService")
+public class ActiveRecommendRecordsServiceImpl extends ServiceImpl implements ActiveRecommendRecordsService {
+
+}
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java
index ddc34a210..7d6284521 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java
@@ -74,7 +74,7 @@ public class CardValueRecordController extends BaseController {
/**
* 储值卡充值
*
- * @param cardValueRecord 实体对象
+ * @param cardValueRecordDTO 实体对象
* @return 新增结果
*/
@PostMapping
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java
index 81c9a9c52..398a6cb02 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java
@@ -26,6 +26,8 @@ import com.fuint.business.userManager.vo.LJUserVo;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.RocketUtil;
import com.fuint.common.util.TokenUtil;
+import com.fuint.repository.mapper.MtStaffMapper;
+import com.fuint.repository.model.MtStaff;
import io.lettuce.core.dynamic.annotation.Param;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -73,6 +75,8 @@ public class CardValueRecordServiceImpl extends ServiceImpl
Date: Wed, 20 Dec 2023 16:04:56 +0800
Subject: [PATCH 3/8] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=94=AF?=
=?UTF-8?q?=E4=BB=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../configure/dev/application.properties | 102 ++++++++++--------
.../api/fuyou/controller/FyPayController.java | 39 +++----
.../order/controller/OilOrderController.java | 12 +++
.../order/service/OilOrderService.java | 10 +-
.../service/impl/OilOrderServiceImpl.java | 30 ++++--
.../src/main/resources/application.properties | 7 +-
gasStation-uni/manifest.json | 2 +-
gasStation-uni/pages.json | 7 ++
gasStation-uni/pages/my/my.vue | 12 +--
gasStation-uni/pagesLogin/login/login.vue | 2 +-
.../pagesRefuel/orderDetail/index.vue | 36 +++++++
11 files changed, 175 insertions(+), 84 deletions(-)
diff --git a/fuintBackend/configure/dev/application.properties b/fuintBackend/configure/dev/application.properties
index c6d041c2c..7059da666 100644
--- a/fuintBackend/configure/dev/application.properties
+++ b/fuintBackend/configure/dev/application.properties
@@ -1,4 +1,4 @@
-# 数据库配置
+# \u6570\u636E\u5E93\u914D\u7F6E
spring.datasource.url=jdbc:mysql://192.168.1.3:3306/fuint-db?useUnicode=true&characterEncoding=UTF8&useSSL=false&allowMultiQueries=true
@@ -10,102 +10,110 @@ spring.datasource.password=qqzcy@1014
#spring.datasource.password=root
-# Redis配置
+# Redis\u914D\u7F6E
spring.session.store-type=redis
spring.session.redis.namespace=fuint
-# Redis数据库索引(默认为0)
+# Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA4\u4E3A0\uFF09
spring.redis.database=0
-# Redis服务器地址(生产)
+# Redis\u670D\u52A1\u5668\u5730\u5740(\u751F\u4EA7)
spring.redis.host=localhost
-# Redis服务器连接端口
+# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u7AEF\u53E3
spring.redis.port=6379
-# Redis服务器连接密码(默认为空)
+# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u5BC6\u7801\uFF08\u9ED8\u8BA4\u4E3A\u7A7A\uFF09
spring.redis.password=
-# 连接池最大连接数(使用负值表示没有限制)
+# \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
spring.redis.pool.max-active=-1
-# 连接池最大阻塞等待时间(使用负值表示没有限制)
+# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
spring.redis.pool.max-wait=-1
-# 连接池中的最大空闲连接
+# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5
spring.redis.pool.max-idle=8
-# 连接池中的最小空闲连接
+# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5
spring.redis.pool.min-idle=0
-# 连接超时时间(毫秒)
+# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09
spring.redis.timeout=5000
-# 系统名称
-system.name = 蓝鲸智慧油站系统
+# \u7CFB\u7EDF\u540D\u79F0
+system.name = \u84DD\u9CB8\u667A\u6167\u6CB9\u7AD9\u7CFB\u7EDF
-# 前端h5地址
+# \u524D\u7AEFh5\u5730\u5740
website.url=https://www.fuint.cn/h5/
-# 上传图片本地地址
+# \u4E0A\u4F20\u56FE\u7247\u672C\u5730\u5730\u5740
images.root=C:/fuintV3.0.1/fuintBackend/fuint-application/target/classes
images.path=/static/uploadImages/
-# 上传图片服务器域名
-images.upload.url=http://192.168.1.6:8008
+# \u4E0A\u4F20\u56FE\u7247\u670D\u52A1\u5668\u57DF\u540D
+images.upload.url=http://localhost:8080
-# 上传图片允许的大小(单位:MB)
+# \u4E0A\u4F20\u56FE\u7247\u5141\u8BB8\u7684\u5927\u5C0F\uFF08\u5355\u4F4D\uFF1AMB\uFF09
images.upload.maxSize=5
-################## 定时脚本配置 #########################
-# 定时发送消息
+################## \u5B9A\u65F6\u811A\u672C\u914D\u7F6E #########################
+# \u5B9A\u65F6\u53D1\u9001\u6D88\u606F
message.job.switch = 1
message.job.time = 0 0/1 * * * ?
-# 卡券到期处理
+# \u5361\u5238\u5230\u671F\u5904\u7406
couponExpire.job.switch = 1
couponExpire.job.time = 0 0/1 * * * ?
-# 订单超时取消
+# \u8BA2\u5355\u8D85\u65F6\u53D6\u6D88
orderCancel.job.switch = 1
orderCancel.job.time = 0 0/1 * * * ?
-################## 阿里云短信配置 #######################
-# 短信接口模式[0-关闭 1-打开]
+################## \u963F\u91CC\u4E91\u77ED\u4FE1\u914D\u7F6E #######################
+# \u77ED\u4FE1\u63A5\u53E3\u6A21\u5F0F[0-\u5173\u95ED 1-\u6253\u5F00]
aliyun.sms.mode = 0
aliyun.sms.accessKeyId=LTAI4GJMjV123oXsrQJLnPZt
aliyun.sms.accessKeySecret=eGVBL30u5Ypj234d7XODlwYKWTaGT
-# 阿里云短信签名
-aliyun.sms.signName=延禾技术
+# \u963F\u91CC\u4E91\u77ED\u4FE1\u7B7E\u540D
+aliyun.sms.signName=\u5EF6\u79BE\u6280\u672F
-################## 阿里云OSS存储配置######################
-# 模式[0-关闭 1-打开]
+################## \u963F\u91CC\u4E91OSS\u5B58\u50A8\u914D\u7F6E######################
+# \u6A21\u5F0F[0-\u5173\u95ED 1-\u6253\u5F00]
aliyun.oss.mode = 0
aliyun.oss.accessKeyId = LTAI4GJMjVhBa212rQJLnPZtt
aliyun.oss.accessKeySecret = eGVBL30u53456gXd7XODlwYKWTaGT
aliyun.oss.endpoint = https://oss-cn-shenzhen.aliyuncs.com
aliyun.oss.bucketName = fuint-application
-# 上传文件夹
+# \u4E0A\u4F20\u6587\u4EF6\u5939
aliyun.oss.folder = uploads
-# 访问域名
+# \u8BBF\u95EE\u57DF\u540D
aliyun.oss.domain = https://fuint-application.oss-cn-shenzhen.aliyuncs.com
-################## 微信相关配置 ##########################
-# 公众号配置
+################## \u5FAE\u4FE1\u76F8\u5173\u914D\u7F6E ##########################
+# \u516C\u4F17\u53F7\u914D\u7F6E
weixin.official.appId=wxf4327ef05c27a0
weixin.official.appSecret=1f55e8749332234d9a074873d8e6a3
-# 小程序配置
-wxpay.appId = wxba517a9bac38fe92
-wxpay.appSecret = 8bfcce86abc4e2a461ecc781a09249a5
+# \u5C0F\u7A0B\u5E8F\u914D\u7F6E
+#wxpay.appId = wxba517a9bac38fe92
+wxpay.appId = wx033c30e366eff6ac
+#wxpay.appSecret = 8bfcce86abc4e2a461ecc781a09249a5
+wxpay.appSecret = e46a9a5947380fb70a1aa33a5b427ba4
wxpay.mchId=1636980812
wxpay.apiV2=34354320201030y323e432342343
wxpay.certPath=/usr/local/fuint/cert/apiclient_cert.p12
wxpay.domain=https://www.fuint.cn/fuint-application
-################## 支付宝支付相关配置 ######################
-alipay.appId = 应用编号
-alipay.privateKey = 应用私钥
-alipay.publicKey = 支付宝公钥(通过应用公钥上传到支付宝开放平台换取支付宝公钥)
+################## \u652F\u4ED8\u5B9D\u652F\u4ED8\u76F8\u5173\u914D\u7F6E ######################
+alipay.appId = \u5E94\u7528\u7F16\u53F7
+alipay.privateKey = \u5E94\u7528\u79C1\u94A5
+alipay.publicKey = \u652F\u4ED8\u5B9D\u516C\u94A5\uFF08\u901A\u8FC7\u5E94\u7528\u516C\u94A5\u4E0A\u4F20\u5230\u652F\u4ED8\u5B9D\u5F00\u653E\u5E73\u53F0\u6362\u53D6\u652F\u4ED8\u5B9D\u516C\u94A5\uFF09
alipay.serverUrl=https://openapi.alipay.com/gateway.do
alipay.domain=https://www.fuint.cn/fuint-application/clientApi/pay/aliPayCallback
-################ 微信订阅模板消息配置 ######################
-weixin.subMessage.orderCreated=[{'key':'time', 'name':'订单时间'},{'key':'orderSn', 'name':'订单号'},{'key':'remark', 'name':'备注信息'}]
-weixin.subMessage.deliverGoods=[{'key':'receiver', 'name':'收货人'}, {'key':'orderSn', 'name':'订单号'}, {'key':'expressCompany', 'name':'快递公司'}, {'key':'expressNo', 'name':'快递单号'}]
-weixin.subMessage.couponExpire=[{'key':'name', 'name':'卡券名称'}, {'key':'expireTime', 'name':'到期时间'},{'key':'tips', 'name':'温馨提示'}]
-weixin.subMessage.couponArrival=[{'key':'name', 'name':'卡券名称'},{'key':'amount', 'name':'金额'},{'key':'tips', 'name':'温馨提示'}]
-weixin.subMessage.balanceChange=[{'key':'amount', 'name':'变动金额'},{'key':'time', 'name':'变动时间'},{'key':'tips', 'name':'温馨提示'}]
-weixin.subMessage.couponConfirm=[{'key':'name', 'name':'卡券名称'},{'key':'time', 'name':'核销时间'}]
-weixin.subMessage.pointChange=[{'key':'amount', 'name':'变动数量'},{'key':'time', 'name':'变动时间'},{'key':'remark', 'name':'备注信息'}]
+################ \u5FAE\u4FE1\u8BA2\u9605\u6A21\u677F\u6D88\u606F\u914D\u7F6E ######################
+weixin.subMessage.orderCreated=[{'key':'time', 'name':'\u8BA2\u5355\u65F6\u95F4'},{'key':'orderSn', 'name':'\u8BA2\u5355\u53F7'},{'key':'remark', 'name':'\u5907\u6CE8\u4FE1\u606F'}]
+weixin.subMessage.deliverGoods=[{'key':'receiver', 'name':'\u6536\u8D27\u4EBA'}, {'key':'orderSn', 'name':'\u8BA2\u5355\u53F7'}, {'key':'expressCompany', 'name':'\u5FEB\u9012\u516C\u53F8'}, {'key':'expressNo', 'name':'\u5FEB\u9012\u5355\u53F7'}]
+weixin.subMessage.couponExpire=[{'key':'name', 'name':'\u5361\u5238\u540D\u79F0'}, {'key':'expireTime', 'name':'\u5230\u671F\u65F6\u95F4'},{'key':'tips', 'name':'\u6E29\u99A8\u63D0\u793A'}]
+weixin.subMessage.couponArrival=[{'key':'name', 'name':'\u5361\u5238\u540D\u79F0'},{'key':'amount', 'name':'\u91D1\u989D'},{'key':'tips', 'name':'\u6E29\u99A8\u63D0\u793A'}]
+weixin.subMessage.balanceChange=[{'key':'amount', 'name':'\u53D8\u52A8\u91D1\u989D'},{'key':'time', 'name':'\u53D8\u52A8\u65F6\u95F4'},{'key':'tips', 'name':'\u6E29\u99A8\u63D0\u793A'}]
+weixin.subMessage.couponConfirm=[{'key':'name', 'name':'\u5361\u5238\u540D\u79F0'},{'key':'time', 'name':'\u6838\u9500\u65F6\u95F4'}]
+weixin.subMessage.pointChange=[{'key':'amount', 'name':'\u53D8\u52A8\u6570\u91CF'},{'key':'time', 'name':'\u53D8\u52A8\u65F6\u95F4'},{'key':'remark', 'name':'\u5907\u6CE8\u4FE1\u606F'}]
+
+# rocketmq\u914D\u7F6E
+//1
+rocketmq.name-server=127.0.0.1:9876
+//2
+rocketmq.producer.group=provider
\ No newline at end of file
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/FyPayController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/FyPayController.java
index 2bd40875a..4f9ba1f4f 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/FyPayController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/FyPayController.java
@@ -1,38 +1,39 @@
package com.fuint.api.fuyou.controller;
+import com.fuint.api.fuyou.entity.Const;
import com.fuint.api.fuyou.service.FyPayService;
+import com.fuint.api.fuyou.util.Utils;
+import com.fuint.business.order.service.OilOrderService;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import java.util.Enumeration;
-import java.util.HashMap;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
import java.util.Map;
@RestController
@RequestMapping("/api/fyPay")
public class FyPayController {
@Autowired
- private FyPayService payService;
+ @Lazy
+ private OilOrderService orderService;
// 接收支付平台异步通知的接口
@PostMapping("/notify")
- public String notifyUrl(HttpServletRequest request,HttpServletResponse response) {
- System.out.println("111+"+request);
- System.out.println("222+"+response);
-// Map paramMap = new HashMap<>();
-// Enumeration parameterNames = request.getParameterNames();
-// while(parameterNames.hasMoreElements()) {
-// String parameterName = (String) parameterNames.nextElement();
-// paramMap.put(parameterName, request.getParameter(parameterName));
-// }
-// boolean isSuccess = processNotify(paramMap); // 处理支付结果并返回成功或失败状态
-// if(isSuccess) {
-// return "success"; // 返回成功状态,通知支付平台异步通知已成功接收
-// } else {
-// return "fail"; // 返回失败状态,通知支付平台异步通知已失败
-// }
- return "11111111";
+ public String notifyUrl(HttpServletRequest request,HttpServletResponse response) throws UnsupportedEncodingException {
+ System.out.println("----------------收到支付回调--------"+request.getParameter("req"));
+ String notifyData = request.getParameter("req");
+ String decode = URLDecoder.decode(notifyData, Const.charset);
+ Map reqMap = Utils.xmlStr2Map(decode);
+ if (reqMap.get("result_msg").equals("SUCCESS")){
+ String orderNo = reqMap.get("mchnt_order_no");
+ orderService.updateOrderStatus(orderNo,"paid");
+ return "1";
+ }else {
+ return "0";
+ }
}
}
\ No newline at end of file
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilOrderController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilOrderController.java
index 2c2733ee7..439e8e196 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilOrderController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilOrderController.java
@@ -160,6 +160,18 @@ public class OilOrderController extends BaseController {
return getSuccessResult(orderService.addOilOrder(oilOrder));
}
+ /**
+ * 根据订单号修改订单支付状态
+ * @param map
+ * @return
+ */
+ @PostMapping("/orderStatus")
+ public ResponseObject editStatus(@RequestBody Map map){
+ String orderNo = map.get("orderNo");
+ String status = map.get("status");
+ return getSuccessResult(orderService.updateOrderStatus(orderNo,status));
+ }
+
/**
* 信息统计
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/OilOrderService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/OilOrderService.java
index 3294a3964..61469540a 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/OilOrderService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/OilOrderService.java
@@ -84,7 +84,15 @@ public interface OilOrderService extends IService {
* 小程序订单支付
* @param map
*/
- public boolean appletPay(Map map);
+ public Map appletPay(Map map);
+
+ /**
+ * 根据订单号修改订单支付状态
+ * @param orderNo
+ * @param status
+ * @return
+ */
+ public int updateOrderStatus(String orderNo,String status);
/**
* 添加油品跟踪信息
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java
index 12fc57803..e640b6f26 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java
@@ -435,7 +435,7 @@ public class OilOrderServiceImpl extends ServiceImpl i
private OilNumberService oilNumberService;
@Override
- public boolean appletPay(Map map) {
+ public Map appletPay(Map map) {
String orderNo = map.get("orderNo");
// 支付金额
Integer payAmount = (int) (Double.valueOf(map.get("payAmount"))*100);
@@ -482,10 +482,13 @@ public class OilOrderServiceImpl extends ServiceImpl i
}
if (result){
- return false;
+ return null;
}
oilOrder.setTankId(tankId);
+
+ Map applet = null;
+
if (!map.get("payAmount").equals("0")) {
// 调用支付接口
// 判断是否开启支付规则
@@ -522,7 +525,8 @@ public class OilOrderServiceImpl extends ServiceImpl i
// 调用支付接口
try {
- fyPayService.applet(map1);
+ applet = fyPayService.applet(map1);
+ applet.put("orderNo",orderNo);
} catch (Exception e) {
e.printStackTrace();
}
@@ -536,7 +540,21 @@ public class OilOrderServiceImpl extends ServiceImpl i
oilOrder.setOrderStatus("paid");
baseMapper.updateById(oilOrder);
}
- return true;
+ return applet;
+ }
+
+ @Override
+ public int updateOrderStatus(String orderNo, String status) {
+ int row = 0;
+ OilOrder oilOrder = this.selectOilOrderByOrderNo(orderNo);
+ if (ObjectUtil.isNotEmpty(oilOrder)){
+ oilOrder.setOrderStatus(status);
+ if (status.equals("paid")){
+ oilOrder.setPayTime(new Date());
+ }
+ row = baseMapper.updateById(oilOrder);
+ }
+ return 0;
}
@Autowired
@@ -625,7 +643,7 @@ public class OilOrderServiceImpl extends ServiceImpl i
Integer dieselGrowthValue = null;
Integer naturalGrowthValue = null;
LJStore store = storeService.selectStoreByStoreId(storeId);
- UserBalance balance = userBalanceService.selectUserBalance(userid,store.getChainStoreId());
+ UserBalance balance = userBalanceService.selectUserBalance(userid);
int growth = balance.getGrowthValue();
balance.setRefuelMoney(refuelMoney);
// 查询会员等级列表信息
@@ -685,7 +703,7 @@ public class OilOrderServiceImpl extends ServiceImpl i
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
// 根据用户id查询用户余额信息
LJStore store = storeService.selectStoreByStoreId(storeId);
- UserBalance balance = userBalanceService.selectUserBalance(userId,store.getChainStoreId());
+ UserBalance balance = userBalanceService.selectUserBalance(userId);
// 修改余额信息
Double beforeBalance = balance.getCardBalance();
Double afterBalance = beforeBalance - amount;
diff --git a/fuintBackend/fuint-application/src/main/resources/application.properties b/fuintBackend/fuint-application/src/main/resources/application.properties
index 8797f5ad3..d9ef9d458 100644
--- a/fuintBackend/fuint-application/src/main/resources/application.properties
+++ b/fuintBackend/fuint-application/src/main/resources/application.properties
@@ -1,7 +1,8 @@
# \u57FA\u672C\u914D\u7F6E
-server.port=8008
+server.port=8080
env.profile=dev
-env.properties.path=D:/code/oilSystem/fuintBackend/configure/
+env.properties.path=D:/workspaces/oilSystem/fuintBackend/configure/
+
# \u6570\u636E\u5E93\u914D\u7F6E
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
@@ -20,7 +21,7 @@ spring.servlet.multipart.max-request-size=10MB
# mybatis\u914D\u7F6E
mybatis-plus.mapper-locations = classpath*:/mapper/*Mapper.xml,classpath*:com/fuint/**/xml/*Mapper.xml
-# �����Զ���������
+# \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0536\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
mybatis-plus.configuration.intercepts=com.example.MyInterceptor
# \u9ED8\u8BA4\u65F6\u95F4\u683C\u5F0F
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
diff --git a/gasStation-uni/manifest.json b/gasStation-uni/manifest.json
index 685ba1e3b..4be5e7309 100644
--- a/gasStation-uni/manifest.json
+++ b/gasStation-uni/manifest.json
@@ -50,7 +50,7 @@
/* 小程序特有相关 */
"mp-weixin" : {
"output-path" : "dist/myapp",
- "appid" : "wxba517a9bac38fe92",
+ "appid" : "wx033c30e366eff6ac",
"setting" : {
"urlCheck" : false,
"es6" : true,
diff --git a/gasStation-uni/pages.json b/gasStation-uni/pages.json
index 7ef309ffb..dba892e58 100644
--- a/gasStation-uni/pages.json
+++ b/gasStation-uni/pages.json
@@ -151,6 +151,13 @@
"navigationBarTitleText": "支付订单",
"navigationStyle": "custom"
}
+ },
+ {
+ "path": "orderSuccess/index",
+ "style": {
+ "navigationBarTitleText": "支付完成页",
+ "navigationStyle": "custom"
+ }
}
]
},
diff --git a/gasStation-uni/pages/my/my.vue b/gasStation-uni/pages/my/my.vue
index e1f8055ee..57fa5f2d8 100644
--- a/gasStation-uni/pages/my/my.vue
+++ b/gasStation-uni/pages/my/my.vue
@@ -264,12 +264,12 @@
method: 'get',
}).then(res => {
// console.log(res,111222)
- if (res.code == 200) {
- this.cardBalance = res.data.cardBalance,
- if (res.data.refuelMoney!=null && res.data.refuelMoney!=""){
- this.refuelMoney = JSON.parse(res.data.refuelMoney);
- }
- }
+ // if (res.code == 200) {
+ // this.cardBalance = res.data.cardBalance,
+ // if (res.data.refuelMoney!=null && res.data.refuelMoney!=""){
+ // this.refuelMoney = JSON.parse(res.data.refuelMoney);
+ // }
+ // }
})
},
getGiftRecords() {
diff --git a/gasStation-uni/pagesLogin/login/login.vue b/gasStation-uni/pagesLogin/login/login.vue
index 51df2e569..efd2c6aa8 100644
--- a/gasStation-uni/pagesLogin/login/login.vue
+++ b/gasStation-uni/pagesLogin/login/login.vue
@@ -73,7 +73,7 @@
userInfo: {
storeId: 0,
staffId: "",
- phone: '17753808121'
+ phone: '18475962147'
},
type: 'phone',
diff --git a/gasStation-uni/pagesRefuel/orderDetail/index.vue b/gasStation-uni/pagesRefuel/orderDetail/index.vue
index e4cff2853..d3fba1fca 100644
--- a/gasStation-uni/pagesRefuel/orderDetail/index.vue
+++ b/gasStation-uni/pagesRefuel/orderDetail/index.vue
@@ -282,6 +282,7 @@
isOilStorageCard:false,
// 是否使用会员等级优惠
isUseGrade:false,
+ orderInfo:{},
}
},
onLoad(e) {
@@ -393,6 +394,41 @@
data: map,
}).then(res => {
console.log(res)
+ let payProvider = "wxpay"
+ // if (_this.appltType== "WECHAT"){
+ // payProvider = "wxpay"
+ // }else{
+ // payProvider = "alipay"
+ // }
+ _this.orderInfo = JSON.parse(res.data.reserved_pay_info);
+ uni.requestPayment({
+ // 微信支付provider: 'wxpay' 支付宝支付 'alipay'
+ provider: payProvider,
+ timeStamp: _this.orderInfo.timeStamp,
+ nonceStr: _this.orderInfo.nonceStr,
+ package: _this.orderInfo.package,
+ signType: 'MD5',
+ paySign: _this.orderInfo.paySign,
+ success: function (res) {
+ console.log('success:',res);
+ uni.reLaunch({
+ url: '/pagesRefuel/orderSuccess/index'
+ })
+ },
+ fail: function (err) {
+ request({
+ url: "business/oilOrder/orderStatus",
+ method: 'post',
+ data: {"orderNo":res.data.orderNo,"status":"payFail"},
+ }).then((res)=>{
+ uni.showToast({
+ title:"支付失败!",
+ icon:"error"
+ })
+ })
+ console.log('fail:',err);
+ }
+ });
})
},
// 囤油卡变化后总金额的变化
From cc69c78e3e405d919f11f571074de4032529888b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com>
Date: Thu, 21 Dec 2023 17:48:13 +0800
Subject: [PATCH 4/8] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=AB=AF?=
=?UTF-8?q?=E6=8E=A8=E8=8D=90=E6=9C=89=E7=A4=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ActiveNewlywedsRecordsController.java | 8 +-
.../entity/ActiveNewlywedsRecords.java | 105 ++--------------
.../ActiveNewlywedsRecordsService.java | 6 +
.../ActiveNewlywedsRecordsServiceImpl.java | 86 +++++++++++++
.../ActiveRecommendRecordsController.java | 21 ++--
.../entity/ActiveRecommendRecords.java | 12 ++
.../ActiveRecommendRecordsService.java | 22 ++++
.../ActiveRecommendRecordsServiceImpl.java | 119 ++++++++++++++++++
.../impl/ActiveRecommendServiceImpl.java | 8 +-
.../vo/ActiveRecommendRecordsVO.java | 11 ++
.../controller/CardFavorableController.java | 20 ++-
.../CardFavorableRecordController.java | 20 +++
.../service/CardFavorableRecordService.java | 13 ++
.../impl/CardFavorableRecordServiceImpl.java | 60 ++++++++-
gasStation-uni/pages/index/index.vue | 81 ++++++++++--
gasStation-uni/pages/my/my.vue | 7 +-
gasStation-uni/pagesHome/activeIn/index.vue | 9 +-
gasStation-uni/pagesMy/Coupons/Coupons.vue | 70 +++++++++--
18 files changed, 538 insertions(+), 140 deletions(-)
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/vo/ActiveRecommendRecordsVO.java
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java
index 2cd6dbf7f..96c783786 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java
@@ -59,12 +59,12 @@ public class ActiveNewlywedsRecordsController extends BaseController {
@GetMapping("applet")
public ResponseObject isJoined(@Param("activeNewlywedsRecords") ActiveNewlywedsRecords activeNewlywedsRecords) {
LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
- queryWrapper.eq(ActiveNewlywedsRecords::getInviteeUserId,TokenUtil.getNowAccountInfo().getId());
+ queryWrapper.eq(ActiveNewlywedsRecords::getUserId,TokenUtil.getNowAccountInfo().getId());
List list = this.activeNewlywedsRecordsService.list(queryWrapper);
if (list.size() == 0){
- return getSuccessResult("可以参加新人活动");
+ return getSuccessResult("1");
}else {
- return getSuccessResult("不可以参加新人活动");
+ return getSuccessResult("0");
}
}
@@ -87,7 +87,7 @@ public class ActiveNewlywedsRecordsController extends BaseController {
*/
@PostMapping
public ResponseObject insert(@RequestBody ActiveNewlywedsRecords activeNewlywedsRecords) {
- return getSuccessResult(this.activeNewlywedsRecordsService.save(activeNewlywedsRecords));
+ return getSuccessResult(this.activeNewlywedsRecordsService.add(activeNewlywedsRecords));
}
/**
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlywedsRecords.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlywedsRecords.java
index 3a777b50e..1d2423184 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlywedsRecords.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlywedsRecords.java
@@ -1,7 +1,13 @@
package com.fuint.business.marketingActivity.activeNewlyweds.entity;
import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+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;
/**
@@ -11,8 +17,10 @@ import java.io.Serializable;
* @since 2023-12-20 14:12:54
*/
@SuppressWarnings("serial")
+@Data
public class ActiveNewlywedsRecords extends Model {
//主键id
+ @TableId(type = IdType.AUTO)
private Integer id;
//活动id
private Integer activeNewlywedsId;
@@ -21,107 +29,16 @@ public class ActiveNewlywedsRecords extends Model {
//所属店铺id
private Integer storeId;
//用户id
- private String userId;
- //被邀请人id
- private String inviteeUserId;
+ private Integer userId;
//创建者
private String createBy;
//创建时间
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
//更新者
private String updateBy;
//更新时间
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
-
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public Integer getActiveNewlywedsId() {
- return activeNewlywedsId;
- }
-
- public void setActiveNewlywedsId(Integer activeNewlywedsId) {
- this.activeNewlywedsId = activeNewlywedsId;
- }
-
- public Integer getChainStoreId() {
- return chainStoreId;
- }
-
- public void setChainStoreId(Integer chainStoreId) {
- this.chainStoreId = chainStoreId;
- }
-
- public Integer getStoreId() {
- return storeId;
- }
-
- public void setStoreId(Integer storeId) {
- this.storeId = storeId;
- }
-
- public String getUserId() {
- return userId;
- }
-
- public void setUserId(String userId) {
- this.userId = userId;
- }
-
- public String getInviteeUserId() {
- return inviteeUserId;
- }
-
- public void setInviteeUserId(String inviteeUserId) {
- this.inviteeUserId = inviteeUserId;
- }
-
- public String getCreateBy() {
- return createBy;
- }
-
- public void setCreateBy(String createBy) {
- this.createBy = createBy;
- }
-
- public Date getCreateTime() {
- return createTime;
- }
-
- public void setCreateTime(Date createTime) {
- this.createTime = createTime;
- }
-
- public String getUpdateBy() {
- return updateBy;
- }
-
- public void setUpdateBy(String updateBy) {
- this.updateBy = updateBy;
- }
-
- public Date getUpdateTime() {
- return updateTime;
- }
-
- public void setUpdateTime(Date updateTime) {
- this.updateTime = updateTime;
- }
-
- /**
- * 获取主键值
- *
- * @return 主键值
- */
- @Override
- protected Serializable pkVal() {
- return this.id;
- }
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsRecordsService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsRecordsService.java
index 840cb84ce..509436b60 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsRecordsService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsRecordsService.java
@@ -11,5 +11,11 @@ import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywe
*/
public interface ActiveNewlywedsRecordsService extends IService {
+ /**
+ * 新增数据
+ * @param activeNewlywedsRecords
+ * @return
+ */
+ boolean add(ActiveNewlywedsRecords activeNewlywedsRecords);
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsRecordsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsRecordsServiceImpl.java
index 893a38682..db9a238ce 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsRecordsServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsRecordsServiceImpl.java
@@ -1,10 +1,30 @@
package com.fuint.business.marketingActivity.activeNewlyweds.service.impl;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fuint.business.marketingActivity.activeNewlyweds.controller.vo.ActiveNewlywedsVO;
+import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlyweds;
+import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsChild;
import com.fuint.business.marketingActivity.activeNewlyweds.mapper.ActiveNewlywedsRecordsMapper;
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsRecords;
import com.fuint.business.marketingActivity.activeNewlyweds.service.ActiveNewlywedsRecordsService;
+import com.fuint.business.marketingActivity.activeNewlyweds.service.ActiveNewlywedsService;
+import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord;
+import com.fuint.business.marketingActivity.cardExchange.service.CardExchangeRecordService;
+import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
+import com.fuint.business.marketingActivity.cardFavorable.mapper.CardFavorableRecordMapper;
+import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
+import com.fuint.business.userManager.service.LJUserService;
+import com.fuint.business.userManager.vo.LJUserVo;
+import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.util.TokenUtil;
+import com.sun.xml.bind.v2.TODO;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
/**
* 新人有礼记录表(ActiveNewlywedsRecords)表服务实现类
@@ -15,5 +35,71 @@ import org.springframework.stereotype.Service;
@Service("activeNewlywedsRecordsService")
public class ActiveNewlywedsRecordsServiceImpl extends ServiceImpl implements ActiveNewlywedsRecordsService {
+ @Resource
+ private ActiveNewlywedsService activeNewlywedsService;
+ @Resource
+ private CardFavorableRecordService cardFavorableRecordService;
+ @Resource
+ private CardExchangeRecordService cardExchangeRecordService;
+ @Resource
+ private LJUserService userService;
+ /**
+ * 新增数据
+ * @param activeNewlywedsRecords
+ * @return
+ */
+ @Override
+ @Transactional
+ public boolean add(ActiveNewlywedsRecords activeNewlywedsRecords) {
+ boolean save = false;
+ //用户信息
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ Integer userId = nowAccountInfo.getId();
+ LJUserVo ljUserVo = userService.selectUserById(userId);
+ //保存新人有礼记录
+ ActiveNewlywedsVO activeNewlyweds = activeNewlywedsService.getOneById(1);
+ activeNewlywedsRecords.setActiveNewlywedsId(activeNewlyweds.getId());
+ activeNewlywedsRecords.setChainStoreId(nowAccountInfo.getChainStoreId());
+ activeNewlywedsRecords.setStoreId(nowAccountInfo.getStoreId());
+ activeNewlywedsRecords.setUserId(userId);
+ save = save(activeNewlywedsRecords);
+ //优惠券
+ CardFavorableRecord cardFavorableRecord = new CardFavorableRecord();
+ List activeNewlywedsChildList = activeNewlyweds.getActiveNewlywedsChildList();
+ if (CollectionUtils.isNotEmpty(activeNewlywedsChildList)){
+ for (ActiveNewlywedsChild activeNewlywedsChild : activeNewlywedsChildList) {
+ if (activeNewlywedsChild.getActiveGift().equals("1")){
+ cardFavorableRecord.setCardFavorableId(activeNewlywedsChild.getActiveNewlywedsId());
+ cardFavorableRecord.setChainStorId(nowAccountInfo.getChainStoreId());
+ cardFavorableRecord.setStoreId(nowAccountInfo.getStoreId());
+ cardFavorableRecord.setMtUserId(userId);
+ cardFavorableRecord.setName(ljUserVo.getName());
+ cardFavorableRecord.setMobile(ljUserVo.getMobile());
+ cardFavorableRecord.setName(nowAccountInfo.getRealName());
+ cardFavorableRecord.setExchangeFrom("新人发券");
+ save = cardFavorableRecordService.save(cardFavorableRecord);
+ }else {
+ //兑换券
+ CardExchangeRecord cardExchangeRecord = new CardExchangeRecord();
+ cardExchangeRecord.setCardExchangeId(activeNewlywedsChild.getActiveNewlywedsId());
+ cardExchangeRecord.setChainStorId(nowAccountInfo.getChainStoreId());
+ cardExchangeRecord.setStoreId(nowAccountInfo.getStoreId());
+ cardExchangeRecord.setMtUserId(userId);
+ cardExchangeRecord.setName(ljUserVo.getName());
+ cardExchangeRecord.setMobile(ljUserVo.getMobile());
+ cardExchangeRecord.setExchangeName(activeNewlywedsChild.getGiftCardName());
+ cardExchangeRecord.setExchangeFrom("新人领券");
+ cardExchangeRecord.setGiftName(activeNewlywedsChild.getGiftCardName());
+ cardExchangeRecord.setDescription(activeNewlywedsChild.getGiftCardDetail());
+ save = cardExchangeRecordService.save(cardExchangeRecord);
+ }
+ }
+ //积分
+ //成长值 TODO
+ }
+ //
+
+ return save;
+ }
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java
index a9bb4b1d8..f22f8664f 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java
@@ -2,9 +2,6 @@ package com.fuint.business.marketingActivity.activeRecommend.controller;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.api.ApiController;
-import com.baomidou.mybatisplus.extension.api.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendRecords;
import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendRecordsService;
@@ -33,7 +30,7 @@ public class ActiveRecommendRecordsController extends BaseController {
private ActiveRecommendRecordsService activeRecommendRecordsService;
/**
- * 分页查询所有数据
+ * 小程序端查询邀请记录
* @param pageNo
* @param pageSize
* @param activeRecommendRecords
@@ -44,7 +41,16 @@ public class ActiveRecommendRecordsController extends BaseController {
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@Param("activeRecommendRecords") ActiveRecommendRecords activeRecommendRecords) {
Page page = new Page(pageNo, pageSize);
- return getSuccessResult(this.activeRecommendRecordsService.page(page, new QueryWrapper<>(activeRecommendRecords)));
+ return getSuccessResult(this.activeRecommendRecordsService.select(page, activeRecommendRecords));
+ }
+
+ /**
+ * 小程序端查询券总额
+ * @return
+ */
+ @GetMapping("selectAllAmount")
+ public ResponseObject selectAllAmount() {
+ return getSuccessResult(this.activeRecommendRecordsService.selectAllAmount());
}
/**
@@ -59,14 +65,13 @@ public class ActiveRecommendRecordsController extends BaseController {
}
/**
- * 新增数据
- *
+ * 新增邀请记录接口
* @param activeRecommendRecords 实体对象
* @return 新增结果
*/
@PostMapping
public ResponseObject insert(@RequestBody ActiveRecommendRecords activeRecommendRecords) {
- return getSuccessResult(this.activeRecommendRecordsService.save(activeRecommendRecords));
+ return getSuccessResult(this.activeRecommendRecordsService.add(activeRecommendRecords));
}
/**
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommendRecords.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommendRecords.java
index 9de2253b3..de9da036c 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommendRecords.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommendRecords.java
@@ -1,7 +1,13 @@
package com.fuint.business.marketingActivity.activeRecommend.entity;
import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+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;
/**
@@ -11,8 +17,10 @@ import java.io.Serializable;
* @since 2023-12-20 14:13:16
*/
@SuppressWarnings("serial")
+@Data
public class ActiveRecommendRecords extends Model {
//主键id
+ @TableId(type = IdType.AUTO)
private Integer id;
//活动id
private Integer activeNewlywedsId;
@@ -24,13 +32,17 @@ public class ActiveRecommendRecords extends Model {
private String userId;
//被邀请人id
private String inviteeUserId;
+ //被邀请人姓名
+ private String inviteeUserName;
//创建者
private String createBy;
//创建时间
+ @JsonFormat(pattern = "yyyy-MM-dd ")
private Date createTime;
//更新者
private String updateBy;
//更新时间
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java
index af06d3de9..9c9957f34 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java
@@ -1,5 +1,7 @@
package com.fuint.business.marketingActivity.activeRecommend.service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendRecords;
@@ -11,5 +13,25 @@ import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecomme
*/
public interface ActiveRecommendRecordsService extends IService {
+ /**
+ * 小程序端查询邀请记录
+ * @param page
+ * @param activeRecommendRecords
+ * @return
+ */
+ IPage select(Page page, ActiveRecommendRecords activeRecommendRecords);
+
+ /**
+ * 小程序端查询券总额
+ * @return
+ */
+ double selectAllAmount();
+
+ /**
+ * 新增邀请记录接口
+ * @param activeRecommendRecords
+ * @return
+ */
+ boolean add(ActiveRecommendRecords activeRecommendRecords);
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java
index 31a3a97f4..5a493dce4 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java
@@ -1,11 +1,27 @@
package com.fuint.business.marketingActivity.activeRecommend.service.impl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendChild;
import com.fuint.business.marketingActivity.activeRecommend.mapper.ActiveRecommendRecordsMapper;
import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendRecords;
import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendRecordsService;
+import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendService;
+import com.fuint.business.marketingActivity.activeRecommend.vo.ActiveRecommendRecordsVO;
+import com.fuint.business.marketingActivity.activeRecommend.vo.ActiveRecommendVO;
+import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService;
+import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.util.TokenUtil;
+import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.stream.Collectors;
+
/**
* 邀请有礼记录表(ActiveRecommendRecords)表服务实现类
*
@@ -15,5 +31,108 @@ import org.springframework.stereotype.Service;
@Service("activeRecommendRecordsService")
public class ActiveRecommendRecordsServiceImpl extends ServiceImpl implements ActiveRecommendRecordsService {
+ @Resource
+ private ActiveRecommendService activeRecommendService;
+ @Resource
+ private CardFavorableService cardFavorableService;
+ /**
+ * 小程序端查询邀请记录
+ * @param page
+ * @param activeRecommendRecords
+ * @return
+ */
+ @Override
+ public IPage select(Page page, ActiveRecommendRecords activeRecommendRecords) {
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ Integer userId = nowAccountInfo.getId();
+ Integer storeId = nowAccountInfo.getStoreId();
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(ActiveRecommendRecords::getUserId,userId);
+ queryWrapper.eq(ActiveRecommendRecords::getStoreId,storeId);
+ /*IPage page1 = page(page, queryWrapper);
+ List records = page1.getRecords();
+ List collect = records.stream().map(s -> {
+ ActiveRecommendRecordsVO activeRecommendRecordsVO = new ActiveRecommendRecordsVO();
+
+ s.getActiveNewlywedsId()
+ BeanUtils.copyProperties(s, activeRecommendRecordsVO);
+ return activeRecommendRecordsVO;
+ }).collect(Collectors.toList());
+ page1.setRecords(collect);*/
+ /*//券总额
+ double discountAmount = 0.0;
+ //推荐有礼活动
+ ActiveRecommendVO activeRecommendVO = activeRecommendService.getOneById(1);
+ //活动所送推荐人的优惠券
+ List activeRecommendChildList = activeRecommendVO.getActiveRecommendChildList();
+ if(CollectionUtils.isNotEmpty(activeRecommendChildList)){
+ for (ActiveRecommendChild activeRecommendChild : activeRecommendChildList) {
+ if (activeRecommendChild.getActiveGift().equals("0")){
+ //券数量
+ Integer giftCardTotal = activeRecommendChild.getGiftCardTotal();
+ //券id
+ Integer vouchersId = activeRecommendChild.getVouchersId();
+ //券总额
+ discountAmount += (cardFavorableService.getById(vouchersId).getDiscountAmount() * giftCardTotal);
+ }
+ }
+ }
+ IPage page1 = page(page, queryWrapper);
+ List records = page1.getRecords();*/
+ return page(page, queryWrapper);
+ }
+
+ @Override
+ public double selectAllAmount() {
+ //券总额
+ double discountAmount = 0.0;
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ Integer userId = nowAccountInfo.getId();
+ Integer storeId = nowAccountInfo.getStoreId();
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(ActiveRecommendRecords::getUserId,userId);
+ queryWrapper.eq(ActiveRecommendRecords::getStoreId,storeId);
+ List list = list(queryWrapper);
+ if (CollectionUtils.isNotEmpty(list)){
+ //邀请人数
+ int size = list.size();
+ //推荐有礼活动
+ ActiveRecommendVO activeRecommendVO = activeRecommendService.getOneById(1);
+ //活动所送推荐人的优惠券
+ List activeRecommendChildList = activeRecommendVO.getActiveRecommendChildList();
+ if(CollectionUtils.isNotEmpty(activeRecommendChildList)){
+ for (ActiveRecommendChild activeRecommendChild : activeRecommendChildList) {
+ if (activeRecommendChild.getActiveGift().equals("1")){
+ //券数量
+ Integer giftCardTotal = activeRecommendChild.getGiftCardTotal();
+ //券id
+ Integer vouchersId = activeRecommendChild.getVouchersId();
+ //券总额
+ discountAmount += (cardFavorableService.getById(vouchersId).getDiscountAmount() * giftCardTotal * size);
+ }
+ }
+ }
+ }
+ return discountAmount;
+ }
+
+ /**
+ * 新增邀请记录接口
+ * @param activeRecommendRecords
+ * @return
+ */
+ @Override
+ public boolean add(ActiveRecommendRecords activeRecommendRecords) {
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ Integer userId = nowAccountInfo.getId();
+ Integer storeId = nowAccountInfo.getStoreId();
+ //邀请人id TODO
+ activeRecommendRecords.setUserId(userId.toString());
+ activeRecommendRecords.setStoreId(storeId);
+ //被邀请人id
+ activeRecommendRecords.setInviteeUserId(userId.toString());
+ activeRecommendRecords.setInviteeUserName(nowAccountInfo.getRealName());
+ return save(activeRecommendRecords);
+ }
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendServiceImpl.java
index 9e9445459..073a350dc 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendServiceImpl.java
@@ -197,9 +197,13 @@ public class ActiveRecommendServiceImpl extends ServiceImpl idList) {
+ return getSuccessResult(this.cardFavorableRecordService.drawDown(idList));
+ }
+
+ /**
+ * 小程序端判断是否领取优惠券
+ * @return 新增结果
+ */
+ @GetMapping("isDrawDown")
+ public ResponseObject isDrawDown() {
+ return getSuccessResult(this.cardFavorableRecordService.isDrawDown());
+ }
+
/**
* 修改数据
*
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/CardFavorableRecordService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/CardFavorableRecordService.java
index fca3063fa..337b0c8d1 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/CardFavorableRecordService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/CardFavorableRecordService.java
@@ -7,6 +7,7 @@ import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRe
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO;
import java.io.Serializable;
+import java.util.List;
import java.util.Map;
/**
@@ -34,5 +35,17 @@ public interface CardFavorableRecordService extends IService selectCount(CardFavorableRecord cardFavorableRecord);
+ /**
+ * 小程序端优惠券领取接口
+ * @param idList
+ * @return
+ */
+ boolean drawDown(List idList);
+
+ /**
+ * 小程序端判断是否领取优惠券
+ * @return
+ */
+ boolean isDrawDown();
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java
index 5aa184c39..cb5898ce3 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java
@@ -2,6 +2,7 @@ package com.fuint.business.marketingActivity.cardFavorable.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
@@ -9,6 +10,9 @@ import com.fuint.business.marketingActivity.cardFavorable.mapper.CardFavorableRe
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO;
+import com.fuint.business.userManager.service.LJUserService;
+import com.fuint.business.userManager.vo.LJUserVo;
+import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service;
@@ -30,6 +34,8 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl idList) {
+ boolean save = false;
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ Integer userId = nowAccountInfo.getId();
+ LJUserVo ljUserVo = userService.selectUserById(userId);
+ //优惠券
+ for (Integer id : idList) {
+ CardFavorableRecord cardFavorableRecord = new CardFavorableRecord();
+ cardFavorableRecord.setCardFavorableId(id);
+ cardFavorableRecord.setChainStorId(nowAccountInfo.getChainStoreId());
+ cardFavorableRecord.setStoreId(nowAccountInfo.getStoreId());
+ cardFavorableRecord.setMtUserId(userId);
+ cardFavorableRecord.setName(ljUserVo.getName());
+ cardFavorableRecord.setMobile(ljUserVo.getMobile());
+ cardFavorableRecord.setName(nowAccountInfo.getRealName());
+ cardFavorableRecord.setExchangeFrom("店铺发券");
+ save = save(cardFavorableRecord);
+ }
+ return save;
+ }
+
+ /**
+ * 小程序端判断是否领取优惠券
+ * @return
+ */
+ @Override
+ public boolean isDrawDown() {
+ boolean isDrawDown = false;
+ //登录用户信息
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(CardFavorableRecord::getMtUserId,nowAccountInfo.getId());
+ queryWrapper.eq(CardFavorableRecord::getStoreId,nowAccountInfo.getStoreId());
+ //如果领过券 就不让领了
+ List list = list(queryWrapper);
+ if (CollectionUtils.isNotEmpty(list) && list.size() == 0){
+ isDrawDown = true;
+ }
+ return isDrawDown;
+ }
}
diff --git a/gasStation-uni/pages/index/index.vue b/gasStation-uni/pages/index/index.vue
index 1753e0357..ec2ae5b13 100644
--- a/gasStation-uni/pages/index/index.vue
+++ b/gasStation-uni/pages/index/index.vue
@@ -104,7 +104,7 @@
-
+
立即领取
@@ -122,9 +122,10 @@
export default {
data() {
return {
+ joinmsg: '',
msg: "1",
show: false,
- shows: true,
+ shows: '',
title: '',
oilTypeList: '',
columns: [
@@ -184,12 +185,66 @@
this.getOilType();
},
onShow() {
+ this.isJoined()
// this.isExistStoreId();
},
components: {
tabbar
},
methods: {
+ //判断是否是新人
+ isJoined() {
+ request({
+ url: 'business/marketingActivity/activeNewlywedsRecords/applet',
+ method: 'get',
+ }).then(res => {
+ console.log("11111" + res)
+ if (res.code == 200 && res.data == 1) {
+ this.shows = true
+ } else {
+ this.shows = false
+ }
+ })
+ },
+ //立即领取
+ drawDown() {
+ /* this.shows = false */
+ request({
+ url: 'business/marketingActivity/activeNewlywedsRecords',
+ method: 'post',
+ data: {
+
+ }
+ }).then(res => {
+ console.log("11111" + res)
+ if (res.code == 200 && res.data == true) {
+ this.shows = false
+ uni.showToast({
+ title: '领取成功!'
+ })
+ } else {
+ this.shows = false
+ uni.showToast({
+ title: '领取失败!'
+ })
+ }
+
+ /* if (res.code == 200 && res.data == 1) {
+ this.shows = true
+ } else {
+ this.shows = false
+ } */
+ })
+ },
+ //查询新人有礼礼品
+ selectActiveNewlyweds() {
+ request({
+ url: 'business/marketingActivity/activeNewlyweds/applet',
+ method: 'get',
+ }).then(res => {
+ console.log("11111" + res)
+ })
+ },
isExistStoreId() {
if (uni.getStorageSync("storeId") != "") {
this.getStore(uni.getStorageSync("storeId"));
@@ -243,7 +298,8 @@
_this.welfare.push(response.data.welfare)
}
}
- if (response.data.doorstepPhoto != undefined && response.data.doorstepPhoto != null && response.data.doorstepPhoto != ""){
+ if (response.data.doorstepPhoto != undefined && response.data
+ .doorstepPhoto != null && response.data.doorstepPhoto != "") {
let list = JSON.parse(response.data.doorstepPhoto)
_this.list3 = [];
list.forEach(item => {
@@ -275,14 +331,18 @@
"lat": res.latitude
},
}).then((response) => {
- _this.distance = (Math.ceil(response.data.distance)).toFixed(1)
+ _this.distance = (Math.ceil(response.data.distance))
+ .toFixed(1)
_this.store = response.data.store
uni.setStorageSync("storeId", response.data.store.id)
- uni.setStorageSync("chainStoreId", response.data.store.chainStoreId)
+ uni.setStorageSync("chainStoreId", response.data.store
+ .chainStoreId)
let welfare = response.data.store.welfare
- if (welfare != undefined && welfare != null && welfare != "") {
+ if (welfare != undefined && welfare != null &&
+ welfare != "") {
if (welfare.includes(",")) {
- _this.welfare = response.data.store.welfare.split(",")
+ _this.welfare = response.data.store.welfare
+ .split(",")
} else {
_this.welfare.push(response.data.store.welfare)
}
@@ -349,12 +409,13 @@
cancel() {
this.show = false
},
- onOverlay() {
+ /* onOverlay() {
+ this.drawDown();
this.shows = false
uni.showToast({
title: '领取成功'
})
- },
+ }, */
goActivity() {
// 去活动页
uni.navigateTo({
@@ -674,4 +735,4 @@
color: white;
margin: 0 auto;
}
-
+
\ No newline at end of file
diff --git a/gasStation-uni/pages/my/my.vue b/gasStation-uni/pages/my/my.vue
index e1f8055ee..6662e6e09 100644
--- a/gasStation-uni/pages/my/my.vue
+++ b/gasStation-uni/pages/my/my.vue
@@ -266,9 +266,10 @@
// console.log(res,111222)
if (res.code == 200) {
this.cardBalance = res.data.cardBalance,
- if (res.data.refuelMoney!=null && res.data.refuelMoney!=""){
+ /* if (res.data.refuelMoney!=null && res.data.refuelMoney!=""){
+ this.refuelMoney = JSON.parse(res.data.refuelMoney);
+ } */
this.refuelMoney = JSON.parse(res.data.refuelMoney);
- }
}
})
},
@@ -293,7 +294,7 @@
chainStoreId: this.chainStoreId
}
}).then((res) => {
- if (res.code == 200 && res.data!=null) {
+ if (res.code == 200 && res.data != null) {
this.myPoints = res.data.points
}
})
diff --git a/gasStation-uni/pagesHome/activeIn/index.vue b/gasStation-uni/pagesHome/activeIn/index.vue
index 9aaf11b90..f27f34cfd 100644
--- a/gasStation-uni/pagesHome/activeIn/index.vue
+++ b/gasStation-uni/pagesHome/activeIn/index.vue
@@ -158,7 +158,7 @@
-
+
去参与
-
+
+
+ {{item.createTime}}
@@ -62,9 +65,12 @@
+
+
\ No newline at end of file