租车套餐

This commit is contained in:
19173159168
2025-07-08 23:43:19 +08:00
parent 8a9d3b392e
commit ed0c78bb13
11 changed files with 161 additions and 19 deletions

View File

@ -5,11 +5,7 @@ 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 org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.operation.domain.ZcRentBatteyRule;
@ -124,4 +120,12 @@ public class ZcRentBatteyRuleController extends BaseController
{
return toAjax(zcRentBatteyRuleService.deleteZcRentBatteyRuleByIds(ids));
}
@GetMapping("/list/byLeaseType")
@ResponseBody
public List<ZcRentBatteyRule> listByLeaseType(@RequestParam("leaseType") Long leaseType) {
ZcRentBatteyRule zcRentBatteyRule = new ZcRentBatteyRule();
zcRentBatteyRule.setMealType(leaseType);
return zcRentBatteyRuleService.selectZcRentBatteyRuleList(zcRentBatteyRule);
}
}

View File

@ -150,6 +150,16 @@ public class ZcRentCarRuleController extends BaseController
@Log(title = "运营商管理", businessType = BusinessType.UPDATE)
@RequiresPermissions("operation:company:edit")
@PostMapping("/changeStatus")
@ResponseBody
public AjaxResult changeStatus(ZcRentCarRule zcRentCarRule)
{
return toAjax(zcRentCarRuleService.changeStatus(zcRentCarRule));
}
public static String generateTimestampBasedCode() {
Random random = new Random();
// 获取当前时间戳的后6位

View File

@ -77,11 +77,11 @@ public class CompanyStore extends BaseEntity
/** 纬度 */
@Excel(name = "纬度")
private String latitude;
private double latitude;
/** 经度 */
@Excel(name = "经度")
private String longitude;
private double longitude;
/** 合同签订日期 */
@Excel(name = "合同签订日期")
@ -329,21 +329,21 @@ public class CompanyStore extends BaseEntity
{
return image;
}
public void setLatitude(String latitude)
public void setLatitude(double latitude)
{
this.latitude = latitude;
}
public String getLatitude()
public double getLatitude()
{
return latitude;
}
public void setLongitude(String longitude)
public void setLongitude(double longitude)
{
this.longitude = longitude;
}
public String getLongitude()
public double getLongitude()
{
return longitude;
}

View File

@ -1,6 +1,7 @@
package com.ruoyi.operation.service;
import java.util.List;
import com.ruoyi.operation.domain.ZcRentCarRule;
/**
@ -58,4 +59,6 @@ public interface IZcRentCarRuleService
* @return 结果
*/
public int deleteZcRentCarRuleById(Long id);
public int changeStatus(ZcRentCarRule zcRentCarRule);
}

View File

@ -95,4 +95,10 @@ public class ZcRentCarRuleServiceImpl implements IZcRentCarRuleService
{
return zcRentCarRuleMapper.deleteZcRentCarRuleById(id);
}
@Override
public int changeStatus(ZcRentCarRule zcRentCarRule) {
zcRentCarRule.setUpdateTime(DateUtils.getNowDate());
return zcRentCarRuleMapper.updateZcRentCarRule(zcRentCarRule);
}
}