Commit 615a35c3 authored by zhangzc's avatar zhangzc

修复司机账号controller

parent 99ffcd77
...@@ -49,6 +49,7 @@ public class CheckCustomToken { ...@@ -49,6 +49,7 @@ public class CheckCustomToken {
"/app/ownerBackend/password/reset".equals(url) || "/app/ownerBackend/password/reset".equals(url) ||
"/app/driverBackend/account/login/loginBySms".equals(url) || "/app/driverBackend/account/login/loginBySms".equals(url) ||
"/app/driverBackend/account/login/loginByPwd".equals(url) || "/app/driverBackend/account/login/loginByPwd".equals(url) ||
"/app/driverBackend/account/carrier/list".equals(url) ||
"/app/driverBackend/password/reset".equals(url)) { "/app/driverBackend/password/reset".equals(url)) {
//此类接口不校验token //此类接口不校验token
......
package com.esv.freight.app.feign;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
/**
* @description:
* @project: Freight
* @name: com.esv.freight.app.feign.DriverInterface
* @author: 张志臣
* @email: zhangzhichen@esvtek.com
* @createTime: 2020/04/29 15:00
* @version:1.0
*/
@FeignClient(value = "freight-customer-service")
public interface CarrierInterface {
/**
* 查询所有承运商列表
* @param
* @return
*/
@PostMapping(value = "/customer/carrier/account/all")
// JSONObject all();
JSONObject all(JSONObject bodyJson);
}
...@@ -17,28 +17,28 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -17,28 +17,28 @@ import org.springframework.web.bind.annotation.PostMapping;
public interface DriverInterface { public interface DriverInterface {
/** /**
* 校验司机账号密码 * 查询司机详情-通过帐号
* @param bodyJson * @param bodyJson
* @return * @return
*/ */
@PostMapping(value = "/customer/carrier/driver/password/check") @PostMapping(value = "/customer/carrier/driver/getDetailByAccount")
JSONObject checkAccountPwd(JSONObject bodyJson); JSONObject getDetailByAccount(JSONObject bodyJson);
/** /**
* 注册司机账号 * 注册司机账号
* @param bodyJson * @param bodyJson
* @return * @return
*/ */
@PostMapping(value = "/customer/goodsowner/account/register") @PostMapping(value = "/customer/carrier/driver/register")
JSONObject accountRegister(JSONObject bodyJson); JSONObject register(JSONObject bodyJson);
/** /**
* 获取司机账号详情 * 帐号密码校验
* @param bodyJson * @param bodyJson
* @return * @return
*/ */
@PostMapping(value = "/customer/goodsowner/account/detail") @PostMapping(value = "/customer/carrier/driver/account/check")
JSONObject getAccountDetail(JSONObject bodyJson); JSONObject accountCheck(JSONObject bodyJson);
/** /**
* 更改司机账号信息 * 更改司机账号信息
......
package com.esv.freight.app.module.account.controller; package com.esv.freight.app.module.account.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.esv.freight.app.common.response.ECode; import com.esv.freight.app.common.response.ECode;
import com.esv.freight.app.common.response.EResponse; import com.esv.freight.app.common.response.EResponse;
import com.esv.freight.app.common.util.ReqUtils; import com.esv.freight.app.common.util.ReqUtils;
import com.esv.freight.app.common.validator.groups.ValidatorInsert; import com.esv.freight.app.common.validator.groups.ValidatorInsert;
import com.esv.freight.app.feign.CarrierInterface;
import com.esv.freight.app.feign.DriverInterface; import com.esv.freight.app.feign.DriverInterface;
import com.esv.freight.app.feign.NoticeInterface; import com.esv.freight.app.feign.NoticeInterface;
import com.esv.freight.app.module.account.CustomToken; import com.esv.freight.app.module.account.CustomToken;
import com.esv.freight.app.module.account.form.DriverAuthForm; import com.esv.freight.app.module.account.form.DriverAuthForm;
import com.esv.freight.app.module.account.form.LoginForm; import com.esv.freight.app.module.account.form.LoginForm;
import com.esv.freight.app.module.account.form.OwnerAuthForm;
import com.esv.freight.app.module.account.form.RefreshTokenForm; import com.esv.freight.app.module.account.form.RefreshTokenForm;
import com.esv.freight.app.module.account.service.AppLoginService; import com.esv.freight.app.module.account.service.AppLoginService;
import com.esv.freight.app.module.account.validator.groups.ValidatorAccountExist;
import com.esv.freight.app.module.account.validator.groups.ValidatorLoginByPwd; import com.esv.freight.app.module.account.validator.groups.ValidatorLoginByPwd;
import com.esv.freight.app.module.account.validator.groups.ValidatorLoginBySms; import com.esv.freight.app.module.account.validator.groups.ValidatorLoginBySms;
import com.esv.freight.app.module.account.vo.AccountExistVO;
import com.esv.freight.app.module.account.vo.CarrierInfoBriefVO;
import com.esv.freight.app.module.account.vo.DriverAccountDetailVO; import com.esv.freight.app.module.account.vo.DriverAccountDetailVO;
import com.esv.freight.app.module.account.vo.LoginVO; import com.esv.freight.app.module.account.vo.LoginVO;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -22,6 +26,9 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -22,6 +26,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
/** /**
* @description: 账号Controller * @description: 账号Controller
* @project: Freight * @project: Freight
...@@ -40,17 +47,19 @@ public class DriverAccountController { ...@@ -40,17 +47,19 @@ public class DriverAccountController {
private DriverInterface driverInterface; private DriverInterface driverInterface;
private NoticeInterface noticeInterface; private NoticeInterface noticeInterface;
private AppLoginService appLoginService; private AppLoginService appLoginService;
private CarrierInterface carrierInterface;
@Autowired @Autowired
public DriverAccountController(DriverInterface driverInterface, NoticeInterface noticeInterface, AppLoginService appLoginService) { public DriverAccountController(CarrierInterface carrierInterface, DriverInterface driverInterface, NoticeInterface noticeInterface, AppLoginService appLoginService) {
this.noticeInterface = noticeInterface; this.noticeInterface = noticeInterface;
this.appLoginService = appLoginService; this.appLoginService = appLoginService;
this.appLoginService = appLoginService; this.driverInterface = driverInterface;
this.carrierInterface = carrierInterface;
} }
/** /**
* description 短信验证码登录 * description 短信验证码登录
* param [LoginBySmsForm] * param [LoginForm]
* return com.esv.freight.common.response.EResponse * return com.esv.freight.common.response.EResponse
* author 张志臣 * author 张志臣
* createTime 2020/04/14 14:00 * createTime 2020/04/14 14:00
...@@ -74,7 +83,8 @@ public class DriverAccountController { ...@@ -74,7 +83,8 @@ public class DriverAccountController {
// 调用注册帐号接口 // 调用注册帐号接口
reqJson.clear(); reqJson.clear();
reqJson.put("account", loginForm.getPhone()); reqJson.put("account", loginForm.getPhone());
JSONObject resultRegister = driverInterface.accountRegister(reqJson); reqJson.put("carrierId", loginForm.getCarrierId());
JSONObject resultRegister = driverInterface.register(reqJson);
// 1001表示 帐号已存在 // 1001表示 帐号已存在
if(resultRegister.getInteger("code") != 200 && resultRegister.getInteger("code") != 1001) { if(resultRegister.getInteger("code") != 200 && resultRegister.getInteger("code") != 1001) {
...@@ -86,8 +96,8 @@ public class DriverAccountController { ...@@ -86,8 +96,8 @@ public class DriverAccountController {
} }
/** /**
* description 帐号密码登录RequestHeader * description 帐号密码登录
* param [LoginByPwdForm] * param [LoginForm]
* return com.esv.freight.common.response.EResponse * return com.esv.freight.common.response.EResponse
* author 张志臣 * author 张志臣
* createTime 2020/04/14 14:00 * createTime 2020/04/14 14:00
...@@ -99,7 +109,7 @@ public class DriverAccountController { ...@@ -99,7 +109,7 @@ public class DriverAccountController {
JSONObject reqJson = new JSONObject(); JSONObject reqJson = new JSONObject();
reqJson.put("account", loginForm.getPhone()); reqJson.put("account", loginForm.getPhone());
reqJson.put("password", loginForm.getPwd()); reqJson.put("password", loginForm.getPwd());
JSONObject result = driverInterface.checkAccountPwd(reqJson); JSONObject result = driverInterface.accountCheck(reqJson);
if(result.getInteger("code") != 200) { if(result.getInteger("code") != 200) {
return EResponse.error(result.getInteger("code"), result.getString("message")); return EResponse.error(result.getInteger("code"), result.getString("message"));
...@@ -109,6 +119,39 @@ public class DriverAccountController { ...@@ -109,6 +119,39 @@ public class DriverAccountController {
return EResponse.ok(loginByPwdVO); return EResponse.ok(loginByPwdVO);
} }
/**
* description 检验手机号是否已存在,司机短信验证码登录时调用,如果已存在直接注册,如果不存在需要APP先选择一个承运商
* param [LoginForm]
* return com.esv.freight.common.response.EResponse
* author 张志臣
* createTime 2020/05/06 10:00
**/
@PostMapping("/login/check/phone")
public EResponse accountIsExist(@RequestBody(required=false) @Validated(ValidatorAccountExist.class) LoginForm loginForm) {
// 调用查询司机详情-通过帐号接口
JSONObject reqJson = new JSONObject();
reqJson.put("account", loginForm.getPhone());
JSONObject result = driverInterface.getDetailByAccount(reqJson);
// 1001-表示账号不存在
if(result.getInteger("code") == 1001) {
AccountExistVO vo = new AccountExistVO();
vo.setAccountStatus(2);
return EResponse.ok(vo);
}
if(result.getInteger("code") != 200) {
return EResponse.error(result.getInteger("code"), result.getString("message"));
}
AccountExistVO vo = new AccountExistVO();
vo.setAccountStatus(1);
vo.setCarrierId(result.getJSONObject("data").getLong("carrierId"));
vo.setCarrierName(result.getJSONObject("data").getString("carrierName"));
return EResponse.ok(vo);
}
/** /**
* description 帐号登出 * description 帐号登出
* param * param
...@@ -154,11 +197,11 @@ public class DriverAccountController { ...@@ -154,11 +197,11 @@ public class DriverAccountController {
String phone = ReqUtils.getTokenInfo().getAccount(); String phone = ReqUtils.getTokenInfo().getAccount();
// 调用帐号密码校验接口 // 调用获取账号详情接口
JSONObject reqJsonDetail = new JSONObject(); JSONObject reqJsonDetail = new JSONObject();
reqJsonDetail.put("account", phone); reqJsonDetail.put("account", phone);
log.info(reqJsonDetail.toJSONString()); log.info(reqJsonDetail.toJSONString());
JSONObject result = driverInterface.getAccountDetail(reqJsonDetail); JSONObject result = driverInterface.getDetailByAccount(reqJsonDetail);
log.info(result.toJSONString()); log.info(result.toJSONString());
if(result.getInteger("code") != 200) { if(result.getInteger("code") != 200) {
...@@ -168,10 +211,11 @@ public class DriverAccountController { ...@@ -168,10 +211,11 @@ public class DriverAccountController {
DriverAccountDetailVO detailVO = new DriverAccountDetailVO(); DriverAccountDetailVO detailVO = new DriverAccountDetailVO();
detailVO.setId(String.valueOf(result.getJSONObject("data").getLong("id"))); detailVO.setId(String.valueOf(result.getJSONObject("data").getLong("id")));
detailVO.setCarrierId(result.getJSONObject("data").getLong("carrierId")); detailVO.setCarrierId(result.getJSONObject("data").getLong("carrierId"));
detailVO.setCarrierName(result.getJSONObject("data").getString("carrierName"));
detailVO.setAccount(result.getJSONObject("data").getString("account")); detailVO.setAccount(result.getJSONObject("data").getString("account"));
detailVO.setSourceType(result.getJSONObject("data").getString("sourceType")); detailVO.setAccountStatus(result.getJSONObject("data").getInteger("accountStatus"));
detailVO.setSourceType(result.getJSONObject("data").getInteger("sourceType"));
detailVO.setAuditStatus(result.getJSONObject("data").getInteger("auditStatus")); detailVO.setAuditStatus(result.getJSONObject("data").getInteger("auditStatus"));
detailVO.setAuthenticateStatus(result.getJSONObject("data").getInteger("authenticateStatus"));
detailVO.setName(result.getJSONObject("data").getString("name")); detailVO.setName(result.getJSONObject("data").getString("name"));
detailVO.setIdCard(result.getJSONObject("data").getString("idCard")); detailVO.setIdCard(result.getJSONObject("data").getString("idCard"));
detailVO.setIdCardExpireDate(result.getJSONObject("data").getString("idCardExpireDate")); detailVO.setIdCardExpireDate(result.getJSONObject("data").getString("idCardExpireDate"));
...@@ -229,4 +273,52 @@ public class DriverAccountController { ...@@ -229,4 +273,52 @@ public class DriverAccountController {
return EResponse.ok(); return EResponse.ok();
} }
/**
* description 获取承运商列表
* return com.esv.freight.common.response.EResponse
* author 张志臣
* createTime 2020/04/13 10:00
**/
@PostMapping("/carrier/list")
public EResponse getCarrierList() {
// 调用获取承运商列表接口
JSONObject reqJson = new JSONObject();
JSONObject result = carrierInterface.all(reqJson);
log.info(result.toJSONString());
if(result.getInteger("code") != 200) {
return EResponse.error(result.getInteger("code"), result.getString("message"));
}
List<CarrierInfoBriefVO> carrierInfoBriefVOList = new ArrayList<>();
JSONArray items = result.getJSONArray("data");
if(items.size() > 0) {
for(int i=0; i<items.size(); ++i) {
CarrierInfoBriefVO vo = new CarrierInfoBriefVO();
JSONObject object = items.getJSONObject(i);
vo.setId(object.getLong("id"));
vo.setAccount(object.getString("account"));
vo.setAccountStatus(object.getInteger("accountStatus"));
vo.setCarrierNumber(object.getString("carrierNumber"));
vo.setCarrierName(object.getString("carrierName"));
carrierInfoBriefVOList.add(vo);
}
}
return EResponse.ok(carrierInfoBriefVOList);
}
/**
* description 司机账号停用
* return com.esv.freight.common.response.EResponse
* author 张志臣
* createTime 2020/05/06 11:00
**/
@PostMapping("/account/stop")
public EResponse stopUsingAccount(@RequestBody(required=false) @Validated(ValidatorAccountExist.class) LoginForm loginForm) {
appLoginService.stopUsing(loginForm.getPhone());
return EResponse.ok();
}
} }
...@@ -7,6 +7,7 @@ import com.esv.freight.app.feign.NoticeInterface; ...@@ -7,6 +7,7 @@ import com.esv.freight.app.feign.NoticeInterface;
import com.esv.freight.app.module.account.CustomToken; import com.esv.freight.app.module.account.CustomToken;
import com.esv.freight.app.module.account.form.*; import com.esv.freight.app.module.account.form.*;
import com.esv.freight.app.module.account.service.AppLoginService; import com.esv.freight.app.module.account.service.AppLoginService;
import com.esv.freight.app.module.account.validator.groups.ValidatorAccountExist;
import com.esv.freight.app.module.account.validator.groups.ValidatorLoginByPwd; import com.esv.freight.app.module.account.validator.groups.ValidatorLoginByPwd;
import com.esv.freight.app.module.account.validator.groups.ValidatorLoginBySms; import com.esv.freight.app.module.account.validator.groups.ValidatorLoginBySms;
import com.esv.freight.app.module.account.vo.OwnerAccountDetailVO; import com.esv.freight.app.module.account.vo.OwnerAccountDetailVO;
...@@ -149,7 +150,7 @@ public class OwnerAccountController { ...@@ -149,7 +150,7 @@ public class OwnerAccountController {
String phone = ReqUtils.getTokenInfo().getAccount(); String phone = ReqUtils.getTokenInfo().getAccount();
// 调用帐号密码校验接口 // 调用获取账号详情接口
JSONObject reqJsonDetail = new JSONObject(); JSONObject reqJsonDetail = new JSONObject();
reqJsonDetail.put("account", phone); reqJsonDetail.put("account", phone);
log.info(reqJsonDetail.toJSONString()); log.info(reqJsonDetail.toJSONString());
...@@ -236,4 +237,17 @@ public class OwnerAccountController { ...@@ -236,4 +237,17 @@ public class OwnerAccountController {
return EResponse.ok(); return EResponse.ok();
} }
/**
* description 货主账号停用
* return com.esv.freight.common.response.EResponse
* author 张志臣
* createTime 2020/05/06 11:00
**/
@PostMapping("/account/stop")
public EResponse stopUsingAccount(@RequestBody(required=false) @Validated(ValidatorAccountExist.class) LoginForm loginForm) {
appLoginService.stopUsing(loginForm.getPhone());
return EResponse.ok();
}
} }
\ No newline at end of file
...@@ -4,12 +4,15 @@ import com.esv.freight.app.common.validator.groups.ValidatorDelete; ...@@ -4,12 +4,15 @@ import com.esv.freight.app.common.validator.groups.ValidatorDelete;
import com.esv.freight.app.common.validator.groups.ValidatorInsert; import com.esv.freight.app.common.validator.groups.ValidatorInsert;
import com.esv.freight.app.common.validator.groups.ValidatorList; import com.esv.freight.app.common.validator.groups.ValidatorList;
import com.esv.freight.app.common.validator.groups.ValidatorUpdate; import com.esv.freight.app.common.validator.groups.ValidatorUpdate;
import com.esv.freight.app.module.account.validator.groups.ValidatorAccountExist;
import com.esv.freight.app.module.account.validator.groups.ValidatorDriverLoginBySms;
import com.esv.freight.app.module.account.validator.groups.ValidatorLoginByPwd; import com.esv.freight.app.module.account.validator.groups.ValidatorLoginByPwd;
import com.esv.freight.app.module.account.validator.groups.ValidatorLoginBySms; import com.esv.freight.app.module.account.validator.groups.ValidatorLoginBySms;
import lombok.Data; import lombok.Data;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/** /**
* @description: * @description:
...@@ -26,21 +29,27 @@ public class LoginForm { ...@@ -26,21 +29,27 @@ public class LoginForm {
/** /**
* 手机号 * 手机号
*/ */
@Length(min = 11, max = 11, message = "参数phone长度不合法", groups = {ValidatorInsert.class, ValidatorLoginByPwd.class, ValidatorLoginBySms.class}) @Length(min = 11, max = 11, message = "参数phone长度不合法", groups = {ValidatorLoginByPwd.class, ValidatorLoginBySms.class, ValidatorAccountExist.class, ValidatorDriverLoginBySms.class})
@NotBlank(message = "参数phone不能为空", groups = {ValidatorInsert.class, ValidatorLoginByPwd.class, ValidatorLoginBySms.class}) @NotNull(message = "参数phone不能为空", groups = {ValidatorLoginByPwd.class, ValidatorLoginBySms.class, ValidatorAccountExist.class, ValidatorDriverLoginBySms.class})
private String phone; private String phone;
/** /**
* 短信验证码 * 短信验证码
*/ */
@Length(min = 6, max = 6, message = "参数smsCode长度不合法", groups = {ValidatorInsert.class, ValidatorLoginBySms.class}) @Length(min = 6, max = 6, message = "参数smsCode长度不合法", groups = {ValidatorLoginBySms.class, ValidatorDriverLoginBySms.class})
@NotBlank(message = "参数smsCode不能为空", groups = {ValidatorInsert.class, ValidatorLoginBySms.class}) @NotNull(message = "参数smsCode不能为空", groups = {ValidatorLoginBySms.class})
private String smsCode; private String smsCode;
/** /**
* 密码 * 密码
*/ */
@Length(min = 32, max = 32, message = "参数pwd长度不合法", groups = {ValidatorInsert.class, ValidatorLoginByPwd.class}) @Length(min = 32, max = 32, message = "参数pwd长度不合法", groups = {ValidatorLoginByPwd.class})
@NotBlank(message = "参数pwd不能为空", groups = {ValidatorInsert.class, ValidatorLoginByPwd.class}) @NotNull(message = "参数pwd不能为空", groups = {ValidatorLoginByPwd.class})
private String pwd; private String pwd;
/**
* 承运商帐号ID
*/
@NotNull(message = "参数carrierId不能为空", groups = {ValidatorDriverLoginBySms.class})
private String carrierId;
} }
...@@ -14,13 +14,57 @@ import com.esv.freight.app.module.account.vo.LoginVO; ...@@ -14,13 +14,57 @@ import com.esv.freight.app.module.account.vo.LoginVO;
*/ */
public interface AppLoginService extends IService<AppLoginEntity> { public interface AppLoginService extends IService<AppLoginEntity> {
/**
* description 账号登录
* param [phone]
* return LoginVO
* author 张志臣
* createTime 2020/04/13 16:48
**/
LoginVO login(String phone); LoginVO login(String phone);
/**
* description 账号登出
* param [accessToken]
* return java.lang.Long
* author 张志臣
* createTime 2020/04/13 16:48
**/
void logout(String accessToken); void logout(String accessToken);
/**
* description 账号停用
* param [phone]
* return java.lang.Long
* author 张志臣
* createTime 2020/05/06 16:48
**/
void stopUsing(String phone);
/**
* description 刷新token
* param [accessToken, refreshTokenForm]
* return java.lang.Long
* author 张志臣
* createTime 2020/04/13 16:48
**/
LoginVO refreshToken(String accessToken, RefreshTokenForm refreshTokenForm); LoginVO refreshToken(String accessToken, RefreshTokenForm refreshTokenForm);
/**
* description 判断accessToken是否有效
* param [accessToken]
* return java.lang.Long
* author 张志臣
* createTime 2020/04/13 16:48
**/
boolean isInvalidAccessToken(String accessToken); boolean isInvalidAccessToken(String accessToken);
/**
* description 判断refreshToken是否有效
* param [refreshToken]
* return java.lang.Long
* author 张志臣
* createTime 2020/04/13 16:48
**/
boolean isInvalidRefreshToken(String refreshToken); boolean isInvalidRefreshToken(String refreshToken);
} }
\ No newline at end of file
...@@ -82,6 +82,20 @@ public class AppLoginImpl extends ServiceImpl<AppLoginDao, AppLoginEntity> imple ...@@ -82,6 +82,20 @@ public class AppLoginImpl extends ServiceImpl<AppLoginDao, AppLoginEntity> imple
this.baseMapper.updateById(entity); this.baseMapper.updateById(entity);
} }
@Override
public void stopUsing(String phone) {
AppLoginEntity entity = this.getAccountByPhone(phone);
if(null == entity) {
return;
}
entity.setAccessToken("");
entity.setRefreshToken("");
entity.setLoginStatus("2");
entity.setLogoutTime(new Date());
this.baseMapper.updateById(entity);
}
@Override @Override
public LoginVO refreshToken(String accessToken, RefreshTokenForm refreshTokenForm) { public LoginVO refreshToken(String accessToken, RefreshTokenForm refreshTokenForm) {
AppLoginEntity entity = this.getAccountByAccessToken(accessToken); AppLoginEntity entity = this.getAccountByAccessToken(accessToken);
......
package com.esv.freight.app.module.account.validator.groups;
public interface ValidatorAccountExist {
}
package com.esv.freight.app.module.account.validator.groups;
public interface ValidatorDriverLoginBySms {
}
package com.esv.freight.app.module.account.vo;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* @description: 账号是否存在VO
* @project: freight-app-service
* @name: com.esv.freight.app.module.account.vo.AccountExistVO
* @author: 张志臣
* @email: zhangzhichen@esvtek.com
* @createTime: 2020/05/06 10:00
* @version:1.0
*/
@Data
public class AccountExistVO {
/**
* 帐号状态:1-账号已存在、2-账号不存在
*/
private Integer accountStatus;
/**
* 承运商帐号ID
*/
private Long carrierId;
/**
* 承运商名称
*/
private String carrierName;
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
}
}
package com.esv.freight.app.module.account.vo;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* @description: 承运商简要信息VO
* @project: freight-app-service
* @name: com.esv.freight.app.module.account.vo.CarrierInfoBriefVO
* @author: 张志臣
* @email: zhangzhichen@esvtek.com
* @createTime: 2020/04/24 16:58
* @version:1.0
*/
@Data
public class CarrierInfoBriefVO {
/**
*
*/
private Long id;
/**
* 登录帐号,承运商联系人电话
*/
private String account;
/**
* 帐号状态:1-正常、2-停用
*/
private Integer accountStatus;
/**
* 客户编码
*/
private String carrierNumber;
/**
* 承运商名称
*/
private String carrierName;
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
}
}
package com.esv.freight.app.module.account.vo; package com.esv.freight.app.module.account.vo;
import lombok.Data; import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/** /**
* @description: 司机账号详情VO * @description: 司机账号详情VO
* @project: Freight * @project: freight-app-service
* @name: com.esv.freight.module.ownerBackend.account.login.vo.DriverAccountDetailVO * @name: com.esv.freight.app.module.account.vo.DriverAccountDetailVO
* @author: 张志臣 * @author: 张志臣
* @email: zhangzhichen@esvtek.com * @email: zhangzhichen@esvtek.com
* @createTime: 2020/04/13 17:00 * @createTime: 2020/04/13 17:00
...@@ -20,18 +22,21 @@ public class DriverAccountDetailVO { ...@@ -20,18 +22,21 @@ public class DriverAccountDetailVO {
// 承运商帐号ID // 承运商帐号ID
private Long carrierId; private Long carrierId;
// 承运商名称
private String carrierName;
// 登录帐号,司机手机号 // 登录帐号,司机手机号
private String account; private String account;
// 帐号状态:1-正常、2-停用
private Integer accountStatus;
// 创建来源:1-平台创建、2-自行注册 // 创建来源:1-平台创建、2-自行注册
private String sourceType; private Integer sourceType;
// 货主帐号审核状态:0-待审核、1-审核成功,2-审核失败 // 货主帐号审核状态:0-待审核、1-审核成功,2-审核失败
private Integer auditStatus; private Integer auditStatus;
// 认证状态:1-未认证、2-已认证
private Integer authenticateStatus;
// 姓名 // 姓名
private String name; private String name;
...@@ -106,4 +111,9 @@ public class DriverAccountDetailVO { ...@@ -106,4 +111,9 @@ public class DriverAccountDetailVO {
// 道路运输从业资格证-正面图片URL // 道路运输从业资格证-正面图片URL
private String certificateUrl; private String certificateUrl;
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
}
} }
...@@ -6,8 +6,8 @@ import org.apache.commons.lang3.builder.ToStringStyle; ...@@ -6,8 +6,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
/** /**
* @description: 账号密码登录VO * @description: 账号密码登录VO
* @project: Freight * @project: freight-app-service
* @name: com.esv.freight.module.ownerBackend.account.login.vo.LoginByPwdVO * @name: com.esv.freight.module.ownerBackend.account.login.vo.LoginVO
* @author: 张志臣 * @author: 张志臣
* @email: zhangzhichen@esvtek.com * @email: zhangzhichen@esvtek.com
* @createTime: 2020/04/10 16:00 * @createTime: 2020/04/10 16:00
......
package com.esv.freight.app.module.account.vo; package com.esv.freight.app.module.account.vo;
import lombok.Data; import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/** /**
* @description: 货主账号详情VO * @description: 货主账号详情VO
* @project: Freight * @project: freight-app-service
* @name: com.esv.freight.module.ownerBackend.account.login.vo.OwnerAccountDetailVO * @name: com.esv.freight.module.ownerBackend.account.login.vo.OwnerAccountDetailVO
* @author: 张志臣 * @author: 张志臣
* @email: zhangzhichen@esvtek.com * @email: zhangzhichen@esvtek.com
...@@ -79,4 +81,9 @@ public class OwnerAccountDetailVO { ...@@ -79,4 +81,9 @@ public class OwnerAccountDetailVO {
// 企业法人手机号 // 企业法人手机号
private String legalPhone; private String legalPhone;
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
}
} }
...@@ -67,6 +67,7 @@ public class OwnerWaybillController { ...@@ -67,6 +67,7 @@ public class OwnerWaybillController {
reqJson.put("goodsOwnerId", waybillQueryForm.getUserId()); reqJson.put("goodsOwnerId", waybillQueryForm.getUserId());
reqJson.put("pageNum", waybillQueryForm.getPageNum()); reqJson.put("pageNum", waybillQueryForm.getPageNum());
reqJson.put("pageSize", waybillQueryForm.getPageSize()); reqJson.put("pageSize", waybillQueryForm.getPageSize());
reqJson.put("waybillStateList", waybillQueryForm.getWaybillStateList());
if(!StringUtils.isEmpty(waybillQueryForm.getOrderNo())) { if(!StringUtils.isEmpty(waybillQueryForm.getOrderNo())) {
reqJson.put("orderNo", waybillQueryForm.getOrderNo()); reqJson.put("orderNo", waybillQueryForm.getOrderNo());
} }
......
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