This commit is contained in:
shuo.wang
2025-04-01 17:08:40 +08:00
parent 4b59c1659e
commit 20f3f36347
8 changed files with 27 additions and 15 deletions

View File

@@ -120,8 +120,8 @@ public class PointInfoDAO {
return pointInfoMapper.recyclePoint(pointId); return pointInfoMapper.recyclePoint(pointId);
} }
public List<MiniPointPageVO> getMiniPointPage(Long lineId ) { public List<MiniPointPageVO> getMiniPointPage(MiniPointPageRequest request ) {
List<MiniPointPageVO> pointInfoDOPage = pointInfoMapper.MiniPointPageVO(lineId); List<MiniPointPageVO> pointInfoDOPage = pointInfoMapper.MiniPointPageVO(request);
if(CollectionUtils.isEmpty(pointInfoDOPage)){ if(CollectionUtils.isEmpty(pointInfoDOPage)){
return Lists.newArrayList(); return Lists.newArrayList();
} }

View File

@@ -3,6 +3,7 @@ package com.cool.store.mapper;
import com.cool.store.dto.point.LineCountDTO; import com.cool.store.dto.point.LineCountDTO;
import com.cool.store.entity.PointInfoDO; import com.cool.store.entity.PointInfoDO;
import com.cool.store.request.AllPointPageRequest; import com.cool.store.request.AllPointPageRequest;
import com.cool.store.request.MiniPointPageRequest;
import com.cool.store.request.PointPageRequest; import com.cool.store.request.PointPageRequest;
import com.cool.store.request.RecommendPointPageRequest; import com.cool.store.request.RecommendPointPageRequest;
import com.cool.store.vo.point.MiniPointPageVO; import com.cool.store.vo.point.MiniPointPageVO;
@@ -95,5 +96,5 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
* @Date: 2025/3/31 * @Date: 2025/3/31
* @description:获取铺位部分数据 * @description:获取铺位部分数据
*/ */
List<MiniPointPageVO> MiniPointPageVO(@Param("lineId") Long lineId); List<MiniPointPageVO> MiniPointPageVO(@Param("request") MiniPointPageRequest request);
} }

View File

@@ -112,7 +112,7 @@
</foreach> </foreach>
</if> </if>
<if test="request.areaCode!=null and request.areaCode!=''"> <if test="request.areaCode!=null and request.areaCode!=''">
and (province_code = #{request.areaCode} || city_code = #{request.areaCode} || county_code = #{request.areaCode}) and (province_code = #{request.areaCode} or city_code = #{request.areaCode} or district_code = #{request.areaCode})
</if> </if>
order by id desc order by id desc
</select> </select>
@@ -213,7 +213,7 @@
and storage_status = #{request.storageStatus} and storage_status = #{request.storageStatus}
</if> </if>
<if test="request.areaCode!=null and request.areaCode!=''"> <if test="request.areaCode!=null and request.areaCode!=''">
and (province_code = #{request.areaCode} || city_code = #{request.areaCode} || county_code = #{request.areaCode}) and (province_code = #{request.areaCode} or city_code = #{request.areaCode} or district_code = #{request.areaCode})
</if> </if>
order by id desc order by id desc
</select> </select>
@@ -235,13 +235,17 @@
a.create_time as createTime, a.create_time as createTime,
a.opportunity_point_code as opportunityPointCode, a.opportunity_point_code as opportunityPointCode,
a.opportunity_point_name as opportunityPointName, a.opportunity_point_name as opportunityPointName,
a.picture_obj as pictureObj, c.picture_obj as pictureObj,
a.point_area as pointArea, a.point_area as pointArea,
b.landlord_mobile as landlordMobile, c.landlord_mobile as landlordMobile,
b.month_rent as monthRent, c.month_rent as monthRent
from xfsg_point_info a from xfsg_point_info a
left join xfsg_point_recommend b on a.id = b.point_id left join xfsg_point_recommend b on a.id = b.point_id
where a.line_id = #{lineId} and a.point_source = 2 LEFT JOIN xfsg_point_detail_info c on a.id = c.point_id
<if test="request.areaCode!=null and request!=''">
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code =
#{request.areaCode})
</if>
</select> </select>
<update id="recyclePoint"> <update id="recyclePoint">

View File

@@ -126,11 +126,12 @@
p.create_time as createTime, p.create_time as createTime,
p.opportunity_point_code as opportunityPointCode, p.opportunity_point_code as opportunityPointCode,
p.opportunity_point_name as opportunityPointName, p.opportunity_point_name as opportunityPointName,
p.picture_obj as pictureObj, c.picture_obj as pictureObj,
pr.status as recommendStatus pr.status as recommendStatus
from from
xfsg_point_recommend pr xfsg_point_recommend pr
inner join xfsg_point_info p on p.id = pr.point_id inner join xfsg_point_info p on p.id = pr.point_id
left join xfsg_point_detail_info c on p.id = c.point_id
where where
p.deleted = 0 and pr.shop_id = #{request.shopId} and pr.deleted = 0 p.deleted = 0 and pr.shop_id = #{request.shopId} and pr.deleted = 0
<if test="request.status != null and request.status == 1"> <if test="request.status != null and request.status == 1">
@@ -142,8 +143,8 @@
<if test="request.status != null and request.status == 3"> <if test="request.status != null and request.status == 3">
and pr.status in (5, 6) and pr.status in (5, 6)
</if> </if>
<if test="request.areaCode!=null and request.areaCode 1=''"> <if test="request.areaCode!=null and request.areaCode !=''">
and (p.province_code = #{request.areaCode} or p.city_code = #{request.areaCode} or p.area_code = #{request.areaCode}) and (p.province_code = #{request.areaCode} or p.city_code = #{request.areaCode} or p.district_code = #{request.areaCode})
</if> </if>
</select> </select>

View File

@@ -14,7 +14,7 @@
<insert id="batchInsert"> <insert id="batchInsert">
insert into xfsg_tally_book_detail (tally_book_id, field_name, field_value, create_time, update_time) insert into xfsg_tally_book_detail (tally_book_id, field_name, field_value, create_time, update_time)
values values
<foreach collection="tallyBookDetailDOList" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.tallyBookId,jdbcType=BIGINT}, (#{item.tallyBookId,jdbcType=BIGINT},
#{item.fieldName,jdbcType=VARCHAR}, #{item.fieldName,jdbcType=VARCHAR},
#{item.fieldValue,jdbcType=DECIMAL}, #{item.fieldValue,jdbcType=DECIMAL},

View File

@@ -3,6 +3,9 @@ package com.cool.store.entity;
import lombok.Data; import lombok.Data;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Table;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@@ -13,8 +16,10 @@ import java.util.Date;
* @注释: * @注释:
*/ */
@Data @Data
@Table(name = "xfsg_tally_book_detail")
public class TallyBookDetailDO { public class TallyBookDetailDO {
@Column(name = "id") @Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id; private Long id;
@Column(name = "tally_book_id") @Column(name = "tally_book_id")
private Long tallyBookId; private Long tallyBookId;

View File

@@ -8,6 +8,7 @@ import lombok.Data;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import java.math.BigDecimal; import java.math.BigDecimal;
@@ -42,7 +43,7 @@ public class TallyBookRequest {
private BigDecimal total; private BigDecimal total;
@ApiModelProperty(value = "明细") @ApiModelProperty(value = "明细")
@NotBlank(message = "明细不能为空") @NotEmpty(message = "明细不能为空")
private List<TallyBookDetailDTO> tallyBookDetailDTOList; private List<TallyBookDetailDTO> tallyBookDetailDTOList;
@ApiModelProperty(value = "操作人",hidden = true) @ApiModelProperty(value = "操作人",hidden = true)

View File

@@ -749,7 +749,7 @@ public class PointServiceImpl implements PointService {
} }
if (request.getType().equals(PointListType.POINT_LIST_TYPE_2.getCode())){ if (request.getType().equals(PointListType.POINT_LIST_TYPE_2.getCode())){
PageHelper.startPage(request.getPageNum(), request.getPageSize()); PageHelper.startPage(request.getPageNum(), request.getPageSize());
List<MiniPointPageVO> miniPointPage = pointInfoDAO.getMiniPointPage(request.getLineId()); List<MiniPointPageVO> miniPointPage = pointInfoDAO.getMiniPointPage(request);
return new PageInfo<>(miniPointPage); return new PageInfo<>(miniPointPage);
} }
return new PageInfo<>(); return new PageInfo<>();