Commit 8f6621c9 by 王璐琦

refactor(service): 移除无用的 notDeliveryCount 字段设置

- 删除 DailyReportRecordService 中对 notDeliveryCount 字段的硬编码赋值
feat(scene): 按商户ID和场景类型查询场景列表

- 新增 MerchantIdAndSceneRequest 请求类,支持按商户ID和场景类型查询
- 创建 MerchantActivateBaseSceneCodesResponse 响应类,封装基础场景码信息
- 添加 NewMerchantSceneDTOConvert 转换器,将 DTO 转为响应类
- rpc-dj-smartcarlife-api 增加 findByMerchantIdAndSceneType 接口声明
- rpc-dj-smartcarlife 实现 findByMerchantIdAndSceneType 方法,增加异常处理
- SceneMerchantRefService 新增按商户ID和场景类型筛选场景逻辑
- SceneMerchantRefCarBoutiqueController 增加新接口 dj.api.scenemerchantref.findByMerchantIdAndSceneType
- 调整相关pom依赖版本号,确保接口依赖一致性
1 parent 5cb5ea54
......@@ -138,4 +138,9 @@ public interface StaffDailyReportRemote {
@ApiParam(name = "report", notes = "员工日报华为版", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("返回是否成功")
RpcResponse<Boolean> saveStaffDailyReportHuawei(StaffDailyReportHuawei report);
@ApiMethod("更新员工日报华为版-交付数")
@ApiParam(name = "merchantId, yqMerchantId, reportDate, firstBrandId, brandId, sceneType, deliveryCount, updatedBy, updatedDate", notes = "查询条件及更新值", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("返回是否成功")
RpcResponse<Boolean> updateStaffDailyReportHuaweiDeliveryCount(StaffDailyReportHuawei report);
}
......@@ -20,6 +20,7 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Date;
import java.util.List;
@Slf4j
......@@ -332,4 +333,33 @@ public class StaffDailyReportRemoteImpl implements StaffDailyReportRemote{
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<Boolean> updateStaffDailyReportHuaweiDeliveryCount(StaffDailyReportHuawei report) {
try {
StaffDailyReportHuawei query = new StaffDailyReportHuawei();
query.setMerchantId(report.getMerchantId());
query.setYqMerchantId(report.getYqMerchantId());
query.setReportDate(report.getReportDate());
query.setFirstBrandId(report.getFirstBrandId());
query.setBrandId(report.getBrandId());
query.setSceneType(report.getSceneType());
query.setDeletedFlag(DeleteFlagEnum.N.getValue());
List<StaffDailyReportHuawei> existingList = staffDailyReportHuaweiMapper.select(query);
if (CollectionUtils.isNotEmpty(existingList)) {
for (StaffDailyReportHuawei existing : existingList) {
existing.setDeliveryCount(report.getDeliveryCount());
existing.setUpdatedBy(report.getUpdatedBy());
existing.setUpdatedDate(report.getUpdatedDate());
staffDailyReportHuaweiMapper.updateByPrimaryKeySelective(existing);
}
log.info("updateStaffDailyReportHuaweiDeliveryCount success, merchantId={}, brandId={}, count={}",
report.getMerchantId(), report.getBrandId(), existingList.size());
}
return RpcResponse.success(Boolean.TRUE);
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!