Merge branch 'score_shop' of http://120.27.238.55:7000/r/beauty-erp into score_shop
3 files added
10 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 check_name = ""; |
| | | /** |
| | | * 商户企业付款单号 |
| | | */ |
| | |
| | | */ |
| | | private String desc = ""; |
| | | |
| | | private String openid = ""; |
| | | |
| | | |
| | | public JsApiPayComReqData() { |
| | | } |
| | |
| | | * @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 paySecret ,String desc, String outTradeNo, int totalFee, |
| | | String openid, String check_name, String bankCode) { |
| | | //默认必须设置 |
| | | setMch_id(mchID); |
| | | setDesc(desc); |
| | | setPartner_trade_no(outTradeNo); |
| | | setAmount(totalFee); |
| | | setOpenid(openid); |
| | | setCheck_name(check_name); |
| | | //随机字符串,不长于32 位 |
| | | setNonce_str(RandomStringGenerator.getRandomStringByLength(32)); |
| | | //根据API给的签名规则进行签名 【 必须要放在本方法的最后】 |
| | |
| | | |
| | | } |
| | | |
| | | public String getCheck_name() { |
| | | return check_name; |
| | | } |
| | | |
| | | public void setCheck_name(String check_name) { |
| | | this.check_name = check_name; |
| | | } |
| | | |
| | | public String getMch_id() { |
| | | return mch_id; |
| | |
| | | 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 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(),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.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); |
| | | |
| | | } |
| | |
| | | String title = "每日单据明细"; |
| | | orderSheet.setSheetName(title); |
| | | orderSheet.setTitle(title); |
| | | String[] header = {"年", "月", "日", "订单编号", "订单类型", "会员姓名", "项目名称", "订单金额", "订单业绩", "收款方式", "业绩类型", "顾问", "美疗师", "本金消耗", "赠消", "提成", "人头", "项目个数", "项目时间", "门店"}; |
| | | String[] header = {"年", "月", "日", "订单编号", "订单类型", "会员姓名", "项目名称", "订单金额", "订单业绩", "收款方式", "业绩类型", "员工", "本金消耗", "赠消", "提成", "人头", "项目个数", "项目时间", "顾问", "门店"}; |
| | | orderSheet.setHeaders(header); |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ |
| | |
| | | temp.add(item.getZkTotal()); |
| | | temp.add(item.getGoodsCash()); |
| | | temp.add(item.getPayMethod()); |
| | | temp.add(item.getGuwen()); |
| | | temp.add(item.getMeiliao()); |
| | | temp.add(item.getHisConsume()); |
| | | temp.add(item.getFreeConsume()); |
| | |
| | | temp.add(item.getNumberOfPeople()); |
| | | temp.add(item.getProjNum()); |
| | | temp.add(item.getProjTime()); |
| | | temp.add(item.getGuwen()); |
| | | temp.add(item.getShopName()); |
| | | list.add(temp); |
| | | } |
| | |
| | | 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 = "keywords=1 推广订单,keywords=2 邀请订单") |
| | | @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; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | 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> |
| | | |
| | |
| | | </div> |
| | | |
| | | <div class="form-group mr-20"> |
| | | <label>美疗师</label> |
| | | <label>业绩归属人</label> |
| | | <select class="form-control autoFull select2" |
| | | th:data-url="@{/admin/getShopStaffByRoleName?roleName=美疗师}" |
| | | data-value="suId" |
| | | data-filed="suName" |
| | | name="beaultId" |
| | | id="beaultId"> |
| | | <option value="">--请选择美容师--</option> |
| | | <option value="">--请选择--</option> |
| | | </select> |
| | | </div> |
| | | |
| | |
| | | <th data-field="goodsCash" data-footer-formatter="countColumn">订单业绩</th> |
| | | <th data-field="payMethod">收款方式</th> |
| | | <th data-field="achieveType">业绩类型</th> |
| | | <th data-field="guwen">顾问</th> |
| | | <th data-field="meiliao">美疗师</th> |
| | | <th data-field="meiliao">员工</th> |
| | | <th data-field="hisConsume" data-footer-formatter="countColumn">本金消耗 |
| | | <i data-toggle="tooltip" data-placement="top" title="消耗金额:客户做服务时划扣的本金" class="fa fa-question-circle"></i> |
| | | </th> |
| | |
| | | <th data-field="numberOfPeople" data-footer-formatter="countColumn">人头</th> |
| | | <th data-field="projNum" data-footer-formatter="countColumn">项目个数</th> |
| | | <th data-field="projTime" data-footer-formatter="countColumn">项目时间</th> |
| | | <th data-field="guwen">操作人</th> |
| | | <th data-field="shopName">门店</th> |
| | | |
| | | </tr> |
| | |
| | | |
| | | 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); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |