Commit aa464a26 by wubh

鍖呮椿骞睼2.0.0-淇敼锛氬揩閫掑崟鍒楄〃鐢ㄦ埛鏉冮檺闂銆佺粍缁囨煡鎵炬敮鎸佸晢鎴枫€佷慨鏀瑰懡鍚?

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@28321 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent c5c39797
Showing 18 changed files with 272 additions and 68 deletions
......@@ -44,6 +44,7 @@ public class DeliveryController extends BaseController {
super.logInfo("==== /delivery/countByStatus param", req);
req.setUserId(UserUtils.getCurrentUserId());
req.setUserType(UserUtils.getCurrentUserType());
Map<String, Integer> statusCountMap = this.deliveryService.countByStatus(req);
R result = R.ok().data(statusCountMap);
......@@ -62,6 +63,7 @@ public class DeliveryController extends BaseController {
super.logInfo("==== /delivery/getList param", req);
req.setUserId(UserUtils.getCurrentUserId());
req.setUserType(UserUtils.getCurrentUserType());
req.setNeedDetail(true);
PagedResp<SysDelivery> pagedResp = this.deliveryService.getList(req);
R result = R.ok().data(pagedResp);
......@@ -80,6 +82,7 @@ public class DeliveryController extends BaseController {
super.logInfo("==== /delivery/getDetail param", req);
req.setUserId(UserUtils.getCurrentUserId());
req.setUserType(UserUtils.getCurrentUserType());
SysDelivery delivery = this.deliveryService.getDetail(req);
R result = R.ok().data(delivery);
......@@ -104,6 +107,7 @@ public class DeliveryController extends BaseController {
ResultCodeEnum.USER_TYPE_NOT_HAS_AUTHORITY.getMsg());
}
delivery.setUserId(UserUtils.getCurrentUserId());
delivery.setUserType(userType);
R result = this.deliveryService.save(delivery);
super.logInfo("==== /delivery/save result", result);
......@@ -121,6 +125,7 @@ public class DeliveryController extends BaseController {
super.logInfo("==== /delivery/send param", delivery);
delivery.setUserId(UserUtils.getCurrentUserId());
delivery.setUserType(UserUtils.getCurrentUserType());
R result = this.deliveryService.send(delivery);
super.logInfo("==== /delivery/send result", result);
......@@ -138,6 +143,7 @@ public class DeliveryController extends BaseController {
super.logInfo("==== /delivery/receive param", delivery);
delivery.setUserId(UserUtils.getCurrentUserId());
delivery.setUserType(UserUtils.getCurrentUserType());
R result = this.deliveryService.receive(delivery);
super.logInfo("==== /delivery/receive result", result);
......@@ -155,6 +161,7 @@ public class DeliveryController extends BaseController {
super.logInfo("==== /delivery/cancel param", delivery);
delivery.setUserId(UserUtils.getCurrentUserId());
delivery.setUserType(UserUtils.getCurrentUserType());
R result = this.deliveryService.cancel(delivery);
super.logInfo("==== /delivery/cancel result", result);
......
......@@ -708,6 +708,14 @@ public class ReportController extends BaseReportController {
* @return 快递单导出实体
*/
private DeliveryVo convertDeliveryVo(DeliveryVo deliveryVo, SysDelivery delivery) {
// 寄件方角色
String senderTypeText = UserUtils.convertUserTypeName(delivery.getSenderType());
deliveryVo.setSenderTypeText(senderTypeText);
// 收件方角色
String receiverTypeText = UserUtils.convertUserTypeName(delivery.getReceiverType());
deliveryVo.setReceiverTypeText(receiverTypeText);
// 寄件人地区
SysArea senderArea = delivery.getSenderDistrictInfo();
StringBuffer senderAreaTextSb = new StringBuffer();
......
......@@ -49,7 +49,7 @@ public class DeliveryVo implements Serializable {
* 寄件人角色
*/
@ExcelColumn(index = 5, value = "寄件人角色")
private String senderType;
private String senderTypeText;
/**
* 寄件人详细地址
......@@ -72,7 +72,7 @@ public class DeliveryVo implements Serializable {
* 收件人角色
*/
@ExcelColumn(index = 8, value = "收件人角色")
private String receiverType;
private String receiverTypeText;
/**
* 收件人详细地址
......@@ -139,12 +139,12 @@ public class DeliveryVo implements Serializable {
this.senderPhone = senderPhone;
}
public String getSenderType() {
return senderType;
public String getSenderTypeText() {
return senderTypeText;
}
public void setSenderType(String senderType) {
this.senderType = senderType;
public void setSenderTypeText(String senderTypeText) {
this.senderTypeText = senderTypeText;
}
public String getSenderAddress() {
......@@ -171,12 +171,12 @@ public class DeliveryVo implements Serializable {
this.receiverPhone = receiverPhone;
}
public String getReceiverType() {
return receiverType;
public String getReceiverTypeText() {
return receiverTypeText;
}
public void setReceiverType(String receiverType) {
this.receiverType = receiverType;
public void setReceiverTypeText(String receiverTypeText) {
this.receiverTypeText = receiverTypeText;
}
public String getReceiverAddress() {
......@@ -219,11 +219,11 @@ public class DeliveryVo implements Serializable {
", orderSn='" + orderSn + '\'' +
", sender='" + sender + '\'' +
", senderPhone='" + senderPhone + '\'' +
", senderType='" + senderType + '\'' +
", senderTypeText='" + senderTypeText + '\'' +
", senderAddress='" + senderAddress + '\'' +
", receiver='" + receiver + '\'' +
", receiverPhone='" + receiverPhone + '\'' +
", receiverType='" + receiverType + '\'' +
", receiverTypeText='" + receiverTypeText + '\'' +
", receiverAddress='" + receiverAddress + '\'' +
", statusText='" + statusText + '\'' +
", createTime=" + createTime +
......
......@@ -24,6 +24,14 @@ public class CarOrderQueryReq extends PagedReq {
*/
private Byte userType;
/**
* 服务商ID,根据用户角色生成
*/
private Integer providerId;
/**
* 商户ID,根据用户角色生成
*/
private Integer shopId;
/**
* 状态列表,用于不同角色
*/
private List<Byte> statusList;
......@@ -50,6 +58,9 @@ public class CarOrderQueryReq extends PagedReq {
* 是否取消:0已取消,1未取消
*/
private Byte canceled;
private Integer orderChannel;
private String serviceType;
private String serviceCode;
......@@ -111,6 +122,22 @@ public class CarOrderQueryReq extends PagedReq {
this.userType = userType;
}
public Integer getProviderId() {
return providerId;
}
public void setProviderId(Integer providerId) {
this.providerId = providerId;
}
public Integer getShopId() {
return shopId;
}
public void setShopId(Integer shopId) {
this.shopId = shopId;
}
public List<Byte> getStatusList() {
return statusList;
}
......@@ -309,6 +336,8 @@ public class CarOrderQueryReq extends PagedReq {
"keyword='" + keyword + '\'' +
", userId=" + userId +
", userType=" + userType +
", providerId=" + providerId +
", shopId=" + shopId +
", statusList=" + statusList +
", needDetail=" + needDetail +
", id=" + id +
......
......@@ -24,7 +24,11 @@ public class DeliveryQueryReq extends PagedReq {
*/
private Byte userType;
/**
* 根据权限生成的状态列表
* 根据用户权限生成的组织列表
*/
private List<Integer> userOrgList;
/**
* 根据用户权限生成的状态列表
*/
private List<Byte> statusList;
/**
......@@ -148,6 +152,14 @@ public class DeliveryQueryReq extends PagedReq {
this.userType = userType;
}
public List<Integer> getUserOrgList() {
return userOrgList;
}
public void setUserOrgList(List<Integer> userOrgList) {
this.userOrgList = userOrgList;
}
public List<Byte> getStatusList() {
return statusList;
}
......@@ -314,6 +326,7 @@ public class DeliveryQueryReq extends PagedReq {
"keyword='" + keyword + '\'' +
", userId=" + userId +
", userType=" + userType +
", userOrgList=" + userOrgList +
", statusList=" + statusList +
", needDetail=" + needDetail +
", id=" + id +
......
......@@ -25,7 +25,7 @@ public class SysDelivery implements Serializable {
/**
* 寄件人角色
*/
private String senderType;
private Byte senderType;
/**
* 寄件人地区信息
*/
......@@ -33,7 +33,7 @@ public class SysDelivery implements Serializable {
/**
* 收件人角色
*/
private String receiverType;
private Byte receiverType;
/**
* 收件人地区信息
*/
......@@ -181,11 +181,11 @@ public class SysDelivery implements Serializable {
this.sendOrReceive = sendOrReceive;
}
public String getSenderType() {
public Byte getSenderType() {
return senderType;
}
public void setSenderType(String senderType) {
public void setSenderType(Byte senderType) {
this.senderType = senderType;
}
......@@ -197,11 +197,11 @@ public class SysDelivery implements Serializable {
this.senderDistrictInfo = senderDistrictInfo;
}
public String getReceiverType() {
public Byte getReceiverType() {
return receiverType;
}
public void setReceiverType(String receiverType) {
public void setReceiverType(Byte receiverType) {
this.receiverType = receiverType;
}
......@@ -404,9 +404,9 @@ public class SysDelivery implements Serializable {
"userId=" + userId +
", userType=" + userType +
", sendOrReceive=" + sendOrReceive +
", senderType='" + senderType + '\'' +
", senderType=" + senderType +
", senderDistrictInfo=" + senderDistrictInfo +
", receiverType='" + receiverType + '\'' +
", receiverType=" + receiverType +
", receiverDistrictInfo=" + receiverDistrictInfo +
", deliveryFileList=" + deliveryFileList +
", id=" + id +
......
......@@ -243,7 +243,8 @@ public class CarOrderServiceImpl extends BaseOrderService implements CarOrderSer
if (pageIndex != null && pageSize != null) {
PageHelper.startPage(pageIndex, pageSize, true);
}
this.wrapStatusList(req);
this.wrapReqUserType(req);
this.wrapReqStatusList(req);
List<SysOrder> orderList = this.carOrderMapper.selectList(req);
if (Boolean.TRUE.equals(req.getNeedDetail())) {
for (SysOrder order : orderList) {
......@@ -266,6 +267,7 @@ public class CarOrderServiceImpl extends BaseOrderService implements CarOrderSer
*/
@Override
public SysOrder getDetail(CarOrderQueryReq req) {
this.wrapReqUserType(req);
SysOrder order = this.carOrderMapper.selectOne(req);
if (order == null) {
throw BusinessException.create(ResultCodeEnum.ORDER_NOT_EXIST.getCode(),
......@@ -688,6 +690,7 @@ public class CarOrderServiceImpl extends BaseOrderService implements CarOrderSer
}
Integer receiverDistrict = Integer.parseInt(receiverDistrictStr);
// 暂时设置收件方ID为超级管理员
delivery.setReceiverId(0);
delivery.setReceiver(receiver);
delivery.setReceiverPhone(receiverPhone);
......@@ -736,6 +739,7 @@ public class CarOrderServiceImpl extends BaseOrderService implements CarOrderSer
}
Integer senderDistrict = Integer.parseInt(senderDistrictStr);
// 暂时设置寄件方ID为超级管理员
delivery.setSenderId(0);
delivery.setSender(sender);
delivery.setSenderPhone(senderPhone);
......@@ -890,12 +894,38 @@ public class CarOrderServiceImpl extends BaseOrderService implements CarOrderSer
}
/**
* 根据用户角色生成需要查询的用户ID
*
* @param req 请求体
* @return 结果
*/
private CarOrderQueryReq wrapReqUserType(CarOrderQueryReq req) {
Integer userId = req.getUserId();
Byte userType = req.getUserType();
if (BizConstants.USER_TYPE_ADMIN == userType) {
// 运营,不指定服务商或商户ID
req.setProviderId(null);
req.setShopId(null);
} else if (BizConstants.USER_TYPE_MERCHANT == userType) {
// 服务商,指定服务商ID为当前用户ID
req.setProviderId(userId);
req.setShopId(null);
} else if (BizConstants.USER_TYPE_SHOP == userType) {
// 商户,指定商户ID为当前用户ID
req.setProviderId(null);
req.setShopId(userId);
}
return req;
}
/**
* 根据用户权限来生成需要查询的状态
*
* @param req 请求体
* @return 结果
*/
private CarOrderQueryReq wrapStatusList(CarOrderQueryReq req) {
private CarOrderQueryReq wrapReqStatusList(CarOrderQueryReq req) {
Byte userType = req.getUserType();
Byte status = req.getStatus();
List<Byte> statusList = new ArrayList<>();
......
......@@ -463,11 +463,11 @@ public class DeliveryServiceImpl extends BaseOrderService implements DeliverySer
private SysDelivery wrapUserType(SysDelivery delivery) {
Integer senderId = delivery.getSenderId();
JSONObject senderInfo = UserUtils.getUserInfo(senderId);
String senderType = UserUtils.convertUserTypeName(senderInfo.getByte("userType"));
Byte senderType = senderInfo.getByte("userType");
delivery.setSenderType(senderType);
Integer receiverId = delivery.getReceiverId();
JSONObject receiverInfo = UserUtils.getUserInfo(receiverId);
String receiverType = UserUtils.convertUserTypeName(receiverInfo.getByte("userType"));
Byte receiverType = receiverInfo.getByte("userType");
delivery.setReceiverType(receiverType);
return delivery;
......
......@@ -100,50 +100,72 @@
<select id="selectList" parameterType="com.glsx.ordercenter.dto.req.DeliveryQueryReq"
resultMap="BaseResultMap">
select id, order_id, order_sn, logistics_id, express_sn, sender_id, sender, sender_phone,
sender_district, sender_address, receiver_id, receiver, receiver_phone,
receiver_district, receiver_address, `status`, canceled, remark, create_time,
update_time, create_by, update_by
from sys_delivery
select distinct d.id, d.order_id, d.order_sn, d.logistics_id, d.express_sn, d.sender_id,
d.sender, d.sender_phone, d.sender_district, d.sender_address, d.receiver_id,
d.receiver, d.receiver_phone, d.receiver_district, d.receiver_address, d.`status`,
d.canceled, d.remark, d.create_time, d.update_time, d.create_by, d.update_by
from sys_delivery d
left join sys_user us on us.id = d.sender_id
left join sys_user ur on ur.id = d.receiver_id
<!-- 查询权限下所有组织 -->
left join sys_user_org suo on suo.user_id = #{userId,jdbcType=INTEGER}
<where>
<if test="keyword != null and keyword != ''">
<!-- 按照关键词查询 -->
and (express_sn like "%"#{keyword,jdbcType=VARCHAR}"%"
or sender like "%"#{keyword,jdbcType=VARCHAR}"%"
or sender_phone like "%"#{keyword,jdbcType=VARCHAR}"%"
or receiver like "%"#{keyword,jdbcType=VARCHAR}"%"
or receiver_phone like "%"#{keyword,jdbcType=VARCHAR}"%")
and (d.express_sn like "%"#{keyword,jdbcType=VARCHAR}"%"
or d.sender like "%"#{keyword,jdbcType=VARCHAR}"%"
or d.sender_phone like "%"#{keyword,jdbcType=VARCHAR}"%"
or d.receiver like "%"#{keyword,jdbcType=VARCHAR}"%"
or d.receiver_phone like "%"#{keyword,jdbcType=VARCHAR}"%")
</if>
<if test="status == 9">
<!-- 状态为已取消 -->
and canceled = 0
and d.canceled = 0
</if>
<if test="status != null and status != 9">
<!-- 其他未取消状态 -->
and status = #{status,jdbcType=TINYINT}
and canceled = 1
</if>
and d.status = #{status,jdbcType=TINYINT}
and d.canceled = 1
</if>
<!--and (-->
<!-- &lt;!&ndash; 用户为收件人,查询全部 &ndash;&gt;-->
<!-- d.sender_id = #{userId,jdbcType=INTEGER}-->
<!-- &lt;!&ndash; 用户为寄件人,查询状态不为待寄件的记录 &ndash;&gt;-->
<!-- or (d.receiver_id = #{userId,jdbcType=INTEGER} and d.status != 1)-->
<!--)-->
and (
<!-- 用户为收件人,查询全部 -->
sender_id = #{userId,jdbcType=INTEGER}
<!-- 用户为寄件人,查询状态不为待寄件的记录 -->
or (receiver_id = #{userId,jdbcType=INTEGER} and status != 1)
<!-- 用户权限下有收件人组织,查询全部 -->
us.org_id = suo.org_id
<!-- 用户权限下有寄件人组织,查询状态不为待寄件的记录 -->
or (ur.org_id = suo.org_id and d.status != 1)
)
</where>
order by create_time desc
order by d.create_time desc
</select>
<select id="selectOne" parameterType="com.glsx.ordercenter.dto.req.DeliveryQueryReq"
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_delivery
where id = #{id,jdbcType=INTEGER}
select distinct d.id, d.order_id, d.order_sn, d.logistics_id, d.express_sn, d.sender_id,
d.sender, d.sender_phone, d.sender_district, d.sender_address, d.receiver_id,
d.receiver, d.receiver_phone, d.receiver_district, d.receiver_address, d.`status`,
d.canceled, d.remark, d.create_time, d.update_time, d.create_by, d.update_by
from sys_delivery d
left join sys_user us on us.id = d.sender_id
left join sys_user ur on ur.id = d.receiver_id
<!-- 查询权限下所有组织 -->
left join sys_user_org suo on suo.user_id = #{userId,jdbcType=INTEGER}
where d.id = #{id,jdbcType=INTEGER}
<!--and (-->
<!-- &lt;!&ndash; 用户为收件人,查询全部 &ndash;&gt;-->
<!-- d.sender_id = #{userId,jdbcType=INTEGER}-->
<!-- &lt;!&ndash; 用户为寄件人,查询状态不为待寄件的记录 &ndash;&gt;-->
<!-- or (d.receiver_id = #{userId,jdbcType=INTEGER} and d.status != 1)-->
<!--)-->
and (
<!-- 用户为收件人,查询全部 -->
sender_id = #{userId,jdbcType=INTEGER}
<!-- 用户为寄件人,查询状态不为待寄件的记录 -->
or (receiver_id = #{userId,jdbcType=INTEGER} and status != 1)
<!-- 用户权限下有收件人组织,查询全部 -->
us.org_id = suo.org_id
<!-- 用户权限下有寄件人组织,查询状态不为待寄件的记录 -->
or (ur.org_id = suo.org_id and d.status != 1)
)
</select>
......
......@@ -12,6 +12,7 @@ public class AppTest {
mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);
mapper.configure(SerializationConfig.Feature.INDENT_OUTPUT, true);
mapper.configure(SerializationConfig.Feature.USE_ANNOTATIONS, true);
System.out.println(mapper.writeValueAsString(o));
} catch (IOException e) {
e.printStackTrace();
......
......@@ -53,9 +53,7 @@ public class CarOrderServiceTest extends AppTest {
public void test_getList() {
CarOrderQueryReq req = new CarOrderQueryReq();
req.setUserId(4001);
req.setUserType(BizConstants.USER_TYPE_ADMIN);
req.setPageIndex(2);
req.setPageSize(4);
req.setUserType(BizConstants.USER_TYPE_SHOP);
super.printJson(this.carOrderService.getList(req));
}
......
......@@ -4,6 +4,7 @@ import java.util.Arrays;
import cn.hutool.core.lang.UUID;
import com.glsx.ordercenter.AppTest;
import com.glsx.ordercenter.Application;
import com.glsx.ordercenter.constants.BizConstants;
import com.glsx.ordercenter.dto.req.DeliveryQueryReq;
import com.glsx.ordercenter.pojo.SysDelivery;
import com.glsx.ordercenter.pojo.SysDeliveryFile;
......@@ -38,6 +39,7 @@ public class DeliveryServiceTest extends AppTest {
public void test_getList() {
DeliveryQueryReq req = new DeliveryQueryReq();
req.setUserId(4000);
req.setUserType(BizConstants.USER_TYPE_ADMIN);
super.printJson(deliveryService.getList(req));
}
......@@ -45,7 +47,8 @@ public class DeliveryServiceTest extends AppTest {
public void test_getDetail() {
DeliveryQueryReq req = new DeliveryQueryReq();
req.setUserId(4000);
req.setId(6);
req.setUserType(BizConstants.USER_TYPE_ADMIN);
req.setId(12);
super.printJson(deliveryService.getDetail(req));
}
......
......@@ -35,6 +35,8 @@ public enum ResultCodeEnum {
USER_BIND_WECHAT_MINI_REPEAT(2020, "该微信已被绑定,不可继续绑定"),
SHOPNAME_REPETITION(2021, "该根组织下存在同名商户,请勿重复创建"),
USER_GET_MINI_OPENID_FAIL(2022, "微信小程序获取openid失败"),
MERCHANT_USERNAME_EXIST(2023, "该商户用户名已存在"),
MECHANIC_USERNAME_EXIST(2024, "该技工用户名已存在"),
/**
* 参数相关提示
......
......@@ -1372,7 +1372,7 @@
WHERE id = #{userId,jdbcType=INTEGER}
</update>
<select id="getProviderByGroupAndName" resultType="com.glsx.usercenter.pojo.user.SysUser">
<sql id="selectSpGroupSql">
SELECT
u.id id,
sm.provider_name name,
......@@ -1383,17 +1383,52 @@
LEFT JOIN sys_user_org uo ON uo.org_id = u.org_id
LEFT JOIN sys_organization so ON uo.org_id = so.id
LEFT JOIN sys_manager sm ON sm.user_id = u.id
WHERE u.user_type = 1
and u.user_status='sys_user_status_normal'
<if test="orgId != null">
and u.group_id = #{orgId,jdbcType=INTEGER}
</if>
<if test="id != 0">
AND uo.user_id = #{id,jdbcType=INTEGER}
</if>
<if test="name != null and name != ''">
AND sm.provider_name LIKE concat('%',#{name,jdbcType=VARCHAR},'%')
</if>
</sql>
<sql id="selectMerchantGroupSql">
SELECT
u.id id,
sm.shop_name name,
sm.shop_name serviceName,
u.org_id orgId
FROM
sys_user u
LEFT JOIN sys_user_org uo ON uo.org_id = u.org_id
LEFT JOIN sys_organization so ON uo.org_id = so.id
LEFT JOIN sys_merchant sm ON sm.user_id = u.id
</sql>
<select id="getProviderByGroupAndName" resultType="com.glsx.usercenter.pojo.user.SysUser">
<choose>
<when test="userType == 1">
<include refid="selectSpGroupSql"/>
</when>
<otherwise>
<include refid="selectMerchantGroupSql"/>
</otherwise>
</choose>
<where>
and u.user_status='sys_user_status_normal'
<if test="orgId != null">
and u.group_id = #{orgId,jdbcType=INTEGER}
</if>
<if test="id != 0">
AND uo.user_id = #{id,jdbcType=INTEGER}
</if>
<if test="name != null and name != ''">
<choose>
<when test="userType == 1">
AND sm.provider_name LIKE concat('%',#{name,jdbcType=VARCHAR},'%')
</when>
<otherwise>
AND sm.shop_name LIKE concat('%',#{name,jdbcType=VARCHAR},'%')
</otherwise>
</choose>
</if>
<if test="userType != null">
and u.user_type = #{userType,jdbcType=INTEGER}
</if>
</where>
group by id
Limit 50
</select>
......
package com.glsx.usercenter;
import java.io.IOException;
import org.codehaus.jackson.map.DeserializationConfig;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig;
public class AppTest {
protected void printJson(Object o) {
try {
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);
mapper.configure(SerializationConfig.Feature.INDENT_OUTPUT, true);
mapper.configure(SerializationConfig.Feature.USE_ANNOTATIONS, true);
System.out.println(mapper.writeValueAsString(o));
} catch (IOException e) {
e.printStackTrace();
}
}
}
package com.glsx.usercenter.service;
import com.glsx.common.constants.Constants;
import com.glsx.usercenter.AppTest;
import com.glsx.usercenter.Application;
import com.glsx.usercenter.pojo.vo.UserQueryVo;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
/**
* <p>Description:
* <p>Project: car-service
*
* @author wbh
* @date 2020-09-03
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = {Application.class},
webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
public class UserServiceTest extends AppTest {
@Autowired
private SysUserService userService;
@Test
public void test_getServiceOrg() {
UserQueryVo req = new UserQueryVo();
req.setId(0);
req.setOrgId(5);
req.setUserType(Constants.USER_TYPE_MERCHANT);
super.printJson(this.userService.getServiceOrg(req));
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!