Commit c1ca9b9daa65e8966bcf0b51618f5ec0bba810b9
1 parent
bf084608
iss提交12:
1、添加使用路牌配置服务的controller,把原来的controller放入legacy包中 2、在dubbo消费者配置文件中配置路牌配置服务
Showing
10 changed files
with
110 additions
and
17 deletions
src/main/java/com/bsth/controller/schedule/core/GuideboardInfoController_facade.java
| @@ -105,7 +105,7 @@ public class GuideboardInfoController_facade extends BController_facade<Long, Lp | @@ -105,7 +105,7 @@ public class GuideboardInfoController_facade extends BController_facade<Long, Lp | ||
| 105 | .setId(Integer.valueOf(param.get("xl.id_eq").toString())) | 105 | .setId(Integer.valueOf(param.get("xl.id_eq").toString())) |
| 106 | .build() | 106 | .build() |
| 107 | )) | 107 | )) |
| 108 | - .setLpName(param.get("lpName_eq") == null ? null : param.get("lpNo_eq").toString()) | 108 | + .setLpName(param.get("lpName_eq") == null ? null : param.get("lpName_eq").toString()) |
| 109 | .build(); | 109 | .build(); |
| 110 | lpConfigServiceFacade.validate_lpname_duplicate(lpConfigDto); | 110 | lpConfigServiceFacade.validate_lpname_duplicate(lpConfigDto); |
| 111 | rtn.put("status", ResponseCode.SUCCESS); | 111 | rtn.put("status", ResponseCode.SUCCESS); |
src/main/java/com/bsth/controller/schedule/core/RerunController_facade.java
0 → 100644
| 1 | +package com.bsth.controller.schedule.core; | ||
| 2 | + | ||
| 3 | +import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | +import com.bsth.control_v2.plan_module.common.dto.schedule.rule.RerunRuleDto; | ||
| 5 | +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto; | ||
| 6 | +import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 7 | +import com.bsth.control_v2.plan_module.common.service.schedule.rule.RerunRuleConfigServiceFacade; | ||
| 8 | +import com.bsth.controller.schedule.BController_facade; | ||
| 9 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 10 | +import org.springframework.web.bind.annotation.RestController; | ||
| 11 | + | ||
| 12 | +import java.util.Date; | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * Created by xu on 16/10/20. | ||
| 16 | + */ | ||
| 17 | +@RestController | ||
| 18 | +@RequestMapping("rms") | ||
| 19 | +public class RerunController_facade extends BController_facade<Long, RerunRuleDto> { | ||
| 20 | + @Override | ||
| 21 | + public void setCreateUserInfo(RerunRuleDto rerunRuleDto, Integer userId, Date createDate) { | ||
| 22 | + UserDto userDto = UserDto.getBuilder() | ||
| 23 | + .setId(userId) | ||
| 24 | + .build(); | ||
| 25 | + rerunRuleDto.setCreateBy(userDto); | ||
| 26 | + rerunRuleDto.setCreateDate(createDate); | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + @Override | ||
| 30 | + public void setUpdateUserInfo(RerunRuleDto rerunRuleDto, Integer userId, Date updateDate) { | ||
| 31 | + UserDto userDto = UserDto.getBuilder() | ||
| 32 | + .setId(userId) | ||
| 33 | + .build(); | ||
| 34 | + rerunRuleDto.setUpdateBy(userDto); | ||
| 35 | + rerunRuleDto.setUpdateDate(updateDate); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + @Reference | ||
| 39 | + private RerunRuleConfigServiceFacade rerunRuleConfigServiceFacade; | ||
| 40 | + | ||
| 41 | + @Override | ||
| 42 | + protected BServiceFacade<Long, RerunRuleDto> getBServiceFacade() { | ||
| 43 | + return rerunRuleConfigServiceFacade; | ||
| 44 | + } | ||
| 45 | +} |
src/main/java/com/bsth/controller/schedule/core/ScheduleRule1FlatController_facade.java
0 → 100644
| 1 | +package com.bsth.controller.schedule.core; | ||
| 2 | + | ||
| 3 | +import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | +import com.bsth.control_v2.plan_module.common.dto.schedule.rule.FlatRuleDto; | ||
| 5 | +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto; | ||
| 6 | +import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 7 | +import com.bsth.control_v2.plan_module.common.service.schedule.rule.FlatRuleConfigServiceFacade; | ||
| 8 | +import com.bsth.controller.schedule.BController_facade; | ||
| 9 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 10 | +import org.springframework.web.bind.annotation.RestController; | ||
| 11 | + | ||
| 12 | +import java.util.Date; | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * Created by xu on 16/7/4. | ||
| 16 | + */ | ||
| 17 | +@RestController | ||
| 18 | +@RequestMapping("sr1fc") | ||
| 19 | +public class ScheduleRule1FlatController_facade extends BController_facade<Long, FlatRuleDto> { | ||
| 20 | + @Override | ||
| 21 | + public void setCreateUserInfo(FlatRuleDto flatRuleDto, Integer userId, Date createDate) { | ||
| 22 | + UserDto userDto = UserDto.getBuilder() | ||
| 23 | + .setId(userId) | ||
| 24 | + .build(); | ||
| 25 | + flatRuleDto.setCreateBy(userDto); | ||
| 26 | + flatRuleDto.setCreateDate(createDate); | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + @Override | ||
| 30 | + public void setUpdateUserInfo(FlatRuleDto flatRuleDto, Integer userId, Date updateDate) { | ||
| 31 | + UserDto userDto = UserDto.getBuilder() | ||
| 32 | + .setId(userId) | ||
| 33 | + .build(); | ||
| 34 | + flatRuleDto.setUpdateBy(userDto); | ||
| 35 | + flatRuleDto.setUpdateDate(updateDate); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + @Reference | ||
| 39 | + private FlatRuleConfigServiceFacade flatRuleConfigServiceFacade; | ||
| 40 | + | ||
| 41 | + @Override | ||
| 42 | + protected BServiceFacade<Long, FlatRuleDto> getBServiceFacade() { | ||
| 43 | + return flatRuleConfigServiceFacade; | ||
| 44 | + } | ||
| 45 | +} |
src/main/java/com/bsth/controller/schedule/core/RerunController.java renamed to src/main/java/com/bsth/controller/schedule/core/legacy/RerunController.java
| 1 | -package com.bsth.controller.schedule.core; | 1 | +package com.bsth.controller.schedule.core.legacy; |
| 2 | 2 | ||
| 3 | import com.bsth.controller.schedule.BController; | 3 | import com.bsth.controller.schedule.BController; |
| 4 | import com.bsth.entity.schedule.rule.RerunRule; | 4 | import com.bsth.entity.schedule.rule.RerunRule; |
| 5 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 6 | -import org.springframework.web.bind.annotation.RestController; | ||
| 7 | 5 | ||
| 8 | /** | 6 | /** |
| 9 | * Created by xu on 16/10/20. | 7 | * Created by xu on 16/10/20. |
| 10 | */ | 8 | */ |
| 11 | -@RestController | ||
| 12 | -@RequestMapping("rms") | 9 | +//@RestController |
| 10 | +//@RequestMapping("rms") | ||
| 13 | public class RerunController extends BController<RerunRule, Long> { | 11 | public class RerunController extends BController<RerunRule, Long> { |
| 14 | 12 | ||
| 15 | 13 |
src/main/java/com/bsth/controller/schedule/core/SchedulePlanController.java renamed to src/main/java/com/bsth/controller/schedule/core/legacy/SchedulePlanController.java
src/main/java/com/bsth/controller/schedule/core/SchedulePlanInfoController.java renamed to src/main/java/com/bsth/controller/schedule/core/legacy/SchedulePlanInfoController.java
| 1 | -package com.bsth.controller.schedule.core; | 1 | +package com.bsth.controller.schedule.core.legacy; |
| 2 | 2 | ||
| 3 | import com.bsth.common.ResponseCode; | 3 | import com.bsth.common.ResponseCode; |
| 4 | import com.bsth.controller.schedule.BController; | 4 | import com.bsth.controller.schedule.BController; |
| 5 | import com.bsth.entity.schedule.SchedulePlanInfo; | 5 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 6 | import com.bsth.service.schedule.SchedulePlanInfoService; | 6 | import com.bsth.service.schedule.SchedulePlanInfoService; |
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | -import org.springframework.web.bind.annotation.*; | 8 | +import org.springframework.web.bind.annotation.PathVariable; |
| 9 | +import org.springframework.web.bind.annotation.RequestBody; | ||
| 10 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 11 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 9 | 12 | ||
| 10 | import java.util.Date; | 13 | import java.util.Date; |
| 11 | import java.util.HashMap; | 14 | import java.util.HashMap; |
src/main/java/com/bsth/controller/schedule/core/ScheduleRule1FlatController.java renamed to src/main/java/com/bsth/controller/schedule/core/legacy/ScheduleRule1FlatController.java
| 1 | -package com.bsth.controller.schedule.core; | 1 | +package com.bsth.controller.schedule.core.legacy; |
| 2 | 2 | ||
| 3 | import com.bsth.controller.schedule.BController; | 3 | import com.bsth.controller.schedule.BController; |
| 4 | import com.bsth.entity.schedule.rule.ScheduleRule1Flat; | 4 | import com.bsth.entity.schedule.rule.ScheduleRule1Flat; |
| 5 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 6 | -import org.springframework.web.bind.annotation.RestController; | ||
| 7 | 5 | ||
| 8 | /** | 6 | /** |
| 9 | * Created by xu on 16/7/4. | 7 | * Created by xu on 16/7/4. |
| 10 | */ | 8 | */ |
| 11 | -@RestController | ||
| 12 | -@RequestMapping("sr1fc") | 9 | +//@RestController |
| 10 | +//@RequestMapping("sr1fc") | ||
| 13 | public class ScheduleRule1FlatController extends BController<ScheduleRule1Flat, Long> { | 11 | public class ScheduleRule1FlatController extends BController<ScheduleRule1Flat, Long> { |
| 14 | 12 | ||
| 15 | 13 |
src/main/java/com/bsth/controller/schedule/core/TTInfoDetailController.java renamed to src/main/java/com/bsth/controller/schedule/core/legacy/TTInfoDetailController.java
src/main/resources/application-dev.properties
| @@ -13,8 +13,8 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | @@ -13,8 +13,8 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | ||
| 13 | spring.jpa.database= MYSQL | 13 | spring.jpa.database= MYSQL |
| 14 | spring.jpa.show-sql= true | 14 | spring.jpa.show-sql= true |
| 15 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver | 15 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver |
| 16 | -#spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 17 | -spring.datasource.url= jdbc:mysql://192.168.168.222/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | 16 | +spring.datasource.url= jdbc:mysql://127.0.0.1/test_control?useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 17 | +#spring.datasource.url= jdbc:mysql://192.168.168.222/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 18 | spring.datasource.username= root | 18 | spring.datasource.username= root |
| 19 | spring.datasource.password= root | 19 | spring.datasource.password= root |
| 20 | #spring.datasource.url= jdbc:mysql://192.168.168.117/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false | 20 | #spring.datasource.url= jdbc:mysql://192.168.168.117/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false |
src/main/resources/dubbo/applicationContext_dubbo_consumer.xml
| @@ -25,6 +25,10 @@ | @@ -25,6 +25,10 @@ | ||
| 25 | <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.schedule.config.EmployeeConfigServiceFacade" id="employeeConfigServiceFacadeImpl" check="false" /> | 25 | <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.schedule.config.EmployeeConfigServiceFacade" id="employeeConfigServiceFacadeImpl" check="false" /> |
| 26 | <!-- 路牌配置信息服务 --> | 26 | <!-- 路牌配置信息服务 --> |
| 27 | <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.schedule.config.LpConfigServiceFacade" id="lpConfigServiceFacadeImpl" check="false" /> | 27 | <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.schedule.config.LpConfigServiceFacade" id="lpConfigServiceFacadeImpl" check="false" /> |
| 28 | + <!-- flat规则配置信息服务 --> | ||
| 29 | + <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.schedule.rule.FlatRuleConfigServiceFacade" id="flatRuleConfigServiceFacadeImpl" check="false" /> | ||
| 30 | + <!-- rerun规则配置信息服务 --> | ||
| 31 | + <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.schedule.rule.RerunRuleConfigServiceFacade" id="rerunRuleConfigServiceFacadeImpl" check="false" /> | ||
| 28 | 32 | ||
| 29 | <!-- 时刻表班型明细服务 --> | 33 | <!-- 时刻表班型明细服务 --> |
| 30 | <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.schedule.timetable.TTInfoBxDetailServiceFacade" id="tTInfoBxDetailServiceFacadeImpl" check="false" /> | 34 | <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.schedule.timetable.TTInfoBxDetailServiceFacade" id="tTInfoBxDetailServiceFacadeImpl" check="false" /> |