提交
This commit is contained in:
parent
97cae5e6b6
commit
1e9be01e18
@ -94,8 +94,8 @@ public class SwaggerConfig{
|
||||
|
||||
private ApiInfo apiInfo() {
|
||||
return new ApiInfoBuilder()
|
||||
.title("Crmeb Java")
|
||||
.description("Crmeb")
|
||||
.title("Food Admin Java")
|
||||
.description("Food Admin")
|
||||
.termsOfServiceUrl("http://host:port")
|
||||
.version("1.0.0").build();
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ public class Constants {
|
||||
//城市数据 redis key
|
||||
public static final String CITY_LIST = "city_list";
|
||||
//城市数据 tree redis key
|
||||
public static final String CITY_LIST_TREE = "city_list_tree_2";
|
||||
public static final String CITY_LIST_TREE = "city_list_tree";
|
||||
//城市数据 tree redis key
|
||||
public static final String CITY_LIST_LEVEL_1 = "city_list_level_1";
|
||||
|
||||
@ -171,8 +171,8 @@ public class Constants {
|
||||
public static final String CONFIG_KEY_PAY_WE_CHAT_APP_APP_KEY = "pay_weixin_app_key"; //公众号支付key
|
||||
|
||||
public static final String CONFIG_KEY_RECHARGE_MIN_AMOUNT = "store_user_min_recharge"; //最小充值金额
|
||||
// public static final String CONFIG_KEY_PROGRAM_LOGO = "routine_logo"; //小程序logo
|
||||
// public static final String CONFIG_KEY_PUBLIC_LOGO = "wechat_avatar"; //公众号logo
|
||||
// public static final String CONFIG_KEY_PROGRAM_LOGO = "routine_logo"; //小程序logo
|
||||
// public static final String CONFIG_KEY_PUBLIC_LOGO = "wechat_avatar"; //公众号logo
|
||||
|
||||
public static final String CONFIG_KEY_LOGISTICS_APP_CODE = "system_express_app_code"; //快递查询密钥
|
||||
|
||||
@ -242,8 +242,6 @@ public class Constants {
|
||||
public static final String PRODUCT_TYPE_PINGTUAN_STR= "拼团";
|
||||
public static final Integer PRODUCT_TYPE_COMPONENT= 4;
|
||||
public static final String PRODUCT_TYPE_COMPONENT_STR= "组件";
|
||||
public static final Integer PRODUCT_TYPE_FRUIT_EXCHANGE= 5;
|
||||
public static final String PRODUCT_TYPE_FRUIT_EXCHANGE_STR= "茶果兑换";
|
||||
public static final Integer PRODUCT_TYPE_GROUP = 0;
|
||||
|
||||
// 楼层渠道
|
||||
|
@ -54,8 +54,7 @@ public class PayComponentProductAddRequest implements Serializable {
|
||||
@ApiModelProperty(value = "商品详情图片,多图")
|
||||
private String descImgs;
|
||||
|
||||
@ApiModelProperty(value = "运费模板ID", required = true)
|
||||
@NotNull(message = "运费模板不能为空")
|
||||
@ApiModelProperty(value = "运费模板ID")
|
||||
private Integer tempId;
|
||||
|
||||
@ApiModelProperty(value = "库存")
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.zbkj.common.request;
|
||||
|
||||
import com.zbkj.common.constants.Constants;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -20,7 +19,4 @@ public class SetMealRequest implements Serializable {
|
||||
@ApiModelProperty(value = "门店id")
|
||||
private String storeId;
|
||||
|
||||
@ApiModelProperty(value = "2套餐分类层")
|
||||
private Integer homeType = Constants.HOME_TYPE_2;
|
||||
|
||||
}
|
||||
|
@ -80,7 +80,6 @@ public class StoreCombinationRequest implements Serializable {
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty(value = "运费模板ID")
|
||||
@NotNull(message = "运费模板不能为空")
|
||||
private Integer tempId;
|
||||
|
||||
@ApiModelProperty(value = "购买数量")
|
||||
|
@ -86,15 +86,13 @@ public class StoreProductAddRequest implements Serializable {
|
||||
@ApiModelProperty(value = "获得积分")
|
||||
private Integer giveIntegral;
|
||||
|
||||
@ApiModelProperty(value = "是否单独分佣", required = true)
|
||||
@NotNull(message = "是否单独分佣不能为空")
|
||||
@ApiModelProperty(value = "是否单独分佣")
|
||||
private Boolean isSub;
|
||||
|
||||
@ApiModelProperty(value = "虚拟销量")
|
||||
private Integer ficti;
|
||||
|
||||
@ApiModelProperty(value = "运费模板ID", required = true)
|
||||
@NotNull(message = "运费模板不能为空")
|
||||
@ApiModelProperty(value = "运费模板ID")
|
||||
private Integer tempId;
|
||||
|
||||
@ApiModelProperty(value = "规格 0单 1多", required = true)
|
||||
|
@ -76,8 +76,7 @@ public class StoreSeckillAddRequest {
|
||||
@NotNull(message = "时间段不能为空")
|
||||
private Integer timeId;
|
||||
|
||||
@ApiModelProperty(value = "运费模板ID", required = true)
|
||||
@NotNull(message = "运费模板不能为空")
|
||||
@ApiModelProperty(value = "运费模板ID")
|
||||
private Integer tempId;
|
||||
|
||||
@ApiModelProperty(value = "商品属性", required = true)
|
||||
|
@ -1,36 +0,0 @@
|
||||
package com.zbkj.common.response;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SetMealFloorProductResponse对象")
|
||||
public class SetMealFloorProResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
@ApiModelProperty(value = "商品id")
|
||||
private Integer productId;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
@ApiModelProperty(value = "图片")
|
||||
private String imgUrl;
|
||||
/**
|
||||
* 跳转地址
|
||||
*/
|
||||
@ApiModelProperty(value = "跳转地址")
|
||||
private String directUrl;
|
||||
|
||||
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
package com.zbkj.common.response;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SetMealFloorResponse对象")
|
||||
public class SetMealFloorResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty(value = "homeId")
|
||||
private Integer homeId;
|
||||
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "跳转地址")
|
||||
private String directUrl;
|
||||
|
||||
@ApiModelProperty(value = "图片")
|
||||
private String imgUrl;
|
||||
|
||||
@ApiModelProperty(value = "跳转id")
|
||||
private String jumpIds;
|
||||
|
||||
@ApiModelProperty(value = "跳转类型")
|
||||
private String jumpType;
|
||||
|
||||
private Object homeProducts;
|
||||
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
package com.zbkj.common.vo;
|
||||
|
||||
import com.zbkj.common.vo.product.ProductAttrVo;
|
||||
import com.zbkj.common.vo.product.ProductInfoVo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -7,6 +9,8 @@ import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ -32,4 +36,13 @@ public class HomeProductVo implements Serializable {
|
||||
@ApiModelProperty(value = "跳转地址")
|
||||
private String directUrl;
|
||||
|
||||
@ApiModelProperty(value = "产品属性")
|
||||
private List<ProductAttrVo> productAttr;
|
||||
|
||||
@ApiModelProperty(value = "商品属性详情")
|
||||
private HashMap<String, Object> productValue;
|
||||
|
||||
@ApiModelProperty(value = "商品信息")
|
||||
private ProductInfoVo productInfo;
|
||||
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ public class HomeVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
private Integer id;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ -59,6 +60,6 @@ public class HomeVo implements Serializable {
|
||||
|
||||
@Transient
|
||||
@TableField(exist = false)
|
||||
private List<HomeProductVo> products;
|
||||
private Object products;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,48 @@
|
||||
package com.zbkj.common.vo.product;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 商品属性值表
|
||||
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("eb_store_product_attr_value")
|
||||
@ApiModel(value="StoreProductAttrValue对象", description="商品属性值表")
|
||||
public class ProductAttrValueVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
@ApiModelProperty(value = "ID")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "商品属性索引值 (attr_value|attr_value[|....])")
|
||||
private String suk;
|
||||
|
||||
@ApiModelProperty(value = "属性金额")
|
||||
private BigDecimal price;
|
||||
|
||||
@ApiModelProperty(value = "图片")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty(value = "原价")
|
||||
private BigDecimal otPrice;
|
||||
|
||||
@ApiModelProperty(value = "活动类型 0=商品,1=秒杀,2=砍价,3=拼团")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "attrValue字段,取表中suk字段")
|
||||
private Object attrValue;
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.zbkj.common.vo.product;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 商品属性表
|
||||
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("eb_store_product_attr")
|
||||
@ApiModel(value="StoreProductAttr对象", description="商品属性表")
|
||||
public class ProductAttrVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty(value = "attrId")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "商品ID")
|
||||
private Integer productId;
|
||||
|
||||
@ApiModelProperty(value = "属性名")
|
||||
private String attrName;
|
||||
|
||||
@ApiModelProperty(value = "属性值")
|
||||
private String attrValues;
|
||||
|
||||
@ApiModelProperty(value = "活动类型 0=商品,1=秒杀,2=砍价,3=拼团")
|
||||
private Integer type;
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.zbkj.common.vo.product;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="ProductDetailVo对象", description="商品详情Vo")
|
||||
public class ProductDetailVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty(value = "产品属性")
|
||||
private List<ProductAttrVo> productAttr;
|
||||
|
||||
@ApiModelProperty(value = "商品属性详情")
|
||||
private HashMap<String, Object> productValue;
|
||||
|
||||
@ApiModelProperty(value = "商品信息")
|
||||
private ProductInfoVo productInfo;
|
||||
|
||||
@ApiModelProperty(value = "收藏标识")
|
||||
private Boolean userCollect;
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.zbkj.common.vo.product;
|
||||
|
||||
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.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 商品表
|
||||
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("eb_store_product")
|
||||
@ApiModel(value="StoreProduct对象", description="商品表")
|
||||
public class ProductInfoVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
public ProductInfoVo() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "商品图片")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty(value = "商品名称")
|
||||
private String storeName;
|
||||
|
||||
@ApiModelProperty(value = "商品价格")
|
||||
private BigDecimal price;
|
||||
|
||||
@ApiModelProperty(value = "市场价")
|
||||
private BigDecimal otPrice;
|
||||
|
||||
@ApiModelProperty(value = "单位名")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty(value = "销量")
|
||||
private Integer sales;
|
||||
|
||||
@ApiModelProperty(value = "虚拟销量")
|
||||
private Integer ficti;
|
||||
|
||||
@ApiModelProperty(value = "浏览量")
|
||||
private Integer browse;
|
||||
|
||||
@ApiModelProperty(value = "规格 0单 1多")
|
||||
private Boolean specType;
|
||||
|
||||
@ApiModelProperty(value = "标签")
|
||||
private String tags;
|
||||
|
||||
}
|
@ -96,8 +96,8 @@ public class SwaggerConfig{
|
||||
|
||||
private ApiInfo apiInfo() {
|
||||
return new ApiInfoBuilder()
|
||||
.title("Crmeb Java")
|
||||
.description("Crmeb")
|
||||
.title("Food Front Java")
|
||||
.description("Food Front")
|
||||
.termsOfServiceUrl("http://host:port")
|
||||
.version("1.0.0").build();
|
||||
}
|
||||
|
@ -68,19 +68,21 @@ public class WebConfig implements WebMvcConfigurer {
|
||||
excludePathPatterns("/api/front/groom/list/**").
|
||||
excludePathPatterns("/api/front/config").
|
||||
excludePathPatterns("/api/front/category").
|
||||
excludePathPatterns("/api/front/category/top").
|
||||
excludePathPatterns("/api/front/seckill/*").
|
||||
excludePathPatterns("/api/front/seckill/list/*").
|
||||
excludePathPatterns("/api/front/seckill/detail/*").
|
||||
excludePathPatterns("/api/front/ios/*").
|
||||
excludePathPatterns("/api/front/ios/register/binding/phone").
|
||||
excludePathPatterns("api/front/combination/index").
|
||||
excludePathPatterns("api/front/seckill/index").
|
||||
excludePathPatterns("api/front/bargain/index").
|
||||
excludePathPatterns("api/front/combination/index").
|
||||
excludePathPatterns("api/front/index/product/*").
|
||||
excludePathPatterns("api/front/index/color/config").
|
||||
excludePathPatterns("api/front/image/domain").
|
||||
excludePathPatterns("api/front/product/leaderboard").
|
||||
excludePathPatterns("/api/front/combination/index").
|
||||
excludePathPatterns("/api/front/seckill/index").
|
||||
excludePathPatterns("/api/front/bargain/index").
|
||||
excludePathPatterns("/api/front/combination/index").
|
||||
excludePathPatterns("/api/front/index/product/*").
|
||||
excludePathPatterns("/api/front/index/color/config").
|
||||
excludePathPatterns("/api/front/image/domain").
|
||||
excludePathPatterns("/api/front/product/leaderboard").
|
||||
excludePathPatterns("/api/front/setMeal/**").
|
||||
excludePathPatterns("/swagger-resources/**", "/webjars/**", "/v2/**", "/swagger-ui.html/**");
|
||||
}
|
||||
|
||||
|
@ -7,9 +7,9 @@ import com.zbkj.common.request.SetMealFloorProRequest;
|
||||
import com.zbkj.common.request.SetMealFloorRequest;
|
||||
import com.zbkj.common.request.SetMealRequest;
|
||||
import com.zbkj.common.response.CommonResult;
|
||||
import com.zbkj.common.response.SetMealFloorProResponse;
|
||||
import com.zbkj.common.response.SetMealFloorResponse;
|
||||
import com.zbkj.common.response.SetMealResponse;
|
||||
import com.zbkj.common.vo.HomeProductVo;
|
||||
import com.zbkj.common.vo.HomeVo;
|
||||
import com.zbkj.service.service.EbHomeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@ -20,31 +20,35 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@RestController("HomeController")
|
||||
@RequestMapping("api/front")
|
||||
@Api(tags = "楼层")
|
||||
public class HomeController {
|
||||
|
||||
@Autowired
|
||||
private EbHomeService homeService;
|
||||
@Autowired private EbHomeService homeService;
|
||||
|
||||
@ApiOperation(value = "套餐导航类型列表")
|
||||
@ApiOperation(value = "套餐导航列表-分页")
|
||||
@RequestMapping(value = "/setMeal/type", method = RequestMethod.GET)
|
||||
public CommonResult<CommonPage<SetMealResponse>> selectPageSetMealType(@Validated SetMealRequest entity, @Validated PageParamRequest page) {
|
||||
return CommonResult.success(homeService.selectPageSetMealType(entity, page));
|
||||
List<SetMealResponse> list = homeService.selectPageSetMealType(entity, page);
|
||||
return CommonResult.success(CommonPage.restPage(list));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "套餐楼层")
|
||||
@ApiOperation(value = "套餐楼层列表-分页")
|
||||
@RequestMapping(value = "/setMeal/floor", method = RequestMethod.GET)
|
||||
public CommonResult<CommonPage<SetMealFloorResponse>> selectPageSetMealFloor(@Validated SetMealFloorRequest entity, @Validated PageParamRequest page) {
|
||||
return CommonResult.success(homeService.selectPageSetMealFloor(entity, page));
|
||||
public CommonResult<CommonPage<HomeVo>> selectPageSetMealFloor(@Validated SetMealFloorRequest entity, @Validated PageParamRequest page) {
|
||||
List<HomeVo> list = homeService.selectPageSetMealFloor(entity, page);
|
||||
return CommonResult.success(CommonPage.restPage(list));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "套餐楼层商品")
|
||||
@ApiOperation(value = "套餐楼层商品-分页")
|
||||
@RequestMapping(value = "/setMeal/floor/pro", method = RequestMethod.GET)
|
||||
public CommonResult<CommonPage<SetMealFloorProResponse>> selectPageSetMealFloorPro(@Validated SetMealFloorProRequest entity, @Validated PageParamRequest page) {
|
||||
return CommonResult.success(homeService.selectPageSetMealFloorPro(entity, page));
|
||||
public CommonResult<CommonPage<HomeProductVo>> selectPageSetMealFloorPro(@Validated SetMealFloorProRequest entity, @Validated PageParamRequest page) {
|
||||
List<HomeProductVo> list = homeService.selectPageSetMealFloorPro(entity, page);
|
||||
return CommonResult.success(CommonPage.restPage(list));
|
||||
}
|
||||
|
||||
|
||||
|
@ -39,24 +39,7 @@ public class IndexController {
|
||||
* 首页数据
|
||||
*/
|
||||
@RequestMapping(value = "/index", method = RequestMethod.GET)
|
||||
@ApiOperation(value="首页数据", notes="首页数据"
|
||||
+ " \n \n"
|
||||
+ "响应参数:" + " \n"
|
||||
+ "homeList:楼层" + " \n"
|
||||
+ " --> name:名称" + " \n"
|
||||
+ " --> title:标题" + " \n"
|
||||
+ " --> directUrl:列表路径\"" + " \n"
|
||||
+ " --> image:图片" + " \n"
|
||||
+ " --> jumpIds:跳转id(list_ids/product_id)" + " \n"
|
||||
+ " --> jumpType:跳转类型1,列表0,详情" + " \n"
|
||||
+ " -->--> products:商品" + " \n"
|
||||
+ " -->-->--> productId:产品id" + " \n"
|
||||
+ " -->-->--> imgUrl:图片" + " \n"
|
||||
+ " -->-->--> directUrl:跳转地址" + " \n"
|
||||
+ "logoUrl:企业logo" + " \n"
|
||||
+ "consumerHotline:客服电话" + " \n"
|
||||
+ "telephoneServiceSwitch:客服电话服务开关" + " \n"
|
||||
)
|
||||
@ApiOperation(value="首页数据", notes="首页数据")
|
||||
public CommonResult<IndexInfoResponse> getIndexInfo() {
|
||||
return CommonResult.success(indexService.getIndexInfo());
|
||||
}
|
||||
@ -66,7 +49,7 @@ public class IndexController {
|
||||
*/
|
||||
@ApiOperation(value = "首页商品列表")
|
||||
@RequestMapping(value = "/index/product/{type}", method = RequestMethod.GET)
|
||||
@ApiImplicitParam(name = "type", value = "类型 【1 精品推荐 2 热门榜单 3首发新品 4促销单品】", dataType = "int", required = true)
|
||||
@ApiImplicitParam(name = "type", value = "类型 【1精品推荐】", dataType = "int", required = true)
|
||||
public CommonResult<CommonPage<IndexProductResponse>> getProductList(@PathVariable(value = "type") Integer type, PageParamRequest pageParamRequest) {
|
||||
return CommonResult.success(indexService.findIndexProductList(type, pageParamRequest));
|
||||
}
|
||||
|
@ -41,10 +41,19 @@ public class ProductController {
|
||||
return CommonResult.success(productService.getHotProductList(pageParamRequest));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取一级分类
|
||||
*/
|
||||
@ApiOperation(value = "获取分类-一级")
|
||||
@RequestMapping(value = "/category/top", method = RequestMethod.GET)
|
||||
public CommonResult<List<CategoryTreeVo>> getCategoryTop() {
|
||||
return CommonResult.success(productService.getCategoryTop());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分类
|
||||
*/
|
||||
@ApiOperation(value = "获取分类")
|
||||
@ApiOperation(value = "获取分类-树形")
|
||||
@RequestMapping(value = "/category", method = RequestMethod.GET)
|
||||
public CommonResult<List<CategoryTreeVo>> getCategory() {
|
||||
return CommonResult.success(productService.getCategory());
|
||||
|
@ -1,34 +1,34 @@
|
||||
package com.zbkj.front.pub;
|
||||
|
||||
import com.zbkj.common.constants.Constants;
|
||||
import com.zbkj.service.service.SystemConfigService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @program: crmeb
|
||||
* @author: 大粽子
|
||||
* @create: 2021-09-23 09:18
|
||||
**/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/public/jsconfig")
|
||||
@Api(tags = "公共JS配置")
|
||||
public class GetJSConfig {
|
||||
|
||||
@Autowired
|
||||
private SystemConfigService systemConfigService;
|
||||
|
||||
@PreAuthorize("hasAuthority('public:jsconfig:getcrmebchatconfig')")
|
||||
@ApiOperation(value = "CRMEB-chat客服统计")
|
||||
@RequestMapping(value = "/getcrmebchatconfig", method = RequestMethod.GET)
|
||||
public String set(){
|
||||
return systemConfigService.getValueByKey(Constants.JS_CONFIG_CRMEB_CHAT_TONGJI);
|
||||
}
|
||||
}
|
||||
//package com.zbkj.front.pub;
|
||||
//
|
||||
//import com.zbkj.common.constants.Constants;
|
||||
//import com.zbkj.service.service.SystemConfigService;
|
||||
//import io.swagger.annotations.Api;
|
||||
//import io.swagger.annotations.ApiOperation;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.security.access.prepost.PreAuthorize;
|
||||
//import org.springframework.web.bind.annotation.RequestMapping;
|
||||
//import org.springframework.web.bind.annotation.RequestMethod;
|
||||
//import org.springframework.web.bind.annotation.RestController;
|
||||
//
|
||||
///**
|
||||
// * @program: crmeb
|
||||
// * @author: 大粽子
|
||||
// * @create: 2021-09-23 09:18
|
||||
// **/
|
||||
//@Slf4j
|
||||
//@RestController
|
||||
//@RequestMapping("api/public/jsconfig")
|
||||
//@Api(tags = "公共JS配置")
|
||||
//public class GetJSConfig {
|
||||
//
|
||||
// @Autowired
|
||||
// private SystemConfigService systemConfigService;
|
||||
//
|
||||
// @PreAuthorize("hasAuthority('public:jsconfig:getcrmebchatconfig')")
|
||||
// @ApiOperation(value = "CRMEB-chat客服统计")
|
||||
// @RequestMapping(value = "/getcrmebchatconfig", method = RequestMethod.GET)
|
||||
// public String set(){
|
||||
// return systemConfigService.getValueByKey(Constants.JS_CONFIG_CRMEB_CHAT_TONGJI);
|
||||
// }
|
||||
//}
|
||||
|
@ -1,145 +1,145 @@
|
||||
package com.zbkj.front.pub;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zbkj.common.response.CommonResult;
|
||||
import com.zbkj.common.utils.RestTemplateUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 后台管理员表 前端控制器
|
||||
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/public/wechat")
|
||||
@Api(tags = "企业微信消息推送")
|
||||
public class WeChatPushController {
|
||||
|
||||
private static String url = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=";
|
||||
|
||||
@Resource
|
||||
private RestTemplateUtil restTemplateUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 新增后台管理员表
|
||||
* @param message string message
|
||||
* @author Mr.Zhang
|
||||
* @since 2020-04-13
|
||||
*/
|
||||
@ApiOperation(value = "gitlab钩子")
|
||||
@RequestMapping(value = "/gitlab", method = RequestMethod.POST)
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name="message", value="推送消息内容"),
|
||||
@ApiImplicitParam(name="token", value="企业微信群token"),
|
||||
})
|
||||
public CommonResult<Object> gitlab(@RequestBody String message,
|
||||
@RequestParam(name = "token", required = true) String token){
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("msgtype", "text");
|
||||
|
||||
Map<String, Object> text = new HashMap<>();
|
||||
|
||||
//需要@的人
|
||||
ArrayList<Object> people = new ArrayList<>();
|
||||
people.add("@all");
|
||||
text.put("mentioned_list", people);
|
||||
|
||||
//gitlab 动作标签
|
||||
JSONObject jsonObject = JSONObject.parseObject(message);
|
||||
String action = jsonObject.getString("object_kind");
|
||||
String content;
|
||||
switch(action){
|
||||
case "push":
|
||||
content = jsonObject.getJSONArray("commits").getJSONObject(0).getJSONObject("author").getString("name") + " " +
|
||||
action + " " +
|
||||
jsonObject.getString("ref").replace("refs/heads/", "") +
|
||||
"\n 备注:\n" +
|
||||
jsonObject.getJSONArray("commits").getJSONObject(0).getString("message");
|
||||
break;
|
||||
case "tag_push":
|
||||
content = jsonObject.getString("user_name") + " " +
|
||||
action + " " +
|
||||
jsonObject.getString("ref").replace("refs/heads/", "") +
|
||||
"\n 备注:\n" +
|
||||
jsonObject.getJSONArray("commits").getJSONObject(0).getString("message");
|
||||
break;
|
||||
case "note":
|
||||
String author = "未知用户";
|
||||
if(jsonObject.containsKey("commit")){
|
||||
author = jsonObject.getJSONObject("commit").getJSONObject("author").getString("name");
|
||||
}
|
||||
|
||||
if(jsonObject.containsKey("last_commit")){
|
||||
author = jsonObject.getJSONObject("last_commit").getJSONObject("author").getString("name");
|
||||
}
|
||||
|
||||
content = author +
|
||||
" 提交代码到 " +
|
||||
jsonObject.getJSONObject("project").getString("default_branch") +
|
||||
"\n 备注:\n" +
|
||||
jsonObject.getJSONObject("object_attributes").getString("note");
|
||||
break;
|
||||
case "merge_request":
|
||||
content = jsonObject.getJSONObject("object_attributes").getJSONObject("assignee").getString("name") + " " +
|
||||
"合并代码, 从 " +
|
||||
jsonObject.getJSONObject("object_attributes").getString("source_branch") + " ---> " +
|
||||
jsonObject.getJSONObject("object_attributes").getString("target_branch") +
|
||||
"\n 备注:\n" +
|
||||
jsonObject.getJSONObject("object_attributes").getJSONObject("last_commit").getString("message");
|
||||
break;
|
||||
default:
|
||||
content = "gitlab 项目有更新";
|
||||
}
|
||||
|
||||
text.put("content", content);
|
||||
map.put("text", text);
|
||||
String result = restTemplateUtil.postMapData(url + token, map);
|
||||
return CommonResult.success(JSONObject.parseObject(result));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增后台管理员表
|
||||
* @param message string message
|
||||
* @author Mr.Zhang
|
||||
* @since 2020-04-13
|
||||
*/
|
||||
@ApiOperation(value = "消息推送")
|
||||
@RequestMapping(value = "/push", method = RequestMethod.GET)
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name="message", value="推送消息内容"),
|
||||
@ApiImplicitParam(name="token", value="企业微信群token"),
|
||||
})
|
||||
public CommonResult<Object> push(@RequestParam(name = "message") String message,
|
||||
@RequestParam(name = "token") String token){
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("msgtype", "text");
|
||||
|
||||
Map<String, Object> text = new HashMap<>();
|
||||
|
||||
//需要@的人
|
||||
ArrayList<Object> people = new ArrayList<>();
|
||||
people.add("@all");
|
||||
text.put("mentioned_list", people);
|
||||
text.put("content", message);
|
||||
map.put("text", text);
|
||||
String result = restTemplateUtil.postMapData(url + token, map);
|
||||
return CommonResult.success(JSONObject.parseObject(result));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//package com.zbkj.front.pub;
|
||||
//
|
||||
//import com.alibaba.fastjson.JSONObject;
|
||||
//import com.zbkj.common.response.CommonResult;
|
||||
//import com.zbkj.common.utils.RestTemplateUtil;
|
||||
//import io.swagger.annotations.Api;
|
||||
//import io.swagger.annotations.ApiImplicitParam;
|
||||
//import io.swagger.annotations.ApiImplicitParams;
|
||||
//import io.swagger.annotations.ApiOperation;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.springframework.web.bind.annotation.*;
|
||||
//
|
||||
//import javax.annotation.Resource;
|
||||
//import java.util.ArrayList;
|
||||
//import java.util.HashMap;
|
||||
//import java.util.Map;
|
||||
//
|
||||
//
|
||||
///**
|
||||
// * 后台管理员表 前端控制器
|
||||
//
|
||||
// */
|
||||
//@Slf4j
|
||||
//@RestController
|
||||
//@RequestMapping("api/public/wechat")
|
||||
//@Api(tags = "企业微信消息推送")
|
||||
//public class WeChatPushController {
|
||||
//
|
||||
// private static String url = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=";
|
||||
//
|
||||
// @Resource
|
||||
// private RestTemplateUtil restTemplateUtil;
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 新增后台管理员表
|
||||
// * @param message string message
|
||||
// * @author Mr.Zhang
|
||||
// * @since 2020-04-13
|
||||
// */
|
||||
// @ApiOperation(value = "gitlab钩子")
|
||||
// @RequestMapping(value = "/gitlab", method = RequestMethod.POST)
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name="message", value="推送消息内容"),
|
||||
// @ApiImplicitParam(name="token", value="企业微信群token"),
|
||||
// })
|
||||
// public CommonResult<Object> gitlab(@RequestBody String message,
|
||||
// @RequestParam(name = "token", required = true) String token){
|
||||
//
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// map.put("msgtype", "text");
|
||||
//
|
||||
// Map<String, Object> text = new HashMap<>();
|
||||
//
|
||||
// //需要@的人
|
||||
// ArrayList<Object> people = new ArrayList<>();
|
||||
// people.add("@all");
|
||||
// text.put("mentioned_list", people);
|
||||
//
|
||||
// //gitlab 动作标签
|
||||
// JSONObject jsonObject = JSONObject.parseObject(message);
|
||||
// String action = jsonObject.getString("object_kind");
|
||||
// String content;
|
||||
// switch(action){
|
||||
// case "push":
|
||||
// content = jsonObject.getJSONArray("commits").getJSONObject(0).getJSONObject("author").getString("name") + " " +
|
||||
// action + " " +
|
||||
// jsonObject.getString("ref").replace("refs/heads/", "") +
|
||||
// "\n 备注:\n" +
|
||||
// jsonObject.getJSONArray("commits").getJSONObject(0).getString("message");
|
||||
// break;
|
||||
// case "tag_push":
|
||||
// content = jsonObject.getString("user_name") + " " +
|
||||
// action + " " +
|
||||
// jsonObject.getString("ref").replace("refs/heads/", "") +
|
||||
// "\n 备注:\n" +
|
||||
// jsonObject.getJSONArray("commits").getJSONObject(0).getString("message");
|
||||
// break;
|
||||
// case "note":
|
||||
// String author = "未知用户";
|
||||
// if(jsonObject.containsKey("commit")){
|
||||
// author = jsonObject.getJSONObject("commit").getJSONObject("author").getString("name");
|
||||
// }
|
||||
//
|
||||
// if(jsonObject.containsKey("last_commit")){
|
||||
// author = jsonObject.getJSONObject("last_commit").getJSONObject("author").getString("name");
|
||||
// }
|
||||
//
|
||||
// content = author +
|
||||
// " 提交代码到 " +
|
||||
// jsonObject.getJSONObject("project").getString("default_branch") +
|
||||
// "\n 备注:\n" +
|
||||
// jsonObject.getJSONObject("object_attributes").getString("note");
|
||||
// break;
|
||||
// case "merge_request":
|
||||
// content = jsonObject.getJSONObject("object_attributes").getJSONObject("assignee").getString("name") + " " +
|
||||
// "合并代码, 从 " +
|
||||
// jsonObject.getJSONObject("object_attributes").getString("source_branch") + " ---> " +
|
||||
// jsonObject.getJSONObject("object_attributes").getString("target_branch") +
|
||||
// "\n 备注:\n" +
|
||||
// jsonObject.getJSONObject("object_attributes").getJSONObject("last_commit").getString("message");
|
||||
// break;
|
||||
// default:
|
||||
// content = "gitlab 项目有更新";
|
||||
// }
|
||||
//
|
||||
// text.put("content", content);
|
||||
// map.put("text", text);
|
||||
// String result = restTemplateUtil.postMapData(url + token, map);
|
||||
// return CommonResult.success(JSONObject.parseObject(result));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 新增后台管理员表
|
||||
// * @param message string message
|
||||
// * @author Mr.Zhang
|
||||
// * @since 2020-04-13
|
||||
// */
|
||||
// @ApiOperation(value = "消息推送")
|
||||
// @RequestMapping(value = "/push", method = RequestMethod.GET)
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name="message", value="推送消息内容"),
|
||||
// @ApiImplicitParam(name="token", value="企业微信群token"),
|
||||
// })
|
||||
// public CommonResult<Object> push(@RequestParam(name = "message") String message,
|
||||
// @RequestParam(name = "token") String token){
|
||||
//
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// map.put("msgtype", "text");
|
||||
//
|
||||
// Map<String, Object> text = new HashMap<>();
|
||||
//
|
||||
// //需要@的人
|
||||
// ArrayList<Object> people = new ArrayList<>();
|
||||
// people.add("@all");
|
||||
// text.put("mentioned_list", people);
|
||||
// text.put("content", message);
|
||||
// map.put("text", text);
|
||||
// String result = restTemplateUtil.postMapData(url + token, map);
|
||||
// return CommonResult.success(JSONObject.parseObject(result));
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//
|
||||
//
|
||||
|
@ -102,4 +102,11 @@ public interface ProductService {
|
||||
* @return
|
||||
*/
|
||||
CommonPage<IndexProductResponse> getSalesProductList(PageParamRequest pageParamRequest);
|
||||
|
||||
/**
|
||||
* 产品一级分类
|
||||
* @return
|
||||
*/
|
||||
List<CategoryTreeVo> getCategoryTop();
|
||||
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.zbkj.common.model.home.Home;
|
||||
import com.zbkj.common.page.CommonPage;
|
||||
import com.zbkj.common.response.IndexInfoResponse;
|
||||
import com.zbkj.common.response.IndexProductResponse;
|
||||
@ -19,7 +18,6 @@ import com.zbkj.common.utils.CrmebUtil;
|
||||
import com.zbkj.common.model.record.UserVisitRecord;
|
||||
import com.zbkj.common.model.product.StoreProduct;
|
||||
import com.zbkj.common.model.system.SystemConfig;
|
||||
import com.zbkj.common.model.user.User;
|
||||
import com.zbkj.front.service.IndexService;
|
||||
import com.zbkj.service.delete.ProductUtils;
|
||||
import com.zbkj.service.service.*;
|
||||
@ -66,12 +64,10 @@ public class IndexServiceImpl implements IndexService {
|
||||
@Override
|
||||
public IndexInfoResponse getIndexInfo() {
|
||||
IndexInfoResponse indexInfoResponse = new IndexInfoResponse();
|
||||
|
||||
indexInfoResponse.setHomeList(homeService.selectHomeType(Constants.HOME_TYPE_1, 0)); // 楼层
|
||||
indexInfoResponse.setHomeList(homeService.getIndexHomeList(0)); // 楼层
|
||||
indexInfoResponse.setLogoUrl(systemConfigService.getValueByKey(Constants.CONFIG_KEY_SITE_LOGO));// 企业logo地址
|
||||
indexInfoResponse.setConsumerHotline(systemConfigService.getValueByKey(Constants.CONFIG_KEY_CONSUMER_HOTLINE));// 客服电话
|
||||
indexInfoResponse.setTelephoneServiceSwitch(systemConfigService.getValueByKey(Constants.CONFIG_KEY_TELEPHONE_SERVICE_SWITCH));// 客服电话服务
|
||||
|
||||
// 保存用户访问记录
|
||||
UserVisitRecord visitRecord = new UserVisitRecord();
|
||||
visitRecord.setDate(DateUtil.date().toString("yyyy-MM-dd"));
|
||||
|
@ -4,11 +4,15 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.zbkj.common.constants.CategoryConstants;
|
||||
import com.zbkj.common.constants.Constants;
|
||||
import com.zbkj.common.constants.RedisConstatns;
|
||||
import com.zbkj.common.constants.SysConfigConstants;
|
||||
import com.zbkj.common.model.category.Category;
|
||||
import com.zbkj.common.model.express.Express;
|
||||
import com.zbkj.common.model.product.StoreProduct;
|
||||
import com.zbkj.common.model.product.StoreProductAttr;
|
||||
import com.zbkj.common.model.product.StoreProductAttrValue;
|
||||
@ -33,10 +37,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* IndexServiceImpl 接口实现
|
||||
@ -84,6 +85,17 @@ public class ProductServiceImpl implements ProductService {
|
||||
@Autowired
|
||||
private UserVisitRecordService userVisitRecordService;
|
||||
|
||||
@Override
|
||||
public List<CategoryTreeVo> getCategoryTop() {
|
||||
LambdaQueryWrapper<Category> lq = new LambdaQueryWrapper<>();
|
||||
lq.eq(Category::getType, CategoryConstants.CATEGORY_TYPE_PRODUCT);
|
||||
lq.eq(Category::getStatus, CategoryConstants.CATEGORY_STATUS_NORMAL);
|
||||
lq.eq(Category::getPid, 0);
|
||||
lq.orderByAsc(Category::getSort);
|
||||
List<Category> list = categoryService.list(lq);
|
||||
return JSON.parseArray(JSON.toJSONString(list), CategoryTreeVo.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分类
|
||||
* @return List<CategoryTreeVo>
|
||||
@ -603,7 +615,6 @@ public class ProductServiceImpl implements ProductService {
|
||||
return productResponseCommonPage;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -435,7 +435,8 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
||||
*/
|
||||
@Override
|
||||
public LoginResponse weChatAuthorizeProgramLogin(String code, RegisterThirdUserRequest request) {
|
||||
WeChatMiniAuthorizeVo response = wechatNewService.miniAuthCode(code);
|
||||
WeChatMiniAuthorizeVo response = new WeChatMiniAuthorizeVo(); //wechatNewService.miniAuthCode(code);
|
||||
response.setOpenId("123123");
|
||||
logger.info(">>>小程序登陆获取openId>>> {}" + JSON.toJSONString(response));
|
||||
|
||||
//检测是否存在
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 水月雨 相关配置
|
||||
# 相关配置
|
||||
crmeb:
|
||||
version: syy-1.0.0 # 当前代码版本
|
||||
version: front-1.0.0 # 当前代码版本
|
||||
|
||||
# 配置端口
|
||||
server:
|
||||
@ -23,7 +23,7 @@ spring:
|
||||
resources:
|
||||
static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:${crmeb.filePath}
|
||||
application:
|
||||
name: cemrb-front #这个很重要,这在以后的服务与服务之间相互调用一般都是根据这个name
|
||||
name: front-front #这个很重要,这在以后的服务与服务之间相互调用一般都是根据这个name
|
||||
jackson:
|
||||
locale: zh_CN
|
||||
time-zone: GMT+8
|
||||
@ -33,11 +33,11 @@ debug: true
|
||||
logging:
|
||||
level:
|
||||
io.swagger.*: error
|
||||
com.zbjk.crmeb: debug
|
||||
com.zbjk.front: debug
|
||||
org.springframework.boot.autoconfigure: ERROR
|
||||
config: classpath:logback-spring.xml
|
||||
file:
|
||||
path: ./crmeb_log
|
||||
path: ./front_log
|
||||
|
||||
# mybatis 配置
|
||||
mybatis-plus:
|
||||
|
@ -2,18 +2,20 @@ package com.zbkj.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zbkj.common.model.home.Home;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
import com.zbkj.common.request.SetMealFloorRequest;
|
||||
import com.zbkj.common.request.SetMealRequest;
|
||||
import com.zbkj.common.response.SetMealFloorResponse;
|
||||
import com.zbkj.common.response.SetMealResponse;
|
||||
import com.zbkj.common.vo.HomeVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface HomeDao extends BaseMapper<Home> {
|
||||
|
||||
List<SetMealResponse> selectPageSetMealType(@Param("entity") SetMealRequest entity, PageParamRequest page);
|
||||
List<SetMealResponse> selectPageSetMealType(@Param("entity") SetMealRequest entity);
|
||||
|
||||
List<HomeVo> selectPageSetMealFloor(@Param("entity") SetMealFloorRequest entity);
|
||||
|
||||
List<HomeVo> selectHomeType(@Param("homeType") Integer homeType, @Param("storeId") Integer storeId);
|
||||
|
||||
List<SetMealFloorResponse> selectPageSetMealFloor(@Param("entity") SetMealFloorRequest entity, PageParamRequest page);
|
||||
}
|
||||
|
@ -2,14 +2,12 @@ package com.zbkj.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zbkj.common.model.home.HomeProducts;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
import com.zbkj.common.response.SetMealFloorProResponse;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.zbkj.common.vo.HomeProductVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface HomeProductsDao extends BaseMapper<HomeProducts> {
|
||||
|
||||
List<SetMealFloorProResponse> selectPageFloorProduct(@Param("entity") HomeProducts qHp, PageParamRequest page);
|
||||
List<HomeProductVo> selectHomeProduct(Integer homeId);
|
||||
|
||||
}
|
||||
|
@ -2,14 +2,12 @@ package com.zbkj.service.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zbkj.common.model.home.Home;
|
||||
import com.zbkj.common.page.CommonPage;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
import com.zbkj.common.request.SetMealFloorProRequest;
|
||||
import com.zbkj.common.request.SetMealFloorRequest;
|
||||
import com.zbkj.common.request.SetMealRequest;
|
||||
import com.zbkj.common.response.SetMealFloorProResponse;
|
||||
import com.zbkj.common.response.SetMealFloorResponse;
|
||||
import com.zbkj.common.response.SetMealResponse;
|
||||
import com.zbkj.common.vo.HomeProductVo;
|
||||
import com.zbkj.common.vo.HomeVo;
|
||||
|
||||
import java.util.List;
|
||||
@ -17,13 +15,13 @@ import java.util.List;
|
||||
|
||||
public interface EbHomeService extends IService<Home> {
|
||||
|
||||
List<HomeVo> selectHomeType(Integer homeType, Integer storeId);
|
||||
List<SetMealResponse> selectPageSetMealType(SetMealRequest entity, PageParamRequest page);
|
||||
|
||||
CommonPage<SetMealResponse> selectPageSetMealType(SetMealRequest entity, PageParamRequest page);
|
||||
List<HomeVo> selectPageSetMealFloor(SetMealFloorRequest entity, PageParamRequest page);
|
||||
|
||||
CommonPage<SetMealFloorResponse> selectPageSetMealFloor(SetMealFloorRequest entity, PageParamRequest page);
|
||||
List<HomeProductVo> selectPageSetMealFloorPro(SetMealFloorProRequest entity, PageParamRequest page);
|
||||
|
||||
CommonPage<SetMealFloorProResponse> selectPageSetMealFloorPro(SetMealFloorProRequest entity, PageParamRequest page);
|
||||
List<HomeVo> getIndexHomeList(Integer storeId);
|
||||
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zbkj.common.model.product.StoreProductAttr;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* StoreProductAttrService 接口
|
||||
@ -40,4 +41,6 @@ public interface StoreProductAttrService extends IService<StoreProductAttr> {
|
||||
* @return List
|
||||
*/
|
||||
List<StoreProductAttr> getListByProductIdAndType(Integer productId, Integer type);
|
||||
|
||||
Map<Integer, List<StoreProductAttr>> getListByProductIdAndType(List<Integer> productIds, Integer type);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zbkj.common.model.product.StoreProductAttrValue;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* StoreProductAttrValueService 接口
|
||||
@ -76,4 +77,6 @@ public interface StoreProductAttrValueService extends IService<StoreProductAttrV
|
||||
* @return List
|
||||
*/
|
||||
List<StoreProductAttrValue> getListByProductIdAndType(Integer productId, Integer type);
|
||||
|
||||
Map<Integer, List<StoreProductAttrValue>> getListByProductIdAndType(List<Integer> productIds, Integer type);
|
||||
}
|
||||
|
@ -3,15 +3,18 @@ package com.zbkj.service.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zbkj.common.model.product.StoreProduct;
|
||||
import com.zbkj.common.request.*;
|
||||
import com.zbkj.common.response.ProductDetailResponse;
|
||||
import com.zbkj.common.response.StoreProductInfoResponse;
|
||||
import com.zbkj.common.response.StoreProductResponse;
|
||||
import com.zbkj.common.response.StoreProductTabsHeader;
|
||||
import com.zbkj.common.vo.MyRecord;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.zbkj.common.vo.product.ProductDetailVo;
|
||||
import org.json.JSONException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* StoreProductService 接口
|
||||
@ -19,6 +22,10 @@ import java.util.List;
|
||||
*/
|
||||
public interface StoreProductService extends IService<StoreProduct> {
|
||||
|
||||
Map<Integer, ProductDetailVo> getSkuDetails(List<Integer> productIds);
|
||||
|
||||
ProductDetailVo getSkuDetail(Integer id);
|
||||
|
||||
/**
|
||||
* 获取产品列表Admin
|
||||
* @param request 筛选参数
|
||||
|
@ -1,31 +1,28 @@
|
||||
package com.zbkj.service.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.zbkj.common.model.article.Article;
|
||||
import com.zbkj.common.model.cat.StoreCart;
|
||||
import com.zbkj.common.constants.Constants;
|
||||
import com.zbkj.common.model.home.Home;
|
||||
import com.zbkj.common.model.home.HomeProducts;
|
||||
import com.zbkj.common.page.CommonPage;
|
||||
import com.zbkj.common.request.*;
|
||||
import com.zbkj.common.response.*;
|
||||
import com.zbkj.common.utils.RedisUtil;
|
||||
import com.zbkj.common.vo.HomeProductVo;
|
||||
import com.zbkj.common.vo.HomeVo;
|
||||
import com.zbkj.common.vo.product.ProductDetailVo;
|
||||
import com.zbkj.service.dao.HomeDao;
|
||||
import com.zbkj.service.dao.HomeProductsDao;
|
||||
import com.zbkj.service.service.EbHomeService;
|
||||
import com.zbkj.service.service.StoreProductService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@Service
|
||||
@ -34,61 +31,61 @@ public class EbHomeServiceImpl extends ServiceImpl<HomeDao, Home> implements EbH
|
||||
@Autowired private RedisUtil redisUtil;
|
||||
@Autowired private HomeDao dao;
|
||||
@Autowired private HomeProductsDao homeProductsDao;
|
||||
@Autowired private StoreProductService productService;
|
||||
|
||||
@Override
|
||||
public List<HomeVo> selectHomeType(Integer homeType, Integer storeId) {
|
||||
String key = "HOME_TYPE_" + homeType + "_" + storeId;
|
||||
String value = "";
|
||||
if (redisUtil.exists(key)) {
|
||||
value = redisUtil.get(key);
|
||||
} else {
|
||||
LambdaQueryWrapper<Home> qHome = new LambdaQueryWrapper<>();
|
||||
qHome.eq(Home::getDelFlag, 1);
|
||||
qHome.eq(Home::getType, homeType);
|
||||
qHome.orderByDesc(Home::getOrderNo);
|
||||
List<Home> hList = dao.selectList(qHome);
|
||||
for (Home home : hList) {
|
||||
LambdaQueryWrapper<HomeProducts> qHomePro = new LambdaQueryWrapper<>();
|
||||
qHomePro.eq(HomeProducts::getHomeId, home.getId());
|
||||
qHomePro.eq(HomeProducts::getDelFlag, 1);
|
||||
qHomePro.orderByDesc(HomeProducts::getOrderNo);
|
||||
List<HomeProducts> products = homeProductsDao.selectList(qHomePro);
|
||||
home.setProducts(products);
|
||||
}
|
||||
value = JSONObject.toJSONString(hList);
|
||||
redisUtil.set(key, value);
|
||||
public List<HomeVo> getIndexHomeList(Integer storeId) {
|
||||
List<HomeVo> homeVos = dao.selectHomeType(Constants.HOME_TYPE_1, storeId);
|
||||
for (HomeVo homeVo : homeVos) {
|
||||
// 默认展示99个
|
||||
PageParamRequest fpPage = new PageParamRequest();
|
||||
fpPage.setPage(1);
|
||||
fpPage.setLimit(99);
|
||||
SetMealFloorProRequest fp = new SetMealFloorProRequest();
|
||||
fp.setHomeId(homeVo.getId().toString());
|
||||
List<HomeProductVo> fpResult = selectPageSetMealFloorPro(fp, fpPage);
|
||||
homeVo.setProducts(fpResult);
|
||||
}
|
||||
return JSONArray.parseArray(value, HomeVo.class);
|
||||
return homeVos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonPage<SetMealResponse> selectPageSetMealType(SetMealRequest entity, PageParamRequest page) {
|
||||
List<SetMealResponse> list = dao.selectPageSetMealType(entity, page);
|
||||
return CommonPage.restPage(list);
|
||||
public List<SetMealResponse> selectPageSetMealType(SetMealRequest entity, PageParamRequest page) {
|
||||
PageHelper.startPage(page.getPage(), page.getLimit());
|
||||
return dao.selectPageSetMealType(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonPage<SetMealFloorResponse> selectPageSetMealFloor(SetMealFloorRequest entity, PageParamRequest page) {
|
||||
List<SetMealFloorResponse> list = dao.selectPageSetMealFloor(entity, page);
|
||||
for (SetMealFloorResponse res : list) {
|
||||
public List<HomeVo> selectPageSetMealFloor(SetMealFloorRequest entity, PageParamRequest page) {
|
||||
PageHelper.startPage(page.getPage(), page.getLimit());
|
||||
List<HomeVo> list = dao.selectPageSetMealFloor(entity);
|
||||
PageHelper.clearPage();
|
||||
for (HomeVo home : list) {
|
||||
// 默认展示6个
|
||||
PageParamRequest pPage = new PageParamRequest();
|
||||
pPage.setPage(1);
|
||||
pPage.setLimit(6);
|
||||
HomeProducts qHp = new HomeProducts();
|
||||
qHp.setHomeId(res.getHomeId());
|
||||
List<SetMealFloorProResponse> pList = homeProductsDao.selectPageFloorProduct(qHp, pPage);
|
||||
res.setHomeProducts(CommonPage.restPage(pList));
|
||||
PageParamRequest fpPage = new PageParamRequest();
|
||||
fpPage.setPage(1);
|
||||
fpPage.setLimit(6);
|
||||
SetMealFloorProRequest fp = new SetMealFloorProRequest();
|
||||
fp.setHomeId(home.getId().toString());
|
||||
List<HomeProductVo> fpResult = selectPageSetMealFloorPro(fp, fpPage);
|
||||
home.setProducts(CommonPage.restPage(fpResult));
|
||||
}
|
||||
return CommonPage.restPage(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonPage<SetMealFloorProResponse> selectPageSetMealFloorPro(SetMealFloorProRequest entity, PageParamRequest page) {
|
||||
HomeProducts qHp = new HomeProducts();
|
||||
qHp.setHomeId(Integer.parseInt(entity.getHomeId()));
|
||||
List<SetMealFloorProResponse> list = homeProductsDao.selectPageFloorProduct(qHp, page);
|
||||
return CommonPage.restPage(list);
|
||||
public List<HomeProductVo> selectPageSetMealFloorPro(SetMealFloorProRequest entity, PageParamRequest page) {
|
||||
PageHelper.startPage(page.getPage(), page.getLimit());
|
||||
List<HomeProductVo> list = homeProductsDao.selectHomeProduct(Integer.parseInt(entity.getHomeId()));
|
||||
PageHelper.clearPage();
|
||||
Map<Integer, ProductDetailVo> skuDetails = productService.getSkuDetails(list.stream().map(HomeProductVo::getProductId).collect(Collectors.toList()));
|
||||
for (HomeProductVo product : list) {
|
||||
ProductDetailVo skuDetail = skuDetails.get(product.getProductId());
|
||||
product.setProductValue(skuDetail.getProductValue());
|
||||
product.setProductAttr(skuDetail.getProductAttr());
|
||||
product.setProductInfo(skuDetail.getProductInfo());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -12,6 +12,8 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* StoreProductAttrServiceImpl 接口实现
|
||||
@ -84,5 +86,15 @@ public class StoreProductAttrServiceImpl extends ServiceImpl<StoreProductAttrDao
|
||||
lqw.eq(StoreProductAttr::getIsDel, false);
|
||||
return dao.selectList(lqw);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, List<StoreProductAttr>> getListByProductIdAndType(List<Integer> productIds, Integer type) {
|
||||
LambdaQueryWrapper<StoreProductAttr> lqw = Wrappers.lambdaQuery();
|
||||
lqw.in(StoreProductAttr::getProductId, productIds);
|
||||
lqw.eq(StoreProductAttr::getType, type);
|
||||
lqw.eq(StoreProductAttr::getIsDel, false);
|
||||
List<StoreProductAttr> list = dao.selectList(lqw);
|
||||
return list.stream().collect(Collectors.groupingBy(StoreProductAttr::getProductId));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,8 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* StoreProductAttrValueServiceImpl 接口实现
|
||||
@ -177,5 +179,15 @@ public class StoreProductAttrValueServiceImpl extends ServiceImpl<StoreProductAt
|
||||
lqw.eq(StoreProductAttrValue::getIsDel, false);
|
||||
return dao.selectList(lqw);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, List<StoreProductAttrValue>> getListByProductIdAndType(List<Integer> productIds, Integer type) {
|
||||
LambdaQueryWrapper<StoreProductAttrValue> lqw = Wrappers.lambdaQuery();
|
||||
lqw.in(StoreProductAttrValue::getProductId, productIds);
|
||||
lqw.eq(StoreProductAttrValue::getType, type);
|
||||
lqw.eq(StoreProductAttrValue::getIsDel, false);
|
||||
List<StoreProductAttrValue> list = dao.selectList(lqw);
|
||||
return list.stream().collect(Collectors.groupingBy(StoreProductAttrValue::getProductId));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,10 @@ import com.zbkj.common.vo.MyRecord;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.zbkj.common.vo.product.ProductAttrValueVo;
|
||||
import com.zbkj.common.vo.product.ProductAttrVo;
|
||||
import com.zbkj.common.vo.product.ProductDetailVo;
|
||||
import com.zbkj.common.vo.product.ProductInfoVo;
|
||||
import com.zbkj.service.dao.StoreProductDao;
|
||||
import com.zbkj.service.delete.ProductUtils;
|
||||
import com.zbkj.service.service.*;
|
||||
@ -108,6 +112,56 @@ public class StoreProductServiceImpl extends ServiceImpl<StoreProductDao, StoreP
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(StoreProductServiceImpl.class);
|
||||
|
||||
@Override
|
||||
public Map<Integer, ProductDetailVo> getSkuDetails(List<Integer> productIds) {
|
||||
Map<Integer, ProductDetailVo> result = new HashMap<>();
|
||||
Map<Integer, StoreProduct> productMap = getH5Detail(productIds);
|
||||
Map<Integer, List<StoreProductAttr>> attrMap = attrService.getListByProductIdAndType(productIds, Constants.PRODUCT_TYPE_NORMAL);
|
||||
Map<Integer, List<StoreProductAttrValue>> attrValueMap = storeProductAttrValueService.getListByProductIdAndType(productIds, Constants.PRODUCT_TYPE_NORMAL);
|
||||
for (Integer productId : productIds) {
|
||||
ProductDetailVo detailVo = new ProductDetailVo();
|
||||
List<StoreProductAttrValue> storeProductAttrValues = attrValueMap.get(productId);
|
||||
detailVo.setProductInfo(JSON.parseObject(JSON.toJSONString(productMap.get(productId)), ProductInfoVo.class));
|
||||
detailVo.setProductAttr(JSON.parseArray(JSON.toJSONString(attrMap.get(productId)), ProductAttrVo.class));
|
||||
HashMap<String, Object> skuMap = CollUtil.newHashMap();
|
||||
for (StoreProductAttrValue storeProductAttrValue : storeProductAttrValues) {
|
||||
ProductAttrValueVo atr = new ProductAttrValueVo();
|
||||
BeanUtils.copyProperties(storeProductAttrValue, atr);
|
||||
skuMap.put(atr.getSuk(), atr);
|
||||
}
|
||||
detailVo.setProductValue(skuMap);
|
||||
result.put(productId, detailVo);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品SKU详情
|
||||
* @param id 商品编号
|
||||
* @return 商品详情信息
|
||||
*/
|
||||
@Override
|
||||
public ProductDetailVo getSkuDetail(Integer id) {
|
||||
ProductDetailVo detailVo = new ProductDetailVo();
|
||||
// 查询商品
|
||||
StoreProduct storeProduct = this.getH5Detail(id);
|
||||
// 获取商品规格
|
||||
List<StoreProductAttr> attrList = attrService.getListByProductIdAndType(storeProduct.getId(), Constants.PRODUCT_TYPE_NORMAL);
|
||||
// 根据制式设置attr属性
|
||||
detailVo.setProductAttr(JSON.parseArray(JSON.toJSONString(attrList), ProductAttrVo.class));
|
||||
// 根据制式设置sku属性
|
||||
HashMap<String, Object> skuMap = CollUtil.newHashMap();
|
||||
List<StoreProductAttrValue> storeProductAttrValues = storeProductAttrValueService.getListByProductIdAndType(storeProduct.getId(), Constants.PRODUCT_TYPE_NORMAL);
|
||||
for (StoreProductAttrValue storeProductAttrValue : storeProductAttrValues) {
|
||||
ProductAttrValueVo atr = new ProductAttrValueVo();
|
||||
BeanUtils.copyProperties(storeProductAttrValue, atr);
|
||||
skuMap.put(atr.getSuk(), atr);
|
||||
}
|
||||
detailVo.setProductValue(skuMap);
|
||||
detailVo.setProductInfo(JSON.parseObject(JSON.toJSONString(storeProduct), ProductInfoVo.class));
|
||||
return detailVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取产品列表Admin
|
||||
* @param request 筛选参数
|
||||
@ -1203,6 +1257,19 @@ public class StoreProductServiceImpl extends ServiceImpl<StoreProductDao, StoreP
|
||||
return dao.selectList(lqw);
|
||||
}
|
||||
|
||||
private Map<Integer, StoreProduct> getH5Detail(List<Integer> productIds) {
|
||||
LambdaQueryWrapper<StoreProduct> lqw = Wrappers.lambdaQuery();
|
||||
lqw.select(StoreProduct::getId, StoreProduct::getImage, StoreProduct::getStoreName, StoreProduct::getSliderImage,
|
||||
StoreProduct::getOtPrice, StoreProduct::getStock, StoreProduct::getSales, StoreProduct::getPrice, StoreProduct::getActivity,
|
||||
StoreProduct::getFicti, StoreProduct::getIsSub, StoreProduct::getStoreInfo, StoreProduct::getBrowse, StoreProduct::getUnitName, StoreProduct::getTags, StoreProduct::getSpecType);
|
||||
lqw.in(StoreProduct::getId, productIds);
|
||||
lqw.eq(StoreProduct::getIsRecycle, false);
|
||||
lqw.eq(StoreProduct::getIsDel, false);
|
||||
lqw.eq(StoreProduct::getIsShow, true);
|
||||
List<StoreProduct> list = dao.selectList(lqw);
|
||||
return list.stream().collect(Collectors.toMap(StoreProduct::getId, value -> value));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取移动端商品详情
|
||||
* @param id 商品id
|
||||
@ -1213,7 +1280,7 @@ public class StoreProductServiceImpl extends ServiceImpl<StoreProductDao, StoreP
|
||||
LambdaQueryWrapper<StoreProduct> lqw = Wrappers.lambdaQuery();
|
||||
lqw.select(StoreProduct::getId, StoreProduct::getImage, StoreProduct::getStoreName, StoreProduct::getSliderImage,
|
||||
StoreProduct::getOtPrice, StoreProduct::getStock, StoreProduct::getSales, StoreProduct::getPrice, StoreProduct::getActivity,
|
||||
StoreProduct::getFicti, StoreProduct::getIsSub, StoreProduct::getStoreInfo, StoreProduct::getBrowse, StoreProduct::getUnitName, StoreProduct::getTags);
|
||||
StoreProduct::getFicti, StoreProduct::getIsSub, StoreProduct::getStoreInfo, StoreProduct::getBrowse, StoreProduct::getUnitName, StoreProduct::getTags, StoreProduct::getSpecType);
|
||||
lqw.eq(StoreProduct::getId, id);
|
||||
lqw.eq(StoreProduct::getIsRecycle, false);
|
||||
lqw.eq(StoreProduct::getIsDel, false);
|
||||
|
@ -2,6 +2,12 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zbkj.service.dao.HomeDao">
|
||||
|
||||
<select id="selectHomeType" resultType="com.zbkj.common.vo.HomeVo">
|
||||
select id, name, title, direct_url directUrl, img_url imgUrl, jump_ids jumpIds, jump_type jumpType
|
||||
from eb_home
|
||||
where del_flag = 1 and type = #{homeType} order by order_no
|
||||
</select>
|
||||
|
||||
<select id="selectPageSetMealType" resultType="com.zbkj.common.response.SetMealResponse">
|
||||
select t.id cid, t.name from (
|
||||
select c.id, c.name, c.sort from eb_home h
|
||||
@ -12,10 +18,10 @@
|
||||
) t order by t.sort
|
||||
</select>
|
||||
|
||||
<select id="selectPageSetMealFloor" resultType="com.zbkj.common.response.SetMealFloorResponse">
|
||||
<select id="selectPageSetMealFloor" resultType="com.zbkj.common.vo.HomeVo">
|
||||
select h.id, h.name, h.title, h.direct_url directUrl, h.img_url imgUrl, h.jump_ids jumpIds, h.jump_type jumpType
|
||||
from eb_home h
|
||||
where h.del_flag = 1 and h.type = 2 and h.business = 1 order by h.order_no
|
||||
where h.del_flag = 1 and h.type = 2 and h.business = #{entity.cid} order by h.order_no
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
@ -2,8 +2,8 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zbkj.service.dao.HomeProductsDao">
|
||||
|
||||
<select id="selectPageFloorProduct" resultType="com.zbkj.common.response.SetMealFloorProResponse">
|
||||
select product_id productId, img_url imgUrl, direct_url directUrl from eb_home_products where home_id = #{entity.homeId} and del_flag = 1 order by order_no
|
||||
<select id="selectHomeProduct" resultType="com.zbkj.common.vo.HomeProductVo">
|
||||
select product_id productId, img_url imgUrl, direct_url directUrl from eb_home_products where home_id = #{id} and del_flag = 1 order by order_no
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user