¥{{ realyPayBills }}
@@ -833,7 +833,7 @@ export default {
cardValueList:[],
cardValueForm: {
cardValueId:'', // 储值卡id
- mtStaffId: '', //
+ mtStaffId: '', //
realName: '',
staffMobile: '',
amount:'', // 自定义充值字段
@@ -859,7 +859,7 @@ export default {
staffMobile: '',
points:'',
remark:'',
- rechargeBalance:'', //实际支付
+ rechargeBalance:'', //实际支付
paymentType:'',
oilType:'',
type:'',
@@ -873,7 +873,7 @@ export default {
realyPayBills:0,
-
+
oilTypeList: {},
isPay:true,
@@ -1247,7 +1247,7 @@ export default {
this.cardValueForm.giftBalance = 0
this.cardValueForm.growthValue = 0
this.cardValueForm.bidBalance = 0
-
+
// this.cardValueForm.bidBalance = 1
this.cardValueForm.amount = 0
@@ -1301,7 +1301,7 @@ export default {
},
async collection(){
-
+
let userForm = this.form
if (this.flag === 1) {
@@ -1325,7 +1325,7 @@ export default {
}
});
let this_ = this
- //
+ //
let timer = setInterval(async () => {
getCheckTheStatusOfYourPaymentApi(id).then(response => {
if (response.data!=null){
@@ -1436,14 +1436,14 @@ export default {
this.isQuery=true,
this.openConfirm = false
this.openRecharge = false
-
+
// this.isPaySuccess = false;
this.authCode = null
this.activeRecharge='balance',
this.cardValueForm = {}
this.cardFuelDieselForm = {}
- },
+ },
// 提交按钮
submitForm: function() {
@@ -1478,7 +1478,7 @@ export default {
this.isPay = true;
this.openConfirm = false
this.openRecharge = false
-
+
this.isPaySuccess = false;
this.authCode = null
this.activeRecharge='balance',
diff --git a/fuintAdmin/src/views/power/payment/index.vue b/fuintAdmin/src/views/power/payment/index.vue
index 10a75292d..4cc542e7e 100644
--- a/fuintAdmin/src/views/power/payment/index.vue
+++ b/fuintAdmin/src/views/power/payment/index.vue
@@ -54,9 +54,9 @@
规则周期
-
- 永久
- 单日
+
+ 永久
+ 单日
功能状态
交易满 -->
交易占比
{{ item.proportion }}
-
%更换支付通道 参与次数
-
不固定次数
+
%更换支付通道
+
编辑
删除
@@ -101,7 +101,9 @@
注:规则按照顺序进行处理并自动更换支付通道,新增或变更规则后需要发布当前规则才生效,发布生效后的规则将从序号1的配置生效
-
+
+
@@ -116,24 +118,24 @@
-
+
%
- 消费笔数满足后切换到下一个支付通道
-
-
-
-
-
-
- 是否限制当前配置在生效期间内的参与次数
+ 交易占比满足规则后切换到下一个支付通道
+
+
+
+
+
+
+
-
-
- 数值越大顺序越在前
-
+
+
+
+
@@ -168,6 +170,8 @@ export default {
merchantList:[],
// 商品规则配置信息
oilConfigList:[],
+ // 规则周期
+ ruleCycle:"singleDay",
form: {
name: '',
region: '',
@@ -179,11 +183,11 @@ export default {
resource: '',
desc: ''
},
- formLabelWidth: '120px',
+ formLabelWidth: '70px',
dialogFormVisible:false,
value:false,
value1:true,
- labelPosition: 'right',
+ labelPosition: 'singleDay',
}
},
created() {
@@ -197,12 +201,15 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
- delOilConfig(id).then( response => {})
- this.$message({
- type: 'success',
- message: '规则数据删除成功'
- });
- this.getList();
+ delOilConfig(id).then( response => {
+ this.$message({
+ type: 'success',
+ message: '规则数据删除成功'
+ });
+ this.getList();
+ this.value1 = true;
+ this.changeStatus1();
+ })
}).catch(() => {});
},
// 添加商户信息
@@ -270,20 +277,50 @@ export default {
// 修改启用状态
changeStatus(){
if (this.value){
- this.value1 = false;
- isOpenOilConfig(1).then( response => {})
+ isOpenOilConfig({isOpen:1,ruleCycle:this.ruleCycle}).then( response => {
+ if (response.data!=1){
+ this.$message({
+ type: 'error',
+ message: '支付通道切换失败,请确保交易占比相加满足百分之百'
+ });
+ this.value = false;
+ this.value1 = true;
+ }else {
+ this.$message({
+ type: 'success',
+ message: '发布成功!'
+ });
+ this.value1 = false;
+ }
+ })
}else {
- this.value1 = true;
- isOpenOilConfig(0).then( response => {})
+ isOpenOilConfig({isOpen:0,ruleCycle:this.ruleCycle}).then( response => {
+ this.value1 = true;
+ })
}
},
changeStatus1(){
if (this.value1){
- this.value = false;
- isOpenOilConfig(0).then( response => {})
+ isOpenOilConfig({isOpen:0,ruleCycle:this.ruleCycle}).then( response => {
+ this.value = false;
+ })
}else {
- this.value = true;
- isOpenOilConfig(1).then( response => {})
+ isOpenOilConfig({isOpen:1,ruleCycle:this.ruleCycle}).then( response => {
+ if (response.data!=1){
+ this.$message({
+ type: 'error',
+ message: '支付通道切换失败,请确保交易占比相加满足百分之百'
+ });
+ this.value = false;
+ this.value1 = true;
+ }else {
+ this.$message({
+ type: 'success',
+ message: '发布成功!'
+ });
+ this.value = true;
+ }
+ })
}
},
// 修改商户使用状态
@@ -294,12 +331,13 @@ export default {
type: 'warning'
}).then(() => {
data.isUse = isUse
- editMerchant(data).then( response => {})
- this.$message({
- type: 'success',
- message: '支付通道切换成功,已实时切换为商户号('+data.mchntCd+')'
- });
- this.getList();
+ editMerchant(data).then( response => {
+ this.getList();
+ this.$message({
+ type: 'success',
+ message: '支付通道切换成功,已实时切换为商户号('+data.mchntCd+')'
+ });
+ })
}).catch(() => {});
},
// 获取商户列表信息
@@ -323,10 +361,8 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
- this.$message({
- type: 'success',
- message: '发布成功!'
- });
+ this.value1 = false;
+ this.changeStatus1()
}).catch(() => {
this.$message({
type: 'info',
diff --git a/fuintAdmin/src/views/staff/list.vue b/fuintAdmin/src/views/staff/list.vue
index b9d64c543..ed870a883 100644
--- a/fuintAdmin/src/views/staff/list.vue
+++ b/fuintAdmin/src/views/staff/list.vue
@@ -642,7 +642,7 @@ export default {
],
mobile: [
{ required: true, message: "手机号不能为空", trigger: "blur" },
- { min: 11, max: 20, message: '手机号长度必须11', trigger: 'blur' },
+ { min: 6, max: 13, message: '手机号不正确', trigger: 'blur' }
],
roleId: [
{ required: true, message: "请选择员工角色", trigger: "blur" }
diff --git a/fuintAdmin/src/views/staff/storeInfo/index.vue b/fuintAdmin/src/views/staff/storeInfo/index.vue
index 8bbf632e0..4c7d89b86 100644
--- a/fuintAdmin/src/views/staff/storeInfo/index.vue
+++ b/fuintAdmin/src/views/staff/storeInfo/index.vue
@@ -2,7 +2,7 @@
- {{ store.oilStationName }}({{ store.description }})
+ {{ store.name }}{{store.description? "("+store.description+")":"" }}
@@ -116,7 +116,9 @@ export default {
this.form.lat = this.store.latitude;
this.form.lng = this.store.longitude;
this.form.address = this.store.address;
- this.welfare = this.store.welfare.split(",")
+ if (this.store.welfare!=null){
+ this.welfare = this.store.welfare.split(",")
+ }
this.$refs.mapRef.initAMap();
})
},
@@ -157,17 +159,19 @@ export default {
light: "#fff"//背景色
}
};
- //this.QRlink 生成的二维码地址url
- QRCode.toDataURL(this.qrcode[0].collection, opts , (err, url) => {
- if (err) throw err
- //将生成的二维码路径复制给data的QRImgUrl
- this.collectionImg= url
- })
- QRCode.toDataURL(this.qrcode[0].payment, opts , (err, url) => {
- if (err) throw err
- //将生成的二维码路径复制给data的QRImgUrl
- this.paymentImg= url
- })
+ if (this.qrcode.length > 0){
+ //this.QRlink 生成的二维码地址url
+ QRCode.toDataURL(this.qrcode[0].collection, opts , (err, url) => {
+ if (err) throw err
+ //将生成的二维码路径复制给data的QRImgUrl
+ this.collectionImg= url
+ })
+ QRCode.toDataURL(this.qrcode[0].payment, opts , (err, url) => {
+ if (err) throw err
+ //将生成的二维码路径复制给data的QRImgUrl
+ this.paymentImg= url
+ })
+ }
},
// 根据dom生成图片并下载到本地
handleDownloadqrCode(id) {
diff --git a/fuintAdmin/src/views/userGrade/index.vue b/fuintAdmin/src/views/userGrade/index.vue
index f8c175994..420e1a7fb 100644
--- a/fuintAdmin/src/views/userGrade/index.vue
+++ b/fuintAdmin/src/views/userGrade/index.vue
@@ -456,6 +456,8 @@ export default {
return {
level1:true,
level2:false,
+ // 是否开启等级功能
+ isEnableLevel:"",
// 优惠值
gasolinePreferential:[
{
@@ -564,16 +566,21 @@ export default {
this.getList();
this.getClearConfig();
this.getRule();
+ this.getISEnableLevel();
},
methods: {
- checkName(rule, value, callback){
- queryUserGrade({name:this.form.name}).then( response => {
- if(response.data!=null){
- callback(new Error("会员等级名称已存在"))
+ // 是否开启等级功能
+ getISEnableLevel(){
+ getSysConfig('is_enable_level').then(response => {
+ this.isEnableLevel = response.data
+ if (response.data=="no"){
+ this.level1 = true;
+ this.level2 = false;
}else {
- callback();
+ this.level1 = false;
+ this.level2 = true;
}
- })
+ });
},
editLevel1(){
this.level1 = false;
@@ -744,7 +751,7 @@ export default {
this.reset();
},
// 提交按钮
- submitForm: function() {
+ submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.form.gasolineRule = JSON.stringify(this.gasolinePreferential)
@@ -761,19 +768,17 @@ export default {
if(response.data!=null){
this.$modal.msgError("会员等级名称已存在");
}else {
- addUserGrade(this.form).then(response => {
- this.$modal.msgSuccess("新增成功");
- this.open = false;
- this.getList();
+ addUserGrade(this.form).then(res => {
+ if (res.data==1){
+ this.$modal.msgSuccess("新增成功");
+ this.open = false;
+ this.getList();
+ }else {
+ this.$modal.msgError("新增失败,最多支持20个等级");
+ }
});
}
})
-
- // saveUserGrade(this.form).then(response => {
- // this.$modal.msgSuccess("新增成功");
- // this.open = false;
- // this.getList();
- // });
}
}
});
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/OilConfigController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/OilConfigController.java
index 859d5b64f..84d40d8ea 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/OilConfigController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/OilConfigController.java
@@ -10,6 +10,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层
*/
@@ -32,17 +34,28 @@ public class OilConfigController extends BaseController {
/**
* 查看支付配置规则是否开启
- * @param isOpen
+ * @param map
* @return
*/
- @GetMapping("/{isOpen}")
- public ResponseObject isOpen(@PathVariable String isOpen){
+ @PostMapping("/isOpen")
+ public ResponseObject isOpen(@Validated @RequestBody Map map){
+ String isOpen = map.get("isOpen");
+ String ruleCycle = map.get("ruleCycle");
+// 2 代表不启用规则
+ int result = 2;
+// isOpen=1开启规则
if (isOpen.equals("1")){
- oilConfigService.oilRule();
+ result = oilConfigService.judgmentProportion();
+ if (result==1){
+ oilConfigService.oilRule();
+// 开启定时关闭规则
+ oilConfigService.ruleCycle(ruleCycle);
+ }
}else {
+// 不开启规则
merchantConfigService.updateMerchIsOpen("0");
}
- return getSuccessResult(0);
+ return getSuccessResult(result);
}
/**
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/entity/OilConfig.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/entity/OilConfig.java
index 8f4302d83..4d6908c4a 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/entity/OilConfig.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/entity/OilConfig.java
@@ -38,6 +38,10 @@ public class OilConfig extends BaseEntity implements Serializable {
* 交易占比
*/
private Integer proportion;
+ /**
+ * 规则周期
+ */
+ private String ruleCycle;
/**
* key值
*/
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/OilConfigService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/OilConfigService.java
index bf7de6c26..53f4b6946 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/OilConfigService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/OilConfigService.java
@@ -15,6 +15,17 @@ public interface OilConfigService extends IService {
*/
public void oilRule();
+ /**
+ * 判断占比相加是否为100% 是返回1 不是返回0
+ * @return
+ */
+ public int judgmentProportion();
+
+ /**
+ * 规则周期是否为当日
+ */
+ public void ruleCycle(String ruleCycle);
+
/**
* 查询油品配置信息
* @return
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/OilConfigServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/OilConfigServiceImpl.java
index 0093a9e39..fa74b1b2b 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/OilConfigServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/OilConfigServiceImpl.java
@@ -12,6 +12,7 @@ import com.fuint.api.fuyou.vo.OilConfigVo;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.config.ScheduledTaskRegistrar;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
@@ -59,6 +60,28 @@ public class OilConfigServiceImpl extends ServiceImpl list = baseMapper.selectList(null);
+ for (OilConfig config : list) {
+ percentage += config.getProportion();
+ }
+ if (percentage==100){
+ result = 1;
+ }
+ return result;
+ }
+
+ @Override
+ public void ruleCycle(String ruleCycle) {
+// 如果是单日的话则开启定时任务
+ if (ruleCycle.equals("singleDay")){
+
+ }
+ }
+
@Override
public List selectOilConfigList() {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/util/SchudelUtil.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/util/SchudelUtil.java
new file mode 100644
index 000000000..7ecb459cc
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/util/SchudelUtil.java
@@ -0,0 +1,17 @@
+package com.fuint.api.fuyou.util;
+
+import com.fuint.api.fuyou.service.MerchantConfigService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+@Component
+public class SchudelUtil {
+ @Autowired
+ private MerchantConfigService merchantConfigService;
+
+ @Scheduled(fixedDelay=86400000)
+ public void teak1(){
+ merchantConfigService.updateMerchIsOpen("0");
+ }
+}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/commission/service/impl/StaffCommissionServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/commission/service/impl/StaffCommissionServiceImpl.java
index 38825bfe3..7fa72c35d 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/commission/service/impl/StaffCommissionServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/commission/service/impl/StaffCommissionServiceImpl.java
@@ -32,14 +32,16 @@ public class StaffCommissionServiceImpl extends ServiceImpl staffCommissionIPage = baseMapper.selectCommissionList(page, commission);
for (StaffCommission record : staffCommissionIPage.getRecords()) {
- String substring = record.getTakeEffect().substring(24, 43);
- Date date = new Date();
- SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- String now = dateFormat.format(date);
- int row = substring.compareTo(now);
- if (row == -1){
- record.setStatus("jy");
- baseMapper.updateById(record);
+ if (record.getTakeEffect()!=null && record.getTakeEffect().equals("")){
+ String substring = record.getTakeEffect().substring(24, 43);
+ Date date = new Date();
+ SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ String now = dateFormat.format(date);
+ int row = substring.compareTo(now);
+ if (row == -1){
+ record.setStatus("jy");
+ baseMapper.updateById(record);
+ }
}
}
IPage commissionIPage = baseMapper.selectCommissionList(page, commission);
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml
index f5112d0dd..e968cca4c 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml
@@ -9,6 +9,9 @@
store_id = #{order.storeId}
+
+ and user_id = #{order.userId}
+
and staff_id = #{order.staffId}
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 7e1266b24..da2ca0f6b 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
@@ -147,7 +147,7 @@ public class OilOrderServiceImpl extends ServiceImpl i
// 支付状态
String payStatus = "unpaid";
- if (payType.equals("CASH")){
+ if (payType.equals("CASH") && map.get("allAmount").equals("0")){
payStatus = "paid";
}else {
payStatus = "unpaid";
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/xml/LJUserMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/xml/LJUserMapper.xml
index 42eb57145..3def76f99 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/xml/LJUserMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/xml/LJUserMapper.xml
@@ -3,13 +3,15 @@
select mu.*,mub.card_balance,mub.points,mub.growth_value,mub.refuel_money from mt_user mu
- inner join mt_user_balance mub on mu.id = mub.mt_user_id
+ left join mt_user_balance mub on mu.id = mub.mt_user_id
- 立即结算
+ 立即结算