Commit 8a159074 authored by zhangc's avatar zhangc

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

parents 80a2efb6 798f62ad
...@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType; ...@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -17,6 +19,7 @@ import java.util.Date; ...@@ -17,6 +19,7 @@ import java.util.Date;
*/ */
@TableName("t_data_goods") @TableName("t_data_goods")
@ApiModel @ApiModel
@Data
public class DataGoods implements Serializable { public class DataGoods implements Serializable {
private static final long serialVersionUID = 938517475031285541L; private static final long serialVersionUID = 938517475031285541L;
/** /**
...@@ -32,6 +35,9 @@ public class DataGoods implements Serializable { ...@@ -32,6 +35,9 @@ public class DataGoods implements Serializable {
* 数据商户id * 数据商户id
*/ */
private Long userId; private Long userId;
@ApiModelProperty(value = "唯一数据商品标识")
private String apiOpenId;
/** /**
* 数据商品名称 * 数据商品名称
*/ */
...@@ -126,212 +132,6 @@ public class DataGoods implements Serializable { ...@@ -126,212 +132,6 @@ public class DataGoods implements Serializable {
private BigDecimal secondType; 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 Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
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 BigDecimal getDataPrice() {
return dataPrice;
}
public void setDataPrice(BigDecimal dataPrice) {
this.dataPrice = dataPrice;
}
public BigDecimal getDiscountPrice() {
return discountPrice;
}
public void setDiscountPrice(BigDecimal discountPrice) {
this.discountPrice = discountPrice;
}
public String getPriceType() {
return priceType;
}
public void setPriceType(String priceType) {
this.priceType = priceType;
}
public String getGoodsStandards() {
return goodsStandards;
}
public void setGoodsStandards(String goodsStandards) {
this.goodsStandards = goodsStandards;
}
public String getDataStatus() {
return dataStatus;
}
public void setDataStatus(String dataStatus) {
this.dataStatus = dataStatus;
}
public String getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(String auditStatus) {
this.auditStatus = auditStatus;
}
public String getCleanRule() {
return cleanRule;
}
public void setCleanRule(String cleanRule) {
this.cleanRule = cleanRule;
}
public String getRejectReason() {
return rejectReason;
}
public void setRejectReason(String rejectReason) {
this.rejectReason = rejectReason;
}
public String getAuditPerson() {
return auditPerson;
}
public void setAuditPerson(String auditPerson) {
this.auditPerson = auditPerson;
}
public Date getAuditTime() {
return auditTime;
}
public void setAuditTime(Date auditTime) {
this.auditTime = auditTime;
}
public Date getCreTime() {
return creTime;
}
public void setCreTime(Date creTime) {
this.creTime = creTime;
}
public String getCrePerson() {
return crePerson;
}
public void setCrePerson(String crePerson) {
this.crePerson = crePerson;
}
public Date getUptTime() {
return uptTime;
}
public void setUptTime(Date uptTime) {
this.uptTime = uptTime;
}
public String getUptPerson() {
return uptPerson;
}
public void setUptPerson(String uptPerson) {
this.uptPerson = uptPerson;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
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;
}
} }
\ No newline at end of file
package com.jz.common.utils;
/**
* 常量
*
*/
public class Constants {
public static final String SIGN_TYPE_RSA = "RSA";
/**
* sha256WithRsa 算法请求类型
*/
public static final String SIGN_TYPE_RSA2 = "RSA2";
public static final String ENCRYPT_TYPE_AES = "AES";
public static final String APP_KEY = "app_key";
public static final String FORMAT = "format";
public static final String METHOD = "method";
public static final String TIMESTAMP = "timestamp";
public static final String VERSION = "version";
public static final String SIGN_TYPE = "sign_type";
public static final String SIGN = "sign";
public static final String CHARSET = "charset";
public static final String ENCRYPT_TYPE = "encrypt_type";
public static final String PARAMS = "params";
public static final String RESPONSE = "response";
public static final String SUCCESS = "SUCCESS";
/** 默认时间格式 **/
public static final String DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
/** Date默认时区 **/
public static final String DATE_TIMEZONE = "GMT+8";
/** UTF-8字符集 **/
public static final String CHARSET_UTF8 = "UTF-8";
/** GBK字符集 **/
public static final String CHARSET_GBK = "GBK";
/** JSON 应格式 */
public static final String FORMAT_JSON = "JSON";
/** 生成内部授权码格式 */
public static final String AUTH_INT = "INT";
/** 生成外部授权码格式 */
public static final String AUTH_OUT = "OUT";
/** XML 应格式 */
public static final String FORMAT_XML = "XML";
/** 默认版本 */
public static final String DEFAULT_VERSION = "1.0.0";
public static final int FILTER_ORDER_0 = 0;
public static final int FILTER_ORDER_1 = 1;
public static final int FILTER_ORDER_2 = 2;
public static final int FILTER_ORDER_3 = 3;
public static final int FILTER_ORDER_4 = 4;
public static final int FILTER_ORDER_5 = 5;
public static final int FILTER_ORDER_6 = 6;
}
This diff is collapsed.
...@@ -128,7 +128,6 @@ ...@@ -128,7 +128,6 @@
<version>1.0.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>
......
...@@ -44,9 +44,6 @@ public class DataGoodsApiController extends BaseController { ...@@ -44,9 +44,6 @@ public class DataGoodsApiController extends BaseController {
public Result<List<DataGoodsApiDto>> findById(@PathVariable(value = "id") Long id) { public Result<List<DataGoodsApiDto>> findById(@PathVariable(value = "id") Long id) {
if (id != null) { if (id != null) {
Result result = tDataGoodsApiService.selectById(id); Result result = tDataGoodsApiService.selectById(id);
result.getMessage();
result.getCode();
result.getData();
return result; return result;
} }
return new Result<>(false, "查询商品详情失败!",StatusCode.ERROR); return new Result<>(false, "查询商品详情失败!",StatusCode.ERROR);
......
...@@ -50,6 +50,9 @@ public class DataDetailsDto implements Serializable { ...@@ -50,6 +50,9 @@ public class DataDetailsDto implements Serializable {
@ApiModelProperty(value = "api接口方法") @ApiModelProperty(value = "api接口方法")
private String apiMethod; private String apiMethod;
@ApiModelProperty(value = "商品价格")
private BigDecimal dataPrice;
/** /**
* 返回类型 * 返回类型
*/ */
......
...@@ -94,6 +94,9 @@ public class DataGoodsApiDto implements Serializable { ...@@ -94,6 +94,9 @@ public class DataGoodsApiDto implements Serializable {
@ApiModelProperty(value = "价格类型") @ApiModelProperty(value = "价格类型")
private String priceType; private String priceType;
@ApiModelProperty(value = "商品价格")
private BigDecimal dataPrice;
/** /**
* 供应商名称 * 供应商名称
*/ */
......
...@@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.*; ...@@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.*;
*/ */
@RestController @RestController
@RequestMapping("/pay") @RequestMapping("/pay")
@CrossOrigin
@Api(tags = "支付controller") @Api(tags = "支付controller")
public class PayController { public class PayController {
......
...@@ -21,6 +21,6 @@ public interface DataGoodsApiDao extends BaseMapper<DataGoodsApi> { ...@@ -21,6 +21,6 @@ public interface DataGoodsApiDao extends BaseMapper<DataGoodsApi> {
* @param id * @param id
* @return * @return
*/ */
List<DataGoodsApiDto> selectById(@Param("goodsApi") Long id); List<DataGoodsApiDto> selectById(@Param("dataGoodsId") Long id);
} }
\ No newline at end of file
...@@ -81,6 +81,7 @@ public class DataGoodsApiServiceImpl implements DataGoodsApiService { ...@@ -81,6 +81,7 @@ public class DataGoodsApiServiceImpl implements DataGoodsApiService {
data.setReturnType(goods.getReturnType()); data.setReturnType(goods.getReturnType());
data.setDataPicture(goods.getDataPicture()); data.setDataPicture(goods.getDataPicture());
data.setDataDesc(goods.getDataDesc()); data.setDataDesc(goods.getDataDesc());
data.setDataPrice(goods.getDataPrice());
map.put("dataInfo", data); map.put("dataInfo", data);
// 商品参数 // 商品参数
......
...@@ -61,7 +61,7 @@ public class MallCustomerServiceImpl implements MallCustomerService { ...@@ -61,7 +61,7 @@ public class MallCustomerServiceImpl implements MallCustomerService {
request.getSession().setAttribute("mallCustomer", mallCustomerApiDto); request.getSession().setAttribute("mallCustomer", mallCustomerApiDto);
// 存入到redis // 存入到redis
redisTemplate.opsForValue().set("user_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER, mallCustomerApiDto, 3, TimeUnit.DAYS); redisTemplate.opsForValue().set("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER, mallCustomerApiDto, 3, TimeUnit.DAYS);
} }
return mallCustomer; return mallCustomer;
} }
...@@ -88,7 +88,7 @@ public class MallCustomerServiceImpl implements MallCustomerService { ...@@ -88,7 +88,7 @@ public class MallCustomerServiceImpl implements MallCustomerService {
request.getSession().setAttribute("mallCustomer", mallCustomerApiDto); request.getSession().setAttribute("mallCustomer", mallCustomerApiDto);
// 存入到redis // 存入到redis
redisTemplate.opsForValue().set("user_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER, mallCustomerApiDto, 3, TimeUnit.DAYS); redisTemplate.opsForValue().set("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER, mallCustomerApiDto, 3, TimeUnit.DAYS);
} }
return mallCustomer; return mallCustomer;
} }
......
...@@ -131,20 +131,24 @@ public class PayServiceImpl implements PayService { ...@@ -131,20 +131,24 @@ public class PayServiceImpl implements PayService {
} }
BigDecimal subtract = bigDecimal.subtract(bigDecima2); BigDecimal subtract = bigDecimal.subtract(bigDecima2);
String uri = "http://127.0.0.1:8088/api/auth/mall-user-auth-api"; String uri = "http://127.0.0.1:8088/api/auth/mall-user-auth-api"; // TODO
AuthMallUserApiReq apiReq = new AuthMallUserApiReq(); AuthMallUserApiReq apiReq = new AuthMallUserApiReq();
if ("04".equals(payDto.getPurchaseMethod())) {
apiReq.setAuthMode(AuthModeEnum.RECORD_TIME_MODE);
}else {
apiReq.setAuthMode(AuthModeEnum.RECORD_TIME_MODE);
}
apiReq.setApiKey(payDto.getApiKey()); apiReq.setApiKey(payDto.getApiKey());
apiReq.setAuthMode(AuthModeEnum.RECORD_TIME_MODE);
apiReq.setAuthType(AuthTypeEnum.DATA_BANK_AUTH); apiReq.setAuthType(AuthTypeEnum.DATA_BANK_AUTH);
apiReq.setOrgCode("WAISJYX40E3e"); // TODO apiReq.setOrgCode("WAISJYX40E3e"); // TODO
apiReq.setOrgType("OUT"); apiReq.setOrgType("OUT");
apiReq.setUserId(payDto.getCustomerId() + ""); apiReq.setUserId(payDto.getCustomerId() + "");
apiReq.setValidStartTime(order.getTakeEffectTime()); apiReq.setValidStartTime(order.getTakeEffectTime());
apiReq.setValidEndTime(order.getInvalidTime()); apiReq.setValidEndTime(order.getInvalidTime());
String post = RestTemplateUtils.post(uri, JSON.toJSONString(apiReq)); String post = RestTemplateUtils.post(uri, JSON.toJSONString(apiReq));
JSONObject params = JSONObject.parseObject(post); JSONObject params = JSONObject.parseObject(post);
if (params.get("success").equals("false") || StringUtils.isEmpty(params.get("data"))){ if (!params.get("code").equals(200) || StringUtils.isEmpty(params.get("data"))){
return Result.of_error("授权失败!"); return Result.of_error("授权失败!");
} }
assets.setUseMoney(subtract); assets.setUseMoney(subtract);
...@@ -159,7 +163,7 @@ public class PayServiceImpl implements PayService { ...@@ -159,7 +163,7 @@ public class PayServiceImpl implements PayService {
FinanceTradeFlow flow = new FinanceTradeFlow(); FinanceTradeFlow flow = new FinanceTradeFlow();
flow.setAssetsId(assetsId); flow.setAssetsId(assetsId);
flow.setOrderId(orderId); flow.setOrderId(orderId);
// flow.setTradeFlowNumber();// 交易流水编号 flow.setTradeFlowNumber(NumberUtils.getDealNum());// 交易流水编号
flow.setTradeMoney(payDto.getDataPrice()); flow.setTradeMoney(payDto.getDataPrice());
flow.setTradeType("03"); flow.setTradeType("03");
flow.setCreTime(DateUtils.getToday()); flow.setCreTime(DateUtils.getToday());
...@@ -167,7 +171,7 @@ public class PayServiceImpl implements PayService { ...@@ -167,7 +171,7 @@ public class PayServiceImpl implements PayService {
flow.setTradeFlowNumber(NumberUtils.getDealNum()); flow.setTradeFlowNumber(NumberUtils.getDealNum());
financeTradeFlowDao.addFlow(flow); financeTradeFlowDao.addFlow(flow);
} }
return Result.of_success(ResultMsg.SUCCESS, ResultCode.SUCCESS); return Result.of_success(ResultMsg.SUCCESS,params);
} }
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
t1.return_data_example AS returnDataExample, t1.return_data_example AS returnDataExample,
t1.request_example AS requestExample, t1.request_example AS requestExample,
t1.api_key as apiKey, t1.api_key as apiKey,
t2.data_price as dataPrice,
t2.data_picture as dataPicture, t2.data_picture as dataPicture,
t3.supplier_name AS supplierName, t3.supplier_name AS supplierName,
t4.api_params_id AS apiParamsId, t4.api_params_id AS apiParamsId,
...@@ -56,13 +57,13 @@ ...@@ -56,13 +57,13 @@
( 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 ( 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
FROM FROM
t_data_goods_api t1 t_data_goods_api t1
INNER JOIN t_data_goods t2 ON t1.data_goods_id = t2.data_goods_id left 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 left 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_api_params t4 ON t4.goods_api = t1.goods_api
INNER JOIN t_data_goods_category t5 ON t5.category_id = t2.category_id INNER JOIN t_data_goods_category t5 ON t5.category_id = t2.category_id
WHERE WHERE
1 = 1 1 = 1
AND t1.del_flag = 'N' AND t1.del_flag = 'N'
<if test="goodsApi != null"> and t1.goods_api = #{goodsApi}</if> <if test="dataGoodsId != null"> and t2.data_goods_id = #{dataGoodsId}</if>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -158,67 +158,4 @@ ...@@ -158,67 +158,4 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<excludes>
<exclude>static/**</exclude>
<exclude>xls/**</exclude>
<exclude>conf/**</exclude>
<exclude>emails/**</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<includes>
<include>static/**</include>
<include>xls/**</include>
<include>conf/**</include>
<include>emails/**</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>1.2.8.RELEASE</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
<!-- 过滤后缀为pem、pfx的证书文件 -->
<nonFilteredFileExtensions>
<nonFilteredFileExtension>p12</nonFilteredFileExtension>
<nonFilteredFileExtension>pem</nonFilteredFileExtension>
<nonFilteredFileExtension>pfx</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
</plugins>
</build>
</project> </project>
\ No newline at end of file
package com.jz.manage; package com.jz.manage;
import com.jz.common.utils.HttpsUtils;
import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
...@@ -21,7 +22,7 @@ public class manageApplication { ...@@ -21,7 +22,7 @@ public class manageApplication {
} }
@Bean @Bean
public RestTemplate restTemplate() { public HttpsUtils restTemplate() {
return new RestTemplate(); return new HttpsUtils();
} }
} }
...@@ -12,6 +12,7 @@ import com.jz.manage.moduls.controller.customer.bean.request.EnterpriseAuditRequ ...@@ -12,6 +12,7 @@ import com.jz.manage.moduls.controller.customer.bean.request.EnterpriseAuditRequ
import com.jz.manage.moduls.controller.customer.bean.request.SaveCustomerRequest; import com.jz.manage.moduls.controller.customer.bean.request.SaveCustomerRequest;
import com.jz.manage.moduls.service.DepartmentService; import com.jz.manage.moduls.service.DepartmentService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -79,7 +80,7 @@ public class DepartmentController extends BaseController { ...@@ -79,7 +80,7 @@ public class DepartmentController extends BaseController {
* @return * @return
*/ */
@PostMapping(value = "/audit/{id}") @PostMapping(value = "/audit/{id}")
@ApiModelProperty(value = "企业审核") @ApiOperation(value = "企业审核")
public Result audit(@PathVariable(value = "id") Long id, HttpServletRequest req) throws Exception{ public Result audit(@PathVariable(value = "id") Long id, HttpServletRequest req) throws Exception{
if (id != null) { if (id != null) {
departmentService.audit(id, req); departmentService.audit(id, req);
...@@ -96,12 +97,10 @@ public class DepartmentController extends BaseController { ...@@ -96,12 +97,10 @@ public class DepartmentController extends BaseController {
* @throws Exception * @throws Exception
*/ */
@PostMapping(value = "/add") @PostMapping(value = "/add")
@ApiModelProperty(value = "添加用户") @ApiOperation(value = "添加用户")
public Result add(@RequestBody SaveCustomerRequest saveCustomerRequest, HttpServletRequest req) throws Exception { public Result add(@RequestBody SaveCustomerRequest saveCustomerRequest, HttpServletRequest req) throws Exception {
if (saveCustomerRequest != null) { if (saveCustomerRequest != null) {
Result result = departmentService.add(saveCustomerRequest, req); Result result = departmentService.add(saveCustomerRequest, req);
result.getMessage();
result.getCode();
return result; return result;
} }
return new Result<CompanyDetailsDto>(false, "添加用户失败!", StatusCode.ERROR); return new Result<CompanyDetailsDto>(false, "添加用户失败!", StatusCode.ERROR);
......
...@@ -7,6 +7,7 @@ import lombok.Data; ...@@ -7,6 +7,7 @@ import lombok.Data;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
...@@ -25,8 +26,6 @@ public class DataApiUpReq implements Serializable { ...@@ -25,8 +26,6 @@ public class DataApiUpReq implements Serializable {
/** /**
* api表 * api表
*/ */
@ApiModelProperty(value = "api服务名称")
private String apiName;
@ApiModelProperty(value = "请求类型") @ApiModelProperty(value = "请求类型")
private String requestType; private String requestType;
...@@ -40,46 +39,28 @@ public class DataApiUpReq implements Serializable { ...@@ -40,46 +39,28 @@ public class DataApiUpReq implements Serializable {
@ApiModelProperty(value = "api返回数据样例") @ApiModelProperty(value = "api返回数据样例")
private String returnDataExample; private String returnDataExample;
@ApiModelProperty(value = "api请求样例") @ApiModelProperty(value = "返回类型 json/flow")
private String requestExample;
@ApiModelProperty(value = "返回类型")
private String returnType; private String returnType;
@ApiModelProperty(value = "apikey") @ApiModelProperty(value = "加密方式 MD5/RSA")
private String apiKey;
@ApiModelProperty(value = "加密方式")
private String encryMode; private String encryMode;
@ApiModelProperty(value = "传输方式") @ApiModelProperty(value = "传输方式 HTTP/HTTPS")
private String transMode; private String transMode;
@ApiModelProperty(value = "功能") @ApiModelProperty(value = "功能")
private String apiFunction; private String apiFunction;
@ApiModelProperty(value = "每单接口调用频率")
private String oneCallFrequency;
@ApiModelProperty(value = "每个接口的调用频率")
private String allCallFrequency;
@ApiModelProperty(value = "客户请求token") @ApiModelProperty(value = "客户请求token")
private String requestToken; private String requestToken;
@ApiModelProperty(value = "版本号") @ApiModelProperty(value = "创建人", hidden = true)
private String versionNumber;
@ApiModelProperty(value = "创建人")
private String crePerson; private String crePerson;
@ApiModelProperty(value = "创建时间")
private Date creTime;
@ApiModelProperty(value = "价格类型") @ApiModelProperty(value = "价格类型")
private String priceType; private String priceType;
@ApiModelProperty(value = "api类型") @ApiModelProperty(value = "api类型 01:api 02: 数据包")
private String apiType; private String apiType;
@ApiModelProperty(value = "接口描述",required = false) @ApiModelProperty(value = "接口描述",required = false)
...@@ -99,30 +80,19 @@ public class DataApiUpReq implements Serializable { ...@@ -99,30 +80,19 @@ public class DataApiUpReq implements Serializable {
@ApiModelProperty(value = "商品分类") @ApiModelProperty(value = "商品分类")
private Long categoryId; private Long categoryId;
@ApiModelProperty(value = "数据id")
private String dataGoodsId;
@ApiModelProperty(value = "数据描述") @ApiModelProperty(value = "数据描述")
private String dataDesc; private String dataDesc;
@ApiModelProperty(value = "商品图片") @ApiModelProperty(value = "商品图片")
private String dataPicture; private String dataPicture;
@ApiModelProperty(value = "数据状态")
private String dataStatus;
@ApiModelProperty(value = "唯一数据商品标识") @ApiModelProperty(value = "唯一数据商品标识")
private String apiOpenId; private String apiOpenId;
@ApiModelProperty(value = "审核状态") @ApiModelProperty(value = "审核人" , hidden = true)
private String auditStatus;
@ApiModelProperty(value = "审核人")
private String auditPerson; private String auditPerson;
@ApiModelProperty(value = "审核时间")
private Date auditTime;
@ApiModelProperty(value = "年(元)") @ApiModelProperty(value = "年(元)")
private BigDecimal yearType; private BigDecimal yearType;
...@@ -138,6 +108,26 @@ public class DataApiUpReq implements Serializable { ...@@ -138,6 +108,26 @@ public class DataApiUpReq implements Serializable {
/** /**
* apiParam * apiParam
*/ */
@ApiModelProperty(value = "参数集合") @ApiModelProperty(value = "请求头")
private List<DataGoodsApiParams> paramsList; private List<DataGoodsApiParams> reqHeaders;
@ApiModelProperty(value = "请求参数")
private List<DataGoodsApiParams> requestParam;
@ApiModelProperty(value = "响应参数")
private List<DataGoodsApiParams> responseParam;
@ApiModelProperty(value = "固定参数")
private List<DataGoodsApiParams> inboxParam;
@ApiModelProperty(value = "响应状态码参数")
public List<DataGoodsApiParams> respCode;
/**
* 接口需要的参数
*/
@ApiModelProperty(value = "接入类型:对应字典表key",required = true)
@NotNull(message = "接入类型不能为空")
public String joinType;
} }
package com.jz.manage.moduls.controller.goods.bean.request; package com.jz.manage.moduls.controller.goods.bean.request;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
/** /**
* @author ZC * @author ZC
...@@ -24,23 +26,32 @@ public class MakeDataBankApiReq implements Serializable { ...@@ -24,23 +26,32 @@ public class MakeDataBankApiReq implements Serializable {
@NotNull(message = "api类型不能为空") @NotNull(message = "api类型不能为空")
public String apiType; public String apiType;
// @ApiModelProperty(value = "apiId 等价于apiKey",required = true)
// @NotNull(message = "apiId不能为空")
// public String apiId;
@ApiModelProperty(value = "接口描述",required = false)
public String apiDesc;
// @ApiModelProperty(value = "api版本",required = false)
// public String version;
@ApiModelProperty(value = "传输方式(1为HTTPS,2为HTTP)",required = true) @ApiModelProperty(value = "传输方式(1为HTTPS,2为HTTP)",required = true)
@NotNull(message = "传输方式不能为空") @NotNull(message = "传输方式不能为空")
public String apiProtocl; public String apiProtocl;
@ApiModelProperty(value = "加密方式0 无,1:MD5 2:RSA",required = true) @ApiModelProperty(value = "加密方式0 无,1:MD5 2:RSA",required = true)
@NotNull(message = "加密方式不能为空") @NotNull(message = "加密方式不能为空")
public String type; public String signType;
@ApiModelProperty(value = "接入类型:对应字典表key",required = true)
@NotNull(message = "接入类型不能为空")
public String joinType;
@ApiModelProperty(value = "输出类型:flow 流,json json形式", required = true)
@NotNull(message = "输出类型不能为空")
public String outputType;
@ApiModelProperty(value = "是否分页 page", required = true)
// @NotNull(message = "分页不能为空")
public String page;
@ApiModelProperty(value = "接口描述",required = false)
public String apiDesc;
@ApiModelProperty(value = "接口地址")
private String apiUrl;
@ApiModelProperty(value = "目标地址",required = false) @ApiModelProperty(value = "目标地址",required = false)
public String targetUrl; public String targetUrl;
...@@ -51,6 +62,9 @@ public class MakeDataBankApiReq implements Serializable { ...@@ -51,6 +62,9 @@ public class MakeDataBankApiReq implements Serializable {
@ApiModelProperty(value = "api描述",required = false) @ApiModelProperty(value = "api描述",required = false)
public String apiFunction; public String apiFunction;
@ApiModelProperty(value = "固定参数", required = false)
private String inboxParam;
@ApiModelProperty(value = "请求头",required = false) @ApiModelProperty(value = "请求头",required = false)
public String reqHeaders; public String reqHeaders;
...@@ -66,7 +80,9 @@ public class MakeDataBankApiReq implements Serializable { ...@@ -66,7 +80,9 @@ public class MakeDataBankApiReq implements Serializable {
@ApiModelProperty(value = "api样例",required = false) @ApiModelProperty(value = "api样例",required = false)
public String apiExample; public String apiExample;
@ApiModelProperty(value = "文件id") @ApiModelProperty(value = "文件id",required = false)
//@NotNull(message = "文件id不能为空")
public Long fileId; public Long fileId;
} }
...@@ -2,6 +2,7 @@ package com.jz.manage.moduls.entity; ...@@ -2,6 +2,7 @@ package com.jz.manage.moduls.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -77,6 +78,9 @@ public class DataGoods implements Serializable { ...@@ -77,6 +78,9 @@ public class DataGoods implements Serializable {
* 驳回原因 * 驳回原因
*/ */
private String rejectReason; private String rejectReason;
@ApiModelProperty(value = "唯一数据商品标识")
private String apiOpenId;
/** /**
* 审核人 * 审核人
*/ */
......
package com.jz.manage.moduls.entity; package com.jz.manage.moduls.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
...@@ -14,11 +18,14 @@ import java.util.Date; ...@@ -14,11 +18,14 @@ import java.util.Date;
*/ */
@TableName("t_data_goods_api") @TableName("t_data_goods_api")
@ApiModel @ApiModel
@Data
public class DataGoodsApi implements Serializable { public class DataGoodsApi implements Serializable {
private static final long serialVersionUID = -14346819849726413L; private static final long serialVersionUID = -14346819849726413L;
/** /**
* api商品id * api商品id
*/ */
@ApiModelProperty(value = "主健ID")
@TableId(value = "id", type = IdType.AUTO)
private Long goodsApi; private Long goodsApi;
/** /**
* 数据id * 数据id
...@@ -81,133 +88,22 @@ public class DataGoodsApi implements Serializable { ...@@ -81,133 +88,22 @@ public class DataGoodsApi implements Serializable {
*/ */
private String delFlag; private String delFlag;
/**
* 加密方式
*/
private String encryMode;
public Long getGoodsApi() { /**
return goodsApi; * 传输方式
} */
private String transMode;
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 getReturnDataExample() {
return returnDataExample;
}
public void setReturnDataExample(String returnDataExample) {
this.returnDataExample = returnDataExample;
}
public String getRequestExample() {
return requestExample;
}
public void setRequestExample(String requestExample) {
this.requestExample = requestExample;
}
public String getReturnType() {
return returnType;
}
public void setReturnType(String returnType) {
this.returnType = returnType;
}
public String getApiKey() {
return apiKey;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
public Date getCreTime() {
return creTime;
}
public void setCreTime(Date creTime) {
this.creTime = creTime;
}
public String getCrePerson() {
return crePerson;
}
public void setCrePerson(String crePerson) {
this.crePerson = crePerson;
}
public String getUptPerson() {
return uptPerson;
}
public void setUptPerson(String uptPerson) {
this.uptPerson = uptPerson;
}
public Date getUptTime() { /**
return uptTime; * 版本号
} */
private String versionNumber;
public void setUptTime(Date uptTime) {
this.uptTime = uptTime;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
} }
\ No newline at end of file
...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId; ...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
...@@ -18,6 +19,7 @@ import java.util.Date; ...@@ -18,6 +19,7 @@ import java.util.Date;
*/ */
@TableName("t_data_goods_api_params") @TableName("t_data_goods_api_params")
@ApiModel @ApiModel
@Data
public class DataGoodsApiParams implements Serializable { public class DataGoodsApiParams implements Serializable {
private static final long serialVersionUID = 944366688061324185L; private static final long serialVersionUID = 944366688061324185L;
/** /**
...@@ -76,6 +78,10 @@ public class DataGoodsApiParams implements Serializable { ...@@ -76,6 +78,10 @@ public class DataGoodsApiParams implements Serializable {
*/ */
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
private Date creTime; private Date creTime;
@ApiModelProperty(value = "创建人")
private String crePerson;
/** /**
* 更新时间 * 更新时间
*/ */
...@@ -83,100 +89,6 @@ public class DataGoodsApiParams implements Serializable { ...@@ -83,100 +89,6 @@ public class DataGoodsApiParams implements Serializable {
private Date uptTime; private Date uptTime;
public Long getApiParamsId() {
return apiParamsId;
}
public void setApiParamsId(Long apiParamsId) {
this.apiParamsId = apiParamsId;
}
public Long getGoodsApi() {
return goodsApi;
}
public void setGoodsApi(Long goodsApi) {
this.goodsApi = goodsApi;
}
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 getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getIfRequird() {
return ifRequird;
}
public void setIfRequird(String ifRequird) {
this.ifRequird = ifRequird;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public Date getCreTime() {
return creTime;
}
public void setCreTime(Date creTime) {
this.creTime = creTime;
}
public Date getUptTime() {
return uptTime;
}
public void setUptTime(Date uptTime) {
this.uptTime = uptTime;
}
} }
\ No newline at end of file
...@@ -51,7 +51,7 @@ public class SysUserServiceImpl implements SysUserService { ...@@ -51,7 +51,7 @@ public class SysUserServiceImpl implements SysUserService {
// 存入到session // 存入到session
SessionUtils.setUserCurrent("sysUser", SysUserDto, request); SessionUtils.setUserCurrent("sysUser", SysUserDto, request);
// 存入到redis // 存入到redis
redisTemplate.opsForValue().set("user_" + RedisMessageConstant.SENDTYPE_LOGIN_SYS, SysUserDto, 3, TimeUnit.DAYS); redisTemplate.opsForValue().set("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_SYS, SysUserDto, 3, TimeUnit.DAYS);
} }
return sysUser; return sysUser;
} }
...@@ -72,7 +72,7 @@ public class SysUserServiceImpl implements SysUserService { ...@@ -72,7 +72,7 @@ public class SysUserServiceImpl implements SysUserService {
// 存入到session // 存入到session
SessionUtils.setUserCurrent("sysUser", SysUserDto, request); SessionUtils.setUserCurrent("sysUser", SysUserDto, request);
// 存入到redis // 存入到redis
redisTemplate.opsForValue().set("user_" + RedisMessageConstant.SENDTYPE_LOGIN_SYS, SysUserDto, 3, TimeUnit.DAYS); redisTemplate.opsForValue().set("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_SYS, SysUserDto, 3, TimeUnit.DAYS);
} }
return sysUser; return sysUser;
} }
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<result property="seasonType" column="season_type" jdbcType="NUMERIC"/> <result property="seasonType" column="season_type" jdbcType="NUMERIC"/>
<result property="monthType" column="month_type" jdbcType="NUMERIC"/> <result property="monthType" column="month_type" jdbcType="NUMERIC"/>
<result property="secondType" column="second_type" jdbcType="NUMERIC"/> <result property="secondType" column="second_type" jdbcType="NUMERIC"/>
<result property="apiOpenId" column="api_openid" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<!--查询单个--> <!--查询单个-->
......
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