Merge remote-tracking branch 'origin/cc_20250325_select' into cc_20250325_select
This commit is contained in:
@@ -69,6 +69,13 @@ public interface ShopAccountService {
|
||||
*/
|
||||
Boolean pushData(AccountAuditDTO accountAuditDTO);
|
||||
|
||||
/**
|
||||
* shopCode
|
||||
* @param shopId
|
||||
* @return
|
||||
*/
|
||||
String shopCodeToYlsCode(Long shopId);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ public class PushServiceImpl implements PushService {
|
||||
|
||||
@Override
|
||||
public String getYlsToken(GetAccessTokenDTO dto) {
|
||||
String apiUrl = ylsUrl + "XXX";
|
||||
String apiUrl = ylsUrl + "/Store.axd?action=getToken";
|
||||
return executeApiCall(apiUrl, dto, String.class, ylsUsername, ylsSecret);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.cool.store.request.PostAndOrderRequest;
|
||||
import com.cool.store.request.ZxjpApiRequest;
|
||||
import com.cool.store.response.MiniShopsResponse;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -228,5 +229,23 @@ public class ShopAccountServiceImpl implements ShopAccountService {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String shopCodeToYlsCode(Long shopId) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
if (Objects.isNull(shopInfo)){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
List<ShopAccountDO> accountDOS = shopAccountDAO.selectByShopId(shopId);
|
||||
if (CollectionUtils.isEmpty(accountDOS)){
|
||||
throw new ServiceException(ErrorCodeEnum.SYSTEM_DATA_ERROR);
|
||||
}
|
||||
Map<String, ShopAccountDO> map = accountDOS.stream().collect(Collectors.toMap(ShopAccountDO::getSystemName, data -> data));
|
||||
ShopAccountDO shopAccountDO = map.get(ShopAccountEnum.YLS.getSystemName());
|
||||
if (Objects.isNull(shopAccountDO)){
|
||||
throw new ServiceException(ErrorCodeEnum.SYSTEM_DATA_ERROR);
|
||||
}
|
||||
return StringUtil.isEmpty(shopAccountDO.getAccount())?shopInfo.getShopCode():shopAccountDO.getAccount();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -73,7 +73,11 @@ public class ShopAccountController {
|
||||
return ResponseResult.success(accountService.accountEntryStatusChange(dto));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("门店编码换云流水编码")
|
||||
@PostMapping("/shopCodeToYlsCode")
|
||||
public ResponseResult<String> shopCodeToYlsCode(@RequestParam(value = "shopId",required = true) Long shopId) {
|
||||
return ResponseResult.success(accountService.shopCodeToYlsCode(shopId));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -100,6 +100,10 @@ api.auth.url=https://api.zhengxindzg.cn
|
||||
api.auth.username=GkqgAhUJ7p9swJo
|
||||
api.auth.secret=NzVrnS3OWiupdDY
|
||||
|
||||
xgj.api.auth.url=https://masterdata.zhengxinfood.com/dmp/one-id/
|
||||
xgj.api.auth.url=https://masterdata.zhengxinfood.com/dmp/one-id
|
||||
xgj.api.auth.username=6446346061e043e392dd53c9c8d1af0b
|
||||
xgj.api.auth.secret=3ba6e4c5632547b8b2b3acefe08667bb
|
||||
|
||||
yls.api.auth.url=http://yuanguiwuliu.com
|
||||
yls.api.auth.username=096d4009072c927c
|
||||
yls.api.auth.secret=3b56198f096d4009072c927c96fbc8b6
|
||||
|
||||
@@ -110,9 +110,9 @@ xgj.api.auth.username=6446346061e043e392dd53c9c8d1af0b
|
||||
xgj.api.auth.secret=3ba6e4c5632547b8b2b3acefe08667bb
|
||||
|
||||
#云流水账号
|
||||
yls.api.auth.url=****
|
||||
yls.api.auth.username=****
|
||||
yls.api.auth.secret=****
|
||||
yls.api.auth.url=http://scm330-test.366ec.net
|
||||
yls.api.auth.username=096d4009072c927c
|
||||
yls.api.auth.secret=3b56198f096d4009072c927c96fbc8b6
|
||||
|
||||
#新掌柜账号
|
||||
xzg.api.auth.url=http://webapi.zhengxinfood.com
|
||||
|
||||
Reference in New Issue
Block a user