|
|
@@ -0,0 +1,60 @@ |
|
|
|
package com.iformall.controller; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.IdWorker; |
|
|
|
import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.entity.PayAdapterResult; |
|
|
|
import com.iformall.domain.po.*; |
|
|
|
import com.iformall.domain.po.base.BaseEntity; |
|
|
|
import com.iformall.domain.po.base.BaseEntity.SortField; |
|
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
|
import com.iformall.enums.*; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.service.*; |
|
|
|
import com.iformall.service.wx.WxPayService; |
|
|
|
import com.iformall.utils.Constant; |
|
|
|
import com.iformall.utils.SysConfigConstant; |
|
|
|
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Qualifier; |
|
|
|
import org.springframework.data.redis.core.RedisTemplate; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
@RestController |
|
|
|
@RequestMapping("/api/product") |
|
|
|
public class WxProductController extends BaseController { |
|
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass()); |
|
|
|
|
|
|
|
@Autowired |
|
|
|
SysConfigService sysConfigService; |
|
|
|
|
|
|
|
@GetMapping("/detail") |
|
|
|
public ResultData payOrderDetail() { |
|
|
|
Map retMap = new HashMap(); |
|
|
|
TenantEntity tenantEntity = getCUser(); |
|
|
|
SysConfig salePrice = sysConfigService.getByKey(SysConfigConstant.sale_price, tenantEntity); |
|
|
|
SysConfig price = sysConfigService.getByKey(SysConfigConstant.price, tenantEntity); |
|
|
|
SysConfig days = sysConfigService.getByKey(SysConfigConstant.expired_days, tenantEntity); |
|
|
|
SysConfig img = sysConfigService.getByKey(SysConfigConstant.productImg, tenantEntity); |
|
|
|
retMap.put("price", price.getConfigItemValue()); |
|
|
|
retMap.put("salePrice", salePrice.getConfigItemValue()); |
|
|
|
retMap.put("days", days.getConfigItemValue()); |
|
|
|
retMap.put("productImg", img.getConfigItemValue()); |
|
|
|
return new ResultData(retMap); |
|
|
|
} |
|
|
|
|
|
|
|
} |