Commit c033d2d8cbb1313124dd80ccaabbfaa4d2c203af

Authored by fangcheng
1 parent a40c76cfe9
Exists in master

修改方法名称

Showing 3 changed files with 10 additions and 11 deletions

sync.data/src/main/java/com/lyms/hospital/controller/CenterCallHospitalController.java View file @ c033d2d
... ... @@ -27,10 +27,10 @@
27 27 private SyncDataBasicService syncDataBasicService;
28 28  
29 29 @ResponseBody
30   - @RequestMapping(value = "/getNeedSyncData", method = RequestMethod.POST)
31   - public String getNeedSyncData(HttpServletRequest request) {
  30 + @RequestMapping(value = "/pullSyncData", method = RequestMethod.POST)
  31 + public String pullSyncData(HttpServletRequest request) {
32 32 if (isAllow(request)) {
33   - return getMsg(SyncStatus.SUCCESS,syncDataBasicService.getNeedSyncData());
  33 + return getMsg(SyncStatus.SUCCESS,syncDataBasicService.pullSyncData());
34 34 }else{
35 35 return getMsg(SyncStatus.NOTALLOW);
36 36 }
sync.data/src/main/java/com/lyms/sync/data/service/SyncDataBasicService.java View file @ c033d2d
... ... @@ -27,7 +27,7 @@
27 27 /**
28 28 * <li>@Description:添加需要同步的数据
29 29 * <li>@param bid 业务主键id
30   - * <li>@param moduleType 模块类型
  30 + * <li>@param entityClassName 业务实体对象名称,方便反射回该实体对象和业务对象
31 31 * <li>@param eventType 时间类型
32 32 * <li>@param objData 数据对象
33 33 * <li>@return
34 34  
35 35  
... ... @@ -36,18 +36,18 @@
36 36 * <li>修改人:
37 37 * <li>修改时间:
38 38 */
39   - public boolean addSyncData(String bid, ModuleType moduleType, EventType eventType, Object objData);
  39 + public boolean addSyncData(String bid, String entityClassName, EventType eventType, Object objData);
40 40  
41 41  
42 42 /**
43   - * <li>@Description:取所有需要同步的数据列表
  43 + * <li>@Description:取所有需要同步的数据列表
44 44 * <li>@return
45 45 * <li>创建人:方承
46 46 * <li>创建时间:2017年3月13日
47 47 * <li>修改人:
48 48 * <li>修改时间:
49 49 */
50   - public List<SyncDataBasic> getNeedSyncData();
  50 + public List<SyncDataBasic> pullSyncData();
51 51  
52 52 }
sync.data/src/main/java/com/lyms/sync/data/service/impl/SyncDataBasicServiceImpl.java View file @ c033d2d
... ... @@ -9,7 +9,6 @@
9 9 import com.baomidou.mybatisplus.mapper.EntityWrapper;
10 10 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
11 11 import com.lyms.sync.data.constants.EventType;
12   -import com.lyms.sync.data.constants.ModuleType;
13 12 import com.lyms.sync.data.dao.SyncDataBasicMapper;
14 13 import com.lyms.sync.data.entity.SyncDataBasic;
15 14 import com.lyms.sync.data.service.SyncDataBasicService;
16 15  
17 16  
... ... @@ -32,21 +31,21 @@
32 31 }
33 32  
34 33 @Override
35   - public boolean addSyncData(String bid,ModuleType moduleType, EventType eventType, Object dataObj) {
  34 + public boolean addSyncData(String bid,String entityClassName, EventType eventType, Object dataObj) {
36 35 SyncDataBasic entity = new SyncDataBasic();
37 36 entity.setId(StrUtils.uuid());
38 37 entity.setIfsuc(0);
39 38 entity.setCreateTime(DateTimeUtils.getNow());
40 39  
41 40 entity.setBid(bid);
42   - entity.setModule(moduleType.getType());
  41 + entity.setModule(entityClassName);
43 42 entity.setEvent(eventType.getType());
44 43 entity.setData(JSONObject.toJSONString(dataObj));
45 44 return insert(entity);
46 45 }
47 46  
48 47 @Override
49   - public List<SyncDataBasic> getNeedSyncData() {
  48 + public List<SyncDataBasic> pullSyncData() {
50 49 return selectList(new EntityWrapper<SyncDataBasic>().where("IFSUC", "0"));
51 50 }
52 51 }