From ffeb4a4254441937194e1d1674bcff0412a28207 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Mon, 18 Dec 2023 18:44:02 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E5=BA=97=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fuintAdmin/src/api/staff/store.js | 2 +- .../src/components/ImageUpload/index.vue | 14 +- fuintAdmin/src/components/map/imgUpload.vue | 237 ++++++++++++++++++ .../src/components/map/mapComponent.vue | 2 +- .../src/views/staff/storeInfo/index.vue | 47 ++++ fuintAdmin/src/views/userGrade/index.vue | 17 +- .../fuint/business/store/entity/MtStore.java | 3 + .../controller/LJStoreController.java | 18 +- .../storeInformation/entity/LJStore.java | 9 +- .../service/ILJStoreService.java | 14 +- .../service/impl/LJStoreServiceImpl.java | 13 +- .../ChainStoreConfigController.java | 22 ++ .../controller/LJUserController.java | 8 + .../controller/LJUserGradeController.java | 10 + .../userManager/entity/ChainStoreConfig.java | 23 +- .../service/ChainStoreConfigService.java | 23 ++ .../service/LJUserGradeService.java | 6 + .../service/UserBalanceService.java | 6 + .../impl/ChainStoreConfigServiceImpl.java | 39 +++ .../service/impl/LJUserGradeServiceImpl.java | 16 +- .../service/impl/UserBalanceServiceImpl.java | 9 + .../views/cashier/NewComponents/homeindex.vue | 2 +- gasStation-uni/config.js | 6 +- gasStation-uni/pages/index/index.vue | 8 +- gasStation-uni/pages/refuel/refuel.vue | 59 ++++- gasStation-uni/pagesMy/VIP/vip.vue | 198 +++++++++++++-- gasStation-uni/pagesMy/myorder/myorder.vue | 2 +- .../pagesRefuel/orderDetail/index.vue | 41 ++- 28 files changed, 749 insertions(+), 105 deletions(-) create mode 100644 fuintAdmin/src/components/map/imgUpload.vue diff --git a/fuintAdmin/src/api/staff/store.js b/fuintAdmin/src/api/staff/store.js index edd43dceb..630b4e226 100644 --- a/fuintAdmin/src/api/staff/store.js +++ b/fuintAdmin/src/api/staff/store.js @@ -36,7 +36,7 @@ export function updateStore(data) { // 修改店铺规则信息 export function updateStoreRule(data) { return request({ - url: '/business/storeInformation/store/updateRule', + url: '/business/userManager/chainStoreConfig/updateRule', method: 'post', data: data }) diff --git a/fuintAdmin/src/components/ImageUpload/index.vue b/fuintAdmin/src/components/ImageUpload/index.vue index 8192c87cf..c4744ce69 100644 --- a/fuintAdmin/src/components/ImageUpload/index.vue +++ b/fuintAdmin/src/components/ImageUpload/index.vue @@ -76,7 +76,7 @@ export default { dialogImageUrl: "", dialogVisible: false, hideUpload: false, - baseUrl: process.env.VUE_APP_BASE_API, + baseUrl: process.env.VUE_APP_SERVER_URL, uploadImgUrl: process.env.VUE_APP_SERVER_URL + 'backendApi/file/upload', // 上传的图片服务器地址 headers: { 'Access-Token': getToken() @@ -123,16 +123,20 @@ export default { if(findex > -1) { this.fileList.splice(findex, 1); this.$emit("input", this.listToString(this.fileList)); + // this.dialogImageUrl = this.listToString(this.fileList) + // this.dialogVisible = true; } }, // 上传成功回调 handleUploadSuccess(res) { - this.uploadList.push({ name: res.fileName, url: res.fileName }); + this.uploadList.push({ name: res.data.fileName, url: res.data.fileName }); if (this.uploadList.length === this.number) { this.fileList = this.fileList.concat(this.uploadList); this.uploadList = []; this.number = 0; this.$emit("input", this.listToString(this.fileList)); + // this.dialogImageUrl = this.listToString(this.fileList) + // this.dialogVisible = true; this.$modal.closeLoading(); } }, @@ -178,6 +182,7 @@ export default { }, // 预览 handlePictureCardPreview(file) { + console.log(file,111) this.dialogImageUrl = file.url; this.dialogVisible = true; }, @@ -186,8 +191,11 @@ export default { let strs = ""; separator = separator || ","; for (let i in list) { - strs += list[i].url.replace(this.baseUrl, "") + separator; + // console.log(list[i].url,separator) + // strs += list[i].url.replace(this.baseUrl, "") + separator; + strs += this.baseUrl + list[i].url + separator; } + // this.dialogImageUrl = strs return strs != '' ? strs.substr(0, strs.length - 1) : ''; } } diff --git a/fuintAdmin/src/components/map/imgUpload.vue b/fuintAdmin/src/components/map/imgUpload.vue new file mode 100644 index 000000000..5a3daf29c --- /dev/null +++ b/fuintAdmin/src/components/map/imgUpload.vue @@ -0,0 +1,237 @@ + + + + + diff --git a/fuintAdmin/src/components/map/mapComponent.vue b/fuintAdmin/src/components/map/mapComponent.vue index 1543c6bb9..c0b4ba933 100644 --- a/fuintAdmin/src/components/map/mapComponent.vue +++ b/fuintAdmin/src/components/map/mapComponent.vue @@ -18,7 +18,7 @@

详细地址:

diff --git a/fuintAdmin/src/views/staff/storeInfo/index.vue b/fuintAdmin/src/views/staff/storeInfo/index.vue index 4c7d89b86..6dc9d6b53 100644 --- a/fuintAdmin/src/views/staff/storeInfo/index.vue +++ b/fuintAdmin/src/views/staff/storeInfo/index.vue @@ -4,6 +4,16 @@
{{ store.name }}{{store.description? "("+store.description+")":"" }}
+ +
+ 店铺logo: + +
+ +
+ 门头照: + +
@@ -51,10 +61,15 @@ import html2canvas from "html2canvas"; 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 { components:{ mapComponment, + imgUpload, + imgUpload1, }, name: "map-view", dicts: ['store_welfare'], @@ -65,6 +80,20 @@ 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, + // 上传文件列表 + uploadFiles: [ + {name:"nihao", + url:'http://192.168.1.4:8080/static/uploadImages/20231218/c4b1c4fc7cfc4dd4a4acf1e922cacc86.png'} + ], // 门店二维码 collectionImg:'', // 收款二维码 @@ -102,6 +131,23 @@ export default { this.getForm() }, methods: { + handleUploadSuccessCover(file) { + this.dataForm.coverImage = file.data.fileName; + }, + // 获取图片url地址 + 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 + }, getForm(data){ if (data != undefined){ this.form.lat = data.lat; @@ -113,6 +159,7 @@ export default { getStore() { ljStoreInfo().then(response => { this.store = response.data + console.log(response.data) this.form.lat = this.store.latitude; this.form.lng = this.store.longitude; this.form.address = this.store.address; diff --git a/fuintAdmin/src/views/userGrade/index.vue b/fuintAdmin/src/views/userGrade/index.vue index a86d5096e..f801c236e 100644 --- a/fuintAdmin/src/views/userGrade/index.vue +++ b/fuintAdmin/src/views/userGrade/index.vue @@ -577,9 +577,13 @@ export default { methods: { // 是否开启等级功能 getISEnableLevel(){ - ljStoreInfo().then(response => { + getChainStoreConfig().then(response => { + // console.log(response) this.isEnableLevel = response.data.isEnableLevel; this.clear = response.data.isMonthClear; + this.gasGrowthValue = response.data.gasGrowthValue; + this.dieselGrowthValue = response.data.dieselGrowthValue; + this.naturalGrowthValue = response.data.naturalGrowthValue; if (response.data.isEnableLevel=="no"){ this.level1 = true; this.level2 = false; @@ -663,15 +667,6 @@ export default { getSysConfig('growth_value_rule').then(response => { this.growthValueRule = response.data.split(";") }); - getSysConfig('gas_growth_value').then(response => { - this.gasGrowthValue = response.data - }); - getSysConfig('diesel_growth_value').then(response => { - this.dieselGrowthValue = response.data - }); - getSysConfig('natural_growth_value').then(response => { - this.naturalGrowthValue = response.data - }); }, // 查询连锁店配置信息 getClearConfig(){ @@ -685,8 +680,8 @@ export default { this.map.isMonthClear = this.clear; updateStoreRule(this.map).then(response => { this.$modal.msgSuccess("修改成功"); + this.getISEnableLevel(); }); - this.getISEnableLevel(); }, // 查询列表 getList() { diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/entity/MtStore.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/entity/MtStore.java index 3d2d3bd7c..e5c74ab07 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/entity/MtStore.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/entity/MtStore.java @@ -79,4 +79,7 @@ public class MtStore extends BaseEntity implements Serializable { @ApiModelProperty("福利信息") private String welfare; + + @ApiModelProperty("门头照") + private String doorstepPhoto; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/controller/LJStoreController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/controller/LJStoreController.java index 95361d4ec..c3fdf2b38 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/controller/LJStoreController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/controller/LJStoreController.java @@ -95,13 +95,13 @@ public class LJStoreController extends BaseController { return getSuccessResult(storeService.queryStoreByPosition(map)); } - /** - * 修改等级规则信息 - * @param map - * @return - */ - @PostMapping("/updateRule") - public ResponseObject updateRule(@Validated @RequestBody Map map){ - return getSuccessResult(storeService.updateStoreRule(map)); - } +// /** +// * 修改等级规则信息 +// * @param map +// * @return +// */ +// @PostMapping("/updateRule") +// public ResponseObject updateRule(@Validated @RequestBody Map map){ +// return getSuccessResult(storeService.updateStoreRule(map)); +// } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/entity/LJStore.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/entity/LJStore.java index 1ec71d00b..5e6c544d9 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/entity/LJStore.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/entity/LJStore.java @@ -82,15 +82,12 @@ public class LJStore extends BaseEntity implements Serializable { @ApiModelProperty("福利信息") private String welfare; + @ApiModelProperty("门头照") + private String doorstepPhoto; + @TableField(exist = false) private List welfareList; @TableField(exist = false) private List oilList; - - @ApiModelProperty("是否开启等级规则") - private String isEnableLevel; - - @ApiModelProperty("是否按月清算") - private String isMonthClear; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/ILJStoreService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/ILJStoreService.java index cae565608..4ec2a42e9 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/ILJStoreService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/ILJStoreService.java @@ -56,11 +56,11 @@ public interface ILJStoreService extends IService { * @return */ public int updateStore(LJStore store); - - /** - * 修改店铺规则信息 - * @param map 店铺信息 - * @return - */ - public int updateStoreRule(Map map); +// +// /** +// * 修改店铺规则信息 +// * @param map 店铺信息 +// * @return +// */ +// public int updateStoreRule(Map map); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/LJStoreServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/LJStoreServiceImpl.java index 132dfd489..9c938f5c4 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/LJStoreServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/LJStoreServiceImpl.java @@ -7,6 +7,8 @@ import com.fuint.business.petrolStationManagement.vo.OilNumberNameVo; import com.fuint.business.storeInformation.entity.LJStore; import com.fuint.business.storeInformation.mapper.LJStoreMapper; import com.fuint.business.storeInformation.service.ILJStoreService; +import com.fuint.business.userManager.entity.ChainStoreConfig; +import com.fuint.business.userManager.service.ChainStoreConfigService; import com.fuint.common.dto.AccountInfo; import com.fuint.common.util.StringUtils; import com.fuint.common.util.TokenUtil; @@ -189,15 +191,4 @@ public class LJStoreServiceImpl extends ServiceImpl impl int row = baseMapper.updateById(store); return row; } - - @Override - public int updateStoreRule(Map map) { - String isEnableLevel = map.get("isEnableLevel"); - String isMonthClear = map.get("isMonthClear"); - LJStore store = this.selectStoreById(); - store.setIsEnableLevel(isEnableLevel); - store.setIsMonthClear(isMonthClear); - int row = baseMapper.updateById(store); - return row; - } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/ChainStoreConfigController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/ChainStoreConfigController.java index 545649453..4e02d1906 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/ChainStoreConfigController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/ChainStoreConfigController.java @@ -8,6 +8,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.util.Map; + /** * 连锁店配置信息 controller层 */ @@ -46,4 +48,24 @@ public class ChainStoreConfigController extends BaseController { public ResponseObject edit(@Validated @RequestBody ChainStoreConfig chainStoreConfig){ return getSuccessResult(chainStoreConfigService.updateChainStoreConfig(chainStoreConfig)); } + + /** + * 修改等级规则信息 + * @param map + * @return + */ + @PostMapping("/updateRule") + public ResponseObject updateRule(@Validated @RequestBody Map map){ + return getSuccessResult(chainStoreConfigService.updateChainStoreConfigByRule(map)); + } + + /** + * 根据店铺id查询连锁店配置信息 + * @param storeId + * @return + */ + @GetMapping("/{storeId}") + public ResponseObject queryChainStoreConfig(@PathVariable Integer storeId){ + return getSuccessResult(chainStoreConfigService.selectChainStoreByStoreId(storeId)); + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java index 67a7ebe91..652c5d028 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java @@ -91,6 +91,14 @@ public class LJUserController extends BaseController { return getSuccessResult(user); } + /** + * 根据用户id 店铺id查询用户余额信息 + * @return + */ + @GetMapping("/userBalanceByUserId") + public ResponseObject getUserBalanceByUserId(){ + return getSuccessResult(userBalanceService.selectUserBalanceByUserId()); + } /** * 根据手机号查询会员信息 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserGradeController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserGradeController.java index 47f175df0..5fd7678dd 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserGradeController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserGradeController.java @@ -46,6 +46,16 @@ public class LJUserGradeController extends BaseController { return getSuccessResult(userGradeService.selectUserGradeAll()); } + /** + * 根据店铺id查询会员等级信息 + * @param storeId + * @return + */ + @GetMapping("/getGradeList/{storeId}") + public ResponseObject gradeList(@PathVariable Integer storeId){ + return getSuccessResult(userGradeService.selectUserGradeAllByStoreId(storeId)); + } + /** * 根据id查询会员等级信息 * @param id diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/entity/ChainStoreConfig.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/entity/ChainStoreConfig.java index b64c5084a..4916d20bd 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/entity/ChainStoreConfig.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/entity/ChainStoreConfig.java @@ -31,9 +31,26 @@ public class ChainStoreConfig extends BaseEntity implements Serializable { @ApiModelProperty("连锁店id") private Integer chainStoreId; - - @ApiModelProperty("等级清算规则") - private String levelClearRule; + /** + * 是否开启等级规则 + */ + private String isEnableLevel; + /** + * 是否按月清算 + */ + private String isMonthClear; + /** + *汽油消费1元增加多少成长值 + */ + private String gasGrowthValue; + /** + *柴油消费1元增加多少成长值 + */ + private String dieselGrowthValue; + /** + *天然气消费1元增加多少成长值 + */ + private String naturalGrowthValue; /** * 微信小程序 (配置信息) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/ChainStoreConfigService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/ChainStoreConfigService.java index bb08e3aee..82c4fd8d5 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/ChainStoreConfigService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/ChainStoreConfigService.java @@ -3,6 +3,8 @@ package com.fuint.business.userManager.service; import com.baomidou.mybatisplus.extension.service.IService; import com.fuint.business.userManager.entity.ChainStoreConfig; +import java.util.Map; + /** * 连锁店配置信息 业务层 */ @@ -21,4 +23,25 @@ public interface ChainStoreConfigService extends IService { * @return */ public int updateChainStoreConfig(ChainStoreConfig chainStoreConfig); + + /** + * 根据id查询连锁店配置信息 + * @param id + * @return + */ + public ChainStoreConfig selectChainStoreById(int id); + + /** + * 修改连锁店等级规则信息 + * @param map + * @return + */ + public int updateChainStoreConfigByRule(Map map); + + /** + * 根据店铺id查询连锁店配置信息 + * @param storeId + * @return + */ + public ChainStoreConfig selectChainStoreByStoreId(int storeId); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserGradeService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserGradeService.java index 6c9a74492..f18609a4a 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserGradeService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserGradeService.java @@ -25,6 +25,12 @@ public interface LJUserGradeService extends IService { */ public List selectUserGradeAll(); + /** + * 根据店铺id查询所有会员等级信息 + * @return + */ + public List selectUserGradeAllByStoreId(int storeId); + /** * 根据id查询会员等级信息 * @param id diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/UserBalanceService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/UserBalanceService.java index e3008e931..60ed6086f 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/UserBalanceService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/UserBalanceService.java @@ -37,6 +37,12 @@ public interface UserBalanceService extends IService { /** * 根据用户id和店铺id查询用户余额信息 + * @return + */ + public UserBalance selectUserBalanceByUserId(); + + /** + * 根据用户id和连锁店id查询用户余额信息 * @param userId * @return */ diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/ChainStoreConfigServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/ChainStoreConfigServiceImpl.java index fd8457e9a..2e0c45b0c 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/ChainStoreConfigServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/ChainStoreConfigServiceImpl.java @@ -1,5 +1,6 @@ package com.fuint.business.userManager.service.impl; +import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -14,6 +15,8 @@ import com.fuint.common.util.TokenUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.Map; + @Service public class ChainStoreConfigServiceImpl extends ServiceImpl implements ChainStoreConfigService { @Autowired @@ -55,4 +58,40 @@ public class ChainStoreConfigServiceImpl extends ServiceImpl(); + queryWrapper.eq("chain_store_id",id); + return baseMapper.selectOne(queryWrapper); + } + + @Override + public int updateChainStoreConfigByRule(Map map) { + String isEnableLevel = map.get("isEnableLevel"); + String isMonthClear = map.get("isMonthClear"); + LJStore store = storeService.selectStoreById(); + ChainStoreConfig chainStoreConfig = this.selectChainStoreById(store.getChainStoreId()); + if (ObjectUtil.isEmpty(chainStoreConfig)){ + ChainStoreConfig chainStoreConfig1 = new ChainStoreConfig(); + chainStoreConfig1.setChainStoreId(store.getChainStoreId()); + chainStoreConfig1.setIsEnableLevel("no"); + chainStoreConfig1.setIsMonthClear("clear_month"); + chainStoreConfig1.setGasGrowthValue("1"); + chainStoreConfig1.setDieselGrowthValue("1"); + chainStoreConfig1.setNaturalGrowthValue("1"); + baseMapper.insert(chainStoreConfig1); + chainStoreConfig = this.selectChainStoreById(store.getChainStoreId()); + } + chainStoreConfig.setIsEnableLevel(isEnableLevel); + chainStoreConfig.setIsMonthClear(isMonthClear); + int row = baseMapper.updateById(chainStoreConfig); + return row; + } + + @Override + public ChainStoreConfig selectChainStoreByStoreId(int storeId) { + LJStore store = storeService.selectStoreByStoreId(storeId); + return baseMapper.selectById(store.getChainStoreId()); + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserGradeServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserGradeServiceImpl.java index a071bc6ea..e763c08db 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserGradeServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserGradeServiceImpl.java @@ -9,8 +9,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.fuint.business.storeInformation.entity.LJStore; import com.fuint.business.storeInformation.service.ILJStoreService; +import com.fuint.business.userManager.entity.ChainStoreConfig; import com.fuint.business.userManager.entity.LJUserGrade; import com.fuint.business.userManager.mapper.LJUserGradeMapper; +import com.fuint.business.userManager.service.ChainStoreConfigService; import com.fuint.business.userManager.service.LJUserGradeService; import com.fuint.common.dto.AccountInfo; import com.fuint.common.util.StringUtils; @@ -51,6 +53,15 @@ public class LJUserGradeServiceImpl extends ServiceImpl selectUserGradeAllByStoreId(int storeId) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("status","qy"); + queryWrapper.eq("store_id",storeId); + queryWrapper.orderByAsc("grade"); + return baseMapper.selectList(queryWrapper); + } + @Override public LJUserGrade selectUserGradeById(int id) { return baseMapper.selectById(id); @@ -58,11 +69,14 @@ public class LJUserGradeServiceImpl extends ServiceImpl(); + queryWrapper.eq("mt_user_id",nowAccountInfo.getId()); + UserBalance balance = baseMapper.selectOne(queryWrapper); + return balance; + } + @Override public UserBalance selectUserBalance(int userId, int chainStoreId) { QueryWrapper queryWrapper = new QueryWrapper<>(); diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue index 0e8eb915b..7027e602f 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue @@ -613,7 +613,7 @@ {{ form.oilPrice }}元/L
- diff --git a/gasStation-uni/config.js b/gasStation-uni/config.js index 0580b0b02..5aa135a87 100644 --- a/gasStation-uni/config.js +++ b/gasStation-uni/config.js @@ -1,8 +1,10 @@ // 应用全局配置 module.exports = { - // baseUrl: 'https://vue.ruoyi.vip/prod-api', - baseUrl: 'http://192.168.0.196:8081/', + // baseUrl: 'http://192.168.0.196:8081/', + baseUrl: 'http://192.168.1.4:8080/', + // baseUrl: 'http://192.168.1.5:8002/cdJdc', + imagesUrl: 'http://www.nuoyunr.com/lananRsc', // 应用信息 appInfo: { diff --git a/gasStation-uni/pages/index/index.vue b/gasStation-uni/pages/index/index.vue index 6559f0a44..358986582 100644 --- a/gasStation-uni/pages/index/index.vue +++ b/gasStation-uni/pages/index/index.vue @@ -170,9 +170,9 @@ staffId = item.split("=")[1] } }) - uni.setStorageSync("inviteStoreId", storeId) + uni.setStorageSync("storeId", storeId) uni.setStorageSync("inviteStaffId", staffId) - this.storeId = uni.getStorageSync("inviteStoreId") + this.storeId = uni.getStorageSync("storeId") this.staffId = uni.getStorageSync("inviteStaffId") } // this.isExistStoreId(); @@ -188,8 +188,8 @@ }, methods: { isExistStoreId() { - if (uni.getStorageSync("inviteStoreId") != "") { - this.getStore(uni.getStorageSync("inviteStoreId")); + if (uni.getStorageSync("storeId") != "") { + this.getStore(uni.getStorageSync("storeId")); } else { this.getAddress(); } diff --git a/gasStation-uni/pages/refuel/refuel.vue b/gasStation-uni/pages/refuel/refuel.vue index 223c08ab4..f82e57553 100644 --- a/gasStation-uni/pages/refuel/refuel.vue +++ b/gasStation-uni/pages/refuel/refuel.vue @@ -165,6 +165,26 @@ components: { tabbar }, + onLoad(query) { + const q = decodeURIComponent(query.q) // 获取到二维码原始链接内容 + if (q == undefined) { + let str = q.split("?")[1]; + let arr = str.split("&"); + let storeId = ""; + let staffId = ""; + arr.forEach(item => { + if (item.includes("storeId")) { + storeId = item.split("=")[1] + } else { + staffId = item.split("=")[1] + } + }) + uni.setStorageSync("storeId", storeId) + uni.setStorageSync("inviteStaffId", staffId) + this.storeId = uni.getStorageSync("storeId") + this.staffId = uni.getStorageSync("inviteStaffId") + } + }, onShow() { // this.isExistStoreId(); this.getStore(uni.getStorageSync("storeId")); @@ -276,6 +296,9 @@ // 跳转订单详情页,并支付 getSIndex(index,id) { this.sindex = index + this.toPayment(id) + }, + toPayment(id){ this.oilOrder.orderAmount = this.value this.oilOrder.storeId = this.storeId this.oilOrder.staffId = id @@ -328,7 +351,11 @@ submitAmount(){ if (this.value!="" && this.qindex!=null){ this.show = false - this.$refs.popup.open('bottom') + if (uni.getStorageSync("inviteStaffId")!=null && uni.getStorageSync("inviteStaffId")!="" && uni.getStorageSync("inviteStaffId")!=undefined){ + this.toPayment(uni.getStorageSync("inviteStaffId")) + }else{ + this.$refs.popup.open('bottom') + } }else{ if (this.value=="") { uni.showToast({ @@ -345,15 +372,35 @@ }, valChange(val) { // 将每次按键的值拼接到value变量中,注意+=写法 - this.value += val; - this.liters = (this.value/this.oilPrice).toFixed(2) - console.log(this.value); + uni.vibrateShort({ + success: function () {} + }); + let index = this.value.indexOf(".") + if(index!=-1){ + if ((this.value.length-index)>=3){ + return; + } + + }else{ + if (this.value.length>=7 && val!="."){ + return; + } + } + this.value += val; + this.liters = (this.value/this.oilPrice).toFixed(2) + // console.log(this.value); }, // 退格键被点击 backspace() { + uni.vibrateShort({ + success: function () {} + }); // 删除value的最后一个字符 - if (this.value.length) this.value = this.value.substr(0, this.value.length - 1); - console.log(this.value); + if (this.value.length) { + this.value = this.value.substr(0, this.value.length - 1); + this.liters = (this.value/this.oilPrice).toFixed(2) + } + // console.log(this.value); } } diff --git a/gasStation-uni/pagesMy/VIP/vip.vue b/gasStation-uni/pagesMy/VIP/vip.vue index 3e8742450..f129b1d28 100644 --- a/gasStation-uni/pagesMy/VIP/vip.vue +++ b/gasStation-uni/pagesMy/VIP/vip.vue @@ -2,7 +2,7 @@ - + 会员 @@ -10,14 +10,22 @@ - + - V{{index}}会员 + {{item.name}} 升级会员享更多特权 - 在获得358可升级至钻石会员 + + + 达到当前等级所需成长值为{{item.growthValue}} + @@ -33,9 +41,9 @@ - + - {{item}} + {{item.name}} @@ -45,25 +53,94 @@ - + - - - 优惠信息 - 每天04:00更新 + + + + 汽油优惠信息 + + + 无优惠 + + + 满减优惠: + + 消费满{{item.gasolineRule1}}元,立减{{item.gasolineRule2}}元 + + + + 每升优惠: + + 消费满{{item.gasolineRule1}}元,每升优惠{{item.gasolineRule3}}元 + + + {{userGrade.gasolineDiscount}} + + 成长规则:每消费1 元加{{chainStoreConfig.gasGrowthValue}}成长值 - - - 每消费200万 元加1%成长值 + + + 柴油优惠信息 + + + 无优惠 + + + 满减优惠: + + 消费满{{item.dieselRule1}}元,立减{{item.dieselRule2}}元 + + + + 每升优惠: + + 消费满{{item.dieselRule1}}元,每升优惠{{item.dieselRule3}}元 + + + {{userGrade.dieselDiscount}} + + 成长规则:每消费1 元加{{chainStoreConfig.dieselGrowthValue}}成长值 + + + + 天然气优惠信息 + + + 无优惠 + + + 满减优惠: + + 消费满{{item.naturalGas1}}元,立减{{item.naturalGas2}}元 + + + + 每升优惠: + + 消费满{{item.naturalGas1}}元,每升优惠{{item.naturalGas3}}元 + + + {{userGrade.naturalGasDiscount}} + + 成长规则:每消费1 元加{{chainStoreConfig.naturalGrowthValue}}成长值 + + +