This commit is contained in:
zhangchenbiao
2024-05-06 18:20:46 +08:00
parent 28de7013dc
commit bb4dfb94d5
4 changed files with 35 additions and 1 deletions

View File

@@ -52,6 +52,15 @@ public class PointInfoDAO {
return pointInfoMapper.updateByPrimaryKeySelective(shopPointInfo); return pointInfoMapper.updateByPrimaryKeySelective(shopPointInfo);
} }
/**
* 完善铺位信息
* @param shopPointInfo
* @return
*/
public Integer perfectPointInfo(PointInfoDO shopPointInfo) {
return pointInfoMapper.perfectPointInfo(shopPointInfo);
}
public Integer updatePointInfoByPrimaryKey(PointInfoDO shopPointInfo) { public Integer updatePointInfoByPrimaryKey(PointInfoDO shopPointInfo) {
return pointInfoMapper.updateByPrimaryKey(shopPointInfo); return pointInfoMapper.updateByPrimaryKey(shopPointInfo);
} }

View File

@@ -81,4 +81,11 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
*/ */
PointInfoDO getDataByShopIdAndLineId(@Param("lineId") Long lineId, PointInfoDO getDataByShopIdAndLineId(@Param("lineId") Long lineId,
@Param("shopId") Long shopId); @Param("shopId") Long shopId);
/**
* 完善铺位信息
* @param request
* @return
*/
Integer perfectPointInfo(@Param("request") PointInfoDO request);
} }

View File

@@ -200,5 +200,23 @@
<update id="recyclePoint"> <update id="recyclePoint">
update xfsg_point_info set line_id = null, shop_id = null, select_status = 0, update_time = now(), point_status = if(point_status = 6, 5, point_status) where id = #{pointId} update xfsg_point_info set line_id = null, shop_id = null, select_status = 0, update_time = now(), point_status = if(point_status = 6, 5, point_status) where id = #{pointId}
</update> </update>
<update id="perfectPointInfo">
update
xfsg_point_info
set
point_name = #{request.pointName},
region_id = #{request.regionId},
point_area = #{request.pointArea},
latitude = #{request.latitude},
longitude = #{request.longitude},
address = #{request.address},
province = #{request.province},
city = #{request.city},
district = #{request.district},
township = #{request.township},
point_score = #{request.pointScore}
where id = #{request.id}
</update>
</mapper> </mapper>

View File

@@ -142,7 +142,7 @@ public class PointServiceImpl implements PointService {
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED); throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
} }
shopPointInfo.setPointScore(shopPoint.getTotalPointScore()); shopPointInfo.setPointScore(shopPoint.getTotalPointScore());
pointInfoDAO.updatePointInfo(shopPointInfo); pointInfoDAO.perfectPointInfo(shopPointInfo);
pointDetailInfoDAO.updatePartFieldPointDetail(shopPoint); pointDetailInfoDAO.updatePartFieldPointDetail(shopPoint);
return shopPointDetailRequest.getPointId(); return shopPointDetailRequest.getPointId();
} }