bug
This commit is contained in:
parent
8f1776420e
commit
c8e8b026d6
@ -71,6 +71,10 @@ export default {
|
||||
});
|
||||
},
|
||||
submitForm(formName) {
|
||||
if (this.ruleForm.checkedKeys.length==0 && this.ruleForm.roleCode != '2' && this.ruleForm.roleCode != '3') {
|
||||
this.$message.error("请先选择菜单")
|
||||
return;
|
||||
}
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.ruleForm.dutyId) {
|
||||
@ -111,7 +115,7 @@ export default {
|
||||
this.ruleForm.roleType = response.data.roleInfo.type;
|
||||
this.ruleForm.storeId = response.data.roleInfo.storeId;
|
||||
this.ruleForm.description = response.data.roleInfo.description;
|
||||
let checkedKeys = response.data.checkedKeys
|
||||
let checkedKeys = response.data.checkedKeys || []
|
||||
this.ruleForm.checkedKeys = checkedKeys
|
||||
this.ruleForm.menuIds = checkedKeys
|
||||
this.merchantId = response.data.roleInfo.type
|
||||
@ -120,7 +124,7 @@ export default {
|
||||
}else {
|
||||
this.isCashier = false
|
||||
}
|
||||
if (this.checkedKeys.length==this.ruleForm.checkedKeys.length && this.isCashier){
|
||||
if (this.ruleForm.checkedKeys.length >0 && this.checkedKeys.length==this.ruleForm.checkedKeys.length && this.isCashier){
|
||||
this.checked = true
|
||||
}else {
|
||||
this.checked = false
|
||||
@ -356,7 +360,7 @@ export default {
|
||||
<!-- <el-radio :label="3">全部</el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="菜单功能权限" prop="checkedKeys">
|
||||
<el-form-item label="菜单功能权限">
|
||||
<el-checkbox v-model="checked" @change="chooseAllOrNo">全选</el-checkbox>
|
||||
<el-checkbox v-model="isOpen" @change="openTable">展开</el-checkbox>
|
||||
</el-form-item>
|
||||
|
@ -0,0 +1,87 @@
|
||||
package com.fuint.business.fleet.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.fleet.entity.FleetInfo;
|
||||
import com.fuint.business.fleet.service.FleetInfoService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 油机汽机配置(FleetInfo)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-31 14:59:04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("fleetInfo")
|
||||
public class FleetInfoController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private FleetInfoService fleetInfoService;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询首页轮播图
|
||||
* @param fleetInfo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping
|
||||
public ResponseObject lists(FleetInfo fleetInfo,
|
||||
@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
return getSuccessResult(fleetInfoService.queryPage(page,fleetInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||
return getSuccessResult(fleetInfoService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param fleetInfo 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody FleetInfo fleetInfo) {
|
||||
return getSuccessResult(fleetInfoService.insert(fleetInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param fleetInfo 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody FleetInfo fleetInfo) {
|
||||
return getSuccessResult(fleetInfoService.update(fleetInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
public ResponseObject deleteById(@PathVariable Integer id) {
|
||||
return getSuccessResult(fleetInfoService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,87 @@
|
||||
package com.fuint.business.fleet.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.fleet.entity.FleetMember;
|
||||
import com.fuint.business.fleet.service.FleetMemberService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 油机汽机配置(FleetMember)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-31 14:59:04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("fleetMember")
|
||||
public class FleetMemberController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private FleetMemberService fleetMemberService;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询首页轮播图
|
||||
* @param fleetMember
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping
|
||||
public ResponseObject lists(FleetMember fleetMember,
|
||||
@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
return getSuccessResult(fleetMemberService.queryPage(page,fleetMember));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||
return getSuccessResult(fleetMemberService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param fleetMember 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody FleetMember fleetMember) {
|
||||
return getSuccessResult(fleetMemberService.insert(fleetMember));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param fleetMember 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody FleetMember fleetMember) {
|
||||
return getSuccessResult(fleetMemberService.update(fleetMember));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
public ResponseObject deleteById(@PathVariable Integer id) {
|
||||
return getSuccessResult(fleetMemberService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,117 @@
|
||||
package com.fuint.business.fleet.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
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.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 车队信息(FleetInfo)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 10:32:53
|
||||
*/
|
||||
@Data
|
||||
@TableName("fleet_info")
|
||||
@ApiModel(value = "FleetInfo", description = "车队信息")
|
||||
public class FleetInfo extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("自增ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 所属连锁店id
|
||||
*/
|
||||
private Integer chainStoreId;
|
||||
/**
|
||||
* 所属店铺id
|
||||
*/
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 车队名称
|
||||
*/
|
||||
private String fleetName;
|
||||
/**
|
||||
* 卡类型:储值卡、囤油卡
|
||||
*/
|
||||
private String cardType;
|
||||
/**
|
||||
* 车队负责人
|
||||
*/
|
||||
private String fleetLeader;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String mobile;
|
||||
/**
|
||||
* 会员等级id
|
||||
*/
|
||||
private Integer gradeId;
|
||||
/**
|
||||
* 员工id
|
||||
*/
|
||||
private Integer staffId;
|
||||
/**
|
||||
* 会员标签id
|
||||
*/
|
||||
private Integer userLabelId;
|
||||
/**
|
||||
* 会员状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 总余额
|
||||
*/
|
||||
private String totalBalance;
|
||||
/**
|
||||
* 充值金额
|
||||
*/
|
||||
private Double rechargeAmount;
|
||||
/**
|
||||
* 赠送金额
|
||||
*/
|
||||
private Double giveAmount;
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
private String corporateName;
|
||||
/**
|
||||
* 支付方式
|
||||
*/
|
||||
private String paymentType;
|
||||
/**
|
||||
* 操作密码
|
||||
*/
|
||||
private String password;
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,281 @@
|
||||
package com.fuint.business.fleet.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 车队成员(FleetMember)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 10:33:13
|
||||
*/
|
||||
public class FleetMember implements Serializable {
|
||||
private static final long serialVersionUID = 988159363763061454L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 所属连锁店id
|
||||
*/
|
||||
private Integer chainStoreId;
|
||||
/**
|
||||
* 所属店铺id
|
||||
*/
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 车队id
|
||||
*/
|
||||
private Integer fleetId;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String mobile;
|
||||
/**
|
||||
* 会员卡号;关联会员表
|
||||
*/
|
||||
private String userCardNum;
|
||||
/**
|
||||
* 副卡类型:选项为共享副卡-不限额、共享副卡限额、独立副卡
|
||||
*/
|
||||
private String secondaryCardType;
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String carNum;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 副卡额度
|
||||
*/
|
||||
private Double secondaryCardLimit;
|
||||
/**
|
||||
* 已用额度
|
||||
*/
|
||||
private Double usedCreditLimit;
|
||||
/**
|
||||
* 剩余额度
|
||||
*/
|
||||
private Double remainingCreditLimit;
|
||||
/**
|
||||
* 调整类型:0增加、1扣除
|
||||
*/
|
||||
private String adjustType;
|
||||
/**
|
||||
* 调整额度
|
||||
*/
|
||||
private Double adjustLimit;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
/**
|
||||
* 是否注销:0未注销、1已注销
|
||||
*/
|
||||
private String ifLogOff;
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getChainStoreId() {
|
||||
return chainStoreId;
|
||||
}
|
||||
|
||||
public void setChainStoreId(Integer chainStoreId) {
|
||||
this.chainStoreId = chainStoreId;
|
||||
}
|
||||
|
||||
public Integer getStoreId() {
|
||||
return storeId;
|
||||
}
|
||||
|
||||
public void setStoreId(Integer storeId) {
|
||||
this.storeId = storeId;
|
||||
}
|
||||
|
||||
public Integer getFleetId() {
|
||||
return fleetId;
|
||||
}
|
||||
|
||||
public void setFleetId(Integer fleetId) {
|
||||
this.fleetId = fleetId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getMobile() {
|
||||
return mobile;
|
||||
}
|
||||
|
||||
public void setMobile(String mobile) {
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public String getUserCardNum() {
|
||||
return userCardNum;
|
||||
}
|
||||
|
||||
public void setUserCardNum(String userCardNum) {
|
||||
this.userCardNum = userCardNum;
|
||||
}
|
||||
|
||||
public String getSecondaryCardType() {
|
||||
return secondaryCardType;
|
||||
}
|
||||
|
||||
public void setSecondaryCardType(String secondaryCardType) {
|
||||
this.secondaryCardType = secondaryCardType;
|
||||
}
|
||||
|
||||
public String getCarNum() {
|
||||
return carNum;
|
||||
}
|
||||
|
||||
public void setCarNum(String carNum) {
|
||||
this.carNum = carNum;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Double getSecondaryCardLimit() {
|
||||
return secondaryCardLimit;
|
||||
}
|
||||
|
||||
public void setSecondaryCardLimit(Double secondaryCardLimit) {
|
||||
this.secondaryCardLimit = secondaryCardLimit;
|
||||
}
|
||||
|
||||
public Double getUsedCreditLimit() {
|
||||
return usedCreditLimit;
|
||||
}
|
||||
|
||||
public void setUsedCreditLimit(Double usedCreditLimit) {
|
||||
this.usedCreditLimit = usedCreditLimit;
|
||||
}
|
||||
|
||||
public Double getRemainingCreditLimit() {
|
||||
return remainingCreditLimit;
|
||||
}
|
||||
|
||||
public void setRemainingCreditLimit(Double remainingCreditLimit) {
|
||||
this.remainingCreditLimit = remainingCreditLimit;
|
||||
}
|
||||
|
||||
public String getAdjustType() {
|
||||
return adjustType;
|
||||
}
|
||||
|
||||
public void setAdjustType(String adjustType) {
|
||||
this.adjustType = adjustType;
|
||||
}
|
||||
|
||||
public Double getAdjustLimit() {
|
||||
return adjustLimit;
|
||||
}
|
||||
|
||||
public void setAdjustLimit(Double adjustLimit) {
|
||||
this.adjustLimit = adjustLimit;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getIfLogOff() {
|
||||
return ifLogOff;
|
||||
}
|
||||
|
||||
public void setIfLogOff(String ifLogOff) {
|
||||
this.ifLogOff = ifLogOff;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,11 @@
|
||||
package com.fuint.business.fleet.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.fleet.entity.FleetInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface FleetInfoMapper extends BaseMapper<FleetInfo> {
|
||||
IPage<FleetInfo> queryPage(Page page,@Param("entity") FleetInfo fleetInfo);
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.fuint.business.fleet.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.fleet.entity.FleetMember;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface FleetMemberMapper extends BaseMapper<FleetMember> {
|
||||
IPage<FleetMember> queryPage(Page page, @Param("entity") FleetMember fleetMember);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
<?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.fleet.mapper.FleetInfoMapper">
|
||||
|
||||
<select id="queryPage" resultType="com.fuint.business.fleet.entity.FleetInfo">
|
||||
SELECT * FROM fleet_info
|
||||
<where>
|
||||
<if test="entity.storeId != null and entity.storeId != ''">
|
||||
and store_id = #{entity.storeId}
|
||||
</if>
|
||||
<if test="entity.status != null and entity.status != ''">
|
||||
and status = #{entity.status}
|
||||
</if>
|
||||
<if test="entity.gradeId != null and entity.gradeId != ''">
|
||||
and grade_id = #{entity.gradeId}
|
||||
</if>
|
||||
<if test="entity.fleetName != null and entity.fleetName != ''">
|
||||
and fleet_name like concat('%', #{entity.fleetName}, '%')
|
||||
</if>
|
||||
<if test="entity.params.beginTime != null and entity.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{entity.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="entity.params.endTime != null and entity.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{entity.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -0,0 +1,30 @@
|
||||
<?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.fleet.mapper.FleetMemberMapper">
|
||||
|
||||
<select id="queryPage" resultType="com.fuint.business.fleet.entity.FleetMember">
|
||||
SELECT * FROM fleet_member
|
||||
<where>
|
||||
<if test="entity.storeId != null and entity.storeId != ''">
|
||||
and store_id = #{entity.storeId}
|
||||
</if>
|
||||
<if test="entity.status != null and entity.status != ''">
|
||||
and status = #{entity.status}
|
||||
</if>
|
||||
<if test="entity.secondaryCardType != null and entity.secondaryCardType != ''">
|
||||
and secondary_card_type = #{entity.secondaryCardType}
|
||||
</if>
|
||||
<if test="entity.fleetName != null and entity.fleetName != ''">
|
||||
and fleet_name like concat('%', #{entity.fleetName}, '%')
|
||||
</if>
|
||||
<if test="entity.params.beginTime != null and entity.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{entity.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="entity.params.endTime != null and entity.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{entity.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -0,0 +1,54 @@
|
||||
package com.fuint.business.fleet.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.fleet.entity.FleetInfo;
|
||||
|
||||
/**
|
||||
* 车队信息(FleetInfo)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 10:32:54
|
||||
*/
|
||||
public interface FleetInfoService {
|
||||
/**
|
||||
* 分页查询订单信息
|
||||
* @param page
|
||||
* @param fleetInfo
|
||||
* @return
|
||||
*/
|
||||
IPage<FleetInfo> queryPage(Page page, FleetInfo fleetInfo);
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
FleetInfo queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param fleetInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int insert(FleetInfo fleetInfo);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param fleetInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int update(FleetInfo fleetInfo);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.fuint.business.fleet.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.fleet.entity.FleetMember;
|
||||
|
||||
/**
|
||||
* 车队成员(FleetMember)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 10:33:13
|
||||
*/
|
||||
public interface FleetMemberService {
|
||||
/**
|
||||
* 根据条件分页查询
|
||||
* @param page
|
||||
* @param fleetMember
|
||||
* @return
|
||||
*/
|
||||
IPage<FleetMember> queryPage(Page page, FleetMember fleetMember);
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
FleetMember queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param fleetMember 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int insert(FleetMember fleetMember);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param fleetMember 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int update(FleetMember fleetMember);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.fuint.business.fleet.service.impl;
|
||||
|
||||
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.fleet.entity.FleetInfo;
|
||||
import com.fuint.business.fleet.mapper.FleetInfoMapper;
|
||||
import com.fuint.business.fleet.service.FleetInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
/**
|
||||
* 车队信息(FleetInfo)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 10:32:54
|
||||
*/
|
||||
@Service("fleetInfoService")
|
||||
public class FleetInfoServiceImpl extends ServiceImpl<FleetInfoMapper,FleetInfo> implements FleetInfoService {
|
||||
|
||||
@Override
|
||||
public IPage<FleetInfo> queryPage(Page page, FleetInfo fleetInfo) {
|
||||
return baseMapper.queryPage(page,fleetInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public FleetInfo queryById(Integer id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param fleetInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int insert(FleetInfo fleetInfo) {
|
||||
return baseMapper.insert(fleetInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param fleetInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int update(FleetInfo fleetInfo) {
|
||||
return baseMapper.updateById(fleetInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public int deleteById(Integer id) {
|
||||
return baseMapper.deleteById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package com.fuint.business.fleet.service.impl;
|
||||
|
||||
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.fleet.entity.FleetMember;
|
||||
import com.fuint.business.fleet.mapper.FleetMemberMapper;
|
||||
import com.fuint.business.fleet.service.FleetMemberService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 车队成员(FleetMember)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 10:33:13
|
||||
*/
|
||||
@Service("fleetMemberService")
|
||||
public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper,FleetMember> implements FleetMemberService {
|
||||
|
||||
@Override
|
||||
public IPage<FleetMember> queryPage(Page page, FleetMember fleetMember) {
|
||||
return baseMapper.queryPage(page,fleetMember);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public FleetMember queryById(Integer id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param fleetMember 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int insert(FleetMember fleetMember) {
|
||||
return baseMapper.insert(fleetMember);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param fleetMember 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int update(FleetMember fleetMember) {
|
||||
return baseMapper.updateById(fleetMember);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public int deleteById(Integer id) {
|
||||
return baseMapper.deleteById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package com.fuint.business.userManager.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userManager.entity.UserLabel;
|
||||
import com.fuint.business.userManager.service.UserLabelService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 油机汽机配置(UserLabel)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-31 14:59:04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("userLabel")
|
||||
public class UserLabelController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private UserLabelService userLabelService;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询首页轮播图
|
||||
* @param userLabel
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping
|
||||
public ResponseObject lists(UserLabel userLabel,
|
||||
@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
return getSuccessResult(userLabelService.queryPage(page,userLabel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||
return getSuccessResult(userLabelService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param userLabel 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody UserLabel userLabel) {
|
||||
return getSuccessResult(userLabelService.insert(userLabel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param userLabel 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody UserLabel userLabel) {
|
||||
return getSuccessResult(userLabelService.update(userLabel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
public ResponseObject deleteById(@PathVariable Integer id) {
|
||||
return getSuccessResult(userLabelService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,70 @@
|
||||
package com.fuint.business.userManager.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
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.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 会员标签表(UserLabel)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 10:32:21
|
||||
*/
|
||||
@Data
|
||||
@TableName("user_label")
|
||||
@ApiModel(value = "UserLabel对象", description = "会员标签表")
|
||||
public class UserLabel extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 所属连锁店id
|
||||
*/
|
||||
private Integer chainStoreId;
|
||||
/**
|
||||
* 所属店铺id
|
||||
*/
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 标签名称
|
||||
*/
|
||||
private String labelName;
|
||||
/**
|
||||
* 标签状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
@ -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.UserLabel;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface UserLabelMapper extends BaseMapper<UserLabel> {
|
||||
IPage<UserLabel> queryPage(Page page, @Param("entity") UserLabel userLabel);
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
<?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.UserLabelMapper">
|
||||
|
||||
<select id="queryPage" resultType="com.fuint.business.userManager.entity.UserLabel">
|
||||
SELECT * FROM user_label
|
||||
<where>
|
||||
<if test="entity.storeId != null and entity.storeId != ''">
|
||||
and store_id = #{entity.storeId}
|
||||
</if>
|
||||
<if test="entity.labelName != null and entity.labelName != ''">
|
||||
and label_name like concat('%', #{entity.labelName}, '%')
|
||||
</if>
|
||||
<if test="entity.params.beginTime != null and entity.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{entity.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="entity.params.endTime != null and entity.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{entity.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -0,0 +1,55 @@
|
||||
package com.fuint.business.userManager.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userManager.entity.UserLabel;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
|
||||
/**
|
||||
* 会员标签表(UserLabel)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 10:32:21
|
||||
*/
|
||||
public interface UserLabelService {
|
||||
/**
|
||||
* 根据条件分页查询数据
|
||||
* @param page
|
||||
* @param userLabel
|
||||
* @return
|
||||
*/
|
||||
IPage<UserLabel> queryPage(Page page, UserLabel userLabel);
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
UserLabel queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param userLabel 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int insert(UserLabel userLabel);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param userLabel 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int update(UserLabel userLabel);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package com.fuint.business.userManager.service.impl;
|
||||
|
||||
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.UserLabel;
|
||||
import com.fuint.business.userManager.mapper.UserLabelMapper;
|
||||
import com.fuint.business.userManager.service.UserLabelService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 会员标签表(UserLabel)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 10:32:21
|
||||
*/
|
||||
@Service("userLabelService")
|
||||
public class UserLabelServiceImpl extends ServiceImpl<UserLabelMapper,UserLabel> implements UserLabelService {
|
||||
|
||||
@Override
|
||||
public IPage<UserLabel> queryPage(Page page, UserLabel userLabel) {
|
||||
return baseMapper.queryPage(page,userLabel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public UserLabel queryById(Integer id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param userLabel 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int insert(UserLabel userLabel) {
|
||||
return baseMapper.insert(userLabel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param userLabel 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int update(UserLabel userLabel) {
|
||||
return baseMapper.updateById(userLabel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public int deleteById(Integer id) {
|
||||
return baseMapper.deleteById(id);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user