Merge remote-tracking branch 'origin/master-v2' into master-v2
| | |
| | | List<FlowerListDTO> selectZoneFlowerList(Page page, @Param("condition") FlowerZoneQueryDTO dto); |
| | | |
| | | void updateFlowerCategoryInfo(Long category); |
| | | |
| | | List<Long> searchInvalidHistory(@Param("userId") String userId); |
| | | } |
| | |
| | | break; |
| | | } |
| | | } |
| | | fp = fp.add(b); |
| | | fp = fp.add(getAmount(b)); |
| | | dto.setFirstFee(b); |
| | | } |
| | | |
| | |
| | | break; |
| | | } |
| | | } |
| | | fp = fp.add(b); |
| | | fp = fp.add(getAmount(b)); |
| | | dto.setSecondFee(b); |
| | | |
| | | FlowerMarkupSpCg fmpsc = null; |
| | |
| | | break; |
| | | } |
| | | } |
| | | fp = fp.add(b); |
| | | fp = fp.add(getAmount(b)); |
| | | dto.setPartnerFee(b); |
| | | } |
| | | |
| | |
| | | break; |
| | | } |
| | | } |
| | | fp = fp.add(b); |
| | | fp = fp.add(getAmount(b)); |
| | | } |
| | | |
| | | //二次加价 |
| | |
| | | break; |
| | | } |
| | | } |
| | | fp = fp.add(b); |
| | | fp = fp.add(getAmount(b)); |
| | | |
| | | return fp; |
| | | } |
| | |
| | | package com.mzl.flower.service.customer; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.mzl.flower.config.exception.ValidationException; |
| | | import com.mzl.flower.config.security.SecurityUtils; |
| | | import com.mzl.flower.entity.customer.BrowseHistory; |
| | | import com.mzl.flower.mapper.customer.BrowseHistoryMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | log.error(e.getMessage(), e); |
| | | } |
| | | } |
| | | |
| | | public boolean deleteBatchIds(List<Long> ids) { |
| | | if(CollectionUtils.isNotEmpty(ids)){ |
| | | return browseHistoryMapper.deleteBatchIds(ids)>0; |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | |
| | | Member member = getMember(levelId); |
| | | |
| | | BigDecimal price = getFinalPrice(pId, dto.getCategory() |
| | | , s.getId(), dto.getPrice(), dto.getLevel()); |
| | | , dto.getId(), dto.getPrice(), dto.getLevel()); |
| | | dto.setPrice(price); |
| | | dto.setPriceMember(calculateMemberPrice(price, member)); |
| | | |
| | |
| | | |
| | | return page; |
| | | } |
| | | |
| | | public void clearInvalidHistory(String userId) { |
| | | |
| | | List<Long> ids = flowerMapper.searchInvalidHistory(userId); |
| | | if(ids!=null && ids.size()>0){ |
| | | browseService.deleteBatchIds(ids); |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | import com.mzl.flower.base.BaseController; |
| | | import com.mzl.flower.base.R; |
| | | import com.mzl.flower.base.ReturnDataDTO; |
| | | import com.mzl.flower.config.security.SecurityUtils; |
| | | import com.mzl.flower.dto.request.flower.FlowerShowQueryDTO; |
| | | import com.mzl.flower.dto.response.flower.FlowerShowListDTO; |
| | | import com.mzl.flower.service.flower.FlowerService; |
| | |
| | | public ResponseEntity<ReturnDataDTO<Page<FlowerShowListDTO>>> myBrowseHistory(Page page, FlowerShowQueryDTO dto) { |
| | | return returnData(R.SUCCESS.getCode(),flowerService.myBrowseHistory(page,dto)); |
| | | } |
| | | |
| | | @PostMapping("/clear") |
| | | @ApiOperation(value = "清空失效商品", notes = "清空失效商品") |
| | | public ResponseEntity<ReturnDataDTO<Page<FlowerShowListDTO>>> clear() { |
| | | flowerService.clearInvalidHistory(SecurityUtils.getUserId()); |
| | | return returnData(R.SUCCESS.getCode(),null); |
| | | } |
| | | } |
| | |
| | | </if> |
| | | ORDER BY fzp.rank asc |
| | | </select> |
| | | <select id="searchInvalidHistory" resultType="java.lang.Long"> |
| | | SELECT c.id |
| | | FROM t_browse_his c left join t_flower f on c.flower_id = f.id |
| | | WHERE f.deleted = 0 and c.deleted = 0 and f.status != 'UP' and c.user_id = #{userId} |
| | | </select> |
| | | |
| | | <update id="updateFlowerCategoryInfo"> |
| | | update t_flower f, t_flower_category fc |