Commit 5e940cdf by manxiaoqiang

adi

parent 31830e55
......@@ -70,6 +70,7 @@ public class ADIAccountServiceImpl implements ADIAccountService {
ReminderLevelRepository reminderLevelRepository;
@Autowired
PressMoneyRepository pressMoneyRepository;
private static String u = "http://10.3.20.51:80/";
@Override
public Map<String, Object> findSale(User user, Long sale) {
Map<String, Object> map = new HashMap();
......@@ -128,7 +129,7 @@ public class ADIAccountServiceImpl implements ADIAccountService {
public void updateAccount(Contract contract) {
ADIUser adiUser = findOne(contract.getEmail());
if(null != adiUser){
String url = "http://localhost:8081/adi/api/user/web/update";
String url = u + "adi/api/user/web/update";
Map<String,String> conditions = new HashMap<>();
conditions.put("expriedTime", contract.getEndDate() + " 00:00:00");
conditions.put("constractStartTime",contract.getStartDate() + " 00:00:00");
......@@ -146,7 +147,7 @@ public class ADIAccountServiceImpl implements ADIAccountService {
private List<ADIUser> getAllAccount() throws JSONException {
List<ADIUser> list = new ArrayList<>();
String url = "http://localhost:8081/adi/api/user/web/list";
String url = u + "adi/api/user/web/list";
Map<String,String> conditions = new HashMap<>();
conditions.put("type","");
conditions.put("status","");
......@@ -319,7 +320,7 @@ public class ADIAccountServiceImpl implements ADIAccountService {
}
@Override
public ADIUser findOne(String email) {
String url = "http://localhost:8081/adi/api/user/web/one";
String url = u + "adi/api/user/web/one";
Map<String,String> conditions = new HashMap<>();
conditions.put("field", "email");
conditions.put("value",email);
......@@ -368,11 +369,11 @@ public class ADIAccountServiceImpl implements ADIAccountService {
contract.setStatus("executing");
contractRepository.save(contract);
}
String url = "http://localhost:8081/adi/api/user/web/update";
String url = u + "adi/api/user/web/update";
Map<String,String> conditions = new HashMap<>();
conditions.put("expriedTime", null);
conditions.put("constractStartTime",null);
conditions.put("status","1");
conditions.put("useStatus","0");
conditions.put("id", resource.getAccountId().toString());
// conditions.put("keyw","");
String request = HttpClientUtil.doHttpPostRequest(url, "",conditions,"utf-8");
......@@ -406,11 +407,11 @@ public class ADIAccountServiceImpl implements ADIAccountService {
contractRepository.save(contract);
}
String url = "http://localhost:8081/adi/api/user/web/update";
String url = u + "adi/api/user/web/update";
Map<String,String> conditions = new HashMap<>();
conditions.put("expriedTime", null);
conditions.put("constractStartTime",null);
conditions.put("status","3");
conditions.put("useStatus","1");
conditions.put("id", resource.getAccountId().toString());
// conditions.put("keyw","");
String request = HttpClientUtil.doHttpPostRequest(url, "",conditions,"utf-8");
......@@ -545,7 +546,7 @@ public class ADIAccountServiceImpl implements ADIAccountService {
}
public static void main(String[] args) {
String url = "http://localhost:8081/adi/api/user/web/one";
String url = u + "adi/api/user/web/one";
Map<String,String> conditions = new HashMap<>();
conditions.put("field", "email");
conditions.put("value","zhangshaoyou@reyun.com");
......
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