Commit dc20da94 authored by machengbo's avatar machengbo

Merge branch 'dm_dev' of http://gitlab.ioubuy.cn/yaobenzhang/dm_project into dm_dev

parents b2a118bf 052851e7
alter table t_data_goods add use_person varchar(64) DEFAULT '0' COMMENT '使用人数';
\ No newline at end of file
...@@ -47,14 +47,13 @@ public class LoginController { ...@@ -47,14 +47,13 @@ public class LoginController {
*/ */
@PostMapping(value = "/login") @PostMapping(value = "/login")
@ApiOperation(value = "登录功能", notes = "登录功能") @ApiOperation(value = "登录功能", notes = "登录功能")
public Result<MallCustomer> login(String username, String password, HttpServletRequest request) throws Exception { public Result<CustomerDto> login(String username, String password, HttpServletRequest request) throws Exception {
// 手机 // 手机
String ph = "^[1][34578]\\d{9}$"; String ph = "^[1][34578]\\d{9}$";
// 如果是手机验证 // 如果是手机验证
if (username.matches(username)) { if (username.matches(ph)) {
CustomerDto mallCustomer = mallCustomerService.selectByPhone(username, request); CustomerDto mallCustomer = mallCustomerService.selectByPhone(username, request);
MallCustomerApiDto mallCustomerApiDto = (MallCustomerApiDto) request.getSession().getAttribute("mallCustomer"); request.getSession().getAttribute("mallCustomer");
System.out.print(mallCustomerApiDto.getAssetsId());
if (mallCustomer != null) { if (mallCustomer != null) {
if (mallCustomer.getCustomerPhone().equals(username) && mallCustomer.getPassword().equals(password)) { if (mallCustomer.getCustomerPhone().equals(username) && mallCustomer.getPassword().equals(password)) {
return new Result<>(true, "登录成功!", StatusCode.OK); return new Result<>(true, "登录成功!", StatusCode.OK);
...@@ -62,7 +61,7 @@ public class LoginController { ...@@ -62,7 +61,7 @@ public class LoginController {
return new Result<>(false, "用户名或密码错误!", StatusCode.ERROR); return new Result<>(false, "用户名或密码错误!", StatusCode.ERROR);
} }
} }
MallCustomer mallCustomer = mallCustomerService.selectByAccount(username, request); CustomerDto mallCustomer = mallCustomerService.selectByAccount(username, request);
if (mallCustomer != null) { if (mallCustomer != null) {
if (mallCustomer.getCustomerAccount().equals(username) && mallCustomer.getPassword().equals(password)) { if (mallCustomer.getCustomerAccount().equals(username) && mallCustomer.getPassword().equals(password)) {
return new Result<>(true, "登录成功!", StatusCode.OK); return new Result<>(true, "登录成功!", StatusCode.OK);
...@@ -139,7 +138,7 @@ public class LoginController { ...@@ -139,7 +138,7 @@ public class LoginController {
} }
} }
// 根据手机号查询用户信息 // 根据手机号查询用户信息
MallCustomer mallCustomer = mallCustomerService.selectByAccount(username, request); CustomerDto mallCustomer = mallCustomerService.selectByAccount(username, request);
if (mallCustomer != null) { if (mallCustomer != null) {
if (mallCustomer.getCustomerAccount().equals(username)) { if (mallCustomer.getCustomerAccount().equals(username)) {
return new Result(false, "用户名相同!"); return new Result(false, "用户名相同!");
......
...@@ -7,6 +7,7 @@ import com.jz.common.constant.RedisMessageConstant; ...@@ -7,6 +7,7 @@ import com.jz.common.constant.RedisMessageConstant;
import com.jz.common.constant.ResultCode; import com.jz.common.constant.ResultCode;
import com.jz.common.constant.ResultMsg; import com.jz.common.constant.ResultMsg;
import com.jz.common.utils.SessionUtils; import com.jz.common.utils.SessionUtils;
import com.jz.dm.mall.moduls.controller.customer.bean.CustomerDto;
import com.jz.dm.mall.moduls.entity.MallCustomer; import com.jz.dm.mall.moduls.entity.MallCustomer;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.common.utils.StatusCode; import com.jz.common.utils.StatusCode;
...@@ -63,7 +64,7 @@ public class MallCustomerController extends BaseController { ...@@ -63,7 +64,7 @@ public class MallCustomerController extends BaseController {
} }
} }
// 根据手机号查询用户信息 // 根据手机号查询用户信息
MallCustomer mallCustomer = mallCustomerService.selectByAccount(username, request); CustomerDto mallCustomer = mallCustomerService.selectByAccount(username, request);
if (mallCustomer != null) { if (mallCustomer != null) {
if (mallCustomer.getCustomerAccount().equals(username)) { if (mallCustomer.getCustomerAccount().equals(username)) {
return new Result(false, "用户名相同"); return new Result(false, "用户名相同");
......
...@@ -41,8 +41,7 @@ public class DataGoodsApiController extends BaseController { ...@@ -41,8 +41,7 @@ public class DataGoodsApiController extends BaseController {
@ApiOperation(value = "点击商品查看商品详情", notes = "api商品") @ApiOperation(value = "点击商品查看商品详情", notes = "api商品")
public Result<DataGoodsApiDto> findById(@PathVariable(value = "id") String id) { public Result<DataGoodsApiDto> findById(@PathVariable(value = "id") String id) {
if (id != null) { if (id != null) {
Long key = Long.valueOf(id); DataGoodsApiDto dataGoodsApi = tDataGoodsApiService.selectById(Long.valueOf(id));
DataGoodsApiDto dataGoodsApi = tDataGoodsApiService.selectById(key);
return new Result<DataGoodsApiDto>(true, "查询商品详情成功!", StatusCode.OK, dataGoodsApi); return new Result<DataGoodsApiDto>(true, "查询商品详情成功!", StatusCode.OK, dataGoodsApi);
} }
return new Result<>(false, "查询商品详情失败!"); return new Result<>(false, "查询商品详情失败!");
......
...@@ -5,8 +5,9 @@ import com.jz.common.bean.BaseBeanResponse; ...@@ -5,8 +5,9 @@ import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.bean.BaseResponse; import com.jz.common.bean.BaseResponse;
import com.jz.common.bean.PageInfoResponse; import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.Constants; import com.jz.common.constant.Constants;
import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsDto; import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsDto;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsListDto;
import com.jz.dm.mall.moduls.controller.goods.bean.request.DataGoodsListRequest;
import com.jz.dm.mall.moduls.controller.goods.bean.request.DataGoodsRequest; import com.jz.dm.mall.moduls.controller.goods.bean.request.DataGoodsRequest;
import com.jz.dm.mall.moduls.entity.DataGoods; import com.jz.dm.mall.moduls.entity.DataGoods;
import com.jz.dm.mall.moduls.service.DataGoodsService; import com.jz.dm.mall.moduls.service.DataGoodsService;
...@@ -15,7 +16,6 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -15,7 +16,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.List;
/** /**
...@@ -33,21 +33,23 @@ public class DataGoodsController extends BaseController { ...@@ -33,21 +33,23 @@ public class DataGoodsController extends BaseController {
@Autowired @Autowired
private DataGoodsService dataGoodsService; private DataGoodsService dataGoodsService;
/**列表查询数据商品 /**
* @param dataGoodsRequest * 列表查询商品数据
* @param dataGoodsListRequest
* @param httpRequest
* @return * @return
*/ */
@PostMapping(value = "/findList") @PostMapping(value = "/findList")
public PageInfoResponse<DataGoodsDto> findList(@RequestBody DataGoodsRequest dataGoodsRequest, HttpServletRequest httpRequest){ @ApiOperation(value = "分页展示商品列表", notes = "首页点击分类展示商品列表")
PageInfoResponse<DataGoodsDto> pageInfo = new PageInfoResponse<DataGoodsDto>(); public PageInfoResponse<DataGoodsListDto> findByCategory(@RequestBody DataGoodsListRequest dataGoodsListRequest, HttpServletRequest httpRequest) {
PageInfoResponse<DataGoodsListDto> pageInfo = new PageInfoResponse<DataGoodsListDto>();
try { try {
pageInfo = dataGoodsService.findList(dataGoodsRequest, httpRequest); pageInfo = dataGoodsService.findList(dataGoodsListRequest, httpRequest);
} catch (Exception e) { } catch (Exception e) {
pageInfo.setMessage("查询失败"); pageInfo.setMessage("查询失败");
pageInfo.setCode(Constants.FAILURE_CODE); pageInfo.setCode(Constants.FAILURE_CODE);
e.printStackTrace(); e.printStackTrace();
} }
return pageInfo; return pageInfo;
} }
......
package com.jz.dm.mall.moduls.controller.goods;
import com.jz.common.base.BaseController;
import com.jz.common.utils.Result;
import com.jz.common.utils.StatusCode;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.MallHotRecommendGoodsDto;
import com.jz.dm.mall.moduls.service.MallHotRecommendGoodsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 热门推荐商品(TMallHotRecommendGoods)表控制层
*
* @author Bellamy
* @since 2020-12-01 10:41:40
*/
@RestController
@RequestMapping("mallHotRecommendGoods")
@Api(tags = "热门商品api")
public class MallHotRecommendGoodsController extends BaseController {
/**
* 服务对象
*/
@Autowired
private MallHotRecommendGoodsService tMallHotRecommendGoodsService;
@GetMapping(value = "/popularApi")
@ApiOperation(value = "热门商品api", notes = "热门商品api展示")
public Result<List<MallHotRecommendGoodsDto>> popularApi() {
List<MallHotRecommendGoodsDto> popularApiList = tMallHotRecommendGoodsService.selectByPopularApi();
return new Result<>(true, "查询热门api成功", StatusCode.OK, popularApiList);
}
}
\ No newline at end of file
...@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; ...@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date; import java.util.Date;
/** /**
...@@ -13,7 +14,7 @@ import java.util.Date; ...@@ -13,7 +14,7 @@ import java.util.Date;
* @Version: * @Version:
*/ */
@ApiModel(value = "商品详情--商品详情参数对象", description = "商品详情参数对象") @ApiModel(value = "商品详情--商品详情参数对象", description = "商品详情参数对象")
public class DataGoodsApiDto{ public class DataGoodsApiDto implements Serializable {
/** /**
* api商品id * api商品id
......
package com.jz.dm.mall.moduls.controller.goods.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
/**
* @ClassName: 商品列表返回对象
* @Author: Carl
* @Date: 2020/12/9
* @Version:
*/
@ApiModel(value = "商品列表", description = "商品列表参数对象")
public class DataGoodsListDto {
/**
* 数据商品id
*/
@ApiModelProperty(value = "数据商品id")
private Long dataGoodsId;
/**
* 商品分类id
*/
@ApiModelProperty(value = "商品分类id")
private Long categoryId;
/**
* 数据商品名称
*/
@ApiModelProperty(value = "数据商品名称")
private String dataName;
/**
* 分类名称
*/
@ApiModelProperty(value = "分类名称")
private String categoryName;
/**
* 数据类型
*/
@ApiModelProperty(value = "数据类型:01api,02数据包")
private String dataType;
/**
* 数据商品标签
*/
@ApiModelProperty(value = "数据商品标签")
private String dataLabel;
/**
* 数据商品图片
*/
@ApiModelProperty(value = "数据商品图片")
private String dataPicture;
/**
* 数据商品价格
*/
@ApiModelProperty(value = "数据商品价格")
private String dataPrice;
/**
* 价格类型
*/
@ApiModelProperty(value = "价格类型")
private String priceType;
/**
* 年(元)
*/
@ApiModelProperty(value = "年(元)")
private BigDecimal yearType;
/**
* 季(元)
*/
@ApiModelProperty(value = "季(元)")
private BigDecimal seasonType;
/**
* 月(元)
*/
@ApiModelProperty(value = "月(元)")
private BigDecimal monthType;
/**
* 次(元)
*/
@ApiModelProperty(value = "次(元)")
private BigDecimal secondType;
public Long getDataGoodsId() {
return dataGoodsId;
}
public void setDataGoodsId(Long dataGoodsId) {
this.dataGoodsId = dataGoodsId;
}
public Long getCategoryId() {
return categoryId;
}
public void setCategoryId(Long categoryId) {
this.categoryId = categoryId;
}
public String getDataName() {
return dataName;
}
public void setDataName(String dataName) {
this.dataName = dataName;
}
public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public String getDataLabel() {
return dataLabel;
}
public void setDataLabel(String dataLabel) {
this.dataLabel = dataLabel;
}
public String getDataPicture() {
return dataPicture;
}
public void setDataPicture(String dataPicture) {
this.dataPicture = dataPicture;
}
public String getDataPrice() {
return dataPrice;
}
public void setDataPrice(String dataPrice) {
this.dataPrice = dataPrice;
}
public String getPriceType() {
return priceType;
}
public void setPriceType(String priceType) {
this.priceType = priceType;
}
public BigDecimal getYearType() {
return yearType;
}
public void setYearType(BigDecimal yearType) {
this.yearType = yearType;
}
public BigDecimal getSeasonType() {
return seasonType;
}
public void setSeasonType(BigDecimal seasonType) {
this.seasonType = seasonType;
}
public BigDecimal getMonthType() {
return monthType;
}
public void setMonthType(BigDecimal monthType) {
this.monthType = monthType;
}
public BigDecimal getSecondType() {
return secondType;
}
public void setSecondType(BigDecimal secondType) {
this.secondType = secondType;
}
}
package com.jz.dm.mall.moduls.controller.goods.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2020/12/9
* @Version:
*/
@ApiModel("热门商品api")
public class MallHotRecommendGoodsDto implements Serializable {
@ApiModelProperty(value = "数据商品id")
private Long dataGoodsId;
@ApiModelProperty(value = "数据商品名称")
private String dataName;
@ApiModelProperty(value = "数据商品类型")
private String dataType;
@ApiModelProperty(value = "数据商品标签")
private String dataLabel;
@ApiModelProperty(value = "数据商品图片")
private String dataPicture;
@ApiModelProperty(value = "数据商品价格")
private String dataPrice;
@ApiModelProperty(value = "优惠价格")
private String discountPrice;
@ApiModelProperty(value = "用户使用人数")
private Long usePerson;
public Long getDataGoodsId() {
return dataGoodsId;
}
public void setDataGoodsId(Long dataGoodsId) {
this.dataGoodsId = dataGoodsId;
}
public String getDataName() {
return dataName;
}
public void setDataName(String dataName) {
this.dataName = dataName;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public String getDataLabel() {
return dataLabel;
}
public void setDataLabel(String dataLabel) {
this.dataLabel = dataLabel;
}
public String getDataPicture() {
return dataPicture;
}
public void setDataPicture(String dataPicture) {
this.dataPicture = dataPicture;
}
public String getDataPrice() {
return dataPrice;
}
public void setDataPrice(String dataPrice) {
this.dataPrice = dataPrice;
}
public String getDiscountPrice() {
return discountPrice;
}
public void setDiscountPrice(String discountPrice) {
this.discountPrice = discountPrice;
}
public Long getUsePerson() {
return usePerson;
}
public void setUsePerson(Long usePerson) {
this.usePerson = usePerson;
}
}
package com.jz.dm.mall.moduls.controller.goods.bean.request;
import com.jz.common.bean.BasePageBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
* @ClassName:
* @Author: Carl
* @Date: 2020/12/9
* @Version:
*/
@ApiModel(value = "数据集市--数据商品列表参数对象", description = "数据商品列表参数对象")
public class DataGoodsListRequest extends BasePageBean {
/**
* 商品分类id
*/
@ApiModelProperty(value = "商品分类id")
private Long categoryId;
/**
* 价格类型
*/
@ApiModelProperty(value = "价格类型")
private String priceType;
/**
* 综合排序
*/
@ApiModelProperty(value = "综合排序")
private String synthesizeRank;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
private Date uptTime;
/**
* 数据商品名称
*/
@ApiModelProperty(value = "数据商品名称")
private String dataName;
/**
* 使用人数
*/
@ApiModelProperty(value = "使用人数")
private Long usePerson;
/**
* 数据类型
*/
@ApiModelProperty(value = "数据类型:01api,02数据包")
private String dataType;
public Long getUsePerson() {
return usePerson;
}
public void setUsePerson(Long usePerson) {
this.usePerson = usePerson;
}
public Long getCategoryId() {
return categoryId;
}
public void setCategoryId(Long categoryId) {
this.categoryId = categoryId;
}
public String getPriceType() {
return priceType;
}
public void setPriceType(String priceType) {
this.priceType = priceType;
}
public String getSynthesizeRank() {
return synthesizeRank;
}
public void setSynthesizeRank(String synthesizeRank) {
this.synthesizeRank = synthesizeRank;
}
public Date getUptTime() {
return uptTime;
}
public void setUptTime(Date uptTime) {
this.uptTime = uptTime;
}
public String getDataName() {
return dataName;
}
public void setDataName(String dataName) {
this.dataName = dataName;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
}
package com.jz.dm.mall.moduls.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.util.Date;
/**
* 热门推荐商品(TMallHotRecommendGoods)实体类
*
* @author Bellamy
* @since 2020-12-01 10:41:40
*/
@TableName("t_mall_hot_recommend_goods")
@ApiModel
public class MallHotRecommendGoods implements Serializable {
private static final long serialVersionUID = -35734333969077853L;
/**
* 热门推荐商品id
*/
private Long hotRecommendGoods;
/**
* 数据id
*/
private Long dataGoodsId;
/**
* 用户id
*/
private Long customerId;
/**
* 删除标识:Y是,N否
*/
private String delFlag;
/**
* 创建时间
*/
private Date creTime;
public Long getHotRecommendGoods() {
return hotRecommendGoods;
}
public void setHotRecommendGoods(Long hotRecommendGoods) {
this.hotRecommendGoods = hotRecommendGoods;
}
public Long getDataGoodsId() {
return dataGoodsId;
}
public void setDataGoodsId(Long dataGoodsId) {
this.dataGoodsId = dataGoodsId;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public Date getCreTime() {
return creTime;
}
public void setCreTime(Date creTime) {
this.creTime = creTime;
}
}
\ No newline at end of file
...@@ -6,6 +6,7 @@ import java.util.Map; ...@@ -6,6 +6,7 @@ import java.util.Map;
import com.jz.common.base.BaseMapper; import com.jz.common.base.BaseMapper;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsDto; import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsDto;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsListDto;
import com.jz.dm.mall.moduls.entity.DataGoods; import com.jz.dm.mall.moduls.entity.DataGoods;
...@@ -57,7 +58,7 @@ public interface DataGoodsDao extends BaseMapper<DataGoods> { ...@@ -57,7 +58,7 @@ public interface DataGoodsDao extends BaseMapper<DataGoods> {
* @return * @return
* @throws Exception * @throws Exception
*/ */
public List<DataGoodsDto> findList(Map<String, Object> param)throws Exception; public List<DataGoodsListDto> findList(Map<String, Object> param)throws Exception;
/**主键查询数据商品 /**主键查询数据商品
* @param DataGoodsId * @param DataGoodsId
......
...@@ -20,7 +20,7 @@ public interface MallCustomerDao extends BaseMapper<MallCustomer> { ...@@ -20,7 +20,7 @@ public interface MallCustomerDao extends BaseMapper<MallCustomer> {
* @param username * @param username
* @return * @return
*/ */
MallCustomer selectByAccount(String username); CustomerDto selectByAccount(String username);
/** /**
......
package com.jz.dm.mall.moduls.mapper;
import com.jz.common.base.BaseMapper;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.MallHotRecommendGoodsDto;
import com.jz.dm.mall.moduls.entity.MallHotRecommendGoods;
import java.util.List;
/**
* 热门推荐商品(TMallHotRecommendGoods)表数据库访问层
*
* @author Bellamy
* @since 2020-12-01 10:41:40
*/
public interface MallHotRecommendGoodsDao extends BaseMapper<MallHotRecommendGoods> {
List<MallHotRecommendGoodsDto> selectByPopularApi();
}
\ No newline at end of file
...@@ -5,6 +5,8 @@ import com.jz.common.bean.BaseResponse; ...@@ -5,6 +5,8 @@ import com.jz.common.bean.BaseResponse;
import com.jz.common.bean.PageInfoResponse; import com.jz.common.bean.PageInfoResponse;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsDto; import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsDto;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsListDto;
import com.jz.dm.mall.moduls.controller.goods.bean.request.DataGoodsListRequest;
import com.jz.dm.mall.moduls.controller.goods.bean.request.DataGoodsRequest; import com.jz.dm.mall.moduls.controller.goods.bean.request.DataGoodsRequest;
import com.jz.dm.mall.moduls.entity.DataGoods; import com.jz.dm.mall.moduls.entity.DataGoods;
...@@ -21,12 +23,12 @@ public interface DataGoodsService { ...@@ -21,12 +23,12 @@ public interface DataGoodsService {
/**条件查询所有数据商品 /**条件查询所有数据商品
* @param DataGoodsRequest * @param dataGoodsListRequest
* @param httpRequest * @param httpRequest
* @return * @return
* @throws Exception * @throws Exception
*/ */
public PageInfoResponse<DataGoodsDto> findList(DataGoodsRequest dataGoodsRequest, HttpServletRequest httpRequest)throws Exception; public PageInfoResponse<DataGoodsListDto> findList(DataGoodsListRequest dataGoodsListRequest, HttpServletRequest httpRequest)throws Exception;
/**新增数据商品 /**新增数据商品
...@@ -61,6 +63,4 @@ public interface DataGoodsService { ...@@ -61,6 +63,4 @@ public interface DataGoodsService {
*/ */
public BaseResponse deleteById(DataGoodsRequest dataGoodsRequest, HttpServletRequest httpRequest)throws Exception; public BaseResponse deleteById(DataGoodsRequest dataGoodsRequest, HttpServletRequest httpRequest)throws Exception;
} }
\ No newline at end of file
...@@ -19,7 +19,7 @@ public interface MallCustomerService { ...@@ -19,7 +19,7 @@ public interface MallCustomerService {
* @param username * @param username
* @return * @return
*/ */
MallCustomer selectByAccount(String username,HttpServletRequest request); CustomerDto selectByAccount(String username,HttpServletRequest request);
/** /**
* 通过手机号进行查询 * 通过手机号进行查询
......
package com.jz.dm.mall.moduls.service;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.MallHotRecommendGoodsDto;
import java.util.List;
/**
* 热门推荐商品(TMallHotRecommendGoods)表服务接口
*
* @author Bellamy
* @since 2020-12-01 10:41:40
*/
public interface MallHotRecommendGoodsService {
/**
* 查询热门api数据
* @return
*/
List<MallHotRecommendGoodsDto> selectByPopularApi();
}
\ No newline at end of file
...@@ -8,6 +8,8 @@ import com.jz.common.bean.PageInfoResponse; ...@@ -8,6 +8,8 @@ import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.Constants; import com.jz.common.constant.Constants;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsDto; import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsDto;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsListDto;
import com.jz.dm.mall.moduls.controller.goods.bean.request.DataGoodsListRequest;
import com.jz.dm.mall.moduls.controller.goods.bean.request.DataGoodsRequest; import com.jz.dm.mall.moduls.controller.goods.bean.request.DataGoodsRequest;
import com.jz.dm.mall.moduls.entity.DataGoods; import com.jz.dm.mall.moduls.entity.DataGoods;
import com.jz.dm.mall.moduls.mapper.DataGoodsDao; import com.jz.dm.mall.moduls.mapper.DataGoodsDao;
...@@ -35,131 +37,44 @@ public class DataGoodsServiceImpl implements DataGoodsService { ...@@ -35,131 +37,44 @@ public class DataGoodsServiceImpl implements DataGoodsService {
private DataGoodsDao dataGoodsDao; private DataGoodsDao dataGoodsDao;
@Override @Override
public PageInfoResponse<DataGoodsDto> findList(DataGoodsRequest dataGoodsRequest, HttpServletRequest httpRequest) public PageInfoResponse<DataGoodsListDto> findList(DataGoodsListRequest dataGoodsListRequest, HttpServletRequest httpRequest)
throws Exception { throws Exception {
PageInfoResponse<DataGoodsDto> pageInfoResponse = new PageInfoResponse<>(); PageInfoResponse<DataGoodsListDto> pageInfoResponse = new PageInfoResponse<>();
Map<String, Object> param = new HashMap<>(); Map<String, Object> param = new HashMap<>();
//数据商品id
if (dataGoodsRequest.getDataGoodsId() != null) {
param.put("dataGoodsId", dataGoodsRequest.getDataGoodsId());
}
//商品分类id(行业) //商品分类id(行业)
if (dataGoodsRequest.getCategoryId() != null) { if (dataGoodsListRequest.getCategoryId() != null) {
param.put("categoryId", dataGoodsRequest.getCategoryId()); param.put("categoryId", dataGoodsListRequest.getCategoryId());
}
//数据商户id
if (dataGoodsRequest.getUserId() != null) {
param.put("userId", dataGoodsRequest.getUserId());
} }
//数据商品名称 //数据商品名称
if (!StringUtils.isEmpty(dataGoodsRequest.getDataName())) { if (!StringUtils.isEmpty(dataGoodsListRequest.getDataName())) {
param.put("dataName", dataGoodsRequest.getDataName()); param.put("dataName", dataGoodsListRequest.getDataName());
} }
//数据类型:01api,02数据包 //数据类型:01api,02数据包
if (!StringUtils.isEmpty(dataGoodsRequest.getDataType())) { if (!StringUtils.isEmpty(dataGoodsListRequest.getDataType())) {
param.put("dataType", dataGoodsRequest.getDataType()); param.put("dataType", dataGoodsListRequest.getDataType());
}
//数据商品标签
if (!StringUtils.isEmpty(dataGoodsRequest.getDataLabel())) {
param.put("dataLabel", dataGoodsRequest.getDataLabel());
}
//数据商品图片
if (!StringUtils.isEmpty(dataGoodsRequest.getDataPicture())) {
param.put("dataPicture", dataGoodsRequest.getDataPicture());
}
//数据商品价格
if (dataGoodsRequest.getDataPrice() != null) {
param.put("dataPrice", dataGoodsRequest.getDataPrice());
}
//优惠价格
if (dataGoodsRequest.getDiscountPrice() != null) {
param.put("discountPrice", dataGoodsRequest.getDiscountPrice());
} }
//价格类型:01免费,02收费 //价格类型:01免费,02收费
if (!StringUtils.isEmpty(dataGoodsRequest.getPriceType())) { if (!StringUtils.isEmpty(dataGoodsListRequest.getPriceType())) {
param.put("priceType", dataGoodsRequest.getPriceType()); param.put("priceType", dataGoodsListRequest.getPriceType());
}
//商品规格
if (!StringUtils.isEmpty(dataGoodsRequest.getGoodsStandards())) {
param.put("goodsStandards", dataGoodsRequest.getGoodsStandards());
}
//数据状态:01预售,02在售中,03下架,04上架
if (!StringUtils.isEmpty(dataGoodsRequest.getDataStatus())) {
param.put("dataStatus", dataGoodsRequest.getDataStatus());
}
//审核状态:01待审核,02已审核,03未通过
if (!StringUtils.isEmpty(dataGoodsRequest.getAuditStatus())) {
param.put("auditStatus", dataGoodsRequest.getAuditStatus());
}
//清洗规则(脱敏校验)
if (!StringUtils.isEmpty(dataGoodsRequest.getCleanRule())) {
param.put("cleanRule", dataGoodsRequest.getCleanRule());
}
//驳回原因
if (!StringUtils.isEmpty(dataGoodsRequest.getRejectReason())) {
param.put("rejectReason", dataGoodsRequest.getRejectReason());
}
//审核人
if (!StringUtils.isEmpty(dataGoodsRequest.getAuditPerson())) {
param.put("auditPerson", dataGoodsRequest.getAuditPerson());
} }
//审核时间起
if (dataGoodsRequest.getAuditTimeStart() != null) { //更新时间排序
param.put("auditTimeStart", dataGoodsRequest.getAuditTimeStart()); if (dataGoodsListRequest.getUptTime() != null) {
} param.put("uptTime", dataGoodsListRequest.getUptTime());
//审核时间止
if (dataGoodsRequest.getAuditTimeEnd() != null) {
param.put("auditTimeEnd", dataGoodsRequest.getAuditTimeEnd());
}
//创建时间起
if (dataGoodsRequest.getCreTimeStart() != null) {
param.put("creTimeStart", dataGoodsRequest.getCreTimeStart());
}
//创建时间止
if (dataGoodsRequest.getCreTimeEnd() != null) {
param.put("creTimeEnd", dataGoodsRequest.getCreTimeEnd());
}
//创建人
if (!StringUtils.isEmpty(dataGoodsRequest.getCrePerson())) {
param.put("crePerson", dataGoodsRequest.getCrePerson());
}
//更新时间起
if (dataGoodsRequest.getUptTimeStart() != null) {
param.put("uptTimeStart", dataGoodsRequest.getUptTimeStart());
}
//更新时间止
if (dataGoodsRequest.getUptTimeEnd() != null) {
param.put("uptTimeEnd", dataGoodsRequest.getUptTimeEnd());
}
//更新人
if (!StringUtils.isEmpty(dataGoodsRequest.getUptPerson())) {
param.put("uptPerson", dataGoodsRequest.getUptPerson());
}
//删除标识
if (!StringUtils.isEmpty(dataGoodsRequest.getDelFlag())) {
param.put("delFlag", dataGoodsRequest.getDelFlag());
}
//年(元)
if (dataGoodsRequest.getYearType() != null) {
param.put("yearType", dataGoodsRequest.getYearType());
}
//季(元)
if (dataGoodsRequest.getSeasonType() != null) {
param.put("seasonType", dataGoodsRequest.getSeasonType());
} }
//月(元) // 使用人数
if (dataGoodsRequest.getMonthType() != null) { if (dataGoodsListRequest.getUsePerson() != null) {
param.put("monthType", dataGoodsRequest.getMonthType()); param.put("usePerson", dataGoodsListRequest.getUsePerson());
} }
//次(元) // 综合排序
if (dataGoodsRequest.getSecondType() != null) { if (dataGoodsListRequest.getSynthesizeRank() != null) {
param.put("secondType", dataGoodsRequest.getSecondType()); param.put("synthesizeRank", dataGoodsListRequest.getSynthesizeRank());
} }
PageHelper.startPage(dataGoodsRequest.getPageNum(), dataGoodsRequest.getPageSize()); PageHelper.startPage(dataGoodsListRequest.getPageNum(), dataGoodsListRequest.getPageSize());
List<DataGoodsDto> list = dataGoodsDao.findList(param); List<DataGoodsListDto> list = dataGoodsDao.findList(param);
PageInfo<DataGoodsDto> pageInfo = new PageInfo<>(list); PageInfo<DataGoodsListDto> pageInfo = new PageInfo<>(list);
pageInfoResponse.setCode(Constants.SUCCESS_CODE); pageInfoResponse.setCode(Constants.SUCCESS_CODE);
pageInfoResponse.setMessage("查询成功"); pageInfoResponse.setMessage("查询成功");
...@@ -247,4 +162,5 @@ public class DataGoodsServiceImpl implements DataGoodsService { ...@@ -247,4 +162,5 @@ public class DataGoodsServiceImpl implements DataGoodsService {
return baseResponse; return baseResponse;
} }
} }
\ No newline at end of file
...@@ -40,8 +40,8 @@ public class MallCustomerServiceImpl implements MallCustomerService { ...@@ -40,8 +40,8 @@ public class MallCustomerServiceImpl implements MallCustomerService {
* @return * @return
*/ */
@Override @Override
public MallCustomer selectByAccount(String username, HttpServletRequest request) { public CustomerDto selectByAccount(String username, HttpServletRequest request) {
MallCustomer mallCustomer = tMallCustomerDao.selectByAccount(username); CustomerDto mallCustomer = tMallCustomerDao.selectByAccount(username);
// String customer = JSON.toJSONString(mallCustomer); // String customer = JSON.toJSONString(mallCustomer);
if (mallCustomer != null) { if (mallCustomer != null) {
...@@ -55,7 +55,7 @@ public class MallCustomerServiceImpl implements MallCustomerService { ...@@ -55,7 +55,7 @@ public class MallCustomerServiceImpl implements MallCustomerService {
// 存入到session // 存入到session
request.getSession().setAttribute("mallCustomer", mallCustomerApiDto); request.getSession().setAttribute("mallCustomer", mallCustomerApiDto);
// 存入到redis // 存入到redis
redisTemplate.opsForValue().set("user_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER, mallCustomerApiDto, 3, TimeUnit.DAYS); // redisTemplate.opsForValue().set("user_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER, mallCustomerApiDto, 3, TimeUnit.DAYS);
} }
return mallCustomer; return mallCustomer;
} }
......
package com.jz.dm.mall.moduls.service.impl;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.MallHotRecommendGoodsDto;
import com.jz.dm.mall.moduls.mapper.MallHotRecommendGoodsDao;
import com.jz.dm.mall.moduls.service.MallHotRecommendGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 热门推荐商品(TMallHotRecommendGoods)表服务实现类
*
* @author Bellamy
* @since 2020-12-01 10:41:40
*/
@Service("mallHotRecommendGoodsService")
public class MallHotRecommendGoodsServiceImpl implements MallHotRecommendGoodsService {
@Autowired
private MallHotRecommendGoodsDao tMallHotRecommendGoodsDao;
/**
* 查询热门api数据
*
* @return
*/
@Override
public List<MallHotRecommendGoodsDto> selectByPopularApi() {
List<MallHotRecommendGoodsDto> popularApiList = tMallHotRecommendGoodsDao.selectByPopularApi();
return popularApiList;
}
}
\ No newline at end of file
...@@ -47,95 +47,6 @@ ...@@ -47,95 +47,6 @@
limit #{offset}, #{limit} limit #{offset}, #{limit}
</select> </select>
<!--通过实体作为筛选条件查询-->
<select id="findList" resultType="com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsDto" parameterType="map">
select
data_goods_id, category_id, user_id, data_name, data_type, data_label, data_picture, data_price, discount_price,
price_type, goods_standards, data_status, audit_status, clean_rule, reject_reason, audit_person, audit_time,
cre_time, cre_person, upt_time, upt_person, del_flag, year_type, season_type, month_type, second_type
from t_data_goods
<where>
<if test="dataGoodsId != null">
and data_goods_id = #{dataGoodsId}
</if>
<if test="categoryId != null">
and category_id = #{categoryId}
</if>
<if test="userId != null">
and user_id = #{userId}
</if>
<if test="dataName != null and dataName != ''">
and data_name = #{dataName}
</if>
<if test="dataType != null and dataType != ''">
and data_type = #{dataType}
</if>
<if test="dataLabel != null and dataLabel != ''">
and data_label = #{dataLabel}
</if>
<if test="dataPicture != null and dataPicture != ''">
and data_picture = #{dataPicture}
</if>
<if test="dataPrice != null">
and data_price = #{dataPrice}
</if>
<if test="discountPrice != null">
and discount_price = #{discountPrice}
</if>
<if test="priceType != null and priceType != ''">
and price_type = #{priceType}
</if>
<if test="goodsStandards != null and goodsStandards != ''">
and goods_standards = #{goodsStandards}
</if>
<if test="dataStatus != null and dataStatus != ''">
and data_status = #{dataStatus}
</if>
<if test="auditStatus != null and auditStatus != ''">
and audit_status = #{auditStatus}
</if>
<if test="cleanRule != null and cleanRule != ''">
and clean_rule = #{cleanRule}
</if>
<if test="rejectReason != null and rejectReason != ''">
and reject_reason = #{rejectReason}
</if>
<if test="auditPerson != null and auditPerson != ''">
and audit_person = #{auditPerson}
</if>
<if test="auditTime != null">
and audit_time = #{auditTime}
</if>
<if test="creTime != null">
and cre_time = #{creTime}
</if>
<if test="crePerson != null and crePerson != ''">
and cre_person = #{crePerson}
</if>
<if test="uptTime != null">
and upt_time = #{uptTime}
</if>
<if test="uptPerson != null and uptPerson != ''">
and upt_person = #{uptPerson}
</if>
<if test="delFlag != null and delFlag != ''">
and del_flag = #{delFlag}
</if>
<if test="yearType != null">
and year_type = #{yearType}
</if>
<if test="seasonType != null">
and season_type = #{seasonType}
</if>
<if test="monthType != null">
and month_type = #{monthType}
</if>
<if test="secondType != null">
and second_type = #{secondType}
</if>
</where>
</select>
<!--新增所有列--> <!--新增所有列-->
<insert id="insert" keyProperty="dataGoodsId" useGeneratedKeys="true"> <insert id="insert" keyProperty="dataGoodsId" useGeneratedKeys="true">
insert into t_data_goods(category_id, user_id, data_name, data_type, data_label, data_picture, data_price, discount_price, price_type, goods_standards, data_status, audit_status, clean_rule, reject_reason, audit_person, audit_time, cre_time, cre_person, upt_time, upt_person, del_flag, year_type, season_type, month_type, second_type) insert into t_data_goods(category_id, user_id, data_name, data_type, data_label, data_picture, data_price, discount_price, price_type, goods_standards, data_status, audit_status, clean_rule, reject_reason, audit_person, audit_time, cre_time, cre_person, upt_time, upt_person, del_flag, year_type, season_type, month_type, second_type)
...@@ -246,4 +157,77 @@ ...@@ -246,4 +157,77 @@
delete from t_data_goods where data_goods_id = #{dataGoodsId} delete from t_data_goods where data_goods_id = #{dataGoodsId}
</delete> </delete>
<select id="findByCategoryId" resultType="com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsListDto" parameterType="list">
SELECT
t1.data_goods_id,
t1.category_id,
t2.category_name,
t1.data_name,
(CASE WHEN t1.data_type = '01' then 'api' WHEN t1.data_type = '01' then 'api' end) dataTYpe,
t1.data_label,
t1.data_picture,
(CASE when t1.price_type = '01' then '免费' when t1.price_type = '02' then '收费' end) priceType,
t1.discount_price,
t1.data_price,
t1.price_type,
t2.if_child,
t2.parent_id
FROM
t_data_goods t1
INNER JOIN t_data_goods_category t2 on t1.category_id = t2.category_id
</select>
<!--通过实体作为筛选条件查询-->
<select id="findList" resultType="com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsListDto" parameterType="map">
SELECT
t1.data_goods_id as dataGoods,
t1.category_id as categoryId,
t2.category_name as categoryName,
t1.data_name as dataName,
(CASE WHEN t1.data_type = '01' then 'api' WHEN t1.data_type = '01' then 'api' end) dataTYpe,
t1.data_label as dataLabel,
t1.data_picture as dataPicture,
(CASE when t1.price_type = '01' then '免费' when t1.price_type = '02' then '收费' end) priceType,
t1.discount_price as discountPrice,
t1.data_price as dataPrice,
t1.price_type as pariceType,
t2.parent_id as parentId,
t1.year_type as yearType,
t1.season_type as seasonType,
t1.month_type as monthType,
t1.second_type as secondType
FROM
t_data_goods t1
INNER JOIN t_data_goods_category t2 on t1.category_id = t2.category_id
where
1= 1 and
t1.del_flag = 'N' and
t1.data_status = '02'
<if test="categoryId != null">
and t1.category_id = #{categoryId}
</if>
<if test="dataName != null and dataName != ''">
and data_name = #{dataName}
</if>
<if test="dataType != null and dataType != ''">
and data_type = #{dataType}
</if>
<if test="priceType != null and priceType != ''">
and price_type = #{priceType}
</if>
<if test="uptTime != null">
ORDER BY
#{uptTime} desc
</if>
<if test="usePerson != null">
ORDER BY
#{usePerson} desc
</if>
<if test="synthesizeRank != null">
ORDER BY
#{synthesizeRank} desc
</if>
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -165,11 +165,19 @@ ...@@ -165,11 +165,19 @@
delete from t_mall_customer where customer_id = #{customerId} delete from t_mall_customer where customer_id = #{customerId}
</delete> </delete>
<select id="selectByAccount" resultMap="TMallCustomerMap"> <select id="selectByAccount" resultType="com.jz.dm.mall.moduls.controller.customer.bean.CustomerDto">
select select
customer_id, department_id, password, customer_account, customer_name, customer_phone, customer_email, customer_address, customer_point, register_time, customer_level, identity_card, cre_time, upt_time, del_flag t1.customer_id as customerId,
from t_mall_customer t1.department_id as departmentId,
where customer_account = #{username}; t1.password,
t1.customer_account as customerAccount,
t1.customer_name as customerName,
t1.customer_phone as customerPhone,
t3.assets_id as assetsId
from t_mall_customer t1
left join t_department t2 on t1.department_id=t2.department_id
left join t_finance_customer_assets t3 on t3.department_id=t2.department_id
where 1=1 and t1.del_flag='N' and customer_account = #{username};
</select> </select>
<select id="selectByPhone" resultType="com.jz.dm.mall.moduls.controller.customer.bean.CustomerDto"> <select id="selectByPhone" resultType="com.jz.dm.mall.moduls.controller.customer.bean.CustomerDto">
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jz.dm.mall.moduls.mapper.MallHotRecommendGoodsDao">
<resultMap type="com.jz.dm.mall.moduls.entity.MallHotRecommendGoods" id="TMallHotRecommendGoodsMap">
<result property="hotRecommendGoods" column="hot_recommend_goods" jdbcType="INTEGER"/>
<result property="dataGoodsId" column="data_goods_id" jdbcType="INTEGER"/>
<result property="customerId" column="customer_id" jdbcType="INTEGER"/>
<result property="delFlag" column="del_flag" jdbcType="VARCHAR"/>
<result property="creTime" column="cre_time" jdbcType="TIMESTAMP"/>
</resultMap>
<!--查询单个-->
<select id="queryById" resultMap="TMallHotRecommendGoodsMap">
select
hot_recommend_goods, data_goods_id, customer_id, del_flag, cre_time
from t_mall_hot_recommend_goods
where hot_recommend_goods = #{hotRecommendGoods}
</select>
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="TMallHotRecommendGoodsMap">
select
hot_recommend_goods, data_goods_id, customer_id, del_flag, cre_time
from t_mall_hot_recommend_goods
limit #{offset}, #{limit}
</select>
<!--通过实体作为筛选条件查询-->
<select id="queryAll" resultMap="TMallHotRecommendGoodsMap">
select
hot_recommend_goods, data_goods_id, customer_id, del_flag, cre_time
from t_mall_hot_recommend_goods
<where>
<if test="hotRecommendGoods != null">
and hot_recommend_goods = #{hotRecommendGoods}
</if>
<if test="dataGoodsId != null">
and data_goods_id = #{dataGoodsId}
</if>
<if test="customerId != null">
and customer_id = #{customerId}
</if>
<if test="delFlag != null and delFlag != ''">
and del_flag = #{delFlag}
</if>
<if test="creTime != null">
and cre_time = #{creTime}
</if>
</where>
</select>
<!--新增所有列-->
<insert id="insert" keyProperty="hotRecommendGoods" useGeneratedKeys="true">
insert into t_mall_hot_recommend_goods(data_goods_id, customer_id, del_flag, cre_time)
values (#{dataGoodsId}, #{customerId}, #{delFlag}, #{creTime})
</insert>
<insert id="insertBatch" keyProperty="hotRecommendGoods" useGeneratedKeys="true">
insert into t_mall_hot_recommend_goods(data_goods_id, customer_id, del_flag, cre_time)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.dataGoodsId}, #{entity.customerId}, #{entity.delFlag}, #{entity.creTime})
</foreach>
</insert>
<!--通过主键修改数据-->
<update id="update">
update t_mall_hot_recommend_goods
<set>
<if test="dataGoodsId != null">
data_goods_id = #{dataGoodsId},
</if>
<if test="customerId != null">
customer_id = #{customerId},
</if>
<if test="delFlag != null and delFlag != ''">
del_flag = #{delFlag},
</if>
<if test="creTime != null">
cre_time = #{creTime},
</if>
</set>
where hot_recommend_goods = #{hotRecommendGoods}
</update>
<!--通过主键删除-->
<delete id="deleteById">
delete from t_mall_hot_recommend_goods where hot_recommend_goods = #{hotRecommendGoods}
</delete>
<select id="selectByPopularApi" parameterType="list" resultType="com.jz.dm.mall.moduls.controller.goods.bean.dto.MallHotRecommendGoodsDto">
SELECT
t1.data_goods_id as dataGoodsId ,
t1.data_name as dataName,
(CASE WHEN t1.data_type = '01' then 'api' WHEN t1.data_type = '01' then 'api' end) dataTYpe,
t1.data_label as dataLabel,
t1.data_picture as dataPicture,
t1.data_price as dataPrice,
t1.discount_price as discountPrice,
(CASE when t1.price_type = '01' then '免费' when t1.price_type = '02' then '收费' end) priceType,
t1.use_person AS usePerson
FROM
t_data_goods t1
INNER JOIN t_mall_hot_recommend_goods t2 ON t1.data_goods_id = t2.data_goods_id
where
1=1 and
t1.del_flag = 'N' and
t1.data_status = '02'
group by t1.data_goods_id
order by usePerson desc
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment