fixbug - 配置场馆和管理员挂钩发送微信消息
This commit is contained in:
@@ -5,11 +5,14 @@ import com.enums.VenueTypeEnum;
|
|||||||
import com.sv.entity.Constants;
|
import com.sv.entity.Constants;
|
||||||
import com.sv.entity.Venue;
|
import com.sv.entity.Venue;
|
||||||
import com.sv.entity.VenueLesson;
|
import com.sv.entity.VenueLesson;
|
||||||
|
import com.sv.mapper.WxConfigMapper;
|
||||||
import com.sv.service.api.VenueLessonService;
|
import com.sv.service.api.VenueLessonService;
|
||||||
import com.sv.service.api.VenueService;
|
import com.sv.service.api.VenueService;
|
||||||
import com.sv.service.api.util.DateUtilCard;
|
import com.sv.service.api.util.DateUtilCard;
|
||||||
import com.sv.service.message.SendMsg;
|
import com.sv.service.message.SendMsg;
|
||||||
import com.sv.service.message.WeiXinSendUtils;
|
import com.sv.service.message.WeiXinSendUtils;
|
||||||
|
import com.sv.service.utils.SpringUtils;
|
||||||
|
import com.ydd.oms.entity.sys.WxConfig;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
@@ -17,6 +20,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
|||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@SpringBootTest(classes={WeiXinApplication.class})
|
@SpringBootTest(classes={WeiXinApplication.class})
|
||||||
@@ -57,4 +61,17 @@ public class SendMessageTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
WxConfigMapper wxConfigMapper;
|
||||||
|
@Test
|
||||||
|
public void testConfig(){
|
||||||
|
List<WxConfig> configs = wxConfigMapper.list();
|
||||||
|
int venueId = 123;
|
||||||
|
for (WxConfig config : configs) {
|
||||||
|
if (venueId == config.getVenueId()) {
|
||||||
|
System.out.println(config.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class WxConfig {
|
|||||||
|
|
||||||
private Date modifiedTime;
|
private Date modifiedTime;
|
||||||
|
|
||||||
public WxConfig(Integer id, String wxOpenId, Integer venueId, Integer createdId, Integer modifiedId, Date createdTime, Date modifiedTime, Byte deleted) {
|
public WxConfig(Integer id, String wxOpenId, Integer venueId, Integer createdId, Integer modifiedId, Date createdTime, Date modifiedTime) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.wxOpenId = wxOpenId;
|
this.wxOpenId = wxOpenId;
|
||||||
this.venueId = venueId;
|
this.venueId = venueId;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.sv.mapper;
|
package com.sv.mapper;
|
||||||
|
|
||||||
|
import com.sv.annotation.NoPlatform;
|
||||||
import com.ydd.oms.entity.sys.WxConfig;
|
import com.ydd.oms.entity.sys.WxConfig;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -11,12 +12,13 @@ public interface WxConfigMapper {
|
|||||||
|
|
||||||
int insertSelective(WxConfig record);
|
int insertSelective(WxConfig record);
|
||||||
|
|
||||||
|
@NoPlatform
|
||||||
WxConfig selectByPrimaryKey(Integer id);
|
WxConfig selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(WxConfig record);
|
int updateByPrimaryKeySelective(WxConfig record);
|
||||||
|
|
||||||
int updateByPrimaryKey(WxConfig record);
|
int updateByPrimaryKey(WxConfig record);
|
||||||
|
@NoPlatform
|
||||||
List<WxConfig> list();
|
List<WxConfig> list();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user