|
|
@@ -200,22 +200,23 @@ public class StoreContractServiceImpl implements StoreContractService {
|
|
|
if (storeId == null) {
|
|
|
return R.fail("店铺ID不能为空");
|
|
|
}
|
|
|
+ String contracts = storeContractMapper.selectSigningStatus(storeId);
|
|
|
|
|
|
// 根据店铺ID查询最新的合同(按创建时间倒序)
|
|
|
- List<StoreContract> contracts = storeContractMapper.selectList(
|
|
|
- new LambdaQueryWrapper<StoreContract>()
|
|
|
- .eq(StoreContract::getStoreId, storeId.longValue())
|
|
|
- .eq(StoreContract::getDeleteFlag, 0)
|
|
|
- .orderByDesc(StoreContract::getCreatedTime)
|
|
|
- .last("LIMIT 1")
|
|
|
- );
|
|
|
+// List<StoreContract> contracts = storeContractMapper.selectList(
|
|
|
+// new LambdaQueryWrapper<StoreContract>()
|
|
|
+// .eq(StoreContract::getStoreId, storeId.longValue())
|
|
|
+// .eq(StoreContract::getDeleteFlag, 0)
|
|
|
+// .orderByDesc(StoreContract::getCreatedTime)
|
|
|
+// .last("LIMIT 1")
|
|
|
+// );
|
|
|
|
|
|
if (contracts == null || contracts.isEmpty()) {
|
|
|
return R.fail("该店铺暂无合同");
|
|
|
}
|
|
|
|
|
|
- StoreContract contract = contracts.get(0);
|
|
|
- String signingStatus = contract.getSigningStatus();
|
|
|
+// StoreContract contract = contracts.get(0);
|
|
|
+ String signingStatus = contracts;
|
|
|
// 将字符串状态转换为数字:已签署=1, 未签署=0, 已到期=2
|
|
|
Integer statusValue = null;
|
|
|
if (signingStatus != null) {
|