Commit caa0e863 authored by ysongq's avatar ysongq

commit

parent abb8bc5e
alter table t_data_goods add use_person varchar(64) DEFAULT '0' COMMENT '使用人数';
alter table t_mall_customer add head_portrait_url varchar(512) COMMENT '头像';
\ No newline at end of file
alter table t_mall_customer add head_portrait_url varchar(512) COMMENT '头像';
alter table t_data_goods_api add file_deposit_id Bigint(20) default NULL COMMENT'文件存入id';
\ No newline at end of file
......@@ -20,7 +20,7 @@ public class CurrentUser {
* @return
*/
public static MallCustomerApiDto getCurrentUser(HttpServletRequest req) {
MallCustomerApiDto mallCustomerApiDto = (MallCustomerApiDto) req.getAttribute("mallCustomer");
MallCustomerApiDto mallCustomerApiDto = (MallCustomerApiDto) req.getSession().getAttribute("mallCustomer");
return mallCustomerApiDto;
}
......
......@@ -2,8 +2,10 @@ package com.jz.dm.mall.moduls.controller.finance;
import com.jz.common.base.BaseController;
import com.jz.common.bean.BasePageBean;
import com.jz.common.bean.MallCustomerApiDto;
import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.Constants;
import com.jz.common.constant.RedisMessageConstant;
import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.finance.bean.*;
import com.jz.dm.mall.moduls.service.FinanceTradeFlowService;
......@@ -12,6 +14,7 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
......@@ -28,6 +31,9 @@ import java.util.Map;
@RequestMapping("/financeTradeFlow")
@Api(tags = "商城--利润中心")
public class FinanceTradeFlowController extends BaseController {
@Autowired
private RedisTemplate redisTemplate;
/**
* 服务对象
*/
......@@ -45,9 +51,11 @@ public class FinanceTradeFlowController extends BaseController {
public Result<FinanceCustomerAssetsDto> getAccountMoney(HttpServletRequest requset) throws Exception {
Result<FinanceCustomerAssetsDto> result = new Result<>();
//requset.getSession().getAttribute(""); //从session中获取商城用户的 id,和企业资产账户id
MallCustomerApiDto currentUser = (MallCustomerApiDto) redisTemplate.opsForValue().get("user_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER);
Map map = new HashMap();
map.put("assetsId", 1); //企业资产账户id
map.put("departmentId", 1); //企业ID
map.put("assetsId", currentUser.getAssetsId()); //企业资产账户id
map.put("departmentId", currentUser.getDepartmentId()); //企业ID
FinanceCustomerAssetsDto dto = financeTradeFlowService.queryAccountMoneyByMap(map);
result.setData(dto);
return result;
......@@ -86,10 +94,11 @@ public class FinanceTradeFlowController extends BaseController {
@ApiOperation(value = "提现----获取账户余额", notes = "获取账户余额")
public Result<FinanceCustomerAssetsDto> getCashOutAccountMoney(HttpServletRequest requset) throws Exception {
Result<FinanceCustomerAssetsDto> result = new Result<>();
//requset.getSession().getAttribute(""); //从session中获取商城用户的 id,和企业资产账户id
MallCustomerApiDto currentUser = (MallCustomerApiDto) redisTemplate.opsForValue().get("user_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER);
Map map = new HashMap();
map.put("assetsId", 1); //企业资产账户id
map.put("departmentId", 1); //企业ID
map.put("assetsId", currentUser.getAssetsId()); //企业资产账户id
map.put("departmentId", currentUser.getDepartmentId()); //企业ID
FinanceCustomerAssetsDto dto = financeTradeFlowService.queryAccountMoneyByMap(map);
result.setData(dto);
return result;
......@@ -105,10 +114,11 @@ public class FinanceTradeFlowController extends BaseController {
@ApiOperation(value = "提现----是否存在提现为审核接口", notes = "获取可提现金额")
public Result<Object> getCashOutAuditStutas(HttpServletRequest requset) throws Exception {
Result<Object> result = new Result<>();
//requset.getSession().getAttribute(""); //从session中获取商城用户的 id,和企业资产账户id
MallCustomerApiDto currentUser = (MallCustomerApiDto) redisTemplate.opsForValue().get("user_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER);
Map map = new HashMap();
map.put("assetsId", 1); //企业资产账户id
map.put("departmentId", 1); //企业ID
map.put("assetsId", currentUser.getAssetsId()); //企业资产账户id
map.put("departmentId", currentUser.getDepartmentId()); //企业ID
FinanceCashOutDto dto = financeTradeFlowService.getCashOutAuditStutas(map);
if (dto.getCashOutMoney() != null) {
result.setData(dto.getCashOutMoney());
......
......@@ -16,6 +16,8 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* api商品(TDataGoodsApi)表控制层
*
......@@ -39,10 +41,10 @@ public class DataGoodsApiController extends BaseController {
*/
@GetMapping("/getGoodsDetails/{id}")
@ApiOperation(value = "点击商品查看商品详情", notes = "api商品")
public Result<DataGoodsApiDto> findById(@PathVariable(value = "id") Long id) {
public Result<List<DataGoodsApiDto>> findById(@PathVariable(value = "id") Long id) {
if (id != null) {
DataGoodsApiDto dataGoodsApi = tDataGoodsApiService.selectById(id);
return new Result<DataGoodsApiDto>(true, "查询商品详情成功!", StatusCode.OK, dataGoodsApi);
Result result = tDataGoodsApiService.selectById(id);
return new Result(true, "查询商品详情成功!", StatusCode.OK, result);
}
return new Result<>(false, "查询商品详情失败!",StatusCode.ERROR);
}
......
package com.jz.dm.mall.moduls.controller.goods.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @ClassName:
* @Author: Carl
* @Date: 2020/12/23
* @Version:
*/
@ApiModel(value = "数据详情")
public class DataDetailsDto implements Serializable {
@ApiModelProperty(value = "供应商名称")
private String supplierName;
@ApiModelProperty(value = "分类名称")
private String categoryName;
@ApiModelProperty(value = "价格类型")
private String priceType;
/**
* 请求类型(方式)
*/
@ApiModelProperty(value = "请求类型(方式)")
private String requestType;
/**
* api接口地址
*/
@ApiModelProperty(value = "api接口地址")
private String apiUrl;
/**
* api接口方法
*/
@ApiModelProperty(value = "api接口方法")
private String apiMethod;
/**
* 返回类型
*/
@ApiModelProperty(value = "返回类型")
private String returnType;
@ApiModelProperty(value = "年(元)")
private BigDecimal yearType;
@ApiModelProperty(value = "季(元)")
private BigDecimal seasonType;
@ApiModelProperty(value = "月(元)")
private BigDecimal monthType;
@ApiModelProperty(value = "次(元)")
private BigDecimal secondType;
public String getSupplierName() {
return supplierName;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
public String getPriceType() {
return priceType;
}
public void setPriceType(String priceType) {
this.priceType = priceType;
}
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 getReturnType() {
return returnType;
}
public void setReturnType(String returnType) {
this.returnType = returnType;
}
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 com.fasterxml.jackson.annotation.JsonFormat;
import com.jz.common.entity.DataGoodsApiParams;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @ClassName: 商品详情参数封装
......@@ -29,6 +31,9 @@ public class DataGoodsApiDto implements Serializable {
@ApiModelProperty(value = "数据id")
private Long dataGoodsId;
@ApiModelProperty(value = "分类名称")
private String categoryName;
/**
* api参数id
*/
......@@ -156,6 +161,10 @@ public class DataGoodsApiDto implements Serializable {
@ApiModelProperty(value = "api请求样例")
private String requestExample;
@ApiModelProperty(value = "公共参数数字")
private String paramsDiffNum;
public Long getGoodsApi() {
return goodsApi;
}
......@@ -323,4 +332,52 @@ public class DataGoodsApiDto implements Serializable {
public void setRequestExample(String requestExample) {
this.requestExample = requestExample;
}
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;
}
public String getParamsDiffNum() {
return paramsDiffNum;
}
public void setParamsDiffNum(String paramsDiffNum) {
this.paramsDiffNum = paramsDiffNum;
}
public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
}
......@@ -39,8 +39,8 @@ public class LogInfoController {
*/
@PostMapping("/getMallLogInfo")
@ApiOperation(value = "获取商城用户日志信息列表")
public Mono<PageInfoResponse<PlatformLog>> getLogInfo(@RequestBody @Validated LogInfoQueryReq req, HttpServletRequest request) {
return Mono.fromSupplier(() -> logInfoService.getMallUserLogInfo(req,request));
public PageInfoResponse<PlatformLog> getLogInfo(@RequestBody @Validated LogInfoQueryReq req, HttpServletRequest request) {
return logInfoService.getMallUserLogInfo(req,request);
}
/**
......@@ -48,9 +48,9 @@ public class LogInfoController {
* @Author: Mr.zhang
* @Date: 2020-12-2
*/
@PostMapping("/getMallLogDetail")
@GetMapping("/getMallLogDetail/{id}")
@ApiOperation(value = "获取商城用户日志信息详情")
public Mono<Result> getLogInfoDetail(@RequestParam(value = "日志信息Id") Long platformLogId) {
return Mono.fromSupplier(() -> logInfoService.getMallUserLogDetail(platformLogId));
public Result getLogInfoDetail(@PathVariable(value = "id") Long platformLogId) {
return logInfoService.getMallUserLogDetail(platformLogId);
}
}
......@@ -3,6 +3,7 @@ package com.jz.dm.mall.moduls.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
......@@ -15,92 +16,113 @@ import java.util.Date;
* @since 2020-12-01 10:41:42
*/
@TableName("t_platform_Log")
@ApiModel
@ApiModel(value = "日志管理实体类")
public class PlatformLog implements Serializable {
private static final long serialVersionUID = 112371340504875570L;
/**
* 日志id
*/
@ApiModelProperty(value = "日志id")
private Long platformLogId;
/**
* 请求ip
*/
@ApiModelProperty(value = "请求ip")
private String requestIp;
/**
* 调用人id
*/
@ApiModelProperty(value = "调用人id")
private String callerId;
/**
* 商品id
*/
@ApiModelProperty(value = "商品id")
private Long dataGoodsId;
/**
* apikey
*/
@ApiModelProperty(value = "apikey")
private String apiKey;
/**
* 请求参数
*/
@ApiModelProperty(value = "请求参数")
private String requestParams;
/**
* 返回参数
*/
@ApiModelProperty(value = "返回参数")
private String returnParams;
/**
* 请求路径
*/
@ApiModelProperty(value = "请求路径")
private String requestUrl;
/**
* 请求时间
*/
@ApiModelProperty(value = "请求时间")
private Date requestTime;
/**
* 服务类型:01年,02月,03次
*/
@ApiModelProperty(value = "服务类型:01年,02月,03次")
private String serviceType;
/**
* 数据类型:01api,02数据包
*/
@ApiModelProperty(value = "数据类型:01api,02数据包")
private String dataGoodsType;
/**
* 下载地址
*/
@ApiModelProperty(value = "下载地址")
private String downloadAddress;
/**
* 数据商品单价
*/
@ApiModelProperty(value = "数据商品单价")
private BigDecimal dataPrice;
/**
* 价格类型:01免费,02收费
*/
@ApiModelProperty(value = "价格类型:01免费,02收费")
private String priceType;
/**
* 调用总次数
*/
@ApiModelProperty(value = "调用总次数")
private Long totalTimes;
/**
* 已使用次数
*/
@ApiModelProperty(value = "已使用次数")
private Long usedTimes;
/**
* 剩余次数
*/
@ApiModelProperty(value = "剩余次数")
private Long remainTimes;
/**
* 有效开始时间
*/
@ApiModelProperty(value = "有效开始时间")
private Date startTime;
/**
* 有效结束时间
*/
@ApiModelProperty(value = "有效结束时间")
private Date endTime;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private Date creTime;
/**
* 删除标识
*/
@ApiModelProperty(value = "删除标识")
private String delFlag;
......
......@@ -5,6 +5,8 @@ import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsApiDto;
import com.jz.dm.mall.moduls.entity.DataGoodsApi;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* api商品(TDataGoodsApi)表数据库访问层
......@@ -19,6 +21,6 @@ public interface DataGoodsApiDao extends BaseMapper<DataGoodsApi> {
* @param id
* @return
*/
DataGoodsApiDto selectById(@Param("goodsApi") Long id);
List<DataGoodsApiDto> selectById(@Param("goodsApi") Long id);
}
\ No newline at end of file
package com.jz.dm.mall.moduls.service;
import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsApiDto;
import java.util.List;
/**
* api商品(TDataGoodsApi)表服务接口
......@@ -16,5 +19,5 @@ public interface DataGoodsApiService {
* @param id
* @return
*/
DataGoodsApiDto selectById(Long id);
Result selectById(Long id);
}
\ No newline at end of file
package com.jz.dm.mall.moduls.service.impl;
import com.jz.common.enums.PriceTypeEnum;
import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataDetailsDto;
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.mapper.DataGoodsApiDao;
import com.jz.dm.mall.moduls.service.DataGoodsApiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* api商品(TDataGoodsApi)表服务实现类
*
......@@ -28,8 +34,57 @@ public class DataGoodsApiServiceImpl implements DataGoodsApiService {
* @return
*/
@Override
public DataGoodsApiDto selectById(Long id) {
DataGoodsApiDto dataGoodsApiDto = tDataGoodsApiDao.selectById(id);
return dataGoodsApiDto;
public Result selectById(Long id) {
List<DataGoodsApiDto> dataGoodsApiDto = tDataGoodsApiDao.selectById(id);
List<DataGoodsApiDto> list1 = new ArrayList<>();
List<DataGoodsApiDto> list2 = new ArrayList<>();
List<DataGoodsApiDto> list3 = new ArrayList<>();
List<DataGoodsApiDto> list4 = new ArrayList<>();
List<DataGoodsApiDto> list5 = new ArrayList<>();
for (DataGoodsApiDto goodsApiDto : dataGoodsApiDto) {
if (goodsApiDto.getParamsDiffNum().equals("01")) {
list1.add(goodsApiDto);
}
if (goodsApiDto.getParamsDiffNum().equals("02")) {
list2.add(goodsApiDto);
}
if (goodsApiDto.getParamsDiffNum().equals("03")) {
list3.add(goodsApiDto);
}
if (goodsApiDto.getParamsDiffNum().equals("04")) {
list4.add(goodsApiDto);
}
if (goodsApiDto.getParamsDiffNum().equals("05")) {
list5.add(goodsApiDto);
}
}
Map<String, Object> map = new HashMap<>();
// 商品详情
DataGoodsApiDto goods = dataGoodsApiDto.get(0);
DataDetailsDto data = new DataDetailsDto();
data.setSupplierName(goods.getSupplierName());
data.setCategoryName(goods.getCategoryName());
data.setPriceType(goods.getPriceType());
data.setYearType(goods.getYearType());
data.setSeasonType(goods.getSeasonType());
data.setMonthType(goods.getMonthType());
data.setSecondType(goods.getSecondType());
data.setApiUrl(goods.getApiUrl());
data.setApiMethod(goods.getApiMethod());
data.setRequestType(goods.getRequestType());
data.setReturnType(goods.getReturnType());
map.put("dataInfo", data);
// 商品参数
map.put("pubParam", list1); // 公共参数
map.put("reqParam", list2); // 请求参数
map.put("resParam", list3); // 响应参数
map.put("reqExaParam", list4); // 请求示例
map.put("resExaParam", list5); // 响应示例
Result result = new Result();
result.setData(map);
return result;
}
}
\ No newline at end of file
......@@ -60,15 +60,15 @@ public class DataGoodsServiceImpl implements DataGoodsService {
}
//更新时间排序
if (dataGoodsListRequest.getUptTime() != null) {
if (!StringUtils.isEmpty(dataGoodsListRequest.getUptTime())) {
param.put("uptTime", dataGoodsListRequest.getUptTime());
}
// 使用人数
if (dataGoodsListRequest.getUsePerson() != null) {
if (!StringUtils.isEmpty(dataGoodsListRequest.getUsePerson())) {
param.put("usePerson", dataGoodsListRequest.getUsePerson());
}
// 综合排序
if (dataGoodsListRequest.getSynthesizeRank() != null) {
if (!StringUtils.isEmpty(dataGoodsListRequest.getSynthesizeRank())) {
param.put("synthesizeRank", dataGoodsListRequest.getSynthesizeRank());
}
......
......@@ -6,7 +6,9 @@ import com.jz.common.base.CurrentUser;
import com.jz.common.bean.MallCustomerApiDto;
import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.Constants;
import com.jz.common.constant.RedisMessageConstant;
import com.jz.common.constant.ResultMsg;
import com.jz.common.utils.SessionUtils;
import com.jz.dm.mall.moduls.entity.PlatformLog;
import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.log.bean.LogInfoQueryReq;
......@@ -15,6 +17,8 @@ import com.jz.dm.mall.moduls.mapper.MallCustomerDao;
import com.jz.dm.mall.moduls.mapper.PlatformLogDao;
import com.jz.dm.mall.moduls.service.LogInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......@@ -40,6 +44,8 @@ public class LogInfoServiceImpl implements LogInfoService {
@Resource
private MallCustomerDao mallCustomerDao;
@Autowired
private RedisTemplate redisTemplate;
/**
* 获取商城用户日志列表
* @param req
......@@ -49,7 +55,9 @@ public class LogInfoServiceImpl implements LogInfoService {
@Override
public PageInfoResponse<PlatformLog> getMallUserLogInfo(LogInfoQueryReq req, HttpServletRequest request) {
PageInfoResponse<PlatformLog> pageInfoResponse = new PageInfoResponse<>();
MallCustomerApiDto currentUser = CurrentUser.getCurrentUser(request);
//MallCustomerApiDto currentUser = CurrentUser.getCurrentUser(request);
MallCustomerApiDto currentUser = (MallCustomerApiDto) redisTemplate.opsForValue().get("user_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER);
// System.out.println(currentUser.getCustomerName());
if (null == currentUser) {
pageInfoResponse.setCode(Constants.SUCCESS_CODE);
pageInfoResponse.setMessage(ResultMsg.USER_NOT_EXIST.getMsg());
......@@ -60,6 +68,7 @@ public class LogInfoServiceImpl implements LogInfoService {
MallCustomer mallCustomer = mallCustomerDao.findById(currentUser.getCustomerId());
if (null == mallCustomer) {
pageInfoResponse.setCode(Constants.SUCCESS_CODE);
pageInfoResponse.setMessage(ResultMsg.USER_NOT_EXIST.getMsg());
return pageInfoResponse;
}
......
......@@ -4,6 +4,7 @@ package com.jz.dm.mall.moduls.service.impl;
import com.jz.common.bean.MallCustomerApiDto;
import com.jz.common.constant.RedisMessageConstant;
import com.jz.common.enums.UserTypeEnum;
import com.jz.common.utils.DateUtils;
import com.jz.common.utils.SessionUtils;
import com.jz.dm.mall.moduls.controller.customer.bean.CustomerDto;
......@@ -11,6 +12,7 @@ import com.jz.dm.mall.moduls.controller.customer.bean.req.CustomerRequest;
import com.jz.dm.mall.moduls.entity.MallCustomer;
import com.jz.dm.mall.moduls.mapper.MallCustomerDao;
import com.jz.dm.mall.moduls.service.MallCustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
......@@ -57,9 +59,10 @@ public class MallCustomerServiceImpl implements MallCustomerService {
mallCustomerApiDto.setAssetsId(mallCustomer.getAssetsId());
// 存入到session
request.getSession().setAttribute("mallCustomer", mallCustomerApiDto);
// 存入到redis
// redisTemplate.opsForValue().set("user_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER, mallCustomerApiDto, 3, TimeUnit.DAYS);
}
// 存入到redis
redisTemplate.opsForValue().set("user_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER, mallCustomerApiDto, 3, TimeUnit.DAYS);
}
return mallCustomer;
}
......@@ -83,8 +86,9 @@ public class MallCustomerServiceImpl implements MallCustomerService {
mallCustomerApiDto.setAssetsId(mallCustomer.getAssetsId());
// 存入到session
request.getSession().setAttribute("mallCustomer", mallCustomerApiDto);
// 存入到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;
}
......
......@@ -4,10 +4,12 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.Constants;
import com.jz.common.utils.DateUtils;
import com.jz.dm.mall.moduls.controller.order.bean.*;
import com.jz.dm.mall.moduls.mapper.OrderDao;
import com.jz.dm.mall.moduls.service.OrderService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......
......@@ -46,6 +46,8 @@
t2.season_type as seasonType,
t2.month_type as monthType,
t2.second_type as secondType,
t4.params_diff as paramsDiffNum,
t5.category_name as categoryName,
( CASE WHEN t2.data_type = '01' THEN 'api' WHEN t2.data_type = '02' THEN '数据包' END ) AS dataType,
( CASE WHEN t2.price_type = '01' THEN '免费' WHEN t2.price_type = '02' THEN '收费' END ) AS priceType,
( CASE WHEN t4.params_diff = '01' THEN '公共参数' WHEN t4.params_diff = '02' THEN '请求参数' WHEN t4.params_diff = '03' THEN '响应参数' WHEN t4.params_diff = '04' THEN '请求头参数' WHEN t4.params_diff = '05' THEN '状态码参数' end ) AS paramsDiff
......@@ -54,6 +56,7 @@
INNER JOIN t_data_goods t2 ON t1.data_goods_id = t2.data_goods_id
INNER JOIN t_sys_user t3 ON t3.user_id = t2.user_id
INNER JOIN t_data_goods_api_params t4 ON t4.goods_api = t1.goods_api
INNER JOIN t_data_goods_category t5 ON t5.category_id = t2.category_id
WHERE
1 = 1
AND t1.del_flag = 'N'
......
......@@ -217,11 +217,11 @@
<if test="priceType != null and priceType != ''">
and price_type = #{priceType}
</if>
<if test="uptTime != null">
<if test="uptTime != null ">
ORDER BY
#{uptTime} desc
</if>
<if test="usePerson != null">
<if test="usePerson != null ">
ORDER BY
#{usePerson} desc
</if>
......
......@@ -34,7 +34,7 @@
cre_person AS crePerson,upt_time AS uptTime,upt_person AS uptPerson,del_flag AS delFlag
</sql>
<select id="listMallLogInfo" resultMap="TPlatformLogMap">
<select id="listMallLogInfo" resultType="com.jz.dm.mall.moduls.entity.PlatformLog" parameterType="map">
SELECT <include refid="allFiled"/> FROM t_platform_log WHERE del_flag ='N'
AND caller_id=#{customerId}
</select>
......
......@@ -7,8 +7,9 @@ import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.Constants;
import com.jz.common.constant.ResultCode;
import com.jz.common.exception.ResponseException;
import com.jz.common.utils.DateUtils;
import com.jz.common.utils.DateUtils;
import com.jz.common.utils.Result;
import com.jz.common.utils.SessionUtils;
import com.jz.manage.moduls.controller.customer.bean.dto.CompanyDetailsDto;
......
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