Commit e88782e6 authored by libin's avatar libin

Merge branch 'base-modify' of http://113.105.137.151:22280/youjj/cloud-platform into base-modify

parents 51466f21 567589c8
#项目url #项目url
XXMP_URL=https://xxtest.upyuns.com/image XXMP_URL=/image
#token到期时间 #token到期时间
TOKEN_OVER_TIME=604800 TOKEN_OVER_TIME=604800
#itoken到期时间(6天) #itoken到期时间(6天)
......
...@@ -30,10 +30,10 @@ public class RabbitAdminConfig extends RabbitCommonConfig { ...@@ -30,10 +30,10 @@ public class RabbitAdminConfig extends RabbitCommonConfig {
//支付完成后永久绑定关系 //支付完成后永久绑定关系
add(new BindDTO(ORDER_RELATION_QUEUE, ADMIN_TOPIC, KEY_ORDER_PAY)); add(new BindDTO(ORDER_RELATION_QUEUE, ADMIN_TOPIC, KEY_ORDER_PAY));
//拥金计算 //拥金计算
add(new BindDTO(ORDER_WATER_QUEUE, ADMIN_TOPIC, KEY_ORDER_PAY)); add(new BindDTO(ORDER_WATER_QUEUE, ORDER_TOPIC, KEY_ORDER_PAY));
add(new BindDTO(ORDER_WATER_QUEUE, ADMIN_TOPIC, KEY_ORDER_FINLISH)); add(new BindDTO(ORDER_WATER_QUEUE, ORDER_TOPIC, KEY_ORDER_FINLISH));
add(new BindDTO(ORDER_WATER_QUEUE, ADMIN_TOPIC, KEY_ORDER_CANCEL)); add(new BindDTO(ORDER_WATER_QUEUE, ORDER_TOPIC, KEY_ORDER_CANCEL));
add(new BindDTO(ORDER_FINLISH_USER_RE_QUEUE, ADMIN_TOPIC, KEY_ORDER_FINLISH)); add(new BindDTO(ORDER_FINLISH_USER_RE_QUEUE, ORDER_TOPIC, KEY_ORDER_FINLISH));
//钱包 //钱包
add(new BindDTO(WALLET_ADD_QUEUE, ADMIN_TOPIC,KEY_WALLET_ADD )); add(new BindDTO(WALLET_ADD_QUEUE, ADMIN_TOPIC,KEY_WALLET_ADD ));
}}; }};
......
...@@ -95,7 +95,7 @@ public class ActivityPopularizeBiz extends BaseBiz<ActivityPopularizeMapper,Acti ...@@ -95,7 +95,7 @@ public class ActivityPopularizeBiz extends BaseBiz<ActivityPopularizeMapper,Acti
if(relationBiz.selectList(new ActivityPopularizeRelation(){{ if(relationBiz.selectList(new ActivityPopularizeRelation(){{
setMajorUserId(appUserDTO.getUserid()); setMajorUserId(appUserDTO.getUserid());
setPopularizeId(activityPopularize.getId()); setPopularizeId(activityPopularize.getId());
}}).size() >= 10) { }}).size() >= 2) {
activityPopularizeUser.setStatus(SYS_TRUE); activityPopularizeUser.setStatus(SYS_TRUE);
popularizeUserBiz.updateSelectiveById(activityPopularizeUser); popularizeUserBiz.updateSelectiveById(activityPopularizeUser);
popularizeLog.setStatus(SYS_TRUE); popularizeLog.setStatus(SYS_TRUE);
......
...@@ -161,13 +161,13 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> { ...@@ -161,13 +161,13 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
example.createCriteria().andEqualTo("tickerNo",TickerNo).andEqualTo("isDel",0); example.createCriteria().andEqualTo("tickerNo",TickerNo).andEqualTo("isDel",0);
List<UserCoupon> list=selectByExample(example); List<UserCoupon> list=selectByExample(example);
if(list.size()==0){ if(list.size()==0){
log.error(userId+"----没有可用优惠卷--TickerNo==="+TickerNo); log.error(userId+"----没有可用优惠卷--tickerNo==="+TickerNo);
return couponAmout; return couponAmout;
} }
UserCoupon userCoupon=list.get(0); UserCoupon userCoupon=list.get(0);
if(userCoupon!=null&&userCoupon.getIsUse()==1){ if(userCoupon!=null&&userCoupon.getIsUse()==1){
log.error(userId+"----该优惠卷已使用--TickerNo=="+TickerNo); log.error(userId+"----该优惠卷已使用--tickerNo=="+TickerNo);
return couponAmout; return couponAmout;
} }
if (type==1){ if (type==1){
...@@ -209,7 +209,7 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> { ...@@ -209,7 +209,7 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
return; return;
} }
Example example=new Example(UserCoupon.class); Example example=new Example(UserCoupon.class);
example.createCriteria().andEqualTo("TickerNo",TickerNo).andEqualTo("isDel",0); example.createCriteria().andEqualTo("tickerNo",TickerNo).andEqualTo("isDel",0);
List<UserCoupon> list=selectByExample(example); List<UserCoupon> list=selectByExample(example);
if(list.size()==0){ if(list.size()==0){
log.error(TickerNo+"----优惠卷不存在"); log.error(TickerNo+"----优惠卷不存在");
......
...@@ -240,6 +240,6 @@ public class BaseOrder implements Serializable { ...@@ -240,6 +240,6 @@ public class BaseOrder implements Serializable {
* 使用的优惠券票号,逗号分割 * 使用的优惠券票号,逗号分割
*/ */
@ApiModelProperty(value = "使用的优惠券票号,逗号分割") @ApiModelProperty(value = "使用的优惠券票号,逗号分割")
@Column(name = "coupon_ticker_no") @Column(name = "coupon_ticker_nos")
private String couponTickerNos; private String couponTickerNos;
} }
...@@ -161,16 +161,14 @@ public class BaseOrderController extends CommonBaseController implements UserRes ...@@ -161,16 +161,14 @@ public class BaseOrderController extends CommonBaseController implements UserRes
List<Integer> userIds = list.stream().map(OrderListVo::getUserId).distinct().collect(Collectors.toList()); List<Integer> userIds = list.stream().map(OrderListVo::getUserId).distinct().collect(Collectors.toList());
if(userIds != null && userIds.size() >0) { if(userIds != null && userIds.size() >0) {
ObjectRestResponse<List<AppUserVo>> objectRestResponse = userFeign.getByUserIds(userIds); ObjectRestResponse<List<AppUserVo>> objectRestResponse = userFeign.getByUserIds(userIds);
log.info("获取用户信息:objectRestResponse = {}", objectRestResponse.getMessage());
for (OrderListVo orderPageVO : list) { for (OrderListVo orderPageVO : list) {
if (objectRestResponse.getData() != null && objectRestResponse.getData().size() > 0) { if (objectRestResponse.getData() != null && objectRestResponse.getData().size() > 0) {
for (AppUserVo appUserVo : objectRestResponse.getData()) { for (AppUserVo appUserVo : objectRestResponse.getData()) {
if (appUserVo != null && appUserVo.getUserid() == orderPageVO.getUserId()) { if (appUserVo != null) {
orderPageVO.setTelephone(appUserVo.getUsername());
orderPageVO.setUsername(appUserVo.getNickname()); orderPageVO.setUsername(appUserVo.getNickname());
// ObjectRestResponse<AppUser> restResponse = userFeign.get(appUserVo.getUserid());
// if(restResponse.isRel()) {
// orderPageVO.setTelephone( restResponse.getData().getUsername());
// }
} }
} }
} }
......
...@@ -13,8 +13,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; ...@@ -13,8 +13,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@SpringBootApplication(scanBasePackages = { @SpringBootApplication(scanBasePackages = {
"com.xxfc.platform", "com.xxfc.platform",
"com.github.wxiaoqi.security.common.handler", "com.github.wxiaoqi.security.common.handler"
"com.github.wxiaoqi.security.common.log"
}) })
@EnableDiscoveryClient @EnableDiscoveryClient
@EnableAceAuthClient @EnableAceAuthClient
......
...@@ -82,16 +82,15 @@ public class OrderPayController extends BaseController<OrderPayBiz,OrderPay> { ...@@ -82,16 +82,15 @@ public class OrderPayController extends BaseController<OrderPayBiz,OrderPay> {
} }
@PostMapping(value = "/app/notify/alipay") @PostMapping(value = "/app/unauth/notify/alipay")
@IgnoreUserToken @IgnoreUserToken
public String alipayNotify(){ public String alipayNotify(){
return baseBiz.alipayNotify(); return baseBiz.alipayNotify();
} }
@GetMapping(value = "/app/generate_payment") @GetMapping(value = "/app/generate_payment")
public Object generatePayment(@RequestParam("orderCode") String orderCode, @RequestParam("description") String description, public Object generatePayment(OrderPayVo orderPayVo) {
@RequestParam("payType") String payType, @RequestParam("amount") Integer amount) { Object resp = baseBiz.generatePayment(orderPayVo);
Object resp = baseBiz.generatePayment(orderCode, description, payType, amount);
return resp; return resp;
} }
......
...@@ -15,6 +15,8 @@ import com.aliyuncs.profile.IClientProfile; ...@@ -15,6 +15,8 @@ import com.aliyuncs.profile.IClientProfile;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID; import java.util.UUID;
import com.github.wxiaoqi.security.common.util.RandomUtil; import com.github.wxiaoqi.security.common.util.RandomUtil;
...@@ -155,6 +157,62 @@ public class SmsService { ...@@ -155,6 +157,62 @@ public class SmsService {
return false; return false;
} }
public boolean sendTemplate(String PhoneNumbers,String params,String templateCode) throws ClientException {
//可自助调整超时时间
System.setProperty("sun.net.client.defaultConnectTimeout", "10000");
System.setProperty("sun.net.client.defaultReadTimeout", "10000");
//初始化acsClient,暂不支持region化
IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId, accessKeySecret);
DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", product, domain);
IAcsClient acsClient = new DefaultAcsClient(profile);
//组装请求对象-具体描述见控制台-文档部分内容
SendSmsRequest request = new SendSmsRequest();
//必填:待发送手机号
request.setPhoneNumbers(PhoneNumbers);
//必填:短信签名-可在短信控制台中找到
request.setSignName(SignName);
//必填:短信模板-可在短信控制台中找到
request.setTemplateCode(templateCode);
//可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
request.setTemplateParam(params);//\"name\":\"Tom\",
//选填-上行短信扩展码(无特殊需求用户请忽略此字段)
//request.setSmsUpExtendCode("90997");
//可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者
//request.setOutId("yourOutId");
//hint 此处可能会抛出异常,注意catch
SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request);
log.info("短信接口返回的数据----------------mobile======"+PhoneNumbers+"----templateParam===="+params);
log.info("Code=" + sendSmsResponse.getCode());
log.info("Message=" + sendSmsResponse.getMessage());
log.info("RequestId=" + sendSmsResponse.getRequestId());
log.info("BizId=" + sendSmsResponse.getBizId());
if(sendSmsResponse.getCode() != null && sendSmsResponse.getCode().equals("OK")) {
//请求成功
return true;
}
return false;
}
public String getString(Map<String,Object> params){
if(params!=null){
StringBuilder sb = new StringBuilder("{");
for (Object o : params.keySet()) {
sb.append("\"" + o + "\"" +":"+"\"" + params.get(o) + "\"" +",");
}
sb.replace(sb.length() - 1, sb.length(), "}");
return sb.toString();
}
return null;
}
/* public static QuerySendDetailsResponse querySendDetails(String bizId) throws ClientException { /* public static QuerySendDetailsResponse querySendDetails(String bizId) throws ClientException {
...@@ -188,14 +246,19 @@ public class SmsService { ...@@ -188,14 +246,19 @@ public class SmsService {
} }
*/ */
public static void main(String[] args) throws ClientException, InterruptedException { public static void main(String[] args) throws ClientException, InterruptedException {
SmsService SmsService=new SmsService(); SmsService smsService=new SmsService();
//发短信 //发短信
String response = SmsService.sendSms("15521075918","123456"); Map<String,Object> params=new HashMap<>();
params.put("name","何振");
params.put("code","123456");
params.put("time",5);
params.put("other","何振2");
smsService.sendTemplate("13612688539","123","SMS_171112286");
/*System.out.println("短信接口返回的数据----------------"); /*System.out.println("短信接口返回的数据----------------");
System.out.println("Code=" + response.getCode()); System.out.println("Code=" + response.getCode());
System.out.println("Message=" + response.getMessage()); System.out.println("Message=" + response.getMessage());
System.out.println("RequestId=" + response.getRequestId()); System.out.println("RequestId=" + response.getRequestId());
System.out.println("BizId=" + response.getBizId());*/ System.out.println("BizId=" + response.getBizId());*//*
Thread.sleep(3000L); Thread.sleep(3000L);
/* /*
......
...@@ -53,7 +53,7 @@ public class UploadService { ...@@ -53,7 +53,7 @@ public class UploadService {
String filePath = baseUploadPath + realFileRelPath; String filePath = baseUploadPath + realFileRelPath;
//将文件写入指定位置 //将文件写入指定位置
FileUtils.copyInputStreamToFile(file.getInputStream(), new File(filePath)); FileUtils.copyInputStreamToFile(file.getInputStream(), new File(filePath));
realFileRelPath= SystemConfig.XXMP_URL+realFileRelPath; realFileRelPath=xx_url+SystemConfig.XXMP_URL+realFileRelPath;
return realFileRelPath; return realFileRelPath;
} }
...@@ -83,7 +83,7 @@ public class UploadService { ...@@ -83,7 +83,7 @@ public class UploadService {
realFileRelPath=filePath + "/" + no + ".jpg"; realFileRelPath=filePath + "/" + no + ".jpg";
//将文件写入指定位置 //将文件写入指定位置
ImgBase64Util.generateImage(imgFile,realFileRelPath); ImgBase64Util.generateImage(imgFile,realFileRelPath);
realFileRelPath= SystemConfig.XXMP_URL+realFileRelPath; realFileRelPath=xx_url+SystemConfig.XXMP_URL+realFileRelPath;
return realFileRelPath; return realFileRelPath;
} }
......
...@@ -27,4 +27,7 @@ public class VehiclePlanDto extends PageParam { ...@@ -27,4 +27,7 @@ public class VehiclePlanDto extends PageParam {
@ApiModelProperty(value = "停车分公司Id") @ApiModelProperty(value = "停车分公司Id")
private Integer parkBranchCompanyId; private Integer parkBranchCompanyId;
@ApiModelProperty(value = "所属分公司大区")
private Integer zoneId;
} }
package com.xxfc.platform.vehicle.rest; package com.xxfc.platform.vehicle.rest;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.ace.cache.annotation.Cache;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONException; import com.alibaba.fastjson.JSONException;
import com.github.wxiaoqi.security.admin.feign.UserFeign; import com.github.wxiaoqi.security.admin.feign.UserFeign;
...@@ -24,11 +23,13 @@ import com.xxfc.platform.vehicle.common.CustomIllegalParamException; ...@@ -24,11 +23,13 @@ import com.xxfc.platform.vehicle.common.CustomIllegalParamException;
import com.xxfc.platform.vehicle.common.RestResponse; import com.xxfc.platform.vehicle.common.RestResponse;
import com.xxfc.platform.vehicle.constant.ResCode.ResCode; import com.xxfc.platform.vehicle.constant.ResCode.ResCode;
import com.xxfc.platform.vehicle.constant.VehicleBookRecordStatus; import com.xxfc.platform.vehicle.constant.VehicleBookRecordStatus;
import com.xxfc.platform.vehicle.entity.*; import com.xxfc.platform.vehicle.entity.Vehicle;
import com.xxfc.platform.vehicle.entity.VehicleBookInfo;
import com.xxfc.platform.vehicle.entity.VehicleBookRecord;
import com.xxfc.platform.vehicle.entity.VehicleWarningMsg;
import com.xxfc.platform.vehicle.pojo.*; import com.xxfc.platform.vehicle.pojo.*;
import com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto; import com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -39,12 +40,11 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -39,12 +40,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import tk.mybatis.mapper.entity.Example;
import tk.mybatis.mapper.weekend.WeekendSqls;
import java.util.*; import java.util.ArrayList;
import java.util.regex.Pattern; import java.util.HashSet;
import java.util.stream.Collectors; import java.util.List;
import java.util.Map;
import static com.xxfc.platform.vehicle.constant.VehicleConstant.USER_APP; import static com.xxfc.platform.vehicle.constant.VehicleConstant.USER_APP;
import static com.xxfc.platform.vehicle.constant.VehicleConstant.USER_APP_NAME; import static com.xxfc.platform.vehicle.constant.VehicleConstant.USER_APP_NAME;
...@@ -417,9 +417,10 @@ public class VehicleController extends BaseController<VehicleBiz> { ...@@ -417,9 +417,10 @@ public class VehicleController extends BaseController<VehicleBiz> {
} }
@RequestMapping(value = "/getVehiclePlanList", method = RequestMethod.GET) @RequestMapping(value = "/app/unauth/getVehiclePlanList", method = RequestMethod.GET)
@ApiOperation(value = "获取排车信息") @ApiOperation(value = "获取排车信息")
@IgnoreClientToken @IgnoreClientToken
@IgnoreUserToken
public ObjectRestResponse<Map<String, Object>> getVehiclePlanList(VehiclePlanDto vehiclePlanDto) { public ObjectRestResponse<Map<String, Object>> getVehiclePlanList(VehiclePlanDto vehiclePlanDto) {
//获取统计信息 //获取统计信息
List<VehicleCountVo> vehicleCountVos = baseBiz.countVehicleByParam(vehiclePlanDto); List<VehicleCountVo> vehicleCountVos = baseBiz.countVehicleByParam(vehiclePlanDto);
......
...@@ -425,6 +425,8 @@ ...@@ -425,6 +425,8 @@
<select id="getAllVehicle" parameterType="java.util.Map" resultMap="searchModel"> <select id="getAllVehicle" parameterType="java.util.Map" resultMap="searchModel">
select * select *
from vehicle v1 from vehicle v1
-- 所属分公司
LEFT JOIN branch_company bc2 ON v1.subordinate_branch = bc2.id
<where> <where>
<if test="startTime != null"> <if test="startTime != null">
and v1.create_time between #{startTime} and #{endTime} and v1.create_time between #{startTime} and #{endTime}
...@@ -441,36 +443,46 @@ ...@@ -441,36 +443,46 @@
<if test="parkBranchCompanyId != null"> <if test="parkBranchCompanyId != null">
and v1.park_branch_company_id = #{parkBranchCompanyId} and v1.park_branch_company_id = #{parkBranchCompanyId}
</if> </if>
<if test="zoneId !=null">
and bc2.zone_id = #{zoneId}
</if>
</where> </where>
</select> </select>
<select id="countVehicleByParam" parameterType="com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto" <select id="countVehicleByParam" parameterType="com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto"
resultType="com.xxfc.platform.vehicle.pojo.VehicleCountVo"> resultType="com.xxfc.platform.vehicle.pojo.VehicleCountVo">
SELECT count(*) total , SELECT count(*) total ,
CASE CASE
WHEN travel_status = 1 THEN WHEN v1.status = 1 THEN
'1' '1'
WHEN travel_status = 2 THEN WHEN v1.status = 2 THEN
'2' '2'
WHEN travel_status = 3 THEN WHEN v1.status = 3 THEN
'3' '3'
WHEN travel_status = 4 THEN WHEN v1.status = 4 THEN
'4' '4'
WHEN v1.status = 5 THEN
'5'
ELSE ELSE
'-1' '6'
END travel_status, END travel_status,
CASE CASE
WHEN travel_status = 1 THEN WHEN v1.status = 1 THEN
'出行中' '正常运行'
WHEN travel_status = 2 THEN WHEN v1.status = 2 THEN
'预约中' '维修'
WHEN travel_status = 3 THEN WHEN v1.status = 3 THEN
'空闲中' '报废'
WHEN travel_status = 4 THEN WHEN v1.status = 4 THEN
'保养中' '出车'
WHEN v1.status = 5 THEN
'保养'
ELSE ELSE
'不可用' '不可用'
END detail END detail
from vehicle v1 from vehicle v1
-- 所属分公司
LEFT JOIN branch_company bc1 ON v1.subordinate_branch = bc1.id
<where> <where>
<if test="startTime != null"> <if test="startTime != null">
and v1.create_time between #{startTime} and #{endTime} and v1.create_time between #{startTime} and #{endTime}
...@@ -487,10 +499,15 @@ ...@@ -487,10 +499,15 @@
<if test="parkBranchCompanyId != null"> <if test="parkBranchCompanyId != null">
and v1.park_branch_company_id = #{parkBranchCompanyId} and v1.park_branch_company_id = #{parkBranchCompanyId}
</if> </if>
<if test="zoneId !=null">
and bc1.zone_id = #{zoneId}
</if>
</where> </where>
GROUP BY travel_status GROUP BY v1.status
union all union all
SELECT count(*) total, '0' travel_status, '总数' detail from vehicle v2 SELECT count(*) total, '0' travel_status, '总数' detail from vehicle v2
-- 所属分公司
LEFT JOIN branch_company bc2 ON v2.subordinate_branch = bc2.id
<where> <where>
<if test="startTime != null"> <if test="startTime != null">
and v2.create_time between #{startTime} and #{endTime} and v2.create_time between #{startTime} and #{endTime}
...@@ -507,44 +524,10 @@ ...@@ -507,44 +524,10 @@
<if test="parkBranchCompanyId != null"> <if test="parkBranchCompanyId != null">
and v2.park_branch_company_id = #{parkBranchCompanyId} and v2.park_branch_company_id = #{parkBranchCompanyId}
</if> </if>
</where> <if test="zoneId !=null">
union all and bc2.zone_id = #{zoneId}
SELECT count(*) total,
CASE
WHEN status = 1 THEN
'5'
WHEN status = 2 THEN
'6'
ELSE
'7'
END travel_status,
CASE
WHEN status = 1 THEN
'正常运行'
WHEN status = 2 THEN
'维修'
ELSE
'报废'
END travel_status
FROM vehicle v3
<where>
<if test="startTime != null">
and v3.create_time between #{startTime} and #{endTime}
</if>
<if test="numberPlate != null">
and v3.number_plate = #{numberPlate}
</if>
<if test="status != null">
and v3.status = #{status}
</if>
<if test="subordinateBranch != null">
and v3.subordinate_branch = #{subordinateBranch}
</if>
<if test="parkBranchCompanyId != null">
and v3.park_branch_company_id = #{parkBranchCompanyId}
</if> </if>
</where> </where>
GROUP BY status
</select> </select>
<!-- 查询可用车辆/车型 的公用 from 和 where 部分条件 --> <!-- 查询可用车辆/车型 的公用 from 和 where 部分条件 -->
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
select w.* select w.*
from vehicle_warning_msg w from vehicle_warning_msg w
left join vehicle v on w.vehicle_id = v.id left join vehicle v on w.vehicle_id = v.id
LEFT JOIN branch_company bc2 ON v.subordinate_branch = bc2.id
<where> <where>
<if test="vehicleId != null"> <if test="vehicleId != null">
and w.vehicle_id = #{vehicleId} and w.vehicle_id = #{vehicleId}
...@@ -48,6 +49,9 @@ ...@@ -48,6 +49,9 @@
<if test="parkBranchCompanyId != null"> <if test="parkBranchCompanyId != null">
and v.park_branch_company_id = #{parkBranchCompanyId} and v.park_branch_company_id = #{parkBranchCompanyId}
</if> </if>
<if test="zoneId !=null">
and bc2.zone_id = #{zoneId}
</if>
</where> </where>
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment