| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/appUser/getAppUserById") |
| | | @PostMapping("/app-user/getAppUserById") |
| | | AppUser getAppUserById(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import feignClient.RemoteOrderGoodsClient; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import model.OrderGood; |
| | | import model.Order; |
| | | import org.springframework.cloud.openfeign.FallbackFactory; |
| | | |
| | | import java.util.List; |
| | |
| | | public RemoteOrderGoodsClient create(Throwable cause) { |
| | | return new RemoteOrderGoodsClient(){ |
| | | @Override |
| | | public R<List<OrderGood>> goodsOrder(List<Long> goodsIds) { |
| | | public R<List<Order>> goodsOrder(List<Long> goodsIds) { |
| | | log.error("编辑用户信息失败:{}", cause.getMessage()); |
| | | throw new RuntimeException("编辑用户信息失败"); |
| | | } |
| | |
| | | @FeignClient(contextId = "RemoteOrderGoodsClient", value = ServiceNameConstants.OTHER_SERVICE, fallbackFactory = RemoteVipSettingFallbackFactory.class) |
| | | public interface RemoteVipSettingClient { |
| | | |
| | | @GetMapping("/vip-setting/getVipSettingById") |
| | | @GetMapping("/vip-setting/getVipSettingById") |
| | | R<VipSetting> getVipSettingById(@RequestParam(value = "id",required = true) Integer id); |
| | | } |
| | |
| | | public interface TechnicianClient { |
| | | |
| | | @PostMapping("/technician/shop/detail") |
| | | R<Technician> shopdetail(@RequestParam Integer techId); |
| | | R<Technician> shopdetail(@RequestParam("techId") Integer techId); |
| | | |
| | | @PutMapping("/technician-subscribe/updateStatus") |
| | | R<Void> updateStatus(@RequestParam Integer status, @RequestParam Integer subscribeId); |
| | | R<Void> updateStatus(@RequestParam("status") Integer status, @RequestParam("subscribeId") Integer subscribeId); |
| | | } |
| | |
| | | com.ruoyi.other.api.factory.CouponInfoClientFallbackFactory |
| | | com.ruoyi.other.api.factory.SystemConfigClientFallbackFactory |
| | | com.ruoyi.other.api.factory.StoreFallbackFactory |
| | | com.ruoyi.other.api.factory.CouponClientFallbackFactory |
| | | com.ruoyi.other.api.factory.CouponClientFallbackFactory |
| | | com.ruoyi.other.api.factory.TechnicianClientFallbackFactory |
| | |
| | | @ApiOperation(value = "banner列表", tags = {"小程序-banner"}) |
| | | public R<List<Banner>> list(String name, Integer jumpType, Integer position){ |
| | | List<Banner> list = bannerService.lambdaQuery().like(StringUtils.isNotEmpty(name), Banner::getName, name) |
| | | .eq(Banner::getJumpType, jumpType) |
| | | .eq(Banner::getPosition, position) |
| | | .eq(jumpType!=null,Banner::getJumpType, jumpType) |
| | | .eq(position!=null,Banner::getPosition, position) |
| | | .list(); |
| | | return R.ok(list); |
| | | } |
| | |
| | | @Resource |
| | | private GoodsCategoryService goodsCategoryService; |
| | | |
| | | @PostMapping("/index/list") |
| | | @GetMapping("/index/list") |
| | | @ApiOperation(value = "商品分类", tags = {"小程序-首页"}) |
| | | public R<List<GoodsCategory>> indexlist(){ |
| | | List<GoodsCategory> indexlist = goodsCategoryService.lambdaQuery() |
| | |
| | | systemConfigService.save(systemConfig); |
| | | return R.ok(); |
| | | } |
| | | @PostMapping("/index/detail") |
| | | @GetMapping("/index/detail") |
| | | @ApiOperation(value = "宣传图片-公司简介", tags = {"后台-广告管理-首页配置","小程序-首页"}) |
| | | public R<IndexConfigSetDto> detail(){ |
| | | SystemConfig one = systemConfigService.lambdaQuery().eq(SystemConfig::getType, 2).one(); |
| | |
| | | public class VipSettingController { |
| | | @Resource |
| | | private VipSettingService vipSettingService; |
| | | @PostMapping("/info") |
| | | @GetMapping("/info") |
| | | @ApiOperation(value = "获取各级会员信息", tags = {"小程序-个人中心首页"}) |
| | | public R<List<VipSetting>> info(){ |
| | | List<VipSetting> list = vipSettingService.list(); |
| | |
| | | LEFT JOIN t_goods tg ON tsai.good_id = tg.id |
| | | LEFT JOIN t_goods_seckill tgs ON tgs.seckill_activity_info_id = tsai.id |
| | | WHERE tsai.end_time >= NOW() |
| | | <if test="goodsName != null and goodsName != ''"> |
| | | <if test="name != null and name != ''"> |
| | | AND tg.`name` LIKE concat('%',#{goodsName},'%') |
| | | </if> |
| | | <if test="goodsCategoryId != null"> |