Commit eb4dd092 by 徐高华

朋友圈

parent 05191a86
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.DateUtil; import com.gic.commons.util.DateUtil;
import com.gic.haoban.manage.api.dto.ContentMaterialDTO; import com.gic.haoban.manage.api.dto.ContentMaterialDTO;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO; import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO;
import com.gic.haoban.manage.api.dto.moment.QwMomentPlanDTO; import com.gic.haoban.manage.api.dto.moment.QwMomentPlanDTO;
import com.gic.haoban.manage.api.qdto.moment.PlanClerkListQDTO; import com.gic.haoban.manage.api.qdto.moment.PlanClerkListQDTO;
import com.gic.haoban.manage.api.qdto.moment.PlanDataListQDTO; import com.gic.haoban.manage.api.qdto.moment.PlanDataListQDTO;
import com.gic.haoban.manage.api.qdto.moment.QwMomentPlanQDTO; import com.gic.haoban.manage.api.qdto.moment.QwMomentPlanQDTO;
import com.gic.haoban.manage.api.service.moment.QwMomentApiService; import com.gic.haoban.manage.api.service.moment.QwMomentApiService;
import com.gic.haoban.manage.service.dao.mapper.moment.QwMomentPlanAttendMapper;
import com.gic.haoban.manage.service.dao.mapper.moment.QwMomentPlanMapper;
import com.gic.haoban.manage.service.entity.moment.TabQwMomentPlan;
import com.gic.haoban.manage.service.entity.moment.TabQwMomentPlanAttend;
import com.gic.haoban.manage.service.service.WxEnterpriseService;
import com.gic.haoban.manage.service.service.chat.GroupChatPlanService; import com.gic.haoban.manage.service.service.chat.GroupChatPlanService;
import com.gic.haoban.manage.service.service.content.impl.GroupMessageServiceImpl; import com.gic.haoban.manage.service.service.content.impl.GroupMessageServiceImpl;
import com.gic.haoban.manage.service.service.moment.QwMomentPlanService;
import com.gic.wechat.api.service.qywx.QywxExternalUserService;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -27,6 +36,17 @@ public class MomentTest { ...@@ -27,6 +36,17 @@ public class MomentTest {
@Autowired @Autowired
private QwMomentApiService qwMomentApiService ; private QwMomentApiService qwMomentApiService ;
@Autowired
private WxEnterpriseService wxEnterpriseService ;
@Autowired
private QywxExternalUserService qywxExternalUserService ;
@Autowired
private QwMomentPlanService qwMomentPlanService ;
@Autowired
private QwMomentPlanMapper qwMomentPlanMapper ;
@Autowired
private QwMomentPlanAttendMapper qwMomentPlanAttendMapper ;
@Test @Test
...@@ -90,5 +110,28 @@ public class MomentTest { ...@@ -90,5 +110,28 @@ public class MomentTest {
this.qwMomentApiService.attendList(qdto) ; this.qwMomentApiService.attendList(qdto) ;
} }
@Test
public void getmomentid() {
String wxEnterpriseId = "ca66a01b79474c40b3e7c7f93daf1a3b";
String jobId = "kyy1q5PYkElEGL6BISXVKkKZPD-Lpq76iGKEn8Z1nU4OBh9487Ni70dA638plHpD";
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId);
ServiceResponse<Object> resp2 = this.qywxExternalUserService.getMomentTaskResult(qwDTO.getThirdCorpid(),
qwDTO.getSelf3thSecret(), jobId, qwDTO.isSelf(),qwDTO.getUrlHost()) ;
System.out.println(JSONObject.toJSONString(resp2));
}
@Test
public void data() {
Long planId = 772267599454027777L ;
TabQwMomentPlan plan = this.qwMomentPlanMapper.getById(planId) ;
List< TabQwMomentPlanAttend> list = this.qwMomentPlanAttendMapper.listForData(planId) ;
for(TabQwMomentPlanAttend item : list) {
item.setMomentId(plan.getMomentId());
this.qwMomentPlanService.getQwData(item);
}
}
} }
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