|
@@ -1,14 +1,13 @@
|
|
|
package com.miaxis.test;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.miaxis.TwzdApplication;
|
|
|
-import com.miaxis.common.core.domain.entity.UserInfo;
|
|
|
-import com.miaxis.common.utils.StringUtils;
|
|
|
import com.miaxis.feign.service.IWxSendService;
|
|
|
import com.miaxis.question.mapper.QuestionInfoMapper;
|
|
|
import com.miaxis.question.vo.QuestionInfoExcelTypeVo;
|
|
|
import com.miaxis.question.vo.QuestionInfoExcelVo;
|
|
|
+import com.miaxis.school.mapper.SchoolInfoMapper;
|
|
|
import com.miaxis.user.service.IUserInfoService;
|
|
|
+import com.miaxis.wx.dto.QueryParams;
|
|
|
import com.miaxis.wx.service.IWxForeverCodeService;
|
|
|
import com.miaxis.wx.service.impl.WxGzhServiceImpl;
|
|
|
import org.apache.poi.hssf.usermodel.*;
|
|
@@ -50,6 +49,9 @@ public class NormalTest {
|
|
|
@Resource
|
|
|
IUserInfoService userInfoService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ SchoolInfoMapper schoolInfoMapper;
|
|
|
+
|
|
|
|
|
|
@Value("${app.appid}")
|
|
|
private String appid;
|
|
@@ -58,15 +60,16 @@ public class NormalTest {
|
|
|
private String secret;
|
|
|
@Test
|
|
|
public void getGzhToken() {
|
|
|
- //查询该用户的销售类型
|
|
|
- String fromUserName ="ovKTX50v7OAEPI_ERofpUvrNQCJU";
|
|
|
- UserInfo userInfo = userInfoService.getOne(new QueryWrapper<UserInfo>().eq("openid", fromUserName));
|
|
|
- //查询该用户的上级
|
|
|
- UserInfo upUserInfo = userInfoService.getUpUserInfo(fromUserName);
|
|
|
- //当用户销售类型为 普通用户(含驾校分成) 并且他的父级不是代理商(含驾校分成)时,则需要填写驾校信息,且未填写驾校信息时
|
|
|
- if (userInfo.getSaleType() ==1 && upUserInfo.getSaleType()!=3 && StringUtils.isEmpty(userInfo.getSchoolName()) ){
|
|
|
- System.out.println("进来了");
|
|
|
+ QueryParams queryParams = new QueryParams();
|
|
|
+ queryParams.setChoseColumName("city_name");
|
|
|
+ List<String> cities = schoolInfoMapper.queryNames(queryParams);
|
|
|
+ StringBuffer buffer = new StringBuffer();
|
|
|
+ buffer.append("请选择驾校所在城市:").append("\n\n");
|
|
|
+ for (String city: cities){
|
|
|
+ buffer.append("<a href=\"weixin://bizmsgmenu?msgmenuid=1&msgmenucontent="+city+"\">"+city+"</a>").append("\n");
|
|
|
+ // return MessageUtil.initText(fromUserName, toUserName, buffer.toString());
|
|
|
}
|
|
|
+ System.out.println(buffer);
|
|
|
}
|
|
|
|
|
|
|