@@ -1,210 +0,0 @@ | |||
package com.iformall.controller.basic; | |||
import com.iformall.annotation.SystemControllerLog; | |||
import com.iformall.common.Result; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.controller.base.BaseController; | |||
import com.iformall.domain.po.BusinessCircleBase; | |||
import com.iformall.domain.po.WxCouponOrder; | |||
import com.iformall.domain.po.WxCreditHistory; | |||
import com.iformall.domain.vo.WxCardSpendVo; | |||
import com.iformall.enums.EnumShopStatus; | |||
import com.iformall.service.*; | |||
import io.swagger.annotations.ApiImplicitParam; | |||
import io.swagger.annotations.ApiOperation; | |||
import org.slf4j.Logger; | |||
import org.slf4j.LoggerFactory; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
import java.util.Date; | |||
import java.util.HashMap; | |||
import java.util.Map; | |||
/** | |||
* @author | |||
*/ | |||
@RestController | |||
@RequestMapping("map") | |||
public class WxMapController extends BaseController { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private WxShopService wxShopService; | |||
@Autowired | |||
private WxMerchantService wxMerchantService; | |||
@Autowired | |||
private WxRentContractService wxRentContractService; | |||
@Autowired | |||
private WxCouponOrderService wxCouponOrderService; | |||
@Autowired | |||
private WxCardSpendService wxCardSpendService; | |||
@Autowired | |||
private WxBusinessCircleOrderService wxBusinessCircleOrderService; | |||
@Autowired | |||
private AliBusinessCircleOrderService aliBusinessCircleOrderService; | |||
@Autowired | |||
private WxCreditHistoryService wxCreditHistoryService; | |||
@ApiOperation("根据id查询接口") | |||
@GetMapping("/findShopBySid") | |||
@ApiImplicitParam(name = "sid", value = "id", dataType = "Long", paramType = "query", required = true) | |||
@SystemControllerLog(description = "店铺管理-id查询") | |||
public ResultData findShopBySid(String sid) { | |||
logger.debug("[" + getIpAddr() + "] WxMapController::findShopBySid"); | |||
Map<String, Object> resultObject = new HashMap<>(); | |||
Map<String, Object> wxShopObject = wxShopService.detailBySid(getTenantInfo(), sid); | |||
Map<String, Object> wxMerchantObject = new HashMap<>(); | |||
Map<String, Object> wxRentContractObject = new HashMap<>(); | |||
if(wxShopObject != null && !wxShopObject.isEmpty() | |||
&& EnumShopStatus.RENT.getCode().toString().equals(wxShopObject.get("status").toString())){ | |||
//已出租 | |||
long shopId = Long.parseLong(wxShopObject.get("id").toString()); | |||
String shopNumber = wxShopObject.get("shopNumber").toString(); | |||
wxMerchantObject = wxMerchantService.detailByShopId(getTenantInfo(), shopId); | |||
if(wxMerchantObject != null && !wxMerchantObject.isEmpty()){ | |||
long merchantId = Long.parseLong(wxMerchantObject.get("id").toString()); | |||
wxRentContractObject = wxRentContractService.currentValidByMerchantId(getTenantInfo(),merchantId,shopNumber); | |||
} | |||
} | |||
resultObject.put("wxShop",wxShopObject); | |||
resultObject.put("wxMerchant",wxMerchantObject); | |||
resultObject.put("wxRentContract",wxRentContractObject); | |||
return new ResultData(Result.SUCCESS, "查询成功", resultObject); | |||
} | |||
@ApiOperation("根据id查询接口") | |||
@GetMapping("/findStatisticsBySid") | |||
@ApiImplicitParam(name = "sid", value = "sid", dataType = "Long", paramType = "query", required = true) | |||
@SystemControllerLog(description = "店铺管理-id查询") | |||
public ResultData findStatisticsBySid(String sid, Date startDate, Date endDate) { | |||
logger.debug("[" + getIpAddr() + "] WxMapController::findStatisticsBySid"); | |||
Map<String, Object> resultMap = new HashMap<>(); | |||
Map<String, Object> wxShopObject = wxShopService.detailBySid(getTenantInfo(), sid); | |||
if(wxShopObject != null && !wxShopObject.isEmpty() | |||
&& EnumShopStatus.RENT.getCode().toString().equals(wxShopObject.get("status").toString())){ | |||
//已出租 | |||
long shopId = Long.parseLong(wxShopObject.get("id").toString()); | |||
Map<String, Object> wxMerchantObject = wxMerchantService.detailByShopId(getTenantInfo(), shopId); | |||
if(wxMerchantObject != null && !wxMerchantObject.isEmpty()){ | |||
long merchantId = Long.parseLong(wxMerchantObject.get("id").toString()); | |||
WxCouponOrder wxCouponOrder = new WxCouponOrder(); | |||
wxCouponOrder.updateTenantInfo(getTenantInfo()); | |||
wxCouponOrder.setMerchantId(merchantId); | |||
wxCouponOrder.setStartTime(startDate); | |||
wxCouponOrder.setEndTime(endDate); | |||
wxCouponOrderService.statisticsWriteOff(wxCouponOrder,resultMap); | |||
WxCardSpendVo wxCardSpend = new WxCardSpendVo(); | |||
wxCardSpend.updateTenantInfo(getTenantInfo()); | |||
wxCardSpend.setMerchantId(merchantId); | |||
wxCardSpend.setStartdate(startDate); | |||
wxCardSpend.setEnddate(endDate); | |||
resultMap.put("sumRealPayment",wxCardSpendService.sumRealPayment(wxCardSpend)); | |||
BusinessCircleBase businessCircle = new BusinessCircleBase(); | |||
businessCircle.updateTenantInfo(getTenantInfo()); | |||
businessCircle.setMerchantId(merchantId); | |||
businessCircle.setStartTime(startDate); | |||
businessCircle.setEndTime(endDate); | |||
Integer wxCircleSumPayment = wxBusinessCircleOrderService.sumCirclePayment(businessCircle); | |||
Integer aliCircleSumPayment = aliBusinessCircleOrderService.sumCirclePayment(businessCircle); | |||
resultMap.put("sumCirclePayment",wxCircleSumPayment + aliCircleSumPayment); | |||
WxCreditHistory wxCreditHistory = new WxCreditHistory(); | |||
wxCreditHistory.setTenantId(getTenantInfo().getFinalTenantId()); | |||
wxCreditHistory.setMerchantId(merchantId); | |||
wxCreditHistory.setStartTime(startDate); | |||
wxCreditHistory.setEndTime(endDate); | |||
resultMap.put("sumCreditAmount",wxCreditHistoryService.getIncrementCreditAmount(wxCreditHistory)); | |||
} | |||
} | |||
return new ResultData(Result.SUCCESS, "查询成功", resultMap); | |||
} | |||
@ApiOperation("根据id查询接口") | |||
@GetMapping("/findShopById") | |||
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
@SystemControllerLog(description = "店铺管理-id查询") | |||
public ResultData findShopById(Long id) { | |||
logger.debug("[" + getIpAddr() + "] WxMapController::findShopById"); | |||
return new ResultData(Result.SUCCESS, "查询成功", wxShopService.detailById(this.getTenantInfo(),id)); | |||
} | |||
@ApiOperation("根据id查询接口") | |||
@GetMapping("/findMerchantByShop") | |||
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
@SystemControllerLog(description = "店铺管理-id查询") | |||
public ResultData findMerchantByShop(Long shopId) { | |||
logger.debug("[" + getIpAddr() + "] WxMapController::findMerchantByShop"); | |||
return new ResultData(Result.SUCCESS, "查询成功", wxMerchantService.findMerchantByShop(shopId)); | |||
} | |||
@ApiOperation("根据id查询接口") | |||
@GetMapping("/findRentByShop") | |||
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
@SystemControllerLog(description = "店铺管理-id查询") | |||
public ResultData findRentByShop(Long shopId) { | |||
logger.debug("[" + getIpAddr() + "] WxMapController::findRentByShop"); | |||
return new ResultData(Result.SUCCESS, "查询成功", wxRentContractService.findRentByShop(shopId)); | |||
} | |||
@ApiOperation("根据id查询接口") | |||
@GetMapping("/findStatisticsByShop") | |||
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
@SystemControllerLog(description = "店铺管理-id查询") | |||
public ResultData findStatisticsByShop(Long shopId, Date startDate, Date endDate) { | |||
logger.debug("[" + getIpAddr() + "] WxMapController::findStatisticsByShop"); | |||
Map<String, Object> resultMap = new HashMap<>(); | |||
Map<String, Object> merchantByShop = wxMerchantService.findMerchantByShop(shopId); | |||
if(merchantByShop != null && merchantByShop.get("id") != null){ | |||
String tenantId = merchantByShop.get("tenant_id").toString(); | |||
String parentTenantId = ""; | |||
if(merchantByShop.get("parent_tenant_id") != null){ | |||
parentTenantId = merchantByShop.get("parent_tenant_id").toString(); | |||
} | |||
Long merchantId = Long.parseLong(merchantByShop.get("id").toString()); | |||
WxCouponOrder wxCouponOrder = new WxCouponOrder(); | |||
wxCouponOrder.updateTenantInfo(getTenantInfo()); | |||
wxCouponOrder.setMerchantId(merchantId); | |||
wxCouponOrder.setStartTime(startDate); | |||
wxCouponOrder.setEndTime(endDate); | |||
wxCouponOrderService.statisticsWriteOff(wxCouponOrder,resultMap); | |||
WxCardSpendVo wxCardSpend = new WxCardSpendVo(); | |||
wxCardSpend.updateTenantInfo(getTenantInfo()); | |||
wxCardSpend.setMerchantId(merchantId); | |||
wxCardSpend.setStartdate(startDate); | |||
wxCardSpend.setEnddate(endDate); | |||
resultMap.put("sumRealPayment",wxCardSpendService.sumRealPayment(wxCardSpend)); | |||
BusinessCircleBase businessCircle = new BusinessCircleBase(); | |||
businessCircle.updateTenantInfo(getTenantInfo()); | |||
businessCircle.setMerchantId(merchantId); | |||
businessCircle.setStartTime(startDate); | |||
businessCircle.setEndTime(endDate); | |||
Integer wxCircleSumPayment = wxBusinessCircleOrderService.sumCirclePayment(businessCircle); | |||
Integer aliCircleSumPayment = aliBusinessCircleOrderService.sumCirclePayment(businessCircle); | |||
resultMap.put("sumCirclePayment",wxCircleSumPayment + aliCircleSumPayment); | |||
WxCreditHistory wxCreditHistory = new WxCreditHistory(); | |||
wxCreditHistory.setTenantId(getTenantInfo().getFinalTenantId()); | |||
wxCreditHistory.setMerchantId(merchantId); | |||
wxCreditHistory.setStartTime(startDate); | |||
wxCreditHistory.setEndTime(endDate); | |||
resultMap.put("sumCreditAmount",wxCreditHistoryService.getIncrementCreditAmount(wxCreditHistory)); | |||
} | |||
return new ResultData(Result.SUCCESS, "查询成功", resultMap); | |||
} | |||
} |
@@ -1,113 +0,0 @@ | |||
package com.iformall.controller.market; | |||
import com.github.pagehelper.PageInfo; | |||
import com.iformall.annotation.SystemControllerLog; | |||
import com.iformall.common.ErrorCode; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.controller.base.BaseController; | |||
import com.iformall.domain.po.AliBusinessCircleOrder; | |||
import com.iformall.domain.po.WxBusinessCircleOrder; | |||
import com.iformall.domain.po.base.BaseEntity; | |||
import com.iformall.service.AliBusinessCircleOrderService; | |||
import com.iformall.utils.Constant; | |||
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.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.ModelAttribute; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
import javax.servlet.http.HttpServletRequest; | |||
import javax.servlet.http.HttpServletResponse; | |||
import java.util.HashMap; | |||
import java.util.Map; | |||
@RestController | |||
@RequestMapping("aliCircle") | |||
@Api(description = "订单相关接口") | |||
public class AliBusinessCircleOrderController extends BaseController { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private AliBusinessCircleOrderService aliBusinessCircleOrderService; | |||
@ApiOperation("分页列表接口") | |||
@GetMapping("list") | |||
@ApiImplicitParams({ | |||
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||
}) | |||
@SystemControllerLog(description = "-列表") | |||
public ResultData list(@ModelAttribute AliBusinessCircleOrder circleOrder, Integer pageNum, Integer pageSize) { | |||
logger.debug("[" + getIpAddr() + "] AliBusinessCircleOrderController::list"); | |||
if (null == circleOrder) { | |||
circleOrder = new AliBusinessCircleOrder(); | |||
} | |||
circleOrder.updateTenantInfo(getTenantInfo()); | |||
circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | |||
final PageInfo<AliBusinessCircleOrder> page = aliBusinessCircleOrderService.listAsPage(circleOrder, pageNum, pageSize); | |||
return new ResultData(page); | |||
} | |||
@ApiOperation("统计接口") | |||
@GetMapping("statistics") | |||
@ApiImplicitParams({ | |||
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||
}) | |||
@SystemControllerLog(description = "-统计") | |||
public ResultData statistics(@ModelAttribute AliBusinessCircleOrder circleOrder) { | |||
logger.debug("[" + getIpAddr() + "] AliBusinessCircleOrderController::statistics"); | |||
if (null == circleOrder) { | |||
circleOrder = new AliBusinessCircleOrder(); | |||
} | |||
circleOrder.updateTenantInfo(getTenantInfo()); | |||
Integer sumPayAmount = aliBusinessCircleOrderService.sumCirclePayment(circleOrder); | |||
Integer sumRefundAmount = aliBusinessCircleOrderService.sumCircleRefundAmount(circleOrder); | |||
Map resultMap = new HashMap(); | |||
resultMap.put("sumPayAmount",sumPayAmount); | |||
resultMap.put("sumRefundAmount",sumRefundAmount); | |||
return new ResultData(resultMap); | |||
} | |||
@ApiOperation("详情接口") | |||
@GetMapping("detail") | |||
@ApiImplicitParams({ | |||
@ApiImplicitParam(name = "orderId", value = "订单id", dataType = "String", paramType = "query", required = true) | |||
}) | |||
public ResultData detail(String orderId) { | |||
if (StringUtils.isBlank(orderId) || orderId.equalsIgnoreCase(Constant.UNDEFINED)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||
} | |||
Long id; | |||
try { | |||
id = Long.valueOf(orderId); | |||
} catch (NumberFormatException e) { | |||
logger.error(e.getMessage()); | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL, "orderId: " + orderId + ", e: " + e.getMessage()); | |||
} | |||
AliBusinessCircleOrder order = aliBusinessCircleOrderService.detail(id,getTenantInfo()); | |||
return new ResultData(order); | |||
} | |||
@GetMapping("exportData") | |||
@SystemControllerLog(description = "券订单数据-导出数据") | |||
public void exportData(@ModelAttribute AliBusinessCircleOrder circleOrder, HttpServletRequest request, HttpServletResponse response) { | |||
logger.debug("[" + getIpAddr() + "] AliBusinessCircleOrderController::exportData"); | |||
if (null == circleOrder) { | |||
circleOrder = new AliBusinessCircleOrder(); | |||
} | |||
circleOrder.updateTenantInfo(getTenantInfo()); | |||
circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | |||
aliBusinessCircleOrderService.exportData(circleOrder, request, response); | |||
} | |||
} |
@@ -1,109 +0,0 @@ | |||
package com.iformall.controller.market; | |||
import com.github.pagehelper.PageInfo; | |||
import com.iformall.annotation.SystemControllerLog; | |||
import com.iformall.common.ErrorCode; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.controller.base.BaseController; | |||
import com.iformall.domain.po.*; | |||
import com.iformall.domain.po.base.BaseEntity; | |||
import com.iformall.service.*; | |||
import com.iformall.utils.Constant; | |||
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.web.bind.annotation.*; | |||
import javax.servlet.http.HttpServletRequest; | |||
import javax.servlet.http.HttpServletResponse; | |||
import java.util.HashMap; | |||
import java.util.Map; | |||
@RestController | |||
@RequestMapping("wxCircle") | |||
@Api(description = "订单相关接口") | |||
public class WxBusinessCircleOrderController extends BaseController { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private WxBusinessCircleOrderService wxBusinessCircleOrderService; | |||
@ApiOperation("分页列表接口") | |||
@GetMapping("list") | |||
@ApiImplicitParams({ | |||
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||
}) | |||
@SystemControllerLog(description = "-列表") | |||
public ResultData list(@ModelAttribute WxBusinessCircleOrder circleOrder, Integer pageNum, Integer pageSize) { | |||
logger.debug("[" + getIpAddr() + "] WxBusinessCircleOrderController::list"); | |||
if (null == circleOrder) { | |||
circleOrder = new WxBusinessCircleOrder(); | |||
} | |||
circleOrder.updateTenantInfo(getTenantInfo()); | |||
circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | |||
final PageInfo<WxBusinessCircleOrder> page = wxBusinessCircleOrderService.listAsPage(circleOrder, pageNum, pageSize); | |||
return new ResultData(page); | |||
} | |||
@ApiOperation("统计接口") | |||
@GetMapping("statistics") | |||
@ApiImplicitParams({ | |||
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||
}) | |||
@SystemControllerLog(description = "-统计") | |||
public ResultData statistics(@ModelAttribute WxBusinessCircleOrder circleOrder) { | |||
logger.debug("[" + getIpAddr() + "] AliBusinessCircleOrderController::statistics"); | |||
if (null == circleOrder) { | |||
circleOrder = new WxBusinessCircleOrder(); | |||
} | |||
circleOrder.updateTenantInfo(getTenantInfo()); | |||
Integer sumPayAmount = wxBusinessCircleOrderService.sumCirclePayment(circleOrder); | |||
Integer sumRefundAmount = wxBusinessCircleOrderService.sumCircleRefundAmount(circleOrder); | |||
Map resultMap = new HashMap(); | |||
resultMap.put("sumPayAmount",sumPayAmount); | |||
resultMap.put("sumRefundAmount",sumRefundAmount); | |||
return new ResultData(resultMap); | |||
} | |||
@ApiOperation("详情接口") | |||
@GetMapping("detail") | |||
@ApiImplicitParams({ | |||
@ApiImplicitParam(name = "orderId", value = "订单id", dataType = "String", paramType = "query", required = true) | |||
}) | |||
public ResultData detail(String orderId) { | |||
if (StringUtils.isBlank(orderId) || orderId.equalsIgnoreCase(Constant.UNDEFINED)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||
} | |||
Long id; | |||
try { | |||
id = Long.valueOf(orderId); | |||
} catch (NumberFormatException e) { | |||
logger.error(e.getMessage()); | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL, "orderId: " + orderId + ", e: " + e.getMessage()); | |||
} | |||
WxBusinessCircleOrder order = wxBusinessCircleOrderService.detail(id,getTenantInfo()); | |||
return new ResultData(order); | |||
} | |||
@GetMapping("exportData") | |||
@SystemControllerLog(description = "券订单数据-导出数据") | |||
public void exportData(@ModelAttribute WxBusinessCircleOrder circleOrder, HttpServletRequest request, HttpServletResponse response) { | |||
logger.debug("[" + getIpAddr() + "] WxBusinessCircleOrderController::exportData"); | |||
if (null == circleOrder) { | |||
circleOrder = new WxBusinessCircleOrder(); | |||
} | |||
circleOrder.updateTenantInfo(getTenantInfo()); | |||
circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | |||
wxBusinessCircleOrderService.exportData(circleOrder, request, response); | |||
} | |||
} |
@@ -6,8 +6,6 @@ import com.iformall.common.ErrorCode; | |||
import com.iformall.common.Result; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.controller.base.BaseController; | |||
import com.iformall.domain.po.AliBusinessCircleOrder; | |||
import com.iformall.domain.po.WxBusinessCircleOrder; | |||
import com.iformall.domain.po.WxCoupon; | |||
import com.iformall.domain.po.WxCouponChannel; | |||
import com.iformall.domain.po.WxPressBatch; | |||
@@ -19,8 +17,6 @@ import com.iformall.enums.EnumCouponChannelType; | |||
import com.iformall.enums.EnumCouponContentType; | |||
import com.iformall.enums.EnumCouponSourceType; | |||
import com.iformall.enums.EnumCouponType; | |||
import com.iformall.enums.EnumRentContractAppStatus; | |||
import com.iformall.service.AliBusinessCircleOrderService; | |||
import com.iformall.service.WxCouponChannelService; | |||
import com.iformall.service.WxCouponService; | |||
import com.iformall.service.WxPressBatchService; | |||
@@ -1,126 +0,0 @@ | |||
package com.iformall.controller.market; | |||
import com.github.pagehelper.PageInfo; | |||
import com.iformall.annotation.SystemControllerLog; | |||
import com.iformall.common.ErrorCode; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.controller.base.BaseController; | |||
import com.iformall.domain.po.WxThirdPartyOrders; | |||
import com.iformall.domain.po.base.BaseEntity; | |||
import com.iformall.enums.EnumThirdOrderType; | |||
import com.iformall.service.WxThirdPartyOrdersService; | |||
import com.iformall.utils.Constant; | |||
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.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.ModelAttribute; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
import javax.servlet.http.HttpServletRequest; | |||
import javax.servlet.http.HttpServletResponse; | |||
import java.util.HashMap; | |||
import java.util.Map; | |||
@RestController | |||
@RequestMapping("thirdCircle") | |||
@Api(description = "订单相关接口") | |||
public class WxThirdPartyOrdersController extends BaseController { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private WxThirdPartyOrdersService wxThirdPartyOrdersOrderService; | |||
@ApiOperation("分页列表接口") | |||
@GetMapping("list") | |||
@ApiImplicitParams({ | |||
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||
}) | |||
@SystemControllerLog(description = "-列表") | |||
public ResultData list(@ModelAttribute WxThirdPartyOrders circleOrder, Integer pageNum, Integer pageSize) { | |||
logger.debug("[" + getIpAddr() + "] WxThirdPartyOrdersController::list"); | |||
if (null == circleOrder) { | |||
circleOrder = new WxThirdPartyOrders(); | |||
} | |||
circleOrder.updateTenantInfo(getTenantInfo()); | |||
circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | |||
final PageInfo<WxThirdPartyOrders> page = wxThirdPartyOrdersOrderService.listAsPage(circleOrder, pageNum, pageSize); | |||
return new ResultData(page); | |||
} | |||
@ApiOperation("统计接口") | |||
@GetMapping("statistics") | |||
@ApiImplicitParams({ | |||
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||
}) | |||
@SystemControllerLog(description = "-统计") | |||
public ResultData statistics(@ModelAttribute WxThirdPartyOrders circleOrder) { | |||
logger.debug("[" + getIpAddr() + "] AliBusinessCircleOrderController::statistics"); | |||
if (null == circleOrder) { | |||
circleOrder = new WxThirdPartyOrders(); | |||
} | |||
circleOrder.updateTenantInfo(getTenantInfo()); | |||
Integer sumPayAmount = wxThirdPartyOrdersOrderService.sumCirclePayment(circleOrder); | |||
Integer sumRefundAmount = wxThirdPartyOrdersOrderService.sumCircleRefundAmount(circleOrder); | |||
Map resultMap = new HashMap(); | |||
resultMap.put("sumPayAmount",sumPayAmount); | |||
resultMap.put("sumRefundAmount",sumRefundAmount); | |||
return new ResultData(resultMap); | |||
} | |||
@ApiOperation("详情接口") | |||
@GetMapping("detail") | |||
@ApiImplicitParams({ | |||
@ApiImplicitParam(name = "orderId", value = "订单id", dataType = "String", paramType = "query", required = true) | |||
}) | |||
public ResultData detail(String orderId) { | |||
if (StringUtils.isBlank(orderId) || orderId.equalsIgnoreCase(Constant.UNDEFINED)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||
} | |||
Long id; | |||
try { | |||
id = Long.valueOf(orderId); | |||
} catch (NumberFormatException e) { | |||
logger.error(e.getMessage()); | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL, "orderId: " + orderId + ", e: " + e.getMessage()); | |||
} | |||
WxThirdPartyOrders order = wxThirdPartyOrdersOrderService.detail(id,getTenantInfo()); | |||
return new ResultData(order); | |||
} | |||
@GetMapping("exportData") | |||
@SystemControllerLog(description = "券订单数据-导出数据") | |||
public void exportData(@ModelAttribute WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response) { | |||
logger.debug("[" + getIpAddr() + "] WxThirdPartyOrdersController::exportData"); | |||
if (null == circleOrder) { | |||
circleOrder = new WxThirdPartyOrders(); | |||
} | |||
circleOrder.updateTenantInfo(getTenantInfo()); | |||
circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | |||
circleOrder.setSourceType(EnumThirdOrderType.RMB_PAY.getCode()); | |||
wxThirdPartyOrdersOrderService.exportData(circleOrder, request, response); | |||
} | |||
@GetMapping("exportDataVo") | |||
@SystemControllerLog(description = "券订单数据-导出数据") | |||
public void exportDataVo(@ModelAttribute WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response) { | |||
logger.debug("[" + getIpAddr() + "] WxThirdPartyOrdersController::exportDataVo"); | |||
if (null == circleOrder) { | |||
circleOrder = new WxThirdPartyOrders(); | |||
} | |||
circleOrder.updateTenantInfo(getTenantInfo()); | |||
circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | |||
circleOrder.setSourceType(EnumThirdOrderType.CREDIT_PAY.getCode()); | |||
wxThirdPartyOrdersOrderService.exportDataVo(circleOrder, request, response); | |||
} | |||
} |
@@ -1,3 +1,8 @@ | |||
ALTER TABLE `mallink_suimang`.`photo_speak_video` | |||
ADD COLUMN `subtitle_enabled` smallint(1) COMMENT '字幕开关' AFTER `person_photo_url`, | |||
ADD COLUMN `subtitle_params` json COMMENT '字幕参数' AFTER `subtitle_enabled`; | |||
ALTER TABLE `mallink_suimang`.`user_mould_video` | |||
ADD COLUMN `subtitle_enabled` smallint(1) COMMENT '字幕开关' AFTER `person_json`, | |||
ADD COLUMN `subtitle_params` json COMMENT '字幕参数' AFTER `subtitle_enabled`; |
@@ -0,0 +1,15 @@ | |||
user_basic_from | |||
user_basic_image | |||
user_basic_qrcode | |||
user_basic_glod_config | |||
user_basic_property | |||
user_basic_property_log | |||
user_digital_avatar_order | |||
user_digital_avatar_photo | |||
product | |||
product_order | |||
product_order_sharing | |||
digital_avatar_mould | |||
@@ -0,0 +1,2 @@ | |||
ALTER TABLE `wx_appinfo` | |||
ADD COLUMN `project_type` smallint(0) AFTER `pay_id`; |
@@ -0,0 +1,51 @@ | |||
package com.iformall.controller; | |||
import com.github.pagehelper.PageInfo; | |||
import com.iformall.annotation.AuthIgnore; | |||
import com.iformall.common.ErrorCode; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.domain.po.base.BaseEntity; | |||
import com.iformall.domain.po.sm.PersonPhoto; | |||
import com.iformall.enums.EnumMouldSendType; | |||
import com.iformall.enums.EnumaMouldPatchStatus; | |||
import com.iformall.service.sm.MouldPatchSignService; | |||
import com.iformall.service.sm.PersonPhotoService; | |||
import com.iformall.utils.BaiduImageCheckUtil; | |||
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.util.ObjectUtils; | |||
import org.springframework.web.bind.annotation.*; | |||
import org.springframework.web.multipart.MultipartFile; | |||
@RestController | |||
@RequestMapping("/api/baidu") | |||
@Api(description = "模板接口") | |||
public class BaiduController extends BaseController { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@AuthIgnore | |||
@ApiOperation("百度图片审核接口") | |||
@PostMapping(value = "checkPhoto", consumes = "multipart/*", headers = "content-type=multipart/form-data") | |||
@ApiImplicitParam(name = "file", value = "file", dataType = "MultipartFile", paramType = "query", required = true) | |||
public ResultData baiduCheckPhoto(@RequestPart("file") MultipartFile file) { | |||
logger.debug("[" + getIpAddr() + "] PersonPhotoController::baiduCheckPhoto"); | |||
if (ObjectUtils.isEmpty(file) || file.getSize() <= 0) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "素材为空"); | |||
} | |||
long size = file.getSize(); | |||
final long length = 4 * 1024 * 1024; | |||
if (size > length) { | |||
return new ResultData(ErrorCode.PICTURE_FOUR_SIZE_EXCEED); | |||
} | |||
return BaiduImageCheckUtil.photoCheck(file); | |||
} | |||
} |
@@ -0,0 +1,41 @@ | |||
package com.iformall.controller; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.iformall.annotation.AuthIgnore; | |||
import com.iformall.service.ProductOrderService; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiOperation; | |||
import org.jdom2.JDOMException; | |||
import org.slf4j.Logger; | |||
import org.slf4j.LoggerFactory; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
import javax.servlet.http.HttpServletRequest; | |||
import javax.servlet.http.HttpServletResponse; | |||
import java.io.IOException; | |||
import java.util.Map; | |||
@RestController | |||
@RequestMapping("/payCallBack") | |||
@Api(description = "支付回调") | |||
public class CallbackPayController extends BaseController { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private ProductOrderService productOrderService; | |||
@AuthIgnore | |||
@ApiOperation("支付回调") | |||
@PostMapping(value = "/pay/v3") | |||
public void _payV3Notify(@RequestBody Map<String, Object> paranMap, HttpServletRequest request, HttpServletResponse response) throws IOException, JDOMException { | |||
logger.debug("[" + getIpAddr() + "] CallbackPayController::photoSpeak"); | |||
logger.info("支付回调结果通知{}"+JSONObject.toJSONString(paranMap)); | |||
/** | |||
* {"id":"4330b030-788f-5067-8c8a-69ee373d43ad","create_time":"2023-08-28T18:44:56+08:00","resource_type":"encrypt-resource","event_type":"TRANSACTION.SUCCESS","summary":"支付成功","resource":{"original_type":"transaction","algorithm":"AEAD_AES_256_GCM","ciphertext":"PneNTwSVDoirBNQsJstB/yX1dNMupj7uKQVEVfLOoyMSCqKh+KMwIdanidbcs6OnSy1Xmx4MploMaQ5rSg66sFDQ9nDuSVc4S/I3OVflu1l7z9vR+FJiztpTqhr/ekeNz9VivtqPPtn6N3dCyZb6iCEwnXT+TEB8SBZe4bPSPFGhB/MB9w1ZpqP14OvMDUnzKM15mdex6wmAJH6qIbd1aH3jrW/Lv7KeyfXEYrRDljq2Za6476UQxeAcsR3JA6QpWwrhYxpKFQEHuGMdiVC1KvQsP3+JUWOKSiQQ1r5upTACPI8n5B/kOeXJA8MnTgY/7lZiA6ys2dt8jqxzL8IlDracnlwvsiRAuXjRjcX6pYCz4q0HwIYb1nHXE+iRcSGm8h+xFFsnhGgxrhEVz6ARhK6ZtKtibCv7Ll/a/d090FBKtVXzCWB6cLMMmfrIwLQFqiFUtb6zsV/zusAJdwHZt3LmtgGahoV3+UPTnbztEAp5IJGz2imGPTsk7QpvKWQknf5FM/Z1fhr/vb+pZV5NGBZ+6l/mI8isA4HtljzNHU/PuKCGO8uWu6QFevgAftGGww==","associated_data":"transaction","nonce":"Hrcahgdp1eO6"}} | |||
*/ | |||
response.setStatus(200); | |||
} | |||
} |
@@ -0,0 +1,192 @@ | |||
package com.iformall.controller; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.iformall.annotation.AuthIgnore; | |||
import com.iformall.common.ErrorCode; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.domain.po.sm.*; | |||
import com.iformall.enums.EnumDigitalAvatarOrderStatus; | |||
import com.iformall.enums.EnumDigitalAvatarPhotoStatus; | |||
import com.iformall.enums.EnumVideoStatus; | |||
import com.iformall.service.sm.*; | |||
import com.iformall.utils.Base64Util; | |||
import io.swagger.annotations.Api; | |||
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.web.bind.annotation.*; | |||
import java.io.InputStream; | |||
import java.util.*; | |||
@RestController | |||
@RequestMapping("/callback") | |||
@Api(description = "视频回调") | |||
public class CallbackSmController extends BaseController { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private PhotoSpeakVideoService photoSpeakVideoService; | |||
@Autowired | |||
private UserDigitalAvatarOrderService userDigitalAvatarOrderService; | |||
@Autowired | |||
private UserDigitalAvatarPhotoService userDigitalAvatarPhotoService; | |||
@AuthIgnore | |||
@ApiOperation("视频回调") | |||
@PostMapping(value = "/photo/speak") | |||
public ResultData photoSpeak(@RequestBody Map<String, Object> paranMap) { | |||
logger.debug("[" + getIpAddr() + "] CallbackSmController::photoSpeak"); | |||
logger.info("照片生成视频结果通知{}"+JSONObject.toJSONString(paranMap)); | |||
Long task_id = (Long) paranMap.get("task_id");//任务ID | |||
String code = (String) paranMap.get("code");//code | |||
String msg = (String) paranMap.get("msg"); | |||
if (task_id == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"任务ID不能为空"); | |||
} | |||
PhotoSpeakVideo photoSpeakVideo = photoSpeakVideoService.getById(Long.valueOf(task_id)); | |||
if (photoSpeakVideo == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"未找到任务数据"); | |||
} | |||
Object data = paranMap.get("data"); | |||
String jsonString = JSONObject.toJSONString(data); | |||
Map dataMap = JSONObject.parseObject(jsonString,Map.class); | |||
Boolean sr = (Boolean) dataMap.get("sr");//判断 sr=True 就是超分的, False 是没超分的 | |||
String url = (String) dataMap.get("url"); | |||
String save_dir = null; | |||
String audio_path = null; | |||
if(sr){ | |||
if(!EnumVideoStatus.hy_ing.getCode().equals(photoSpeakVideo.getVideoStatus())){ | |||
return new ResultData(); | |||
} | |||
}else{ | |||
if(!EnumVideoStatus.ing.getCode().equals(photoSpeakVideo.getVideoStatus())){ | |||
return new ResultData(); | |||
} | |||
save_dir = (String) dataMap.get("save_dir"); | |||
audio_path = (String) dataMap.get("audio_path"); | |||
} | |||
if (StringUtils.isEmpty(url)){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"视频URL不能为空"); | |||
} | |||
PhotoSpeakVideo speakVideoUpd = new PhotoSpeakVideo(); | |||
speakVideoUpd.setId(photoSpeakVideo.getId()); | |||
if("4000".equals(code)){ | |||
if (sr){ | |||
speakVideoUpd.setVideoStatus(EnumVideoStatus.hy_success.getCode()); | |||
}else { | |||
speakVideoUpd.setVideoStatus(EnumVideoStatus.success.getCode()); | |||
speakVideoUpd.setSaveDir(save_dir); | |||
speakVideoUpd.setAudioPath(audio_path); | |||
} | |||
speakVideoUpd.setVideoPath(url); | |||
speakVideoUpd.setVideoMsg("视频生成成功"); | |||
}else{ | |||
if (sr){ | |||
speakVideoUpd.setVideoStatus(EnumVideoStatus.hy_fail.getCode()); | |||
}else { | |||
speakVideoUpd.setVideoStatus(EnumVideoStatus.fail.getCode()); | |||
} | |||
speakVideoUpd.setVideoMsg("(MetaService)"+msg); | |||
} | |||
speakVideoUpd.setUpdateDate(new Date()); | |||
photoSpeakVideoService.updateById(speakVideoUpd); | |||
//TODO 用户相关操作 | |||
if (sr){ | |||
photoSpeakVideoService.uploadHyVideo(speakVideoUpd); | |||
}else { | |||
photoSpeakVideoService.uploadVideo(speakVideoUpd); | |||
} | |||
return new ResultData(); | |||
} | |||
@AuthIgnore | |||
@ApiOperation("生成照片回调") | |||
@PostMapping(value = "/create/photo") | |||
public ResultData createPhoto(@RequestBody Map<String, Object> paranMap) { | |||
logger.debug("[" + getIpAddr() + "] CallbackSmController::photoSpeak"); | |||
Long task_id = (Long) paranMap.get("task_id");//任务ID | |||
String code = (String) paranMap.get("code");//code | |||
String msg = (String) paranMap.get("msg"); | |||
logger.info("照片生成视频结果通知{}task_id="+task_id+",code="+code); | |||
if (task_id == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"任务ID不能为空"); | |||
} | |||
UserDigitalAvatarOrder userDigitalAvatarOrder = userDigitalAvatarOrderService.selectById(task_id); | |||
if (userDigitalAvatarOrder == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"未找到任务数据"); | |||
} | |||
if("2000".equals(code)){ | |||
Map<String,String> data = (Map) paranMap.get("data"); | |||
List<String> imgList = new ArrayList<>(); | |||
imgList.add(data.get("img_0")); | |||
imgList.add(data.get("img_1")); | |||
imgList.add(data.get("img_2")); | |||
imgList.add(data.get("img_3")); | |||
userDigitalAvatarOrderService.handlePhoto(userDigitalAvatarOrder,imgList); | |||
}else{ | |||
UserDigitalAvatarOrder updOrder = new UserDigitalAvatarOrder(); | |||
updOrder.setId(userDigitalAvatarOrder.getId()); | |||
updOrder.setStatus(EnumDigitalAvatarOrderStatus.fail.getCode()); | |||
updOrder.setMsg(msg); | |||
updOrder.setUpdateDate(new Date()); | |||
userDigitalAvatarOrderService.updateById(updOrder); | |||
} | |||
return new ResultData(); | |||
} | |||
@AuthIgnore | |||
@ApiOperation("照片超分回调") | |||
@PostMapping(value = "/super/photo") | |||
public ResultData superPhoto(@RequestBody Map<String, Object> paranMap) { | |||
logger.debug("[" + getIpAddr() + "] CallbackSmController::superPhoto"); | |||
Long task_id = (Long) paranMap.get("task_id");//任务ID | |||
String code = (String) paranMap.get("code");//code | |||
String msg = (String) paranMap.get("msg"); | |||
logger.info("照片超分结果通知{}task_id="+task_id+",code="+code); | |||
if (task_id == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"任务ID不能为空"); | |||
} | |||
UserDigitalAvatarPhoto userDigitalAvatarPhoto = userDigitalAvatarPhotoService.selectById(task_id); | |||
if (userDigitalAvatarPhoto == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"未找到任务数据"); | |||
} | |||
if("3000".equals(code)){ | |||
Map<String,String> data = (Map) paranMap.get("data"); | |||
String img = data.get("img"); | |||
userDigitalAvatarPhotoService.handleSuperPhoto(userDigitalAvatarPhoto,img); | |||
}else{ | |||
UserDigitalAvatarPhoto updPhoto = new UserDigitalAvatarPhoto(); | |||
updPhoto.setId(userDigitalAvatarPhoto.getId()); | |||
updPhoto.setStatus(EnumDigitalAvatarPhotoStatus.fail.getCode()); | |||
updPhoto.setMsg(msg); | |||
updPhoto.setUpdateDate(new Date()); | |||
userDigitalAvatarPhotoService.updateById(updPhoto); | |||
} | |||
return new ResultData(); | |||
} | |||
} |
@@ -0,0 +1,61 @@ | |||
package com.iformall.controller; | |||
import com.github.pagehelper.PageInfo; | |||
import com.iformall.annotation.AuthIgnore; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.domain.po.base.BaseEntity; | |||
import com.iformall.domain.po.sm.DigitalAvatarMould; | |||
import com.iformall.domain.po.sm.PersonMould; | |||
import com.iformall.enums.EnumaMouldPatchStatus; | |||
import com.iformall.service.sm.DigitalAvatarMouldService; | |||
import com.iformall.service.sm.MouldPatchSignService; | |||
import com.iformall.service.sm.PersonMouldService; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiImplicitParam; | |||
import io.swagger.annotations.ApiImplicitParams; | |||
import io.swagger.annotations.ApiOperation; | |||
import org.slf4j.Logger; | |||
import org.slf4j.LoggerFactory; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.ModelAttribute; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
@RestController | |||
@RequestMapping("/api/digitalAvatarMould") | |||
@Api(description = "模板接口") | |||
public class DigitalAvatarMouldController extends BaseController { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private DigitalAvatarMouldService digitalAvatarMouldService; | |||
@AuthIgnore | |||
@ApiOperation("分页列表接口") | |||
@GetMapping("list") | |||
@ApiImplicitParams({ | |||
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
public ResultData list(@ModelAttribute DigitalAvatarMould record, Integer pageNum, Integer pageSize) { | |||
logger.debug("[" + getIpAddr() + "] DigitalAvatarMouldController::list"); | |||
if (record == null) record = new DigitalAvatarMould(); | |||
record.setStatus(EnumaMouldPatchStatus.put_on.getCode()); | |||
record.setSortColumns(BaseEntity.SortField.UpdateDate_DESC); | |||
final PageInfo<DigitalAvatarMould> page = digitalAvatarMouldService.cListAsPage(record, pageNum, pageSize); | |||
return new ResultData(page); | |||
} | |||
@AuthIgnore | |||
@ApiOperation("根据id查询接口") | |||
@GetMapping("/findById") | |||
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
public ResultData findById(Long id) { | |||
logger.debug("[" + getIpAddr() + "] DigitalAvatarMouldController::findById"); | |||
DigitalAvatarMould digitalAvatarMould = digitalAvatarMouldService.getDetailById(id); | |||
return new ResultData(digitalAvatarMould); | |||
} | |||
} |
@@ -0,0 +1,284 @@ | |||
package com.iformall.controller; | |||
import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.google.code.kaptcha.Producer; | |||
import com.iformall.annotation.AuthIgnore; | |||
import com.iformall.annotation.TenantIgnore; | |||
import com.iformall.common.ErrorCode; | |||
import com.iformall.common.Result; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.domain.po.*; | |||
import com.iformall.domain.po.sm.InviteCodeInfo; | |||
import com.iformall.enums.*; | |||
import com.iformall.exception.MallinkException; | |||
import com.iformall.service.*; | |||
import com.iformall.service.cuser.CUserServiceFactory; | |||
import com.iformall.service.sm.InviteCodeInfoService; | |||
import com.iformall.service.sm.InviteCodeService; | |||
import com.iformall.service.sm.UserConsumptionPackageService; | |||
import com.iformall.service.sm.UserCreateVideoNumService; | |||
import com.iformall.sm.AiDigitalAvatarHelper; | |||
import com.iformall.sm.ShareImgParam; | |||
import com.iformall.sm.ShareImgResult; | |||
import com.iformall.utils.*; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiImplicitParam; | |||
import io.swagger.annotations.ApiImplicitParams; | |||
import io.swagger.annotations.ApiOperation; | |||
import org.apache.commons.io.IOUtils; | |||
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 org.springframework.web.context.request.RequestContextHolder; | |||
import org.springframework.web.context.request.ServletRequestAttributes; | |||
import javax.imageio.ImageIO; | |||
import javax.servlet.ServletOutputStream; | |||
import javax.servlet.http.HttpServletRequest; | |||
import javax.servlet.http.HttpServletResponse; | |||
import java.awt.image.BufferedImage; | |||
import java.io.IOException; | |||
import java.util.HashMap; | |||
import java.util.List; | |||
import java.util.Map; | |||
@RestController | |||
@RequestMapping("/api/miniApp") | |||
@Api(description = "用户登陆相关接口") | |||
public class MiniAppUserController extends BaseController { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private CUserServiceFactory cuserFactory; | |||
@Autowired | |||
@Qualifier("objectCommonRedisTemplate") | |||
RedisTemplate<String, Object> redisTemplate; | |||
@Autowired | |||
private WxCUserBasicInfoService wxCUserBasicInfoService; | |||
@Autowired | |||
private UserBasicQrcodeService userBasicQrcodeService; | |||
@Autowired | |||
WxAppinfoService wxAppinfoService; | |||
/** | |||
* 用户登录 | |||
* 小程序登陆 | |||
* | |||
* @param map | |||
* @return | |||
*/ | |||
@AuthIgnore | |||
@TenantIgnore | |||
@PostMapping("/login") | |||
@ApiOperation(value = "用户登录", notes = "{\"appId\":\"string\",\"code\":\"string\",\"scene\":\"string\",\"sceneAddress\":\"string\",\"latitude\":\"string\",\"longitude\":\"string\",\"systemInfo\":\"string\"}") | |||
public ResultData userLogin(@RequestBody Map<String, String> map) { | |||
logger.info("dologin >>>>>>>>>>>>>>>>>"+map.toString()); | |||
Map resultMap = new HashMap(); | |||
String appId = map.get("appId"); | |||
String code = map.get("code"); | |||
//登录凭证不能为空 | |||
if (StringUtils.isBlank(appId)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "appId不能为空"); | |||
} | |||
if (StringUtils.isBlank(code)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "code不能为空"); | |||
} | |||
WxAppinfo wxAppinfo = wxAppinfoService.getOnlyByAppIdFromRedis(appId); | |||
if(wxAppinfo == null){ | |||
return new ResultData(ErrorCode.APP_ID_NOT_FOUND); | |||
} | |||
if(!wxAppinfo.getEnable().equals(EnumEnableType.Enable.getCode())){ | |||
return new ResultData(ErrorCode.APP_ID_NOT_ENABLE); | |||
} | |||
EnumAppPlat appPlat = EnumAppPlat.getByCode(wxAppinfo.getPlat()); | |||
if(appPlat == null){ | |||
return new ResultData(ErrorCode.APP_PLAT_ERROR); | |||
} | |||
String session_key = null; | |||
String openId = null; | |||
String unionId = null; | |||
try { | |||
WxMaJscode2SessionResult session = cuserFactory.getCUserService(appPlat).jsCode2SessionInfo(code, wxAppinfo, false); | |||
logger.info("sessionResult: " + session); | |||
if (null != session) { | |||
logger.info("sessionResultDetail: [openid]" + session.getOpenid()+",[sessionkey]"+session.getSessionKey()+",[unionid]"+session.getUnionid()); | |||
} | |||
//获取会话密钥(session_key) | |||
session_key = session.getSessionKey(); | |||
openId = session.getOpenid(); | |||
unionId = session.getUnionid(); | |||
logger.info("session_key: " + session_key + ", openId: " + openId + ", unionId: " + unionId); | |||
resultMap.put("openId", openId); | |||
} catch (Exception e) { | |||
logger.error(e.getMessage(), e); | |||
return new ResultData(ErrorCode.SESSION_KEY_DECODE_ERR); | |||
} | |||
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); | |||
// request.setAttribute(Constant.TENANT_ID, wxMall.getTenantId()); | |||
// request.setAttribute(Constant.PARENT_TENANT_ID, wxMall.getParentTenantId()); | |||
String ipaddress = IPUtil.getIpAddr(request); | |||
CUser cUser = new CUser(); | |||
cUser.setAppId(appId); | |||
cUser.setOpenId(openId); | |||
cUser.setUnionId(unionId); | |||
cUser.setRegisterIp(ipaddress); | |||
cUser.setSessionKey(session_key); | |||
//处理登陆用户 | |||
cUser = cuserFactory.getCUserService(appPlat).handleLoginUser(cUser); | |||
if(cUser.getUserId() != null){ | |||
WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.getById(cUser.getUserId(), getTenantInfo().getTenantId()); | |||
if(basicInfo != null){ | |||
wxCUserBasicInfoService.handleLoginUser(basicInfo); | |||
resultMap.put("token", basicInfo.getToken()); | |||
} | |||
} | |||
return new ResultData(resultMap); | |||
} | |||
/** | |||
* 授权登陆 | |||
* | |||
* @param map | |||
* @return | |||
*/ | |||
@AuthIgnore | |||
@PostMapping("/loginPhone") | |||
@ApiOperation(value = "授权后获取用户的手机号", notes = "{\"encryptedData\":\"string\",\"iv\":\"string\"}") | |||
public ResultData getUserPhone(@RequestBody Map<String, String> map) { | |||
logger.info(map.toString()); | |||
String appId = map.get("appId"); | |||
String openId = map.get("openId"); | |||
String encryptedData = map.get("encryptedData"); | |||
String iv = map.get("iv"); | |||
if(StringUtils.isBlank(appId)){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "appId 不能为空"); | |||
} | |||
if(StringUtils.isBlank(openId)){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "openId 不能为空"); | |||
} | |||
WxAppinfo wxAppinfo = wxAppinfoService.getOnlyByAppIdFromRedis(appId); | |||
if(wxAppinfo == null){ | |||
return new ResultData(ErrorCode.APP_ID_NOT_FOUND); | |||
} | |||
if(!wxAppinfo.getEnable().equals(EnumEnableType.Enable.getCode())){ | |||
return new ResultData(ErrorCode.APP_ID_NOT_ENABLE); | |||
} | |||
EnumAppPlat appPlat = EnumAppPlat.getByCode(wxAppinfo.getPlat()); | |||
if(appPlat == null){ | |||
return new ResultData(ErrorCode.APP_PLAT_ERROR); | |||
} | |||
//登录凭证不能为空 | |||
if (StringUtils.isBlank(encryptedData)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "encryptedData 不能为空"); | |||
} | |||
if (StringUtils.isBlank(iv)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "iv 不能为空"); | |||
} | |||
String uid = map.get("uid"); | |||
UserBasicFrom from = new UserBasicFrom(); | |||
from.setPlat(appPlat.getCode()); | |||
from.setFromProject(EnumProject.PROJECT_5.getCode()); | |||
if(StringUtils.isNotBlank(uid)){ | |||
try { | |||
from.setFromUserId(Long.parseLong(uid)); | |||
from.setFromType(EnumUserBasicFrom.FROM_3.getCode()); | |||
}catch(Exception e){} | |||
} | |||
Map resultMap = new HashMap(); | |||
try { | |||
CUser user = cuserFactory.getCUserService(appPlat).getByOpenId(openId, getTenantInfo().getTenantId()); | |||
if (user == null) { | |||
return new ResultData(ErrorCode.USER_IS_EMPTY); | |||
} | |||
// logger.info("ceshi "+user.getAppPlat()+"======"+user.getClass()); | |||
// 解密 并注册 | |||
WxCUserBasicInfo basicInfo = cuserFactory.getCUserService(appPlat).decryptPhoneNoInfo(encryptedData, iv, user, wxAppinfo, false,from); | |||
wxCUserBasicInfoService.handleLoginUser(basicInfo); | |||
resultMap.put("token", basicInfo.getToken()); | |||
} catch (MallinkException e) { | |||
return new ResultData(e.getErrorCode(), e.getMessage()); | |||
}catch (Exception e) { | |||
this.logger.error(e.getMessage(), e); | |||
return new ResultData(ErrorCode.DB_FAIL.getCode(), "解密并保存出错", resultMap); | |||
} | |||
return new ResultData(resultMap); | |||
} | |||
/** | |||
* 获取二维码 | |||
* | |||
* @param map | |||
* @return | |||
*/ | |||
@PostMapping("/getUserQrcode") | |||
@ApiOperation(value = "获取二维码", notes = "{\"encryptedData\":\"string\",\"iv\":\"string\"}") | |||
public ResultData getUserQrcode(@RequestBody Map<String, String> map) { | |||
logger.info(map.toString()); | |||
String appId = map.get("appId"); | |||
String img = map.get("img"); | |||
if(StringUtils.isBlank(appId)){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "appId 不能为空"); | |||
} | |||
WxAppinfo wxAppinfo = wxAppinfoService.getOnlyByAppIdFromRedis(appId); | |||
if(wxAppinfo == null){ | |||
return new ResultData(ErrorCode.APP_ID_NOT_FOUND); | |||
} | |||
try { | |||
//获取用户二维码 | |||
String qrCode = userBasicQrcodeService.getQrCode(getMemberId(), wxAppinfo.getProjectType(), wxAppinfo.getPlat()); | |||
ShareImgParam param = new ShareImgParam(); | |||
String imgBasic = Base64Util.imageUrlToBase64(img); | |||
param.setImg(imgBasic); | |||
String qrcodeBasic = Base64Util.imageUrlToBase64(qrCode); | |||
param.setWatermark_img(qrcodeBasic); | |||
ShareImgResult shareImg = AiDigitalAvatarHelper.createShareImg(param); | |||
if(shareImg.isSuccess()){ | |||
return new ResultData(shareImg.getImg()); | |||
}else{ | |||
return new ResultData(ErrorCode.DEVICE_QRCODE_GET_FAILED.getCode(),shareImg.getMsg()); | |||
} | |||
} catch (MallinkException e) { | |||
return new ResultData(e.getErrorCode(), e.getMessage()); | |||
}catch (Exception e) { | |||
this.logger.error(e.getMessage(), e); | |||
return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||
} | |||
} | |||
} |
@@ -0,0 +1,53 @@ | |||
package com.iformall.controller; | |||
import com.github.pagehelper.PageInfo; | |||
import com.iformall.annotation.AuthIgnore; | |||
import com.iformall.common.ErrorCode; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.domain.po.Product; | |||
import com.iformall.domain.po.base.BaseEntity; | |||
import com.iformall.domain.po.sm.PersonPhoto; | |||
import com.iformall.enums.EnumMouldSendType; | |||
import com.iformall.enums.EnumaMouldPatchStatus; | |||
import com.iformall.service.ProductService; | |||
import com.iformall.service.sm.MouldPatchSignService; | |||
import com.iformall.service.sm.PersonPhotoService; | |||
import com.iformall.utils.BaiduImageCheckUtil; | |||
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.util.ObjectUtils; | |||
import org.springframework.web.bind.annotation.*; | |||
import org.springframework.web.multipart.MultipartFile; | |||
@RestController | |||
@RequestMapping("/api/product") | |||
@Api(description = "模板接口") | |||
public class ProductController extends BaseController { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private ProductService productService; | |||
@AuthIgnore | |||
@ApiOperation("分页列表接口") | |||
@GetMapping("list") | |||
@ApiImplicitParams({ | |||
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
public ResultData list(@ModelAttribute Product record, Integer pageNum, Integer pageSize) { | |||
logger.debug("[" + getIpAddr() + "] ProductController::list"); | |||
if (record == null) record = new Product(); | |||
record.setSortColumns(BaseEntity.SortField.UpdateDate_DESC); | |||
final PageInfo<Product> page = productService.listAsPage(record, pageNum, pageSize); | |||
return new ResultData(page); | |||
} | |||
} |
@@ -0,0 +1,321 @@ | |||
package com.iformall.controller; | |||
import com.github.pagehelper.PageInfo; | |||
import com.iformall.annotation.AuthIgnore; | |||
import com.iformall.annotation.TenantIgnore; | |||
import com.iformall.common.ErrorCode; | |||
import com.iformall.common.Result; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.domain.dto.OrderComposeSaveDto; | |||
import com.iformall.domain.dto.OrderSaveDto; | |||
import com.iformall.domain.po.*; | |||
import com.iformall.domain.po.base.BaseEntity; | |||
import com.iformall.domain.po.sm.PersonPhoto; | |||
import com.iformall.enums.*; | |||
import com.iformall.exception.MallinkException; | |||
import com.iformall.service.*; | |||
import com.iformall.service.pay.PayServiceFactory; | |||
import com.iformall.service.pay.entity.PayExtraParam; | |||
import com.iformall.service.pay.service.pay.PayAdapterService; | |||
import com.iformall.sm.AiDigitalAvatarHelper; | |||
import com.iformall.sm.ShareImgParam; | |||
import com.iformall.sm.ShareImgResult; | |||
import com.iformall.utils.Base64Util; | |||
import com.iformall.utils.Constant; | |||
import com.iformall.utils.DateUtils; | |||
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.web.bind.annotation.*; | |||
import javax.servlet.http.HttpServletRequest; | |||
import java.util.ArrayList; | |||
import java.util.Date; | |||
import java.util.List; | |||
import java.util.Map; | |||
@RestController | |||
@RequestMapping("/api/productOrder") | |||
@Api(description = "模板接口") | |||
public class ProductOrderController extends BaseController { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private ProductOrderService productOrderService; | |||
@Autowired | |||
private ProductService productService; | |||
@Autowired | |||
WxAppinfoService wxAppinfoService; | |||
@Autowired | |||
WxPayAccountService wxPayAccountService; | |||
@Autowired | |||
WxCUserBasicInfoService wxCUserBasicInfoService; | |||
@Autowired | |||
PayServiceFactory payServiceFactory; | |||
@Autowired | |||
SchemeService schemeService; | |||
@ApiOperation(value = "创建订单", notes = "") | |||
@PostMapping("createOrder") | |||
public ResultData createOrder(@RequestBody ProductOrder record) { | |||
logger.debug("[" + getIpAddr() + "] ProductOrderController::createOrder"); | |||
Long productId = record.getProductId(); | |||
// Integer payVendor = record.getPayVendor(); | |||
if(productId == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"商品编号为空"); | |||
} | |||
// if(payVendor == null){ | |||
// return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"支付方式为空"); | |||
// } | |||
Product product = productService.getById(productId); | |||
if(product == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"未查询到商品"); | |||
} | |||
// EnumProductOrderPayVendor payVendorEnum = EnumProductOrderPayVendor.getEnum(payVendor); | |||
// if(payVendorEnum == null){ | |||
// return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"支付方式参数错误"); | |||
// } | |||
record = new ProductOrder(); | |||
record.setUserId(getMemberId()); | |||
record.setProductId(product.getId()); | |||
record.setProductTitle(product.getTitle()); | |||
record.setProductEnTitle(product.getEnTitle()); | |||
record.setOrderStatus(EnumProductOrderStatus.ORDER_STATUS_PENDING_PAYMENT.getCode()); | |||
record.setProjectType(product.getProjectType()); | |||
// record.setPayVendor(payVendorEnum.getCode()); | |||
record.setOrderPrice(product.getPriceRmb()); | |||
// record.setProfitSharing(payVendorEnum.getProfitSharing()); | |||
productOrderService.saveOrUpdate(record); | |||
return new ResultData(record.getOrderNumber()); | |||
} | |||
@AuthIgnore | |||
@ApiOperation("根据id查询接口") | |||
@GetMapping("/findByNumber") | |||
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
public ResultData findByNumber(String orderNumber) { | |||
logger.debug("[" + getIpAddr() + "] ProductOrderController::findByNumber"); | |||
if(StringUtils.isBlank(orderNumber)){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"订单号为空"); | |||
} | |||
Long id = null; | |||
try{ | |||
id = Long.parseLong(orderNumber); | |||
}catch (Exception e){ } | |||
if(id == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"订单号异常"); | |||
} | |||
ProductOrder productOrder = productOrderService.getById(id); | |||
if(productOrder == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"未查询到订单"); | |||
} | |||
return new ResultData(productOrder); | |||
} | |||
@AuthIgnore | |||
@ApiOperation(value = "创建支付", notes = "") | |||
@PostMapping("createPay") | |||
public ResultData createPay(@RequestBody ProductOrder record){ | |||
logger.debug("[" + getIpAddr() + "] ProductOrderController::createPay"); | |||
String orderNumber = record.getOrderNumber(); | |||
String openId = record.getOpenId(); | |||
Integer payVendor = record.getPayVendor(); | |||
if(StringUtils.isBlank(orderNumber)){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"订单号为空"); | |||
} | |||
if(payVendor == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"支付方式为空"); | |||
} | |||
EnumProductOrderPayVendor payVendorEnum = EnumProductOrderPayVendor.getEnum(payVendor); | |||
if(payVendorEnum == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"支付方式参数错误"); | |||
} | |||
if(EnumProductOrderPayVendor.PAY_WAY_WECHAT.getCode().equals(payVendor)){ | |||
if(StringUtils.isBlank(openId)){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"openId为空"); | |||
} | |||
} | |||
Long id = null; | |||
try{ | |||
id = Long.parseLong(orderNumber); | |||
}catch (Exception e){ } | |||
if(id == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"订单号异常"); | |||
} | |||
ProductOrder productOrder = productOrderService.getById(id); | |||
if(productOrder == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"未查询到订单"); | |||
} | |||
productOrder.setOpenId(openId); | |||
productOrder.setPayVendor(payVendor); | |||
ResultData resultData = productOrderService.createPay(productOrder); | |||
return resultData; | |||
} | |||
@AuthIgnore | |||
@ApiOperation("根据id查询接口") | |||
@GetMapping("/findStatus") | |||
@ApiImplicitParam(name = "id", value = "id", dataType = "String", paramType = "query", required = true) | |||
public ResultData findStatus(String orderNumber) { | |||
logger.debug("[" + getIpAddr() + "] ProductOrderController::findStatus"); | |||
if(StringUtils.isBlank(orderNumber)){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"订单号为空"); | |||
} | |||
Long id = null; | |||
try{ | |||
id = Long.parseLong(orderNumber); | |||
}catch (Exception e){ } | |||
if(id == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"订单号异常"); | |||
} | |||
ProductOrder productOrder = productOrderService.getById(id); | |||
if(productOrder == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"未查询到订单"); | |||
} | |||
if(productOrder.getPayVendor() == null){ | |||
return new ResultData(productOrder); | |||
} | |||
if(EnumProductOrderStatus.ORDER_STATUS_PENDING_PAYMENT.getCode().equals(productOrder.getOrderStatus())){ | |||
PayAdapterService payAdapterService = payServiceFactory.getPayAdapterService(productOrder.getPayVendor()); | |||
if(payAdapterService == null){ | |||
return new ResultData(ErrorCode.ORDER_IS_NOT_PAY.getCode(),"该订单不支持当前支付"); | |||
} | |||
EnumProductOrderPayVendor payVendoEnum = EnumProductOrderPayVendor.getEnum(productOrder.getPayVendor()); | |||
WxAppinfo appinfo = wxAppinfoService.getProjectCAppInfoFromRedis(productOrder.getProjectType(), payVendoEnum.getPlat()); | |||
if(appinfo == null){ | |||
return new ResultData(ErrorCode.ORDER_IS_NOT_PAY.getCode(),"未找到支付应用"); | |||
} | |||
WxPayAccount payAccount = wxPayAccountService.getByIdFromRedis(appinfo.getPayId()); | |||
if(payAccount == null){ | |||
return new ResultData(ErrorCode.ORDER_IS_NOT_PAY.getCode(),"未找到支付密钥"); | |||
} | |||
ResultData resultData = productOrderService.handleProductOrderByQuery(appinfo,payAccount,productOrder,payAdapterService); | |||
} | |||
return new ResultData(productOrder); | |||
} | |||
@AuthIgnore | |||
@ApiOperation(value = "获取详情链接", notes = "") | |||
@PostMapping("getPayUrl") | |||
public ResultData getPayUrl(@RequestBody ProductOrder record) { | |||
logger.debug("[" + getIpAddr() + "] ProductOrderController::getPayUrl"); | |||
if(StringUtils.isBlank(record.getAppId())){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "appId 不能为空"); | |||
} | |||
WxAppinfo wxAppinfo = wxAppinfoService.getOnlyByAppIdFromRedis(record.getAppId()); | |||
if(wxAppinfo == null){ | |||
return new ResultData(ErrorCode.APP_ID_NOT_FOUND); | |||
} | |||
if(record.getUserId() == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"用户编号为空"); | |||
} | |||
WxCUserBasicInfo basicUser = wxCUserBasicInfoService.getById(record.getUserId()); | |||
if(basicUser == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到用户"); | |||
} | |||
if(record.getProductId() == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"商品编号为空"); | |||
} | |||
Product product = productService.getById(record.getProductId()); | |||
if(product == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到商品"); | |||
} | |||
if(!wxAppinfo.getProjectType().equals(product.getProjectType())){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"商品数据异常"); | |||
} | |||
try { | |||
EnumProject project = EnumProject.getEnum(wxAppinfo.getProjectType()); | |||
EnumAppPlat plat = EnumAppPlat.getByCode(wxAppinfo.getPlat()); | |||
String productScheme = Constant.mainPageUrl; | |||
String sceneParam = "t:dt_p:"+record.getProductId()+"_u:"+record.getUserId(); | |||
Date timeAfterDays = DateUtils.getTimeAfterDays(1, new Date()); | |||
Long expireTime = timeAfterDays.getTime()/1000; | |||
return schemeService.generateScheme(project,plat,productScheme,sceneParam,expireTime); | |||
} catch (MallinkException e) { | |||
return new ResultData(e.getErrorCode(), e.getMessage()); | |||
}catch (Exception e) { | |||
this.logger.error(e.getMessage(), e); | |||
return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||
} | |||
} | |||
@AuthIgnore | |||
@ApiOperation(value = "创建支付(不验证用户)", notes = "") | |||
@PostMapping("pay") | |||
public ResultData pay(@RequestBody ProductOrder record) { | |||
logger.debug("[" + getIpAddr() + "] ProductOrderController::pay"); | |||
if(record.getPayVendor() == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"支付方式为空"); | |||
} | |||
EnumProductOrderPayVendor payVendorEnum = EnumProductOrderPayVendor.getEnum(record.getPayVendor()); | |||
if(payVendorEnum == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"支付方式参数错误"); | |||
} | |||
if(EnumProductOrderPayVendor.PAY_WAY_WECHAT.getCode().equals(record.getPayVendor())){ | |||
if(StringUtils.isBlank(record.getOpenId())){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"openId为空"); | |||
} | |||
} | |||
record.setProfitSharing(payVendorEnum.getProfitSharing()); | |||
if(record.getUserId() == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"用户编号为空"); | |||
} | |||
WxCUserBasicInfo basicUser = wxCUserBasicInfoService.getById(record.getUserId()); | |||
if(basicUser == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到用户"); | |||
} | |||
if(record.getProductId() == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"商品编号为空"); | |||
} | |||
Product product = productService.getById(record.getProductId()); | |||
if(product == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到商品"); | |||
} | |||
record.setProductTitle(product.getTitle()); | |||
record.setProductEnTitle(product.getEnTitle()); | |||
record.setOrderStatus(EnumProductOrderStatus.ORDER_STATUS_PENDING_PAYMENT.getCode()); | |||
record.setProjectType(product.getProjectType()); | |||
record.setOrderPrice(product.getPriceRmb()); | |||
productOrderService.saveOrUpdate(record); | |||
return productOrderService.createPay(record); | |||
} | |||
} |
@@ -0,0 +1,51 @@ | |||
package com.iformall.controller; | |||
import com.github.pagehelper.PageInfo; | |||
import com.iformall.common.ErrorCode; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.domain.po.UserBasicFrom; | |||
import com.iformall.domain.po.UserBasicPropertyLog; | |||
import com.iformall.domain.po.base.BaseEntity; | |||
import com.iformall.service.UserBasicFromService; | |||
import com.iformall.service.UserBasicPropertyLogService; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiImplicitParam; | |||
import io.swagger.annotations.ApiImplicitParams; | |||
import io.swagger.annotations.ApiOperation; | |||
import org.slf4j.Logger; | |||
import org.slf4j.LoggerFactory; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.ModelAttribute; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
@RestController | |||
@RequestMapping("/api/userFrom") | |||
@Api(description = "模板接口") | |||
public class UserBasicFromController extends BaseController { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private UserBasicFromService userBasicFromService; | |||
@ApiOperation("分页列表接口") | |||
@GetMapping("list") | |||
@ApiImplicitParams({ | |||
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
public ResultData list(@ModelAttribute UserBasicFrom record, Integer pageNum, Integer pageSize) { | |||
logger.debug("[" + getIpAddr() + "] UserBasicFromController::list"); | |||
if (record == null) record = new UserBasicFrom(); | |||
if(record.getFromProject() == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"项目类型为空"); | |||
} | |||
record.setFromUserId(getMemberId()); | |||
record.setSortColumns(BaseEntity.SortField.CreateDate_DESC); | |||
final PageInfo<UserBasicFrom> page = userBasicFromService.listAsPage(record, pageNum, pageSize); | |||
return new ResultData(page); | |||
} | |||
} |
@@ -0,0 +1,88 @@ | |||
package com.iformall.controller; | |||
import com.github.pagehelper.PageInfo; | |||
import com.iformall.annotation.AuthIgnore; | |||
import com.iformall.common.ErrorCode; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.domain.po.Product; | |||
import com.iformall.domain.po.ProductOrder; | |||
import com.iformall.domain.po.UserBasicImage; | |||
import com.iformall.domain.po.base.BaseEntity; | |||
import com.iformall.domain.po.sm.UserMouldVideo; | |||
import com.iformall.enums.EnumVideoStatus; | |||
import com.iformall.service.ProductService; | |||
import com.iformall.service.UserBasicImageService; | |||
import com.iformall.sm.AiCheckPhotoParam; | |||
import com.iformall.sm.AiCheckPhotoResult; | |||
import com.iformall.sm.AiDigitalAvatarHelper; | |||
import com.iformall.sm.AiVideoHelper; | |||
import com.iformall.utils.Base64Util; | |||
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.util.ObjectUtils; | |||
import org.springframework.web.bind.annotation.*; | |||
import org.springframework.web.multipart.MultipartFile; | |||
import java.io.IOException; | |||
@RestController | |||
@RequestMapping("/api/userDigital") | |||
@Api(description = "模板接口") | |||
public class UserBasicImageController extends BaseController { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private UserBasicImageService userBasicImageService; | |||
@ApiOperation("根据id查询接口") | |||
@GetMapping("/findImage") | |||
public ResultData findImage() { | |||
logger.debug("[" + getIpAddr() + "] UserBasicImageController::findImage"); | |||
UserBasicImage userBasicImage = userBasicImageService.findById(getMemberId()); | |||
return new ResultData(userBasicImage); | |||
} | |||
@ApiOperation("新增接口") | |||
@PostMapping("addImage") | |||
public ResultData addImage(@RequestBody UserBasicImage record) { | |||
logger.debug("[" + getIpAddr() + "] UserBasicImageController::addImage"); | |||
userBasicImageService.addImage(getMemberId(),record); | |||
return new ResultData(); | |||
} | |||
@AuthIgnore | |||
@ApiOperation("图片人脸检测") | |||
@PostMapping(value = "checkPhoto", consumes = "multipart/*", headers = "content-type=multipart/form-data") | |||
@ApiImplicitParam(name = "file", value = "file", dataType = "MultipartFile", paramType = "query", required = true) | |||
public ResultData checkPhoto(@RequestPart("file") MultipartFile file) { | |||
logger.debug("[" + getIpAddr() + "] UserBasicImageController::checkPhoto"); | |||
if (ObjectUtils.isEmpty(file) || file.getSize() <= 0) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "素材为空"); | |||
} | |||
try { | |||
byte[] fileBytes = file.getBytes(); | |||
String imgStr = Base64Util.encode(fileBytes); | |||
AiCheckPhotoParam param = new AiCheckPhotoParam(); | |||
param.setImg(imgStr); | |||
AiCheckPhotoResult result = AiDigitalAvatarHelper.checkPhoto(param); | |||
if (result.isSuccess()) { | |||
return new ResultData(); | |||
} | |||
return new ResultData(result.getCode(), result.getMsg()); | |||
} catch (IOException e) { | |||
e.printStackTrace(); | |||
return new ResultData(ErrorCode.SYS_SERVER_ERROR.getCode(), "接口请求异常"); | |||
} | |||
} | |||
} |
@@ -0,0 +1,36 @@ | |||
package com.iformall.controller; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.domain.po.UserBasicProperty; | |||
import com.iformall.service.UserBasicPropertyService; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiOperation; | |||
import org.slf4j.Logger; | |||
import org.slf4j.LoggerFactory; | |||
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; | |||
@RestController | |||
@RequestMapping("/api/userProperty") | |||
@Api(description = "模板接口") | |||
public class UserBasicPropertyController extends BaseController { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private UserBasicPropertyService userBasicPropertyService; | |||
@ApiOperation("根据id查询接口") | |||
@GetMapping("/findGlod") | |||
public ResultData findGlod() { | |||
logger.debug("[" + getIpAddr() + "] UserBasicPropertyController::findGlod"); | |||
UserBasicProperty userBasicProperty = userBasicPropertyService.findById(getMemberId()); | |||
return new ResultData(userBasicProperty); | |||
} | |||
} |
@@ -0,0 +1,49 @@ | |||
package com.iformall.controller; | |||
import com.github.pagehelper.PageInfo; | |||
import com.iformall.common.ErrorCode; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.domain.po.Product; | |||
import com.iformall.domain.po.UserBasicImage; | |||
import com.iformall.domain.po.UserBasicPropertyLog; | |||
import com.iformall.domain.po.base.BaseEntity; | |||
import com.iformall.service.UserBasicImageService; | |||
import com.iformall.service.UserBasicPropertyLogService; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiImplicitParam; | |||
import io.swagger.annotations.ApiImplicitParams; | |||
import io.swagger.annotations.ApiOperation; | |||
import org.slf4j.Logger; | |||
import org.slf4j.LoggerFactory; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
@RestController | |||
@RequestMapping("/api/userPropertyLog") | |||
@Api(description = "模板接口") | |||
public class UserBasicPropertyLogController extends BaseController { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private UserBasicPropertyLogService userBasicPropertyLogService; | |||
@ApiOperation("分页列表接口") | |||
@GetMapping("list") | |||
@ApiImplicitParams({ | |||
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
public ResultData list(@ModelAttribute UserBasicPropertyLog record, Integer pageNum, Integer pageSize) { | |||
logger.debug("[" + getIpAddr() + "] UserBasicPropertyLogController::list"); | |||
if (record == null) record = new UserBasicPropertyLog(); | |||
if(record.getProjectType() == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"项目类型为空"); | |||
} | |||
record.setUserId(getMemberId()); | |||
record.setSortColumns(BaseEntity.SortField.CreateDate_DESC); | |||
final PageInfo<UserBasicPropertyLog> page = userBasicPropertyLogService.listAsPage(record, pageNum, pageSize); | |||
return new ResultData(page); | |||
} | |||
} |
@@ -0,0 +1,156 @@ | |||
package com.iformall.controller; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.github.pagehelper.PageInfo; | |||
import com.iformall.annotation.AuthIgnore; | |||
import com.iformall.common.ErrorCode; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.domain.po.base.BaseEntity; | |||
import com.iformall.domain.po.sm.*; | |||
import com.iformall.enums.*; | |||
import com.iformall.exception.MallinkException; | |||
import com.iformall.service.sm.*; | |||
import com.iformall.video.VideoFactory; | |||
import com.iformall.video.entity.VideUploadResult; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiImplicitParam; | |||
import io.swagger.annotations.ApiImplicitParams; | |||
import io.swagger.annotations.ApiOperation; | |||
import lombok.SneakyThrows; | |||
import org.apache.commons.lang3.StringUtils; | |||
import org.slf4j.Logger; | |||
import org.slf4j.LoggerFactory; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.util.ObjectUtils; | |||
import org.springframework.web.bind.annotation.*; | |||
import javax.servlet.http.HttpServletRequest; | |||
import javax.servlet.http.HttpServletResponse; | |||
import java.io.File; | |||
import java.io.IOException; | |||
import java.io.InputStream; | |||
import java.io.OutputStream; | |||
import java.net.URL; | |||
import java.net.URLEncoder; | |||
import java.nio.charset.StandardCharsets; | |||
import java.util.Date; | |||
import java.util.List; | |||
@RestController | |||
@RequestMapping("/api/digitalAvatarPhoto") | |||
@Api(description = "模板接口") | |||
public class UserDigitalAvatarPhotoController extends BaseController { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private UserDigitalAvatarOrderService userDigitalAvatarOrderService; | |||
@Autowired | |||
private UserDigitalAvatarPhotoService userDigitalAvatarPhotoService; | |||
@ApiOperation("制作照片") | |||
@PostMapping("createPhoto") | |||
public ResultData createPhoto(@RequestBody UserDigitalAvatarOrder record) { | |||
logger.debug("[" + getIpAddr() + "] UserDigitalAvatarPhotoController::createPhoto"); | |||
record.setUserId(getMemberId()); | |||
if(record.getId() != null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"参数异常"); | |||
} | |||
if(record.getDigitalAvatarId() == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"风格模板为空"); | |||
} | |||
return userDigitalAvatarOrderService.createOrder(record); | |||
} | |||
@ApiOperation("重复制作照片") | |||
@PostMapping("createPhotoAgain") | |||
public ResultData createPhotoAgain(@RequestBody UserDigitalAvatarOrder record) { | |||
logger.debug("[" + getIpAddr() + "] UserDigitalAvatarPhotoController::createPhotoAgain"); | |||
if(record.getId() == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"参数异常"); | |||
} | |||
record.setUserId(getMemberId()); | |||
UserDigitalAvatarOrder userDigitalAvatarOrder = userDigitalAvatarOrderService.selectById(record.getId()); | |||
if(userDigitalAvatarOrder == null || !record.getUserId().equals(userDigitalAvatarOrder.getUserId())){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到订单"); | |||
} | |||
return userDigitalAvatarOrderService.createPhotoAgain(userDigitalAvatarOrder); | |||
} | |||
@ApiOperation("根据id查询接口") | |||
@GetMapping("/findById") | |||
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
public ResultData findById(Long id) { | |||
logger.debug("[" + getIpAddr() + "] UserDigitalAvatarPhotoController::findById"); | |||
if(id == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"参数为空"); | |||
} | |||
UserDigitalAvatarOrder userDigitalAvatarOrder = userDigitalAvatarOrderService.getById(id); | |||
if(userDigitalAvatarOrder == null || !getMemberId().equals(userDigitalAvatarOrder.getUserId())){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到订单"); | |||
} | |||
return new ResultData(userDigitalAvatarOrder); | |||
} | |||
@ApiOperation("分页列表接口") | |||
@GetMapping("list") | |||
@ApiImplicitParams({ | |||
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
public ResultData list(@ModelAttribute UserDigitalAvatarOrder record, Integer pageNum, Integer pageSize) { | |||
logger.debug("[" + getIpAddr() + "] UserDigitalAvatarPhotoController::list"); | |||
if (record == null) record = new UserDigitalAvatarOrder(); | |||
record.setUserId(getMemberId()); | |||
record.setSortColumns(BaseEntity.SortField.CreateDate_DESC); | |||
final PageInfo<UserDigitalAvatarOrder> page = userDigitalAvatarOrderService.cListAsPage(record, pageNum, pageSize); | |||
return new ResultData(page); | |||
} | |||
@ApiOperation("根据id删除接口") | |||
@PostMapping("/delete") | |||
public ResultData delete(@RequestBody UserDigitalAvatarOrder record) { | |||
logger.debug("[" + getIpAddr() + "] UserDigitalAvatarPhotoController::delete"); | |||
if(record.getId() == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"参数为空"); | |||
} | |||
UserDigitalAvatarOrder userDigitalAvatarOrder = userDigitalAvatarOrderService.selectById(record.getId()); | |||
if(userDigitalAvatarOrder == null || !getMemberId().equals(userDigitalAvatarOrder.getUserId())){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到订单"); | |||
} | |||
userDigitalAvatarOrderService.deleteById(record.getId()); | |||
return new ResultData(); | |||
} | |||
@ApiOperation("照片超分") | |||
@PostMapping("/photoSupper") | |||
public ResultData photoSupper(@RequestBody UserDigitalAvatarPhoto record) { | |||
logger.debug("[" + getIpAddr() + "] UserDigitalAvatarPhotoController::photoSupper"); | |||
if(record.getId() == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"参数为空"); | |||
} | |||
record.setUserId(getMemberId()); | |||
UserDigitalAvatarPhoto userDigitalAvatarPhoto = userDigitalAvatarPhotoService.selectById(record.getId()); | |||
if(userDigitalAvatarPhoto == null || !record.getUserId().equals(userDigitalAvatarPhoto.getUserId())){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到照片"); | |||
} | |||
return userDigitalAvatarPhotoService.createPhotoSupper(userDigitalAvatarPhoto); | |||
} | |||
@ApiOperation("获取照片是否超分成功") | |||
@GetMapping("/getSupperPhoto") | |||
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
public ResultData getPhoto(Long id) { | |||
logger.debug("[" + getIpAddr() + "] UserDigitalAvatarPhotoController::photoSupper"); | |||
if(id == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"参数为空"); | |||
} | |||
UserDigitalAvatarPhoto userDigitalAvatarPhoto = userDigitalAvatarPhotoService.selectById(id); | |||
if(userDigitalAvatarPhoto == null || !getMemberId().equals(userDigitalAvatarPhoto.getUserId())){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到订单"); | |||
} | |||
return new ResultData(userDigitalAvatarPhoto); | |||
} | |||
} |
@@ -84,53 +84,44 @@ public class UserLiveController extends BaseController { | |||
@AuthIgnore | |||
@PostMapping("/login") | |||
@ApiOperation(value = "用户登录", notes = "{\"username\":\"string\",\"password\":\"string\",\"code\":\"string\",\"status\":\"int\"}") | |||
public Map<String,Object> login(@RequestBody Map<String, String> map, HttpServletResponse response) { | |||
Map<String,Object> wxCLiveLoginVos = new HashMap<>(); | |||
public Map<String, Object> login(@RequestBody Map<String, String> map, HttpServletResponse response) { | |||
Map<String, Object> wxCLiveLoginVos = new HashMap<>(); | |||
String ipAddr = getIpAddr(); | |||
logger.debug("[" + ipAddr + "] WxUserGrantController::login"); | |||
String phone = map.get("username"); | |||
String password = map.get("password"); | |||
if (StringUtils.isBlank(phone) || StringUtils.isBlank(password)) { | |||
HashMap<Object, Object> status = new HashMap<>(); | |||
status.put("code",ErrorCode.SYS_PARAMETER_ERROR.getCode()); | |||
status.put("message","手机号或密码为空"); | |||
wxCLiveLoginVos.put("status",status); | |||
status.put("code", ErrorCode.SYS_PARAMETER_ERROR.getCode()); | |||
status.put("message", "手机号或密码为空"); | |||
wxCLiveLoginVos.put("status", status); | |||
return wxCLiveLoginVos; | |||
// return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "手机号或密码为空"); | |||
} | |||
WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.findInfoByPhone(getTenantInfo(), phone); | |||
if (basicInfo == null) { | |||
HashMap<Object, Object> status = new HashMap<>(); | |||
status.put("code",ErrorCode.USER_IS_EMPTY); | |||
status.put("message","用户不存在"); | |||
wxCLiveLoginVos.put("status",status); | |||
status.put("code", ErrorCode.USER_IS_EMPTY); | |||
status.put("message", "用户不存在"); | |||
wxCLiveLoginVos.put("status", status); | |||
return wxCLiveLoginVos; | |||
// return new ResultData(ErrorCode.USER_IS_EMPTY); | |||
} | |||
String encryptPassword = new PasswordHelper().encryptPassword(password); | |||
if (!encryptPassword.equals(basicInfo.getPassword())) { | |||
HashMap<Object, Object> status = new HashMap<>(); | |||
status.put("code",ErrorCode.USER_PASSWD_ERR.getCode()); | |||
status.put("message","手机号或密码错误"); | |||
wxCLiveLoginVos.put("status",status); | |||
status.put("code", ErrorCode.USER_PASSWD_ERR.getCode()); | |||
status.put("message", "手机号或密码错误"); | |||
wxCLiveLoginVos.put("status", status); | |||
return wxCLiveLoginVos; | |||
// return new ResultData(ErrorCode.USER_PASSWD_ERR.getCode(), "手机号或密码错误"); | |||
} | |||
int statu = Integer.parseInt(map.get("status")); | |||
if (statu == 0) { | |||
WxCUserBasicInfo basicLiveInfo = wxCLiveUserBasicInfoService.getById(basicInfo.getId()); | |||
if (basicLiveInfo.getCode() != null && !map.get("code").equals(basicLiveInfo.getCode())) { | |||
HashMap<Object, Object> status = new HashMap<>(); | |||
status.put("code",ErrorCode.USER_ALREADY_LOGIN.getCode()); | |||
status.put("message","用户已在其他设备登录"); | |||
wxCLiveLoginVos.put("status",status); | |||
status.put("code", ErrorCode.USER_ALREADY_LOGIN.getCode()); | |||
status.put("message", "用户已在其他设备登录"); | |||
wxCLiveLoginVos.put("status", status); | |||
return wxCLiveLoginVos; | |||
// return new ResultData(ErrorCode.USER_ALREADY_LOGIN.getCode(), "用户已在其他设备登录"); | |||
} | |||
if (basicLiveInfo.getCode() == null) { | |||
wxCLiveUserBasicInfoService.updateCode(basicInfo.getId(), map.get("code")); | |||
@@ -140,127 +131,85 @@ public class UserLiveController extends BaseController { | |||
wxCLiveUserBasicInfoService.updateCode(basicInfo.getId(), null); | |||
basicInfo.setStatus(-2); | |||
HashMap<Object, Object> status = new HashMap<>(); | |||
status.put("code",ErrorCode.USER_CANCEL_MCODE.getCode()); | |||
status.put("message","设备已注销"); | |||
wxCLiveLoginVos.put("status",status); | |||
status.put("code", ErrorCode.USER_CANCEL_MCODE.getCode()); | |||
status.put("message", "设备已注销"); | |||
wxCLiveLoginVos.put("status", status); | |||
return wxCLiveLoginVos; | |||
// return new ResultData(ErrorCode.USER_CANCEL_MCODE.getCode(), "设备已注销"); | |||
} | |||
wxCUserBasicInfoService.handleLoginUser(basicInfo); | |||
WxCUserBasicInfo basicLiveInfo = wxCLiveUserBasicInfoService.getById(basicInfo.getId()); | |||
WxCLiveLoginVo wxCLiveLoginVo = new WxCLiveLoginVo(); | |||
wxCLiveLoginVo.setCode(Integer.parseInt(map.get("code"))); | |||
//wxCLiveLoginVo.setVersion(basicLiveInfo.getVersion()); | |||
wxCLiveLoginVo.setUsername(map.get("username")); | |||
//wxCLiveLoginVo.setStatus(0); | |||
//wxCLiveLoginVo.setCurrent_time(new Date(System.currentTimeMillis() / 1000)); | |||
// wxCLiveLoginVo.setExpire_time(basicLiveInfo.getExpireTime().getTime() / 1000); | |||
//生成一个token | |||
String token = UUID.randomUUID().toString().replace("-",""); | |||
//将token和用户信息绑定放到redis redis--key:user:info:token value:用户信息 | |||
redisTemplate.opsForValue().set("user:login"+token,JSON.toJSONString(wxCLiveLoginVo)); | |||
//返回给前端 | |||
wxCLiveLoginVo.setToken(token); | |||
Map<String, Object> info = new HashMap(); | |||
Map<String, Object> data = new HashMap(); | |||
Map<Object, Object> status = new HashMap<>(); | |||
status.put("code",1000); | |||
status.put("message","success"); | |||
data.put("status",0); | |||
data.put("version",basicLiveInfo.getVersion()); | |||
data.put("current_time",new Date(System.currentTimeMillis() / 1000)); | |||
data.put("expire_time",basicLiveInfo.getExpireTime().getTime() / 1000); | |||
status.put("code", 1000); | |||
status.put("message", "success"); | |||
data.put("token", basicInfo.getToken()); | |||
data.put("status", 0); | |||
data.put("version", basicLiveInfo.getVersion()); | |||
data.put("current_time", new Date(System.currentTimeMillis() / 1000)); | |||
data.put("expire_time", basicLiveInfo.getExpireTime().getTime() / 1000); | |||
info.put("log_id", basicInfo.getId()); | |||
info.put("server_type","user login"); | |||
info.put("server_type", "user login"); | |||
info.put("username", basicInfo.getPhone()); | |||
wxCLiveLoginVos.put("data",data); | |||
wxCLiveLoginVos.put("info",info); | |||
wxCLiveLoginVos.put("data", data); | |||
wxCLiveLoginVos.put("info", info); | |||
wxCLiveLoginVo.setData(data); | |||
wxCLiveLoginVo.setInfo(info); | |||
wxCLiveLoginVos.put("status",status); | |||
wxCLiveLoginVos.put("token",token); | |||
wxCLiveLoginVos.put("status", status); | |||
System.out.println("wxCLiveLoginVo.getToken() = " + wxCLiveLoginVo.getToken()); | |||
return wxCLiveLoginVos; | |||
// return new ResultData(1000,"success",wxCLiveLoginVo); | |||
} | |||
/** | |||
* 视频模板列表 | |||
*/ | |||
@AuthIgnore | |||
@PostMapping("/avatarList") | |||
@ApiOperation(value = "视频模板列表", notes = "{\"username\",\"string\",\"code\",\"string\"}") | |||
public Map<String,Object> avatarList(@RequestBody Map<String, String> params) throws Exception { | |||
Map<String,Object> avatarVos = new HashMap<>(); | |||
public Map<String, Object> avatarList(@RequestBody Map<String, String> params) throws Exception { | |||
Map<String, Object> avatarVos = new HashMap<>(); | |||
String ipaddress = getIpAddr(); | |||
logger.debug("[" + ipaddress + "] WxUserGrantController::getAvatarList"); | |||
String phone = params.get("username"); | |||
WxCUserBasicInfo infoByPhone = wxCUserBasicInfoService.findInfoByPhone(getTenantInfo(), phone); | |||
Long id = infoByPhone.getId(); | |||
System.out.println("id = " + id); | |||
Long id = getMemberId(); | |||
//鉴权 | |||
WxCUserBasicInfo basicLiveInfo = wxCLiveUserBasicInfoService.getById(id); | |||
if (basicLiveInfo.getCode() != null && !params.get("code").equals(basicLiveInfo.getCode())) { | |||
HashMap<Object, Object> status = new HashMap<>(); | |||
status.put("code",ErrorCode.USER_ALREADY_LOGIN.getCode()); | |||
status.put("message","用户已在其他设备登录"); | |||
avatarVos.put("status",status); | |||
status.put("code", ErrorCode.USER_ALREADY_LOGIN.getCode()); | |||
status.put("message", "用户已在其他设备登录"); | |||
avatarVos.put("status", status); | |||
return avatarVos; | |||
} | |||
Map<Object, Object> status = new HashMap<>(); | |||
status.put("code",1000); | |||
status.put("msg","success"); | |||
// long id = getMemberId(); | |||
// System.out.println("id = " + id); | |||
// WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.getById(infoByPhone.getId()); | |||
avatarVos.put("status",status); | |||
return wxCVideoService.getById(infoByPhone.getId()); | |||
// return new ResultData(1000,"success",wxCVideoService.getById(infoByPhone.getId())); | |||
status.put("code", 1000); | |||
status.put("msg", "success"); | |||
avatarVos.put("status", status); | |||
return wxCVideoService.getById(id); | |||
} | |||
/** | |||
* 音频模板列表 | |||
*/ | |||
@AuthIgnore | |||
@PostMapping("/audioList") | |||
@ApiOperation(value = "音频模板列表", notes = "{\"username\",\"string\",\"code\",\"string\"}") | |||
public Map<String,Object> audioList(@RequestBody Map<String, String> params) { | |||
Map<String,Object> resultMap = new HashMap<>(); | |||
public Map<String, Object> audioList(@RequestBody Map<String, String> params) { | |||
Map<String, Object> resultMap = new HashMap<>(); | |||
String ipaddress = getIpAddr(); | |||
logger.debug("[" + ipaddress + "] WxUserGrantController::getAudioList"); | |||
String phone = params.get("username"); | |||
WxCUserBasicInfo infoByPhone = wxCUserBasicInfoService.findInfoByPhone(getTenantInfo(), phone); | |||
Long id = infoByPhone.getId(); | |||
System.out.println("id = " + id); | |||
Long id = getMemberId(); | |||
WxCUserBasicInfo basicLiveInfo = wxCLiveUserBasicInfoService.getById(id); | |||
if (basicLiveInfo.getCode() != null && !params.get("code").equals(basicLiveInfo.getCode())) { | |||
HashMap<Object, Object> status = new HashMap<>(); | |||
status.put("code",ErrorCode.USER_ALREADY_LOGIN.getCode()); | |||
status.put("message","用户已在其他设备登录"); | |||
resultMap.put("status",status); | |||
status.put("code", ErrorCode.USER_ALREADY_LOGIN.getCode()); | |||
status.put("message", "用户已在其他设备登录"); | |||
resultMap.put("status", status); | |||
return resultMap; | |||
} | |||
// long id = getMemberId(); | |||
return wxCVoiceService.getById(id); | |||
} | |||
@@ -268,66 +217,47 @@ public class UserLiveController extends BaseController { | |||
* 资源权限查询 | |||
*/ | |||
@AuthIgnore | |||
@ApiOperation(value = "资源权限查询", notes = "{\"username\",\"string\",\"code\",\"string\",\"type\",\"int\",\"resource_id\",\"long\"}") | |||
@PostMapping("/author") | |||
public Map<String,Object> getAuthor(@RequestBody Map<String, String> params) { | |||
Map<String,Object> resultMap = new HashMap<>(); | |||
public Map<String, Object> getAuthor(@RequestBody Map<String, String> params) { | |||
Map<String, Object> resultMap = new HashMap<>(); | |||
String ipaddress = getIpAddr(); | |||
logger.debug("[" + ipaddress + "] WxUserGrantController::getAuthor"); | |||
String phone = params.get("username"); | |||
WxCUserBasicInfo infoByPhone = wxCUserBasicInfoService.findInfoByPhone(getTenantInfo(), phone); | |||
Long id = infoByPhone.getId(); | |||
System.out.println("id = " + id); | |||
Long id = getMemberId(); | |||
WxCUserBasicInfo basicLiveInfo = wxCLiveUserBasicInfoService.getById(id); | |||
if (basicLiveInfo.getCode() != null && !params.get("code").equals(basicLiveInfo.getCode())) { | |||
HashMap<Object, Object> status = new HashMap<>(); | |||
status.put("code",ErrorCode.USER_ALREADY_LOGIN.getCode()); | |||
status.put("message","用户已在其他设备登录"); | |||
resultMap.put("status",status); | |||
status.put("code", ErrorCode.USER_ALREADY_LOGIN.getCode()); | |||
status.put("message", "用户已在其他设备登录"); | |||
resultMap.put("status", status); | |||
return resultMap; | |||
} | |||
//long id = getMemberId(); | |||
String username = params.get("username"); | |||
String code = params.get("code"); | |||
Integer type = Integer.parseInt(params.get("type")); | |||
Long resourceId = Long.valueOf(params.get("resource_id")); | |||
return wxCUserAuthorityService.getAuthor(id, code, type, resourceId); | |||
} | |||
@AuthIgnore | |||
@ApiOperation(value = "tts", notes = "{\"username\",\"string\",\"gen_txt\",\"string\",\"voice_id\",\"string\",\"voice_style\",\"string\",\"speed\",\"int\"}") | |||
@PostMapping("/audiotts") | |||
public Map<String,Object> voicePreview(@RequestBody Map<String, String> params) { | |||
public Map<String, Object> voicePreview(@RequestBody Map<String, String> params) { | |||
logger.debug("[" + getIpAddr() + "] UserLiveController::voicePreview"); | |||
String phone = params.get("username"); | |||
WxCUserBasicInfo infoByPhone = wxCUserBasicInfoService.findInfoByPhone(getTenantInfo(), phone); | |||
Long id = infoByPhone.getId(); | |||
Long id = getMemberId(); | |||
AiPreviewParam param = new AiPreviewParam(); | |||
if (params.get("voice_id") == null) { | |||
Map<String,Object> status = new HashMap<>(); | |||
status.put("code",ErrorCode.SYS_SERVER_ERROR.getCode()); | |||
status.put("msg","音色ID不能为空"); | |||
Map<String, Object> status = new HashMap<>(); | |||
status.put("code", ErrorCode.SYS_SERVER_ERROR.getCode()); | |||
status.put("msg", "音色ID不能为空"); | |||
return status; | |||
// return new ResultData(ErrorCode.SYS_SERVER_ERROR.getCode(), "音色ID不能为空"); | |||
} | |||
if (StringUtils.isBlank(params.get("gen_txt"))) { | |||
Map<String,Object> status = new HashMap<>(); | |||
status.put("code",ErrorCode.SYS_SERVER_ERROR.getCode()); | |||
status.put("msg","需要生成的文字不能为空"); | |||
Map<String, Object> status = new HashMap<>(); | |||
status.put("code", ErrorCode.SYS_SERVER_ERROR.getCode()); | |||
status.put("msg", "需要生成的文字不能为空"); | |||
return status; | |||
//return new ResultData(ErrorCode.SYS_SERVER_ERROR.getCode(), "需要生成的文字不能为空"); | |||
}if (Integer.parseInt(params.get("speed"))==-1){ | |||
} | |||
if (Integer.parseInt(params.get("speed")) == -1) { | |||
param.setSpeed(0); | |||
} | |||
param.setSpeed(Integer.parseInt(params.get("speed"))); | |||
@@ -335,24 +265,21 @@ public class UserLiveController extends BaseController { | |||
param.setVoice_style(params.get("voice_style")); | |||
param.setGen_txt(params.get("gen_txt")); | |||
Map<String, Object> resultMap = wxCVoiceService.voicePreview(param); | |||
Map<String,Object> info = new HashMap<>(); | |||
info.put("log_id",id); | |||
info.put("server_type","audio tts"); | |||
resultMap.put("info",info); | |||
Map<String, Object> info = new HashMap<>(); | |||
info.put("log_id", id); | |||
info.put("server_type", "audio tts"); | |||
resultMap.put("info", info); | |||
return resultMap; | |||
} | |||
@AuthIgnore | |||
@SneakyThrows | |||
@ApiOperation(value = "tts", notes = "{\"username\",\"string\",\"gen_txt\",\"string\",\"voice_id\",\"string\",\"voice_style\",\"string\",\"speed\",\"int\"}") | |||
@ApiOperation(value = "模板下载接口", notes = "{\"username\",\"string\",\"gen_txt\",\"string\",\"voice_id\",\"string\",\"voice_style\",\"string\",\"speed\",\"int\"}") | |||
@GetMapping("exportVideo") | |||
public void exportVideo(@RequestBody Map<String, String> params , HttpServletRequest request, HttpServletResponse response) { | |||
public void exportVideo(@RequestBody Map<String, String> params, HttpServletRequest request, HttpServletResponse response) { | |||
logger.debug("[" + getIpAddr() + "] UserLiveController::exportVideo"); | |||
response.reset(); | |||
File tmpFile = null; | |||
OutputStream outputStream = null; | |||
WxCUserBasicInfo infoByPhone = wxCUserBasicInfoService.findInfoByPhone(getTenantInfo(), params.get("username")); | |||
@@ -362,40 +289,32 @@ public class UserLiveController extends BaseController { | |||
} catch (IOException e) { | |||
throw new MallinkException(ErrorCode.SYS_SERVER_ERROR); | |||
} | |||
try{ | |||
if(id == null){ | |||
try { | |||
if (id == null) { | |||
throw new MallinkException(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||
} | |||
WxCVideoTable videoTable = wxCVideoService.selectOne(id,Long.parseLong(params.get("resource_id"))); | |||
WxCVideoTable videoTable = wxCVideoService.selectOne(id, Long.parseLong(params.get("resource_id"))); | |||
//获取响应的输出流 | |||
InputStream inputStream = new URL(videoTable.getDemo()).openStream(); | |||
response.setHeader("Content-Disposition", "attachment; filename=" | |||
+ URLEncoder.encode(videoTable.getId()+".mp4", "UTF-8")); | |||
+ URLEncoder.encode(videoTable.getId() + ".mp4", "UTF-8")); | |||
//解决编码问题 | |||
response.setCharacterEncoding("UTF-8"); | |||
response.setHeader("Content-Type","application/octet-stream"); | |||
response.setHeader("Content-Type", "application/octet-stream"); | |||
byte[] cache = new byte[1024 * 300]; | |||
int flag; | |||
while ((flag = inputStream.read(cache))!=-1){ | |||
while ((flag = inputStream.read(cache)) != -1) { | |||
outputStream.write(cache, 0, flag); | |||
} | |||
// } | |||
}catch(MallinkException e){ | |||
} catch (MallinkException e) { | |||
ResultData resultData = new ResultData(e.getErrorCode(), e.getMessage()); | |||
//解决编码问题 | |||
response.setCharacterEncoding("UTF-8"); | |||
response.setHeader("Content-Type","application/json"); | |||
response.setHeader("Content-Type", "application/json"); | |||
outputStream.write(JSONObject.toJSONString(resultData).getBytes(StandardCharsets.UTF_8)); | |||
}finally { | |||
} finally { | |||
if (tmpFile != null) { | |||
tmpFile.delete(); | |||
} | |||
@@ -403,6 +322,7 @@ public class UserLiveController extends BaseController { | |||
outputStream.close(); | |||
} | |||
} | |||
@AuthIgnore | |||
@ApiOperation("选择声音选择风格") | |||
@GetMapping("/chooseType") | |||
@@ -9,6 +9,7 @@ import com.iformall.domain.po.base.BaseEntity; | |||
import com.iformall.domain.po.sm.MouldPatch; | |||
import com.iformall.domain.po.sm.MouldPatchSign; | |||
import com.iformall.domain.po.sm.UserMouldVideo; | |||
import com.iformall.domain.po.sm.VoiceInfo; | |||
import com.iformall.domain.vo.WxCouponOrderBVo; | |||
import com.iformall.enums.EnumMouldSendType; | |||
import com.iformall.enums.EnumVideoStatus; | |||
@@ -17,6 +18,7 @@ import com.iformall.exception.MallinkException; | |||
import com.iformall.service.sm.MouldPatchService; | |||
import com.iformall.service.sm.MouldPatchSignService; | |||
import com.iformall.service.sm.UserMouldVideoService; | |||
import com.iformall.service.sm.VoiceInfoService; | |||
import com.iformall.video.VideoFactory; | |||
import com.iformall.video.entity.VideUploadResult; | |||
import io.swagger.annotations.Api; | |||
@@ -56,6 +58,9 @@ public class UserMouldVideoController extends BaseController { | |||
@Autowired | |||
private MouldPatchService mouldPatchService; | |||
@Autowired | |||
private VoiceInfoService voiceInfoService; | |||
@Autowired | |||
private VideoFactory videoFactory; | |||
@@ -91,6 +96,10 @@ public class UserMouldVideoController extends BaseController { | |||
if(mouldVideo == null || !mouldVideo.getUserId().equals(getMemberId())){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"未找到用户数据"); | |||
} | |||
if(mouldVideo.getVoiceMouldId() != null){ | |||
VoiceInfo voiceInfo = voiceInfoService.getById(mouldVideo.getVoiceMouldId()); | |||
mouldVideo.setVoiceInfo(voiceInfo); | |||
} | |||
return new ResultData(mouldVideo); | |||
} | |||
@@ -1,131 +0,0 @@ | |||
package com.iformall.controller; | |||
import com.alibaba.fastjson.JSON; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.baomidou.mybatisplus.extension.api.R; | |||
import com.github.pagehelper.PageInfo; | |||
import com.iformall.annotation.AuthIgnore; | |||
import com.iformall.common.ErrorCode; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.domain.po.base.BaseEntity; | |||
import com.iformall.domain.po.sm.MusicInfo; | |||
import com.iformall.domain.po.sm.PhotoSpeakVideo; | |||
import com.iformall.domain.po.sm.VoiceInfo; | |||
import com.iformall.enums.EnumVideoStatus; | |||
import com.iformall.exception.MallinkException; | |||
import com.iformall.service.sm.MouldPatchService; | |||
import com.iformall.service.sm.MusicInfoService; | |||
import com.iformall.service.sm.PhotoSpeakVideoService; | |||
import com.iformall.service.sm.VoiceInfoService; | |||
import com.iformall.video.VideoFactory; | |||
import com.iformall.video.aliyun.sdk.server.UploadCacheHelper; | |||
import com.iformall.video.entity.VideUploadResult; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiImplicitParam; | |||
import io.swagger.annotations.ApiImplicitParams; | |||
import io.swagger.annotations.ApiOperation; | |||
import lombok.SneakyThrows; | |||
import org.apache.commons.lang3.StringUtils; | |||
import org.flowable.idm.engine.impl.persistence.entity.UserEntity; | |||
import org.slf4j.Logger; | |||
import org.slf4j.LoggerFactory; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
import javax.servlet.http.HttpServletRequest; | |||
import javax.servlet.http.HttpServletResponse; | |||
import java.io.File; | |||
import java.io.IOException; | |||
import java.io.InputStream; | |||
import java.io.OutputStream; | |||
import java.net.URL; | |||
import java.net.URLEncoder; | |||
import java.nio.charset.StandardCharsets; | |||
import java.util.*; | |||
@RestController | |||
@RequestMapping("/callback") | |||
@Api(description = "视频回调") | |||
public class VideoCallbackController extends BaseController { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private PhotoSpeakVideoService photoSpeakVideoService; | |||
@AuthIgnore | |||
@ApiOperation("视频回调") | |||
@PostMapping(value = "/photo/speak") | |||
public ResultData photoSpeak(@RequestBody Map<String, Object> paranMap) { | |||
logger.debug("[" + getIpAddr() + "] VideoCallbackController::photoSpeak"); | |||
logger.info("照片生成视频结果通知{}"+JSONObject.toJSONString(paranMap)); | |||
Long task_id = (Long) paranMap.get("task_id");//任务ID | |||
String code = (String) paranMap.get("code");//code | |||
String msg = (String) paranMap.get("msg"); | |||
if (task_id == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"任务ID不能为空"); | |||
} | |||
PhotoSpeakVideo photoSpeakVideo = photoSpeakVideoService.getById(Long.valueOf(task_id)); | |||
if (photoSpeakVideo == null){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"未找到任务数据"); | |||
} | |||
Object data = paranMap.get("data"); | |||
String jsonString = JSONObject.toJSONString(data); | |||
Map dataMap = JSONObject.parseObject(jsonString,Map.class); | |||
Boolean sr = (Boolean) dataMap.get("sr");//判断 sr=True 就是超分的, False 是没超分的 | |||
String url = (String) dataMap.get("url"); | |||
String save_dir = null; | |||
String audio_path = null; | |||
if(sr){ | |||
if(!EnumVideoStatus.hy_ing.getCode().equals(photoSpeakVideo.getVideoStatus())){ | |||
return new ResultData(); | |||
} | |||
}else{ | |||
if(!EnumVideoStatus.ing.getCode().equals(photoSpeakVideo.getVideoStatus())){ | |||
return new ResultData(); | |||
} | |||
save_dir = (String) dataMap.get("save_dir"); | |||
audio_path = (String) dataMap.get("audio_path"); | |||
} | |||
if (StringUtils.isEmpty(url)){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"视频URL不能为空"); | |||
} | |||
PhotoSpeakVideo speakVideoUpd = new PhotoSpeakVideo(); | |||
speakVideoUpd.setId(photoSpeakVideo.getId()); | |||
if("4000".equals(code)){ | |||
if (sr){ | |||
speakVideoUpd.setVideoStatus(EnumVideoStatus.hy_success.getCode()); | |||
}else { | |||
speakVideoUpd.setVideoStatus(EnumVideoStatus.success.getCode()); | |||
speakVideoUpd.setSaveDir(save_dir); | |||
speakVideoUpd.setAudioPath(audio_path); | |||
} | |||
speakVideoUpd.setVideoPath(url); | |||
speakVideoUpd.setVideoMsg("视频生成成功"); | |||
}else{ | |||
if (sr){ | |||
speakVideoUpd.setVideoStatus(EnumVideoStatus.hy_fail.getCode()); | |||
}else { | |||
speakVideoUpd.setVideoStatus(EnumVideoStatus.fail.getCode()); | |||
} | |||
speakVideoUpd.setVideoMsg("(MetaService)"+msg); | |||
} | |||
speakVideoUpd.setUpdateDate(new Date()); | |||
photoSpeakVideoService.updateById(speakVideoUpd); | |||
//TODO 用户相关操作 | |||
if (sr){ | |||
photoSpeakVideoService.uploadHyVideo(speakVideoUpd); | |||
}else { | |||
photoSpeakVideoService.uploadVideo(speakVideoUpd); | |||
} | |||
return new ResultData(); | |||
} | |||
} |
@@ -1,7 +1,11 @@ | |||
package com.iformall.controller; | |||
import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; | |||
import com.alibaba.fastjson.JSON; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.google.code.kaptcha.Producer; | |||
import com.iformall.annotation.AuthIgnore; | |||
import com.iformall.annotation.TenantIgnore; | |||
import com.iformall.common.ErrorCode; | |||
import com.iformall.common.Result; | |||
import com.iformall.common.ResultData; | |||
@@ -15,6 +19,7 @@ import com.iformall.service.sm.InviteCodeService; | |||
import com.iformall.service.sm.UserConsumptionPackageService; | |||
import com.iformall.service.sm.UserCreateVideoNumService; | |||
import com.iformall.utils.Constant; | |||
import com.iformall.utils.IPUtil; | |||
import com.iformall.utils.PasswordHelper; | |||
import com.iformall.utils.RedisCacheUtils; | |||
import io.swagger.annotations.Api; | |||
@@ -30,9 +35,12 @@ 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 org.springframework.web.context.request.RequestContextHolder; | |||
import org.springframework.web.context.request.ServletRequestAttributes; | |||
import javax.imageio.ImageIO; | |||
import javax.servlet.ServletOutputStream; | |||
import javax.servlet.http.HttpServletRequest; | |||
import javax.servlet.http.HttpServletResponse; | |||
import java.awt.image.BufferedImage; | |||
import java.io.IOException; | |||
@@ -99,6 +107,7 @@ public class WxUserGrantController extends BaseController { | |||
@Autowired | |||
private UserConsumptionPackageService userConsumptionPackageService; | |||
@Autowired | |||
private WxCUserAuthorityService wxCUserAuthorityService; | |||
@@ -106,7 +115,7 @@ public class WxUserGrantController extends BaseController { | |||
@AuthIgnore | |||
@ApiOperation("验证码") | |||
@GetMapping("/captcha.jpg") | |||
public void captcha(HttpServletResponse response){ | |||
public void captcha(HttpServletResponse response) { | |||
logger.debug("[" + getIpAddr() + "] WxUserGrantController::captcha"); | |||
response.setHeader("Cache-Control", "no-store, no-cache"); | |||
response.setContentType("image/jpeg"); | |||
@@ -119,7 +128,7 @@ public class WxUserGrantController extends BaseController { | |||
//保存到redis | |||
String ipAddr = getIpAddr(); | |||
String key = Constant.captchaPrev + ":" + ipAddr; | |||
RedisCacheUtils.cache(redisTemplate,key,text,60); | |||
RedisCacheUtils.cache(redisTemplate, key, text, 60); | |||
ServletOutputStream out = null; | |||
try { | |||
@@ -133,9 +142,9 @@ public class WxUserGrantController extends BaseController { | |||
} | |||
/** | |||
* 用户登录 | |||
* 手机号+密码登陆 | |||
* | |||
* @param map | |||
* @return | |||
@@ -147,33 +156,36 @@ public class WxUserGrantController extends BaseController { | |||
String ipAddr = getIpAddr(); | |||
logger.debug("[" + ipAddr + "] WxUserGrantController::loginByPhone"); | |||
String code = map.get("code"); | |||
if(StringUtils.isBlank(code)){ | |||
if (StringUtils.isBlank(code)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "请输入验证码"); | |||
} | |||
String key = Constant.captchaPrev + ":" + ipAddr; | |||
String code1 = RedisCacheUtils.getCacheString(redisTemplate, key); | |||
if(StringUtils.isBlank(code1)){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "验证码已过期"); | |||
} | |||
if(!code1.equals(code)){ | |||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "验证码不正确"); | |||
} | |||
// if (StringUtils.isBlank(code1)) { | |||
// return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "验证码已过期"); | |||
// } | |||
// if (!code1.equals(code)) { | |||
// return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "验证码不正确"); | |||
// } | |||
String phone = map.get("phone"); | |||
String password = map.get("password"); | |||
if(StringUtils.isBlank(phone) || StringUtils.isBlank(password)){ | |||
if (StringUtils.isBlank(phone) || StringUtils.isBlank(password)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "手机号或密码为空"); | |||
} | |||
WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.findInfoByPhone(getTenantInfo(), phone); | |||
if(basicInfo == null){ | |||
if (basicInfo == null) { | |||
return new ResultData(ErrorCode.USER_IS_EMPTY); | |||
} | |||
if(StringUtils.isBlank(basicInfo.getPassword())){ | |||
return new ResultData(ErrorCode.USER_PASSWD_ERR.getCode(),"该用户未设置密码,请用其他方式登陆"); | |||
} | |||
String encryptPassword = new PasswordHelper().encryptPassword(password); | |||
if(!encryptPassword.equals(basicInfo.getPassword())){ | |||
if (!encryptPassword.equals(basicInfo.getPassword())) { | |||
return new ResultData(ErrorCode.USER_PASSWD_ERR.getCode(), "手机号或密码错误"); | |||
} | |||
wxCUserBasicInfoService.handleLoginUser(basicInfo); | |||
@@ -183,6 +195,13 @@ public class WxUserGrantController extends BaseController { | |||
return new ResultData(resultMap); | |||
} | |||
/** | |||
* 用户登录 | |||
* 邮箱+密码登陆 | |||
* | |||
* @param map | |||
* @return | |||
*/ | |||
@AuthIgnore | |||
@PostMapping("/loginByEmail") | |||
@ApiOperation(value = "用户登录", notes = "{\"email\":\"string\",\"password\":\"string\",\"code\":\"string\"}") | |||
@@ -190,36 +209,36 @@ public class WxUserGrantController extends BaseController { | |||
String ipAddr = getIpAddr(); | |||
logger.debug("[" + ipAddr + "] WxUserGrantController::loginByEmail"); | |||
String code = map.get("code"); | |||
if(StringUtils.isBlank(code)){ | |||
if (StringUtils.isBlank(code)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "请输入验证码"); | |||
} | |||
String key = Constant.captchaPrev + ":" + ipAddr; | |||
String code1 = RedisCacheUtils.getCacheString(redisTemplate, key); | |||
if(StringUtils.isBlank(code1)){ | |||
if (StringUtils.isBlank(code1)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "验证码已过期"); | |||
} | |||
if(!code1.equals(code)){ | |||
if (!code1.equals(code)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "验证码不正确"); | |||
} | |||
String email = map.get("email"); | |||
String password = map.get("password"); | |||
if(StringUtils.isBlank(email) || StringUtils.isBlank(password)){ | |||
if (StringUtils.isBlank(email) || StringUtils.isBlank(password)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "邮箱或密码为空"); | |||
} | |||
WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.findInfoByEmail(getTenantInfo(), email); | |||
if(basicInfo == null){ | |||
if (basicInfo == null) { | |||
return new ResultData(ErrorCode.USER_IS_EMPTY); | |||
} | |||
if(EnumCUserBasicInfoStatus.NOT_ACTIVE.getCode().equals(basicInfo.getStatus())){ | |||
if (EnumCUserBasicInfoStatus.NOT_ACTIVE.getCode().equals(basicInfo.getStatus())) { | |||
return new ResultData(ErrorCode.MEMBER_IS_NOT_ACTIVE); | |||
} | |||
String encryptPassword = new PasswordHelper().encryptPassword(password); | |||
if(!encryptPassword.equals(basicInfo.getPassword())){ | |||
if (!encryptPassword.equals(basicInfo.getPassword())) { | |||
return new ResultData(ErrorCode.USER_PASSWD_ERR.getCode(), "邮箱或密码错误"); | |||
} | |||
wxCUserBasicInfoService.handleLoginUser(basicInfo); | |||
@@ -229,15 +248,22 @@ public class WxUserGrantController extends BaseController { | |||
return new ResultData(resultMap); | |||
} | |||
/** | |||
* 用户登录 | |||
* 手机+验证码登陆 | |||
* | |||
* @param map | |||
* @return | |||
*/ | |||
@AuthIgnore | |||
@ApiOperation(value = "手机验证码登录", notes = "{\"phone\",\"string\",\"code\",\"string\"}") | |||
@PostMapping("/doLoginByPhone") | |||
public ResultData doLoginByPhone(@RequestBody Map<String, String> params, HttpServletResponse response) { | |||
public ResultData doLoginByPhone(@RequestBody Map<String, String> map, HttpServletResponse response) { | |||
String ipaddress = getIpAddr(); | |||
logger.debug("[" + ipaddress + "] WxUserGrantController::doLoginByPhone"); | |||
// String phone,String code,String pwd | |||
String phone = params.get("phone"); | |||
String code = params.get("code"); | |||
String phone = map.get("phone"); | |||
String code = map.get("code"); | |||
if (StringUtils.isBlank(phone)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "手机号不能为空"); | |||
@@ -249,14 +275,14 @@ public class WxUserGrantController extends BaseController { | |||
// check 验证码正确 | |||
boolean isValidCode = false; | |||
try { | |||
isValidCode = wxMsgValidationcodeService.checkCodeValid(phone,code); | |||
isValidCode = wxMsgValidationcodeService.checkCodeValid(phone, code); | |||
} catch (Exception e) { | |||
return new ResultData(Result.ERROR, e.getMessage()); | |||
} | |||
if(isValidCode) { | |||
if (isValidCode) { | |||
WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.findInfoByPhone(getTenantInfo(), phone); | |||
if(basicInfo == null){ | |||
basicInfo = wxCUserBasicInfoService.register(getTenantInfo(),phone,null); | |||
if (basicInfo == null) { | |||
basicInfo = wxCUserBasicInfoService.register(getTenantInfo(), phone, null); | |||
} | |||
wxCUserBasicInfoService.handleLoginUser(basicInfo); | |||
Map resultMap = new HashMap(); | |||
@@ -268,6 +294,10 @@ public class WxUserGrantController extends BaseController { | |||
} | |||
} | |||
/** | |||
* 获取用户信息 | |||
* @return | |||
*/ | |||
@PostMapping("/getBasicInfo") | |||
@ApiOperation(value = "用户登录", notes = "") | |||
public ResultData getBasicInfo() { | |||
@@ -285,7 +315,7 @@ public class WxUserGrantController extends BaseController { | |||
@ApiImplicitParam(name = "phone", value = "手机号", dataType = "String", paramType = "query", required = true)}) | |||
public ResultData sendLoginPhoneCode(String phone) { | |||
logger.debug("[" + getIpAddr() + "] WxUserGrantController::sendlogincode"); | |||
if(StringUtils.isBlank(phone)){ | |||
if (StringUtils.isBlank(phone)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "请输入手机号"); | |||
} | |||
@@ -296,42 +326,38 @@ public class WxUserGrantController extends BaseController { | |||
} | |||
/** | |||
* 需要效验用户及图片验证码 | |||
* @param phone | |||
* @return | |||
*/ | |||
/** | |||
* 需要效验用户及图片验证码 | |||
* | |||
* @param phone | |||
* @return | |||
*/ | |||
@AuthIgnore | |||
@ApiOperation("发送修改密码验证码") | |||
@GetMapping("sendPhoneCode") | |||
@ApiImplicitParams({ | |||
@ApiImplicitParam(name = "phone", value = "手机号", dataType = "String", paramType = "query", required = true)}) | |||
public ResultData sendPhoneCode(String phone,String code) { | |||
public ResultData sendPhoneCode(String phone, String code) { | |||
String ipAddr = getIpAddr(); | |||
logger.debug("[" + ipAddr + "] WxUserGrantController::sendPhoneCode"); | |||
if(StringUtils.isBlank(phone)){ | |||
if (StringUtils.isBlank(phone)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "请输入手机号"); | |||
} | |||
if(StringUtils.isBlank(code)){ | |||
if (StringUtils.isBlank(code)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "请输入验证码"); | |||
} | |||
String key = Constant.captchaPrev + ":" + ipAddr; | |||
String code1 = RedisCacheUtils.getCacheString(redisTemplate, key); | |||
if(StringUtils.isBlank(code1)){ | |||
if (StringUtils.isBlank(code1)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "验证码已过期"); | |||
} | |||
if(!code1.equals(code)){ | |||
if (!code1.equals(code)) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "验证码不正确"); | |||
} | |||
WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.findInfoByPhone(getTenantInfo(), phone); | |||
if(basicInfo == null){ | |||
return new ResultData(ErrorCode.USER_IS_EMPTY.getCode(),"该手机号未注册"); | |||
if (basicInfo == null) { | |||
return new ResultData(ErrorCode.USER_IS_EMPTY.getCode(), "该手机号未注册"); | |||
} | |||
WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); | |||
@@ -341,7 +367,6 @@ public class WxUserGrantController extends BaseController { | |||
} | |||
@AuthIgnore | |||
@ApiOperation(value = "手机号注册", notes = "{\"phone\",\"string\",\"code\",\"string\"}") | |||
@PostMapping("/doRegisterByPhone") | |||
@@ -363,7 +388,7 @@ public class WxUserGrantController extends BaseController { | |||
// return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "验证码不能为空"); | |||
// } | |||
WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.findInfoByPhone(getTenantInfo(), phone); | |||
if(basicInfo != null){ | |||
if (basicInfo != null) { | |||
return new ResultData(ErrorCode.MEMBER_IS_FOUND); | |||
} | |||
@@ -376,10 +401,10 @@ public class WxUserGrantController extends BaseController { | |||
// return new ResultData(Result.ERROR, e.getMessage()); | |||
// } | |||
// if(isValidCode) { | |||
basicInfo = wxCUserBasicInfoService.register(getTenantInfo(),phone,password); | |||
basicInfo = wxCUserBasicInfoService.register(getTenantInfo(), phone, password); | |||
Boolean aBoolean = userCreateVideoNumService.initializationUserCreateVideoNum(basicInfo.getId()); | |||
if (!aBoolean){ | |||
if (!aBoolean) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "初始化创建视频时间表失败"); | |||
} | |||
return new ResultData(); | |||
@@ -412,7 +437,7 @@ public class WxUserGrantController extends BaseController { | |||
// } | |||
WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.findInfoByEmail(getTenantInfo(), email); | |||
if(basicInfo != null){ | |||
if (basicInfo != null) { | |||
return new ResultData(ErrorCode.MEMBER_IS_FOUND); | |||
} | |||
@@ -425,10 +450,10 @@ public class WxUserGrantController extends BaseController { | |||
// return new ResultData(Result.ERROR, e.getMessage()); | |||
// } | |||
// if(isValidCode) { | |||
basicInfo = wxCUserBasicInfoService.registerEmail(getTenantInfo(),email,password); | |||
basicInfo = wxCUserBasicInfoService.registerEmail(getTenantInfo(), email, password); | |||
Boolean aBoolean = userCreateVideoNumService.initializationUserCreateVideoNum(basicInfo.getId()); | |||
if (!aBoolean){ | |||
if (!aBoolean) { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "初始化创建视频时间表失败"); | |||
} | |||
return new ResultData(); | |||
@@ -456,10 +481,10 @@ public class WxUserGrantController extends BaseController { | |||
// } | |||
WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.findInfoByEmail(getTenantInfo(), email); | |||
if(basicInfo == null){ | |||
if (basicInfo == null) { | |||
return new ResultData(ErrorCode.USER_IS_EMPTY); | |||
} | |||
if(!EnumCUserBasicInfoStatus.NOT_ACTIVE.getCode().equals(basicInfo.getStatus())){ | |||
if (!EnumCUserBasicInfoStatus.NOT_ACTIVE.getCode().equals(basicInfo.getStatus())) { | |||
return new ResultData(ErrorCode.MEMBER_IS_ACTIVE); | |||
} | |||
@@ -472,7 +497,7 @@ public class WxUserGrantController extends BaseController { | |||
// return new ResultData(Result.ERROR, e.getMessage()); | |||
// } | |||
// if(isValidCode) { | |||
wxCUserBasicInfoService.sendTicketEmail(basicInfo,EnumMsgModel.EMAIL_ACTIVATION); | |||
wxCUserBasicInfoService.sendTicketEmail(basicInfo, EnumMsgModel.EMAIL_ACTIVATION); | |||
return new ResultData(); | |||
// } else { | |||
// return new ResultData(ErrorCode.MSG_VERIFY_CODE_NOT_FOUND); | |||
@@ -489,11 +514,11 @@ public class WxUserGrantController extends BaseController { | |||
String ticket = params.get("ticket"); | |||
String key = Constant.ticketPrev + ticket; | |||
Long userId = RedisCacheUtils.getCacheLong(redisTemplate, key); | |||
if(userId == null){ | |||
return new ResultData(ErrorCode.NET_TICKET_INVALID.getCode(),"ticket已过期"); | |||
if (userId == null) { | |||
return new ResultData(ErrorCode.NET_TICKET_INVALID.getCode(), "ticket已过期"); | |||
} | |||
WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.getById(userId); | |||
if(basicInfo == null){ | |||
if (basicInfo == null) { | |||
return new ResultData(ErrorCode.USER_IS_EMPTY); | |||
} | |||
// if(!EnumCUserBasicInfoStatus.NOT_ACTIVE.getCode().equals(basicInfo.getStatus())){ | |||
@@ -528,18 +553,18 @@ public class WxUserGrantController extends BaseController { | |||
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "密码不能为空"); | |||
} | |||
WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.findInfoByPhone(getTenantInfo(), phone); | |||
if(basicInfo == null){ | |||
if (basicInfo == null) { | |||
return new ResultData(ErrorCode.USER_PHONE_IS_NOT_FOUND.getCode(), "手机号还未注册"); | |||
} | |||
// check 验证码正确 | |||
boolean isValidCode = false; | |||
try { | |||
isValidCode = wxMsgValidationcodeService.checkCodeValid(phone,code); | |||
isValidCode = wxMsgValidationcodeService.checkCodeValid(phone, code); | |||
} catch (Exception e) { | |||
return new ResultData(Result.ERROR, e.getMessage()); | |||
} | |||
if(isValidCode) { | |||
if (isValidCode) { | |||
String encryptPassword = new PasswordHelper().encryptPassword(pwd); | |||
WxCUserBasicInfo basicInfoUpd = new WxCUserBasicInfo(); | |||
basicInfoUpd.setId(basicInfo.getId()); | |||
@@ -575,7 +600,7 @@ public class WxUserGrantController extends BaseController { | |||
String encryptPassword = new PasswordHelper().encryptPassword(oldpwd); | |||
if(!encryptPassword.equals(basicInfo.getPassword())){ | |||
if (!encryptPassword.equals(basicInfo.getPassword())) { | |||
return new ResultData(ErrorCode.PASSWORD_ERROR.getCode(), "旧密码错误"); | |||
} | |||
@@ -588,12 +613,12 @@ public class WxUserGrantController extends BaseController { | |||
// return new ResultData(Result.ERROR, e.getMessage()); | |||
// } | |||
// if(isValidCode) { | |||
String newEncryptPassword = new PasswordHelper().encryptPassword(newpwd); | |||
WxCUserBasicInfo basicInfoUpd = new WxCUserBasicInfo(); | |||
basicInfoUpd.setId(basicInfo.getId()); | |||
basicInfoUpd.setPassword(newEncryptPassword); | |||
wxCUserBasicInfoService.update(basicInfoUpd); | |||
return new ResultData(); | |||
String newEncryptPassword = new PasswordHelper().encryptPassword(newpwd); | |||
WxCUserBasicInfo basicInfoUpd = new WxCUserBasicInfo(); | |||
basicInfoUpd.setId(basicInfo.getId()); | |||
basicInfoUpd.setPassword(newEncryptPassword); | |||
wxCUserBasicInfoService.update(basicInfoUpd); | |||
return new ResultData(); | |||
// } else { | |||
// return new ResultData(ErrorCode.MSG_VERIFY_CODE_NOT_FOUND); | |||
// } | |||
@@ -618,10 +643,10 @@ public class WxUserGrantController extends BaseController { | |||
// } | |||
WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.findInfoByEmail(getTenantInfo(), email); | |||
if(basicInfo == null){ | |||
if (basicInfo == null) { | |||
return new ResultData(ErrorCode.USER_IS_EMPTY); | |||
} | |||
if(EnumCUserBasicInfoStatus.NOT_ACTIVE.getCode().equals(basicInfo.getStatus())){ | |||
if (EnumCUserBasicInfoStatus.NOT_ACTIVE.getCode().equals(basicInfo.getStatus())) { | |||
return new ResultData(ErrorCode.MEMBER_IS_NOT_ACTIVE); | |||
} | |||
@@ -634,7 +659,7 @@ public class WxUserGrantController extends BaseController { | |||
// return new ResultData(Result.ERROR, e.getMessage()); | |||
// } | |||
// if(isValidCode) { | |||
wxCUserBasicInfoService.sendTicketEmail(basicInfo,EnumMsgModel.EMAIL_UPD_PWD); | |||
wxCUserBasicInfoService.sendTicketEmail(basicInfo, EnumMsgModel.EMAIL_UPD_PWD); | |||
return new ResultData(); | |||
// } else { | |||
// return new ResultData(ErrorCode.MSG_VERIFY_CODE_NOT_FOUND); | |||
@@ -651,11 +676,11 @@ public class WxUserGrantController extends BaseController { | |||
String ticket = params.get("ticket"); | |||
String key = Constant.ticketPrev + ticket; | |||
Long userId = RedisCacheUtils.getCacheLong(redisTemplate, key); | |||
if(userId == null){ | |||
return new ResultData(ErrorCode.NET_TICKET_INVALID.getCode(),"已过期"); | |||
if (userId == null) { | |||
return new ResultData(ErrorCode.NET_TICKET_INVALID.getCode(), "已过期"); | |||
} | |||
WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.getById(userId); | |||
if(basicInfo == null){ | |||
if (basicInfo == null) { | |||
return new ResultData(ErrorCode.USER_IS_EMPTY); | |||
} | |||
String pwd = params.get("pwd"); | |||
@@ -715,7 +740,7 @@ public class WxUserGrantController extends BaseController { | |||
@PostMapping("/updUserInfo") | |||
public ResultData updUserInfo(@RequestBody WxCUserBasicInfo wxCUserBasicInfo) { | |||
logger.debug("[" + getIpAddr() + "] WxUserGrantController::updUserInfo"); | |||
wxCUserBasicInfoService.updUserInfo(wxCUserBasicInfo,getMemberId()); | |||
wxCUserBasicInfoService.updUserInfo(wxCUserBasicInfo, getMemberId()); | |||
return new ResultData(); | |||
} | |||
@@ -12,7 +12,7 @@ public class UrlCheck { | |||
|| url.contains("getCarStopFee") | |||
|| url.contains("/video/upload") | |||
|| url.contains("/personPhoto/baiduPhoto") | |||
|| url.contains("/personPhoto/checkPhoto"); | |||
|| url.contains("checkPhoto"); | |||
} | |||
} |
@@ -178,7 +178,7 @@ fm: | |||
exception: true | |||
exception_emails: xuxiaohu@iformall.com | |||
deploy: 1 | |||
open: true | |||
open: false | |||
upload_dir: /home/test/server/uploads/ | |||
ocr_data: /root/ocr_data/ | |||
videoType: aliyun | |||
@@ -189,7 +189,9 @@ logging: | |||
path: ./logs/c | |||
photo: | |||
url: http://nas.pucao.cn:2002 | |||
url: http://111.198.0.15:22299 | |||
hy_url: http://111.198.0.15:22288 | |||
talk: http://111.198.0.15:22266 | |||
talk: http://nas.pucao.cn:2001 | |||
digital_avatar: http://111.198.0.15:22200 | |||
digital_avatar_hy: http://nas.pucao.cn:2003 | |||
callbackUrl: https://phototest.metavatar.cc/C |
@@ -147,4 +147,6 @@ photo: | |||
url: http://111.198.0.15:22299 | |||
hy_url: http://111.198.0.15:22288 | |||
talk: http://111.198.0.15:22266 | |||
digital_avatar: http://111.198.0.15:22200 | |||
digital_avatar_hy: http://nas.pucao.cn:2003 | |||
callbackUrl: https://photo.metavatar.cc/C |
@@ -31,16 +31,10 @@ public class MqBaseConsumer { | |||
@Autowired | |||
private SendWeappUniformMsgServiceImpl sendWeappUniformMsgService; | |||
@Autowired | |||
private AfterAddCreditMsgServiceImpl afterAddCreditMsgService; | |||
@Autowired | |||
private AfterAddScoreMsgServiceImpl afterAddScoreMsgService; | |||
@Autowired | |||
private AfterCarInOutMsgServiceImpl afterCarInOutMsgService; | |||
@Autowired | |||
private AfterBusinessCreditMsgServiceImpl afterBusinessCreditMsgService; | |||
@Autowired | |||
private SyncMemberCardMsgServiceImpl syncMemberCardMsgService; | |||
@Autowired | |||
private FmInsideOrderSuccessMsgServiceImpl fmInsideOrderSuccessMsgService; | |||
@Autowired | |||
private FmInsideCouponVerifyMsgServiceImpl fmInsideCouponVerifyMsgService; | |||
@@ -119,16 +113,6 @@ public class MqBaseConsumer { | |||
AppUniformMsg msg = (AppUniformMsg)JsonUtil.readValue(message,AppUniformMsg.class); | |||
sendWeappUniformMsgService.send(msg); | |||
} | |||
else if(EnumMsgRecordType.SYNC_MEMBER_CARD.getCode().equals(baseMsg.getMsgType())) { | |||
//微信商圈同步会员 | |||
SyncMemberCardMsg msg = (SyncMemberCardMsg)JsonUtil.readValue(message,SyncMemberCardMsg.class); | |||
syncMemberCardMsgService.send(msg); | |||
} | |||
else if(EnumMsgRecordType.AFTER_ADD_CREDIT.getCode().equals(baseMsg.getMsgType())) { | |||
//积分变更后 | |||
AfterAddCreditMsg msg = (AfterAddCreditMsg)JsonUtil.readValue(message,AfterAddCreditMsg.class); | |||
afterAddCreditMsgService.send(msg); | |||
} | |||
else if(EnumMsgRecordType.AFTER_ADD_SCORE.getCode().equals(baseMsg.getMsgType())) { | |||
//成长值变更后 | |||
AfterAddScoreMsg msg = (AfterAddScoreMsg)JsonUtil.readValue(message,AfterAddScoreMsg.class); | |||
@@ -139,11 +123,6 @@ public class MqBaseConsumer { | |||
AfterCarInOutMsg msg = (AfterCarInOutMsg)JsonUtil.readValue(message,AfterCarInOutMsg.class); | |||
afterCarInOutMsgService.send(msg); | |||
} | |||
else if(EnumMsgRecordType.AFTER_BUSINESS_CREDIT.getCode().equals(baseMsg.getMsgType())) { | |||
//商圈积分后 | |||
AfterBusinessCreditMsg msg = (AfterBusinessCreditMsg)JsonUtil.readValue(message,AfterBusinessCreditMsg.class); | |||
afterBusinessCreditMsgService.send(msg); | |||
} | |||
else if(EnumMsgRecordType.INSIDE_ORDER_SUCCESS.getCode().equals(baseMsg.getMsgType())) { | |||
// 内部消息 - 下订单成功 | |||
FmInsideOrderSuccessMsg msg = (FmInsideOrderSuccessMsg)JsonUtil.readValue(message,FmInsideOrderSuccessMsg.class); | |||
@@ -121,45 +121,45 @@ public class PhotoSpeakSchedule { | |||
* 超分上传阿里云 | |||
*/ | |||
// @Scheduled(cron = "0 */30 * * * *?") // 每半小时检查一次 | |||
public void userVideoHyUploadSchedule() { | |||
List<PhotoSpeakVideo> videos = photoSpeakVideoService.getNotHyUploadList(); | |||
if (videos != null && videos.size() > 0) { | |||
for (PhotoSpeakVideo video : videos) { | |||
try { | |||
photoSpeakVideoService.uploadHyVideo(video); | |||
} catch (Exception e) { | |||
logger.error("TtCouponVideoSchedule error.couponVideoSchedule:"+video.getId(),e); | |||
} | |||
} | |||
} | |||
} | |||
// public void userVideoHyUploadSchedule() { | |||
// List<PhotoSpeakVideo> videos = photoSpeakVideoService.getNotHyUploadList(); | |||
// if (videos != null && videos.size() > 0) { | |||
// for (PhotoSpeakVideo video : videos) { | |||
// try { | |||
// photoSpeakVideoService.uploadHyVideo(video); | |||
// } catch (Exception e) { | |||
// logger.error("TtCouponVideoSchedule error.couponVideoSchedule:"+video.getId(),e); | |||
// } | |||
// } | |||
// } | |||
// } | |||
/** | |||
* 获取超分时长和大小 | |||
*/ | |||
// @Scheduled(cron = "0 1/5 * * * *?") // 每五分钟检查一次 | |||
public void userVideoHyDetailSchedule() { | |||
List<PhotoSpeakVideo> videos = photoSpeakVideoService.getUpLoadHyIngList(); | |||
if (videos != null && videos.size() > 0) { | |||
for (PhotoSpeakVideo video : videos) { | |||
try { | |||
VideUploadResult videoDetail = videoFactory.getExcutor(videoType).getVideoDetailWithCache(video.getVideoId(),false); | |||
if (videoDetail.isSuccess() | |||
&& StringUtils.isNotBlank(videoDetail.getDuration()) | |||
&& !"0.0".equals(videoDetail.getDuration())) { | |||
video.setCoverImg(videoDetail.getCoverURL()); | |||
video.setVideoPlayUrl(videoDetail.getVideoUrl()); | |||
video.setVideoTime(videoDetail.getDuration()); | |||
video.setVideoSize(videoDetail.getSize()); | |||
video.setVideoStatus(EnumVideoStatus.hy_upload_success.getCode()); | |||
photoSpeakVideoService.updateById(video); | |||
} | |||
} catch (Exception e) { | |||
logger.error("TtCouponVideoSchedule error.couponVideoSchedule:"+video.getId(),e); | |||
} | |||
} | |||
} | |||
} | |||
// public void userVideoHyDetailSchedule() { | |||
// List<PhotoSpeakVideo> videos = photoSpeakVideoService.getUpLoadHyIngList(); | |||
// if (videos != null && videos.size() > 0) { | |||
// for (PhotoSpeakVideo video : videos) { | |||
// try { | |||
// VideUploadResult videoDetail = videoFactory.getExcutor(videoType).getVideoDetailWithCache(video.getVideoId(),false); | |||
// if (videoDetail.isSuccess() | |||
// && StringUtils.isNotBlank(videoDetail.getDuration()) | |||
// && !"0.0".equals(videoDetail.getDuration())) { | |||
// video.setCoverImg(videoDetail.getCoverURL()); | |||
// video.setVideoPlayUrl(videoDetail.getVideoUrl()); | |||
// video.setVideoTime(videoDetail.getDuration()); | |||
// video.setVideoSize(videoDetail.getSize()); | |||
// video.setVideoStatus(EnumVideoStatus.hy_upload_success.getCode()); | |||
// photoSpeakVideoService.updateById(video); | |||
// } | |||
// } catch (Exception e) { | |||
// logger.error("TtCouponVideoSchedule error.couponVideoSchedule:"+video.getId(),e); | |||
// } | |||
// } | |||
// } | |||
// } | |||
/** | |||
* 超分生成视频 | |||
@@ -0,0 +1,47 @@ | |||
package com.iformall.schedule; | |||
import com.iformall.domain.po.ProductOrder; | |||
import com.iformall.domain.po.ProductOrderSharing; | |||
import com.iformall.enums.EnumProductOrderSettleStatus; | |||
import com.iformall.enums.EnumProductOrderStatus; | |||
import com.iformall.enums.EnumProfitSharing; | |||
import com.iformall.service.ProductOrderService; | |||
import com.iformall.service.ProductOrderSharingService; | |||
import com.iformall.utils.DateUtils; | |||
import org.slf4j.Logger; | |||
import org.slf4j.LoggerFactory; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.scheduling.annotation.Scheduled; | |||
import org.springframework.stereotype.Component; | |||
import java.util.Date; | |||
import java.util.List; | |||
@Component | |||
public class ProductOrderSchedule { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private ProductOrderService productOrderService; | |||
@Autowired | |||
private ProductOrderSharingService productOrderSharingService; | |||
@Scheduled(cron = "0 3/5 * * * *?") | |||
public void productOrderSharingSchedule() { | |||
ProductOrder productOrderQ = new ProductOrder(); | |||
productOrderQ.setOrderStatus(EnumProductOrderStatus.ORDER_STATUS_PENDING_PAYMENT.getCode()); | |||
// productOrderQ.setEndDate(DateUtils.getHourDateBefore(1,new Date())); | |||
List<ProductOrder> orderList = productOrderService.findList(productOrderQ); | |||
for (ProductOrder order: orderList) { | |||
try{ | |||
productOrderService.handldTimeOut(order.getId()); | |||
}catch(Exception e){ | |||
logger.error("取消订单失败:" + e.getMessage()); | |||
} | |||
} | |||
} | |||
} |
@@ -0,0 +1,78 @@ | |||
package com.iformall.schedule; | |||
import com.iformall.domain.po.ProductOrder; | |||
import com.iformall.domain.po.ProductOrderSharing; | |||
import com.iformall.enums.*; | |||
import com.iformall.service.ProductOrderService; | |||
import com.iformall.service.ProductOrderSharingService; | |||
import com.iformall.utils.DateUtils; | |||
import org.slf4j.Logger; | |||
import org.slf4j.LoggerFactory; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.scheduling.annotation.Scheduled; | |||
import org.springframework.stereotype.Component; | |||
import java.util.*; | |||
@Component | |||
public class ProductOrderSharingSchedule { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private ProductOrderService productOrderService; | |||
@Autowired | |||
private ProductOrderSharingService productOrderSharingService; | |||
@Scheduled(cron = "0 15 1 * * ?") // 每天凌晨02:00分账重试 | |||
public void productOrderSharingSchedule() { | |||
ProductOrder productOrderQ = new ProductOrder(); | |||
productOrderQ.setOrderStatus(EnumProductOrderStatus.ORDER_STATUS_PAYMENT_SUCCESS.getCode()); | |||
productOrderQ.setProfitSharing(EnumProfitSharing.PROFIT_SHARING_MAST.getCode()); | |||
productOrderQ.setPayEndDate(DateUtils.getDateBefore(7,new Date())); | |||
List<ProductOrder> orderList = productOrderService.findList(productOrderQ); | |||
for (ProductOrder order: orderList) { | |||
try{ | |||
productOrderService.handldSharing(order); | |||
productOrderSharingService.sharingOrder(order.getId()); | |||
}catch(Exception e){ | |||
logger.error("分账失败:" + e.getMessage()); | |||
} | |||
} | |||
} | |||
@Scheduled(cron = "0 15 2 * * ?") // 每天凌晨02:00分账重试 | |||
public void productOrderSharing2Schedule() { | |||
ProductOrderSharing productOrderSharingQ = new ProductOrderSharing(); | |||
productOrderSharingQ.setSettleStatus(EnumProductOrderSettleStatus.unfreeze_before.getCode()); | |||
List<ProductOrderSharing> sharingList = productOrderSharingService.findList(productOrderSharingQ); | |||
for (ProductOrderSharing sharing: sharingList) { | |||
try{ | |||
productOrderSharingService.sharingOrder(sharing.getId()); | |||
}catch(Exception e){ | |||
logger.error("分账失败:" + e.getMessage()); | |||
} | |||
} | |||
} | |||
@Scheduled(cron = "0 15 3 * * ?") // 查询分账结果 | |||
public void productOrderSharingQuerySchedule() { | |||
ProductOrderSharing productOrderSharingQ = new ProductOrderSharing(); | |||
productOrderSharingQ.setSettleStatus(EnumProductOrderSettleStatus.unfreeze_ing.getCode()); | |||
List<ProductOrderSharing> sharingList = productOrderSharingService.findList(productOrderSharingQ); | |||
for (ProductOrderSharing sharing: sharingList) { | |||
try{ | |||
productOrderSharingService.handleSharingOrder(sharing.getId()); | |||
}catch(Exception e){ | |||
logger.error("分账失败:" + e.getMessage()); | |||
} | |||
} | |||
} | |||
} |
@@ -0,0 +1,54 @@ | |||
package com.iformall.schedule; | |||
import com.iformall.domain.po.sm.PhotoSpeakVideo; | |||
import com.iformall.domain.po.sm.UserDigitalAvatarOrder; | |||
import com.iformall.enums.EnumDigitalAvatarOrderStatus; | |||
import com.iformall.enums.EnumVideoStatus; | |||
import com.iformall.service.sm.PhotoSpeakVideoService; | |||
import com.iformall.service.sm.UserCreateVideoNumService; | |||
import com.iformall.service.sm.UserDigitalAvatarOrderService; | |||
import com.iformall.utils.DateUtils; | |||
import com.iformall.video.VideoFactory; | |||
import com.iformall.video.entity.VideUploadResult; | |||
import org.apache.commons.lang3.StringUtils; | |||
import org.slf4j.Logger; | |||
import org.slf4j.LoggerFactory; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.context.annotation.Configuration; | |||
import org.springframework.scheduling.annotation.EnableScheduling; | |||
import org.springframework.scheduling.annotation.Scheduled; | |||
import java.util.Date; | |||
import java.util.List; | |||
@Configuration | |||
@EnableScheduling | |||
public class UserDigitalAvatarPhotoSchedule { | |||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
@Autowired | |||
private UserDigitalAvatarOrderService userDigitalAvatarOrderService; | |||
/** | |||
* 生成照片 | |||
*/ | |||
@Scheduled(cron = "0 */30 * * * *?") // 每半小时检查一次 | |||
public void digitalAvatarCreatePhotoSchedule() { | |||
logger.info("digitalAvatarCreatePhotoSchedule :: start"); | |||
UserDigitalAvatarOrder orderQ = new UserDigitalAvatarOrder(); | |||
orderQ.setEndDate(DateUtils.getHourDateBefore(1,new Date())); | |||
orderQ.setStatus(EnumDigitalAvatarOrderStatus.fail.getCode()); | |||
List<UserDigitalAvatarOrder> list = userDigitalAvatarOrderService.findList(orderQ); | |||
if (list != null && list.size() > 0) { | |||
for (UserDigitalAvatarOrder order : list) { | |||
try { | |||
userDigitalAvatarOrderService.createPhoto(order); | |||
} catch (Exception e) { | |||
logger.error("UserDigitalAvatarPhotoSchedule error.digitalAvatarCreatePhotoSchedule:"+order.getId(),e); | |||
} | |||
} | |||
} | |||
} | |||
} |
@@ -192,7 +192,9 @@ logging: | |||
path: ./logs/s | |||
photo: | |||
url: http://nas.pucao.cn:2002 | |||
url: http://111.198.0.15:22299 | |||
hy_url: http://111.198.0.15:22288 | |||
talk: http://111.198.0.15:22266 | |||
talk: http://nas.pucao.cn:2001 | |||
digital_avatar: http://111.198.0.15:22200 | |||
digital_avatar_hy: http://nas.pucao.cn:2003 | |||
callbackUrl: https://phototest.metavatar.cc/C |
@@ -151,4 +151,6 @@ photo: | |||
url: http://111.198.0.15:22299 | |||
hy_url: http://111.198.0.15:22288 | |||
talk: http://111.198.0.15:22266 | |||
digital_avatar: http://111.198.0.15:22200 | |||
digital_avatar_hy: http://nas.pucao.cn:2003 | |||
callbackUrl: https://photo.metavatar.cc/C |
@@ -449,6 +449,9 @@ public enum ErrorCode{ | |||
MEM_MONTH_IS_USED(13105, "该用户本月已领取或未到领取条件"), | |||
GLOD_NOT_ENOUGH(13200, "金币不足"), | |||
/** | |||
* 标签 | |||
*/ | |||
@@ -669,6 +672,11 @@ public enum ErrorCode{ | |||
TTCOUPON_IS_EMPTY(63000, "课程不存在"), | |||
TTCOUPON_IS_TAKE_OFF(63001, "课程不在上架状态"), | |||
/** | |||
* mould | |||
*/ | |||
ORDER_CREAT_OVERRUN(64000, "重复生成次数超限"), | |||
; | |||
private int code; | |||
@@ -4,4 +4,5 @@ public class SysConfigConstant { | |||
public static final String vierfy_seconds_key="vierfySeconds"; | |||
public static final String default_merchant_b_user = "defaultMerchantBUserId"; | |||
} |
@@ -138,27 +138,6 @@ public class BaseMyBatisConfiguration { | |||
wxCUserFromSharding.setRule(EnumShardingRule.HASH.getCode()); | |||
shardingList.add(wxCUserFromSharding); | |||
ShardingSphere wxBusinessCircleOrderSharding = new ShardingSphere(); | |||
wxBusinessCircleOrderSharding.setColumn("tenant_id"); | |||
wxBusinessCircleOrderSharding.setTableName("wx_business_circle_order"); | |||
wxBusinessCircleOrderSharding.setCount(100); | |||
wxBusinessCircleOrderSharding.setRule(EnumShardingRule.HASH.getCode()); | |||
shardingList.add(wxBusinessCircleOrderSharding); | |||
ShardingSphere aliBusinessCircleOrderSharding = new ShardingSphere(); | |||
aliBusinessCircleOrderSharding.setColumn("tenant_id"); | |||
aliBusinessCircleOrderSharding.setTableName("ali_business_circle_order"); | |||
aliBusinessCircleOrderSharding.setCount(100); | |||
aliBusinessCircleOrderSharding.setRule(EnumShardingRule.HASH.getCode()); | |||
shardingList.add(aliBusinessCircleOrderSharding); | |||
ShardingSphere wxThirdPartyOrdersSharding = new ShardingSphere(); | |||
wxThirdPartyOrdersSharding.setColumn("tenant_id"); | |||
wxThirdPartyOrdersSharding.setTableName("wx_third_party_orders"); | |||
wxThirdPartyOrdersSharding.setCount(100); | |||
wxThirdPartyOrdersSharding.setRule(EnumShardingRule.HASH.getCode()); | |||
shardingList.add(wxThirdPartyOrdersSharding); | |||
ShardingSphere wxOrderSharding = new ShardingSphere(); | |||
wxOrderSharding.setColumn("tenant_id"); | |||
wxOrderSharding.setTableName("wx_order"); | |||
@@ -1,28 +0,0 @@ | |||
package com.iformall.domain.po; | |||
import cn.afterturn.easypoi.excel.annotation.Excel; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
@TableName(value = "ali_business_circle_order") | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class AliBusinessCircleOrder extends BusinessCircleBase { | |||
@io.swagger.annotations.ApiModelProperty(value="发生交易的商圈(非商圈组)的商圈唯一标识号",name="mallId") | |||
private String mallId; | |||
@io.swagger.annotations.ApiModelProperty(value="发生交易的商圈(非商圈组)的名称",name="mallName") | |||
private String mallName; | |||
@Excel(name = "门店编码", width = 20, orderNum = "1") | |||
@io.swagger.annotations.ApiModelProperty(value="门店编号,商户侧系统内编号",name="mallStoreId") | |||
private String mallStoreId; | |||
@io.swagger.annotations.ApiModelProperty(value="支付宝用户Id",name="buyerId") | |||
private String buyerId; | |||
} |
@@ -1,141 +0,0 @@ | |||
package com.iformall.domain.po; | |||
import cn.afterturn.easypoi.excel.annotation.Excel; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.iformall.domain.po.base.TenantEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
import java.math.BigDecimal; | |||
import java.util.Date; | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class BusinessCircleBase extends TenantEntity { | |||
protected Long id; | |||
@io.swagger.annotations.ApiModelProperty(value="商圈支付结果通知Id",name="noticeId") | |||
private String noticeId; | |||
@io.swagger.annotations.ApiModelProperty(value="商圈支付结果通知创建时间",name="noticeCreateTime") | |||
private Date noticeCreateTime; | |||
@io.swagger.annotations.ApiModelProperty(value="商圈支付结果通知类型:MALL_TRANSACTION.SUCCESS",name="noticeEventType") | |||
private String noticeEventType; | |||
@Excel(name = "通知时间", width = 20, orderNum = "12") | |||
@io.swagger.annotations.ApiModelProperty(value="商圈支付结果通知回调摘要",name="summary") | |||
private String summary; | |||
@Excel(name = "交易时间", width = 20, orderNum = "4", format = "yyyy-MM-dd HH:mm:ss") | |||
@io.swagger.annotations.ApiModelProperty(value="交易完成时间",name="timeEnd") | |||
private Date timeEnd; | |||
@io.swagger.annotations.ApiModelProperty(value="用户实际消费金额,单位(分)",name="amount") | |||
private Integer amount; | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="用户实际消费金额,单位(元)",name="amountStr") | |||
private String amountStr; | |||
public String getAmountStr() { | |||
return amount != null ? new BigDecimal(amount).divide(new BigDecimal(100)).toPlainString(): amountStr; | |||
} | |||
@io.swagger.annotations.ApiModelProperty(value="用户实际付款金额,单位(分)",name="payAmount") | |||
private Integer payAmount; | |||
@Excel(name = "付款金额(元)", width = 20, orderNum = "5") | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="用户实际付款金额,单位(元)",name="payAmountStr") | |||
private String payAmountStr; | |||
public String getPayAmountStr() { | |||
return payAmount != null ? new BigDecimal(payAmount).divide(new BigDecimal(100)).toPlainString(): payAmountStr; | |||
} | |||
@Excel(name = "支付订单号", width = 20, orderNum = "3") | |||
@io.swagger.annotations.ApiModelProperty(value="支付订单号",name="transactionId") | |||
private String transactionId; | |||
@Excel(name = "通知时间", width = 20, orderNum = "11", format = "yyyy-MM-dd HH:mm:ss") | |||
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createTime") | |||
private Date createTime; | |||
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateTime") | |||
private Date updateTime; | |||
@io.swagger.annotations.ApiModelProperty(value="门店Id,与第三方对齐",name="merchantId") | |||
private Long merchantId; | |||
@Excel(name = "门店名称", width = 20, orderNum = "2") | |||
private String merchantName; | |||
@TableField(exist = false) | |||
private WxMerchant merchant; | |||
@Excel(name = "会员ID", width = 20, orderNum = "9") | |||
@TableField(exist = false) | |||
private String userIdStr; | |||
public String getUserIdStr(){ | |||
return cUserId == null?"":Long.toString(cUserId); | |||
} | |||
@io.swagger.annotations.ApiModelProperty(value="c端会员id,与第三方对齐",name="cUserId") | |||
private Long cUserId; | |||
private String cUserNickName; | |||
@Excel(name = "会员手机号", width = 20, orderNum = "10") | |||
@TableField(exist = false) | |||
private String userPhoneStr; | |||
public String getUserPhoneStr(){ | |||
return cUserPhone; | |||
} | |||
private String cUserPhone; | |||
@TableField(exist = false) | |||
private WxCUserBasicInfo basicInfo; | |||
@Excel(name = "积分是否变动", width = 20, orderNum = "13", replace = {"是_1", "否_0"}) | |||
@io.swagger.annotations.ApiModelProperty(value="是否获得积分(1:是,0:否)",name="earnPoints") | |||
private Integer earnPoints; | |||
@Excel(name = "积分变动值", width = 20, orderNum = "14") | |||
@io.swagger.annotations.ApiModelProperty(value="订单更新积分值",name="increasedPoints") | |||
private Integer increasedPoints; | |||
@Excel(name = "积分更新时间", width = 20, orderNum = "15", format = "yyyy-MM-dd HH:mm:ss") | |||
@io.swagger.annotations.ApiModelProperty(value="积分更新时间(新增)",name="pointsUpdateTime") | |||
private Date pointsUpdateTime; | |||
@Excel(name = "是否退款", width = 20, orderNum = "6", replace = {"退款订单_1", "付款订单_0"}) | |||
@io.swagger.annotations.ApiModelProperty(value="是否退款(1:是,0:否)",name="isRefund") | |||
private Integer isRefund; | |||
@io.swagger.annotations.ApiModelProperty(value="正常订单状态(is_refund=0时)1:部分退款2:订单关闭",name="orderStatus") | |||
private Integer orderStatus; | |||
@Excel(name = "退款订单号", width = 20, orderNum = "7") | |||
@io.swagger.annotations.ApiModelProperty(value="微信支付退款单号",name="refundId") | |||
private String refundId; | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="查询-开始时间",name="startdate") | |||
private Date startTime; | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="查询-结束时间",name="enddate") | |||
private Date endTime; | |||
@io.swagger.annotations.ApiModelProperty(value="用户退款金额,单位(分)",name="refundAmount") | |||
private Integer refundAmount; | |||
@Excel(name = "退款金额(元)", width = 20, orderNum = "8") | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="用户退款金额,单位(元)",name="refundAmountStr") | |||
private String refundAmountStr; | |||
public String getRefundAmountStr() { | |||
return refundAmount != null ? new BigDecimal(refundAmount).divide(new BigDecimal(100)).toPlainString(): refundAmountStr; | |||
} | |||
} |
@@ -0,0 +1,56 @@ | |||
package com.iformall.domain.po; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.iformall.domain.po.base.TenantEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
import java.util.Date; | |||
@TableName(value = "product") | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class Product extends TenantEntity { | |||
protected Long id; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumProject",name="projectType") | |||
private Integer projectType; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumProductType",name="type") | |||
private Integer type; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="coverImg") | |||
private String coverImg; | |||
@io.swagger.annotations.ApiModelProperty(value="标题",name="title") | |||
private String title; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="enTitle") | |||
private String enTitle; | |||
@io.swagger.annotations.ApiModelProperty(value="金币/积分",name="glod") | |||
private Integer glod; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="detail") | |||
private String detail; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="priceDollar") | |||
private Integer priceDollar; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="sellPriceDollar") | |||
private Integer sellPriceDollar; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="priceRmb") | |||
private Integer priceRmb; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="sellPriceRmb") | |||
private Integer sellPriceRmb; | |||
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||
private Date createDate; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="updateDate") | |||
private Date updateDate; | |||
@TableField(exist = false) | |||
private Date startDate; | |||
@TableField(exist = false) | |||
private Date endDate; | |||
} |
@@ -0,0 +1,104 @@ | |||
package com.iformall.domain.po; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.iformall.domain.po.base.TenantEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
import java.math.BigDecimal; | |||
import java.util.Date; | |||
import java.util.List; | |||
@TableName(value = "product_order") | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class ProductOrder extends TenantEntity { | |||
protected Long id; | |||
@io.swagger.annotations.ApiModelProperty(value="系统订单号",name="orderNumber") | |||
private String orderNumber; | |||
@io.swagger.annotations.ApiModelProperty(value="用户id",name="userId") | |||
private Long userId; | |||
@io.swagger.annotations.ApiModelProperty(value="产品ID",name="productId") | |||
private Long productId; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="productTitle") | |||
private String productTitle; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="productEnTitle") | |||
private String productEnTitle; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumProductOrderStatus",name="orderStatus") | |||
private Integer orderStatus; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumProject",name="projectType") | |||
private Integer projectType; | |||
@io.swagger.annotations.ApiModelProperty(value = "EnumProductOrderPayVendor", name = "payVendor") | |||
private Integer payVendor; | |||
@io.swagger.annotations.ApiModelProperty(value="订单金额(分)",name="orderPrice") | |||
private Integer orderPrice; | |||
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||
private Date createDate; | |||
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | |||
private Date updateDate; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="remark") | |||
private String remark; | |||
@io.swagger.annotations.ApiModelProperty(value="支付侧的订单号",name="orderId") | |||
private String orderId; | |||
@io.swagger.annotations.ApiModelProperty(value="支付者",name="openId") | |||
private String openId; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumProfitSharing",name="profitSharing") | |||
private Integer profitSharing; | |||
@io.swagger.annotations.ApiModelProperty(value="支付单号",name="transactionId") | |||
private String transactionId; | |||
@io.swagger.annotations.ApiModelProperty(value="支付金额(分)",name="payment") | |||
private Integer payment; | |||
@io.swagger.annotations.ApiModelProperty(value="支付时间",name="paymentTime") | |||
private Date paymentTime; | |||
@io.swagger.annotations.ApiModelProperty(value="支付渠道",name="payWay") | |||
private Integer payWay; | |||
@TableField(exist = false) | |||
private String appId; | |||
@TableField(exist = false) | |||
protected List<Integer> statusS; | |||
@TableField(exist = false) | |||
private String orderPriceStr; | |||
public String getOrderPriceStr() { | |||
return orderPrice != null ? new BigDecimal(orderPrice).divide(new BigDecimal(100)).toPlainString() : orderPriceStr; | |||
} | |||
@TableField(exist = false) | |||
private String paymentStr; | |||
public String getPaymentStr() { | |||
return payment != null ? new BigDecimal(payment).divide(new BigDecimal(100)).toPlainString() : paymentStr; | |||
} | |||
@TableField(exist = false) | |||
private Date startDate; | |||
@TableField(exist = false) | |||
private Date endDate; | |||
@TableField(exist = false) | |||
private Date payStartDate; | |||
@TableField(exist = false) | |||
private Date payEndDate; | |||
@TableField(exist = false) | |||
private Integer isOrderStatus; | |||
} |
@@ -0,0 +1,72 @@ | |||
package com.iformall.domain.po; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.iformall.domain.po.base.TenantEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import java.util.Date; | |||
@TableName(value = "product_order_sharing") | |||
@Data | |||
@EqualsAndHashCode(callSuper = true) | |||
public class ProductOrderSharing extends TenantEntity { | |||
protected Long id; | |||
@io.swagger.annotations.ApiModelProperty(value="外部订单号=ProductOrder.orderNumber",name="outOrderId") | |||
private String outOrderId; | |||
@io.swagger.annotations.ApiModelProperty(value="订单价格",name="orderPrice") | |||
private Integer orderPrice; | |||
@io.swagger.annotations.ApiModelProperty(value="支付渠道",name="payWay") | |||
private Integer payWay; | |||
@io.swagger.annotations.ApiModelProperty(value="平台支付单号",name="transactionId") | |||
private String transactionId; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumProject",name="projectType") | |||
private Integer projectType; | |||
@io.swagger.annotations.ApiModelProperty(value = "EnumProductOrderPayVendor", name = "payVendor") | |||
private Integer payVendor; | |||
@io.swagger.annotations.ApiModelProperty(value = "外部分账单号", name = "outSettleNo") | |||
private String outSettleNo; | |||
@io.swagger.annotations.ApiModelProperty(value = "外部分账单号", name = "settleDesc") | |||
private String settleDesc; | |||
@io.swagger.annotations.ApiModelProperty(value = "平台分账单号", name = "settleNo") | |||
private String settleNo; | |||
@io.swagger.annotations.ApiModelProperty(value = "分账金额", name = "settleAmount") | |||
private Integer settleAmount; | |||
@io.swagger.annotations.ApiModelProperty(value = "EnumProductOrderSettleStatus", name = "settleStatus") | |||
private Integer settleStatus; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="settleMsg") | |||
private String settleMsg; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="settleDetail") | |||
private String settleDetail; | |||
@io.swagger.annotations.ApiModelProperty(value="手续费",name="rake") | |||
private Integer rake; | |||
@io.swagger.annotations.ApiModelProperty(value="佣金",name="commission") | |||
private Integer commission; | |||
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | |||
private Date updateDate; | |||
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||
private Date createDate; | |||
@TableField(exist = false) | |||
private Date startDate; | |||
@TableField(exist = false) | |||
private Date endDate; | |||
} |
@@ -0,0 +1,48 @@ | |||
package com.iformall.domain.po; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.iformall.domain.po.base.TenantEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
import java.util.Date; | |||
@TableName(value = "user_basic_from") | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class UserBasicFrom extends TenantEntity { | |||
protected Long id; | |||
@TableField(exist = false) | |||
private String userPhone; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumProject",name="fromProject") | |||
private Integer fromProject; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumUserBasicFrom",name="fromType") | |||
private Integer fromType; | |||
@io.swagger.annotations.ApiModelProperty(value="邀请途径ID",name="fromId") | |||
private Long fromId; | |||
@io.swagger.annotations.ApiModelProperty(value="邀请人ID",name="fromUserId") | |||
private Long fromUserId; | |||
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||
private Date createDate; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="plat") | |||
private Integer plat; | |||
@TableField(exist = false) | |||
private Date startDate; | |||
@TableField(exist = false) | |||
private Date endDate; | |||
@TableField(exist = false) | |||
private Integer goldNum; | |||
} |
@@ -0,0 +1,33 @@ | |||
package com.iformall.domain.po; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.iformall.domain.po.base.TenantEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
import java.util.Date; | |||
@TableName(value = "user_basic_glod_config") | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class UserBasicGlodConfig extends TenantEntity { | |||
protected Long id; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumProject",name="projectType") | |||
private Integer projectType; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumGlodConfigType",name="type") | |||
private Integer type; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="glodNum") | |||
private Integer glodNum; | |||
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||
private Date createDate; | |||
@io.swagger.annotations.ApiModelProperty(value="修改时间",name="updateDate") | |||
private Date updateDate; | |||
} |
@@ -0,0 +1,25 @@ | |||
package com.iformall.domain.po; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.iformall.domain.po.base.TenantEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
import java.util.Date; | |||
@TableName(value = "user_basic_image") | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class UserBasicImage extends TenantEntity { | |||
protected Long id; | |||
@io.swagger.annotations.ApiModelProperty(value="形象",name="image") | |||
private String image; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="updateDate") | |||
private Date updateDate; | |||
} |
@@ -0,0 +1,36 @@ | |||
package com.iformall.domain.po; | |||
import cn.afterturn.easypoi.excel.annotation.Excel; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.iformall.domain.po.base.TenantEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
import java.util.Date; | |||
@TableName(value = "user_basic_property") | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class UserBasicProperty extends TenantEntity { | |||
protected Long id; | |||
@io.swagger.annotations.ApiModelProperty(value="数字分身账户",name="digitalAvatarGlod") | |||
private Integer digitalAvatarGlod; | |||
@io.swagger.annotations.ApiModelProperty(value="数字分身账户余额",name="digitalAvatarResidueGlod") | |||
private Integer digitalAvatarResidueGlod; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="updateDate") | |||
private Date updateDate; | |||
@TableField(exist = false) | |||
private Integer addGlod; | |||
@TableField(exist = false) | |||
private Integer reduceGlod; | |||
} |
@@ -0,0 +1,61 @@ | |||
package com.iformall.domain.po; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.iformall.domain.po.base.TenantEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
import java.util.Date; | |||
import java.util.List; | |||
@TableName(value = "user_basic_property_log") | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class UserBasicPropertyLog extends TenantEntity { | |||
protected Long id; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="userId") | |||
private Long userId; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumProject ",name="projectType") | |||
private Integer projectType; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumPropertyLogType ",name="type") | |||
private Integer type; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="befourGold") | |||
private Integer befourGold; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="goldNum") | |||
private Integer goldNum; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="afterGold") | |||
private Integer afterGold; | |||
@io.swagger.annotations.ApiModelProperty(value="记录对应的业务ID",name="extraId") | |||
private Long extraId; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="remark") | |||
private String remark; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="detail") | |||
private String detail; | |||
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||
private Date createDate; | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="",name="extraIds") | |||
private List<Long> extraIds; | |||
@TableField(exist = false) | |||
private Date startDate; | |||
@TableField(exist = false) | |||
private Date endDate; | |||
} |
@@ -0,0 +1,31 @@ | |||
package com.iformall.domain.po; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.iformall.domain.po.base.TenantEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
import java.util.Date; | |||
@TableName(value = "user_basic_qrcode") | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class UserBasicQrcode extends TenantEntity { | |||
protected Long id; | |||
private Long userId; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumProject",name="projectType") | |||
private Integer projectType; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="plat") | |||
private Integer plat; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="qrcode") | |||
private String qrcode; | |||
} |
@@ -36,6 +36,8 @@ public class WxAppinfo extends BaseTenantEntity { | |||
private Integer expiresIn; | |||
@io.swagger.annotations.ApiModelProperty(value="支付ID,参看wx_pay_account",name="payId") | |||
private Long payId; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumProject",name="projectType") | |||
private Integer projectType; | |||
@io.swagger.annotations.ApiModelProperty(value="1B端2C端",name="type") | |||
private Integer type; | |||
@io.swagger.annotations.ApiModelProperty(value="模板类型",name="mouldType") | |||
@@ -1,40 +0,0 @@ | |||
package com.iformall.domain.po; | |||
import cn.afterturn.easypoi.excel.annotation.Excel; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
@TableName(value = "wx_business_circle_order") | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class WxBusinessCircleOrder extends BusinessCircleBase { | |||
@io.swagger.annotations.ApiModelProperty(value="微信支付分配的商户号",name="wxMchid") | |||
private String wxMchid; | |||
@io.swagger.annotations.ApiModelProperty(value="商圈商户名称",name="wxMerchantName") | |||
private String wxMerchantName; | |||
@io.swagger.annotations.ApiModelProperty(value="门店名称,商圈在商圈小程序上圈店时填写的门店名称",name="wxShopName") | |||
private String wxShopName; | |||
@Excel(name = "门店编码", width = 20, orderNum = "1") | |||
@io.swagger.annotations.ApiModelProperty(value="门店编号,商圈在商圈小程序上圈店时填写的门店编号,用于跟商圈自身已有的商户识别码对齐",name="wxShopNumber") | |||
private String wxShopNumber; | |||
@io.swagger.annotations.ApiModelProperty(value="小程序appid",name="appid") | |||
private String appid; | |||
@io.swagger.annotations.ApiModelProperty(value="openid",name="openid") | |||
private String openid; | |||
@io.swagger.annotations.ApiModelProperty(value="手动提交积分标记,自动提交时无该字段,用于区分用户手动申请后推送的积分",name="commitTag") | |||
private String commitTag; | |||
@io.swagger.annotations.ApiModelProperty(value="是否积分同步(1:是,0:否)",name="isPointsNotify") | |||
private Integer isPointsNotify; | |||
} |
@@ -25,15 +25,6 @@ public class WxCUser extends CUser { | |||
appPlat = EnumAppPlat.WX; | |||
} | |||
@io.swagger.annotations.ApiModelProperty(value="EnumBusinessCircleAuthorizeState 授权商圈快速积分状态",name="authorizeState") | |||
private Integer authorizeState; | |||
@io.swagger.annotations.ApiModelProperty(value="授权时间",name="authorizeTime") | |||
private Date authorizeTime; | |||
@io.swagger.annotations.ApiModelProperty(value="取消授权时间",name="deauthorizeTime") | |||
private Date deauthorizeTime; | |||
public String createToken(Date currentDate,String tenantId) { | |||
if(StringUtils.isBlank(tenantId)){ | |||
tenantId = "1"; | |||
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableName; | |||
import lombok.Data; | |||
import lombok.ToString; | |||
import java.util.Date; | |||
@TableName(value = "wx_c_voice") | |||
@Data | |||
@ToString(callSuper = true) | |||
@@ -17,12 +19,12 @@ public class WxCUserAuthority { | |||
private int type; | |||
@TableField(exist = false) | |||
private String resourceId; | |||
//共享 0 定制 1 | |||
//共享 0 定制 1 | |||
private int classType; | |||
@TableField(exist = false) | |||
private String currentTime; | |||
@TableField(exist = false) | |||
private String expireTime; | |||
private Date expireTime; | |||
} |
@@ -11,7 +11,7 @@ import lombok.ToString; | |||
import java.util.ArrayList; | |||
import java.util.Date; | |||
@TableName(value ="wx_c_author") | |||
@TableName(value = "wx_c_author") | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
@@ -23,32 +23,32 @@ public class WxCVideoTable extends TenantEntityWithoutFinalTenantId { | |||
@TableField(exist = false) | |||
private String currentTime; | |||
@TableField(exist = false) | |||
private String expireTime; | |||
@io.swagger.annotations.ApiModelProperty(value="数字人id",name="id") | |||
private int id; | |||
@io.swagger.annotations.ApiModelProperty(value="套餐0共享 1定制",name="class") | |||
private int classType; | |||
@io.swagger.annotations.ApiModelProperty(value="数字人名称",name="name") | |||
private String name; | |||
@io.swagger.annotations.ApiModelProperty(value="数字人封面图片链接",name="image") | |||
private String image; | |||
@io.swagger.annotations.ApiModelProperty(value="数字人样例视频链接",name="demo") | |||
private String demo; | |||
@io.swagger.annotations.ApiModelProperty(value="数字人样例视频链接",name="model") | |||
private String model; | |||
@io.swagger.annotations.ApiModelProperty(value="数字人模板预处理信息文件链接",name="preinfo") | |||
private String preInfo; | |||
@io.swagger.annotations.ApiModelProperty(value="数字人模板预处理信息文件链接",name="model_path") | |||
private String modelPath; | |||
@io.swagger.annotations.ApiModelProperty(value="数字人模板预处理信息文件链接",name="preInfo_path") | |||
private String preInfoPath; | |||
private Date expireTime; | |||
@io.swagger.annotations.ApiModelProperty(value = "数字人id", name = "id") | |||
private int id; | |||
@io.swagger.annotations.ApiModelProperty(value = "套餐0共享 1定制", name = "class") | |||
private int classType; | |||
@io.swagger.annotations.ApiModelProperty(value = "数字人名称", name = "name") | |||
private String name; | |||
@io.swagger.annotations.ApiModelProperty(value = "数字人封面图片链接", name = "image") | |||
private String image; | |||
@io.swagger.annotations.ApiModelProperty(value = "数字人样例视频链接", name = "demo") | |||
private String demo; | |||
@io.swagger.annotations.ApiModelProperty(value = "数字人模板视频链接", name = "model") | |||
private String model; | |||
@io.swagger.annotations.ApiModelProperty(value = "数字人模板预处理信息文件链接", name = "preinfo") | |||
private String preInfo; | |||
@io.swagger.annotations.ApiModelProperty(value = "数字人模板文件链接", name = "model_path") | |||
private String modelPath; | |||
@io.swagger.annotations.ApiModelProperty(value = "数字人模板预处理信息文件链接", name = "preInfo_path") | |||
private String preInfoPath; | |||
@io.swagger.annotations.ApiModelProperty(value = "数字人模板md文件校验码", name = "model_md5") | |||
private String modelMd5; | |||
@io.swagger.annotations.ApiModelProperty(value = "数字人模板预处理信息md文件校验码", name = "preinfo_md5") | |||
private String preInfoMd5; | |||
} |
@@ -6,6 +6,7 @@ import lombok.Data; | |||
import lombok.ToString; | |||
import java.util.ArrayList; | |||
import java.util.Date; | |||
import java.util.List; | |||
@TableName(value = "voice_info") | |||
@@ -19,7 +20,7 @@ public class WxCVoiceTable { | |||
@TableField(exist = false) | |||
private String currentTime; | |||
@TableField(exist = false) | |||
private String expireTime; | |||
private Date expireTime; | |||
@io.swagger.annotations.ApiModelProperty(value = "地区名称", name = "local_name") | |||
private String localelName; | |||
@@ -78,25 +78,17 @@ public class WxPayAccount extends TenantEntity { | |||
private Integer sellRate; | |||
public String getPayNotifyV3Url() { | |||
return notifyUrl + "/pay/v3/"+this.getTenantId(); | |||
return notifyUrl + "/pay/v3"; | |||
} | |||
public String getPayNotifyUrl() { | |||
return notifyUrl + "/pay/"+this.getTenantId(); | |||
return notifyUrl + "/pay"; | |||
} | |||
public String getRefundNotifyV3Url() { | |||
return notifyUrl + "/refund/v3/"+this.getTenantId(); | |||
return notifyUrl + "/refund/v3"; | |||
} | |||
public String getRefundNotifyUrl() { | |||
return notifyUrl + "/refund/"+this.getTenantId(); | |||
return notifyUrl + "/refund"; | |||
} | |||
public String getSubsidyNotifyV3Url() { | |||
return notifyUrl + "/subsidyPay/v3/"+this.getTenantId(); | |||
} | |||
public String getSubsidyNotifyUrl() { | |||
return notifyUrl + "/subsidyPay"; | |||
} | |||
public boolean checkShare() { return share > 0; } | |||
@io.swagger.annotations.ApiModelProperty(value="微信支付分serviceId",name="serviceId") | |||
private String serviceId; | |||
@@ -1,39 +0,0 @@ | |||
package com.iformall.domain.po; | |||
import cn.afterturn.easypoi.excel.annotation.Excel; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
@TableName(value = "wx_third_party_orders") | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class WxThirdPartyOrders extends BusinessCircleBase { | |||
@io.swagger.annotations.ApiModelProperty(value="来源(wx_third_party_api)",name="sourceAppId") | |||
private String sourceAppId; | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="来源(wx_third_party_api)",name="sourceAppName") | |||
private String sourceAppName; | |||
@io.swagger.annotations.ApiModelProperty(value="1:RMB订单;2:积分订单",name="sourceType") | |||
private Integer sourceType; | |||
@io.swagger.annotations.ApiModelProperty(value="门店名称",name="shopName") | |||
private String shopName; | |||
@Excel(name = "门店编码", width = 20, orderNum = "1") | |||
@io.swagger.annotations.ApiModelProperty(value="门店编号",name="shopNumber") | |||
private String shopNumber; | |||
@io.swagger.annotations.ApiModelProperty(value="顾客手机号",name="userPhone") | |||
private String userPhone; | |||
@io.swagger.annotations.ApiModelProperty(value="顾客编号",name="userNumber") | |||
private String userNumber; | |||
} |
@@ -1,20 +0,0 @@ | |||
package com.iformall.domain.po.msg; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
/** | |||
* | |||
*/ | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class AfterBusinessCreditMsg extends BaseMsg { | |||
private static final long serialVersionUID = -1l; | |||
@io.swagger.annotations.ApiModelProperty(value="商圈订单ID",name="businessCircleOrderId") | |||
private Long businessCircleOrderId; | |||
} |
@@ -1,32 +0,0 @@ | |||
package com.iformall.domain.po.msg; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class FmInsideThirdPartyOrdersMsg extends BaseMsg{ | |||
private static final long serialVersionUID = 1L; | |||
@io.swagger.annotations.ApiModelProperty(value="第三方交易状态",name="eventType") | |||
private String eventType; | |||
@io.swagger.annotations.ApiModelProperty(value="商圈订单Id",name="businessCircleOrderId") | |||
private Long businessCircleOrderId; | |||
@io.swagger.annotations.ApiModelProperty(value="门店Id",name="merchantId") | |||
private Long merchantId; | |||
@io.swagger.annotations.ApiModelProperty(value="c端会员id",name="cUserId") | |||
private Long cUserId; | |||
@io.swagger.annotations.ApiModelProperty(value="门店名称,商圈在商圈小程序上圈店时填写的门店名称",name="wxShopName") | |||
private String wxShopName; | |||
@io.swagger.annotations.ApiModelProperty(value="用户实际消费金额,单位(分)",name="amount") | |||
private Integer amount; | |||
} |
@@ -0,0 +1,122 @@ | |||
package com.iformall.domain.po.sm; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.iformall.common.SortColumn; | |||
import com.iformall.domain.po.base.TenantEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
import org.apache.commons.lang3.StringUtils; | |||
import java.math.BigDecimal; | |||
import java.util.Date; | |||
import java.util.List; | |||
@TableName(value = "digital_avatar_mould") | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class DigitalAvatarMould extends TenantEntity { | |||
protected Long id; | |||
@TableField(exist = false) | |||
@SortColumn(column = "sale_price") | |||
private String salePriceStr; | |||
@TableField(exist = false) | |||
@SortColumn(column = "price") | |||
private String priceStr; | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="查询-起始时间",name="startDate") | |||
private Date startDate; | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="查询-结束时间",name="endDate") | |||
private Date endDate; | |||
@io.swagger.annotations.ApiModelProperty(value="封面图",name="coverImg") | |||
private String coverImg; | |||
@io.swagger.annotations.ApiModelProperty(value="多封面图",name="coverPicture") | |||
private String coverPicture; | |||
@io.swagger.annotations.ApiModelProperty(value="详情多图",name="detailPicture") | |||
private String detailPicture; | |||
@io.swagger.annotations.ApiModelProperty(value="名称",name="title") | |||
private String title; | |||
@io.swagger.annotations.ApiModelProperty(value="副标题",name="subTitle") | |||
private String subTitle; | |||
@io.swagger.annotations.ApiModelProperty(value="标签",name="sceneSign") | |||
private String sceneSign; | |||
@TableField(exist = false) | |||
private List<Long> sceneSignList; | |||
public List<Long> getSceneSignList(){ | |||
if(StringUtils.isNotBlank(this.getSceneSign())){ | |||
try{ | |||
List<Long> longs = JSONObject.parseArray(this.getSceneSign(), Long.class); | |||
if(longs != null && longs.size() > 0){ | |||
return longs; | |||
} | |||
}catch(Exception e){ | |||
} | |||
} | |||
return null; | |||
} | |||
@TableField(exist = false) | |||
private List<MouldPatchSign> mouldPatchSign; | |||
@io.swagger.annotations.ApiModelProperty(value="售价",name="salePrice") | |||
private Integer salePrice; | |||
@io.swagger.annotations.ApiModelProperty(value="须知",name="detail") | |||
private String detail; | |||
@io.swagger.annotations.ApiModelProperty(value="原价",name="price") | |||
private Integer price; | |||
@io.swagger.annotations.ApiModelProperty(value="购买须知",name="remark") | |||
private String remark; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumDigitalAvatarMouldType",name="mouldType") | |||
private Integer mouldType; | |||
@io.swagger.annotations.ApiModelProperty(value="模板第三方Id",name="mouldSmId") | |||
private String mouldSmId; | |||
@io.swagger.annotations.ApiModelProperty(value="重试次数",name="againCount") | |||
private Integer againCount; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumaMouldPatchStatus 状态",name="status") | |||
private Integer status; | |||
@io.swagger.annotations.ApiModelProperty(value="上架时间",name="putonDate") | |||
private Date putonDate; | |||
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||
private Date createDate; | |||
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | |||
private Date updateDate; | |||
public String getSalePriceStr() { | |||
if(salePrice!=null) { | |||
salePriceStr = new BigDecimal(salePrice).divide(new BigDecimal(100)).toString(); | |||
} | |||
return salePriceStr; | |||
} | |||
public String getPriceStr() { | |||
if(price!=null) { | |||
priceStr = new BigDecimal(price).divide(new BigDecimal(100)).toString(); | |||
} | |||
return priceStr; | |||
} | |||
} |
@@ -0,0 +1,87 @@ | |||
package com.iformall.domain.po.sm; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.iformall.common.SortColumn; | |||
import com.iformall.domain.po.base.TenantEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
import org.apache.commons.lang3.StringUtils; | |||
import java.math.BigDecimal; | |||
import java.util.ArrayList; | |||
import java.util.Date; | |||
import java.util.List; | |||
@TableName(value = "user_digital_avatar_order") | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class UserDigitalAvatarOrder extends TenantEntity { | |||
protected Long id; | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="查询-创建起始时间",name="startDate") | |||
private Date startDate; | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="查询-创建结束时间",name="endDate") | |||
private Date endDate; | |||
@io.swagger.annotations.ApiModelProperty(value="订单id",name="orderId") | |||
private Long orderId; | |||
@io.swagger.annotations.ApiModelProperty(value="用户Id",name="userId") | |||
private Long userId; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="userImages") | |||
private String userImages; | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="",name="userImageList") | |||
private List<String> userImageList; | |||
public List<String> getUserImageList(){ | |||
if(StringUtils.isNotBlank(userImages)){ | |||
try{ | |||
return JSONObject.parseArray(userImages, String.class); | |||
}catch(Exception e){ | |||
} | |||
} | |||
return new ArrayList<String>(); | |||
} | |||
@io.swagger.annotations.ApiModelProperty(value="",name="digitalAvatarId") | |||
private Long digitalAvatarId; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumDigitalAvatarMouldType",name="digitalAvatarType") | |||
private Integer digitalAvatarType; | |||
@io.swagger.annotations.ApiModelProperty(value="模板",name="digitalAvatarSm") | |||
private String digitalAvatarSm; | |||
@io.swagger.annotations.ApiModelProperty(value="原价",name="price") | |||
private Integer price; | |||
@io.swagger.annotations.ApiModelProperty(value="名称",name="title") | |||
private String title; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="remark") | |||
private String remark; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumDigitalAvatarOrderStatus 状态",name="status") | |||
private Integer status; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="msg") | |||
private String msg; | |||
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||
private Date createDate; | |||
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | |||
private Date updateDate; | |||
@TableField(exist = false) | |||
private List<UserDigitalAvatarPhoto> photoList; | |||
} |
@@ -0,0 +1,63 @@ | |||
package com.iformall.domain.po.sm; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.iformall.common.SortColumn; | |||
import com.iformall.domain.po.base.TenantEntity; | |||
import com.iformall.enums.EnumSpeakType; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
import org.apache.commons.lang3.StringUtils; | |||
import java.math.BigDecimal; | |||
import java.util.ArrayList; | |||
import java.util.Date; | |||
import java.util.List; | |||
@TableName(value = "user_digital_avatar_photo") | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class UserDigitalAvatarPhoto extends TenantEntity { | |||
protected Long id; | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="查询-创建起始时间",name="startDate") | |||
private Date startDate; | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="查询-创建结束时间",name="endDate") | |||
private Date endDate; | |||
@io.swagger.annotations.ApiModelProperty(value="UserDigitalAvatarOrder.id",name="orderId") | |||
private Long orderId; | |||
@io.swagger.annotations.ApiModelProperty(value="用户Id",name="userId") | |||
private Long userId; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="image") | |||
private String image; | |||
@io.swagger.annotations.ApiModelProperty(value="原价",name="price") | |||
private Integer price; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="remark") | |||
private String remark; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="imageSuper") | |||
private String imageSuper; | |||
@io.swagger.annotations.ApiModelProperty(value="EnumDigitalAvatarPhotoStatus 状态",name="status") | |||
private Integer status; | |||
@io.swagger.annotations.ApiModelProperty(value="",name="msg") | |||
private String msg; | |||
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||
private Date createDate; | |||
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | |||
private Date updateDate; | |||
} |
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.iformall.common.SortColumn; | |||
import com.iformall.domain.po.base.TenantEntity; | |||
import com.iformall.enums.EnumSpeakType; | |||
import com.iformall.enums.EnumVideoStatus; | |||
import com.iformall.sm.AiVideoHelper; | |||
import lombok.Data; | |||
@@ -77,8 +78,14 @@ public class UserMouldVideo extends TenantEntity { | |||
@TableField(exist = false) | |||
private PersonMould personMould; | |||
@TableField(exist = false) | |||
private List<Long> voiceMouldIds; | |||
@io.swagger.annotations.ApiModelProperty(value="字幕开关",name="subtitleEnabled") | |||
private Integer subtitleEnabled; | |||
@io.swagger.annotations.ApiModelProperty(value="字幕参数",name="subtitleParams") | |||
private String subtitleParams; | |||
// @TableField(exist = false) | |||
// private List<Long> voiceMouldIds; | |||
@io.swagger.annotations.ApiModelProperty(value="声音模板ID",name="voiceMouldId") | |||
private Long voiceMouldId; | |||
/** | |||
@@ -96,8 +103,26 @@ public class UserMouldVideo extends TenantEntity { | |||
*/ | |||
@io.swagger.annotations.ApiModelProperty(value="声音模板",name="voiceMouldSm") | |||
private String voiceMouldSm; | |||
@TableField(exist = false) | |||
private String speakTypeStr; | |||
// @TableField(exist = false) | |||
// private VoiceMould voiceMould; | |||
@TableField(exist = false) | |||
private VoiceMould voiceMould; | |||
private VoiceInfo voiceInfo; | |||
public String getSpeakTypeStr(){ | |||
if(StringUtils.isBlank(this.speakTypeStr) && StringUtils.isNotBlank(this.voiceMouldSm)){ | |||
try{ | |||
JSONObject personMouldObject = JSONObject.parseObject(this.voiceMouldSm); | |||
Integer speakType = personMouldObject.getInteger("speakType"); | |||
this.speakTypeStr = EnumSpeakType.getEnum(speakType).getMessage(); | |||
}catch(Exception e){} | |||
} | |||
return speakTypeStr; | |||
} | |||
@io.swagger.annotations.ApiModelProperty(value="文案",name="paperwork") | |||
private String paperwork; | |||
@@ -1,162 +0,0 @@ | |||
package com.iformall.domain.vo; | |||
import cn.afterturn.easypoi.excel.annotation.Excel; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.iformall.domain.po.BusinessCircleBase; | |||
import com.iformall.domain.po.WxCUserBasicInfo; | |||
import com.iformall.domain.po.WxMerchant; | |||
import com.iformall.domain.po.base.TenantEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
import java.math.BigDecimal; | |||
import java.util.Date; | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class WxThirdPartyOrdersVo extends TenantEntity { | |||
protected Long id; | |||
@io.swagger.annotations.ApiModelProperty(value="商圈支付结果通知Id",name="noticeId") | |||
private String noticeId; | |||
@io.swagger.annotations.ApiModelProperty(value="商圈支付结果通知创建时间",name="noticeCreateTime") | |||
private Date noticeCreateTime; | |||
@io.swagger.annotations.ApiModelProperty(value="商圈支付结果通知类型:MALL_TRANSACTION.SUCCESS",name="noticeEventType") | |||
private String noticeEventType; | |||
@Excel(name = "摘要", width = 20, orderNum = "10") | |||
@io.swagger.annotations.ApiModelProperty(value="商圈支付结果通知回调摘要",name="summary") | |||
private String summary; | |||
@Excel(name = "抵扣/退款时间", width = 20, orderNum = "6", format = "yyyy-MM-dd HH:mm:ss") | |||
@io.swagger.annotations.ApiModelProperty(value="交易完成时间",name="timeEnd") | |||
private Date timeEnd; | |||
@io.swagger.annotations.ApiModelProperty(value="用户实际消费金额,单位(分)",name="amount") | |||
private Integer amount; | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="用户实际消费金额,单位(元)",name="amountStr") | |||
private String amountStr; | |||
public String getAmountStr() { | |||
return amount != null ? new BigDecimal(amount).divide(new BigDecimal(100)).toPlainString(): amountStr; | |||
} | |||
@Excel(name = "积分数量", width = 20, orderNum = "7") | |||
@io.swagger.annotations.ApiModelProperty(value="用户实际付款金额,单位(分)",name="payAmount") | |||
private Integer payAmount; | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="用户实际付款金额,单位(元)",name="payAmountStr") | |||
private String payAmountStr; | |||
public String getPayAmountStr() { | |||
return payAmount != null ? new BigDecimal(payAmount).divide(new BigDecimal(100)).toPlainString(): payAmountStr; | |||
} | |||
@Excel(name = "付款订单编号", width = 20, orderNum = "3") | |||
@io.swagger.annotations.ApiModelProperty(value="支付订单号",name="transactionId") | |||
private String transactionId; | |||
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createTime") | |||
private Date createTime; | |||
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateTime") | |||
private Date updateTime; | |||
@io.swagger.annotations.ApiModelProperty(value="门店Id,与第三方对齐",name="merchantId") | |||
private Long merchantId; | |||
@Excel(name = "门店名称", width = 20, orderNum = "2") | |||
private String merchantName; | |||
@TableField(exist = false) | |||
private WxMerchant merchant; | |||
@Excel(name = "会员ID", width = 20, orderNum = "8") | |||
@TableField(exist = false) | |||
private String userIdStr; | |||
public String getUserIdStr(){ | |||
return cUserId == null?"":Long.toString(cUserId); | |||
} | |||
@io.swagger.annotations.ApiModelProperty(value="c端会员id,与第三方对齐",name="cUserId") | |||
private Long cUserId; | |||
private String cUserNickName; | |||
@Excel(name = "会员手机号", width = 20, orderNum = "9") | |||
@TableField(exist = false) | |||
private String userPhoneStr; | |||
public String getUserPhoneStr(){ | |||
return cUserPhone; | |||
} | |||
private String cUserPhone; | |||
@TableField(exist = false) | |||
private WxCUserBasicInfo basicInfo; | |||
@io.swagger.annotations.ApiModelProperty(value="是否获得积分(1:是,0:否)",name="earnPoints") | |||
private Integer earnPoints; | |||
@io.swagger.annotations.ApiModelProperty(value="订单更新积分值",name="increasedPoints") | |||
private Integer increasedPoints; | |||
@io.swagger.annotations.ApiModelProperty(value="积分更新时间(新增)",name="increasedPoints") | |||
private Date pointsUpdateTime; | |||
@Excel(name = "是否退款", width = 20, orderNum = "4", replace = {"退款订单_1", "付款订单_0"}) | |||
@io.swagger.annotations.ApiModelProperty(value="是否退款(1:是,0:否)",name="isRefund") | |||
private Integer isRefund; | |||
@io.swagger.annotations.ApiModelProperty(value="正常订单状态(is_refund=0时)1:部分退款2:订单关闭",name="orderStatus") | |||
private Integer orderStatus; | |||
@Excel(name = "退款订单编号", width = 20, orderNum = "5") | |||
@io.swagger.annotations.ApiModelProperty(value="微信支付退款单号",name="refundId") | |||
private String refundId; | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="查询-开始时间",name="startdate") | |||
private Date startTime; | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="查询-结束时间",name="enddate") | |||
private Date endTime; | |||
@io.swagger.annotations.ApiModelProperty(value="用户退款金额,单位(分)",name="refundAmount") | |||
private Integer refundAmount; | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="用户退款金额,单位(元)",name="refundAmountStr") | |||
private String refundAmountStr; | |||
public String getRefundAmountStr() { | |||
return refundAmount != null ? new BigDecimal(refundAmount).divide(new BigDecimal(100)).toPlainString(): refundAmountStr; | |||
} | |||
@io.swagger.annotations.ApiModelProperty(value="来源(wx_third_party_api)",name="sourceAppId") | |||
private String sourceAppId; | |||
@TableField(exist = false) | |||
@io.swagger.annotations.ApiModelProperty(value="来源(wx_third_party_api)",name="sourceAppName") | |||
private String sourceAppName; | |||
@io.swagger.annotations.ApiModelProperty(value="1:RMB订单;2:积分订单",name="sourceType") | |||
private Integer sourceType; | |||
@io.swagger.annotations.ApiModelProperty(value="门店名称",name="shopName") | |||
private String shopName; | |||
@Excel(name = "门店编码", width = 20, orderNum = "1") | |||
@io.swagger.annotations.ApiModelProperty(value="门店编号",name="shopNumber") | |||
private String shopNumber; | |||
@io.swagger.annotations.ApiModelProperty(value="顾客手机号",name="userPhone") | |||
private String userPhone; | |||
@io.swagger.annotations.ApiModelProperty(value="顾客编号",name="userNumber") | |||
private String userNumber; | |||
} |
@@ -11,6 +11,7 @@ import com.iformall.douyin.pay.orderQuery.QueryRefundResult; | |||
import com.iformall.douyin.pay.orderQuery.QuerySettleResult; | |||
import com.iformall.douyin.pay.preOrder.*; | |||
import com.iformall.enums.EnumPayStatus; | |||
import com.iformall.enums.EnumProductOrderStatus; | |||
import com.iformall.exception.MallinkException; | |||
import com.iformall.utils.sign.SignUtils; | |||
@@ -190,19 +191,19 @@ public class DouYinPayHelper { | |||
public static int getPayStatusFromOrderQueryResult(OrderQueryResult result,String payOrderNo) { | |||
if(result == null){ | |||
return EnumPayStatus.PAY_STATUS_ORDER_NOT_EXISTS.getCode(); | |||
throw new MallinkException(ErrorCode.PAY_ORDER_ERROR.getCode(), "订单查询抖音支付状态失败"+payOrderNo); | |||
} | |||
String orderStatus = result.getOrderStatus(); | |||
if(StringUtils.isBlank(orderStatus)){ | |||
return EnumPayStatus.PAY_STATUS_FAIL.getCode(); | |||
return EnumProductOrderStatus.ORDER_STATUS_PENDING_PAYMENT.getCode(); | |||
}else if("PROCESSING".equals(orderStatus)){//以观后效 | |||
return EnumPayStatus.PAY_STATUS_NOTPAY.getCode(); | |||
return EnumProductOrderStatus.ORDER_STATUS_PENDING_PAYMENTING.getCode(); | |||
}else if("SUCCESS".equals(orderStatus)){ | |||
return EnumPayStatus.PAY_STATUS_SUCCESS.getCode(); | |||
return EnumProductOrderStatus.ORDER_STATUS_PAYMENT_SUCCESS.getCode(); | |||
}else if("FAIL".equals(orderStatus)){ | |||
return EnumPayStatus.PAY_STATUS_FAIL.getCode(); | |||
return EnumProductOrderStatus.ORDER_STATUS_PENDING_PAYMENT.getCode(); | |||
}else if("TIMEOUT".equals(orderStatus)){ | |||
return EnumPayStatus.PAY_STATUS_FAIL.getCode(); | |||
return EnumProductOrderStatus.ORDER_STATUS_OVERTIME_CANCEL.getCode(); | |||
} | |||
throw new MallinkException(ErrorCode.PAY_ORDER_ERROR.getCode(), "订单查询抖音支付状态失败"+payOrderNo); | |||
} | |||
@@ -343,8 +344,11 @@ public class DouYinPayHelper { | |||
QuerySettleResult result = new QuerySettleResult(); | |||
result.setSettleNo(info.getString("settle_no")); | |||
result.setSettleAmount(info.getInteger("settle_amount")); | |||
result.setRake(info.getInteger("rake")); | |||
result.setCommission(info.getInteger("commission")); | |||
result.setSettleStatus(info.getString("settle_status")); | |||
result.setMsg(jsonObject.getString("err_tips")); | |||
result.setMsg(jsonObject.getString("msg")); | |||
result.setSettleDetail(jsonObject.getString("settle_detail")); | |||
return result; | |||
}else { | |||
log.error("settleQuery reponse error. request: "+JSON.toJSONString(map)+" response:"+response); | |||
@@ -8,5 +8,8 @@ public class QuerySettleResult { | |||
private String settleNo;//担保支付侧的分账单号 | |||
private Integer settleAmount;//分账金额,单位[分] | |||
private String settleStatus;//分账状态,成功-SUCCESS;失败-FAIL | |||
private String settleDetail; | |||
private Integer rake; | |||
private Integer commission; | |||
private String msg; | |||
} |
@@ -1,48 +0,0 @@ | |||
package com.iformall.enums; | |||
/** | |||
* . | |||
*/ | |||
public enum EnumBusinessCircleAuthorizeState { | |||
//UNAUTHORIZED:未授权 | |||
//AUTHORIZED:已授权 | |||
//DEAUTHORIZED:已取消授权 | |||
UNAUTHORIZED(0, "UNAUTHORIZED"), | |||
AUTHORIZED(1, "AUTHORIZED"), | |||
DEAUTHORIZED(2, "DEAUTHORIZED"), | |||
; | |||
public static EnumBusinessCircleAuthorizeState getEnum(Integer code) { | |||
for (EnumBusinessCircleAuthorizeState value : values()) { | |||
if (value.getCode().equals(code)) { | |||
return value; | |||
} | |||
} | |||
return null; | |||
} | |||
public static EnumBusinessCircleAuthorizeState getEnum(String message) { | |||
for (EnumBusinessCircleAuthorizeState value : values()) { | |||
if (value.getMessage().equals(message)) { | |||
return value; | |||
} | |||
} | |||
return null; | |||
} | |||
private Integer code; | |||
private String message; | |||
EnumBusinessCircleAuthorizeState(Integer code, String message) { | |||
this.code = code; | |||
this.message = message; | |||
} | |||
public Integer getCode() { | |||
return code; | |||
} | |||
public String getMessage() { | |||
return message; | |||
} | |||
} |
@@ -0,0 +1,49 @@ | |||
package com.iformall.enums; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
/** | |||
* | |||
*/ | |||
public enum EnumDigitalAvatarMouldType { | |||
persion_1(1, "一人模板"), | |||
persion_2(2, "二人模板"), | |||
persion_3(3, "三人模板"), | |||
; | |||
public static EnumDigitalAvatarMouldType getEnum(Integer code) { | |||
for (EnumDigitalAvatarMouldType value : values()) { | |||
if (value.getCode().equals(code)) { | |||
return value; | |||
} | |||
} | |||
return null; | |||
} | |||
public static List<Integer> getAllCodes(){ | |||
List<Integer> codes = new ArrayList<>(); | |||
for (EnumDigitalAvatarMouldType value : values()) { | |||
codes.add(value.getCode()); | |||
} | |||
return codes; | |||
} | |||
private Integer code; | |||
private String message; | |||
EnumDigitalAvatarMouldType(Integer code, String message) { | |||
this.code = code; | |||
this.message = message; | |||
} | |||
public Integer getCode() { | |||
return code; | |||
} | |||
public String getMessage() { | |||
return message; | |||
} | |||
} |
@@ -0,0 +1,38 @@ | |||
package com.iformall.enums; | |||
/** | |||
* | |||
*/ | |||
public enum EnumDigitalAvatarOrderStatus { | |||
wait(1, "待制作"), | |||
finish(2, "制作完成"), | |||
fail(3, "制作失败"), | |||
; | |||
public static EnumDigitalAvatarOrderStatus getEnum(Integer code) { | |||
for (EnumDigitalAvatarOrderStatus value : values()) { | |||
if (value.getCode().equals(code)) { | |||
return value; | |||
} | |||
} | |||
return null; | |||
} | |||
private Integer code; | |||
private String message; | |||
EnumDigitalAvatarOrderStatus(Integer code, String message) { | |||
this.code = code; | |||
this.message = message; | |||
} | |||
public Integer getCode() { | |||
return code; | |||
} | |||
public String getMessage() { | |||
return message; | |||
} | |||
} |
@@ -0,0 +1,42 @@ | |||
package com.iformall.enums; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
/** | |||
* | |||
*/ | |||
public enum EnumDigitalAvatarPhotoStatus { | |||
def(0, "默认"), | |||
wait(1, "待超分"), | |||
finish(2, "超分完成"), | |||
fail(3, "超分失败"), | |||
; | |||
public static EnumDigitalAvatarPhotoStatus getEnum(Integer code) { | |||
for (EnumDigitalAvatarPhotoStatus value : values()) { | |||
if (value.getCode().equals(code)) { | |||
return value; | |||
} | |||
} | |||
return null; | |||
} | |||
private Integer code; | |||
private String message; | |||
EnumDigitalAvatarPhotoStatus(Integer code, String message) { | |||
this.code = code; | |||
this.message = message; | |||
} | |||
public Integer getCode() { | |||
return code; | |||
} | |||
public String getMessage() { | |||
return message; | |||
} | |||
} |
@@ -0,0 +1,38 @@ | |||
package com.iformall.enums; | |||
/** | |||
* @author | |||
*/ | |||
public enum EnumGlodConfigType { | |||
register(1,"注册"), | |||
invite(2,"邀请"), | |||
; | |||
public static EnumGlodConfigType getEnum(Integer code) { | |||
for (EnumGlodConfigType value : values()) { | |||
if (value.getCode().equals(code)) { | |||
return value; | |||
} | |||
} | |||
return null; | |||
} | |||
private Integer code; | |||
private String message; | |||
EnumGlodConfigType(Integer code, String message) { | |||
this.code = code; | |||
this.message = message; | |||
} | |||
public Integer getCode() { | |||
return code; | |||
} | |||
public String getMessage() { | |||
return message; | |||
} | |||
} |
@@ -15,7 +15,8 @@ public enum EnumMouldPatchType { | |||
// body_mould(3, "身体模板"), | |||
background_mould(4, "背景"), | |||
material_mould(5, "素材"), | |||
person_photo(6, "人物照片"), | |||
person_photo_mould(6, "人物照片"), | |||
digital_avatar_mould(7, "数字人分身"), | |||
; | |||
public static EnumMouldPatchType getEnum(Integer code) { | |||
@@ -0,0 +1,51 @@ | |||
package com.iformall.enums; | |||
/** | |||
* Created by Stormeye on 2018/08/09. | |||
*/ | |||
public enum EnumProductOrderPayVendor { | |||
PAY_WAY_WECHAT(1, "微信小程序",EnumAppPlat.WX.getCode(),EnumProfitSharing.PROFIT_SHARING.getCode()), | |||
PAY_WAY_WECHAT_WAP(2, "微信H5",null,null), | |||
PAY_WAY_ALIPAY(3, "支付宝小程序",null,null), | |||
PAY_WAY_ALIPAY_WAP(4, "支付宝H5",null,null), | |||
PAY_WAY_TT(5, "抖音小程序",EnumAppPlat.TOUTIAO.getCode(),EnumProfitSharing.PROFIT_SHARING_MAST.getCode()), | |||
; | |||
public static EnumProductOrderPayVendor getEnum(Integer code) { | |||
for (EnumProductOrderPayVendor value : values()) { | |||
if (value.getCode().equals(code)) { | |||
return value; | |||
} | |||
} | |||
return null; | |||
} | |||
private Integer code; | |||
private String message; | |||
private Integer plat; | |||
private Integer profitSharing; | |||
EnumProductOrderPayVendor(Integer code, String message, Integer plat, Integer profitSharing) { | |||
this.code = code; | |||
this.message = message; | |||
this.plat = plat; | |||
this.profitSharing = profitSharing; | |||
} | |||
public Integer getCode() { | |||
return code; | |||
} | |||
public String getMessage() { | |||
return message; | |||
} | |||
public Integer getPlat() { | |||
return plat; | |||
} | |||
public Integer getProfitSharing() { | |||
return profitSharing; | |||
} | |||
} |
@@ -0,0 +1,38 @@ | |||
package com.iformall.enums; | |||
/** | |||
* luozukai | |||
*/ | |||
public enum EnumProductOrderSettleStatus { | |||
unfreeze_before(0, "待解冻"), | |||
unfreeze_ing(1, "解冻中"), | |||
unfreeze(2, "已解冻"), | |||
unfreeze_error(3, "解冻失败"), | |||
; | |||
public static EnumProductOrderSettleStatus getEnum(Integer code) { | |||
for (EnumProductOrderSettleStatus value : values()) { | |||
if (value.getCode().equals(code)) { | |||
return value; | |||
} | |||
} | |||
return null; | |||
} | |||
private Integer code; | |||
private String message; | |||
EnumProductOrderSettleStatus(Integer code, String message) { | |||
this.code = code; | |||
this.message = message; | |||
} | |||
public Integer getCode() { | |||
return code; | |||
} | |||
public String getMessage() { | |||
return message; | |||
} | |||
} |
@@ -0,0 +1,46 @@ | |||
package com.iformall.enums; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
/** | |||
* Created by Stormeye on 2018/08/09. | |||
*/ | |||
public enum EnumProductOrderStatus { | |||
// | |||
// ORDER_STATUS_PENDING_CREATE(0, "创建"), | |||
ORDER_STATUS_PENDING_PAYMENT(1, "待支付"), | |||
ORDER_STATUS_PENDING_PAYMENTING(2, "支付中"), | |||
ORDER_STATUS_PAYMENT_SUCCESS(3, "已支付"), | |||
ORDER_STATUS_OVERTIME_CANCEL(4, "已取消"), | |||
ORDER_STATUS_PENDING_REFUND(5,"待退款"), | |||
ORDER_STATUS_REFUND_SUCCESS(6, "已退款"), | |||
ORDER_STATUS_REFUND_FAILD(7, "退款失败"), | |||
; | |||
public static EnumProductOrderStatus getEnum(Integer code) { | |||
for (EnumProductOrderStatus value : values()) { | |||
if (value.getCode().equals(code)) { | |||
return value; | |||
} | |||
} | |||
return null; | |||
} | |||
private Integer code; | |||
private String message; | |||
EnumProductOrderStatus(Integer code, String message) { | |||
this.code = code; | |||
this.message = message; | |||
} | |||
public Integer getCode() { | |||
return code; | |||
} | |||
public String getMessage() { | |||
return message; | |||
} | |||
} |
@@ -0,0 +1,52 @@ | |||
package com.iformall.enums; | |||
import com.iformall.common.ErrorCode; | |||
import com.iformall.exception.MallinkException; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
/** | |||
* Created by Stormeye on 2018/08/09. | |||
*/ | |||
public enum EnumProductType { | |||
product_1(1, "充值金币"), | |||
; | |||
public static EnumProductType getEnum(Integer code) { | |||
for (EnumProductType value : values()) { | |||
if (value.getCode().equals(code)) { | |||
return value; | |||
} | |||
} | |||
return null; | |||
} | |||
public static List<Integer> getAllCodes(){ | |||
List<Integer> codes = new ArrayList<>(); | |||
for (EnumProductType value : values()) { | |||
codes.add(value.getCode()); | |||
} | |||
return codes; | |||
} | |||
private Integer code; | |||
private String message; | |||
EnumProductType(Integer code, String message) { | |||
this.code = code; | |||
this.message = message; | |||
} | |||
public Integer getCode() { | |||
return code; | |||
} | |||
public String getMessage() { | |||
return message; | |||
} | |||
} |
@@ -0,0 +1,36 @@ | |||
package com.iformall.enums; | |||
/** | |||
* Created by Stormeye on 2018/08/09. | |||
*/ | |||
public enum EnumProfitSharing { | |||
PROFIT_SHARING(0, "无需分账"), | |||
PROFIT_SHARING_MAST(1, "需要分账"), | |||
PROFIT_SHARING_FINISH(2, "已经分账"), | |||
; | |||
public static EnumProfitSharing getEnum(Integer code) { | |||
for (EnumProfitSharing value : values()) { | |||
if (value.getCode().equals(code)) { | |||
return value; | |||
} | |||
} | |||
return null; | |||
} | |||
private Integer code; | |||
private String message; | |||
EnumProfitSharing(Integer code, String message) { | |||
this.code = code; | |||
this.message = message; | |||
} | |||
public Integer getCode() { | |||
return code; | |||
} | |||
public String getMessage() { | |||
return message; | |||
} | |||
} |
@@ -0,0 +1,41 @@ | |||
package com.iformall.enums; | |||
/** | |||
* @author Stormeye | |||
*/ | |||
public enum EnumProject { | |||
PROJECT_1(1,"邃芒慧播"),//直播 | |||
PROJECT_2(2,"邃芒慧影"),//数字人视频 | |||
PROJECT_3(3,"邃芒慧语"),//照片说话 | |||
PROJECT_4(4,"邃芒慧侃"),//实时对话 | |||
PROJECT_5(5,"邃芒智象"),//数字人分身 | |||
; | |||
public static EnumProject getEnum(Integer code) { | |||
for (EnumProject value : values()) { | |||
if (value.getCode().equals(code)) { | |||
return value; | |||
} | |||
} | |||
return null; | |||
} | |||
private Integer code; | |||
private String message; | |||
EnumProject(Integer code, String message) { | |||
this.code = code; | |||
this.message = message; | |||
} | |||
public Integer getCode() { | |||
return code; | |||
} | |||
public String getMessage() { | |||
return message; | |||
} | |||
} |
@@ -0,0 +1,42 @@ | |||
package com.iformall.enums; | |||
/** | |||
* Created by Stormeye on 2018/08/09. | |||
*/ | |||
public enum EnumPropertyLogType { | |||
REGISTER(1,"注册"), | |||
INVITE(2,"邀请"), | |||
RECHARGE(3, "充值"), | |||
// CONSUMPTION(4, "消费"), | |||
//智象 | |||
CONSUMPTION_10(10, "生成照片"), | |||
CONSUMPTION_11(11, "照片超分"), | |||
; | |||
public static EnumPropertyLogType getEnum(Integer code) { | |||
for (EnumPropertyLogType value : values()) { | |||
if (value.getCode().equals(code)) { | |||
return value; | |||
} | |||
} | |||
return null; | |||
} | |||
private Integer code; | |||
private String message; | |||
EnumPropertyLogType(Integer code, String message) { | |||
this.code = code; | |||
this.message = message; | |||
} | |||
public Integer getCode() { | |||
return code; | |||
} | |||
public String getMessage() { | |||
return message; | |||
} | |||
} |
@@ -0,0 +1,40 @@ | |||
package com.iformall.enums; | |||
/** | |||
* @author Stormeye | |||
*/ | |||
public enum EnumUserBasicFrom { | |||
FROM_1(1,"系统邀请码"), | |||
FROM_2(2,"会员邀请码"), | |||
FROM_3(3,"会员邀请"),//包括会员二维码邀请,邀请链接 | |||
; | |||
public static EnumUserBasicFrom getEnum(Integer code) { | |||
for (EnumUserBasicFrom value : values()) { | |||
if (value.getCode().equals(code)) { | |||
return value; | |||
} | |||
} | |||
return null; | |||
} | |||
private Integer code; | |||
private String message; | |||
EnumUserBasicFrom(Integer code, String message) { | |||
this.code = code; | |||
this.message = message; | |||
} | |||
public Integer getCode() { | |||
return code; | |||
} | |||
public String getMessage() { | |||
return message; | |||
} | |||
} |
@@ -1,50 +0,0 @@ | |||
package com.iformall.mapper; | |||
import com.iformall.common.CommonMapper; | |||
import com.iformall.domain.po.AliBusinessCircleOrder; | |||
import com.iformall.domain.po.BusinessCircleBase; | |||
import org.apache.ibatis.annotations.Param; | |||
import java.util.Date; | |||
import java.util.List; | |||
public interface AliBusinessCircleOrderMapper extends CommonMapper<AliBusinessCircleOrder, Long> { | |||
List<AliBusinessCircleOrder> findList(AliBusinessCircleOrder record); | |||
AliBusinessCircleOrder getById(AliBusinessCircleOrder record); | |||
AliBusinessCircleOrder getOrderByTransactionId(AliBusinessCircleOrder record); | |||
AliBusinessCircleOrder getRefundOrderByRefundId(AliBusinessCircleOrder record); | |||
List<AliBusinessCircleOrder> getRefundOrderByTransactionId(AliBusinessCircleOrder record); | |||
/** | |||
* 成功通知新建 | |||
* @param record | |||
*/ | |||
void insertNoticeOrder(AliBusinessCircleOrder record); | |||
/** | |||
* 加积分 | |||
* @param record | |||
*/ | |||
void updatePoints(AliBusinessCircleOrder record); | |||
/** | |||
* 退款 | |||
* @param record | |||
*/ | |||
void insertRefundNoticeOrder(AliBusinessCircleOrder record); | |||
/** | |||
* 修改正常订单状态 | |||
* @param record | |||
*/ | |||
void updateOrderStatus(AliBusinessCircleOrder record); | |||
Integer sumCirclePayment(BusinessCircleBase record); | |||
Integer sumCircleRefundAmount(BusinessCircleBase circleOrder); | |||
} |
@@ -0,0 +1,22 @@ | |||
package com.iformall.mapper; | |||
import com.iformall.common.CommonMapper; | |||
import com.iformall.domain.po.sm.DigitalAvatarMould; | |||
import org.apache.ibatis.annotations.Param; | |||
import java.util.List; | |||
public interface DigitalAvatarMouldMapper extends CommonMapper<DigitalAvatarMould, Long> { | |||
List<DigitalAvatarMould> findList(DigitalAvatarMould record); | |||
int deleteById(@Param("id")Long id); | |||
/** | |||
* c端列表查询,尽量减少字段 | |||
* @param record | |||
* @return | |||
*/ | |||
List<DigitalAvatarMould> findCList(DigitalAvatarMould record); | |||
} |
@@ -1,12 +1,8 @@ | |||
package com.iformall.mapper; | |||
import com.iformall.common.CommonMapper; | |||
import com.iformall.domain.po.AliBusinessCircleOrder; | |||
import com.iformall.domain.po.sm.InviteCode; | |||
import com.iformall.service.sm.InviteCodeService; | |||
import org.apache.ibatis.annotations.Param; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
public interface InviteCodeMapper extends CommonMapper<InviteCode, Long> { | |||
@@ -0,0 +1,12 @@ | |||
package com.iformall.mapper; | |||
import com.iformall.common.CommonMapper; | |||
import com.iformall.domain.po.Product; | |||
import java.util.List; | |||
public interface ProductMapper extends CommonMapper<Product, Long>{ | |||
List<Product> findList(Product record); | |||
} |
@@ -0,0 +1,13 @@ | |||
package com.iformall.mapper; | |||
import com.iformall.common.CommonMapper; | |||
import com.iformall.domain.po.ProductOrder; | |||
import java.util.List; | |||
public interface ProductOrderMapper extends CommonMapper<ProductOrder, Long> { | |||
List<ProductOrder> findList(ProductOrder record); | |||
int orderPayUpdStatus(ProductOrder productOrder); | |||
} |
@@ -0,0 +1,12 @@ | |||
package com.iformall.mapper; | |||
import com.iformall.common.CommonMapper; | |||
import com.iformall.domain.po.ProductOrderSharing; | |||
import java.util.List; | |||
public interface ProductOrderSharingMapper extends CommonMapper<ProductOrderSharing, Long>{ | |||
List<ProductOrderSharing> findList(ProductOrderSharing record); | |||
} |
@@ -0,0 +1,12 @@ | |||
package com.iformall.mapper; | |||
import com.iformall.common.CommonMapper; | |||
import com.iformall.domain.po.UserBasicFrom; | |||
import java.util.List; | |||
public interface UserBasicFromMapper extends CommonMapper<UserBasicFrom, Long>{ | |||
List<UserBasicFrom> findList(UserBasicFrom record); | |||
} |
@@ -0,0 +1,12 @@ | |||
package com.iformall.mapper; | |||
import com.iformall.common.CommonMapper; | |||
import com.iformall.domain.po.UserBasicGlodConfig; | |||
import java.util.List; | |||
public interface UserBasicGlodConfigMapper extends CommonMapper<UserBasicGlodConfig, Long>{ | |||
List<UserBasicGlodConfig> findList(UserBasicGlodConfig record); | |||
} |
@@ -0,0 +1,13 @@ | |||
package com.iformall.mapper; | |||
import com.iformall.common.CommonMapper; | |||
import com.iformall.domain.po.UserBasicImage; | |||
import com.iformall.domain.po.UserBasicProperty; | |||
import java.util.List; | |||
public interface UserBasicImageMapper extends CommonMapper<UserBasicImage, Long>{ | |||
List<UserBasicImage> findList(UserBasicImage record); | |||
} |
@@ -0,0 +1,12 @@ | |||
package com.iformall.mapper; | |||
import com.iformall.common.CommonMapper; | |||
import com.iformall.domain.po.UserBasicPropertyLog; | |||
import java.util.List; | |||
public interface UserBasicPropertyLogMapper extends CommonMapper<UserBasicPropertyLog, Long>{ | |||
List<UserBasicPropertyLog> findList(UserBasicPropertyLog record); | |||
} |
@@ -0,0 +1,16 @@ | |||
package com.iformall.mapper; | |||
import com.iformall.common.CommonMapper; | |||
import com.iformall.domain.po.UserBasicProperty; | |||
import java.util.List; | |||
public interface UserBasicPropertyMapper extends CommonMapper<UserBasicProperty, Long>{ | |||
List<UserBasicProperty> findList(UserBasicProperty record); | |||
int addGlod(UserBasicProperty record); | |||
int reduceGlod(UserBasicProperty record); | |||
} |
@@ -0,0 +1,12 @@ | |||
package com.iformall.mapper; | |||
import com.iformall.common.CommonMapper; | |||
import com.iformall.domain.po.UserBasicQrcode; | |||
import java.util.List; | |||
public interface UserBasicQrcodeMapper extends CommonMapper<UserBasicQrcode, Long>{ | |||
List<UserBasicQrcode> findList(UserBasicQrcode record); | |||
} |
@@ -0,0 +1,24 @@ | |||
package com.iformall.mapper; | |||
import com.iformall.common.CommonMapper; | |||
import com.iformall.domain.po.sm.UserDigitalAvatarOrder; | |||
import org.apache.ibatis.annotations.Param; | |||
import java.util.List; | |||
public interface UserDigitalAvatarOrderMapper extends CommonMapper<UserDigitalAvatarOrder, Long> { | |||
List<UserDigitalAvatarOrder> findList(UserDigitalAvatarOrder record); | |||
int deleteById(@Param("id")Long id); | |||
/** | |||
* c端列表查询,尽量减少字段 | |||
* @param record | |||
* @return | |||
*/ | |||
List<UserDigitalAvatarOrder> findCList(UserDigitalAvatarOrder record); | |||
int findCount(@Param("orderId")Long orderId); | |||
} |
@@ -0,0 +1,22 @@ | |||
package com.iformall.mapper; | |||
import com.iformall.common.CommonMapper; | |||
import com.iformall.domain.po.sm.UserDigitalAvatarPhoto; | |||
import org.apache.ibatis.annotations.Param; | |||
import java.util.List; | |||
public interface UserDigitalAvatarPhotoMapper extends CommonMapper<UserDigitalAvatarPhoto, Long> { | |||
List<UserDigitalAvatarPhoto> findList(UserDigitalAvatarPhoto record); | |||
int deleteById(@Param("id")Long id); | |||
/** | |||
* c端列表查询,尽量减少字段 | |||
* @param record | |||
* @return | |||
*/ | |||
List<UserDigitalAvatarPhoto> findCList(UserDigitalAvatarPhoto record); | |||
} |
@@ -1,53 +0,0 @@ | |||
package com.iformall.mapper; | |||
import com.iformall.common.CommonMapper; | |||
import com.iformall.domain.po.BusinessCircleBase; | |||
import com.iformall.domain.po.WxBusinessCircleOrder; | |||
import org.apache.ibatis.annotations.Param; | |||
import java.util.Date; | |||
import java.util.List; | |||
public interface WxBusinessCircleOrderMapper extends CommonMapper<WxBusinessCircleOrder, Long> { | |||
List<WxBusinessCircleOrder> findList(WxBusinessCircleOrder record); | |||
WxBusinessCircleOrder getById(WxBusinessCircleOrder record); | |||
WxBusinessCircleOrder getOrderByTransactionId(WxBusinessCircleOrder record); | |||
WxBusinessCircleOrder getRefundOrderByRefundId(WxBusinessCircleOrder record); | |||
List<WxBusinessCircleOrder> getRefundOrderByTransactionId(WxBusinessCircleOrder record); | |||
/** | |||
* 成功通知新建 | |||
* @param record | |||
*/ | |||
void insertNoticeOrder(WxBusinessCircleOrder record); | |||
/** | |||
* 加积分 | |||
* @param record | |||
*/ | |||
void updatePoints(WxBusinessCircleOrder record); | |||
/** | |||
* 积分同步状态修改 | |||
*/ | |||
void updateIsPointsNotify(WxBusinessCircleOrder record); | |||
/** | |||
* 退款通知新建 | |||
* @param record | |||
*/ | |||
void insertRefundNoticeOrder(WxBusinessCircleOrder record); | |||
/** | |||
* 修改正常订单状态 | |||
* @param record | |||
*/ | |||
void updateOrderStatus(WxBusinessCircleOrder record); | |||
Integer sumCirclePayment(BusinessCircleBase record); | |||
Integer sumCircleRefundAmount(BusinessCircleBase circleOrder); | |||
} |
@@ -47,6 +47,4 @@ public interface WxCUserMapper extends CommonMapper<WxCUser, Long> { | |||
List<String> findTokenList(@Param("id")Long id,@Param("userId")Long userId, @Param("tenantId")String tenantId); | |||
List<UserStructureVo> findCountData(WxCUserBasicInfoDto dto); | |||
void updateAuthorizeStateByOpenId(WxCUser updCuser); | |||
} |
@@ -9,7 +9,7 @@ import java.util.List; | |||
public interface WxCVideoMapper extends CommonMapper<WxCVideoTable, String> { | |||
List<WxCVideoTable> getById(Long id); | |||
List<WxCVideoTable> getById(Long id); | |||
WxCVideoTable selectOne(Long id, long resource_id); | |||
@@ -1,51 +0,0 @@ | |||
package com.iformall.mapper; | |||
import com.iformall.common.CommonMapper; | |||
import com.iformall.domain.po.BusinessCircleBase; | |||
import com.iformall.domain.po.WxThirdPartyOrders; | |||
import com.iformall.domain.vo.WxThirdPartyOrdersVo; | |||
import java.util.List; | |||
public interface WxThirdPartyOrdersMapper extends CommonMapper<WxThirdPartyOrders, Long> { | |||
List<WxThirdPartyOrders> findList(WxThirdPartyOrders record); | |||
List<WxThirdPartyOrdersVo> findListVo(WxThirdPartyOrders circleOrder); | |||
WxThirdPartyOrders getById(WxThirdPartyOrders record); | |||
WxThirdPartyOrders getOrderByTransactionId(WxThirdPartyOrders record); | |||
WxThirdPartyOrders getRefundOrderByRefundId(WxThirdPartyOrders record); | |||
List<WxThirdPartyOrders> getRefundOrderByTransactionId(WxThirdPartyOrders record); | |||
/** | |||
* 成功通知新建 | |||
* @param record | |||
*/ | |||
void insertNoticeOrder(WxThirdPartyOrders record); | |||
/** | |||
* 加积分 | |||
* @param record | |||
*/ | |||
void updatePoints(WxThirdPartyOrders record); | |||
/** | |||
* 退款 | |||
* @param record | |||
*/ | |||
void insertRefundNoticeOrder(WxThirdPartyOrders record); | |||
/** | |||
* 修改正常订单状态 | |||
* @param record | |||
*/ | |||
void updateOrderStatus(WxThirdPartyOrders record); | |||
Integer sumCirclePayment(BusinessCircleBase record); | |||
Integer sumCircleRefundAmount(BusinessCircleBase circleOrder); | |||
} |
@@ -23,9 +23,7 @@ import com.iformall.service.pay.service.pay.wx.sft.entity.SFTCombineCloseReq; | |||
import com.iformall.service.pay.service.pay.wx.sft.entity.SFTCombinePayCommonMiniAppReq; | |||
import com.iformall.service.pay.service.pay.wx.sft.entity.SFTPayCommonMiniAppReq; | |||
import com.iformall.service.pay.service.pay.wx.sft.entity.SFTPayQueryReq; | |||
import com.iformall.service.pay.service.pay.wx.v3.entity.V3CombinePayCommonMiniAppReq; | |||
import com.iformall.service.pay.service.pay.wx.v3.entity.V3PayCommonMiniAppReq; | |||
import com.iformall.service.pay.service.pay.wx.v3.entity.V3PayQueryReq; | |||
import com.iformall.service.pay.service.pay.wx.v3.entity.*; | |||
import com.iformall.service.pay.service.refund.wx.v3.entity.V3PayRefundReq; | |||
import com.iformall.service.pay.service.share.wx.v3.entity.V3PayShareQueryReq; | |||
import com.iformall.service.pay.service.share.wx.v3.entity.V3PayShareReq; | |||
@@ -42,11 +40,17 @@ public class WxPayV3 { | |||
private static final String MERCHANT_TRANSFER_CHANGE_URL = "https://api.mch.weixin.qq.com/v3/transfer/batches"; | |||
//查询商家转账到零钱 | |||
private static final String MERCHANT_TRANSFER_QUERY_URL = "https://api.mch.weixin.qq.com/v3/transfer/batches/out-batch-no/%s"; | |||
//小程序下单-(单商户模式) | |||
private static final String PAY_MINIAPP_URL = "https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi"; | |||
//小程序下单-普通支付 | |||
private static final String PAY_COMMON_MINIAPP_URL = "https://api.mch.weixin.qq.com/v3/pay/partner/transactions/jsapi"; | |||
//小程序下单-普通支付-查询(单商户模式) | |||
private static final String PAY_QUERY_URL = "https://api.mch.weixin.qq.com/v3/pay/transactions/out-trade-no/%s"; | |||
//小程序下单-普通支付-查询 | |||
private static final String PAY_COMMON_QUERY_URL = "https://api.mch.weixin.qq.com/v3/pay/partner/transactions/out-trade-no/%s"; | |||
//小程序下单-合单支付 | |||
private static final String PAY_COMBINE_MINIAPP_URL = "https://api.mch.weixin.qq.com/v3/combine-transactions/jsapi"; | |||
//小程序下单-合单支付-查询 | |||
@@ -105,11 +109,6 @@ public class WxPayV3 { | |||
* 注意:1. 需要登录到特约商户号自己的商户后台,产品中心---APPID账号管理----我关联的appId账号,把C端小程序关联 | |||
* 2. 需要设置白名单IP | |||
* 3.微信不能开通运营账户,如果运营账户开通,则资金会从运营账户里面扣取,不会从基本账户扣取 | |||
* @param params | |||
* 请求参数 | |||
* @param certPath | |||
* 证书文件目录 | |||
* @param certPassword | |||
* 证书密码 | |||
* @return {String} | |||
* @throws WxPayException | |||
@@ -129,12 +128,6 @@ public class WxPayV3 { | |||
/** | |||
* 查询商家转账到零钱 | |||
* https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter4_3_5.shtml | |||
* @param params | |||
* 请求参数 | |||
* @param certPath | |||
* 证书文件目录 | |||
* @param certPassword | |||
* 证书密码 | |||
* @return {String} | |||
* @throws WxPayException | |||
*/ | |||
@@ -143,6 +136,14 @@ public class WxPayV3 { | |||
param.put("need_query_detail", false); | |||
return payService.postV3WithWechatpaySerial(String.format(MERCHANT_TRANSFER_QUERY_URL, batchNo), JSON.toJSONString(param)); | |||
} | |||
/** | |||
* 普通支付-小程序下单 https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_5_1.shtml | |||
* @throws WxPayException | |||
*/ | |||
public static String payCommonWithMiniApp(WxPayService payService, V3CreatePayReq payReq) throws WxPayException { | |||
return payService.postV3WithWechatpaySerial(PAY_MINIAPP_URL, JSON.toJSONString(payReq)); | |||
} | |||
/** | |||
* 普通支付-小程序下单 https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_5_1.shtml | |||
@@ -151,6 +152,14 @@ public class WxPayV3 { | |||
public static String payCommonWithMiniApp(WxPayService payService,V3PayCommonMiniAppReq payReq) throws WxPayException { | |||
return payService.postV3WithWechatpaySerial(PAY_COMMON_MINIAPP_URL, JSON.toJSONString(payReq)); | |||
} | |||
/** | |||
* 普通支付-查询https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_5_2.shtml | |||
* @throws WxPayException | |||
*/ | |||
public static String payQuery(WxPayService payService, V3PayQuery payQuery) throws WxPayException { | |||
return payService.getV3WithWechatPaySerial(String.format(PAY_QUERY_URL, payQuery.getOut_trade_no())+"?mchid="+payQuery.getMchid()); | |||
} | |||
/** | |||
* 普通支付-查询https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_5_2.shtml | |||
@@ -1,60 +0,0 @@ | |||
package com.iformall.service; | |||
import com.github.pagehelper.PageInfo; | |||
import com.iformall.common.ResultData; | |||
import com.iformall.domain.po.AliBusinessCircleOrder; | |||
import com.iformall.domain.po.BusinessCircleBase; | |||
import com.iformall.domain.po.WxMerchant; | |||
import com.iformall.domain.po.base.TenantEntity; | |||
import javax.servlet.http.HttpServletRequest; | |||
import javax.servlet.http.HttpServletResponse; | |||
import java.util.List; | |||
public interface AliBusinessCircleOrderService { | |||
/** | |||
* 根据实体查询分页列表 | |||
* | |||
* @param record | |||
* @param pageIndex | |||
* @param pageSize | |||
* @return | |||
*/ | |||
PageInfo<AliBusinessCircleOrder> listAsPage(AliBusinessCircleOrder record, Integer pageIndex, Integer pageSize); | |||
/** | |||
* id+tenantId | |||
* @param | |||
* @return | |||
*/ | |||
AliBusinessCircleOrder getById(Long id, String tenantId); | |||
AliBusinessCircleOrder detail(Long id, TenantEntity tenantInfo); | |||
/** | |||
* transactionId+tenantId | |||
* @param | |||
* @return | |||
*/ | |||
AliBusinessCircleOrder getOrderByTransactionId(String transactionId, String tenantId); | |||
AliBusinessCircleOrder getRefundOrderByRefundId(String refundId, String tenantId); | |||
List<AliBusinessCircleOrder> getRefundOrderByTransactionId(String transactionId, String tenantId); | |||
ResultData createOrder(WxMerchant wxMerchant, AliBusinessCircleOrder record); | |||
ResultData insertRefundNoticeOrder(WxMerchant wxMerchant, AliBusinessCircleOrder record); | |||
/** | |||
* 积分 | |||
* @param record | |||
*/ | |||
void updatePoints(AliBusinessCircleOrder record); | |||
void exportData(AliBusinessCircleOrder circleOrder, HttpServletRequest request, HttpServletResponse response); | |||
Integer sumCirclePayment(BusinessCircleBase circleOrder); | |||
Integer sumCircleRefundAmount(BusinessCircleBase circleOrder); | |||
} |
@@ -11,8 +11,6 @@ public interface CUserTokenService { | |||
* @return | |||
*/ | |||
BaseCUserEntity getByToken(String token); | |||
BaseCUserEntity getBByToken(String token); | |||
void removeTokenCache(String token); | |||