box上线离线增加推送通知
This commit is contained in:
parent
f3120c2f81
commit
5f3ef6ca93
@ -16,6 +16,8 @@ public enum AskTypeEnum {
|
||||
|
||||
UPDATE(100, "固件升级"),
|
||||
BOX_ON_LINE(101, "Box配网成功"),
|
||||
BOX_OFF_LINE(102, "Box离线"),
|
||||
COMMAND_N(200, "指令后必须跟的名称词")
|
||||
;
|
||||
AskTypeEnum(Integer c, String n){
|
||||
code = c;
|
||||
|
||||
@ -69,7 +69,7 @@ public class SystemTalkAnswerConfigEntity extends GenericEntity<Long> {
|
||||
@Column(name = "key_order", nullable = false)
|
||||
private Long keyOrder;
|
||||
|
||||
@Comment("回答类型0:文本问答 1:iOT控制 2:天气 3:闹钟 4:U3D 5:音乐声音 100:固件升级")
|
||||
@Comment("回答类型0:文本问答 1:iOT控制 2:天气 3:闹钟 4:U3D 5:音乐声音 100:固件升级 101:Box上线 200:动作后必须跟的名称词")
|
||||
@Column(name = "answer_type", nullable = false)
|
||||
private Integer answerType;
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ public class SystemTalkAnswerConfigRequest implements java.io.Serializable {
|
||||
//关键字的排序,越小越第一个匹配上
|
||||
private Long keyOrder;
|
||||
|
||||
//"回答类型0:文本问答 1:iOT控制 2:天气 3:闹钟 4:U3D 5:音乐声音 100:固件升级"
|
||||
//回答类型0:文本问答 1:iOT控制 2:天气 3:闹钟 4:U3D 5:音乐声音 100:固件升级 101:Box上线 200:动作后必须跟的名称词
|
||||
private Integer answerType;
|
||||
|
||||
/**
|
||||
|
||||
@ -32,7 +32,7 @@ public class SystemTalkAnswerConfigResp {
|
||||
//关键字的排序,越小越第一个匹配上
|
||||
private Long keyOrder;
|
||||
|
||||
//"回答类型0:文本问答 1:iOT控制 2:天气 3:闹钟 4:U3D 5:音乐声音 100:固件升级"
|
||||
//回答类型0:文本问答 1:iOT控制 2:天气 3:闹钟 4:U3D 5:音乐声音 100:固件升级 101:Box上线 200:动作后必须跟的名称词
|
||||
private Integer answerType;
|
||||
|
||||
/**
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.qiuguo.iot.data.service.system;
|
||||
|
||||
|
||||
import com.qiuguo.iot.base.enums.AskTypeEnum;
|
||||
import com.qiuguo.iot.base.utils.StringUtils;
|
||||
import com.qiuguo.iot.data.entity.system.SystemTalkAnswerConfigEntity;
|
||||
import com.qiuguo.iot.data.request.system.SystemTalkAnswerConfigRequest;
|
||||
@ -20,8 +21,10 @@ import reactor.core.scheduler.Scheduler;
|
||||
import reactor.core.scheduler.Schedulers;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
@ -38,9 +41,16 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
public class SystemTalkAnswerConfigService extends GenericReactiveCrudService<SystemTalkAnswerConfigEntity, Long> {
|
||||
|
||||
private static Integer MAX_COUT = 1000;
|
||||
//内存中缓存这些数据,正常这些数据不会很多
|
||||
/**
|
||||
* 内存中缓存这些数据自定义指令,正常这些数据不会很多
|
||||
*/
|
||||
private static ConcurrentHashMap<String, SystemTalkAnswerConfigEntity> group = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* 内存中缓存这些数据自定义指令,正常这些数据不会很多
|
||||
*/
|
||||
private static List<SystemTalkAnswerConfigEntity> groupCommand = new ArrayList<>();
|
||||
|
||||
@PostConstruct
|
||||
public void initGroup() {
|
||||
log.info("初始化自定义回答缓存数据");
|
||||
@ -49,10 +59,17 @@ public class SystemTalkAnswerConfigService extends GenericReactiveCrudService<Sy
|
||||
reactiveQuery = reactiveQuery.and("is_delete", 0);
|
||||
|
||||
reactiveQuery.paging(0, MAX_COUT.intValue()).fetch().map(item ->{
|
||||
group.put(item.getAskKey(), item);
|
||||
if(item.getAnswerType() < AskTypeEnum.UPDATE.getCode()) {
|
||||
group.put(item.getAskKey(), item);
|
||||
}else if(item.getAnswerType().equals(AskTypeEnum.COMMAND_N.getCode())){
|
||||
groupCommand.add(item);
|
||||
}
|
||||
return item;
|
||||
}).doFinally(signalType -> {
|
||||
log.info("配置最多读取{}条,实际读取了{}条自定义回答指令", MAX_COUT, group.size());
|
||||
groupCommand.sort((a, b) ->{
|
||||
return b.getAskKey().length() - a.getAskKey().length();
|
||||
});
|
||||
log.info("配置最多读取{}条,实际读取了{}条自定义回答指令,指令后参数名称{}条", MAX_COUT, group.size(), groupCommand.size());
|
||||
}).subscribeOn(Schedulers.single()).subscribe();
|
||||
|
||||
}
|
||||
@ -296,4 +313,8 @@ public class SystemTalkAnswerConfigService extends GenericReactiveCrudService<Sy
|
||||
public ConcurrentHashMap<String, SystemTalkAnswerConfigEntity> getSystemTalkWithKeyGroup() {
|
||||
return group;
|
||||
}
|
||||
|
||||
public List<SystemTalkAnswerConfigEntity> getCommandList() {
|
||||
return groupCommand;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
package com.qiuguo.iot.third.enums;
|
||||
|
||||
|
||||
import com.qiuguo.iot.base.enums.AskTypeEnum;
|
||||
import com.qiuguo.iot.base.utils.StringUtils;
|
||||
import com.qiuguo.iot.data.entity.device.DeviceUserBindEntity;
|
||||
import com.qiuguo.iot.data.entity.system.SystemTalkAnswerConfigEntity;
|
||||
import com.qiuguo.iot.third.nlp.action.Action;
|
||||
import com.qiuguo.iot.third.nlp.action.ActionTime;
|
||||
import com.qiuguo.iot.third.nlp.action.Actions;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -17,6 +19,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
* 作者:吴林
|
||||
* */
|
||||
// 中文词性表
|
||||
@Slf4j
|
||||
public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
|
||||
v(0, "动词"){
|
||||
@ -26,7 +29,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
action.setAction(key);
|
||||
SystemTalkAnswerConfigEntity entity = getSystemTalkWithKey(action.getAction(), keyGroup);
|
||||
if(entity != null){
|
||||
@ -43,7 +47,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -54,7 +59,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -68,7 +74,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -79,7 +86,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},//LAC PER
|
||||
@ -90,7 +98,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -101,7 +110,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},*/
|
||||
@ -112,7 +122,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
action.getLbs().add(key);
|
||||
return action;
|
||||
}
|
||||
@ -124,8 +135,9 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
return nt.getAction(keyGroup, key, actions, action, systemTalkAnswerConfigEntities, includs);
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return nt.getAction(keyGroup, key, actions, action, systemTalkAnswerConfigEntities, includs, commands);
|
||||
}
|
||||
},
|
||||
LOC(4, "机构团体"){
|
||||
@ -135,8 +147,9 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
return nt.getAction(keyGroup, key, actions, action, systemTalkAnswerConfigEntities, includs);
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return nt.getAction(keyGroup, key, actions, action, systemTalkAnswerConfigEntities, includs, commands);
|
||||
}
|
||||
},
|
||||
/*nz(5, "其他专名"){
|
||||
@ -146,7 +159,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},*/
|
||||
@ -157,26 +171,32 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
//匹配到关键词就不能作为名词加入,未匹配到的,分割前的都加入名词
|
||||
SystemTalkAnswerConfigEntity entity = getSystemTalkWithKey(key, keyGroup);
|
||||
if(entity != null){
|
||||
systemTalkAnswerConfigEntities.add(entity);
|
||||
actions.setA(1);
|
||||
//已记录的加进去
|
||||
if(StringUtils.isNotEmpty(actions.getName())){
|
||||
//
|
||||
entity = getSystemTalkWithKey(actions.getName(), keyGroup);
|
||||
if(entity != null){
|
||||
systemTalkAnswerConfigEntities.add(entity);
|
||||
actions.setA(1);
|
||||
}else{
|
||||
//这里会走到a+b=2
|
||||
action.setName(actions.getName());
|
||||
actions.setB(1);
|
||||
actions.setName("");
|
||||
if(entity.getAnswerType().equals(AskTypeEnum.IOT.getCode())){
|
||||
systemTalkAnswerConfigEntities.add(entity);
|
||||
actions.setA(1);
|
||||
//已记录的加进去
|
||||
if(StringUtils.isNotEmpty(actions.getName())){
|
||||
//
|
||||
entity = getSystemTalkWithKey(actions.getName(), keyGroup);
|
||||
if(entity != null){
|
||||
systemTalkAnswerConfigEntities.add(entity);
|
||||
actions.setA(1);
|
||||
}else{
|
||||
//这里会走到a+b=2
|
||||
action.setName(actions.getName());
|
||||
actions.setB(1);
|
||||
actions.setName("");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
log.info("IOT不支持的自定义指令");
|
||||
}
|
||||
|
||||
}else{
|
||||
if(actions.getB() == 1 && actions.getA() == 0){
|
||||
//本名称没有找到对应的动作
|
||||
@ -204,7 +224,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -216,7 +237,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},*/
|
||||
@ -227,13 +249,19 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
if(StringUtils.isNotEmpty(actions.getName())){
|
||||
//action.setName(name);//.add(name);
|
||||
SystemTalkAnswerConfigEntity entity = getSystemTalkWithKey(actions.getName(), keyGroup);
|
||||
if(entity != null){
|
||||
systemTalkAnswerConfigEntities.add(entity);
|
||||
actions.setA(1);//a = 1;
|
||||
if(entity.getAnswerType().equals(AskTypeEnum.IOT.getCode())){
|
||||
systemTalkAnswerConfigEntities.add(entity);
|
||||
actions.setA(1);//a = 1;
|
||||
}else{
|
||||
log.info("IOT不支持的自定义指令");
|
||||
}
|
||||
|
||||
}else{
|
||||
if(actions.getB() == 1 && actions.getA() == 0){
|
||||
//本名称没有找到对应的动作
|
||||
@ -266,7 +294,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -277,7 +306,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -288,7 +318,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -299,7 +330,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -310,7 +342,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -321,7 +354,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},//LAC t
|
||||
@ -332,7 +366,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},//LAC vn
|
||||
@ -343,7 +378,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -354,7 +390,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -365,7 +402,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},*/
|
||||
@ -376,7 +414,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
action.setStatus(key);
|
||||
return action;
|
||||
}
|
||||
@ -388,7 +427,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -399,7 +439,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -411,7 +452,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -422,7 +464,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -433,7 +476,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
ist<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},*/
|
||||
@ -444,7 +488,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
//解析时间关键字
|
||||
action.setTime(new ActionTime());
|
||||
action.getTime().setTime(key);
|
||||
@ -458,8 +503,9 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
return t.getAction(keyGroup, key, actions, action, systemTalkAnswerConfigEntities, includs);
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return t.getAction(keyGroup, key, actions, action, systemTalkAnswerConfigEntities, includs, commands);
|
||||
}
|
||||
},//LAC TIME
|
||||
/* u(26, "助词"){
|
||||
@ -469,7 +515,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -480,10 +527,11 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
},*/
|
||||
|
||||
a(28, "形容词:包含 ad ag an"){
|
||||
@Override
|
||||
@ -492,18 +540,20 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
return action;
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return n.getAction(keyGroup, key, actions, action, systemTalkAnswerConfigEntities, includs, commands);
|
||||
}
|
||||
},
|
||||
ag(28, "形玉素"){
|
||||
/*ag(28, "形玉素"){
|
||||
@Override
|
||||
public Action getAction(ConcurrentHashMap<String, SystemTalkAnswerConfigEntity> keyGroup,
|
||||
String key,
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -514,7 +564,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -525,7 +576,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},*/
|
||||
@ -536,8 +588,9 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
return c.getAction(keyGroup, key, actions, action, systemTalkAnswerConfigEntities, includs);
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return c.getAction(keyGroup, key, actions, action, systemTalkAnswerConfigEntities, includs, commands);
|
||||
}
|
||||
},
|
||||
/*x(30, "非语素词"){
|
||||
@ -547,7 +600,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -558,7 +612,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},//LAC xc
|
||||
@ -569,7 +624,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},//LAC xc
|
||||
@ -580,7 +636,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -591,7 +648,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},
|
||||
@ -602,7 +660,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
},*/
|
||||
@ -614,7 +673,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
if(actions.getB() == 1 && actions.getA() == 0){
|
||||
//本名称没有找到对应的动作
|
||||
action.setSystemTalkAnswerConfigEntity(actions.getLastSystemTalkAnswerConfigEntity());
|
||||
@ -629,7 +689,7 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
action.setLbs(new ArrayList<>());
|
||||
action.setAsk(actions.getRecordText());
|
||||
}
|
||||
int index = Integer.parseInt(key.replace(">", "").replace("<", ""));
|
||||
int index = Integer.parseInt(key.replace(">", ""));
|
||||
action.setDeviceUserBindEntity(includs.get(index));
|
||||
actions.setName("");
|
||||
action.setName(action.getDeviceUserBindEntity().getBindName());
|
||||
@ -637,6 +697,20 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
return action;
|
||||
}
|
||||
},
|
||||
qj(101, "在查找字符串时用来临时替换系统自定义动词后面词,目前最多同时支持20个,见LAC字典>1<"){
|
||||
@Override
|
||||
public Action getAction(ConcurrentHashMap<String, SystemTalkAnswerConfigEntity> keyGroup,
|
||||
String key,
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
int index = Integer.parseInt(key.replace("#", ""));
|
||||
action.setActionCommand(commands.get(index).getAskKey());
|
||||
return action;
|
||||
}
|
||||
},
|
||||
DEFAULT(1000, "默认"){
|
||||
@Override
|
||||
public Action getAction(ConcurrentHashMap<String, SystemTalkAnswerConfigEntity> keyGroup,
|
||||
@ -644,7 +718,8 @@ public enum ChinesePartSpeechEnum implements IChinesePartSpeech{
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs){
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands){
|
||||
return action;
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,5 +14,6 @@ public interface IChinesePartSpeech {
|
||||
Actions actions,
|
||||
Action action,
|
||||
List<SystemTalkAnswerConfigEntity> systemTalkAnswerConfigEntities,
|
||||
List<DeviceUserBindEntity> includs);
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands);
|
||||
}
|
||||
|
||||
@ -11,17 +11,34 @@ import java.util.List;
|
||||
@Data
|
||||
public class Action {
|
||||
|
||||
//匹配系统的动作
|
||||
/**
|
||||
* 匹配系统的动作
|
||||
*/
|
||||
private SystemTalkAnswerConfigEntity systemTalkAnswerConfigEntity;
|
||||
private String action;//动作(动词)
|
||||
/**
|
||||
* 动作(动词、指令)
|
||||
*/
|
||||
private String action;
|
||||
/**
|
||||
* 动作后跟的名词(自定义)
|
||||
*/
|
||||
private String actionCommand;
|
||||
/**
|
||||
* 动作对象(名词)。可能存在多个,如果有关系词连接
|
||||
*/
|
||||
private String name;
|
||||
private String status;//动作程度结果(名词,量词)
|
||||
|
||||
private ActionTime time;//具体时间
|
||||
private List<String> lbs;//一些城市地狱名词
|
||||
/**
|
||||
* 动作程度结果(名词,量词)
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 具体时间
|
||||
*/
|
||||
private ActionTime time;
|
||||
/**
|
||||
* 一些城市地狱名词
|
||||
*/
|
||||
private List<String> lbs;
|
||||
/**
|
||||
* 人名
|
||||
*/
|
||||
|
||||
@ -50,29 +50,43 @@ public class NlpService {
|
||||
return b.getBindName().length() - a.getBindName().length();
|
||||
});//按照名称由长到短排序
|
||||
List<DeviceUserBindEntity> includs = new ArrayList<>();
|
||||
List<SystemTalkAnswerConfigEntity> commands = new ArrayList<>();
|
||||
String pText = text;
|
||||
int i = 0;
|
||||
//放在这里是因为用户有物联网设备才有意义
|
||||
for (SystemTalkAnswerConfigEntity entity:systemTalkAnswerConfigService.getCommandList()
|
||||
) {
|
||||
if(pText.indexOf(entity.getAskKey()) >= 0){
|
||||
//找到对应的名称
|
||||
pText = pText.replace(entity.getAskKey(), "#" + (i++) + "#");
|
||||
commands.add(entity);
|
||||
}
|
||||
}
|
||||
i = 0;
|
||||
for (DeviceUserBindEntity entity:list
|
||||
) {
|
||||
) {
|
||||
if(pText.indexOf(entity.getBindName()) >= 0){
|
||||
//找到对应的名称
|
||||
pText = pText.replace(entity.getBindName(), ">" + (i++) + "<");
|
||||
pText = pText.replace(entity.getBindName(), ">" + (i++) + ">");
|
||||
includs.add(entity);
|
||||
}
|
||||
}
|
||||
|
||||
if(includs.size() > 0) {
|
||||
return getActions(pText, text, includs);
|
||||
return getActions(pText, text, includs, commands);
|
||||
}
|
||||
|
||||
}
|
||||
return getActions(text, text, null);
|
||||
return getActions(text, text, null, null);
|
||||
});
|
||||
}
|
||||
//20230928日记,后期改成先匹配用户的设备名称,再找动词
|
||||
return getActions(text, text, null);
|
||||
return getActions(text, text, null, null);
|
||||
}
|
||||
|
||||
public Mono<Actions> getActions(String text, String recordText, List<DeviceUserBindEntity> includs) {
|
||||
public Mono<Actions> getActions(String text, String recordText,
|
||||
List<DeviceUserBindEntity> includs,
|
||||
List<SystemTalkAnswerConfigEntity> commands) {
|
||||
return liguoNlpService.geSingletNlp(text).map(nlp -> {
|
||||
Actions actions = new Actions();
|
||||
actions.setActions(new ArrayList<>());
|
||||
@ -127,7 +141,8 @@ public class NlpService {
|
||||
actions,
|
||||
action,
|
||||
systemTalkAnswerConfigEntities,
|
||||
includs);
|
||||
includs,
|
||||
commands);
|
||||
|
||||
}
|
||||
//下面判断最后一个名词
|
||||
|
||||
@ -118,7 +118,8 @@ public class BaseWebSocketProcess {
|
||||
sendMessage(action, baseSession, resp);
|
||||
}else{
|
||||
//查询是否有相关指令绑定
|
||||
controllerDevice(action, binds.getData().get(0), baseSession, action.getName());
|
||||
action.setDeviceUserBindEntity(binds.getData().get(0));
|
||||
controllerDevice(action, action.getDeviceUserBindEntity(), baseSession, action.getName());
|
||||
|
||||
}
|
||||
return Mono.empty();
|
||||
@ -238,6 +239,9 @@ public class BaseWebSocketProcess {
|
||||
SystemTalkBindDeviceRequest systemTalkBindDeviceRequest = new SystemTalkBindDeviceRequest();
|
||||
systemTalkBindDeviceRequest.setCategoryCode(deviceUserBindEntity.getCategoryCode());
|
||||
systemTalkBindDeviceRequest.setSystemTalkId(action.getSystemTalkAnswerConfigEntity().getId());
|
||||
if(StringUtils.isNotEmpty(action.getActionCommand())){
|
||||
systemTalkBindDeviceRequest.setAskCommon(action.getActionCommand());
|
||||
}
|
||||
systemTalkBindDeviceService.selectSystemTalkBindDeviceByRequest(systemTalkBindDeviceRequest)
|
||||
.defaultIfEmpty(new SystemTalkBindDeviceEntity())
|
||||
.map(systemTalkBindDeviceEntity -> {
|
||||
@ -258,7 +262,7 @@ public class BaseWebSocketProcess {
|
||||
String msg = "";
|
||||
if(isOk.getCode().equals(RespCodeEnum.SUCESS.getCode())){
|
||||
//通知打开灯成功
|
||||
msg = action.getSystemTalkAnswerConfigEntity().getAnswerValue().replaceAll("#name#", deviceName);
|
||||
msg = systemTalkBindDeviceEntity.getAnswerValue().replaceAll("#name#", deviceName);
|
||||
if(StringUtils.isNotEmpty(action.getStatus())){
|
||||
msg = msg.replace("#value#", action.getStatus());
|
||||
}
|
||||
@ -266,7 +270,7 @@ public class BaseWebSocketProcess {
|
||||
log.info("执行指令");
|
||||
}else{
|
||||
//通知开灯失败;
|
||||
msg = action.getSystemTalkAnswerConfigEntity().getAnswerValueFaild().replaceAll("#name#", deviceName);
|
||||
msg = systemTalkBindDeviceEntity.getAnswerValueFaild().replaceAll("#name#", deviceName);
|
||||
log.info("执行指令失败");
|
||||
}
|
||||
BoxMessageResp resp = new BoxMessageResp();
|
||||
|
||||
@ -119,6 +119,8 @@ public class BoxWebSocketHandler extends BaseWebSocketProcess implements WebSock
|
||||
// MDC.put(LogMdcConfiguration.PRINT_LOG_ID, requestId);
|
||||
boxGroup.remove(boxSession.getSn());//断链后及时移除
|
||||
log.info("设备断开连接SN:{}", boxSession.getSn());
|
||||
//通知用户端设备绑定成功
|
||||
sendNoticeToUser(boxSession.getUserId(), "设备离线,设备序列号:" + boxSession.getSn(), AskTypeEnum.BOX_OFF_LINE.getCode());
|
||||
deviceInfoService.setOnLineStatus(sn, YesNo.NO.getCode()).subscribe();
|
||||
ReactiveValueOperations<String, String> operations = reactiveStringRedisTemplate.opsForValue();
|
||||
UserDeviceInfoModel userDeviceInfoModel = new UserDeviceInfoModel();
|
||||
@ -132,6 +134,19 @@ public class BoxWebSocketHandler extends BaseWebSocketProcess implements WebSock
|
||||
}).then();
|
||||
}
|
||||
|
||||
private void sendNoticeToUser(Long userId, String text, Integer type){
|
||||
BaseSession userSession = getUserSessionWithUserId(userId);
|
||||
if(userSession != null){
|
||||
//log.info("推送用户通知设备绑定成功");
|
||||
UserMessageResp userMsgResp = new UserMessageResp();
|
||||
userMsgResp.setType(type);
|
||||
userMsgResp.setText(text);
|
||||
String msg = JSONObject.toJSONString(userMsgResp);
|
||||
log.info("推送通知到端msg:{}", msg);
|
||||
userSession.getSink().next(userSession.getSession().textMessage(msg));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void checkToken(String sn, Long linkTime, String signature, Long userId){
|
||||
@ -196,16 +211,9 @@ public class BoxWebSocketHandler extends BaseWebSocketProcess implements WebSock
|
||||
//跟新在线状态
|
||||
deviceInfoService.setOnLineStatus(dv.getId(), YesNo.YES.getCode()).subscribe();
|
||||
//通知用户端设备绑定成功
|
||||
BaseSession userSession = getUserSessionWithUserId(userId);
|
||||
if(userSession != null){
|
||||
//log.info("推送用户通知设备绑定成功");
|
||||
UserMessageResp userMsgResp = new UserMessageResp();
|
||||
userMsgResp.setType(AskTypeEnum.BOX_ON_LINE.getCode());
|
||||
userMsgResp.setText("设备联网成功,设备序列号:" + dv.getSn());
|
||||
String msg = JSONObject.toJSONString(userMsgResp);
|
||||
log.info("推送通知到端msg:{}", msg);
|
||||
userSession.getSink().next(userSession.getSession().textMessage(msg));
|
||||
}
|
||||
sendNoticeToUser(userId, "设备联网成功,设备序列号:" + dv.getSn(), AskTypeEnum.BOX_ON_LINE.getCode());
|
||||
|
||||
|
||||
deviceUserBindService.selectDeviceUserBindByRequest(request)
|
||||
.defaultIfEmpty(new DeviceUserBindEntity())
|
||||
.map(entity ->{
|
||||
@ -239,9 +247,5 @@ public class BoxWebSocketHandler extends BaseWebSocketProcess implements WebSock
|
||||
}
|
||||
return Mono.empty();
|
||||
}).subscribe();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ public class MysqlUtilTable2Bean {
|
||||
continue;
|
||||
}
|
||||
String temp = "";
|
||||
temp += " //" + tb.getComment() + "\n";
|
||||
temp += " /**\n *" + tb.getComment() + "\n */\n";
|
||||
if (i == 0) {
|
||||
|
||||
}else{
|
||||
@ -57,9 +57,9 @@ public class MysqlUtilTable2Bean {
|
||||
}
|
||||
temp += " private " + tb.getJavaType() + " " + tb.getJavaCode() + ";";
|
||||
if(tb.getJavaType().equals("Date")/*tb.getField().equals("modify_time") || tb.getField().equals("create_time")*/){
|
||||
temp += "\n //" + tb.getComment() + "搜索开始\n";
|
||||
temp += "\n /**\n *" + tb.getComment() + "搜索开始\n */\n";
|
||||
temp += "\n private " + tb.getJavaType() + " " + tb.getJavaCode() + "Start;\n";
|
||||
temp += "\n //" + tb.getComment() + "搜索结束\n";
|
||||
temp += "\n /**\n *" + tb.getComment() + "搜索结束\n */\n";
|
||||
temp += " private " + tb.getJavaType() + " " + tb.getJavaCode() + "End;";
|
||||
|
||||
}
|
||||
@ -278,7 +278,7 @@ public class MysqlUtilTable2Bean {
|
||||
// 定义声明
|
||||
for (FieldBean tb : list) {
|
||||
String temp = "";
|
||||
temp += " //" + tb.getComment() + "\n";
|
||||
temp += " /**\n *" + tb.getComment() + "\n */\n";
|
||||
if (MysqlMain.dto_exclude.contains("," + tb.getField() + ",")) {
|
||||
continue;
|
||||
}/*else{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user