fixbug - 配置场馆和管理员挂钩发送微信消息
This commit is contained in:
@@ -5,11 +5,14 @@ import com.enums.VenueTypeEnum;
|
||||
import com.sv.entity.Constants;
|
||||
import com.sv.entity.Venue;
|
||||
import com.sv.entity.VenueLesson;
|
||||
import com.sv.mapper.WxConfigMapper;
|
||||
import com.sv.service.api.VenueLessonService;
|
||||
import com.sv.service.api.VenueService;
|
||||
import com.sv.service.api.util.DateUtilCard;
|
||||
import com.sv.service.message.SendMsg;
|
||||
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.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
@@ -17,6 +20,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RunWith(SpringRunner.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;
|
||||
|
||||
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.wxOpenId = wxOpenId;
|
||||
this.venueId = venueId;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.sv.mapper;
|
||||
|
||||
import com.sv.annotation.NoPlatform;
|
||||
import com.ydd.oms.entity.sys.WxConfig;
|
||||
|
||||
import java.util.List;
|
||||
@@ -11,12 +12,13 @@ public interface WxConfigMapper {
|
||||
|
||||
int insertSelective(WxConfig record);
|
||||
|
||||
@NoPlatform
|
||||
WxConfig selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(WxConfig record);
|
||||
|
||||
int updateByPrimaryKey(WxConfig record);
|
||||
|
||||
@NoPlatform
|
||||
List<WxConfig> list();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user