zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/weixinUtil/WeixinServiceUtil.java | ●●●●● patch | view | raw | blame | history | |
zq-erp/src/main/java/com/matrix/system/common/actions/TestAction.java | ●●●●● patch | view | raw | blame | history | |
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesProductAction.java | ●●●●● patch | view | raw | blame | history | |
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopProduct.java | ●●●●● patch | view | raw | blame | history | |
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SaleProductDto.java | ●●●●● patch | view | raw | blame | history | |
zq-erp/src/test/java/com/matrix/SourceFlowTests.java | ●●●●● patch | view | raw | blame | history |
zq-erp/src/main/java/com/matrix/component/wechat/externalInterface/weixinUtil/WeixinServiceUtil.java
@@ -142,17 +142,15 @@ * @param openid * @return */ public JsApiPayComResData comPay(String desc, String outTradeNo,int totalFee, String openid){ public JsApiPayComResData comPay(String desc, String outTradeNo,int totalFee, String openid,Long companyId){ JsApiPayComResData result=null; //boolean flag=false; try { JsApiPayBusiness jsApiPayBusiness = new JsApiPayBusiness(); // TODO 企业付款 Long companyId=HostInterceptor.getCompanyId(); BusParameterSettings mchID = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_MCHID, companyId); BusParameterSettings paySecret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_SECRET, companyId); JsApiPayComReqData jsApiPayComReqData=new JsApiPayComReqData(mchID.getParamValue(),paySecret.getParamValue(),"","",0,"","",""); JsApiPayComService jsApiPayComService=new JsApiPayComService(); result = jsApiPayBusiness.payComOrder(jsApiPayComService, jsApiPayComReqData); zq-erp/src/main/java/com/matrix/system/common/actions/TestAction.java
New file @@ -0,0 +1,32 @@ package com.matrix.system.common.actions; import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil; import com.matrix.core.pojo.AjaxResult; import com.matrix.core.web.BaseAction; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; /** * 测试一下 */ @RequestMapping(value = "/test") @Controller public class TestAction extends BaseAction { @Autowired WeixinServiceUtil weixinServiceUtil; @GetMapping(value = "/testPay") @ResponseBody public AjaxResult hiveMobileLoginOut() { weixinServiceUtil.comPay("提现","TX123",1,"oJkRK4yelehsY4S7I6Ee1ydWtQMI",36L); return AjaxResult.buildSuccessInstance(""); } } zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesProductAction.java
New file @@ -0,0 +1,65 @@ package com.matrix.system.shopXcx.api.action; import com.matrix.core.pojo.AjaxResult; import com.matrix.system.common.constance.AppConstance; import com.matrix.system.common.interceptor.HostInterceptor; import com.matrix.system.shopXcx.api.dto.SaleProductDto; import com.matrix.system.shopXcx.bean.ShopProduct; import com.matrix.system.shopXcx.bean.ShopProductAttribute; import com.matrix.system.shopXcx.dao.ShopProductAttributeDao; import com.matrix.system.shopXcx.dao.ShopProductDao; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** * @author jyy * @date 2021-03-10 **/ @Api(tags = "分销商品类") @RestController @RequestMapping(value = "/wxapi/salesProduct") public class WxSalesProductAction { @Autowired private ShopProductDao shopProductDao; @Autowired private ShopProductAttributeDao shopProductAttributeDao; @ApiOperation(value = "查询推广商品", notes = "") @PostMapping(value = "/getSalesProductList") @ApiResponses({ @ApiResponse(code = 200, message = "ok", response=SaleProductDto.class) }) public AjaxResult getShopProductShowList(@RequestBody @Validated SaleProductDto saleProductDto) { ShopProduct shopProduct=new ShopProduct(); ShopProductAttribute fxsc = shopProductAttributeDao.selectByCode("fxsc", HostInterceptor.getCompanyId()); shopProduct.setLimit(saleProductDto.getPageSize()); shopProduct.setOffset(saleProductDto.getPageNum()* saleProductDto.getPageSize()); shopProduct.setDelFlag(AppConstance.DATA_USEABLE); shopProduct.setStatus(AppConstance.IS_PUTAWAY); shopProduct.setCompanyId(HostInterceptor.getCompanyId()); shopProduct.setAttrs(fxsc.getAttrId()+""); List<ShopProduct> shopProducts = shopProductDao.selectByModelWx(shopProduct); AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, shopProducts); return result; } } zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopProduct.java
@@ -1,18 +1,15 @@ package com.matrix.system.shopXcx.api.action; import com.matrix.core.pojo.AjaxResult; import com.matrix.core.pojo.PaginationVO; import com.matrix.core.tools.StringUtils; import com.matrix.biz.bean.BizUser; import com.matrix.system.common.bean.CustomerDataDictionary; import com.matrix.system.common.dao.CustomerDataDictionaryDao; import com.matrix.component.redis.RedisUserLoginUtils; import com.matrix.core.pojo.AjaxResult; import com.matrix.core.tools.StringUtils; import com.matrix.system.common.constance.AppConstance; import com.matrix.system.common.dao.CustomerDataDictionaryDao; import com.matrix.system.common.interceptor.HostInterceptor; import com.matrix.system.shopXcx.api.service.WxShopCouponService; import com.matrix.system.shopXcx.bean.*; import com.matrix.system.shopXcx.dao.*; import com.matrix.system.shopXcx.api.service.WxShopCouponService; import org.apache.commons.collections.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -93,7 +90,6 @@ List<ShopProductAttrRef> shopProductAttrRefs = shopProductAttrRefDao.selectByPid(id); List<ShopProductImg> shopProductImgs = shopProductImgDao.selectByPid(id); List<ShopSku> shopSkus = shopSkuDao.selectByPid(id); // List<ShopSku> shopSkus = shopSkuDao.selectByPidAndShopid(id, shopId); List<ShopProductParamRef> shopProductParamRefs = shopProductParamRefDao.selectByPid(id); shopProduct.setAttrRefs(shopProductAttrRefs); shopProduct.setProductImgs(shopProductImgs); zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SaleProductDto.java
New file @@ -0,0 +1,18 @@ package com.matrix.system.shopXcx.api.dto; import com.matrix.core.pojo.BasePageQueryDto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel(value = "SaleProductDto", description = "分销产品查询参数接收类") public class SaleProductDto extends BasePageQueryDto { @ApiModelProperty(value = "产品分类", example = "1") private Integer categoryId; } zq-erp/src/test/java/com/matrix/SourceFlowTests.java
@@ -2,6 +2,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.matrix.component.rabbitmq.RabiitMqTemplate; import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil; import com.matrix.config.RabbitMqConfig; import com.matrix.core.tools.StringUtils; import com.matrix.system.fenxiao.dao.ShopSalesmanApplyDao; @@ -54,6 +55,18 @@ @Autowired RabiitMqTemplate rabiitMqTemplate; @Autowired WeixinServiceUtil weixinServiceUtil; /** * 企业付款到个人 * @throws InterruptedException */ @Test public void testPay() throws InterruptedException { weixinServiceUtil.comPay("提现","TX123",1,"oJkRK4yelehsY4S7I6Ee1ydWtQMI",36L); } /**