支持自定义积分充值来源

This commit is contained in:
王鹏
2026-07-30 16:39:08 +08:00
parent 4bda30f9c2
commit 2bf0a6db59
2 changed files with 8 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@@ -99,7 +100,9 @@ public class AppIntegralRecordServiceImpl implements IAppIntegralRecordService
@Override @Override
public int czAppIntegra(AppIntegralRecord appIntegralRecord) { public int czAppIntegra(AppIntegralRecord appIntegralRecord) {
if (StringUtils.isBlank(appIntegralRecord.getSource())) {
appIntegralRecord.setSource("充值积分"); appIntegralRecord.setSource("充值积分");
}
appIntegralRecord.setIsAdd(0L); appIntegralRecord.setIsAdd(0L);
appIntegralRecord.setIntegralTime(new Date()); appIntegralRecord.setIntegralTime(new Date());
int count = appIntegralRecordMapper.insertAppIntegralRecord(appIntegralRecord); int count = appIntegralRecordMapper.insertAppIntegralRecord(appIntegralRecord);

View File

@@ -187,6 +187,9 @@
<!-- 充值积分对话框 --> <!-- 充值积分对话框 -->
<el-dialog :title="title" :visible.sync="openCzjf" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="openCzjf" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="充值来源" prop="source">
<el-input v-model="form.source" placeholder="请输入充值来源" />
</el-form-item>
<el-form-item label="充值分数" prop="integralNumber"> <el-form-item label="充值分数" prop="integralNumber">
<el-input v-model="form.integralNumber" placeholder="请输入充值分数" /> <el-input v-model="form.integralNumber" placeholder="请输入充值分数" />
</el-form-item> </el-form-item>
@@ -302,6 +305,7 @@ export default {
/** 充值积分按钮操作 */ /** 充值积分按钮操作 */
handleCzjf() { handleCzjf() {
this.reset(); this.reset();
this.form.source = "充值积分";
this.openCzjf = true; this.openCzjf = true;
this.title = "充值积分"; this.title = "充值积分";
}, },