| | |
| | | VUE_APP_API_URL = 'http://192.168.1.44:10010' |
| | | |
| | | #VUE_APP_API_URL = 'https://zhcg.fnwtzx.com/gateway_interface' |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywconditioner:create', 'æ°å»ºç©ºè°è®¾å¤ä¿¡æ¯', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywconditioner:delete', 'å é¤ç©ºè°è®¾å¤ä¿¡æ¯', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywconditioner:update', 'ä¿®æ¹ç©ºè°è®¾å¤ä¿¡æ¯', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywconditioner:query', 'æ¥è¯¢ç©ºè°è®¾å¤ä¿¡æ¯', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywconditioner:exportExcel', '导åºç©ºè°è®¾å¤ä¿¡æ¯(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywelectrical:create', 'æ°å»ºçµè¡¨è®¾å¤ä¿¡æ¯', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywelectrical:delete', 'å é¤çµè¡¨è®¾å¤ä¿¡æ¯', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywelectrical:update', 'ä¿®æ¹çµè¡¨è®¾å¤ä¿¡æ¯', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywelectrical:query', 'æ¥è¯¢çµè¡¨è®¾å¤ä¿¡æ¯', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywelectrical:exportExcel', '导åºçµè¡¨è®¾å¤ä¿¡æ¯(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywelectricallog:create', 'æ°å»ºçµå¨ç±»æä½æ¥å¿', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywelectricallog:delete', 'å é¤çµå¨ç±»æä½æ¥å¿', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywelectricallog:update', 'ä¿®æ¹çµå¨ç±»æä½æ¥å¿', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywelectricallog:query', 'æ¥è¯¢çµå¨ç±»æä½æ¥å¿', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywelectricallog:exportExcel', '导åºçµå¨ç±»æä½æ¥å¿(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywelectricalroom:create', 'æ°å»ºè®¾å¤å
³èæ¿é´', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywelectricalroom:delete', 'å é¤è®¾å¤å
³èæ¿é´', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywelectricalroom:update', 'ä¿®æ¹è®¾å¤å
³èæ¿é´', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywelectricalroom:query', 'æ¥è¯¢è®¾å¤å
³èæ¿é´', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywelectricalroom:exportExcel', '导åºè®¾å¤å
³èæ¿é´(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywgateway:create', 'æ°å»ºç½å
³ç®¡ç', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywgateway:delete', 'å é¤ç½å
³ç®¡ç', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywgateway:update', 'ä¿®æ¹ç½å
³ç®¡ç', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywgateway:query', 'æ¥è¯¢ç½å
³ç®¡ç', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywgateway:exportExcel', '导åºç½å
³ç®¡ç(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtopuplog:create', 'æ°å»ºå
å¼è®°å½', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtopuplog:delete', 'å é¤å
å¼è®°å½', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtopuplog:update', 'ä¿®æ¹å
å¼è®°å½', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtopuplog:query', 'æ¥è¯¢å
å¼è®°å½', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtopuplog:exportExcel', '导åºå
å¼è®°å½(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | CREATE TABLE `yw_gateway` ( |
| | | `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主é®', |
| | | `creator` int(11) DEFAULT NULL COMMENT 'å建人ç¼ç ', |
| | | `create_date` datetime DEFAULT NULL COMMENT 'å建æ¶é´', |
| | | `editor` int(11) DEFAULT NULL COMMENT 'æ´æ°äººç¼ç ', |
| | | `edit_date` datetime DEFAULT NULL COMMENT 'æ´æ°æ¶é´', |
| | | `isdeleted` int(1) DEFAULT '0' COMMENT 'æ¯å¦å é¤ 0å¦ 1æ¯', |
| | | `name` varchar(100) DEFAULT NULL COMMENT 'ç½å
³åç§°', |
| | | `remark` varchar(500) DEFAULT NULL COMMENT '夿³¨', |
| | | `status` int(1) DEFAULT '0' COMMENT 'ç¶æ 0å¯ç¨ 1ç¦ç¨', |
| | | `sortnum` int(11) DEFAULT NULL COMMENT 'æåºç ', |
| | | `gateway_model` varchar(100) DEFAULT NULL COMMENT 'ç½å
³åå·', |
| | | `gateway_code` varchar(100) DEFAULT NULL COMMENT 'ç½å
³è®¾å¤å·', |
| | | `last_heartbeat_time` datetime DEFAULT NULL COMMENT 'æåå¿è·³æ¶é´', |
| | | `project_id` int(11) DEFAULT NULL COMMENT 'æå±é¡¹ç®ç¼ç ï¼å
³èyw_projectï¼', |
| | | PRIMARY KEY (`id`), |
| | | KEY `idx_gateway_code` (`gateway_code`), |
| | | KEY `idx_project_id` (`project_id`) |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='ç½å
³ç®¡ç'; |
| | |
| | | spring: |
| | | cloud: |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | namespace: funingyunwei_dev |
| | | username: nacos |
| | |
| | | spring: |
| | | cloud: |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | namespace: funingyunwei_test |
| | | # namespace: dev_renkang |
| | | username: nacos |
| | |
| | | # ææ¶å
³éç¼å |
| | | enabled: false |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | # config: |
| | |
| | | # group: dev |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | namespace: funingyunwei_dev |
| | | username: nacos |
| | | password: nacos |
| | |
| | | # ææ¶å
³éç¼å |
| | | enabled: false |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | # config: |
| | |
| | | # group: dev |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | namespace: funingyunwei_test |
| | | username: nacos |
| | | password: nacos |
| | |
| | | # ææ¶å
³éç¼å |
| | | enabled: false |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | # config: |
| | |
| | | # group: dev |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | namespace: funingyunwei_dev |
| | | username: nacos |
| | | password: nacos |
| | |
| | | # ææ¶å
³éç¼å |
| | | enabled: false |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | # config: |
| | |
| | | # group: dev |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | namespace: funingyunwei_test |
| | | username: nacos |
| | | password: nacos |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwConditioner; |
| | | import com.doumee.service.business.YwConditionerService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 空è°è®¾å¤ä¿¡æ¯ |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | @Api(tags = "空è°è®¾å¤ä¿¡æ¯") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX + "/business/ywConditioner") |
| | | public class YwConditionerCloudController extends BaseController { |
| | | |
| | | @Autowired |
| | | private YwConditionerService ywConditionerService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:ywconditioner:create") |
| | | public ApiResponse create(@RequestBody YwConditioner ywConditioner, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywConditioner.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywConditionerService.create(ywConditioner)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:ywconditioner:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywConditionerService.deleteById(id, this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:ywconditioner:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | String[] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | ywConditionerService.deleteByIdInBatch(idList, this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:ywconditioner:update") |
| | | public ApiResponse updateById(@RequestBody YwConditioner ywConditioner, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywConditioner.setLoginUserInfo(this.getLoginUser(token)); |
| | | ywConditionerService.updateById(ywConditioner); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:ywconditioner:query") |
| | | public ApiResponse<PageData<YwConditioner>> findPage(@RequestBody PageWrap<YwConditioner> pageWrap, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywConditionerService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywconditioner:query") |
| | | public ApiResponse findById(@PathVariable Integer id, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywConditionerService.findById(id)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywconditioner:exportExcel") |
| | | public void exportExcel(@RequestBody PageWrap<YwConditioner> pageWrap, HttpServletResponse response, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); |
| | | ExcelExporter.build(YwConditioner.class).export(ywConditionerService.findPage(pageWrap).getRecords(), "空è°è®¾å¤ä¿¡æ¯", response); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwElectrical; |
| | | import com.doumee.service.business.YwElectricalService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * çµè¡¨è®¾å¤ä¿¡æ¯ |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | @Api(tags = "çµè¡¨è®¾å¤ä¿¡æ¯") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX + "/business/ywElectrical") |
| | | public class YwElectricalCloudController extends BaseController { |
| | | |
| | | @Autowired |
| | | private YwElectricalService ywElectricalService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:ywelectrical:create") |
| | | public ApiResponse create(@RequestBody YwElectrical ywElectrical, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywElectrical.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywElectricalService.create(ywElectrical)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:ywelectrical:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywElectricalService.deleteById(id, this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:ywelectrical:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | String[] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | ywElectricalService.deleteByIdInBatch(idList, this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:ywelectrical:update") |
| | | public ApiResponse updateById(@RequestBody YwElectrical ywElectrical, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywElectrical.setLoginUserInfo(this.getLoginUser(token)); |
| | | ywElectricalService.updateById(ywElectrical); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:ywelectrical:query") |
| | | public ApiResponse<PageData<YwElectrical>> findPage(@RequestBody PageWrap<YwElectrical> pageWrap, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywElectricalService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywelectrical:query") |
| | | public ApiResponse findById(@PathVariable Integer id, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywElectricalService.findById(id)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywelectrical:exportExcel") |
| | | public void exportExcel(@RequestBody PageWrap<YwElectrical> pageWrap, HttpServletResponse response, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); |
| | | ExcelExporter.build(YwElectrical.class).export(ywElectricalService.findPage(pageWrap).getRecords(), "çµè¡¨è®¾å¤ä¿¡æ¯", response); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwElectricalLog; |
| | | import com.doumee.service.business.YwElectricalLogService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * çµå¨ç±»æä½æ¥å¿ |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | @Api(tags = "çµå¨ç±»æä½æ¥å¿") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX + "/business/ywElectricalLog") |
| | | public class YwElectricalLogCloudController extends BaseController { |
| | | |
| | | @Autowired |
| | | private YwElectricalLogService ywElectricalLogService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:ywelectricallog:create") |
| | | public ApiResponse create(@RequestBody YwElectricalLog ywElectricalLog, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywElectricalLog.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywElectricalLogService.create(ywElectricalLog)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:ywelectricallog:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywElectricalLogService.deleteById(id, this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:ywelectricallog:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | String[] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | ywElectricalLogService.deleteByIdInBatch(idList, this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:ywelectricallog:update") |
| | | public ApiResponse updateById(@RequestBody YwElectricalLog ywElectricalLog, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywElectricalLog.setLoginUserInfo(this.getLoginUser(token)); |
| | | ywElectricalLogService.updateById(ywElectricalLog); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:ywelectricallog:query") |
| | | public ApiResponse<PageData<YwElectricalLog>> findPage(@RequestBody PageWrap<YwElectricalLog> pageWrap, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywElectricalLogService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywelectricallog:query") |
| | | public ApiResponse findById(@PathVariable Integer id, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywElectricalLogService.findById(id)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywelectricallog:exportExcel") |
| | | public void exportExcel(@RequestBody PageWrap<YwElectricalLog> pageWrap, HttpServletResponse response, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); |
| | | ExcelExporter.build(YwElectricalLog.class).export(ywElectricalLogService.findPage(pageWrap).getRecords(), "çµå¨ç±»æä½æ¥å¿", response); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwElectricalRoom; |
| | | import com.doumee.service.business.YwElectricalRoomService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设å¤å
³èæ¿é´ |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | @Api(tags = "设å¤å
³èæ¿é´") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX + "/business/ywElectricalRoom") |
| | | public class YwElectricalRoomCloudController extends BaseController { |
| | | |
| | | @Autowired |
| | | private YwElectricalRoomService ywElectricalRoomService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:ywelectricalroom:create") |
| | | public ApiResponse create(@RequestBody YwElectricalRoom ywElectricalRoom, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywElectricalRoom.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywElectricalRoomService.create(ywElectricalRoom)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:ywelectricalroom:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywElectricalRoomService.deleteById(id, this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:ywelectricalroom:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | String[] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | ywElectricalRoomService.deleteByIdInBatch(idList, this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:ywelectricalroom:update") |
| | | public ApiResponse updateById(@RequestBody YwElectricalRoom ywElectricalRoom, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywElectricalRoom.setLoginUserInfo(this.getLoginUser(token)); |
| | | ywElectricalRoomService.updateById(ywElectricalRoom); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:ywelectricalroom:query") |
| | | public ApiResponse<PageData<YwElectricalRoom>> findPage(@RequestBody PageWrap<YwElectricalRoom> pageWrap, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywElectricalRoomService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywelectricalroom:query") |
| | | public ApiResponse findById(@PathVariable Integer id, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywElectricalRoomService.findById(id)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywelectricalroom:exportExcel") |
| | | public void exportExcel(@RequestBody PageWrap<YwElectricalRoom> pageWrap, HttpServletResponse response, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); |
| | | ExcelExporter.build(YwElectricalRoom.class).export(ywElectricalRoomService.findPage(pageWrap).getRecords(), "设å¤å
³èæ¿é´", response); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwGateway; |
| | | import com.doumee.service.business.YwGatewayService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç½å
³ç®¡ç |
| | | * @author renkang |
| | | * @date 2026/04/02 |
| | | */ |
| | | @Api(tags = "ç½å
³ç®¡ç") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX + "/business/ywGateway") |
| | | public class YwGatewayCloudController extends BaseController { |
| | | |
| | | @Autowired |
| | | private YwGatewayService ywGatewayService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:ywgateway:create") |
| | | public ApiResponse create(@RequestBody YwGateway ywGateway, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywGateway.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywGatewayService.create(ywGateway)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:ywgateway:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywGatewayService.deleteById(id, this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:ywgateway:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | String[] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | ywGatewayService.deleteByIdInBatch(idList, this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:ywgateway:update") |
| | | public ApiResponse updateById(@RequestBody YwGateway ywGateway, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywGateway.setLoginUserInfo(this.getLoginUser(token)); |
| | | ywGatewayService.updateById(ywGateway); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ç¦å¯ç¨") |
| | | @PostMapping("/updateStatusById") |
| | | @CloudRequiredPermission("business:ywgateway:update") |
| | | public ApiResponse updateStatusById(@RequestBody YwGateway ywGateway, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywGateway.setLoginUserInfo(this.getLoginUser(token)); |
| | | ywGatewayService.updateStatusById(ywGateway); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:ywgateway:query") |
| | | public ApiResponse<PageData<YwGateway>> findPage(@RequestBody PageWrap<YwGateway> pageWrap, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywGatewayService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywgateway:query") |
| | | public ApiResponse findById(@PathVariable Integer id, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywGatewayService.findById(id)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywgateway:exportExcel") |
| | | public void exportExcel(@RequestBody PageWrap<YwGateway> pageWrap, HttpServletResponse response, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); |
| | | ExcelExporter.build(YwGateway.class).export(ywGatewayService.findPage(pageWrap).getRecords(), "ç½å
³ç®¡ç", response); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwTopUpLog; |
| | | import com.doumee.service.business.YwTopUpLogService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å
å¼è®°å½ |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | @Api(tags = "å
å¼è®°å½") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX + "/business/ywTopUpLog") |
| | | public class YwTopUpLogCloudController extends BaseController { |
| | | |
| | | @Autowired |
| | | private YwTopUpLogService ywTopUpLogService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:ywtopuplog:create") |
| | | public ApiResponse create(@RequestBody YwTopUpLog ywTopUpLog, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywTopUpLog.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywTopUpLogService.create(ywTopUpLog)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:ywtopuplog:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywTopUpLogService.deleteById(id, this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:ywtopuplog:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | String[] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | ywTopUpLogService.deleteByIdInBatch(idList, this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:ywtopuplog:update") |
| | | public ApiResponse updateById(@RequestBody YwTopUpLog ywTopUpLog, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywTopUpLog.setLoginUserInfo(this.getLoginUser(token)); |
| | | ywTopUpLogService.updateById(ywTopUpLog); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:ywtopuplog:query") |
| | | public ApiResponse<PageData<YwTopUpLog>> findPage(@RequestBody PageWrap<YwTopUpLog> pageWrap, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywTopUpLogService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywtopuplog:query") |
| | | public ApiResponse findById(@PathVariable Integer id, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywTopUpLogService.findById(id)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywtopuplog:exportExcel") |
| | | public void exportExcel(@RequestBody PageWrap<YwTopUpLog> pageWrap, HttpServletResponse response, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); |
| | | ExcelExporter.build(YwTopUpLog.class).export(ywTopUpLogService.findPage(pageWrap).getRecords(), "å
å¼è®°å½", response); |
| | | } |
| | | } |
| | |
| | | # ææ¶å
³éç¼å |
| | | enabled: false |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | # config: |
| | |
| | | # group: dev |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | namespace: funingyunwei_dev |
| | | username: nacos |
| | |
| | | # ææ¶å
³éç¼å |
| | | enabled: false |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | # config: |
| | |
| | | # group: dev |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | namespace: funingyunwei_test |
| | | username: nacos |
| | | password: nacos |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.doumee.dao.business.model.YwConditioner; |
| | | |
| | | /** |
| | | * 空è°è®¾å¤ä¿¡æ¯Mapper |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | public interface YwConditionerMapper extends MPJBaseMapper<YwConditioner> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.doumee.dao.business.model.YwElectricalLog; |
| | | |
| | | /** |
| | | * çµå¨ç±»æä½æ¥å¿Mapper |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | public interface YwElectricalLogMapper extends MPJBaseMapper<YwElectricalLog> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.doumee.dao.business.model.YwElectrical; |
| | | |
| | | /** |
| | | * çµè¡¨è®¾å¤ä¿¡æ¯Mapper |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | public interface YwElectricalMapper extends MPJBaseMapper<YwElectrical> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.doumee.dao.business.model.YwElectricalRoom; |
| | | |
| | | /** |
| | | * 设å¤å
³èæ¿é´Mapper |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | public interface YwElectricalRoomMapper extends MPJBaseMapper<YwElectricalRoom> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.doumee.dao.business.model.YwGateway; |
| | | |
| | | /** |
| | | * ç½å
³ç®¡çMapper |
| | | * @author renkang |
| | | * @date 2026/04/02 |
| | | */ |
| | | public interface YwGatewayMapper extends MPJBaseMapper<YwGateway> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.doumee.dao.business.model.YwTopUpLog; |
| | | |
| | | /** |
| | | * å
å¼è®°å½Mapper |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | public interface YwTopUpLogMapper extends MPJBaseMapper<YwTopUpLog> { |
| | | |
| | | } |
| | |
| | | @ExcelColumn(name="æåºç ") |
| | | private Integer sortnum; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0é¨ç¦ 1è½¦åº 2LED 3广æç¹ 4广æè®¾å¤ 5æè·¯å¨ç©ºå¼ 6海康çµè¡¨ 7j空調", example = "1") |
| | | @ExcelColumn(name="ç±»å 0é¨ç¦ 1è½¦åº 2LED 3广æç¹ 4广æè®¾å¤ 5æè·¯å¨ç©ºå¼ 6海康çµè¡¨ 7空調") |
| | | @ApiModelProperty(value = "ç±»å 0é¨ç¦ 1è½¦åº 2LED 3广æç¹ 4广æè®¾å¤ 5æè·¯å¨ç©ºå¼ 6海康çµè¡¨ 7æºæ
§ç©ºèª¿", example = "1") |
| | | @ExcelColumn(name="ç±»å 0é¨ç¦ 1è½¦åº 2LED 3广æç¹ 4广æè®¾å¤ 5æè·¯å¨ç©ºå¼ 6海康çµè¡¨ 7æºæ
§ç©ºèª¿") |
| | | private Integer type; |
| | | @ApiModelProperty(value = "æ¯å¦ååºåºå
¥å£ 0䏿¯ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦ååºåºå
¥å£ 0䏿¯ 1æ¯") |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 空è°è®¾å¤ä¿¡æ¯ |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | @Data |
| | | @ApiModel("空è°è®¾å¤ä¿¡æ¯") |
| | | @TableName("`yw_conditioner`") |
| | | public class YwConditioner extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name = "主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ") |
| | | @ExcelColumn(name = "å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name = "å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ") |
| | | @ExcelColumn(name = "æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name = "æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "0") |
| | | @ExcelColumn(name = "æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name = "夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "设å¤ç¼å·") |
| | | @ExcelColumn(name = "设å¤ç¼å·") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "表å°å(é讯å°å)") |
| | | @ExcelColumn(name = "表å°å(é讯å°å)") |
| | | private String electricAddress; |
| | | |
| | | @ApiModelProperty(value = "åç§°") |
| | | @ExcelColumn(name = "åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "䏿¬¡å¿è·³æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelColumn(name = "䏿¬¡å¿è·³æ¶é´") |
| | | private Date lastHeartbeatDate; |
| | | |
| | | @ApiModelProperty(value = "çµè¡¨ä½é¢") |
| | | @ExcelColumn(name = "çµè¡¨ä½é¢") |
| | | private BigDecimal balance; |
| | | |
| | | @ApiModelProperty(value = "éå®ç¶æï¼0=ä¸éå®ï¼1=éå®å
³ï¼2=éå®å¼", example = "0") |
| | | @ExcelColumn(name = "éå®ç¶æ") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "累计ç¨çµéé¢") |
| | | @ExcelColumn(name = "累计ç¨çµéé¢") |
| | | private BigDecimal useAmount; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * çµè¡¨è®¾å¤ä¿¡æ¯ |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | @Data |
| | | @ApiModel("çµè¡¨è®¾å¤ä¿¡æ¯") |
| | | @TableName("`yw_electrical`") |
| | | public class YwElectrical extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name = "主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ") |
| | | @ExcelColumn(name = "å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name = "å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ") |
| | | @ExcelColumn(name = "æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name = "æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "0") |
| | | @ExcelColumn(name = "æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name = "夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ééå¨å·") |
| | | @ExcelColumn(name = "ééå¨å·") |
| | | private String collectorNo; |
| | | |
| | | @ApiModelProperty(value = "表å·") |
| | | @ExcelColumn(name = "表å·") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "表å°å(é讯å°å)") |
| | | @ExcelColumn(name = "表å°å(é讯å°å)") |
| | | private String electricAddress; |
| | | |
| | | @ApiModelProperty(value = "çµè¡¨ç±»å") |
| | | @ExcelColumn(name = "çµè¡¨ç±»å") |
| | | private String electricType; |
| | | |
| | | @ApiModelProperty(value = "åç", example = "1") |
| | | @ExcelColumn(name = "åç") |
| | | private Integer magnification; |
| | | |
| | | @ApiModelProperty(value = "ä»è´¹ç±»å", example = "0") |
| | | @ExcelColumn(name = "ä»è´¹ç±»å") |
| | | private Integer payType; |
| | | |
| | | @ApiModelProperty(value = "åç§°") |
| | | @ExcelColumn(name = "åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "ç½å
³ä¸»é®", example = "1") |
| | | @ExcelColumn(name = "ç½å
³ä¸»é®") |
| | | private Integer gatewayId; |
| | | |
| | | @ApiModelProperty(value = "ç½å
³é信端å£") |
| | | @ExcelColumn(name = "ç½å
³é信端å£") |
| | | private String gatewayPort; |
| | | |
| | | @ApiModelProperty(value = "䏿¬¡å¿è·³æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelColumn(name = "䏿¬¡å¿è·³æ¶é´") |
| | | private Date lastHeartbeatDate; |
| | | |
| | | @ApiModelProperty(value = "çµè¡¨ä½é¢") |
| | | @ExcelColumn(name = "çµè¡¨ä½é¢") |
| | | private BigDecimal balance; |
| | | |
| | | @ApiModelProperty(value = "è¿è¡ç¶æï¼0=æªå¼æ·ï¼1=æé¸ï¼2=åé¸ï¼3=å
¶ä»", example = "0") |
| | | @ExcelColumn(name = "è¿è¡ç¶æ") |
| | | private Integer runStatus; |
| | | |
| | | @ApiModelProperty(value = "䏿¬¡å¼æ·æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelColumn(name = "䏿¬¡å¼æ·æ¶é´") |
| | | private Date lastOpenDate; |
| | | |
| | | @ApiModelProperty(value = "䏿¬¡æ¸
é¶æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelColumn(name = "䏿¬¡æ¸
é¶æ¶é´") |
| | | private Date lastCleanDate; |
| | | |
| | | @ApiModelProperty(value = "ç½å
³åç§°") |
| | | @TableField(exist = false) |
| | | private String gatewayName; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * çµå¨ç±»æä½æ¥å¿ |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | @Data |
| | | @ApiModel("çµå¨ç±»æä½æ¥å¿") |
| | | @TableName("`yw_electrical_log`") |
| | | public class YwElectricalLog extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name = "主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name = "å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name = "å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name = "æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name = "æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "0") |
| | | @ExcelColumn(name = "æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name = "夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "设å¤ç±»å 0çµè¡¨ 1空è°", example = "0") |
| | | @ExcelColumn(name = "设å¤ç±»å") |
| | | private Integer deviceType; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0è°ç¨ 1æ¨éæ¥å", example = "0") |
| | | @ExcelColumn(name = "ç±»å") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "æ¥å£åç§°") |
| | | @ExcelColumn(name = "æ¥å£åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "å°åä¿¡æ¯") |
| | | @ExcelColumn(name = "å°åä¿¡æ¯") |
| | | private String url; |
| | | |
| | | @ApiModelProperty(value = "请æ±åæ°") |
| | | @ExcelColumn(name = "请æ±åæ°") |
| | | private String request; |
| | | |
| | | @ApiModelProperty(value = "ååºåæ°") |
| | | @ExcelColumn(name = "ååºåæ°") |
| | | private String reponse; |
| | | |
| | | @ApiModelProperty(value = "è°ç¨ç»æ 0æå 1失败", example = "0") |
| | | @ExcelColumn(name = "è°ç¨ç»æ") |
| | | private Integer success; |
| | | |
| | | @ApiModelProperty(value = "å
³è对象ç¼ç ï¼å¤ä¸ªç¨è±æéå·éå¼ï¼") |
| | | @ExcelColumn(name = "å
³è对象ç¼ç ") |
| | | private String objId; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 设å¤å
³èæ¿é´ |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | @Data |
| | | @ApiModel("设å¤å
³èæ¿é´") |
| | | @TableName("`yw_electrical_room`") |
| | | public class YwElectricalRoom extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name = "主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name = "å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name = "å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name = "æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name = "æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "0") |
| | | @ExcelColumn(name = "æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name = "夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ä¸å¡ç±»å 0çµè¡¨ 1空è°", example = "0") |
| | | @ExcelColumn(name = "ä¸å¡ç±»å") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "æ¿æºç¼ç ï¼å
³èyw_room)", example = "1") |
| | | @ExcelColumn(name = "æ¿æºç¼ç ") |
| | | private Integer roomId; |
| | | |
| | | @ApiModelProperty(value = "å
³è主é®ï¼çµè¡¨å
³èï¼yw_electricalï¼ç©ºè°å
³èï¼yw_conditioner)", example = "1") |
| | | @ExcelColumn(name = "å
³è主é®") |
| | | private Integer objId; |
| | | |
| | | @ApiModelProperty(value = "æåºç ", example = "1") |
| | | @ExcelColumn(name = "æåºç ") |
| | | private Integer sortnum; |
| | | |
| | | @ApiModelProperty(value = "æ¿é´åç§°") |
| | | @TableField(exist = false) |
| | | private String roomName; |
| | | |
| | | @ApiModelProperty(value = "设å¤åç§°") |
| | | @TableField(exist = false) |
| | | private String objName; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * ç½å
³ç®¡ç |
| | | * @author renkang |
| | | * @date 2026/04/02 |
| | | */ |
| | | @Data |
| | | @ApiModel("ç½å
³ç®¡ç") |
| | | @TableName("`yw_gateway`") |
| | | public class YwGateway extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name = "主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name = "å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name = "å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name = "æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name = "æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "0") |
| | | @ExcelColumn(name = "æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "ç½å
³åç§°") |
| | | @ExcelColumn(name = "ç½å
³åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name = "夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0å¯ç¨ 1ç¦ç¨", example = "0") |
| | | @ExcelColumn(name = "ç¶æ 0å¯ç¨ 1ç¦ç¨") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "æåºç ", example = "1") |
| | | @ExcelColumn(name = "æåºç ") |
| | | private Integer sortnum; |
| | | |
| | | @ApiModelProperty(value = "ç½å
³åå·") |
| | | @ExcelColumn(name = "ç½å
³åå·") |
| | | private String gatewayModel; |
| | | |
| | | @ApiModelProperty(value = "ç½å
³è®¾å¤å·") |
| | | @ExcelColumn(name = "ç½å
³è®¾å¤å·") |
| | | private String gatewayCode; |
| | | |
| | | @ApiModelProperty(value = "æåå¿è·³æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelColumn(name = "æåå¿è·³æ¶é´") |
| | | private Date lastHeartbeatTime; |
| | | |
| | | @ApiModelProperty(value = "æå±é¡¹ç®ç¼ç ï¼å
³èyw_project)", example = "1") |
| | | private Integer projectId; |
| | | |
| | | @ApiModelProperty(value = "项ç®åç§°") |
| | | @TableField(exist = false) |
| | | private String projectName; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * å
å¼è®°å½ |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | @Data |
| | | @ApiModel("å
å¼è®°å½") |
| | | @TableName("`yw_top_up_log`") |
| | | public class YwTopUpLog extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name = "主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ") |
| | | @ExcelColumn(name = "å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name = "å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ") |
| | | @ExcelColumn(name = "æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name = "æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "0") |
| | | @ExcelColumn(name = "æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name = "夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "å
³èä¸å¡ä¸»é®ï¼yw_electricalï¼", example = "1") |
| | | @ExcelColumn(name = "å
³èä¸å¡ä¸»é®") |
| | | private Integer objId; |
| | | |
| | | @ApiModelProperty(value = "æå±å
¬å¸ï¼companyï¼", example = "1") |
| | | @ExcelColumn(name = "æå±å
¬å¸") |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "æ¶æ¯è´¦æ·ï¼å
³èyw_account)", example = "1") |
| | | @ExcelColumn(name = "æ¶æ¯è´¦æ·") |
| | | private Integer accountId; |
| | | |
| | | @ApiModelProperty(value = "å
¥è´¦æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelColumn(name = "å
¥è´¦æ¥æ") |
| | | private Date creditDate; |
| | | |
| | | @ApiModelProperty(value = "å
¥è´¦éé¢") |
| | | @ExcelColumn(name = "å
¥è´¦éé¢") |
| | | private BigDecimal creditFee; |
| | | |
| | | @ApiModelProperty(value = "å
å¼ç¶æï¼0=å
å¼ä¸ï¼1=å
弿åï¼2=å
å¼å¤±è´¥", example = "0") |
| | | @ExcelColumn(name = "å
å¼ç¶æ") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "åè°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelColumn(name = "åè°æ¶é´") |
| | | private Date callbackDate; |
| | | |
| | | @ApiModelProperty(value = "åè°ç»æ") |
| | | @ExcelColumn(name = "åè°ç»æ") |
| | | private String callbackInfo; |
| | | |
| | | @ApiModelProperty(value = "设å¤åç§°") |
| | | @TableField(exist = false) |
| | | private String electricalName; |
| | | |
| | | @ApiModelProperty(value = "å
¬å¸åç§°") |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty(value = "è´¦æ·åç§°") |
| | | @TableField(exist = false) |
| | | private String accountName; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwConditioner; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 空è°è®¾å¤ä¿¡æ¯Serviceå®ä¹ |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | public interface YwConditionerService { |
| | | Integer create(YwConditioner ywConditioner); |
| | | void deleteById(Integer id, LoginUserInfo user); |
| | | void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user); |
| | | void updateById(YwConditioner ywConditioner); |
| | | YwConditioner findById(Integer id); |
| | | PageData<YwConditioner> findPage(PageWrap<YwConditioner> pageWrap); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwElectricalLog; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * çµå¨ç±»æä½æ¥å¿Serviceå®ä¹ |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | public interface YwElectricalLogService { |
| | | Integer create(YwElectricalLog ywElectricalLog); |
| | | void deleteById(Integer id, LoginUserInfo user); |
| | | void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user); |
| | | void updateById(YwElectricalLog ywElectricalLog); |
| | | YwElectricalLog findById(Integer id); |
| | | PageData<YwElectricalLog> findPage(PageWrap<YwElectricalLog> pageWrap); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwElectricalRoom; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设å¤å
³èæ¿é´Serviceå®ä¹ |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | public interface YwElectricalRoomService { |
| | | Integer create(YwElectricalRoom ywElectricalRoom); |
| | | void deleteById(Integer id, LoginUserInfo user); |
| | | void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user); |
| | | void updateById(YwElectricalRoom ywElectricalRoom); |
| | | YwElectricalRoom findById(Integer id); |
| | | PageData<YwElectricalRoom> findPage(PageWrap<YwElectricalRoom> pageWrap); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwElectrical; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * çµè¡¨è®¾å¤ä¿¡æ¯Serviceå®ä¹ |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | public interface YwElectricalService { |
| | | Integer create(YwElectrical ywElectrical); |
| | | void deleteById(Integer id, LoginUserInfo user); |
| | | void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user); |
| | | void updateById(YwElectrical ywElectrical); |
| | | YwElectrical findById(Integer id); |
| | | PageData<YwElectrical> findPage(PageWrap<YwElectrical> pageWrap); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwGateway; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç½å
³ç®¡çServiceå®ä¹ |
| | | * @author renkang |
| | | * @date 2026/04/02 |
| | | */ |
| | | public interface YwGatewayService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param ywGateway å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(YwGateway ywGateway); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @param user ç»å½ç¨æ· |
| | | */ |
| | | void deleteById(Integer id, LoginUserInfo user); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | * @param user ç»å½ç¨æ· |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param ywGateway å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(YwGateway ywGateway); |
| | | |
| | | /** |
| | | * æ´æ°ç¶æ |
| | | * |
| | | * @param ywGateway å®ä½å¯¹è±¡ï¼id + statusï¼ |
| | | */ |
| | | void updateStatusById(YwGateway ywGateway); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢è¯¦æ
|
| | | * |
| | | * @param id ä¸»é® |
| | | * @return YwGateway |
| | | */ |
| | | YwGateway findById(Integer id); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<YwGateway> |
| | | */ |
| | | PageData<YwGateway> findPage(PageWrap<YwGateway> pageWrap); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwTopUpLog; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å
å¼è®°å½Serviceå®ä¹ |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | public interface YwTopUpLogService { |
| | | Integer create(YwTopUpLog ywTopUpLog); |
| | | void deleteById(Integer id, LoginUserInfo user); |
| | | void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user); |
| | | void updateById(YwTopUpLog ywTopUpLog); |
| | | YwTopUpLog findById(Integer id); |
| | | PageData<YwTopUpLog> findPage(PageWrap<YwTopUpLog> pageWrap); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.YwConditionerMapper; |
| | | import com.doumee.dao.business.model.YwConditioner; |
| | | import com.doumee.service.business.YwConditionerService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 空è°è®¾å¤ä¿¡æ¯Serviceå®ç° |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | @Service |
| | | public class YwConditionerServiceImpl implements YwConditionerService { |
| | | |
| | | @Autowired |
| | | private YwConditionerMapper ywConditionerMapper; |
| | | |
| | | @Override |
| | | public Integer create(YwConditioner ywConditioner) { |
| | | if (Objects.isNull(ywConditioner) |
| | | || StringUtils.isBlank(ywConditioner.getName()) |
| | | || StringUtils.isBlank(ywConditioner.getCode())) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywConditioner.getLoginUserInfo(); |
| | | // æ ¡éªè®¾å¤ç¼å·å¯ä¸ |
| | | if (ywConditionerMapper.selectCount(new QueryWrapper<YwConditioner>().lambda() |
| | | .eq(YwConditioner::getIsdeleted, Constants.ZERO) |
| | | .eq(YwConditioner::getCode, ywConditioner.getCode())) > Constants.ZERO) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "设å¤ç¼å·éå¤!"); |
| | | } |
| | | ywConditioner.setCreateDate(new Date()); |
| | | ywConditioner.setCreator(loginUserInfo.getId()); |
| | | ywConditioner.setEditDate(new Date()); |
| | | ywConditioner.setEditor(loginUserInfo.getId()); |
| | | ywConditioner.setIsdeleted(Constants.ZERO); |
| | | ywConditionerMapper.insert(ywConditioner); |
| | | return ywConditioner.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id, LoginUserInfo user) { |
| | | ywConditionerMapper.update(new UpdateWrapper<YwConditioner>() |
| | | .lambda() |
| | | .set(YwConditioner::getIsdeleted, Constants.ONE) |
| | | .set(YwConditioner::getEditDate, DateUtil.getCurrDateTime()) |
| | | .set(YwConditioner::getEditor, user) |
| | | .eq(YwConditioner::getId, id) |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | for (Integer id : ids) { |
| | | this.deleteById(id, user); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(YwConditioner ywConditioner) { |
| | | if (Objects.isNull(ywConditioner) |
| | | || Objects.isNull(ywConditioner.getId()) |
| | | || StringUtils.isBlank(ywConditioner.getName()) |
| | | || StringUtils.isBlank(ywConditioner.getCode())) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywConditioner.getLoginUserInfo(); |
| | | // æ ¡éªè®¾å¤ç¼å·å¯ä¸ï¼æé¤èªèº«ï¼ |
| | | if (ywConditionerMapper.selectCount(new QueryWrapper<YwConditioner>().lambda() |
| | | .eq(YwConditioner::getIsdeleted, Constants.ZERO) |
| | | .eq(YwConditioner::getCode, ywConditioner.getCode()) |
| | | .ne(YwConditioner::getId, ywConditioner.getId())) > Constants.ZERO) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "设å¤ç¼å·éå¤!"); |
| | | } |
| | | ywConditioner.setEditDate(new Date()); |
| | | ywConditioner.setEditor(loginUserInfo.getId()); |
| | | ywConditionerMapper.updateById(ywConditioner); |
| | | } |
| | | |
| | | @Override |
| | | public YwConditioner findById(Integer id) { |
| | | return ywConditionerMapper.selectOne(new QueryWrapper<YwConditioner>().lambda() |
| | | .eq(YwConditioner::getId, id) |
| | | .last(" limit 1 ")); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<YwConditioner> findPage(PageWrap<YwConditioner> pageWrap) { |
| | | IPage<YwConditioner> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<YwConditioner> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | YwConditioner model = pageWrap.getModel(); |
| | | queryWrapper.selectAll(YwConditioner.class) |
| | | .and(Objects.nonNull(model) && StringUtils.isNotBlank(model.getName()), |
| | | i -> i.like(YwConditioner::getName, model.getName()) |
| | | .or() |
| | | .like(YwConditioner::getCode, model.getName())) |
| | | .eq(Objects.nonNull(model) && Objects.nonNull(model.getStatus()), YwConditioner::getStatus, model.getStatus()) |
| | | .eq(YwConditioner::getIsdeleted, Constants.ZERO) |
| | | .orderByDesc(YwConditioner::getCreateDate); |
| | | IPage<YwConditioner> iPage = ywConditionerMapper.selectJoinPage(page, YwConditioner.class, queryWrapper); |
| | | return PageData.from(iPage); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.YwElectricalLogMapper; |
| | | import com.doumee.dao.business.model.YwElectricalLog; |
| | | import com.doumee.service.business.YwElectricalLogService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * çµå¨ç±»æä½æ¥å¿Serviceå®ç° |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | @Service |
| | | public class YwElectricalLogServiceImpl implements YwElectricalLogService { |
| | | |
| | | @Autowired |
| | | private YwElectricalLogMapper ywElectricalLogMapper; |
| | | |
| | | @Override |
| | | public Integer create(YwElectricalLog ywElectricalLog) { |
| | | if (Objects.isNull(ywElectricalLog) |
| | | || StringUtils.isBlank(ywElectricalLog.getName())) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywElectricalLog.getLoginUserInfo(); |
| | | ywElectricalLog.setCreateDate(new Date()); |
| | | ywElectricalLog.setCreator(loginUserInfo.getId()); |
| | | ywElectricalLog.setEditDate(new Date()); |
| | | ywElectricalLog.setEditor(loginUserInfo.getId()); |
| | | ywElectricalLog.setIsdeleted(Constants.ZERO); |
| | | ywElectricalLogMapper.insert(ywElectricalLog); |
| | | return ywElectricalLog.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id, LoginUserInfo user) { |
| | | ywElectricalLogMapper.update(new UpdateWrapper<YwElectricalLog>() |
| | | .lambda() |
| | | .set(YwElectricalLog::getIsdeleted, Constants.ONE) |
| | | .set(YwElectricalLog::getEditDate, DateUtil.getCurrDateTime()) |
| | | .set(YwElectricalLog::getEditor, user.getId()) |
| | | .eq(YwElectricalLog::getId, id) |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | for (Integer id : ids) { |
| | | this.deleteById(id, user); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(YwElectricalLog ywElectricalLog) { |
| | | if (Objects.isNull(ywElectricalLog) || Objects.isNull(ywElectricalLog.getId())) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywElectricalLog.getLoginUserInfo(); |
| | | ywElectricalLog.setEditDate(new Date()); |
| | | ywElectricalLog.setEditor(loginUserInfo.getId()); |
| | | ywElectricalLogMapper.updateById(ywElectricalLog); |
| | | } |
| | | |
| | | @Override |
| | | public YwElectricalLog findById(Integer id) { |
| | | return ywElectricalLogMapper.selectOne(new QueryWrapper<YwElectricalLog>().lambda() |
| | | .eq(YwElectricalLog::getId, id) |
| | | .last(" limit 1 ")); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<YwElectricalLog> findPage(PageWrap<YwElectricalLog> pageWrap) { |
| | | IPage<YwElectricalLog> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<YwElectricalLog> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | YwElectricalLog model = pageWrap.getModel(); |
| | | queryWrapper.selectAll(YwElectricalLog.class) |
| | | .and(Objects.nonNull(model) && StringUtils.isNotBlank(model.getName()), |
| | | i -> i.like(YwElectricalLog::getName, model.getName())) |
| | | .eq(Objects.nonNull(model) && Objects.nonNull(model.getDeviceType()), YwElectricalLog::getDeviceType, model.getDeviceType()) |
| | | .eq(Objects.nonNull(model) && Objects.nonNull(model.getType()), YwElectricalLog::getType, model.getType()) |
| | | .eq(Objects.nonNull(model) && Objects.nonNull(model.getSuccess()), YwElectricalLog::getSuccess, model.getSuccess()) |
| | | .eq(YwElectricalLog::getIsdeleted, Constants.ZERO) |
| | | .orderByDesc(YwElectricalLog::getCreateDate); |
| | | IPage<YwElectricalLog> iPage = ywElectricalLogMapper.selectJoinPage(page, YwElectricalLog.class, queryWrapper); |
| | | return PageData.from(iPage); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.YwElectricalRoomMapper; |
| | | import com.doumee.dao.business.model.YwConditioner; |
| | | import com.doumee.dao.business.model.YwElectrical; |
| | | import com.doumee.dao.business.model.YwElectricalRoom; |
| | | import com.doumee.service.business.YwElectricalRoomService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 设å¤å
³èæ¿é´Serviceå®ç° |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | @Service |
| | | public class YwElectricalRoomServiceImpl implements YwElectricalRoomService { |
| | | |
| | | @Autowired |
| | | private YwElectricalRoomMapper ywElectricalRoomMapper; |
| | | |
| | | @Override |
| | | public Integer create(YwElectricalRoom ywElectricalRoom) { |
| | | if (Objects.isNull(ywElectricalRoom) |
| | | || Objects.isNull(ywElectricalRoom.getRoomId()) |
| | | || Objects.isNull(ywElectricalRoom.getObjId()) |
| | | || Objects.isNull(ywElectricalRoom.getType())) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywElectricalRoom.getLoginUserInfo(); |
| | | ywElectricalRoom.setCreateDate(new Date()); |
| | | ywElectricalRoom.setCreator(loginUserInfo.getId()); |
| | | ywElectricalRoom.setEditDate(new Date()); |
| | | ywElectricalRoom.setEditor(loginUserInfo.getId()); |
| | | ywElectricalRoom.setIsdeleted(Constants.ZERO); |
| | | ywElectricalRoomMapper.insert(ywElectricalRoom); |
| | | return ywElectricalRoom.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id, LoginUserInfo user) { |
| | | ywElectricalRoomMapper.update(new UpdateWrapper<YwElectricalRoom>() |
| | | .lambda() |
| | | .set(YwElectricalRoom::getIsdeleted, Constants.ONE) |
| | | .set(YwElectricalRoom::getEditDate, DateUtil.getCurrDateTime()) |
| | | .set(YwElectricalRoom::getEditor, user.getId()) |
| | | .eq(YwElectricalRoom::getId, id) |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | for (Integer id : ids) { |
| | | this.deleteById(id, user); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(YwElectricalRoom ywElectricalRoom) { |
| | | if (Objects.isNull(ywElectricalRoom) |
| | | || Objects.isNull(ywElectricalRoom.getId()) |
| | | || Objects.isNull(ywElectricalRoom.getRoomId()) |
| | | || Objects.isNull(ywElectricalRoom.getObjId()) |
| | | || Objects.isNull(ywElectricalRoom.getType())) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywElectricalRoom.getLoginUserInfo(); |
| | | ywElectricalRoom.setEditDate(new Date()); |
| | | ywElectricalRoom.setEditor(loginUserInfo.getId()); |
| | | ywElectricalRoomMapper.updateById(ywElectricalRoom); |
| | | } |
| | | |
| | | @Override |
| | | public YwElectricalRoom findById(Integer id) { |
| | | return ywElectricalRoomMapper.selectOne(new QueryWrapper<YwElectricalRoom>().lambda() |
| | | .eq(YwElectricalRoom::getId, id) |
| | | .last(" limit 1 ")); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<YwElectricalRoom> findPage(PageWrap<YwElectricalRoom> pageWrap) { |
| | | IPage<YwElectricalRoom> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<YwElectricalRoom> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | YwElectricalRoom model = pageWrap.getModel(); |
| | | queryWrapper.selectAll(YwElectricalRoom.class) |
| | | .eq(Objects.nonNull(model) && Objects.nonNull(model.getType()), YwElectricalRoom::getType, model.getType()) |
| | | .eq(Objects.nonNull(model) && Objects.nonNull(model.getRoomId()), YwElectricalRoom::getRoomId, model.getRoomId()) |
| | | .eq(Objects.nonNull(model) && Objects.nonNull(model.getObjId()), YwElectricalRoom::getObjId, model.getObjId()) |
| | | .eq(YwElectricalRoom::getIsdeleted, Constants.ZERO) |
| | | .orderByDesc(YwElectricalRoom::getCreateDate); |
| | | IPage<YwElectricalRoom> iPage = ywElectricalRoomMapper.selectJoinPage(page, YwElectricalRoom.class, queryWrapper); |
| | | return PageData.from(iPage); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.YwElectricalMapper; |
| | | import com.doumee.dao.business.model.YwElectrical; |
| | | import com.doumee.dao.business.model.YwGateway; |
| | | import com.doumee.service.business.YwElectricalService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * çµè¡¨è®¾å¤ä¿¡æ¯Serviceå®ç° |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | @Service |
| | | public class YwElectricalServiceImpl implements YwElectricalService { |
| | | |
| | | @Autowired |
| | | private YwElectricalMapper ywElectricalMapper; |
| | | |
| | | @Override |
| | | public Integer create(YwElectrical ywElectrical) { |
| | | if (Objects.isNull(ywElectrical) |
| | | || StringUtils.isBlank(ywElectrical.getName()) |
| | | || StringUtils.isBlank(ywElectrical.getCode())) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywElectrical.getLoginUserInfo(); |
| | | // æ ¡éªè¡¨å·å¯ä¸ |
| | | if (ywElectricalMapper.selectCount(new QueryWrapper<YwElectrical>().lambda() |
| | | .eq(YwElectrical::getIsdeleted, Constants.ZERO) |
| | | .eq(YwElectrical::getCode, ywElectrical.getCode())) > Constants.ZERO) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "表å·éå¤!"); |
| | | } |
| | | ywElectrical.setCreateDate(new Date()); |
| | | ywElectrical.setCreator(loginUserInfo.getId()); |
| | | ywElectrical.setEditDate(new Date()); |
| | | ywElectrical.setEditor(loginUserInfo.getId()); |
| | | ywElectrical.setIsdeleted(Constants.ZERO); |
| | | ywElectricalMapper.insert(ywElectrical); |
| | | return ywElectrical.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id, LoginUserInfo user) { |
| | | ywElectricalMapper.update(new UpdateWrapper<YwElectrical>() |
| | | .lambda() |
| | | .set(YwElectrical::getIsdeleted, Constants.ONE) |
| | | .set(YwElectrical::getEditDate, DateUtil.getCurrDateTime()) |
| | | .set(YwElectrical::getEditor, user.getId()) |
| | | .eq(YwElectrical::getId, id) |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | for (Integer id : ids) { |
| | | this.deleteById(id, user); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(YwElectrical ywElectrical) { |
| | | if (Objects.isNull(ywElectrical) |
| | | || Objects.isNull(ywElectrical.getId()) |
| | | || StringUtils.isBlank(ywElectrical.getName()) |
| | | || StringUtils.isBlank(ywElectrical.getCode())) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywElectrical.getLoginUserInfo(); |
| | | // æ ¡éªè¡¨å·å¯ä¸ï¼æé¤èªèº«ï¼ |
| | | if (ywElectricalMapper.selectCount(new QueryWrapper<YwElectrical>().lambda() |
| | | .eq(YwElectrical::getIsdeleted, Constants.ZERO) |
| | | .eq(YwElectrical::getCode, ywElectrical.getCode()) |
| | | .ne(YwElectrical::getId, ywElectrical.getId())) > Constants.ZERO) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "表å·éå¤!"); |
| | | } |
| | | ywElectrical.setEditDate(new Date()); |
| | | ywElectrical.setEditor(loginUserInfo.getId()); |
| | | ywElectricalMapper.updateById(ywElectrical); |
| | | } |
| | | |
| | | @Override |
| | | public YwElectrical findById(Integer id) { |
| | | return ywElectricalMapper.selectJoinOne(YwElectrical.class, |
| | | new MPJLambdaWrapper<YwElectrical>() |
| | | .selectAll(YwElectrical.class) |
| | | .selectAs(YwGateway::getName, YwElectrical::getGatewayName) |
| | | .leftJoin(YwGateway.class, YwGateway::getId, YwElectrical::getGatewayId) |
| | | .eq(YwElectrical::getId, id) |
| | | .last(" limit 1 ") |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<YwElectrical> findPage(PageWrap<YwElectrical> pageWrap) { |
| | | IPage<YwElectrical> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<YwElectrical> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | YwElectrical model = pageWrap.getModel(); |
| | | queryWrapper.selectAll(YwElectrical.class) |
| | | .selectAs(YwGateway::getName, YwElectrical::getGatewayName) |
| | | .leftJoin(YwGateway.class, YwGateway::getId, YwElectrical::getGatewayId) |
| | | .and(Objects.nonNull(model) && StringUtils.isNotBlank(model.getName()), |
| | | i -> i.like(YwElectrical::getName, model.getName()) |
| | | .or() |
| | | .like(YwElectrical::getCode, model.getName())) |
| | | .eq(Objects.nonNull(model) && Objects.nonNull(model.getRunStatus()), YwElectrical::getRunStatus, model.getRunStatus()) |
| | | .eq(Objects.nonNull(model) && Objects.nonNull(model.getGatewayId()), YwElectrical::getGatewayId, model.getGatewayId()) |
| | | .eq(YwElectrical::getIsdeleted, Constants.ZERO) |
| | | .orderByDesc(YwElectrical::getCreateDate); |
| | | IPage<YwElectrical> iPage = ywElectricalMapper.selectJoinPage(page, YwElectrical.class, queryWrapper); |
| | | return PageData.from(iPage); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.YwGatewayMapper; |
| | | import com.doumee.dao.business.model.YwGateway; |
| | | import com.doumee.service.business.YwGatewayService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * ç½å
³ç®¡çServiceå®ç° |
| | | * @author renkang |
| | | * @date 2026/04/02 |
| | | */ |
| | | @Service |
| | | public class YwGatewayServiceImpl implements YwGatewayService { |
| | | |
| | | @Autowired |
| | | private YwGatewayMapper ywGatewayMapper; |
| | | |
| | | @Override |
| | | public Integer create(YwGateway ywGateway) { |
| | | if (Objects.isNull(ywGateway) |
| | | || StringUtils.isBlank(ywGateway.getName()) |
| | | || StringUtils.isBlank(ywGateway.getGatewayCode())) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywGateway.getLoginUserInfo(); |
| | | // æ ¡éªç½å
³è®¾å¤å·å¯ä¸ |
| | | if (ywGatewayMapper.selectCount(new QueryWrapper<YwGateway>().lambda() |
| | | .eq(YwGateway::getIsdeleted, Constants.ZERO) |
| | | .eq(YwGateway::getGatewayCode, ywGateway.getGatewayCode())) > Constants.ZERO) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "ç½å
³è®¾å¤å·éå¤!"); |
| | | } |
| | | ywGateway.setCreateDate(new Date()); |
| | | ywGateway.setCreator(loginUserInfo.getId()); |
| | | ywGateway.setEditDate(new Date()); |
| | | ywGateway.setEditor(loginUserInfo.getId()); |
| | | ywGateway.setIsdeleted(Constants.ZERO); |
| | | ywGatewayMapper.insert(ywGateway); |
| | | return ywGateway.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id, LoginUserInfo user) { |
| | | ywGatewayMapper.update(new UpdateWrapper<YwGateway>() |
| | | .lambda() |
| | | .set(YwGateway::getIsdeleted, Constants.ONE) |
| | | .set(YwGateway::getEditDate, DateUtil.getCurrDateTime()) |
| | | .set(YwGateway::getEditor, user.getId()) |
| | | .eq(YwGateway::getId, id) |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | for (Integer id : ids) { |
| | | this.deleteById(id, user); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(YwGateway ywGateway) { |
| | | if (Objects.isNull(ywGateway) |
| | | || Objects.isNull(ywGateway.getId()) |
| | | || StringUtils.isBlank(ywGateway.getName()) |
| | | || StringUtils.isBlank(ywGateway.getGatewayCode())) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywGateway.getLoginUserInfo(); |
| | | // æ ¡éªç½å
³è®¾å¤å·å¯ä¸ï¼æé¤èªèº«ï¼ |
| | | if (ywGatewayMapper.selectCount(new QueryWrapper<YwGateway>().lambda() |
| | | .eq(YwGateway::getIsdeleted, Constants.ZERO) |
| | | .eq(YwGateway::getGatewayCode, ywGateway.getGatewayCode()) |
| | | .ne(YwGateway::getId, ywGateway.getId())) > Constants.ZERO) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "ç½å
³è®¾å¤å·éå¤!"); |
| | | } |
| | | ywGateway.setEditDate(new Date()); |
| | | ywGateway.setEditor(loginUserInfo.getId()); |
| | | ywGatewayMapper.updateById(ywGateway); |
| | | } |
| | | |
| | | @Override |
| | | public void updateStatusById(YwGateway ywGateway) { |
| | | YwGateway model = new YwGateway(); |
| | | model.setId(ywGateway.getId()); |
| | | model.setStatus(ywGateway.getStatus()); |
| | | ywGatewayMapper.updateById(model); |
| | | } |
| | | |
| | | @Override |
| | | public YwGateway findById(Integer id) { |
| | | return ywGatewayMapper.selectJoinOne(YwGateway.class, |
| | | new MPJLambdaWrapper<YwGateway>() |
| | | .selectAll(YwGateway.class) |
| | | .selectAs(com.doumee.dao.business.model.YwProject::getName, YwGateway::getProjectName) |
| | | .leftJoin(com.doumee.dao.business.model.YwProject.class, com.doumee.dao.business.model.YwProject::getId, YwGateway::getProjectId) |
| | | .eq(YwGateway::getId, id) |
| | | .last(" limit 1 ") |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<YwGateway> findPage(PageWrap<YwGateway> pageWrap) { |
| | | IPage<YwGateway> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<YwGateway> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | YwGateway model = pageWrap.getModel(); |
| | | queryWrapper.selectAll(YwGateway.class) |
| | | .selectAs(com.doumee.dao.business.model.YwProject::getName, YwGateway::getProjectName) |
| | | .leftJoin(com.doumee.dao.business.model.YwProject.class, com.doumee.dao.business.model.YwProject::getId, YwGateway::getProjectId) |
| | | .and(Objects.nonNull(model) && StringUtils.isNotBlank(model.getName()), |
| | | i -> i.like(YwGateway::getName, model.getName()).or().like(YwGateway::getGatewayCode, model.getName())) |
| | | .eq(Objects.nonNull(model) && Objects.nonNull(model.getStatus()), YwGateway::getStatus, model.getStatus()) |
| | | .eq(Objects.nonNull(model) && Objects.nonNull(model.getProjectId()), YwGateway::getProjectId, model.getProjectId()) |
| | | .eq(YwGateway::getIsdeleted, Constants.ZERO) |
| | | .orderByDesc(YwGateway::getCreateDate); |
| | | IPage<YwGateway> iPage = ywGatewayMapper.selectJoinPage(page, YwGateway.class, queryWrapper); |
| | | return PageData.from(iPage); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.YwTopUpLogMapper; |
| | | import com.doumee.dao.business.model.YwElectrical; |
| | | import com.doumee.dao.business.model.YwTopUpLog; |
| | | import com.doumee.service.business.YwTopUpLogService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * å
å¼è®°å½Serviceå®ç° |
| | | * @author renkang |
| | | * @date 2026/04/03 |
| | | */ |
| | | @Service |
| | | public class YwTopUpLogServiceImpl implements YwTopUpLogService { |
| | | |
| | | @Autowired |
| | | private YwTopUpLogMapper ywTopUpLogMapper; |
| | | |
| | | @Override |
| | | public Integer create(YwTopUpLog ywTopUpLog) { |
| | | if (Objects.isNull(ywTopUpLog) |
| | | || Objects.isNull(ywTopUpLog.getObjId()) |
| | | || Objects.isNull(ywTopUpLog.getCreditFee())) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywTopUpLog.getLoginUserInfo(); |
| | | ywTopUpLog.setCreateDate(new Date()); |
| | | ywTopUpLog.setCreator(loginUserInfo.getId()); |
| | | ywTopUpLog.setEditDate(new Date()); |
| | | ywTopUpLog.setEditor(loginUserInfo.getId()); |
| | | ywTopUpLog.setIsdeleted(Constants.ZERO); |
| | | ywTopUpLogMapper.insert(ywTopUpLog); |
| | | return ywTopUpLog.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id, LoginUserInfo user) { |
| | | ywTopUpLogMapper.update(new UpdateWrapper<YwTopUpLog>() |
| | | .lambda() |
| | | .set(YwTopUpLog::getIsdeleted, Constants.ONE) |
| | | .set(YwTopUpLog::getEditDate, DateUtil.getCurrDateTime()) |
| | | .set(YwTopUpLog::getEditor, user.getId()) |
| | | .eq(YwTopUpLog::getId, id) |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | for (Integer id : ids) { |
| | | this.deleteById(id, user); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(YwTopUpLog ywTopUpLog) { |
| | | if (Objects.isNull(ywTopUpLog) || Objects.isNull(ywTopUpLog.getId())) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywTopUpLog.getLoginUserInfo(); |
| | | ywTopUpLog.setEditDate(new Date()); |
| | | ywTopUpLog.setEditor(loginUserInfo.getId()); |
| | | ywTopUpLogMapper.updateById(ywTopUpLog); |
| | | } |
| | | |
| | | @Override |
| | | public YwTopUpLog findById(Integer id) { |
| | | return ywTopUpLogMapper.selectJoinOne(YwTopUpLog.class, |
| | | new MPJLambdaWrapper<YwTopUpLog>() |
| | | .selectAll(YwTopUpLog.class) |
| | | .selectAs(YwElectrical::getName, YwTopUpLog::getElectricalName) |
| | | .leftJoin(YwElectrical.class, YwElectrical::getId, YwTopUpLog::getObjId) |
| | | .eq(YwTopUpLog::getId, id) |
| | | .last(" limit 1 ") |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<YwTopUpLog> findPage(PageWrap<YwTopUpLog> pageWrap) { |
| | | IPage<YwTopUpLog> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<YwTopUpLog> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | YwTopUpLog model = pageWrap.getModel(); |
| | | queryWrapper.selectAll(YwTopUpLog.class) |
| | | .selectAs(YwElectrical::getName, YwTopUpLog::getElectricalName) |
| | | .leftJoin(YwElectrical.class, YwElectrical::getId, YwTopUpLog::getObjId) |
| | | .eq(Objects.nonNull(model) && Objects.nonNull(model.getObjId()), YwTopUpLog::getObjId, model.getObjId()) |
| | | .eq(Objects.nonNull(model) && Objects.nonNull(model.getCompanyId()), YwTopUpLog::getCompanyId, model.getCompanyId()) |
| | | .eq(Objects.nonNull(model) && Objects.nonNull(model.getStatus()), YwTopUpLog::getStatus, model.getStatus()) |
| | | .eq(YwTopUpLog::getIsdeleted, Constants.ZERO) |
| | | .orderByDesc(YwTopUpLog::getCreateDate); |
| | | IPage<YwTopUpLog> iPage = ywTopUpLogMapper.selectJoinPage(page, YwTopUpLog.class, queryWrapper); |
| | | return PageData.from(iPage); |
| | | } |
| | | } |