运营商初版
This commit is contained in:
@ -0,0 +1,127 @@
|
||||
package com.ruoyi.operation.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.operation.domain.Company;
|
||||
import com.ruoyi.operation.service.ICompanyService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 运营商Controller
|
||||
*
|
||||
* @author majian
|
||||
* @date 2025-06-30
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/operation/company")
|
||||
public class CompanyController extends BaseController
|
||||
{
|
||||
private String prefix = "operation/company";
|
||||
|
||||
@Autowired
|
||||
private ICompanyService companyService;
|
||||
|
||||
@RequiresPermissions("operation:company:view")
|
||||
@GetMapping()
|
||||
public String company()
|
||||
{
|
||||
return prefix + "/company";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询运营商列表
|
||||
*/
|
||||
@RequiresPermissions("operation:company:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(Company company)
|
||||
{
|
||||
startPage();
|
||||
List<Company> list = companyService.selectCompanyList(company);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出运营商列表
|
||||
*/
|
||||
@RequiresPermissions("operation:company:export")
|
||||
@Log(title = "运营商", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(Company company)
|
||||
{
|
||||
List<Company> list = companyService.selectCompanyList(company);
|
||||
ExcelUtil<Company> util = new ExcelUtil<Company>(Company.class);
|
||||
return util.exportExcel(list, "运营商数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增运营商
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存运营商
|
||||
*/
|
||||
@RequiresPermissions("operation:company:add")
|
||||
@Log(title = "运营商", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(Company company)
|
||||
{
|
||||
return toAjax(companyService.insertCompany(company));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改运营商
|
||||
*/
|
||||
@RequiresPermissions("operation:company:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
Company company = companyService.selectCompanyById(id);
|
||||
mmap.put("company", company);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存运营商
|
||||
*/
|
||||
@RequiresPermissions("operation:company:edit")
|
||||
@Log(title = "运营商", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(Company company)
|
||||
{
|
||||
return toAjax(companyService.updateCompany(company));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除运营商
|
||||
*/
|
||||
@RequiresPermissions("operation:company:remove")
|
||||
@Log(title = "运营商", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(companyService.deleteCompanyByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,610 @@
|
||||
package com.ruoyi.operation.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 运营商对象 company
|
||||
*
|
||||
* @author majian
|
||||
* @date 2025-06-30
|
||||
*/
|
||||
public class Company extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 公司ID */
|
||||
private Long id;
|
||||
|
||||
/** 公司名称 */
|
||||
@Excel(name = "公司名称")
|
||||
private String companyName;
|
||||
|
||||
/** 联系人姓名 */
|
||||
@Excel(name = "联系人姓名")
|
||||
private String contactName;
|
||||
|
||||
/** 联系电话 */
|
||||
@Excel(name = "联系电话")
|
||||
private String phone;
|
||||
|
||||
/** 公司地址 */
|
||||
@Excel(name = "公司地址")
|
||||
private String address;
|
||||
|
||||
/** 账户余额 */
|
||||
@Excel(name = "账户余额")
|
||||
private BigDecimal balance;
|
||||
|
||||
/** 押金/保证金金额 */
|
||||
@Excel(name = "押金/保证金金额")
|
||||
private BigDecimal deposit;
|
||||
|
||||
/** 公司类型(用数字表示的分类) */
|
||||
@Excel(name = "公司类型", readConverterExp = "用=数字表示的分类")
|
||||
private Long type;
|
||||
|
||||
/** 是否已删除 */
|
||||
@Excel(name = "是否已删除")
|
||||
private Integer isDelete;
|
||||
|
||||
/** 是否允许拆分账单 */
|
||||
@Excel(name = "是否允许拆分账单")
|
||||
private Integer allowSplitBill;
|
||||
|
||||
/** 最大百分比 */
|
||||
@Excel(name = "最大百分比")
|
||||
private BigDecimal maxPercentage;
|
||||
|
||||
/** 是否可新增套餐 */
|
||||
@Excel(name = "是否可新增套餐")
|
||||
private String isAddRules;
|
||||
|
||||
/** 租车平台分成比例 */
|
||||
@Excel(name = "租车平台分成比例")
|
||||
private Long sharingRatio;
|
||||
|
||||
/** 微信支付模式 */
|
||||
@Excel(name = "微信支付模式")
|
||||
private String wechatPayModel;
|
||||
|
||||
/** 微信收款商户号 */
|
||||
@Excel(name = "微信收款商户号")
|
||||
private String wechatReceivingAccount;
|
||||
|
||||
/** 微信收款密钥 */
|
||||
@Excel(name = "微信收款密钥")
|
||||
private String wechatKey;
|
||||
|
||||
/** 计费模式 */
|
||||
@Excel(name = "计费模式")
|
||||
private Long chargeMode;
|
||||
|
||||
/** 计费参数 */
|
||||
@Excel(name = "计费参数")
|
||||
private BigDecimal chargeParam;
|
||||
|
||||
/** 是否允许修改 */
|
||||
@Excel(name = "是否允许修改")
|
||||
private Integer allowChange;
|
||||
|
||||
/** 渠道/通路ID */
|
||||
@Excel(name = "渠道/通路ID")
|
||||
private Long channelId;
|
||||
|
||||
/** 运营商管理城市 */
|
||||
@Excel(name = "运营商管理城市")
|
||||
private String citys;
|
||||
|
||||
/** 支付宝支付模式 */
|
||||
@Excel(name = "支付宝支付模式")
|
||||
private Long aliPayModel;
|
||||
|
||||
/** 支付宝收款商户号 */
|
||||
@Excel(name = "支付宝收款商户号")
|
||||
private String aliReceivingAccount;
|
||||
|
||||
/** 支付宝收款密钥 */
|
||||
@Excel(name = "支付宝收款密钥")
|
||||
private String aliKey;
|
||||
|
||||
/** 服务费收费订单类型 */
|
||||
@Excel(name = "服务费收费订单类型")
|
||||
private String serviceOrderType;
|
||||
|
||||
/** 分账订单类型 */
|
||||
@Excel(name = "分账订单类型")
|
||||
private String splitOrderType;
|
||||
|
||||
/** 微信公共平台余额 */
|
||||
@Excel(name = "微信公共平台余额")
|
||||
private BigDecimal wechatBalance;
|
||||
|
||||
/** 支付宝公共平台余额 */
|
||||
@Excel(name = "支付宝公共平台余额")
|
||||
private BigDecimal alipayBalance;
|
||||
|
||||
/** 邀请奖励模式 */
|
||||
@Excel(name = "邀请奖励模式")
|
||||
private Long inviteRewardMode;
|
||||
|
||||
/** 邀请奖励参数 */
|
||||
@Excel(name = "邀请奖励参数")
|
||||
private BigDecimal inviteRewardParam;
|
||||
|
||||
/** 奖励方式 */
|
||||
@Excel(name = "奖励方式")
|
||||
private Long rewardType;
|
||||
|
||||
/** 奖励参数 */
|
||||
@Excel(name = "奖励参数")
|
||||
private BigDecimal rewardParam;
|
||||
|
||||
/** 是否预约 */
|
||||
@Excel(name = "是否预约")
|
||||
private Integer isReservation;
|
||||
|
||||
/** 预约时长 */
|
||||
@Excel(name = "预约时长")
|
||||
private Long reservationDuration;
|
||||
|
||||
/** 预约次数 */
|
||||
@Excel(name = "预约次数")
|
||||
private Long reservationNumber;
|
||||
|
||||
/** 部门状态(0正常 1停用) */
|
||||
@Excel(name = "部门状态", readConverterExp = "0=正常,1=停用")
|
||||
private String status;
|
||||
|
||||
/** 删除标志 */
|
||||
private String delFlag;
|
||||
|
||||
/** */
|
||||
private String extend1;
|
||||
|
||||
/** */
|
||||
private String extend2;
|
||||
|
||||
/** */
|
||||
private String extend3;
|
||||
|
||||
/** */
|
||||
private String extend4;
|
||||
|
||||
/** */
|
||||
private String extend5;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCompanyName(String companyName)
|
||||
{
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
public String getCompanyName()
|
||||
{
|
||||
return companyName;
|
||||
}
|
||||
public void setContactName(String contactName)
|
||||
{
|
||||
this.contactName = contactName;
|
||||
}
|
||||
|
||||
public String getContactName()
|
||||
{
|
||||
return contactName;
|
||||
}
|
||||
public void setPhone(String phone)
|
||||
{
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getPhone()
|
||||
{
|
||||
return phone;
|
||||
}
|
||||
public void setAddress(String address)
|
||||
{
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAddress()
|
||||
{
|
||||
return address;
|
||||
}
|
||||
public void setBalance(BigDecimal balance)
|
||||
{
|
||||
this.balance = balance;
|
||||
}
|
||||
|
||||
public BigDecimal getBalance()
|
||||
{
|
||||
return balance;
|
||||
}
|
||||
public void setDeposit(BigDecimal deposit)
|
||||
{
|
||||
this.deposit = deposit;
|
||||
}
|
||||
|
||||
public BigDecimal getDeposit()
|
||||
{
|
||||
return deposit;
|
||||
}
|
||||
public void setType(Long type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Long getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setIsDelete(Integer isDelete)
|
||||
{
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
public Integer getIsDelete()
|
||||
{
|
||||
return isDelete;
|
||||
}
|
||||
public void setAllowSplitBill(Integer allowSplitBill)
|
||||
{
|
||||
this.allowSplitBill = allowSplitBill;
|
||||
}
|
||||
|
||||
public Integer getAllowSplitBill()
|
||||
{
|
||||
return allowSplitBill;
|
||||
}
|
||||
public void setMaxPercentage(BigDecimal maxPercentage)
|
||||
{
|
||||
this.maxPercentage = maxPercentage;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxPercentage()
|
||||
{
|
||||
return maxPercentage;
|
||||
}
|
||||
public void setIsAddRules(String isAddRules)
|
||||
{
|
||||
this.isAddRules = isAddRules;
|
||||
}
|
||||
|
||||
public String getIsAddRules()
|
||||
{
|
||||
return isAddRules;
|
||||
}
|
||||
public void setSharingRatio(Long sharingRatio)
|
||||
{
|
||||
this.sharingRatio = sharingRatio;
|
||||
}
|
||||
|
||||
public Long getSharingRatio()
|
||||
{
|
||||
return sharingRatio;
|
||||
}
|
||||
public void setWechatPayModel(String wechatPayModel)
|
||||
{
|
||||
this.wechatPayModel = wechatPayModel;
|
||||
}
|
||||
|
||||
public String getWechatPayModel()
|
||||
{
|
||||
return wechatPayModel;
|
||||
}
|
||||
public void setWechatReceivingAccount(String wechatReceivingAccount)
|
||||
{
|
||||
this.wechatReceivingAccount = wechatReceivingAccount;
|
||||
}
|
||||
|
||||
public String getWechatReceivingAccount()
|
||||
{
|
||||
return wechatReceivingAccount;
|
||||
}
|
||||
public void setWechatKey(String wechatKey)
|
||||
{
|
||||
this.wechatKey = wechatKey;
|
||||
}
|
||||
|
||||
public String getWechatKey()
|
||||
{
|
||||
return wechatKey;
|
||||
}
|
||||
public void setChargeMode(Long chargeMode)
|
||||
{
|
||||
this.chargeMode = chargeMode;
|
||||
}
|
||||
|
||||
public Long getChargeMode()
|
||||
{
|
||||
return chargeMode;
|
||||
}
|
||||
public void setChargeParam(BigDecimal chargeParam)
|
||||
{
|
||||
this.chargeParam = chargeParam;
|
||||
}
|
||||
|
||||
public BigDecimal getChargeParam()
|
||||
{
|
||||
return chargeParam;
|
||||
}
|
||||
public void setAllowChange(Integer allowChange)
|
||||
{
|
||||
this.allowChange = allowChange;
|
||||
}
|
||||
|
||||
public Integer getAllowChange()
|
||||
{
|
||||
return allowChange;
|
||||
}
|
||||
public void setChannelId(Long channelId)
|
||||
{
|
||||
this.channelId = channelId;
|
||||
}
|
||||
|
||||
public Long getChannelId()
|
||||
{
|
||||
return channelId;
|
||||
}
|
||||
public void setCitys(String citys)
|
||||
{
|
||||
this.citys = citys;
|
||||
}
|
||||
|
||||
public String getCitys()
|
||||
{
|
||||
return citys;
|
||||
}
|
||||
public void setAliPayModel(Long aliPayModel)
|
||||
{
|
||||
this.aliPayModel = aliPayModel;
|
||||
}
|
||||
|
||||
public Long getAliPayModel()
|
||||
{
|
||||
return aliPayModel;
|
||||
}
|
||||
public void setAliReceivingAccount(String aliReceivingAccount)
|
||||
{
|
||||
this.aliReceivingAccount = aliReceivingAccount;
|
||||
}
|
||||
|
||||
public String getAliReceivingAccount()
|
||||
{
|
||||
return aliReceivingAccount;
|
||||
}
|
||||
public void setAliKey(String aliKey)
|
||||
{
|
||||
this.aliKey = aliKey;
|
||||
}
|
||||
|
||||
public String getAliKey()
|
||||
{
|
||||
return aliKey;
|
||||
}
|
||||
public void setServiceOrderType(String serviceOrderType)
|
||||
{
|
||||
this.serviceOrderType = serviceOrderType;
|
||||
}
|
||||
|
||||
public String getServiceOrderType()
|
||||
{
|
||||
return serviceOrderType;
|
||||
}
|
||||
public void setSplitOrderType(String splitOrderType)
|
||||
{
|
||||
this.splitOrderType = splitOrderType;
|
||||
}
|
||||
|
||||
public String getSplitOrderType()
|
||||
{
|
||||
return splitOrderType;
|
||||
}
|
||||
public void setWechatBalance(BigDecimal wechatBalance)
|
||||
{
|
||||
this.wechatBalance = wechatBalance;
|
||||
}
|
||||
|
||||
public BigDecimal getWechatBalance()
|
||||
{
|
||||
return wechatBalance;
|
||||
}
|
||||
public void setAlipayBalance(BigDecimal alipayBalance)
|
||||
{
|
||||
this.alipayBalance = alipayBalance;
|
||||
}
|
||||
|
||||
public BigDecimal getAlipayBalance()
|
||||
{
|
||||
return alipayBalance;
|
||||
}
|
||||
public void setInviteRewardMode(Long inviteRewardMode)
|
||||
{
|
||||
this.inviteRewardMode = inviteRewardMode;
|
||||
}
|
||||
|
||||
public Long getInviteRewardMode()
|
||||
{
|
||||
return inviteRewardMode;
|
||||
}
|
||||
public void setInviteRewardParam(BigDecimal inviteRewardParam)
|
||||
{
|
||||
this.inviteRewardParam = inviteRewardParam;
|
||||
}
|
||||
|
||||
public BigDecimal getInviteRewardParam()
|
||||
{
|
||||
return inviteRewardParam;
|
||||
}
|
||||
public void setRewardType(Long rewardType)
|
||||
{
|
||||
this.rewardType = rewardType;
|
||||
}
|
||||
|
||||
public Long getRewardType()
|
||||
{
|
||||
return rewardType;
|
||||
}
|
||||
public void setRewardParam(BigDecimal rewardParam)
|
||||
{
|
||||
this.rewardParam = rewardParam;
|
||||
}
|
||||
|
||||
public BigDecimal getRewardParam()
|
||||
{
|
||||
return rewardParam;
|
||||
}
|
||||
public void setIsReservation(Integer isReservation)
|
||||
{
|
||||
this.isReservation = isReservation;
|
||||
}
|
||||
|
||||
public Integer getIsReservation()
|
||||
{
|
||||
return isReservation;
|
||||
}
|
||||
public void setReservationDuration(Long reservationDuration)
|
||||
{
|
||||
this.reservationDuration = reservationDuration;
|
||||
}
|
||||
|
||||
public Long getReservationDuration()
|
||||
{
|
||||
return reservationDuration;
|
||||
}
|
||||
public void setReservationNumber(Long reservationNumber)
|
||||
{
|
||||
this.reservationNumber = reservationNumber;
|
||||
}
|
||||
|
||||
public Long getReservationNumber()
|
||||
{
|
||||
return reservationNumber;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
public void setExtend1(String extend1)
|
||||
{
|
||||
this.extend1 = extend1;
|
||||
}
|
||||
|
||||
public String getExtend1()
|
||||
{
|
||||
return extend1;
|
||||
}
|
||||
public void setExtend2(String extend2)
|
||||
{
|
||||
this.extend2 = extend2;
|
||||
}
|
||||
|
||||
public String getExtend2()
|
||||
{
|
||||
return extend2;
|
||||
}
|
||||
public void setExtend3(String extend3)
|
||||
{
|
||||
this.extend3 = extend3;
|
||||
}
|
||||
|
||||
public String getExtend3()
|
||||
{
|
||||
return extend3;
|
||||
}
|
||||
public void setExtend4(String extend4)
|
||||
{
|
||||
this.extend4 = extend4;
|
||||
}
|
||||
|
||||
public String getExtend4()
|
||||
{
|
||||
return extend4;
|
||||
}
|
||||
public void setExtend5(String extend5)
|
||||
{
|
||||
this.extend5 = extend5;
|
||||
}
|
||||
|
||||
public String getExtend5()
|
||||
{
|
||||
return extend5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("companyName", getCompanyName())
|
||||
.append("contactName", getContactName())
|
||||
.append("phone", getPhone())
|
||||
.append("address", getAddress())
|
||||
.append("balance", getBalance())
|
||||
.append("deposit", getDeposit())
|
||||
.append("type", getType())
|
||||
.append("isDelete", getIsDelete())
|
||||
.append("allowSplitBill", getAllowSplitBill())
|
||||
.append("maxPercentage", getMaxPercentage())
|
||||
.append("isAddRules", getIsAddRules())
|
||||
.append("sharingRatio", getSharingRatio())
|
||||
.append("wechatPayModel", getWechatPayModel())
|
||||
.append("wechatReceivingAccount", getWechatReceivingAccount())
|
||||
.append("wechatKey", getWechatKey())
|
||||
.append("chargeMode", getChargeMode())
|
||||
.append("chargeParam", getChargeParam())
|
||||
.append("allowChange", getAllowChange())
|
||||
.append("channelId", getChannelId())
|
||||
.append("citys", getCitys())
|
||||
.append("aliPayModel", getAliPayModel())
|
||||
.append("aliReceivingAccount", getAliReceivingAccount())
|
||||
.append("aliKey", getAliKey())
|
||||
.append("serviceOrderType", getServiceOrderType())
|
||||
.append("splitOrderType", getSplitOrderType())
|
||||
.append("wechatBalance", getWechatBalance())
|
||||
.append("alipayBalance", getAlipayBalance())
|
||||
.append("inviteRewardMode", getInviteRewardMode())
|
||||
.append("inviteRewardParam", getInviteRewardParam())
|
||||
.append("rewardType", getRewardType())
|
||||
.append("rewardParam", getRewardParam())
|
||||
.append("isReservation", getIsReservation())
|
||||
.append("reservationDuration", getReservationDuration())
|
||||
.append("reservationNumber", getReservationNumber())
|
||||
.append("status", getStatus())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("extend1", getExtend1())
|
||||
.append("extend2", getExtend2())
|
||||
.append("extend3", getExtend3())
|
||||
.append("extend4", getExtend4())
|
||||
.append("extend5", getExtend5())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.operation.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.operation.domain.Company;
|
||||
|
||||
/**
|
||||
* 运营商Mapper接口
|
||||
*
|
||||
* @author majian
|
||||
* @date 2025-06-30
|
||||
*/
|
||||
public interface CompanyMapper
|
||||
{
|
||||
/**
|
||||
* 查询运营商
|
||||
*
|
||||
* @param id 运营商主键
|
||||
* @return 运营商
|
||||
*/
|
||||
public Company selectCompanyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询运营商列表
|
||||
*
|
||||
* @param company 运营商
|
||||
* @return 运营商集合
|
||||
*/
|
||||
public List<Company> selectCompanyList(Company company);
|
||||
|
||||
/**
|
||||
* 新增运营商
|
||||
*
|
||||
* @param company 运营商
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCompany(Company company);
|
||||
|
||||
/**
|
||||
* 修改运营商
|
||||
*
|
||||
* @param company 运营商
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCompany(Company company);
|
||||
|
||||
/**
|
||||
* 删除运营商
|
||||
*
|
||||
* @param id 运营商主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCompanyById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除运营商
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCompanyByIds(String[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.operation.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.operation.domain.Company;
|
||||
|
||||
/**
|
||||
* 运营商Service接口
|
||||
*
|
||||
* @author majian
|
||||
* @date 2025-06-30
|
||||
*/
|
||||
public interface ICompanyService
|
||||
{
|
||||
/**
|
||||
* 查询运营商
|
||||
*
|
||||
* @param id 运营商主键
|
||||
* @return 运营商
|
||||
*/
|
||||
public Company selectCompanyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询运营商列表
|
||||
*
|
||||
* @param company 运营商
|
||||
* @return 运营商集合
|
||||
*/
|
||||
public List<Company> selectCompanyList(Company company);
|
||||
|
||||
/**
|
||||
* 新增运营商
|
||||
*
|
||||
* @param company 运营商
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCompany(Company company);
|
||||
|
||||
/**
|
||||
* 修改运营商
|
||||
*
|
||||
* @param company 运营商
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCompany(Company company);
|
||||
|
||||
/**
|
||||
* 批量删除运营商
|
||||
*
|
||||
* @param ids 需要删除的运营商主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCompanyByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除运营商信息
|
||||
*
|
||||
* @param id 运营商主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCompanyById(Long id);
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.operation.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.operation.mapper.CompanyMapper;
|
||||
import com.ruoyi.operation.domain.Company;
|
||||
import com.ruoyi.operation.service.ICompanyService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 运营商Service业务层处理
|
||||
*
|
||||
* @author majian
|
||||
* @date 2025-06-30
|
||||
*/
|
||||
@Service
|
||||
public class CompanyServiceImpl implements ICompanyService
|
||||
{
|
||||
@Autowired
|
||||
private CompanyMapper companyMapper;
|
||||
|
||||
/**
|
||||
* 查询运营商
|
||||
*
|
||||
* @param id 运营商主键
|
||||
* @return 运营商
|
||||
*/
|
||||
@Override
|
||||
public Company selectCompanyById(Long id)
|
||||
{
|
||||
return companyMapper.selectCompanyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询运营商列表
|
||||
*
|
||||
* @param company 运营商
|
||||
* @return 运营商
|
||||
*/
|
||||
@Override
|
||||
public List<Company> selectCompanyList(Company company)
|
||||
{
|
||||
return companyMapper.selectCompanyList(company);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增运营商
|
||||
*
|
||||
* @param company 运营商
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCompany(Company company)
|
||||
{
|
||||
company.setCreateTime(DateUtils.getNowDate());
|
||||
return companyMapper.insertCompany(company);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改运营商
|
||||
*
|
||||
* @param company 运营商
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCompany(Company company)
|
||||
{
|
||||
company.setUpdateTime(DateUtils.getNowDate());
|
||||
return companyMapper.updateCompany(company);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除运营商
|
||||
*
|
||||
* @param ids 需要删除的运营商主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCompanyByIds(String ids)
|
||||
{
|
||||
return companyMapper.deleteCompanyByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除运营商信息
|
||||
*
|
||||
* @param id 运营商主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCompanyById(Long id)
|
||||
{
|
||||
return companyMapper.deleteCompanyById(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user