Merge branch 'score_shop' of http://120.27.238.55:7000/r/beauty-erp into score_shop
5 files added
13 files modified
| | |
| | | |
| | | import com.matrix.component.wechat.externalInterface.common.RandomStringGenerator; |
| | | import com.matrix.component.wechat.externalInterface.common.Signature; |
| | | import com.matrix.component.wechat.externalInterface.common.WechatConfigure; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.util.HashMap; |
| | |
| | | /** |
| | | * 商户号 |
| | | */ |
| | | private String mch_id = ""; |
| | | private String mchid = ""; |
| | | |
| | | private String mch_appid = ""; |
| | | |
| | | /** |
| | | * 商户企业付款单号 |
| | | */ |
| | | private String partner_trade_no = ""; |
| | | |
| | | /** |
| | | * 随机字符串 |
| | | */ |
| | | private String nonce_str = ""; |
| | | |
| | | |
| | | private String check_name = ""; |
| | | |
| | | |
| | | /** |
| | | * 签名 |
| | | */ |
| | | private String sign = ""; |
| | | /** |
| | | * 收款方银行卡号 |
| | | */ |
| | | private String enc_bank_no = ""; |
| | | /** |
| | | * 收款方用户名 |
| | | */ |
| | | private String enc_true_name = ""; |
| | | /** |
| | | * 收款方开户行 |
| | | */ |
| | | private String bank_code = ""; |
| | | |
| | | /** |
| | | * 付款金额 RMB(分) |
| | | */ |
| | |
| | | * 备注 |
| | | */ |
| | | private String desc = ""; |
| | | |
| | | private String openid = ""; |
| | | |
| | | |
| | | public JsApiPayComReqData() { |
| | |
| | | * @param desc 描述 |
| | | * @param outTradeNo 商户企业付款单号 |
| | | * @param totalFee 付款金额 |
| | | * @param bankNo 银行卡号 |
| | | * @param bankTrueName 收款号姓名 |
| | | * @param bankCode 收款号开户行 |
| | | */ |
| | | public JsApiPayComReqData(String mchID,String paySecret ,String desc, String outTradeNo, int totalFee, String bankNo, String bankTrueName, String bankCode) { |
| | | public JsApiPayComReqData(String mchID,String mch_appid,String paySecret ,String desc, String outTradeNo, int totalFee, |
| | | String openid, String check_name, String bankCode) { |
| | | setMch_appid(mch_appid); |
| | | //默认必须设置 |
| | | setMch_id(mchID); |
| | | setMchid(mchID); |
| | | setDesc(desc); |
| | | setPartner_trade_no(outTradeNo); |
| | | setAmount(totalFee); |
| | | setOpenid(openid); |
| | | setCheck_name(check_name); |
| | | //随机字符串,不长于32 位 |
| | | setNonce_str(RandomStringGenerator.getRandomStringByLength(32)); |
| | | //根据API给的签名规则进行签名 【 必须要放在本方法的最后】 |
| | | String sign = Signature.getSign(toMap(),paySecret); |
| | | setSign(sign);//把签名数据设置到Sign这个属性中 |
| | | // setEnc_bank_no(); |
| | | // setEnc_true_name(); |
| | | // setBank_code(); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | public String getMch_id() { |
| | | return mch_id; |
| | | public String getMch_appid() { |
| | | return mch_appid; |
| | | } |
| | | |
| | | public void setMch_id(String mch_id) { |
| | | this.mch_id = mch_id; |
| | | public void setMch_appid(String mch_appid) { |
| | | this.mch_appid = mch_appid; |
| | | } |
| | | |
| | | public String getEnc_bank_no() { |
| | | return enc_bank_no; |
| | | public String getCheck_name() { |
| | | return check_name; |
| | | } |
| | | |
| | | public void setEnc_bank_no(String enc_bank_no) { |
| | | this.enc_bank_no = enc_bank_no; |
| | | public void setCheck_name(String check_name) { |
| | | this.check_name = check_name; |
| | | } |
| | | |
| | | public String getEnc_true_name() { |
| | | return enc_true_name; |
| | | public String getMchid() { |
| | | return mchid; |
| | | } |
| | | |
| | | public void setEnc_true_name(String enc_true_name) { |
| | | this.enc_true_name = enc_true_name; |
| | | } |
| | | |
| | | public String getBank_code() { |
| | | return bank_code; |
| | | } |
| | | |
| | | public void setBank_code(String bank_code) { |
| | | this.bank_code = bank_code; |
| | | public void setMchid(String mchid) { |
| | | this.mchid = mchid; |
| | | } |
| | | |
| | | public String getNonce_str() { |
| | |
| | | this.partner_trade_no = partner_trade_no; |
| | | } |
| | | |
| | | public String getOpenid() { |
| | | return openid; |
| | | } |
| | | |
| | | public void setOpenid(String openid) { |
| | | this.openid = openid; |
| | | } |
| | | |
| | | public int getAmount() { |
| | | return amount; |
| | | } |
| | |
| | | * @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 appId = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_APPID, companyId); |
| | | BusParameterSettings paySecret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_SECRET, companyId); |
| | | |
| | | BusParameterSettings certLocalPath = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_CERTLOCAL_PATH, companyId); |
| | | |
| | | JsApiPayComReqData jsApiPayComReqData=new JsApiPayComReqData(mchID.getParamValue(),paySecret.getParamValue(),"","",0,"","",""); |
| | | JsApiPayComReqData jsApiPayComReqData=new JsApiPayComReqData(mchID.getParamValue(), |
| | | appId.getParamValue(), |
| | | paySecret.getParamValue(), |
| | | desc,outTradeNo,totalFee,openid,"NO_CHECK",""); |
| | | JsApiPayComService jsApiPayComService=new JsApiPayComService(); |
| | | |
| | | HttpsRequest2 request2= (HttpsRequest2) jsApiPayComService.getServiceRequest(); |
| | | request2.setCertLocalPath(certLocalPath.getParamValue()); |
| | | request2.setMchId(mchID.getParamValue()); |
| | | |
| | | |
| | | result = jsApiPayBusiness.payComOrder(jsApiPayComService, jsApiPayComReqData); |
| | | |
| | | LogUtil.info("#提现,企业付款到个人---result:{}",result); |
| | | if (result.getResult_code().equals("SUCCESS")) { |
| | | return result; |
New file |
| | |
| | | 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.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | /** |
| | | * 测试一下 |
| | | */ |
| | | @RequestMapping(value = "/testb") |
| | | @Controller |
| | | public class TestActionBB extends BaseAction { |
| | | |
| | | @Autowired |
| | | WeixinServiceUtil weixinServiceUtil; |
| | | |
| | | |
| | | @GetMapping(value = "/testPay/{no}") |
| | | @ResponseBody |
| | | public AjaxResult hiveMobileLoginOut(@PathVariable String no) { |
| | | weixinServiceUtil.comPay("提现", no,1,"oJkRK4yelehsY4S7I6Ee1ydWtQMI",36L); |
| | | return AjaxResult.buildSuccessInstance(""); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanApplyDao; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanGradeDao; |
| | | import com.matrix.system.fenxiao.dto.*; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | |
| | | private BizUserDao bizUserDao; |
| | | @Autowired |
| | | private ShopSalesmanGradeDao shopSalesmanGradeDao; |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | /** |
| | | * 分销员详情页面信息 |
| | |
| | | } |
| | | |
| | | /** |
| | | *推广图片 |
| | | */ |
| | | @ApiOperation(value = "推广图片") |
| | | @PostMapping(value = "/updateTgtp") |
| | | public @ResponseBody |
| | | AjaxResult updateTgtp(@RequestBody UpdateTgtpDto updateTgtpDto) { |
| | | return shopSalesmanApplyService.updateTgtp(updateTgtpDto); |
| | | } |
| | | |
| | | /** |
| | | *推广图片 |
| | | */ |
| | | @RequestMapping(value = "/loadTgtpSetting") |
| | | public AjaxResult loadTgtpSetting() { |
| | | |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long companyId = user.getCompanyId(); |
| | | |
| | | //推广文案 |
| | | String[] FXKGCode={FenxiaoSettingConstant.FX_TG_POSTER}; |
| | | String[] FXKGName={"推广图片"}; |
| | | List<FenXiaoSettingVo> fxkgRuleSettingsVo = getRuleSettingsVo(FXKGCode,FXKGName,companyId); |
| | | result.putInMap("tgtp", fxkgRuleSettingsVo.get(0)); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *推广计划更新 |
| | | */ |
| | | @ApiOperation(value = "推广计划更新") |
| | | @PostMapping(value = "/updateTgjh") |
| | | public @ResponseBody |
| | | AjaxResult updateTgjh(@RequestBody UpdateTgjhDto updateTgjhDto) { |
| | | return shopSalesmanApplyService.updateTgjh(updateTgjhDto); |
| | | } |
| | | /** |
| | | *查询推广计划 |
| | | */ |
| | | @RequestMapping(value = "/loadTgwaSetting") |
| | | public AjaxResult loadTgwaSetting() { |
| | | |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long companyId = user.getCompanyId(); |
| | | |
| | | //推广文案 |
| | | String[] FXKGCode={FenxiaoSettingConstant.FX_TG_PLAN}; |
| | | String[] FXKGName={"推广文案"}; |
| | | List<FenXiaoSettingVo> fxkgRuleSettingsVo = getRuleSettingsVo(FXKGCode,FXKGName,companyId); |
| | | result.putInMap("tgwa", fxkgRuleSettingsVo.get(0)); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *获取对应的规则设置数据 |
| | | * @param ArrayCode |
| | | * @param ArrayName |
| | | * @param companyId |
| | | * @return |
| | | */ |
| | | private List<FenXiaoSettingVo> getRuleSettingsVo(String[] ArrayCode,String[] ArrayName,Long companyId){ |
| | | List<BusParameterSettings> dataList = busParameterSettingsDao.selectByCodesAndCompanyId(Arrays.asList(ArrayCode), companyId); |
| | | List<FenXiaoSettingVo> scoreRuleSettingsVos=new ArrayList<FenXiaoSettingVo>(); |
| | | int index=0; |
| | | for (BusParameterSettings item:dataList){ |
| | | FenXiaoSettingVo paramVo=new FenXiaoSettingVo(); |
| | | BeanUtils.copyProperties(item,paramVo); |
| | | paramVo.setParamName(ArrayName[index]); |
| | | scoreRuleSettingsVos.add(paramVo); |
| | | index++; |
| | | } |
| | | return scoreRuleSettingsVos; |
| | | } |
| | | |
| | | /** |
| | | * 分佣方案 |
| | | */ |
| | | @ApiOperation(value = "查询分佣方案") |
| | |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanOrder; |
| | | import com.matrix.system.shopXcx.api.dto.SaleOrderDto; |
| | | import com.matrix.system.shopXcx.vo.SalesOrderVo; |
| | | import io.lettuce.core.dynamic.annotation.Param; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @description 分销订单 |
| | |
| | | * @param saleOrderDto |
| | | * @return |
| | | */ |
| | | IPage<SalesOrderVo> selectSalesManOrder(Page<SalesOrderVo> page, @Param("record") SaleOrderDto saleOrderDto); |
| | | IPage<SalesOrderVo> selectSalesManOrder(Page<SalesOrderVo> page, @Param("record")SaleOrderDto saleOrderDto); |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "UpdateTgjhDto", description = "参数") |
| | | public class UpdateTgjhDto { |
| | | |
| | | @ApiModelProperty(value = "方案名称") |
| | | private String tgfa; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "UpdateTgjhDto", description = "参数") |
| | | public class UpdateTgtpDto { |
| | | |
| | | @ApiModelProperty(value = "方案名称") |
| | | private String imageUrl; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| | |
| | | import com.matrix.system.fenxiao.dto.ShopSalesmanDetailDto; |
| | | import com.matrix.system.fenxiao.dto.UnbundlingSaleManDto; |
| | | import com.matrix.system.fenxiao.dto.UpdateFyfaDto; |
| | | import com.matrix.system.fenxiao.dto.UpdateTgjhDto; |
| | | import com.matrix.system.fenxiao.dto.UpdateTgtpDto; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanApply; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanGrade; |
| | | import com.matrix.system.fenxiao.vo.FyfaManageVo; |
| | |
| | | if(StrUtil.isEmpty(name)) { |
| | | return AjaxResult.buildFailInstance("请输入方案名称"); |
| | | } |
| | | Double sealesCommission = updateFyfaDto.getSealesCommission(); |
| | | if(StrUtil.isEmpty(sealesCommission.toString())) { |
| | | return AjaxResult.buildFailInstance("请输入正确的推广提成"); |
| | | } |
| | | Double invitationCommission = updateFyfaDto.getInvitationCommission(); |
| | | if(StrUtil.isEmpty(invitationCommission.toString())) { |
| | | return AjaxResult.buildFailInstance("请输入正确的邀请提成"); |
| | | } |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(updateFyfaDto); |
| | | selectById.setCompanyId(updateFyfaDto.getCompanyId()); |
| | |
| | | shopSalesmanGradeDao.updateById(selectById); |
| | | return AjaxResult.buildFailInstance("操作成功"); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult updateTgjh(UpdateTgjhDto updateTgjhDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(updateTgjhDto); |
| | | //获取推广计划的Param |
| | | Long companyId = updateTgjhDto.getCompanyId(); |
| | | BusParameterSettings busParameterSettings = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_TG_PLAN, companyId); |
| | | busParameterSettings.setParamValue3(updateTgjhDto.getTgfa()); |
| | | busParameterSettingsDao.updateByModel(busParameterSettings); |
| | | return AjaxResult.buildFailInstance("保存成功"); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult updateTgtp(UpdateTgtpDto updateTgtpDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(updateTgtpDto); |
| | | //获取推广计划的Param |
| | | Long companyId = updateTgtpDto.getCompanyId(); |
| | | BusParameterSettings busParameterSettings = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_TG_POSTER, companyId); |
| | | busParameterSettings.setParamValue(updateTgtpDto.getImageUrl()); |
| | | busParameterSettingsDao.updateByModel(busParameterSettings); |
| | | return AjaxResult.buildFailInstance("保存成功"); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | 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; |
| | |
| | | private ShopSalesmanOrderDao shopSalesmanOrderDao; |
| | | |
| | | |
| | | @ApiOperation(value = "获取下级列表", notes = "keywords=1 推广订单,keywords=2 邀请订单") |
| | | @ApiOperation(value = "获取推广订单", notes = "") |
| | | @PostMapping(value = "/getOrderList") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = SalesOrderVo.class) |
| | | }) |
| | | AjaxResult getInvitationuserList(@RequestBody SaleOrderDto saleOrderDto) { |
| | | AjaxResult getInvitationuserList(@RequestBody @Validated SaleOrderDto saleOrderDto) { |
| | | BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class); |
| | | Page<SalesOrderVo> page=new Page<>(saleOrderDto.getPageNum(),saleOrderDto.getPageSize()); |
| | | if(StringUtils.isNotBlank(saleOrderDto.getSort())){ |
| | | if(StringUtils.isBlank(saleOrderDto.getSort())){ |
| | | saleOrderDto.setSort("create_time"); |
| | | saleOrderDto.setOrder("desc"); |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | 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; |
| | |
| | | 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); |
New file |
| | |
| | | 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; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | ShopOrder order = shopOrderDao.selectById(Integer.valueOf(orderId)); |
| | | //获取订单详情 |
| | | List<ShopOrderDetails> orderDetails = shopOrderDetailsDao.selectByOrderId(Integer.valueOf(orderId)); |
| | | order.setDetails(orderDetails); |
| | | //处理分销订单 |
| | | handleExtensionOrder(order); |
| | | |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | |
| | | @ApiModelProperty(value = "订单金额") |
| | | private Double orderMoney; |
| | | |
| | | |
| | | @ApiModelProperty(value = " 收益类型1,推广收益,2邀请收益") |
| | | private Integer revenueType; |
| | | |
| | |
| | | where |
| | | a.sales_user_id=#{record.userId} |
| | | and a.revenue_type=#{record.revenueType} |
| | | <if test="orderStatus!=null" > |
| | | <if test="record.orderStatus!=null" > |
| | | and a.order_status=#{record.orderStatus} |
| | | </if> |
| | | order by #{record.sort} #{record.order} |
| | | <if test="record.sort!=null and record.order!=null" > |
| | | order by ${record.sort} ${record.order} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | |
| | | margin: 0px 0px 10px 0px; |
| | | text-align: right; |
| | | } |
| | | .avatar-uploader .el-upload { |
| | | border: 1px dashed #d9d9d9; |
| | | border-radius: 6px; |
| | | cursor: pointer; |
| | | position: relative; |
| | | overflow: hidden; |
| | | } |
| | | .avatar-uploader .el-upload:hover { |
| | | border-color: #409EFF; |
| | | } |
| | | .avatar-uploader-icon { |
| | | font-size: 28px; |
| | | color: #8c939d; |
| | | width: 178px; |
| | | height: 178px; |
| | | line-height: 178px; |
| | | text-align: center; |
| | | } |
| | | .avatar { |
| | | width: 178px; |
| | | height: 178px; |
| | | display: block; |
| | | } |
| | | </style> |
| | | </head> |
| | | |
| | |
| | | type="selection"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="分销员"> |
| | | label="分销员" width="120"> |
| | | <template slot-scope="scope"> |
| | | <img :src="scope.row.avatarUrl" width="40" height="40" class="head_pic"/> |
| | | {{scope.row.nickname}} |
| | |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="parentUser" |
| | | label="邀请人" width="100"> |
| | | label="邀请人"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="lowerLevelNum" |
| | | label="下级客户数" width="100"> |
| | | label="下级客户数"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="totalRevenue" |
| | |
| | | prop="sealesCommission" |
| | | label="推广提成 %"> |
| | | <template slot-scope="scope"> |
| | | <el-input class="edit-input" v-model="scope.row.sealesCommission" oninput ="value=value.replace(/[^0-9.]/g,'')" placeholder="推广提成 %"></el-input> |
| | | <el-input class="edit-input" v-model="scope.row.sealesCommission" oninput ="value=value.replace(/[^0-9.]/g,'')" placeholder="推广提成"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="invitationCommission" |
| | | label="邀请提成 %"> |
| | | <template slot-scope="scope"> |
| | | <el-input class="edit-input" v-model="scope.row.invitationCommission" oninput ="value=value.replace(/[^0-9.]/g,'')" placeholder="邀请提成 %"></el-input> |
| | | <el-input class="edit-input" v-model="scope.row.invitationCommission" oninput ="value=value.replace(/[^0-9.]/g,'')" placeholder="邀请提成"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | </el-tab-pane> |
| | | |
| | | <el-tab-pane label="推广文案" name="third"> |
| | | <el-row> |
| | | <script style="width: 100%; height: 500px" id="description" name="description" |
| | | type="text/plain"></script> |
| | | <p class="el-big-title">文案描述</p> |
| | | <el-row justify="center" type="flex"> |
| | | <script style="height: 400px;width: 375px;" id="description" name="description" |
| | | type="text/plain"> |
| | | </script> |
| | | </el-row> |
| | | <el-row justify="center" type="flex"> |
| | | <el-button type="primary" @click="submit()">保存</el-button> |
| | | <el-button type="primary" size="mini" @click="wamsSubmit()">保存</el-button> |
| | | </el-row> |
| | | </el-tab-pane> |
| | | |
| | | <el-tab-pane label="分享图片上传" name="fourth"> |
| | | <el-row> |
| | | <div class="ibox-content"> |
| | | <form class="form-horizontal" id="dataform" |
| | | onsubmit="javascripr:return false;"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">门店照片</label> |
| | | <div class="col-sm-8"> |
| | | <input autocomplete="off" v-model="fxtp.paramValue" name="shopImag" id="info6" |
| | | class="form-control upload-input" type="text" /> <a |
| | | class="btn btn-primary radius upload-a">选择图片 |
| | | </a> |
| | | </div> |
| | | </div> |
| | | <el-row justify="center" type="flex"> |
| | | <el-button type="primary" @click="submittp(paramValue)">保存</el-button> |
| | | </el-row> |
| | | </form> |
| | | </div> |
| | | <el-tab-pane label="推广图片" name="fourth"> |
| | | <p class="el-big-title">上传图片</p> |
| | | <el-row justify="center" type="flex"> |
| | | <el-upload |
| | | class="avatar-uploader" |
| | | action="/admin/multipleUploadFile/doUpload" |
| | | :show-file-list="false" |
| | | :on-success="handleAvatarSuccess" |
| | | :before-upload="beforeAvatarUpload"> |
| | | <img v-if="imageUrl" :src="imageUrl" class="avatar"> |
| | | <i v-else class="el-icon-plus avatar-uploader-icon"></i> |
| | | </el-upload> |
| | | </el-row> |
| | | <el-row justify="center" type="flex"> |
| | | <el-button type="primary" size="mini" @click="tgtpSubmit()">保存</el-button> |
| | | </el-row> |
| | | </el-tab-pane> |
| | | |
| | |
| | | |
| | | <script> |
| | | //百度编辑器 |
| | | MUI.initImgUpload(".upload-input"); |
| | | var ue = {}; |
| | | var ue = { |
| | | initialFrameWidth :750 |
| | | }; |
| | | var app = new Vue({ |
| | | el: '#app', |
| | | data: { |
| | | height:'calc(100vh - 240px)', |
| | | fxy:[], |
| | | fenxiaoGrade: "", |
| | | tgwa: "", |
| | | activeName: 'first', |
| | | multipleSelection: [], |
| | | fxtp:{}, |
| | | mdjf:[], |
| | | scjf:[], |
| | | fenxiaoGrade: "", |
| | | //推广文案 |
| | | tgwa: {}, |
| | | //图片上传 |
| | | imageUrl: '', |
| | | //分佣方案 |
| | | fyfaList:{ |
| | | rows:[], |
| | |
| | | pageSize:10, |
| | | currentPage:1, |
| | | }, |
| | | |
| | | //分销员管理 |
| | | shenheAgreeType : 2, |
| | | shenheDisagreeType : 3, |
| | |
| | | pageSize:10, |
| | | currentPage:1, |
| | | }, |
| | | height:'calc(100vh - 240px)', |
| | | }, |
| | | |
| | | created: function () { |
| | | this.loadInfo(); |
| | | window.addEventListener("keydown", this.keydown); |
| | | //初始化编辑器 |
| | | ue = UE.getEditor('description'); |
| | | //百度编辑器 |
| | | MUI.initImgUpload(".upload-input"); |
| | | }, |
| | | mounted: function () { |
| | | }, |
| | |
| | | let _this = this; |
| | | _this.loadParamSetting(); |
| | | _this.loadFyfaSetting(); |
| | | _this.loadTgwaSetting(); |
| | | _this.loadTgtpSetting(); |
| | | _this.getSalemanGradeList(); |
| | | }, |
| | | submittp(paramValue) { |
| | | alert(paramValue); |
| | | //推广文案 |
| | | loadTgwaSetting() { |
| | | let _this = this; |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | data:[], |
| | | url: basePath + '/fenXiao/fenXiaoUser/loadTgwaSetting', |
| | | callback: function (data) { |
| | | _this.tgwa = data.mapInfo.tgwa; |
| | | var ue = UE.getEditor('description'); |
| | | ue.ready(function() {//编辑器初始化完成再赋值 |
| | | ue.setContent(_this.tgwa.paramValue3); //赋值给UEditor |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | toggleSelection(rows) { |
| | | if (rows) { |
| | | rows.forEach(row => { |
| | | this.$refs.multipleTable.toggleRowSelection(row); |
| | | }); |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | wamsSubmit(){ |
| | | let _this = this; |
| | | let tgfa = ue.getContent(); |
| | | let data= { |
| | | tgfa:tgfa, |
| | | }; |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | data:data, |
| | | url: basePath + '/fenXiao/fenXiaoUser/updateTgjh', |
| | | callback: function (data) { |
| | | _this.$message.success(data.info); |
| | | _this.loadTgwaSetting(); |
| | | } |
| | | }); |
| | | }, |
| | | //图片上传 |
| | | loadTgtpSetting() { |
| | | let _this = this; |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | data:[], |
| | | url: basePath + '/fenXiao/fenXiaoUser/loadTgtpSetting', |
| | | callback: function (data) { |
| | | _this.imageUrl = data.mapInfo.tgtp.paramValue; |
| | | } |
| | | }); |
| | | }, |
| | | tgtpSubmit(){ |
| | | let _this = this; |
| | | let imageUrl = _this.imageUrl; |
| | | let data= { |
| | | imageUrl:imageUrl, |
| | | }; |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | data:data, |
| | | url: basePath + '/fenXiao/fenXiaoUser/updateTgtp', |
| | | callback: function (data) { |
| | | _this.$message.success(data.info); |
| | | _this.loadTgtpSetting(); |
| | | } |
| | | }); |
| | | }, |
| | | handleAvatarSuccess(res, file) { |
| | | this.imageUrl = URL.createObjectURL(file.raw); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isJPG = file.type === 'image/jpeg'; |
| | | const isLt2M = file.size / 1024 / 1024 < 2; |
| | | |
| | | if (!isJPG) { |
| | | this.$message.error('上传头像图片只能是 JPG 格式!'); |
| | | } |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val; |
| | | }, |
| | | handleClick(row) { |
| | | console.log(row); |
| | | if (!isLt2M) { |
| | | this.$message.error('上传头像图片大小不能超过 2MB!'); |
| | | } |
| | | return isJPG && isLt2M; |
| | | }, |
| | | //分佣方案 |
| | | loadFyfaSetting() { |
| | |
| | | _this.loadParamSetting(); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | submit() { |
| | | } |
| | | } |
| | | }) |
| | |
| | | |
| | | 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; |
| | |
| | | |
| | | @Autowired |
| | | RabiitMqTemplate rabiitMqTemplate; |
| | | @Autowired |
| | | WeixinServiceUtil weixinServiceUtil; |
| | | |
| | | /** |
| | | * 企业付款到个人 |
| | | * @throws InterruptedException |
| | | */ |
| | | @Test |
| | | public void testPay() throws InterruptedException { |
| | | weixinServiceUtil.comPay("提现","TX123",1,"oJkRK4yelehsY4S7I6Ee1ydWtQMI",36L); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |