Commit f0c23fff authored by 钱雯君's avatar 钱雯君

add

parent e8f612ba
...@@ -11,6 +11,7 @@ import base.DuibaLog; ...@@ -11,6 +11,7 @@ import base.DuibaLog;
import base.DuibaTestBase; import base.DuibaTestBase;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import http.service.Authorization; import http.service.Authorization;
import http.service.Manager.EditManagerInfoService; import http.service.Manager.EditManagerInfoService;
import http.service.app.SeckillService; import http.service.app.SeckillService;
...@@ -23,6 +24,7 @@ import org.springframework.beans.factory.annotation.Value; ...@@ -23,6 +24,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import utils.GetCookieUtil;
import utils.MatcherString; import utils.MatcherString;
import java.util.HashMap; import java.util.HashMap;
...@@ -178,12 +180,13 @@ public class 天天秒杀_秒杀活动兑换测试_SeckillTest extends DuibaTest ...@@ -178,12 +180,13 @@ public class 天天秒杀_秒杀活动兑换测试_SeckillTest extends DuibaTest
Map<String,String> map = new HashMap<>(); Map<String,String> map = new HashMap<>();
Response response = editManagerInfoService.createUser("qwj测试秒杀用户"); Response response = editManagerInfoService.createUser("qwj测试秒杀用户");
Map<String,Object> user = jdbc.findSimpleResult("select * from dafuweng.user where name = 'qwj测试秒杀用户' and app_id = '67'\n"); Map<String,Object> user = jdbc.findSimpleResult("select * from dafuweng.user where name = 'qwj测试秒杀用户' and app_id = '67'\n");
String uid = user.get("id").toString(); String uid = user.get("id").toString();
String url = "http://47.97.214.108/user/loginDuiba?uid=" + uid; String url = GetCookieUtil.genUrl(uid,"3erv8LvBxKBSyuGK5i8FSGyYoFD1");
Response login = given().get(url); JSONObject cookie = GetCookieUtil.getConsumerIdFromCookie(url);
Map<String,Object> consumer = jdbc.findSimpleResult("select * from new_consumer.consumer_0010 where partner_user_id =? and app_id = '18816'\n",uid); String consumerId = cookie.get("cid").toString();
String consumerId = consumer.get("id").toString();
Boolean res = jdbc.update("UPDATE new_consumer.consumer_0010 set addr_name = 'qwj' , addr_phone = '18143476563' ,addr_province = '浙江省' ,addr_city = '杭州市' " + Boolean res = jdbc.update("UPDATE new_consumer.consumer_0010 set addr_name = 'qwj' , addr_phone = '18143476563' ,addr_province = '浙江省' ,addr_city = '杭州市' " +
", addr_area = '西湖区' , addr_detail = '奖池花印' where partner_user_id = ? and app_id = '18816'\n",uid); ", addr_area = '西湖区' , addr_detail = '奖池花印' where partner_user_id = ? and app_id = '18816'\n",uid);
map.put("uid",uid); map.put("uid",uid);
......
...@@ -448,8 +448,7 @@ public class EditManagerInfoService { ...@@ -448,8 +448,7 @@ public class EditManagerInfoService {
public Response createUser(String name){ public Response createUser(String name){
String url = "http://dafuweng.duibatest.com.cn" + "/user/create";
String url = "http://47.97.214.108" + "/user/create";
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
map.put("appId","67"); map.put("appId","67");
map.put("name",name); map.put("name",name);
......
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