terry 2 gadi atpakaļ
vecāks
revīzija
5bfb8a66d3

+ 1 - 1
app/device/dao/LightStrategyDao.go

@@ -26,7 +26,7 @@ type LightStrategy struct {
 }
 
 func (LightStrategy) TableName() string {
-	return "t_strategy_light"
+	return "strategy_light"
 }
 
 func (c *LightStrategy) Delete() error {

+ 1 - 1
app/device/dao/alarmDao.go

@@ -31,7 +31,7 @@ type Alarm struct {
 }
 
 func (Alarm) TableName() string {
-	return "t_dev_a_key_alarm_serve"
+	return "device_a_key_alarm_serve"
 }
 
 func (c Alarm) Delete() error {

+ 1 - 1
app/device/dao/alarmTerminalDao.go

@@ -34,7 +34,7 @@ type AlarmTerminal struct {
 }
 
 func (AlarmTerminal) TableName() string {
-	return "t_dev_a_key_alarm_terminal"
+	return "device_a_key_alarm_terminal"
 }
 
 func (c AlarmTerminal) Delete() error {

+ 1 - 1
app/device/dao/bridgeDao.go

@@ -39,7 +39,7 @@ type Bridge struct {
 }
 
 func (Bridge) TableName() string {
-	return "t_dev_bridge"
+	return "device_bridge"
 }
 
 func (c Bridge) Delete() error {

+ 1 - 1
app/device/dao/bridgeSensorDao.go

@@ -31,7 +31,7 @@ type BridgeSensor struct {
 }
 
 func (BridgeSensor) TableName() string {
-	return "t_dev_bridge_sensor"
+	return "device_bridge_sensor"
 }
 
 func (c BridgeSensor) Delete() error {

+ 1 - 1
app/device/dao/cameraDao.go

@@ -37,7 +37,7 @@ type CameraDevice struct {
 }
 
 func (CameraDevice) TableName() string {
-	return "t_dev_camera"
+	return "device_camera"
 }
 
 func (c CameraDevice) IsExistedBySN() bool {

+ 1 - 1
app/device/dao/captureUnitDao.go

@@ -38,7 +38,7 @@ type CaptureUnit struct {
 }
 
 func (CaptureUnit) TableName() string {
-	return "t_dev_capture_unit"
+	return "device_capture_unit"
 }
 
 func (c CaptureUnit) IsExistedBySN() bool {

+ 1 - 1
app/device/dao/checkPointDao.go

@@ -19,7 +19,7 @@ type CheckPoint struct {
 }
 
 func (CheckPoint) TableName() string {
-	return "t_dev_check_point"
+	return "device_check_point"
 }
 
 func (c CheckPoint) IsExistedBySN() bool {

+ 1 - 1
app/device/dao/garbageDao.go

@@ -41,7 +41,7 @@ type Garbage struct {
 }
 
 func (Garbage) TableName() string {
-	return "t_dev_garbage"
+	return "device_garbage"
 }
 
 func (c Garbage) Delete() error {

+ 1 - 1
app/device/dao/garbageWayGroupDao.go

@@ -19,7 +19,7 @@ type GarbageWayGroup struct {
 }
 
 func (GarbageWayGroup) TableName() string {
-	return "t_dev_garbage_way_group"
+	return "device_garbage_way_group"
 }
 
 func (c GarbageWayGroup) Delete() error {

+ 1 - 1
app/device/dao/gatewayDao.go

@@ -36,7 +36,7 @@ type Gateway struct {
 }
 
 func (Gateway) TableName() string {
-	return "t_dev_wisdom_gateway"
+	return "device_wisdom_gateway"
 }
 
 func (c *Gateway) Delete() error {

+ 1 - 1
app/device/dao/gatewayRelationDao.go

@@ -22,7 +22,7 @@ type GatewayRelation struct {
 }
 
 func (GatewayRelation) TableName() string {
-	return "t_dev_gateway_relation"
+	return "device_gateway_relation"
 }
 
 func (c *GatewayRelation) Get() error {

+ 1 - 1
app/device/dao/infoBoardDao.go

@@ -40,7 +40,7 @@ type InfoBoard struct {
 }
 
 func (InfoBoard) TableName() string {
-	return "t_dev_info_board"
+	return "device_info_board"
 }
 
 func (c InfoBoard) Delete() error {

+ 5 - 5
app/device/dao/intelligentLightingDao.go

@@ -25,7 +25,7 @@ type IntelligentLight struct {
 }
 
 func (IntelligentLight) TableName() string {
-	return "t_strategy_intelligent_light"
+	return "strategy_intelligent_light"
 }
 
 func (c *IntelligentLight) BatchGet(ids []int) ([]IntelligentLight, error) {
@@ -55,10 +55,10 @@ func (c *IntelligentLight) GetByGroup(searchValue string, current, size,
 		whereStr += " and (con.sn like '%?%' or con.name like '%?%')"
 		whereValue = append(whereValue, searchValue, searchValue)
 	}
-	err := Db.Debug().Table("t_strategy_intelligent_light lig").Select(selectStr).
-		Joins("left join t_dev_light_control con ON lig.rid = con.id").
-		Joins("left join t_strategy_light b ON b.id = lig.light_id").
-		Joins("left join t_strategy_time_condition t ON t.light_id = lig.light_id").
+	err := Db.Debug().Table("strategy_intelligent_light lig").Select(selectStr).
+		Joins("left join device_light_control con ON lig.rid = con.id").
+		Joins("left join strategy_light b ON b.id = lig.light_id").
+		Joins("left join strategy_time_condition t ON t.light_id = lig.light_id").
 		Where(whereStr, whereValue...).Offset(current).Limit(size).
 		Order("lig.create_time desc").Scan(&groupRelations).Error
 	return groupRelations, err

+ 1 - 1
app/device/dao/ipBroadcastDao.go

@@ -31,7 +31,7 @@ type IpBroadcast struct {
 }
 
 func (IpBroadcast) TableName() string {
-	return "t_dev_ip_broadcast"
+	return "device_ip_broadcast"
 }
 
 func (c IpBroadcast) Delete() error {

+ 1 - 1
app/device/dao/lampPoleDao.go

@@ -38,7 +38,7 @@ type LampPole struct {
 }
 
 func (LampPole) TableName() string {
-	return "t_dev_lamp_pole"
+	return "device_lamp_pole"
 }
 
 func (c *LampPole) Delete() error {

+ 1 - 1
app/device/dao/lampPoleGroupDao.go

@@ -21,7 +21,7 @@ type LampPoleGroup struct {
 }
 
 func (LampPoleGroup) TableName() string {
-	return "t_dev_lamp_pole_group"
+	return "device_lamp_pole_group"
 }
 
 func (c *LampPoleGroup) Delete() error {

+ 1 - 1
app/device/dao/lightConditionDao.go

@@ -17,7 +17,7 @@ type LightCondition struct {
 }
 
 func (LightCondition) TableName() string {
-	return "t_strategy_light_condition"
+	return "strategy_light_condition"
 }
 
 func (c *LightCondition) Get() error {

+ 1 - 1
app/device/dao/lightControlDao.go

@@ -42,7 +42,7 @@ type LightControl struct {
 }
 
 func (LightControl) TableName() string {
-	return "t_dev_light_control"
+	return "device_light_control"
 }
 
 func (c *LightControl) Delete() error {

+ 1 - 1
app/device/dao/manholeCoverDao.go

@@ -41,7 +41,7 @@ type ManholeCover struct {
 }
 
 func (ManholeCover) TableName() string {
-	return "t_dev_manhole_cover"
+	return "device_manhole_cover"
 }
 
 func (c ManholeCover) Delete() error {

+ 1 - 1
app/device/dao/onDemandGroupDao.go

@@ -23,7 +23,7 @@ type OnDemandGroup struct {
 }
 
 func (OnDemandGroup) TableName() string {
-	return "t_dev_on_demand_group"
+	return "device_on_demand_group"
 }
 
 func (c *OnDemandGroup) Delete() error {

+ 1 - 1
app/device/dao/onDemandSensorDao.go

@@ -25,7 +25,7 @@ type OnDemandSensor struct {
 }
 
 func (OnDemandSensor) TableName() string {
-	return "t_dev_on_demand_sensor"
+	return "device_on_demand_sensor"
 }
 
 func (c OnDemandSensor) Delete() error {

+ 1 - 1
app/device/dao/optoSensoDao.go

@@ -33,7 +33,7 @@ type OptoSensor struct {
 }
 
 func (OptoSensor) TableName() string {
-	return "t_dev_opto_sensor"
+	return "device_opto_sensor"
 }
 
 func (c OptoSensor) Delete() error {

+ 1 - 1
app/device/dao/switchBoxDao.go

@@ -35,7 +35,7 @@ type SwitchBox struct {
 }
 
 func (SwitchBox) TableName() string {
-	return "t_dev_switch_box"
+	return "device_switch_box"
 }
 
 func (c SwitchBox) Delete() error {

+ 1 - 1
app/device/dao/timeConditionDao.go

@@ -18,7 +18,7 @@ type TimeCondition struct {
 }
 
 func (TimeCondition) TableName() string {
-	return "t_strategy_time_condition"
+	return "strategy_time_condition"
 }
 
 func (c *TimeCondition) Get() error {

+ 1 - 1
app/device/dao/transformerDao.go

@@ -29,7 +29,7 @@ type Transformer struct {
 }
 
 func (Transformer) TableName() string {
-	return "t_dev_transformer"
+	return "device_transformer"
 }
 
 func (c Transformer) Delete() error {

+ 1 - 1
app/device/dao/zigbeeDao.go

@@ -37,7 +37,7 @@ type Zigbee struct {
 }
 
 func (Zigbee) TableName() string {
-	return "t_dev_zigbee"
+	return "device_zigbee"
 }
 
 func (c Zigbee) Delete() error {

+ 1 - 1
app/device/service/lampPoleGroupService.go

@@ -150,7 +150,7 @@ func (s *lampPoleGroupService) GetFiltration(tenantId int) ([]*dao.LampPoleGroup
 	}
 
 	//todo
-	// get t_dev_light_control group_id
+	// get device_light_control group_id
 	// groupIds := lightControl.GetGroupIds()
 
 	devices, err = device.GetAllDevices()

+ 1 - 1
build.bat

@@ -1,3 +1,3 @@
 set GOARCH=amd64
 set GOOS=linux
-go build -o build/iot_service ./
+go build -o build/terry_test_service ./