会员管理
This commit is contained in:
parent
69feab70bc
commit
fe0ec44dff
44
fuintAdmin/src/api/staff/user/fixinglevel.js
Normal file
44
fuintAdmin/src/api/staff/user/fixinglevel.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询固定等级列表
|
||||
export function listFixingLevel(query) {
|
||||
return request({
|
||||
url: '/business/userManager/fixingLevel/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询固定等级详细
|
||||
export function getFixingLevel(id) {
|
||||
return request({
|
||||
url: '/business/userManager/fixingLevel/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增固定等级
|
||||
export function addFixingLevel(data) {
|
||||
return request({
|
||||
url: '/business/userManager/fixingLevel',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改固定等级
|
||||
export function updateFixingLevel(data) {
|
||||
return request({
|
||||
url: '/business/userManager/fixingLevel',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除固定等级
|
||||
export function delFixingLevel(id) {
|
||||
return request({
|
||||
url: '/business/userManager/fixingLevel/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
812
fuintAdmin/src/views/member/fixingLevel.vue
Normal file
812
fuintAdmin/src/views/member/fixingLevel.vue
Normal file
File diff suppressed because one or more lines are too long
@ -191,7 +191,7 @@
|
||||
<div>{{ scope.row.balance ? scope.row.balance.toFixed(2) : '0.00' }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="升数卡" align="center" prop="balance">
|
||||
<el-table-column label="升数卡" align="center" prop="literCard">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.literCard ? scope.row.literCard.toFixed(2) : '0.00' }}L</div>
|
||||
</template>
|
||||
|
@ -949,7 +949,6 @@ export default {
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
console.log(this.form)
|
||||
if (this.form.id) {
|
||||
updateUser(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
@ -980,10 +979,10 @@ export default {
|
||||
this.openConfirm = false;
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
console.log(tab, event);
|
||||
// console.log(tab, event);
|
||||
},
|
||||
handleChange(value) {
|
||||
console.log(value);
|
||||
// console.log(value);
|
||||
},
|
||||
// 返回
|
||||
goBack() {
|
||||
|
@ -0,0 +1,78 @@
|
||||
package com.fuint.business.userManager.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userManager.entity.FixingLevel;
|
||||
import com.fuint.business.userManager.service.FixingLevelService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 固定等级 controller层
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/business/userManager/fixingLevel")
|
||||
public class FixingLevelController extends BaseController {
|
||||
@Autowired
|
||||
private FixingLevelService fixingLevelService;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询固定等级信息
|
||||
* @param fixingLevel
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public ResponseObject list(FixingLevel fixingLevel,
|
||||
@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
IPage<FixingLevel> list = fixingLevelService.selectFixingLevelList(page,fixingLevel);
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询固定等级信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public ResponseObject staffInfo(@PathVariable Integer id){
|
||||
FixingLevel fixingLevel = fixingLevelService.selectFixingLevelById(id);
|
||||
return getSuccessResult(fixingLevel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除固定等级信息
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
public ResponseObject remove(@PathVariable Integer id){
|
||||
fixingLevelService.deleteFixingLevelById(id);
|
||||
return getSuccessResult("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加固定等级信息
|
||||
* @param fixingLevel
|
||||
* @return
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@Validated @RequestBody FixingLevel fixingLevel){
|
||||
return getSuccessResult(fixingLevelService.insertFixingLevel(fixingLevel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改固定等级信息
|
||||
* @param fixingLevel
|
||||
* @return
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@Validated @RequestBody FixingLevel fixingLevel){
|
||||
return getSuccessResult(fixingLevelService.updateFixingLevel(fixingLevel));
|
||||
}
|
||||
}
|
@ -47,7 +47,7 @@ public class LJUserGradeController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除会员等级信息
|
||||
* 删除会员等级信息
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
|
@ -0,0 +1,130 @@
|
||||
package com.fuint.business.userManager.entity;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fuint.framework.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 固定等级表(Level)实体类
|
||||
*
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("fixing_level")
|
||||
@ApiModel(value = "FixingLevel对象", description = "")
|
||||
public class FixingLevel extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("自增ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 认证类型名称
|
||||
*/
|
||||
@ApiModelProperty("认证类型名称")
|
||||
private String name;
|
||||
/**
|
||||
* 优惠类型:自定义优惠;优惠活动组
|
||||
*/
|
||||
@ApiModelProperty("优惠类型:自定义优惠;优惠活动组")
|
||||
private String discountType;
|
||||
/**
|
||||
* 汽油优惠类型:无优惠,满减优惠,每升优惠
|
||||
*/
|
||||
@ApiModelProperty("汽油优惠类型:无优惠,满减优惠,每升优惠")
|
||||
private String gasolineDiscount;
|
||||
/**
|
||||
* 汽油优惠规则
|
||||
*/
|
||||
@ApiModelProperty("汽油优惠规则")
|
||||
private String gasolineRule;
|
||||
/**
|
||||
* 柴油优惠,无优惠,满减优惠,每升优惠
|
||||
*/
|
||||
@ApiModelProperty("柴油优惠,无优惠,满减优惠,每升优惠")
|
||||
private String dieselDiscount;
|
||||
/**
|
||||
* 柴油优惠规则
|
||||
*/
|
||||
@ApiModelProperty("柴油优惠规则")
|
||||
private String dieselRule;
|
||||
/**
|
||||
* 天然气优惠,无优惠,满减优惠,每单位优惠
|
||||
*/
|
||||
@ApiModelProperty("天然气优惠,无优惠,满减优惠,每单位优惠")
|
||||
private String naturalGasDiscount;
|
||||
/**
|
||||
* 天然气优惠规则
|
||||
*/
|
||||
@ApiModelProperty("天然气优惠规则")
|
||||
private String naturalGasRule;
|
||||
/**
|
||||
* 优惠活动组
|
||||
*/
|
||||
@ApiModelProperty("优惠活动组")
|
||||
private String promotionGroup;
|
||||
/**
|
||||
* 是否参与积分规则
|
||||
*/
|
||||
@ApiModelProperty("是否参与积分规则")
|
||||
private String pointRule;
|
||||
/**
|
||||
* 是否参与加油金规则
|
||||
*/
|
||||
@ApiModelProperty("是否参与加油金规则")
|
||||
private String refuelMoneyRule;
|
||||
/**
|
||||
* 是否参与成长值规则
|
||||
*/
|
||||
@ApiModelProperty("是否参与成长值规则")
|
||||
private String growthValueRule;
|
||||
/**
|
||||
* 是否参与优惠券规则
|
||||
*/
|
||||
@ApiModelProperty("是否参与优惠券规则")
|
||||
private String couponRule;
|
||||
/**
|
||||
* 是否参与储值优惠规则
|
||||
*/
|
||||
@ApiModelProperty("是否参与储值优惠规则")
|
||||
private String storeValue;
|
||||
/**
|
||||
* 是否需要审核
|
||||
*/
|
||||
@ApiModelProperty("是否需要审核")
|
||||
private String process;
|
||||
/**
|
||||
* 状态:启用,禁用
|
||||
*/
|
||||
@ApiModelProperty("状态:启用,禁用")
|
||||
private String status;
|
||||
/**
|
||||
* 二维码
|
||||
*/
|
||||
@ApiModelProperty("二维码")
|
||||
private String qrCode;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<JSONObject> gasolineRuleList;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<JSONObject> dieselRuleList;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<JSONObject> naturalGasRuleList;
|
||||
}
|
||||
|
@ -0,0 +1,11 @@
|
||||
package com.fuint.business.userManager.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userManager.entity.FixingLevel;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface FixingLevelMapper extends BaseMapper<FixingLevel> {
|
||||
public IPage<FixingLevel> selectFixingLevelList(Page page, @Param("fixingLevel") FixingLevel fixingLevel);
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.userManager.mapper.FixingLevelMapper">
|
||||
<sql id="selectFixingLevel">
|
||||
select * from fixing_level
|
||||
</sql>
|
||||
|
||||
<select id="selectFixingLevelList" resultType="com.fuint.business.userManager.entity.FixingLevel">
|
||||
<include refid="selectFixingLevel"></include>
|
||||
<where>
|
||||
<if test="fixingLevel.status != null and fixingLevel.status != ''">
|
||||
and status = #{fixingLevel.status}
|
||||
</if>
|
||||
<if test="fixingLevel.params.beginTime != null and fixingLevel.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{user.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="fixingLevel.params.endTime != null and fixingLevel.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{user.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,45 @@
|
||||
package com.fuint.business.userManager.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.userManager.entity.FixingLevel;
|
||||
|
||||
/**
|
||||
* 固定等级 业务层
|
||||
*/
|
||||
public interface FixingLevelService extends IService<FixingLevel> {
|
||||
/**
|
||||
* 根据条件分页查询固定等级信息
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
public IPage<FixingLevel> selectFixingLevelList(Page page, FixingLevel fixingLevel);
|
||||
|
||||
/**
|
||||
* 根据id查询固定等级信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public FixingLevel selectFixingLevelById(int id);
|
||||
|
||||
/**
|
||||
* 根据id删除固定等级信息
|
||||
* @param id
|
||||
*/
|
||||
public void deleteFixingLevelById(Integer id);
|
||||
|
||||
/**
|
||||
* 增加固定等级信息
|
||||
* @param fixingLevel
|
||||
* @return
|
||||
*/
|
||||
public int insertFixingLevel(FixingLevel fixingLevel);
|
||||
|
||||
/**
|
||||
* 修改固定等级信息
|
||||
* @param fixingLevel
|
||||
* @return
|
||||
*/
|
||||
public int updateFixingLevel(FixingLevel fixingLevel);
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package com.fuint.business.userManager.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.userManager.entity.FixingLevel;
|
||||
import com.fuint.business.userManager.entity.LJUserGrade;
|
||||
import com.fuint.business.userManager.mapper.FixingLevelMapper;
|
||||
import com.fuint.business.userManager.service.FixingLevelService;
|
||||
import com.fuint.common.util.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 固定等级信息 业务层
|
||||
*/
|
||||
@Service
|
||||
public class FixingLevelServiceImpl extends ServiceImpl<FixingLevelMapper, FixingLevel> implements FixingLevelService {
|
||||
/**
|
||||
* 根据条件分页查询固定等级信息
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage<FixingLevel> selectFixingLevelList(Page page, FixingLevel fixingLevel) {
|
||||
IPage<FixingLevel> fixingLevelIPage = baseMapper.selectFixingLevelList(page, fixingLevel);
|
||||
for (FixingLevel record : fixingLevelIPage.getRecords()) {
|
||||
if (StringUtils.isNotEmpty(record.getGasolineRule())){
|
||||
record.setGasolineRuleList(JSONArray.parseArray(record.getGasolineRule(), JSONObject.class));
|
||||
}
|
||||
if (StringUtils.isNotEmpty(record.getDieselRule())){
|
||||
record.setDieselRuleList(JSONArray.parseArray(record.getDieselRule(), JSONObject.class));
|
||||
}
|
||||
if (StringUtils.isNotEmpty(record.getNaturalGasRule())){
|
||||
record.setNaturalGasRuleList(JSONArray.parseArray(record.getNaturalGasRule(), JSONObject.class));
|
||||
}
|
||||
}
|
||||
return fixingLevelIPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询固定等级信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public FixingLevel selectFixingLevelById(int id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除固定等级信息
|
||||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void deleteFixingLevelById(Integer id) {
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加固定等级信息
|
||||
* @param fixingLevel
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int insertFixingLevel(FixingLevel fixingLevel) {
|
||||
int row = baseMapper.insert(fixingLevel);
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改固定等级信息
|
||||
* @param fixingLevel
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int updateFixingLevel(FixingLevel fixingLevel) {
|
||||
int row = baseMapper.updateById(fixingLevel);
|
||||
return row;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user