更新10.8
This commit is contained in:
parent
ee5dc84b49
commit
68c554655f
@ -269,27 +269,6 @@ export default {
|
|||||||
} else if (this.dataForm.signApplicableRules == 1) {
|
} else if (this.dataForm.signApplicableRules == 1) {
|
||||||
this.value = 0
|
this.value = 0
|
||||||
this.getRules(7)
|
this.getRules(7)
|
||||||
// this.dataForm.pointsObtained=[
|
|
||||||
// {
|
|
||||||
// day:'第1天获得',
|
|
||||||
// integral:0,
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// day:'第2天获得',
|
|
||||||
// integral:0,
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// day:'第3天获得',
|
|
||||||
// integral:0,
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// day:'第4天获得',
|
|
||||||
// integral:0,
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// day:'第5天获得',
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cycle() {
|
cycle() {
|
||||||
@ -319,6 +298,7 @@ export default {
|
|||||||
file.refuelConsumptionAmount = JSON.stringify(file.refuelConsumptionAmount);
|
file.refuelConsumptionAmount = JSON.stringify(file.refuelConsumptionAmount);
|
||||||
|
|
||||||
|
|
||||||
|
console.log("第一个this.dataForm", this.dataForm)
|
||||||
getSettingsApi(this.dataForm).then(res => {
|
getSettingsApi(this.dataForm).then(res => {
|
||||||
this.dataForm = res.data
|
this.dataForm = res.data
|
||||||
this.dataForm.pointsObtained = JSON.parse(this.dataForm.pointsObtained)
|
this.dataForm.pointsObtained = JSON.parse(this.dataForm.pointsObtained)
|
||||||
@ -328,9 +308,8 @@ export default {
|
|||||||
}else {
|
}else {
|
||||||
this.value = this.dataForm.signCycle
|
this.value = this.dataForm.signCycle
|
||||||
}
|
}
|
||||||
console.log("value", this.value)
|
|
||||||
console.log("this.dataForm", this.dataForm)
|
|
||||||
})
|
})
|
||||||
|
console.log("dataForm", this.dataForm)
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
let file = this.dataForm
|
let file = this.dataForm
|
||||||
@ -343,17 +322,96 @@ export default {
|
|||||||
file.signCycle = 3
|
file.signCycle = 3
|
||||||
}
|
}
|
||||||
console.log("file", file)
|
console.log("file", file)
|
||||||
// updateSettingsApi(file).then(res => {
|
updateSettingsApi(file).then(res => {
|
||||||
// this.$modal.msgSuccess("添加成功");
|
this.$modal.msgSuccess("添加成功");
|
||||||
// this.dataForm = {}
|
this.dataForm = {}
|
||||||
// res.data.pointsObtained = JSON.parse(res.data.pointsObtained)
|
res.data.pointsObtained = JSON.parse(res.data.pointsObtained)
|
||||||
// res.data.refuelConsumptionAmount = JSON.parse(res.data.refuelConsumptionAmount)
|
res.data.refuelConsumptionAmount = JSON.parse(res.data.refuelConsumptionAmount)
|
||||||
// this.dataForm = res.data
|
this.dataForm = res.data
|
||||||
// }).catch(res => {
|
this.dataForm.signApplicableRules = res.data.signApplicableRules
|
||||||
// this.$modal.msgSuccess("添加失败");
|
console.log("res.data", res.data)
|
||||||
|
}).catch(res => {
|
||||||
|
this.$modal.msgSuccess("添加失败");
|
||||||
|
|
||||||
|
})
|
||||||
|
// this.dataForm= {
|
||||||
|
// // 积分设置ID
|
||||||
|
// id: null,
|
||||||
|
// // 加油积分规则
|
||||||
|
// refuelPointsRules: 0,
|
||||||
|
// // 加油积分功能
|
||||||
|
// refuelPointsFunction: 0,
|
||||||
|
// // 加油场景类型
|
||||||
|
// refuelSceneType: 0,
|
||||||
|
// // 加油金额类型
|
||||||
|
// refuelAmountType: 0,
|
||||||
|
// // 加油储值参与
|
||||||
|
// refuelValueParticipation: 0,
|
||||||
|
// // 加油场景规则
|
||||||
|
// refuelSceneRules: 0,
|
||||||
|
// // 加油消费金额
|
||||||
|
// refuelConsumptionAmount: '',
|
||||||
|
// // 加油积分
|
||||||
|
// refuelPoints: 0,
|
||||||
|
// // 加油油品金额
|
||||||
|
// refuelFuelAmount: 0.0,
|
||||||
|
// // 加油油品升数
|
||||||
|
// refuelFuelVolume: 0.0,
|
||||||
|
// // 充值赠送
|
||||||
|
// rechargeGive: 0,
|
||||||
|
// // 邀请赠送
|
||||||
|
// inviteGive: 0,
|
||||||
|
// // 邀请赠送规则
|
||||||
|
// inviteGiveRules: '',
|
||||||
|
// // 签到功能
|
||||||
|
// signInFunction: 0,
|
||||||
|
// // 签到规则
|
||||||
|
// signInRules: '',
|
||||||
|
// //适用规则
|
||||||
|
// signApplicableRules: 0,
|
||||||
|
// // 签到周期
|
||||||
|
// signInCycle: 0,
|
||||||
|
// // 签到获得
|
||||||
|
// pointsObtained: [
|
||||||
|
// {
|
||||||
|
// day: '第1天获得',
|
||||||
|
// integral: 0,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// day: '第2天获得',
|
||||||
|
// integral: 0,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// day: '第3天获得',
|
||||||
|
// integral: 0,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// day: '第4天获得',
|
||||||
|
// integral: 0,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// day: '第5天获得',
|
||||||
|
// integral: 0,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// day: '第6天获得',
|
||||||
|
// integral: 0,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// day: '第7天获得',
|
||||||
|
// integral: 0,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// day: '超8天获得',
|
||||||
|
// integral: 0,
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
//
|
//
|
||||||
// })
|
// // 积分规则
|
||||||
this.getData()
|
// pointsRules: ''
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// this.getData()
|
||||||
|
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
<!--查询单个-->
|
<!--查询单个-->
|
||||||
<select id="queryById" resultMap="IntegralSettingsMap">
|
<select id="queryById" resultMap="IntegralSettingsMap">
|
||||||
select
|
select
|
||||||
id, refuel_points_rules, refuel_points_function, refuel_scene_type, refuel_amount_type, refuel_value_participation, refuel_scene_rules, refuel_consumption_amount, refuel_points, refuel_fuel_amount, refuel_fuel_volume, recharge_give, invite_give, invite_give_rules, sign_in_function, sign_in_rules, points_obtained, points_rules, store_id, create_time, update_time, create_by, update_by
|
id, refuel_points_rules, refuel_points_function, refuel_scene_type, refuel_amount_type, refuel_value_participation, refuel_scene_rules, refuel_consumption_amount, refuel_points, refuel_fuel_amount, refuel_fuel_volume, recharge_give, invite_give, invite_give_rules, sign_in_function, sign_in_rules, points_obtained, points_rules, store_id, create_time, update_time, create_by, update_by, sign_applicable_rules, sign_cycle
|
||||||
from integral_settings
|
from integral_settings
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
@ -251,6 +251,12 @@
|
|||||||
<if test="updateBy != null">
|
<if test="updateBy != null">
|
||||||
update_by = #{updateBy},
|
update_by = #{updateBy},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="signApplicableRules != null">
|
||||||
|
sign_applicable_rules = #{signApplicableRules},
|
||||||
|
</if>
|
||||||
|
<if test="signCycle != null">
|
||||||
|
sign_cycle = #{signCycle},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
@ -354,7 +354,7 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService {
|
|||||||
List<IntegralSettingsBo> integralSettingsList = new ArrayList<>();
|
List<IntegralSettingsBo> integralSettingsList = new ArrayList<>();
|
||||||
if (ObjectUtil.isNotEmpty(integralSettings)) {
|
if (ObjectUtil.isNotEmpty(integralSettings)) {
|
||||||
JSONArray jsonArray = JSONArray.parseArray(integralSettings.getPointsObtained());
|
JSONArray jsonArray = JSONArray.parseArray(integralSettings.getPointsObtained());
|
||||||
if (ObjectUtil.isNotEmpty(integralSettings.getSignApplicableRules()) && integralSettings.getSignApplicableRules() == 0) {
|
if (integralSettings.getSignApplicableRules() == 0) {
|
||||||
int length = 30;
|
int length = 30;
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
IntegralSettingsBo integralSettings1 = new IntegralSettingsBo();
|
IntegralSettingsBo integralSettings1 = new IntegralSettingsBo();
|
||||||
@ -366,7 +366,7 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService {
|
|||||||
integralSettingsList.add(integralSettings1);
|
integralSettingsList.add(integralSettings1);
|
||||||
}
|
}
|
||||||
integralSettingsVo.setIntegralSettings(integralSettingsList);
|
integralSettingsVo.setIntegralSettings(integralSettingsList);
|
||||||
}else if (ObjectUtil.isNotEmpty(integralSettings.getSignApplicableRules()) && integralSettings.getSignApplicableRules() == 1) {
|
}else if (integralSettings.getSignApplicableRules() == 1) {
|
||||||
for (int i = 0; i < jsonArray.size(); i++) {
|
for (int i = 0; i < jsonArray.size(); i++) {
|
||||||
String day = jsonArray.getJSONObject(i).get("day").toString();
|
String day = jsonArray.getJSONObject(i).get("day").toString();
|
||||||
Integer points = Integer.parseInt(jsonArray.getJSONObject(i).get("integral").toString());
|
Integer points = Integer.parseInt(jsonArray.getJSONObject(i).get("integral").toString());
|
||||||
|
Loading…
Reference in New Issue
Block a user