Commit 436ffdf8 authored by zhangc's avatar zhangc

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

parents a571f762 f4b145f8
*.iml
*.jar
*.idea
*.class
*.target
alter table t_finance_customer_assets add remark text COMMENT '备注'; alter table t_finance_customer_assets add remark text COMMENT '备注';
alter table t_platform_log add caller_type char(2) NOT NULL COMMENT '调用类型:01商城用户,02平台用户'; alter table t_platform_log add caller_type char(2) NOT NULL COMMENT '调用类型:01商城用户,02平台用户';
alter table t_finance_trade_flow add assets_id Bigint(20) default NULL COMMENT'企业资产id'; alter table t_finance_trade_flow add assets_id Bigint(20) default NULL COMMENT'企业资产id';
alter table t_finance_customer_balance add balance_time datetime default NULL COMMENT'充值时间';
alter table t_finance_trade_flow add balance_money decimal(20,5) NOT NULL DEFAULT '0' COMMENT '结余';
\ No newline at end of file
alter table t_data_goods add use_person varchar(64) DEFAULT '0' COMMENT '使用人数';
\ No newline at end of file
package com.jz.common.base; package com.jz.common.base;
import com.jz.common.bean.MallCustomerApiDto; import com.jz.common.bean.MallCustomerApiDto;
import org.apache.commons.lang3.StringUtils;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
/** /**
...@@ -13,16 +15,18 @@ public class CurrentUser { ...@@ -13,16 +15,18 @@ public class CurrentUser {
/** /**
* 获取用户信息 * 获取用户信息
*
* @param req * @param req
* @return * @return
*/ */
public static MallCustomerApiDto getCurrentUser(HttpServletRequest req){ public static MallCustomerApiDto getCurrentUser(HttpServletRequest req) {
MallCustomerApiDto mallCustomerApiDto =(MallCustomerApiDto) req.getAttribute("mallCustomer"); MallCustomerApiDto mallCustomerApiDto = (MallCustomerApiDto) req.getAttribute("mallCustomer");
return mallCustomerApiDto; return mallCustomerApiDto;
} }
/** /**
* 用户id * 用户id
*
* @param request * @param request
* @return * @return
*/ */
...@@ -33,12 +37,31 @@ public class CurrentUser { ...@@ -33,12 +37,31 @@ public class CurrentUser {
/** /**
* 企业id * 企业id
*
* @param request * @param request
* @return * @return
*/ */
public static Long getDepartmentId(HttpServletRequest request) { public static String getDepartmentId(HttpServletRequest request) {
Long departmentId = getCurrentUser(request).getDepartmentId(); Long departmentId = getCurrentUser(request).getDepartmentId();
return departmentId; if (departmentId != null) {
String id = String.valueOf(departmentId);
return id;
}
return null;
}
/**
* 用户资产id
* @Author Bellamy
* @param request
* @return
*/
public static String getAssetsId(HttpServletRequest request) {
String assetsId = getCurrentUser(request).getAssetsId();
if (StringUtils.isNotEmpty(assetsId)) {
return assetsId;
}
return null;
} }
} }
...@@ -38,6 +38,12 @@ public class MallCustomerApiDto implements Serializable { ...@@ -38,6 +38,12 @@ public class MallCustomerApiDto implements Serializable {
@ApiModelProperty(value = "用户真实姓名") @ApiModelProperty(value = "用户真实姓名")
private String customerName; private String customerName;
/**
* 资产账户id
*/
@ApiModelProperty(value = "资产账户id")
private String assetsId;
public static long getSerialVersionUID() { public static long getSerialVersionUID() {
return serialVersionUID; return serialVersionUID;
} }
...@@ -81,4 +87,12 @@ public class MallCustomerApiDto implements Serializable { ...@@ -81,4 +87,12 @@ public class MallCustomerApiDto implements Serializable {
public void setCustomerName(String customerName) { public void setCustomerName(String customerName) {
this.customerName = customerName; this.customerName = customerName;
} }
public String getAssetsId() {
return assetsId;
}
public void setAssetsId(String assetsId) {
this.assetsId = assetsId;
}
} }
package com.jz.common.enums;
/**
* 订单方式
*
* @author Bellamy
* @since 2020-12-09 14:30:23
*/
public enum OrderMethodEnum {
/**
* 年
*/
YEAR("YEAR", "01"),
/**
* 季
*/
SEASON("SEASON", "02"),
/**
* 月
*/
MONTH("MONTH", "03"),
/**
* 次
*/
SECOND("SECOND", "04"),
;
private String code;
private String value;
OrderMethodEnum(String code, String value) {
this.code = code;
this.value = value;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public static OrderMethodEnum get(String code) {
if (code == null) {
return null;
}
for (OrderMethodEnum status : values()) {
if (status.getCode().equalsIgnoreCase(code)) {
return status;
}
}
return null;
}
}
package com.jz.common.enums;
/**
* 支付方式
*
* @author Bellamy
* @since 2020-12-09 14:30:23
*/
public enum PaymentMethodEnum {
/**
* 余额
*/
YE("YE", "01"),
/**
* 支付宝
*/
ZFB("ZFB", "02"),
/**
* 微信
*/
WX("WX", "03"),
/**
* 其他
*/
OTHER("OTHER", "04"),
;
private String code;
private String value;
PaymentMethodEnum(String code, String value) {
this.code = code;
this.value = value;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public static PaymentMethodEnum get(String code) {
if (code == null) {
return null;
}
for (PaymentMethodEnum status : values()) {
if (status.getCode().equalsIgnoreCase(code)) {
return status;
}
}
return null;
}
}
package com.jz.common.enums;
/**
* @ClassName: 商品价格类型
* @Author: Carl
* @Date: 2020/12/8
* @Version:
*/
public enum PriceTypeEnum {
/**
* 免费
*/
MF("MF", "01"),
/**
* 收费
*/
SF("SF", "02"),
;
private String code;
private String value;
PriceTypeEnum(String code, String value) {
this.code = code;
this.value = value;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public static PriceTypeEnum get(String code) {
if (code == null) {
return null;
}
for (PriceTypeEnum status : values()) {
if (status.getCode().equalsIgnoreCase(code)) {
return status;
}
}
return null;
}
}
package com.jz.common.enums;
/**
* 交易流水类型
*
* @author Bellamy
* @since 2020-12-07 14:30:23
*/
public enum TradeFlowEnum {
/**
* 提现
*/
TX("TX", "01"),
/**
* 充值
*/
CZ("CZ", "02"),
/**
* 付款(订单)
*/
FK("FK", "03"),
/**
* 收款
*/
SK("SK", "04"),
/**
* 续费
*/
XF("XF", "05"),
;
private String code;
private String value;
TradeFlowEnum(String code, String value) {
this.code = code;
this.value = value;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public static TradeFlowEnum get(String code) {
if (code == null) {
return null;
}
for (TradeFlowEnum status : values()) {
if (status.getCode().equalsIgnoreCase(code)) {
return status;
}
}
return null;
}
}
package com.jz.common.utils; package com.jz.common.utils;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
...@@ -288,6 +290,40 @@ public class DateUtils { ...@@ -288,6 +290,40 @@ public class DateUtils {
return calendar.getTime(); return calendar.getTime();
} }
//获取时间差方法
public static String getTime(Date currentTime,Date firstTime){
long diff = currentTime.getTime() - firstTime.getTime();//这样得到的差值是微秒级别
Calendar currentTimes =dataToCalendar(currentTime);//当前系统时间转Calendar类型
Calendar firstTimes =dataToCalendar(firstTime);//查询的数据时间转Calendar类型
int year = currentTimes.get(Calendar.YEAR) - firstTimes.get(Calendar.YEAR);//获取年
int month = currentTimes.get(Calendar.MONTH) - firstTimes.get(Calendar.MONTH);
int day = currentTimes.get(Calendar.DAY_OF_MONTH) - firstTimes.get(Calendar.DAY_OF_MONTH);
if (day < 0) {
month -= 1;
currentTimes.add(Calendar.MONTH, -1);
day = day + currentTimes.getActualMaximum(Calendar.DAY_OF_MONTH);//获取日
}
if (month < 0) {
month = (month + 12) % 12;//获取月
year--;
}
long days = diff / (1000 * 60 * 60 * 24);
long hours = (diff-days*(1000 * 60 * 60 * 24))/(1000* 60 * 60); //获取时
long minutes = (diff-days*(1000 * 60 * 60 * 24)-hours*(1000* 60 * 60))/(1000* 60); //获取分钟
long s=(diff/1000-days*24*60*60-hours*60*60-minutes*60);//获取秒
String CountTime=""+month+"月"+day+"天"+hours+"小时"+minutes+"分";
// String CountTime=""+month+"月"+day+"天"+hours+"小时"+minutes+"分"+s+"秒";
return CountTime;
}
//Date类型转Calendar类型
public static Calendar dataToCalendar(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar;
}
public static void main(String[] args) { public static void main(String[] args) {
try { try {
System.out.println("本周一" + parseDate2String(getThisWeekMonday())); System.out.println("本周一" + parseDate2String(getThisWeekMonday()));
......
...@@ -7,8 +7,8 @@ package com.jz.common.utils; ...@@ -7,8 +7,8 @@ package com.jz.common.utils;
* @Version: * @Version:
*/ */
public class StatusCode { public class StatusCode {
public static final int OK = 30000; // 成功 public static final int OK = 200; // 成功
public static final int ERROR = 30001; // 失败 public static final int ERROR = 201; // 失败
public static final int LOGINERROR = 30002; // 用户名或密码错误 public static final int LOGINERROR = 30002; // 用户名或密码错误
public static final int ACCESSERROR = 30003; // 权限不足 public static final int ACCESSERROR = 30003; // 权限不足
} }
package com.jz.dm.mall.moduls.controller.customer; package com.jz.dm.mall.moduls.controller.customer;
import com.jz.common.base.CurrentUser; import com.jz.common.bean.MallCustomerApiDto;
import com.jz.common.constant.RedisMessageConstant; import com.jz.common.constant.RedisMessageConstant;
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.SessionUtils;
import com.jz.common.utils.StatusCode; import com.jz.common.utils.StatusCode;
import com.jz.dm.mall.moduls.controller.customer.bean.CustomerDto;
import com.jz.dm.mall.moduls.entity.MallCustomer;
import com.jz.dm.mall.moduls.service.MallCustomerService; import com.jz.dm.mall.moduls.service.MallCustomerService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.catalina.servlet4preview.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.apache.catalina.servlet4preview.http.HttpServletRequest;
import java.util.Map; import java.util.Map;
...@@ -37,29 +38,34 @@ public class LoginController { ...@@ -37,29 +38,34 @@ public class LoginController {
@Autowired @Autowired
private RedisTemplate redisTemplate; private RedisTemplate redisTemplate;
/** /**
* 登录功能 * 登录功能
*
* @param username 账号 * @param username 账号
* @param password 密码 * @param password 密码
* @return * @return
*/ */
@PostMapping(value = "/login") @PostMapping(value = "/login")
public Result<MallCustomer> login(String username, String password, HttpServletRequest request) throws Exception{ @ApiOperation(value = "登录功能", notes = "登录功能")
public Result<CustomerDto> login(@RequestParam(value = "username") String username,
@RequestParam(value = "password") 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)) {
MallCustomer mallCustomer = mallCustomerService.selectByPhone(username, request); CustomerDto mallCustomer = mallCustomerService.selectByPhone(username, request);
request.getSession().getAttribute("mallCustomer");
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);
} }
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);
} }
} }
...@@ -69,11 +75,12 @@ public class LoginController { ...@@ -69,11 +75,12 @@ public class LoginController {
/** /**
* 手机获取验证码 * 手机获取验证码
*
* @param paramMap * @param paramMap
* @return * @return
*/ */
@PostMapping(value = "/getCode") @PostMapping(value = "/getCode")
public Result loginCheck(@RequestParam(required = false) Map<String, String> paramMap) { public Result loginCheck(@RequestParam(required = true) Map<String, String> paramMap) {
// 获取手机号码 // 获取手机号码
String telephone = paramMap.get("telephone"); String telephone = paramMap.get("telephone");
String key = RedisMessageConstant.SENDTYPE_LOGIN + "_" + telephone; String key = RedisMessageConstant.SENDTYPE_LOGIN + "_" + telephone;
...@@ -94,12 +101,13 @@ public class LoginController { ...@@ -94,12 +101,13 @@ public class LoginController {
/** /**
* 手机号码校验 * 手机号码校验
*
* @param telephone * @param telephone
* @return * @return
*/ */
@GetMapping(value = "/phoneCheck") @GetMapping(value = "/phoneCheck")
@ApiOperation(value = "手机号码校验接口", notes = "手机号码是否已注册") @ApiOperation(value = "手机号码校验接口", notes = "手机号码是否已注册")
public Result phoneCheck(String telephone) { public Result phoneCheck(@RequestParam("telephone") String telephone) {
if (telephone == null) { if (telephone == null) {
return new Result(false, "请重新输入手机号!"); return new Result(false, "请重新输入手机号!");
} }
...@@ -113,6 +121,7 @@ public class LoginController { ...@@ -113,6 +121,7 @@ public class LoginController {
/** /**
* 手机号码及用户名重复校验 * 手机号码及用户名重复校验
*
* @param username * @param username
* @param telephone * @param telephone
* @param request * @param request
...@@ -120,7 +129,8 @@ public class LoginController { ...@@ -120,7 +129,8 @@ public class LoginController {
*/ */
@GetMapping(value = "/phoneUserCheck") @GetMapping(value = "/phoneUserCheck")
@ApiOperation(value = "手机号用户名重复校验接口", notes = "手机号用户名是否重复") @ApiOperation(value = "手机号用户名重复校验接口", notes = "手机号用户名是否重复")
public Result phoneCheck(String username, String telephone, HttpServletRequest request) { public Result phoneCheck(@RequestParam(value = "username") String username ,
@RequestParam(value = "password") String telephone, HttpServletRequest request) {
String ph = "^[1][34578]\\d{9}$"; String ph = "^[1][34578]\\d{9}$";
if (telephone.matches(ph)) { if (telephone.matches(ph)) {
MallCustomer mallCustomer = mallCustomerService.selectByPhone(telephone); MallCustomer mallCustomer = mallCustomerService.selectByPhone(telephone);
...@@ -131,7 +141,7 @@ public class LoginController { ...@@ -131,7 +141,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, "用户名相同!");
......
...@@ -3,15 +3,18 @@ package com.jz.dm.mall.moduls.controller.customer; ...@@ -3,15 +3,18 @@ package com.jz.dm.mall.moduls.controller.customer;
import com.baomidou.mybatisplus.extension.api.R; import com.baomidou.mybatisplus.extension.api.R;
import com.jz.common.base.BaseController; import com.jz.common.base.BaseController;
import com.jz.common.base.CurrentUser; import com.jz.common.base.CurrentUser;
import com.jz.common.bean.MallCustomerApiDto;
import com.jz.common.constant.RedisMessageConstant; 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;
import com.jz.dm.mall.moduls.service.MallCustomerService; import com.jz.dm.mall.moduls.service.MallCustomerService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
...@@ -49,7 +52,7 @@ public class MallCustomerController extends BaseController { ...@@ -49,7 +52,7 @@ public class MallCustomerController extends BaseController {
*/ */
@PostMapping("/saveCustomer") @PostMapping("/saveCustomer")
@ApiOperation(value = "注册用户", notes = "添加用户") @ApiOperation(value = "注册用户", notes = "添加用户")
public Result saveCustomer(@RequestParam(required = false) Map<String, String> paramMap, HttpServletRequest request) { public Result saveCustomer(@RequestParam(required = true) Map<String, String> paramMap, HttpServletRequest request) {
if (paramMap != null) { if (paramMap != null) {
String username = paramMap.get("username"); String username = paramMap.get("username");
String telephone = paramMap.get("telephone"); String telephone = paramMap.get("telephone");
...@@ -63,7 +66,7 @@ public class MallCustomerController extends BaseController { ...@@ -63,7 +66,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, "用户名相同");
...@@ -81,13 +84,13 @@ public class MallCustomerController extends BaseController { ...@@ -81,13 +84,13 @@ public class MallCustomerController extends BaseController {
* @return * @return
*/ */
@GetMapping("/getLoginUserName") @GetMapping("/getLoginUserName")
@ApiOperation(value = "注册用户", notes = "添加用户") @ApiOperation(value = "获取用户信息")
public Result getLoginUserName (HttpServletRequest request) { public Result getLoginUserName (HttpServletRequest request) {
// 从session中获取id // 从session中获取id
try { try {
MallCustomer mallCustomer = (MallCustomer) SessionUtils.getUserCurrent(request,"mallCustomer"); MallCustomerApiDto mallCustomer = (MallCustomerApiDto) SessionUtils.getUserCurrent(request,"mallCustomer");
Long customerId = 1L; // Long customerId = 1L;
// Long customerId = mallCustomer.getCustomerId(); Long customerId = mallCustomer.getCustomerId();
MallCustomer user = mallCustomerService.selectByUser(customerId); MallCustomer user = mallCustomerService.selectByUser(customerId);
return new Result(true, "获取用户信息成功!", StatusCode.OK, user); return new Result(true, "获取用户信息成功!", StatusCode.OK, user);
}catch (Exception e) { }catch (Exception e) {
...@@ -97,7 +100,9 @@ public class MallCustomerController extends BaseController { ...@@ -97,7 +100,9 @@ public class MallCustomerController extends BaseController {
} }
@PostMapping(value = "/updatePassword") @PostMapping(value = "/updatePassword")
public Result updatePassword(String oldPassword, String newPassword,HttpServletRequest request) throws Exception { @ApiModelProperty(value = "密码修改")
public Result updatePassword(@RequestParam(value = "oldPassWard") String oldPassword,
@RequestParam(value = "newPassword")String newPassword,HttpServletRequest request) throws Exception {
// 获取用户信息 // 获取用户信息
MallCustomer mallCustomer = (MallCustomer) getLoginUserName(request).getData(); MallCustomer mallCustomer = (MallCustomer) getLoginUserName(request).getData();
// 如果密码一致 // 如果密码一致
......
package com.jz.dm.mall.moduls.controller.customer.bean;
import io.swagger.annotations.ApiModel;
/**
* @ClassName: CustomerDto
* @Description: 商城用户返回对象参数
* @Author Bellamy
* @Date 2020/12/9
* @Version 1.0
*/
@ApiModel(value = "商城用户--返回参数对象", description = "返回参数对象")
public class CustomerDto {
/**
* 用户id
*/
private Long customerId;
/**
* 企业id
*/
private Long departmentId;
/**
* 密码
*/
private String password;
/**
* 账户
*/
private String customerAccount;
/**
* 用户真实姓名
*/
private String customerName;
/**
* 联系电话
*/
private String customerPhone;
/**
* 资产账户id
*/
private String assetsId;
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public Long getDepartmentId() {
return departmentId;
}
public void setDepartmentId(Long departmentId) {
this.departmentId = departmentId;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getCustomerAccount() {
return customerAccount;
}
public void setCustomerAccount(String customerAccount) {
this.customerAccount = customerAccount;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getCustomerPhone() {
return customerPhone;
}
public void setCustomerPhone(String customerPhone) {
this.customerPhone = customerPhone;
}
public String getAssetsId() {
return assetsId;
}
public void setAssetsId(String assetsId) {
this.assetsId = assetsId;
}
}
...@@ -2,8 +2,17 @@ package com.jz.dm.mall.moduls.controller.goods; ...@@ -2,8 +2,17 @@ package com.jz.dm.mall.moduls.controller.goods;
import com.jz.common.base.BaseController; 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.DataGoodsApiDto;
import com.jz.dm.mall.moduls.entity.DataGoodsApi;
import com.jz.dm.mall.moduls.service.DataGoodsApiService; import com.jz.dm.mall.moduls.service.DataGoodsApiService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -15,6 +24,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -15,6 +24,7 @@ import org.springframework.web.bind.annotation.RestController;
*/ */
@RestController @RestController
@RequestMapping("dataGoodsApi") @RequestMapping("dataGoodsApi")
@Api("api商品详情")
public class DataGoodsApiController extends BaseController { public class DataGoodsApiController extends BaseController {
/** /**
* 服务对象 * 服务对象
...@@ -22,5 +32,18 @@ public class DataGoodsApiController extends BaseController { ...@@ -22,5 +32,18 @@ public class DataGoodsApiController extends BaseController {
@Autowired @Autowired
private DataGoodsApiService tDataGoodsApiService; private DataGoodsApiService tDataGoodsApiService;
/**
* 根据主键查询商品详情-api
* @param id
* @return
*/
@GetMapping("/getGoodsDetails/{id}")
@ApiOperation(value = "点击商品查看商品详情", notes = "api商品")
public Result<DataGoodsApiDto> findById(@PathVariable(value = "id") Long id) {
if (id != null) {
DataGoodsApiDto dataGoodsApi = tDataGoodsApiService.selectById(id);
return new Result<DataGoodsApiDto>(true, "查询商品详情成功!", StatusCode.OK, dataGoodsApi);
}
return new Result<>(false, "查询商品详情失败!");
}
} }
\ No newline at end of file
...@@ -5,11 +5,13 @@ import com.jz.common.bean.BaseBeanResponse; ...@@ -5,11 +5,13 @@ 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;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -31,34 +33,36 @@ public class DataGoodsController extends BaseController { ...@@ -31,34 +33,36 @@ 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;
} }
/**主键查询数据商品 /**主键查询数据商品
* @param DataGoodsRequest * @param dataGoodsRequest
* @return * @return
*/ */
@RequestMapping(method = RequestMethod.POST, value = "/view") @RequestMapping(method = RequestMethod.POST, value = "/view")
public BaseBeanResponse<DataGoodsDto> view(@RequestBody DataGoodsRequest DataGoodsRequest, HttpServletRequest httpRequest){ public BaseBeanResponse<DataGoodsDto> view(@RequestBody DataGoodsRequest dataGoodsRequest, HttpServletRequest httpRequest){
BaseBeanResponse<DataGoodsDto> baseBeanResponse = new BaseBeanResponse<DataGoodsDto>(); BaseBeanResponse<DataGoodsDto> baseBeanResponse = new BaseBeanResponse<DataGoodsDto>();
try { try {
baseBeanResponse = dataGoodsService.findById(DataGoodsRequest, httpRequest); baseBeanResponse = dataGoodsService.findById(dataGoodsRequest, httpRequest);
} catch (Exception e) { } catch (Exception e) {
baseBeanResponse.setMessage("请求失败"); baseBeanResponse.setMessage("请求失败");
baseBeanResponse.setCode(Constants.FAILURE_CODE); baseBeanResponse.setCode(Constants.FAILURE_CODE);
...@@ -69,14 +73,14 @@ public class DataGoodsController extends BaseController { ...@@ -69,14 +73,14 @@ public class DataGoodsController extends BaseController {
} }
/**删除数据商品 /**删除数据商品
* @param DataGoodsRequest * @param dataGoodsRequest
* @return * @return
*/ */
@RequestMapping(method = RequestMethod.POST, value = "/delete") @RequestMapping(method = RequestMethod.POST, value = "/delete")
public BaseResponse delete(@RequestBody DataGoodsRequest DataGoodsRequest, HttpServletRequest httpRequest){ public BaseResponse delete(@RequestBody DataGoodsRequest dataGoodsRequest, HttpServletRequest httpRequest){
BaseResponse baseResponse = new BaseResponse(); BaseResponse baseResponse = new BaseResponse();
try { try {
baseResponse = dataGoodsService.deleteById(DataGoodsRequest, httpRequest); baseResponse = dataGoodsService.deleteById(dataGoodsRequest, httpRequest);
} catch (Exception e) { } catch (Exception e) {
baseResponse.setMessage("删除失败"); baseResponse.setMessage("删除失败");
baseResponse.setCode(Constants.FAILURE_CODE); baseResponse.setCode(Constants.FAILURE_CODE);
...@@ -87,7 +91,7 @@ public class DataGoodsController extends BaseController { ...@@ -87,7 +91,7 @@ public class DataGoodsController extends BaseController {
} }
/**新增数据商品 /**新增数据商品
* @param DataGoodsRequest * @param dataGoods
* @return * @return
*/ */
@RequestMapping(method = RequestMethod.POST, value = "/add") @RequestMapping(method = RequestMethod.POST, value = "/add")
...@@ -105,7 +109,7 @@ public class DataGoodsController extends BaseController { ...@@ -105,7 +109,7 @@ public class DataGoodsController extends BaseController {
} }
/**修改数据商品 /**修改数据商品
* @param DataGoodsRequest * @param dataGoods
* @return * @return
*/ */
@RequestMapping(method = RequestMethod.POST, value = "/edit") @RequestMapping(method = RequestMethod.POST, value = "/edit")
...@@ -122,10 +126,4 @@ public class DataGoodsController extends BaseController { ...@@ -122,10 +126,4 @@ public class DataGoodsController extends BaseController {
return baseBeanResponse; return baseBeanResponse;
} }
// @PostMapping(value = "/search")
// @ApiOperation(value = "条件查询商品列表")
// public Result<List<DataGoodsRequest>> findList(@RequestBody(required = false) DataGoodsRequest dataGoodsRequest, HttpServletRequest request) {
// dataGoodsService.findList(dataGoodsRequest, request);
// }
} }
\ No newline at end of file
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
package com.jz.dm.mall.moduls.controller.goods.bean.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @ClassName: 商品详情参数封装
* @Author: Carl
* @Date: 2020/12/8
* @Version:
*/
@ApiModel(value = "商品详情--商品详情参数对象", description = "商品详情参数对象")
public class DataGoodsApiDto implements Serializable {
/**
* api商品id
*/
@ApiModelProperty(value = "api商品id")
private Long goodsApi;
/**
* 数据id
*/
@ApiModelProperty(value = "数据id")
private Long dataGoodsId;
/**
* api参数id
*/
@ApiModelProperty(value = "api参数id")
private Long apiParamsId;
/**
* api服务名称
*/
@ApiModelProperty(value = "api服务名称")
private String apiName;
/**
* 请求类型(方式)
*/
@ApiModelProperty(value = "请求类型(方式)")
private String requestType;
/**
* api接口地址
*/
@ApiModelProperty(value = "api接口地址")
private String apiUrl;
/**
* api接口方法
*/
@ApiModelProperty(value = "api接口方法")
private String apiMethod;
/**
* api请求协议
*/
@ApiModelProperty(value = "api请求协议")
private String apiProtocl;
/**
* 返回类型
*/
@ApiModelProperty(value = "返回类型")
private String returnType;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date uptTime;
/**
* 价格类型
*/
@ApiModelProperty(value = "价格类型")
private String priceType;
/**
* 供应商名称
*/
@ApiModelProperty(value = "供应商名称")
private String supplierName;
/**
* 参数分类
*/
@ApiModelProperty(value = "参数分类:01公共参数,02请求参数,03响应参数,04请求头参数,05状态码参数")
private String paramsDiff;
@ApiModelProperty(value = "年(元)")
private BigDecimal yearType;
@ApiModelProperty(value = "季(元)")
private BigDecimal seasonType;
@ApiModelProperty(value = "月(元)")
private BigDecimal monthType;
@ApiModelProperty(value = "次(元)")
private BigDecimal secondType;
/**
* 参数名称
*/
@ApiModelProperty(value = "参数名称")
private String paramsName;
/**
* 参数类型
*/
@ApiModelProperty(value = "参数类型")
private String paramsTYpe;
/**
* 参数描述
*/
@ApiModelProperty(value = "参数描述")
private String paramsDesc;
/**
* 默认值
*/
@ApiModelProperty(value = "默认值")
private String defaultValue;
/**
* 是否必选
*/
@ApiModelProperty(value = "是否必选:Y是,N否")
private String ifRequird;
/**
* 数据类型
*/
@ApiModelProperty(value = "数据类型")
private String dataType;
/**
* api返回数据样例
*/
@ApiModelProperty(value = "api返回数据样例")
private String returnDataExample;
/**
* api请求样例
*/
@ApiModelProperty(value = "api请求样例")
private String requestExample;
public Long getGoodsApi() {
return goodsApi;
}
public void setGoodsApi(Long goodsApi) {
this.goodsApi = goodsApi;
}
public Long getDataGoodsId() {
return dataGoodsId;
}
public void setDataGoodsId(Long dataGoodsId) {
this.dataGoodsId = dataGoodsId;
}
public String getApiName() {
return apiName;
}
public void setApiName(String apiName) {
this.apiName = apiName;
}
public String getRequestType() {
return requestType;
}
public void setRequestType(String requestType) {
this.requestType = requestType;
}
public String getApiUrl() {
return apiUrl;
}
public void setApiUrl(String apiUrl) {
this.apiUrl = apiUrl;
}
public String getApiMethod() {
return apiMethod;
}
public void setApiMethod(String apiMethod) {
this.apiMethod = apiMethod;
}
public String getApiProtocl() {
return apiProtocl;
}
public void setApiProtocl(String apiProtocl) {
this.apiProtocl = apiProtocl;
}
public String getReturnType() {
return returnType;
}
public void setReturnType(String returnType) {
this.returnType = returnType;
}
public Date getUptTime() {
return uptTime;
}
public void setUptTime(Date uptTime) {
this.uptTime = uptTime;
}
public String getPriceType() {
return priceType;
}
public void setPriceType(String priceType) {
this.priceType = priceType;
}
public String getSupplierName() {
return supplierName;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public Long getApiParamsId() {
return apiParamsId;
}
public void setApiParamsId(Long apiParamsId) {
this.apiParamsId = apiParamsId;
}
public String getParamsDiff() {
return paramsDiff;
}
public void setParamsDiff(String paramsDiff) {
this.paramsDiff = paramsDiff;
}
public String getParamsName() {
return paramsName;
}
public void setParamsName(String paramsName) {
this.paramsName = paramsName;
}
public String getParamsTYpe() {
return paramsTYpe;
}
public void setParamsTYpe(String paramsTYpe) {
this.paramsTYpe = paramsTYpe;
}
public String getParamsDesc() {
return paramsDesc;
}
public void setParamsDesc(String paramsDesc) {
this.paramsDesc = paramsDesc;
}
public String getDefaultValue() {
return defaultValue;
}
public void setDefaultValue(String defaultValue) {
this.defaultValue = defaultValue;
}
public String getIfRequird() {
return ifRequird;
}
public void setIfRequird(String ifRequird) {
this.ifRequird = ifRequird;
}
public String getReturnDataExample() {
return returnDataExample;
}
public void setReturnDataExample(String returnDataExample) {
this.returnDataExample = returnDataExample;
}
public String getRequestExample() {
return requestExample;
}
public void setRequestExample(String requestExample) {
this.requestExample = requestExample;
}
}
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.controller.goods.bean.request; package com.jz.dm.mall.moduls.controller.goods.bean.request;
import com.jz.common.bean.BasePageBean; import com.jz.common.bean.BasePageBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
...@@ -9,150 +11,180 @@ import java.util.Date; ...@@ -9,150 +11,180 @@ import java.util.Date;
* @author ybz * @author ybz
* *
*/ */
@ApiModel(value = "数据集市--数据商品参数对象", description = "数据商品参数对象")
public class DataGoodsRequest extends BasePageBean { public class DataGoodsRequest extends BasePageBean {
/** /**
* 数据商品id * 数据商品id
*/ */
@ApiModelProperty(value = "数据商品id")
private Long dataGoodsId; private Long dataGoodsId;
/** /**
* 商品分类id(行业) * 商品分类id(行业)
*/ */
@ApiModelProperty(value = "商品分类id(行业)")
private Long categoryId; private Long categoryId;
/** /**
* 数据商户id * 数据商户id
*/ */
@ApiModelProperty(value = "数据商户id")
private Long userId; private Long userId;
/** /**
* 数据商品名称 * 数据商品名称
*/ */
@ApiModelProperty(value = "数据商品名称")
private String dataName; private String dataName;
/** /**
* 数据类型:01api,02数据包 * 数据类型:01api,02数据包
*/ */
@ApiModelProperty(value = "数据类型")
private String dataType; private String dataType;
/** /**
* 数据商品标签 * 数据商品标签
*/ */
@ApiModelProperty(value = "数据商品标签")
private String dataLabel; private String dataLabel;
/** /**
* 数据商品图片 * 数据商品图片
*/ */
@ApiModelProperty(value = "数据商品图片")
private String dataPicture; private String dataPicture;
/** /**
* 数据商品价格 * 数据商品价格
*/ */
@ApiModelProperty(value = "数据商品价格")
private BigDecimal dataPrice; private BigDecimal dataPrice;
/** /**
* 优惠价格 * 优惠价格
*/ */
@ApiModelProperty(value = "优惠价格")
private BigDecimal discountPrice; private BigDecimal discountPrice;
/** /**
* 价格类型:01免费,02收费 * 价格类型:01免费,02收费
*/ */
@ApiModelProperty(value = "价格类型")
private String priceType; private String priceType;
/** /**
* 商品规格 * 商品规格
*/ */
@ApiModelProperty(value = "商品规格")
private String goodsStandards; private String goodsStandards;
/** /**
* 数据状态:01预售,02在售中,03下架,04上架 * 数据状态:01预售,02在售中,03下架,04上架
*/ */
@ApiModelProperty(value = "数据状态")
private String dataStatus; private String dataStatus;
/** /**
* 审核状态:01待审核,02已审核,03未通过 * 审核状态:01待审核,02已审核,03未通过
*/ */
@ApiModelProperty(value = "审核状态")
private String auditStatus; private String auditStatus;
/** /**
* 清洗规则(脱敏校验) * 清洗规则(脱敏校验)
*/ */
@ApiModelProperty(value = "清洗规则")
private String cleanRule; private String cleanRule;
/** /**
* 驳回原因 * 驳回原因
*/ */
@ApiModelProperty(value = "驳回原因")
private String rejectReason; private String rejectReason;
/** /**
* 审核人 * 审核人
*/ */
@ApiModelProperty(value = "审核人")
private String auditPerson; private String auditPerson;
/** /**
* 审核时间起 * 审核时间起
*/ */
@ApiModelProperty(value = "审核时间起")
private Date auditTimeStart; private Date auditTimeStart;
/** /**
* 审核时间止 * 审核时间止
*/ */
@ApiModelProperty(value = "审核时间止")
private Date auditTimeEnd; private Date auditTimeEnd;
/** /**
* 创建时间起 * 创建时间起
*/ */
@ApiModelProperty(value = "创建时间起")
private Date creTimeStart; private Date creTimeStart;
/** /**
* 创建时间止 * 创建时间止
*/ */
@ApiModelProperty(value = "创建时间止")
private Date creTimeEnd; private Date creTimeEnd;
/** /**
* 创建人 * 创建人
*/ */
@ApiModelProperty(value = "创建人")
private String crePerson; private String crePerson;
/** /**
* 更新时间起 * 更新时间起
*/ */
@ApiModelProperty(value = "更新时间起")
private Date uptTimeStart; private Date uptTimeStart;
/** /**
* 更新时间止 * 更新时间止
*/ */
@ApiModelProperty(value = "更新时间止")
private Date uptTimeEnd; private Date uptTimeEnd;
/** /**
* 更新人 * 更新人
*/ */
@ApiModelProperty(value = "更新人")
private String uptPerson; private String uptPerson;
/** /**
* 删除标识 * 删除标识
*/ */
@ApiModelProperty(value = "删除标识")
private String delFlag; private String delFlag;
/** /**
* 年(元) * 年(元)
*/ */
@ApiModelProperty(value = "年(元)")
private BigDecimal yearType; private BigDecimal yearType;
/** /**
* 季(元) * 季(元)
*/ */
@ApiModelProperty(value = "季(元)")
private BigDecimal seasonType; private BigDecimal seasonType;
/** /**
* 月(元) * 月(元)
*/ */
@ApiModelProperty(value = "月(元)")
private BigDecimal monthType; private BigDecimal monthType;
/** /**
* 次(元) * 次(元)
*/ */
@ApiModelProperty(value = "次(元)")
private BigDecimal secondType; private BigDecimal secondType;
public Long getDataGoodsId() { public Long getDataGoodsId() {
......
...@@ -102,6 +102,10 @@ public class OrderDto { ...@@ -102,6 +102,10 @@ public class OrderDto {
*/ */
@ApiModelProperty(value = "失效日期") @ApiModelProperty(value = "失效日期")
private Date invalidTime; private Date invalidTime;
@ApiModelProperty(value = "有效期")
private String indate;
/** /**
* 价格类型:01免费,02收费 * 价格类型:01免费,02收费
*/ */
...@@ -137,6 +141,13 @@ public class OrderDto { ...@@ -137,6 +141,13 @@ public class OrderDto {
@ApiModelProperty(value = "数据分类") @ApiModelProperty(value = "数据分类")
private String dataType; private String dataType;
public String getIndate() {
return indate;
}
public void setIndate(String indate) {
this.indate = indate;
}
public Long getOrderId() { public Long getOrderId() {
return orderId; return orderId;
...@@ -337,4 +348,5 @@ public class OrderDto { ...@@ -337,4 +348,5 @@ public class OrderDto {
public void setDataType(String dataType) { public void setDataType(String dataType) {
this.dataType = dataType; this.dataType = dataType;
} }
} }
\ No newline at end of file
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;
}