绑定 开票信息
This commit is contained in:
parent
105671347a
commit
f3cac2b5d5
|
|
@ -36,7 +36,6 @@ public class TbShopShareController {
|
|||
private TbShopShareRecordService tbShopShareRecordService;
|
||||
|
||||
@PostMapping("byShare")
|
||||
@AnonymousPostMapping
|
||||
@ApiOperation("分页查询")
|
||||
public ResponseEntity<Object> selectAllByShare(@RequestBody TbShopShareRecordQueryCriteria criteria) {
|
||||
return new ResponseEntity<>(tbShopShareRecordService.selectAllByShare(criteria), HttpStatus.OK);
|
||||
|
|
|
|||
|
|
@ -91,17 +91,17 @@ public class TbShopInfoServiceImpl implements TbShopInfoService {
|
|||
|
||||
@Override
|
||||
public JSONObject binding(BindingDto bindingDto) {
|
||||
// TbShopInfo tbShopInfo = tbShopInfoRepository.findById(bindingDto.getShopId()).orElseGet(null);
|
||||
// TbMerchantAccount account = merchantAccountRepository.findByAccount(tbShopInfo.getAccount());
|
||||
// if (org.apache.commons.lang3.StringUtils.isBlank(bindingDto.getAccount())) {
|
||||
// if (tbShopInfo != null) {
|
||||
// if (org.apache.commons.lang3.StringUtils.isNotBlank(account.getBindAccount())) {
|
||||
// bindingDto.setAccount(account.getBindAccount());
|
||||
// } else {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
TbShopInfo tbShopInfo = tbShopInfoRepository.findById(bindingDto.getShopId()).orElseGet(null);
|
||||
TbMerchantAccount account = merchantAccountRepository.findByAccount(tbShopInfo.getAccount());
|
||||
if (org.apache.commons.lang3.StringUtils.isBlank(bindingDto.getAccount())) {
|
||||
if (tbShopInfo != null) {
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(account.getBindAccount())) {
|
||||
bindingDto.setAccount(account.getBindAccount());
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
//超掌柜生活-用户端
|
||||
param.put("account", bindingDto.getAccount());
|
||||
|
|
@ -110,11 +110,11 @@ public class TbShopInfoServiceImpl implements TbShopInfoService {
|
|||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
if (jsonObject.getInteger("code").equals(1)) {
|
||||
JSONObject data = jsonObject.getJSONObject("data");
|
||||
// if (org.apache.commons.lang3.StringUtils.isNotBlank(bindingDto.getAccount())) {
|
||||
// String bindAccount = data.getJSONObject("store").getString("account");
|
||||
// account.setBindAccount(bindAccount);
|
||||
// merchantAccountRepository.save(account);
|
||||
// }
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(bindingDto.getAccount())) {
|
||||
String bindAccount = data.getJSONObject("store").getString("account");
|
||||
account.setBindAccount(bindAccount);
|
||||
merchantAccountRepository.save(account);
|
||||
}
|
||||
return data;
|
||||
} else {
|
||||
throw new BadRequestException(jsonObject.getString("msg"));
|
||||
|
|
|
|||
Loading…
Reference in New Issue