Commit 89a9a9f7 by 徐高华

素材

parent af54f707
......@@ -576,7 +576,13 @@ public class MaterialApiServiceImpl implements MaterialApiService {
List<String> list = this.materialService.getImageMediaId(wxEnterpriseId, imageList, mediaType);
if(CollectionUtils.isNotEmpty(list)) {
list.forEach(materialId -> {
materialService.getHasChangeMadieMaterialById(materialId, 2);
MaterialDTO m = materialService.getHasChangeMadieMaterialById(materialId, 2);
Integer materialType = m.getMaterialType();
String madiaId = m.getMediaId();
//需要上传的类型
if(Arrays.asList(2, 3, 4, 5, 6 , 7).contains(materialType) && StringUtils.isBlank(madiaId)) {
throw new RuntimeException("madiaId处理失败") ;
}
}) ;
}
return list ;
......
import com.alibaba.fastjson.JSONObject;
import com.gic.commons.util.DateUtil;
import org.apache.commons.lang3.StringUtils;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;
import java.math.BigDecimal;
import java.util.*;
public class FileUtils4 {
public static void main(String[] args) {
Date endTime = DateUtil.strToDate("2025-06-30","yyyy-MM-dd") ;
if(DateUtil.getStartTimeOfDay(endTime).getTime() - 1000*3600*24*3 <= DateUtil.getStartTimeOfDay().getTime()) {
System.out.printf(""+DateUtil.daysBetween(DateUtil.getStartTimeOfDay(), DateUtil.getStartTimeOfDay(endTime)));
if(DateUtil.getStartTimeOfDay(endTime).getTime()<DateUtil.getStartTimeOfDay().getTime() && DateUtil.daysBetween(DateUtil.getStartTimeOfDay(endTime),DateUtil.getStartTimeOfDay())>1) {
return;
}
System.out.printf("1111");
}
/* List<X> list = getText() ;
Collections.sort(list);
Collections.reverse(list);
System.out.println(JSONObject.toJSONString(list));*/
}
public static String getText(){
public static List<X> getText(){
try {
BufferedReader bw = new BufferedReader(new FileReader(new File("c:\\c.txt"))) ;
StringBuilder sb = new StringBuilder() ;
BufferedReader bw = new BufferedReader(new FileReader(new File("d:\\c.txt"))) ;
List<X> sb = new ArrayList<>() ;
while(true) {
String s = bw.readLine() ;
if(StringUtils.isBlank(s)) {
break ;
}else {
String ss = new String(s.getBytes(),"UTF-8") ;
sb.append(ss) ;
String[] arr = ss.split("\\s") ;
String s1 = arr[0] ;
String s2 = arr[1] ;
sb.add(new X(s1,s2));
}
}
bw.close();
return sb.toString() ;
System.out.println(sb.size());
return sb ;
}catch(Exception e) {
}
return null ;
}
static class X implements Comparable<X>{
public String id ;
public String name ;
public X(String id, String name) {
this.id = id ;
this.name = name ;
}
@Override
public int compareTo(X o) {
return Integer.valueOf(o.id) - Integer.valueOf(this.id);
}
}
}
......@@ -45,7 +45,7 @@ public class HandoverTest {
@Test
public void test1() {
String wxEnterpriseId = "ca66a01b79474c40b3e7c7f93daf1a3b";
String wxEnterpriseId = "ef8607976407491fb5ff66611b1d57ea";
handoverOperationApiService.dealQywxEnterpriseHandoverResult(wxEnterpriseId);
}
......
......@@ -4,6 +4,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import com.gic.haoban.manage.api.qdto.chat.LinkHmFromWxaQDTO;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -106,7 +107,13 @@ public class HmLinkTest {
@Test
public void getLinkHmFromWxa(){
this.hmLinkApiService.getLinkHmFromWxa("ff8080815dacd3a2015dacd3ef5c0000", null, null, null, "fKzecO", "3b9167b1a", "orXl9t6P-XBJQyaNCaJj38GLyYd0",null) ;
LinkHmFromWxaQDTO qq = new LinkHmFromWxaQDTO();
qq.setLatitude("30.281719563802085");
qq.setDistrictCode("3301");
qq.setLongitude("120.00284342447917");
qq.setJustLocationFlag(0);
this.hmLinkApiService.getLinkHmFromWxa("ff8080815dacd3a2015dacd3ef5c0000", null, null, null,
"roFgte", "", "","ff8080819763a714019767096103000f",qq) ;
}
@Test
......
......@@ -139,8 +139,10 @@ public class ServiceTest {
"fa88746dfe964acd8761d1de8ff7d139",
"fcae29cc5d7d4739a353e777e5e77d82") ;
for(int i=0;i<list.size();i++) {
haobanQywxFeeApiService.addFee(list.get(i));
}
haobanQywxFeeApiService.addFee("ca66a01b79474c40b3e7c7f93daf1a3b");
}
@Test
......
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