修改3-15问题

This commit is contained in:
2023-03-15 14:07:40 +08:00
parent 5c9813c1a6
commit f473451293
13 changed files with 95 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
@@ -205,4 +206,9 @@ public class BuildingCommunity implements Serializable {
@TableField(exist = false)
private double distance;
@TableField(exist = false)
private String companyName;
@TableField(exist = false)
@ApiModelProperty("查询条件")
private String keyword;
}

View File

@@ -1,6 +1,10 @@
package com.zscat.mallplus.build.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zscat.mallplus.build.entity.BuildingCommunity;
import com.zscat.mallplus.sys.entity.SysShop;
import org.apache.ibatis.annotations.Param;
@@ -25,4 +29,6 @@ public interface BuildingCommunityMapper extends BaseMapper<BuildingCommunity> {
@Param("latitude") double latitude,
@Param("longitude") double longitude,
@Param("pageSize") Integer pageSize);
IPage<BuildingCommunity> pagerList(Page<BuildingCommunity> buildingCommunityPage, @Param(Constants.WRAPPER)QueryWrapper<BuildingCommunity> buildingCommunityQueryWrapper);
}

View File

@@ -3,6 +3,7 @@ package com.zscat.mallplus.sms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zscat.mallplus.sms.entity.SmsCouponHistory;
import com.zscat.mallplus.sms.vo.SmsCouponHistoryDetail;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -17,4 +18,6 @@ import java.util.List;
public interface SmsCouponHistoryMapper extends BaseMapper<SmsCouponHistory> {
List<SmsCouponHistoryDetail> getDetailList(Long memberId);
int updateUseStatus(@Param("useStatus") int i, @Param("endTime") String tomorrow);
}

View File

@@ -38,4 +38,11 @@
distance
LIMIT 0 , {pageSize}
</select>
<select id="pagerList" resultType="com.zscat.mallplus.build.entity.BuildingCommunity">
select bc.*,bwc.name companyName from building_community bc left join build_wuye_company bwc on bwc.id = bc.company_id
<where>
${ew.sqlSegment}
</where>
</select>
</mapper>

View File

@@ -61,4 +61,7 @@
order_sn, start_time, end_time, note
</sql>
<update id="updateUseStatus">
update sms_coupon_history set use_status = #{useStatus} where end_time &lt;= #{endTime} and use_status = 0
</update>
</mapper>

View File

@@ -58,9 +58,8 @@
</sql>
<select id="selectNotRecive" resultMap="BaseResultMap">
SELECT sms_coupon.* from sms_coupon where count>0 and now()>=start_time and end_time>=now() and id not in
(SELECT coupon_id from sms_coupon_history where member_id =
#{memberId}) limit #{limit}
SELECT sms_coupon.* from sms_coupon where count>0 and now()>=start_time and end_time>=now() and (SELECT count(*) from sms_coupon_history where member_id =
#{memberId} and sms_coupon.id = coupon_id) &lt; per_limit limit #{limit}
</select>
<select id="selectRecive" resultMap="BaseResultMap">