3 changed files with 43 additions and 7 deletions
@ -1,10 +1,21 @@ |
|||
package cn.chjyj.szwh.mapper; |
|||
|
|||
import cn.chjyj.szwh.bean.OrderUser; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
|
|||
/** |
|||
* 用户订单mapper |
|||
*/ |
|||
@Component |
|||
public interface OrderUserMapper { |
|||
/** |
|||
* 某订单的用户信息 |
|||
* @param batchcode |
|||
* @param islicode |
|||
* @return |
|||
*/ |
|||
OrderUser getUserOrder(@Param("batchcode") String batchcode, |
|||
@Param("islicode") String islicode); |
|||
} |
|||
|
|||
@ -0,0 +1,25 @@ |
|||
package cn.chjyj.szwh.mapper; |
|||
|
|||
import cn.chjyj.szwh.bean.OrderUser; |
|||
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; |
|||
|
|||
import static org.junit.Assert.*; |
|||
|
|||
@SpringBootTest |
|||
@RunWith(SpringRunner.class) |
|||
public class OrderUserMapperTest { |
|||
@Autowired |
|||
private OrderUserMapper orderUserMapper; |
|||
|
|||
@Test |
|||
public void getUserOrder() { |
|||
String batch="1652841493123434"; |
|||
String islicode="999998-000000001874-8"; |
|||
OrderUser orderUser = orderUserMapper.getUserOrder(batch,islicode); |
|||
System.out.println(orderUser.getName()); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue