更新推送系统jpa对象转换的问题

This commit is contained in:
panshuling321 2022-10-17 11:24:35 +08:00
parent eaefe08580
commit 1543490364
2 changed files with 11 additions and 1 deletions

View File

@ -33,6 +33,6 @@ public interface XhpcTerminalRepository extends JpaRepository<XhpcTerminal, Inte
String selectBySql(String serialNumber);
@Query("select t.serialNumber, t.status from XhpcTerminal as t where t.delFlag = 0")
@Query(value = "select new XhpcTerminal(t.serialNumber, t.status) from XhpcTerminal as t where t.delFlag = 0")
List<XhpcTerminal> selectStatusBySql();
}

View File

@ -92,6 +92,16 @@ public class XhpcTerminal extends BaseEntity {
private String prompt;
public XhpcTerminal(String serialNumber, Integer status){
this.serialNumber = serialNumber;
this.status = status;
}
public XhpcTerminal() {
}
public int getConnectorType() {
return connectorType;