Commit ebcc5128 by 叶立庆

Merge branch 'v5.8.2.1' into 'master'

上线合并

See merge request !32
2 parents 9c010814 8f6621c9
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<name>rpc-dj-smartcarlife-api</name> <name>rpc-dj-smartcarlife-api</name>
<properties> <properties>
<deploy.scanPackage>cn.com.glsx.dj.smartcarlife.remote</deploy.scanPackage> <deploy.scanPackage>cn.com.glsx.dj.smartcarlife.remote</deploy.scanPackage>
<smartcarlife.api.version>5.8.2-SNAPSHOT</smartcarlife.api.version> <smartcarlife.api.version>5.8.2.1-SNAPSHOT</smartcarlife.api.version>
<shopamll.api.version>5.6.4-SNAPSHOT</shopamll.api.version> <shopamll.api.version>5.6.4-SNAPSHOT</shopamll.api.version>
</properties> </properties>
<dependencies> <dependencies>
......
...@@ -45,4 +45,7 @@ public class StaffAccountAssignRecordDTO extends StaffAccountAssignRecord implem ...@@ -45,4 +45,7 @@ public class StaffAccountAssignRecordDTO extends StaffAccountAssignRecord implem
@ApiModelProperty(notes = "驻店类型描述") @ApiModelProperty(notes = "驻店类型描述")
private String stationTypeDesc; private String stationTypeDesc;
@ApiModelProperty(name = "sceneType", notes = "业务场景:0-会员权益/升级;1-精品升级;")
private Byte sceneType;
} }
...@@ -2,6 +2,7 @@ package cn.com.glsx.dj.smartcarlife.remote; ...@@ -2,6 +2,7 @@ package cn.com.glsx.dj.smartcarlife.remote;
import cn.com.glsx.dj.smartcarlife.dto.*; import cn.com.glsx.dj.smartcarlife.dto.*;
import cn.com.glsx.dj.smartcarlife.dto.businessassistant.MerchantServiceCenterDTO; import cn.com.glsx.dj.smartcarlife.dto.businessassistant.MerchantServiceCenterDTO;
import cn.com.glsx.dj.smartcarlife.dto.scene.SceneDTO;
import cn.com.glsx.dj.smartcarlife.dto.merchantRef.BatchMerchantRefStatusDTO; import cn.com.glsx.dj.smartcarlife.dto.merchantRef.BatchMerchantRefStatusDTO;
import cn.com.glsx.dj.smartcarlife.dto.merchantRef.MerchantRefStatusDTO; import cn.com.glsx.dj.smartcarlife.dto.merchantRef.MerchantRefStatusDTO;
import cn.com.glsx.dj.smartcarlife.model.SceneMerchantRef; import cn.com.glsx.dj.smartcarlife.model.SceneMerchantRef;
...@@ -264,6 +265,12 @@ public interface SceneMerchantRefRemote { ...@@ -264,6 +265,12 @@ public interface SceneMerchantRefRemote {
@ApiResponse("根据商户ID查询商户和场景关系") @ApiResponse("根据商户ID查询商户和场景关系")
RpcResponse<List<NewMerchantSceneDTO>> findAllSceneByMerchantId(Integer merchantId); RpcResponse<List<NewMerchantSceneDTO>> findAllSceneByMerchantId(Integer merchantId);
@ApiMethod("按商户ID和场景类型查询场景")
@ApiParam(name = "merchantId", notes = "商户号", dataType = ApiParam.DataTypeEnum.INTEGER, required = true)
@ApiResponse("按商户ID和场景类型查询场景列表")
RpcResponse<List<NewMerchantSceneDTO>> findByMerchantIdAndSceneType(Integer merchantId, Integer sceneType);
RpcResponse<List<MerchantListDTO>> querySimpleSceneRefByShopNew(@NotNull Integer merchantId,@NotNull Integer scene,@NotNull String baseSceneCode); RpcResponse<List<MerchantListDTO>> querySimpleSceneRefByShopNew(@NotNull Integer merchantId,@NotNull Integer scene,@NotNull String baseSceneCode);
@ApiMethod("根据园区店获取是否有扫码出入库的权限") @ApiMethod("根据园区店获取是否有扫码出入库的权限")
......
...@@ -143,6 +143,11 @@ public interface StaffBaseInfoRemote { ...@@ -143,6 +143,11 @@ public interface StaffBaseInfoRemote {
@ApiResponse("禁用或启用结果") @ApiResponse("禁用或启用结果")
RpcResponse<String> disableStaffAccount(StaffAccountRecordDTO condition); RpcResponse<String> disableStaffAccount(StaffAccountRecordDTO condition);
@ApiMethod("查询员工账号上架门店的小场景值")
@ApiParam(name = "condition", notes = "查询条件", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("员工上架门店小场景值列表")
RpcResponse<List<String>> listStaffMerchantBaseSceneCode(StaffAccountAssignRecordDTO condition);
@interface GetByStaffPhoneForIncomeCalculation{} @interface GetByStaffPhoneForIncomeCalculation{}
@ApiMethod("收入测算-根据手机号获取所需员工信息") @ApiMethod("收入测算-根据手机号获取所需员工信息")
@ApiParam(name = "dto", notes = "过滤条件", dataType = ApiParam.DataTypeEnum.OBJECT, required = true) @ApiParam(name = "dto", notes = "过滤条件", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
......
...@@ -138,4 +138,9 @@ public interface StaffDailyReportRemote { ...@@ -138,4 +138,9 @@ public interface StaffDailyReportRemote {
@ApiParam(name = "report", notes = "员工日报华为版", dataType = ApiParam.DataTypeEnum.OBJECT, required = true) @ApiParam(name = "report", notes = "员工日报华为版", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("返回是否成功") @ApiResponse("返回是否成功")
RpcResponse<Boolean> saveStaffDailyReportHuawei(StaffDailyReportHuawei report); 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);
} }
...@@ -9,14 +9,14 @@ ...@@ -9,14 +9,14 @@
</parent> </parent>
<groupId>cn.com.glsx.dj</groupId> <groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-smartcarlife</artifactId> <artifactId>rpc-dj-smartcarlife</artifactId>
<version>5.8.2-SNAPSHOT</version> <version>5.8.2.1-SNAPSHOT</version>
<name>rpc-dj-smartcarlife</name> <name>rpc-dj-smartcarlife</name>
<packaging>war</packaging> <packaging>war</packaging>
<properties> <properties>
<skipTests>true</skipTests> <skipTests>true</skipTests>
<shopmall.api.version>5.8.2-SNAPSHOT</shopmall.api.version> <shopmall.api.version>5.8.2-SNAPSHOT</shopmall.api.version>
<stoassistant.api.version>5.6.4-SNAPSHOT</stoassistant.api.version> <stoassistant.api.version>5.6.4-SNAPSHOT</stoassistant.api.version>
<smartcarlife.api.version>5.8.2-SNAPSHOT</smartcarlife.api.version> <smartcarlife.api.version>5.8.2.1-SNAPSHOT</smartcarlife.api.version>
<sale.api.version>5.8.0-SNAPSHOT</sale.api.version> <sale.api.version>5.8.0-SNAPSHOT</sale.api.version>
<mindworkplate.api.version>5.8.2-SNAPSHOT</mindworkplate.api.version> <mindworkplate.api.version>5.8.2-SNAPSHOT</mindworkplate.api.version>
</properties> </properties>
......
...@@ -36,4 +36,5 @@ public interface StaffAccountAssignRecordMapper extends OreMapper<StaffAccountAs ...@@ -36,4 +36,5 @@ public interface StaffAccountAssignRecordMapper extends OreMapper<StaffAccountAs
List<String> listStaffPhoneByBaseSceneCode(@Param("baseSceneCode") String baseSceneCode); List<String> listStaffPhoneByBaseSceneCode(@Param("baseSceneCode") String baseSceneCode);
List<String> listStaffMerchantBaseSceneCode(StaffAccountAssignRecordDTO staffAccountAssignRecordDTO);
} }
...@@ -502,6 +502,16 @@ public class SceneMerchantRefRemoteImpl implements SceneMerchantRefRemote { ...@@ -502,6 +502,16 @@ public class SceneMerchantRefRemoteImpl implements SceneMerchantRefRemote {
} }
@Override @Override
public RpcResponse<List<NewMerchantSceneDTO>> findByMerchantIdAndSceneType(Integer merchantId, Integer sceneType) {
try{
return RpcResponse.success(sceneMerchantRefService.findByMerchantIdAndSceneType(merchantId, sceneType));
}catch(RpcServiceException e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<List<MerchantListDTO>> querySimpleSceneRefByShopNew(Integer merchantId, public RpcResponse<List<MerchantListDTO>> querySimpleSceneRefByShopNew(Integer merchantId,
Integer scene, String baseSceneCode) { Integer scene, String baseSceneCode) {
try{ try{
......
...@@ -240,6 +240,16 @@ public class StaffBaseInfoRemoteImpl implements StaffBaseInfoRemote { ...@@ -240,6 +240,16 @@ public class StaffBaseInfoRemoteImpl implements StaffBaseInfoRemote {
} }
@Override @Override
public RpcResponse<List<String>> listStaffMerchantBaseSceneCode(StaffAccountAssignRecordDTO condition) {
try{
return RpcResponse.success(staffBaseInfoService.listStaffMerchantBaseSceneCode(condition));
}catch(RpcServiceException e){
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<List<StaffBaseInfoDTO>> listMentorInfo(StaffBaseInfoDTO condition) { public RpcResponse<List<StaffBaseInfoDTO>> listMentorInfo(StaffBaseInfoDTO condition) {
try{ try{
List<StaffBaseInfoDTO> res = staffBaseInfoService.listMentorInfo(condition); List<StaffBaseInfoDTO> res = staffBaseInfoService.listMentorInfo(condition);
......
...@@ -20,6 +20,7 @@ import org.apache.commons.collections.CollectionUtils; ...@@ -20,6 +20,7 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.dubbo.config.annotation.DubboService; import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import java.util.Date;
import java.util.List; import java.util.List;
@Slf4j @Slf4j
...@@ -332,4 +333,33 @@ public class StaffDailyReportRemoteImpl implements StaffDailyReportRemote{ ...@@ -332,4 +333,33 @@ public class StaffDailyReportRemoteImpl implements StaffDailyReportRemote{
return RpcResponse.error(e); 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);
}
}
} }
...@@ -122,9 +122,9 @@ public class ReportPushDataService { ...@@ -122,9 +122,9 @@ public class ReportPushDataService {
res.setCarChildsBrandName(customer.getCarChildsBrandName()); res.setCarChildsBrandName(customer.getCarChildsBrandName());
res.setCarSeriesName(customer.getCarSeriesName()); res.setCarSeriesName(customer.getCarSeriesName());
res.setSunshineInspiration(getSunshineInspiration(goodsOrder)); res.setSunshineInspiration(getSunshineInspiration(goodsOrder));
List<String> goodsNames = Optional.ofNullable(goodsOrder.getSubOrderList()).orElse(new ArrayList<>()).stream() List<String> goodsNames = Optional.ofNullable(goodsOrder.getSubOrderList()).orElse(new ArrayList<>()).stream()
.map(s -> s.getUpgradeGoodsName()).collect(Collectors.toList()); .map(s -> StringUtils.isNotBlank(s.getUpgradeGoodsAlias()) ? s.getUpgradeGoodsAlias() : s.getUpgradeGoodsName()).collect(Collectors.toList());
res.setGoodsNames(goodsNames); res.setGoodsNames(goodsNames);
//套餐类商品信息 //套餐类商品信息
res.setSceneType(goodsOrder.getSceneType()); res.setSceneType(goodsOrder.getSceneType());
res.setPackageGoodsList(goodsOrder.getPackageGoodsList()); res.setPackageGoodsList(goodsOrder.getPackageGoodsList());
......
...@@ -2063,6 +2063,27 @@ public class SceneMerchantRefService { ...@@ -2063,6 +2063,27 @@ public class SceneMerchantRefService {
} }
/** /**
* 按商户ID和场景类型查询场景列表
*/
public List<NewMerchantSceneDTO> findByMerchantIdAndSceneType(Integer merchantId, Integer sceneType) {
List<NewMerchantSceneDTO> allSceneByMerchantId = findAllSceneByMerchantId(merchantId);
if (CollectionUtils.isEmpty(allSceneByMerchantId)) {
return Lists.newArrayList();
}
List<SceneDTO> scenesByParams = sceneService.getScenesByParams(null);
if (CollectionUtils.isEmpty(scenesByParams)) {
return Lists.newArrayList();
}
Map<String, Integer> baseSceneCodeSceneTypeMap = scenesByParams.stream()
.filter(s -> s != null && s.getBaseSceneCode() != null && s.getSceneType() != null)
.collect(Collectors.toMap(SceneDTO::getBaseSceneCode, SceneDTO::getSceneType, (a, b) -> a));
return allSceneByMerchantId.stream()
.filter(s -> s != null && s.getBaseSceneCode() != null)
.filter(s -> sceneType.equals(baseSceneCodeSceneTypeMap.get(s.getBaseSceneCode())))
.collect(Collectors.toList());
}
/**
* 根据商户ID和场景查询商户和场景关系 * 根据商户ID和场景查询商户和场景关系
* @param merchantId 商户ID * @param merchantId 商户ID
* @param baseSceneCode 场景 * @param baseSceneCode 场景
......
...@@ -743,4 +743,23 @@ public class StaffAccountRecordService { ...@@ -743,4 +743,23 @@ public class StaffAccountRecordService {
throw new RpcServiceException(DefaultErrorEnum.DATABASE_ERROR, e.getMessage()); throw new RpcServiceException(DefaultErrorEnum.DATABASE_ERROR, e.getMessage());
} }
} }
/**
* @description: 查询员工上架门店小场景值异常
* @param: [staffAccountAssignRecordDTO]
* @return: java.util.List<java.lang.String>
* @author: lqWang
* @date: 2026/6/12 15:34
*/
public List<String> listStaffMerchantBaseSceneCode(StaffAccountAssignRecordDTO staffAccountAssignRecordDTO) {
try {
return staffAccountAssignRecordMapper.listStaffMerchantBaseSceneCode(staffAccountAssignRecordDTO);
} catch (RpcServiceException e) {
log.info("查询员工上架门店小场景值异常,异常原因:{}", e.getMessage());
throw e;
} catch (Exception e) {
log.info(e.getMessage(), e);
throw new RpcServiceException(DefaultErrorEnum.DATABASE_ERROR, e.getMessage());
}
}
} }
...@@ -2958,4 +2958,19 @@ public class StaffBaseInfoService { ...@@ -2958,4 +2958,19 @@ public class StaffBaseInfoService {
return staffBaseInfoMapper.selectByPrimaryKey(dto.getStaffId()); return staffBaseInfoMapper.selectByPrimaryKey(dto.getStaffId());
} }
public List<String> listStaffMerchantBaseSceneCode(StaffAccountAssignRecordDTO staffAccountAssignRecordDTO) {
RpcAssert.assertNotNull(staffAccountAssignRecordDTO, DefaultErrorEnum.DATA_NULL, "staffAccountAssignRecordDTO must not be null");
RpcAssert.assertNotNull(staffAccountAssignRecordDTO.getMerchantId(), DefaultErrorEnum.DATA_NULL, "staffAccountAssignRecordDTO.getMerchantId() must not be null");
RpcAssert.assertNotNull(staffAccountAssignRecordDTO.getStaffUuid(), DefaultErrorEnum.DATA_NULL, "staffAccountAssignRecordDTO.getStaffUuid() must not be null");
RpcAssert.assertNotNull(staffAccountAssignRecordDTO.getSceneType(), DefaultErrorEnum.DATA_NULL, "staffAccountAssignRecordDTO.getSceneType() must not be null");
try {
return staffAccountRecordService.listStaffMerchantBaseSceneCode(staffAccountAssignRecordDTO);
} catch (RpcServiceException e) {
log.info("查询员工上架门店小场景值异常,异常原因:{}", e.getMessage());
throw e;
} catch (Exception e) {
log.info(e.getMessage(), e);
throw new RpcServiceException(DefaultErrorEnum.SERVER_ERROR, e.getMessage());
}
}
} }
...@@ -199,4 +199,20 @@ ...@@ -199,4 +199,20 @@
AND ss.deleted_flag = 'N' AND ss.deleted_flag = 'N'
</select> </select>
<select id="listStaffMerchantBaseSceneCode" parameterType="cn.com.glsx.dj.smartcarlife.dto.merchantPerformanceConfig.StaffAccountAssignRecordDTO" resultType="java.lang.String">
select distinct sass.base_scene_code
from dj_car_life_staff_account_assign_record sasr
left join dj_car_life_staff_account_assign_scene sass on sasr.id = sass.account_record_id and sass.deleted_flag = 'N'
where sasr.deleted_flag = 'N'
<if test="merchantId != null">
and sasr.merchant_id = #{merchantId,jdbcType=INTEGER}
</if>
<if test="sceneType != null">
and sass.scene_type = #{sceneType,jdbcType=INTEGER}
</if>
<if test="staffUuid != null and staffUuid != ''">
and sasr.staff_uuid = #{staffUuid,jdbcType=VARCHAR}
</if>
</select>
</mapper> </mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!