Commit 1d53c633 authored by ysongq's avatar ysongq

上传api

parent 41f0aa68
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 '头像';
alter table t_data_goods_api add file_deposit_id Bigint(20) default NULL COMMENT'文件存入id';
\ No newline at end of file
alter table t_data_goods_api add file_deposit_id Bigint(20) default NULL COMMENT'文件存入id';
alter table t_data_goods add data_desc varchar(512) DEFAULT '0' COMMENT '数据描述';
alter table t_data_goods_api add api_type char(2) NOT NULL COMMENT 'api类型:01制作api,02制作数据包';
alter table t_data_goods_api add target_url varchar(128) DEFAULT '0' COMMENT '目标地址';
alter table t_data_goods_api add api_desc varchar(512) DEFAULT '0' COMMENT '接口描述';
\ No newline at end of file
......@@ -323,6 +323,22 @@ public class DateUtils {
return calendar;
}
// 获取当前时间时分秒+6位随机数
public static String getHMS() {
Calendar ca = Calendar.getInstance();
int minute=ca.get(Calendar.MINUTE);//分
int hour=ca.get(Calendar.HOUR);//小时
int second=ca.get(Calendar.SECOND);//秒
String format1 = String.format("%02d", hour);
String format2 = String.format("%02d", minute);
String format3 = String.format("%02d", second);
Random rdm = new Random();
String hash1 = Integer.toHexString(rdm.nextInt());
String capstr = hash1.substring(0, 6);
return format1+ format2 + format3+ capstr;
}
public static void main(String[] args) {
try {
......
This diff is collapsed.
package com.jz.manage.moduls.controller.customer.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* @ClassName: CustomerDto
......@@ -15,31 +16,38 @@ public class CustomerDto {
/**
* 用户id
*/
@ApiModelProperty(value = "用户id")
private Long customerId;
/**
* 企业id
*/
@ApiModelProperty(value = "企业id")
private Long departmentId;
/**
* 密码
*/
@ApiModelProperty(value = "密码")
private String password;
/**
* 账户
*/
@ApiModelProperty(value = "账户")
private String customerAccount;
/**
* 用户真实姓名
*/
@ApiModelProperty(value = "用户真实姓名")
private String customerName;
/**
* 联系电话
*/
@ApiModelProperty(value = "联系电话")
private String customerPhone;
/**
* 资产账户id
*/
@ApiModelProperty(value = "资产账户id")
private String assetsId;
public Long getCustomerId() {
......
......@@ -69,7 +69,7 @@ public class PlatformTradeFlowInfoController extends BaseController {
@ApiOperation(value = "财务管理---我的订单", notes = "我的订单")
public PageInfoResponse<OrderCountInfoDto> findList(@RequestBody BasePageBean pageBean, HttpServletRequest httpRequest) throws Exception {
PageInfoResponse<OrderCountInfoDto> pageInfo = new PageInfoResponse<OrderCountInfoDto>();
Map map = new HashMap();
// Map map = new HashMap();
//从session中获取平台用户id
//SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser");
//map.put("userId", user.getUserId());
......@@ -141,7 +141,7 @@ public class PlatformTradeFlowInfoController extends BaseController {
* @author Bellamy
* @since 2020-12-06
*/
@PostMapping(value = "/cashOutInfoById")
@GetMapping(value = "/cashOutInfoById")
@ApiOperation(value = "提现管理--提现详情", notes = "提现详情")
public Result<Object> getFinanceCashOutInfoById(@RequestParam(value = "cashOutId") String cashOutId, HttpServletRequest httpRequest) throws Exception {
Result<Object> result = new Result<>();
......
......@@ -4,6 +4,8 @@ import com.jz.common.bean.BasePageBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
* 平台利润中心--财务管理交易明细参数对象
*
......@@ -36,6 +38,17 @@ public class TradeDetilRequest extends BasePageBean {
@ApiModelProperty(value = "订单方式")
private String orderMethod;
@ApiModelProperty(value = "创建时间")
private Date creTime;
public Date getCreTime() {
return creTime;
}
public void setCreTime(Date creTime) {
this.creTime = creTime;
}
public String getDepartmentName() {
return departmentName;
}
......
package com.jz.manage.moduls.controller.goods;
import com.jz.common.entity.DataGoods;
import com.jz.common.utils.Result;
import com.jz.common.utils.StatusCode;
import com.jz.manage.moduls.controller.BaseController;
import com.jz.manage.moduls.controller.goods.bean.dto.DataGoodsApiDto;
import com.jz.manage.moduls.service.DataGoodsApiService;
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.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* api商品(TDataGoodsApi)表控制层
......@@ -49,4 +44,5 @@ public class DataGoodsApiController extends BaseController {
}
return new Result<>(false, "查询商品详情失败!", StatusCode.ERROR);
}
}
\ No newline at end of file
......@@ -5,15 +5,19 @@ import com.jz.common.bean.BaseResponse;
import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.Constants;
import com.jz.common.entity.DataGoods;
import com.jz.common.utils.Result;
import com.jz.manage.moduls.controller.BaseController;
import com.jz.manage.moduls.controller.goods.bean.dto.DataGoodsDto;
import com.jz.manage.moduls.controller.goods.bean.dto.DataGoodsListDto;
import com.jz.manage.moduls.controller.goods.bean.request.DataApiUpReq;
import com.jz.manage.moduls.controller.goods.bean.request.DataGoodsListRequest;
import com.jz.manage.moduls.controller.goods.bean.request.DataGoodsRequest;
import com.jz.manage.moduls.service.DataGoodsService;
import javax.servlet.http.HttpServletRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
......@@ -25,6 +29,7 @@ import org.springframework.web.bind.annotation.*;
*/
@RestController
@RequestMapping("dataGoods")
@Api(tags = "自营数据")
public class DataGoodsController extends BaseController {
/**
* 服务对象
......@@ -37,6 +42,7 @@ public class DataGoodsController extends BaseController {
* @return
*/
@PostMapping(value = "/findList")
@ApiOperation(value = "自营数据--列表查询数据")
public PageInfoResponse<DataGoodsListDto> findList(@RequestBody DataGoodsListRequest dataGoodsListRequest, HttpServletRequest httpRequest){
PageInfoResponse<DataGoodsListDto> pageInfo = new PageInfoResponse<>();
try {
......@@ -69,6 +75,27 @@ public class DataGoodsController extends BaseController {
return baseBeanResponse;
}
/**新增数据商品
* @param
* @return
*/
@PostMapping("/uploadApi")
@ApiOperation(value = "自营数据api上传", notes = "api上传")
public Result uploadApi(@RequestBody DataApiUpReq dataApiUpReq) throws Exception{
Result result = new Result();
try{
result = dataGoodsService.uploadApi(dataApiUpReq);
result.getMessage();
result.getCode();
result.getData();
}catch (Exception e) {
e.printStackTrace();
result.getMessage();
result.getCode();
}
return result;
}
/**删除数据商品
* @param DataGoodsRequest
* @return
......@@ -83,30 +110,12 @@ public class DataGoodsController extends BaseController {
baseResponse.setCode(Constants.FAILURE_CODE);
e.printStackTrace();
}
return baseResponse;
}
/**新增数据商品
* @param DataGoodsRequest
* @return
*/
@RequestMapping(method = RequestMethod.POST, value = "/add")
public BaseBeanResponse<DataGoods> add(@RequestBody DataGoods dataGoods, HttpServletRequest httpRequest){
BaseBeanResponse<DataGoods> baseBeanResponse = new BaseBeanResponse<DataGoods>();
try {
baseBeanResponse = dataGoodsService.add(dataGoods, httpRequest);
} catch (Exception e) {
baseBeanResponse.setMessage("新增失败");
baseBeanResponse.setCode(Constants.FAILURE_CODE);
e.printStackTrace();
}
return baseBeanResponse;
}
/**修改数据商品
* @param DataGoodsRequest
* @param
* @return
*/
@RequestMapping(method = RequestMethod.POST, value = "/edit")
......
package com.jz.manage.moduls.controller.goods.bean.request;
import com.jz.manage.moduls.entity.DataGoodsApiParams;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @ClassName:
* @Author: Carl
* @Date: 2020/12/29
* @Version:
*/
@Data
@ApiModel(value = "自营数据--api上传参数对象", description = "api上传参数对象")
public class DataApiUpReq {
/**
* api表
*/
@ApiModelProperty(value = "api服务名称")
private String apiName;
@ApiModelProperty(value = "请求类型")
private String requestType;
@ApiModelProperty(value = "接口地址")
private String apiUrl;
@ApiModelProperty(value = "api请求协议")
private String apiProtocl;
@ApiModelProperty(value = "api返回数据样例")
private String returnDataExample;
@ApiModelProperty(value = "api请求样例")
private String requestExample;
@ApiModelProperty(value = "返回类型")
private String returnType;
@ApiModelProperty(value = "apikey")
private String apiKey;
@ApiModelProperty(value = "加密方式")
private String encryMode;
@ApiModelProperty(value = "传输方式")
private String transMode;
@ApiModelProperty(value = "功能")
private String apiFunction;
@ApiModelProperty(value = "每单接口调用频率")
private String oneCallFrequency;
@ApiModelProperty(value = "每个接口的调用频率")
private String allCallFrequency;
@ApiModelProperty(value = "客户请求token")
private String requestToken;
@ApiModelProperty(value = "版本号")
private String versionNumber;
@ApiModelProperty(value = "创建人")
private String crePerson;
@ApiModelProperty(value = "创建时间")
private Date creTime;
@ApiModelProperty(value = "价格类型")
private String priceType;
@ApiModelProperty(value = "api类型")
private String apiType;
@ApiModelProperty(value = "接口描述",required = false)
private String apiDesc;
@ApiModelProperty(value = "目标地址",required = false)
private String targetUrl;
@ApiModelProperty(value = "超时时间")
private Date overTime;
/**
* goods表
*/
@ApiModelProperty(value = "数据名称")
private String dataName;
@ApiModelProperty(value = "商品分类")
private Long categoryId;
@ApiModelProperty(value = "数据id")
private String dataGoodsId;
@ApiModelProperty(value = "数据描述")
private String dataDesc;
@ApiModelProperty(value = "商品图片")
private String dataPicture;
@ApiModelProperty(value = "数据状态")
private String dataStatus;
@ApiModelProperty(value = "唯一数据商品标识")
private String apiOpenId;
@ApiModelProperty(value = "审核状态")
private String auditStatus;
@ApiModelProperty(value = "审核人")
private String auditPerson;
@ApiModelProperty(value = "审核时间")
private Date auditTime;
@ApiModelProperty(value = "年(元)")
private BigDecimal yearType;
@ApiModelProperty(value = "季(元)")
private BigDecimal seasonType;
@ApiModelProperty(value = "月(元)")
private BigDecimal monthType;
@ApiModelProperty(value = "次(元)")
private BigDecimal secondType;
/**
* apiParam
*/
@ApiModelProperty(value = "参数集合")
private List<DataGoodsApiParams> paramsList;
}
......@@ -37,8 +37,8 @@ public class PlatformLogController extends BaseController {
*/
@PostMapping("/listManageLogInfo")
@ApiOperation(value = "后台用户日志信息列表")
public Mono<Result<IPage<PlatformLog>>> getLogInfo(@RequestBody @Validated ManageLogInfoQueryReq req) {
return Mono.fromSupplier(() -> tPlatformLogService.listManageUserLogInfo(req));
public Result<IPage<PlatformLog>> getLogInfo(@RequestBody @Validated ManageLogInfoQueryReq req) {
return tPlatformLogService.listManageUserLogInfo(req);
}
/**
......@@ -46,9 +46,9 @@ public class PlatformLogController extends BaseController {
* @Author: Mr.zhang
* @Date: 2020-12-2
*/
@PostMapping("/getLogDetail")
@ApiOperation(value = "获取用户日志信息详情")
public Mono<Result> getLogInfoDetail(@RequestParam(value = "日志信息Id") Long platformLogId) {
return Mono.fromSupplier(() -> tPlatformLogService.getMallUserLogDetail(platformLogId));
@GetMapping("/getLogDetail/{id}")
@ApiOperation(value = "获取用id户日志信息详情")
public Result getLogInfoDetail(@PathVariable(value = "id")Long platformLogId) {
return tPlatformLogService.getMallUserLogDetail(platformLogId);
}
}
\ No newline at end of file
package com.jz.manage.moduls.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
......@@ -19,50 +23,63 @@ public class DataGoodsApiParams implements Serializable {
/**
* api参数id
*/
@ApiModelProperty("主健ID")
@TableId(value = "id", type = IdType.AUTO)
private Long apiParamsId;
/**
* api商品id
*/
@ApiModelProperty(value = "api商品id")
private Long goodsApi;
/**
* 参数分类:01公共参数,02请求参数,03响应参数,04请求头参数,05状态码参数
*/
@ApiModelProperty(value = "参数分类")
private String paramsDiff;
/**
* 参数名称
*/
@ApiModelProperty(value = "参数名称")
private String paramsName;
/**
* 参数类型
*/
@ApiModelProperty(value = "参数类型")
private String paramsType;
/**
* 参数描述
*/
@ApiModelProperty(value = "参数描述")
private String paramsDesc;
/**
* 默认值
*/
@ApiModelProperty(value = "默认值")
private String defaultValue;
/**
* 备注
*/
@ApiModelProperty(value = "备注")
private String remark;
/**
* 是否必选:Y是,N否
*/
@ApiModelProperty(value = "是否必选")
private String ifRequird;
/**
* 删除标识:Y是,N否
*/
@ApiModelProperty(value = "删除标识")
private String delFlag;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private Date creTime;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
private Date uptTime;
......
package com.jz.manage.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;
......@@ -20,88 +22,119 @@ public class PlatformLog implements Serializable {
/**
* 日志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 = "服务类型")
private String serviceType;
/**
* 数据类型:01api,02数据包
*/
*/@ApiModelProperty(value = "数据类型")
private String dataGoodsType;
/**
* 下载地址
*/
@ApiModelProperty(value = "下载地址")
private String downloadAddress;
/**
* 数据商品单价
*/
@ApiModelProperty(value = "数据商品单价")
private BigDecimal dataPrice;
/**
* 价格类型:01免费,02收费
*/
@ApiModelProperty(value = "价格类型")
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;
@ApiModelProperty(value = "调用人")
@TableField(exist = false)
private String customerName;
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public Long getPlatformLogId() {
return platformLogId;
......
package com.jz.manage.moduls.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jz.common.base.BaseMapper;
import com.jz.manage.moduls.entity.PlatformLog;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -17,7 +21,7 @@ public interface PlatformLogDao extends BaseMapper<PlatformLog> {
* 查询平台用户日志列表
* @return
*/
List<PlatformLog> listMallLogInfo();
List<PlatformLog> listMallLogInfo(IPage<PlatformLog> page, @Param("ew") Wrapper<PlatformLog> query);
}
\ No newline at end of file
package com.jz.manage.moduls.service;
import com.jz.common.utils.Result;
import com.jz.manage.moduls.controller.goods.bean.request.DataApiUpReq;
/**
......@@ -17,4 +18,6 @@ public interface DataGoodsApiService {
* @return
*/
Result selectById(Long id) throws Exception;
}
\ No newline at end of file
......@@ -6,8 +6,10 @@ import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.bean.BaseResponse;
import com.jz.common.bean.PageInfoResponse;
import com.jz.common.entity.DataGoods;
import com.jz.common.utils.Result;
import com.jz.manage.moduls.controller.goods.bean.dto.DataGoodsDto;
import com.jz.manage.moduls.controller.goods.bean.dto.DataGoodsListDto;
import com.jz.manage.moduls.controller.goods.bean.request.DataApiUpReq;
import com.jz.manage.moduls.controller.goods.bean.request.DataGoodsListRequest;
import com.jz.manage.moduls.controller.goods.bean.request.DataGoodsRequest;
......@@ -34,7 +36,11 @@ public interface DataGoodsService {
* @return
* @throws Exception
*/
public BaseBeanResponse<DataGoods> add(DataGoods dataGoods, HttpServletRequest httpRequest)throws Exception;
/**
* 自营数据-上传api
* @param dataApiUpReq
*/
Result uploadApi(DataApiUpReq dataApiUpReq)throws Exception;
/**主键查询数据商品
* @param DataGoodsRequest
......
package com.jz.manage.moduls.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jz.common.bean.SysUserDto;
import com.jz.common.constant.RedisMessageConstant;
import com.jz.common.constant.ResultCode;
import com.jz.common.constant.ResultMsg;
import com.jz.common.entity.DataGoods;
import com.jz.common.utils.DateUtils;
import com.jz.common.utils.Result;
import com.jz.common.utils.StatusCode;
import com.jz.manage.moduls.controller.goods.bean.dto.DataBasicDto;
import com.jz.manage.moduls.controller.goods.bean.dto.DataGoodsApiDto;
import com.jz.manage.moduls.controller.goods.bean.dto.DataInterfaceDto;
import com.jz.manage.moduls.controller.goods.bean.request.DataApiUpReq;
import com.jz.manage.moduls.entity.DataGoodsApi;
import com.jz.manage.moduls.entity.DataGoodsApiParams;
import com.jz.manage.moduls.mapper.DataGoodsApiDao;
import com.jz.manage.moduls.mapper.DataGoodsApiParamsDao;
import com.jz.manage.moduls.mapper.DataGoodsDao;
import com.jz.manage.moduls.service.DataGoodsApiService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
......@@ -29,6 +43,8 @@ public class DataGoodsApiServiceImpl implements DataGoodsApiService {
@Autowired
private DataGoodsApiDao tDataGoodsApiDao;
/**
* 主键查询数据详情
*
......@@ -95,4 +111,6 @@ public class DataGoodsApiServiceImpl implements DataGoodsApiService {
result.setData(map);
return Result.of_success(ResultMsg.SUCCESS, result);
}
}
\ No newline at end of file
......@@ -8,9 +8,11 @@ import com.github.pagehelper.PageInfo;
import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.Constants;
import com.jz.common.constant.ResultMsg;
import com.jz.manage.moduls.entity.MallCustomer;
import com.jz.manage.moduls.entity.PlatformLog;
import com.jz.common.utils.Result;
import com.jz.manage.moduls.controller.log.bean.ManageLogInfoQueryReq;
import com.jz.manage.moduls.mapper.MallCustomerDao;
import com.jz.manage.moduls.mapper.PlatformLogDao;
import com.jz.manage.moduls.service.PlatformLogService;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -29,15 +31,16 @@ public class PlatformLogServiceImpl implements PlatformLogService {
@Autowired
private PlatformLogDao tPlatformLogDao;
@Autowired
private MallCustomerDao mallCustomerDao;
@Override
public Result listManageUserLogInfo(ManageLogInfoQueryReq req) {
IPage<PlatformLog> page = new Page<>(req.getPageNum(), req.getPageSize());
QueryWrapper<PlatformLog> query = new QueryWrapper<>();
query.eq("del_flag" ,"N");
query.orderByDesc("cre_time");
IPage<PlatformLog> platformLogIPage = tPlatformLogDao.selectPage(page, query);
return Result.of_success(platformLogIPage);
query.eq("t1.del_flag" ,"N");
query.orderByDesc("t1.cre_time");
List<PlatformLog> platformLogs = tPlatformLogDao.listMallLogInfo(page, query);
return Result.of_success(platformLogs);
}
/**
......@@ -52,6 +55,10 @@ public class PlatformLogServiceImpl implements PlatformLogService {
query.eq("del_flag","N");
query.orderByDesc("cre_time");
PlatformLog platformLog = tPlatformLogDao.selectOne(query);
// 获取调用人
MallCustomer mallCustomer = mallCustomerDao.selectOne(
new QueryWrapper<MallCustomer>().eq("customer_id", platformLog.getCallerId()));
platformLog.setCustomerName(mallCustomer.getCustomerName());
if (null == platformLog){
return Result.of_error(ResultMsg.DATA_NOT_FOUND);
}
......
......@@ -58,28 +58,27 @@
t1.upt_time as uptTime,
(CASE WHEN t1.data_status = '01' then '预售'
WHEN t1.data_status = '02' then '在售中'
WHEN t1.data_status = '02' then '下架'
WHEN t1.data_status = '02' then '上架' end) dataStatus
WHEN t1.data_status = '03' then '下架'
WHEN t1.data_status = '04' then '上架' end) dataStatus
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
t_data_goods t1 INNER JOIN t_data_goods_category t2 ON t1.category_id = t2.category_id
where t1.del_flag = 'N'
and
t1.audit_status = '02'
<if test="dataGoodsId != null">
and data_goods_id = #{dataGoodsId}
and t1.data_goods_id = #{dataGoodsId}
</if>
<if test="categoryId != null">
and category_id = #{categoryId}
and t1.category_id = #{categoryId}
</if>
<if test="dataName != null and dataName != ''">
and data_name like concat('%',#{dataName},'%')
and t1.data_name like concat('%',#{dataName},'%')
</if>
<if test="dataType != null and dataType != ''">
and data_type = #{dataType}
and t1.data_type = #{dataType}
</if>
<if test="dataStatus != null and dataStatus != ''">
and data_status = #{dataStatus}
and t1.data_status = #{dataStatus}
</if>
order by t1.upt_time desc
</select>
......
......@@ -27,15 +27,17 @@
</resultMap>
<sql id="allFiled">
platform_log_id AS platformLogId,request_ip AS requestIp,caller_id AS callerId,data_goods_id AS dataGoodsId,
api_key AS apiKey,request_params AS requestParams,return_params AS returnParams,request_url AS requestUrl
,request_time AS requestTime,service_type AS serviceType,data_goods_type AS dataGoodsType,download_address AS downloadAddress,
data_price AS dataPrice,price_type AS priceType,total_times AS totalTimes,used_times AS usedTimes
,remain_times AS remainTimes,caller_type AS callerType,start_time AS startTime,end_time AS endTime,cre_time AS creTime,
cre_person AS crePerson,upt_time AS uptTime,upt_person AS uptPerson,del_flag AS delFlag
t1.platform_log_id AS platformLogId,t1.request_ip AS requestIp,t1.caller_id AS callerId,t1.data_goods_id AS dataGoodsId,
t1.api_key AS apiKey,t1.request_params AS requestParams,t1.return_params AS returnParams,t1.request_url AS requestUrl,
t1.request_time AS requestTime,t1.service_type AS serviceType,t1.data_goods_type AS dataGoodsType,t1.download_address AS downloadAddress,
t1.data_price AS dataPrice,t1.price_type AS priceType,t1.total_times AS totalTimes,t1.used_times AS usedTimes,t1.remain_times AS remainTimes,
t1.caller_type AS callerType,t1.start_time AS startTime,t1.end_time AS endTime,t1.cre_time AS creTime,t1.cre_person AS crePerson,
t1.upt_time AS uptTime,t1.upt_person AS uptPerson,t1.del_flag AS delFlag
</sql>
<select id="listMallLogInfo" resultType="com.jz.manage.moduls.entity.PlatformLog">
SELECT <include refid="allFiled"/> FROM t_platform_log
SELECT <include refid="allFiled"/>, t2.customer_name as customerName
FROM t_platform_log t1 INNER JOIN t_mall_customer t2 on t1.caller_id = t2.customer_id
${ew.customSqlSegment}
</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