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