no message
This commit is contained in:
@ -47,4 +47,6 @@ public class StoreInfoDTO {
|
|||||||
|
|
||||||
private Long store_id;
|
private Long store_id;
|
||||||
private String is_delete;
|
private String is_delete;
|
||||||
|
|
||||||
|
private Long operator_id;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -75,6 +75,8 @@ public class StoreInfo implements Serializable {
|
|||||||
|
|
||||||
private Long store_id;
|
private Long store_id;
|
||||||
|
|
||||||
|
private Long operator_id;
|
||||||
|
|
||||||
|
|
||||||
private Long bpStoreId;
|
private Long bpStoreId;
|
||||||
|
|
||||||
@ -207,4 +209,12 @@ public class StoreInfo implements Serializable {
|
|||||||
public void setStore_id(Long store_id) {
|
public void setStore_id(Long store_id) {
|
||||||
this.store_id = store_id;
|
this.store_id = store_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long getOperator_id() {
|
||||||
|
return operator_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOperator_id(Long operator_id) {
|
||||||
|
this.operator_id = operator_id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,7 +41,7 @@ public class ReceiveServiceImpl implements ReceiveService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> recceiveMeals(String request) {
|
public Map<String, String> recceiveMeals(String request) {
|
||||||
|
log.info("/meals 接收套餐数据:{}",JSON.toJSONString( request));
|
||||||
SyncRequest<BatteryRule> syncRequest = JSON.parseObject(request, SyncRequest.class);
|
SyncRequest<BatteryRule> syncRequest = JSON.parseObject(request, SyncRequest.class);
|
||||||
Map<String, String> map = new HashMap<>();
|
Map<String, String> map = new HashMap<>();
|
||||||
if (!syncRequest.getAppid().equals(appId) || !syncRequest.getAccessToken().equals(accessToken)) {
|
if (!syncRequest.getAppid().equals(appId) || !syncRequest.getAccessToken().equals(accessToken)) {
|
||||||
@ -144,7 +144,7 @@ public class ReceiveServiceImpl implements ReceiveService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> recceiveUserInfo(String request) {
|
public Map<String, String> recceiveUserInfo(String request) {
|
||||||
|
log.info("/userinfo 接收用户数据:{}",JSON.toJSONString( request));
|
||||||
SyncRequest<UserInfo> syncRequest = JSON.parseObject(request, SyncRequest.class);
|
SyncRequest<UserInfo> syncRequest = JSON.parseObject(request, SyncRequest.class);
|
||||||
Map<String, String> map = new HashMap<>();
|
Map<String, String> map = new HashMap<>();
|
||||||
if (!syncRequest.getAppid().equals(appId) || !syncRequest.getAccessToken().equals(accessToken)) {
|
if (!syncRequest.getAppid().equals(appId) || !syncRequest.getAccessToken().equals(accessToken)) {
|
||||||
@ -241,7 +241,7 @@ public class ReceiveServiceImpl implements ReceiveService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> recceiveCompanyInfo(String request) {
|
public Map<String, String> recceiveCompanyInfo(String request) {
|
||||||
log.info("接收运营商数据:", request);
|
log.info("接收运营商数据:{}", JSON.toJSONString(request));
|
||||||
SyncRequest<CompanyInfo> syncRequest = JSON.parseObject(request, SyncRequest.class);
|
SyncRequest<CompanyInfo> syncRequest = JSON.parseObject(request, SyncRequest.class);
|
||||||
Map<String, String> map = new HashMap<>();
|
Map<String, String> map = new HashMap<>();
|
||||||
if (!syncRequest.getAppid().equals(appId) || !syncRequest.getAccessToken().equals(accessToken)) {
|
if (!syncRequest.getAppid().equals(appId) || !syncRequest.getAccessToken().equals(accessToken)) {
|
||||||
@ -308,7 +308,7 @@ public class ReceiveServiceImpl implements ReceiveService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> recceiveStoreInfo(String request) {
|
public Map<String, String> recceiveStoreInfo(String request) {
|
||||||
log.info("接收门店数据:", request);
|
log.info("接收门店数据:{}", JSON.toJSONString(request));
|
||||||
SyncRequest<StoreInfo> syncRequest = JSON.parseObject(request, SyncRequest.class);
|
SyncRequest<StoreInfo> syncRequest = JSON.parseObject(request, SyncRequest.class);
|
||||||
Map<String, String> map = new HashMap<>();
|
Map<String, String> map = new HashMap<>();
|
||||||
if (!syncRequest.getAppid().equals(appId) || !syncRequest.getAccessToken().equals(accessToken)) {
|
if (!syncRequest.getAppid().equals(appId) || !syncRequest.getAccessToken().equals(accessToken)) {
|
||||||
@ -373,11 +373,16 @@ public class ReceiveServiceImpl implements ReceiveService {
|
|||||||
map.put("code", "500");
|
map.put("code", "500");
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
if (storeInfo.getOperator_id() == null) {
|
||||||
|
map.put("msg", "租电平台运营商id不能为空,请补传'operation_id'");
|
||||||
|
map.put("code", "500");
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
CompanyInfo companyInfo = companyInfoMapper.selectByOpId(storeInfo.getOperator_id());
|
||||||
|
storeInfo.setOperator_id(companyInfo.getId());
|
||||||
if (companyStoreMapper.selectByBid(storeInfo.getStore_id()) != null) {
|
if (companyStoreMapper.selectByBid(storeInfo.getStore_id()) != null) {
|
||||||
companyStoreMapper.updateByBid(storeInfo);
|
companyStoreMapper.updateByBid(storeInfo);
|
||||||
} else if (companyStoreMapper.selectByPhone(storeInfo.getPhone()) != null) {
|
|
||||||
companyStoreMapper.updateByName(storeInfo);
|
|
||||||
} else {
|
} else {
|
||||||
companyStoreMapper.insertStoreInfo(storeInfo);
|
companyStoreMapper.insertStoreInfo(storeInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -229,6 +229,7 @@ public class SendDataServiceImpl implements SendDataService {
|
|||||||
|
|
||||||
storeInfo.setStore_id(id);
|
storeInfo.setStore_id(id);
|
||||||
|
|
||||||
|
|
||||||
StoreInfoDTO storeInfoDTO = new StoreInfoDTO();
|
StoreInfoDTO storeInfoDTO = new StoreInfoDTO();
|
||||||
storeInfoDTO.setName(storeInfo.getName());
|
storeInfoDTO.setName(storeInfo.getName());
|
||||||
storeInfoDTO.setContact_name(storeInfo.getContact_name());
|
storeInfoDTO.setContact_name(storeInfo.getContact_name());
|
||||||
@ -241,6 +242,7 @@ public class SendDataServiceImpl implements SendDataService {
|
|||||||
storeInfoDTO.setLatitude(storeInfo.getLatitude());
|
storeInfoDTO.setLatitude(storeInfo.getLatitude());
|
||||||
storeInfoDTO.setLongitude(storeInfo.getLongitude());
|
storeInfoDTO.setLongitude(storeInfo.getLongitude());
|
||||||
storeInfoDTO.setIs_delete(storeInfo.getIs_delete());
|
storeInfoDTO.setIs_delete(storeInfo.getIs_delete());
|
||||||
|
storeInfoDTO.setOperator_id(storeInfo.getOperator_id());
|
||||||
storeInfoDTO.setStore_id(storeInfo.getStore_id());
|
storeInfoDTO.setStore_id(storeInfo.getStore_id());
|
||||||
|
|
||||||
SyncRequest syncRequest = new SyncRequest();
|
SyncRequest syncRequest = new SyncRequest();
|
||||||
|
|||||||
@ -48,7 +48,7 @@
|
|||||||
SELECT
|
SELECT
|
||||||
<include refid="Base_Column_List" />
|
<include refid="Base_Column_List" />
|
||||||
FROM zc_company
|
FROM zc_company
|
||||||
WHERE b_op_id = #{operator_id}
|
WHERE b_op_id = #{bOpId}
|
||||||
AND is_delete = 0
|
AND is_delete = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
<result column="city_id" property="city" />
|
<result column="city_id" property="city" />
|
||||||
<result column="area_id" property="area" />
|
<result column="area_id" property="area" />
|
||||||
<result column="address" property="address" />
|
<result column="address" property="address" />
|
||||||
|
<result column="operating_company_id" property="operator_id" />
|
||||||
<result column="image" property="image" />
|
<result column="image" property="image" />
|
||||||
<result column="latitude" property="latitude" />
|
<result column="latitude" property="latitude" />
|
||||||
<result column="longitude" property="longitude" />
|
<result column="longitude" property="longitude" />
|
||||||
@ -150,6 +151,9 @@
|
|||||||
<if test="is_delete != null">
|
<if test="is_delete != null">
|
||||||
del_flag = #{is_delete},
|
del_flag = #{is_delete},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="operator_id != null">
|
||||||
|
operating_company_id = #{operator_id},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
WHERE bp_store_id = #{bpStoreId}
|
WHERE bp_store_id = #{bpStoreId}
|
||||||
</update>
|
</update>
|
||||||
@ -168,6 +172,7 @@
|
|||||||
latitude,
|
latitude,
|
||||||
longitude,
|
longitude,
|
||||||
del_flag,
|
del_flag,
|
||||||
|
operating_company_id,
|
||||||
bp_store_id
|
bp_store_id
|
||||||
) VALUES (
|
) VALUES (
|
||||||
#{name},
|
#{name},
|
||||||
@ -181,6 +186,7 @@
|
|||||||
#{latitude},
|
#{latitude},
|
||||||
#{longitude},
|
#{longitude},
|
||||||
#{is_delete},
|
#{is_delete},
|
||||||
|
#{operator_id},
|
||||||
#{bpStoreId}
|
#{bpStoreId}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|||||||
Reference in New Issue
Block a user