|  |  |  | 
|---|
|  |  |  | import com.matrix.system.common.bean.SysUsers; | 
|---|
|  |  |  | import com.matrix.system.common.constance.AppConstance; | 
|---|
|  |  |  | import com.matrix.system.constance.Dictionary; | 
|---|
|  |  |  | import com.matrix.system.constance.SystemConstance; | 
|---|
|  |  |  | import com.matrix.system.hive.action.BaseController; | 
|---|
|  |  |  | import com.matrix.system.hive.action.util.QueryUtil; | 
|---|
|  |  |  | import com.matrix.system.hive.bean.SysShopInfo; | 
|---|
|  |  |  | import com.matrix.system.hive.service.SysShopInfoService; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.api.WeChatApiTools; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.stereotype.Controller; | 
|---|
|  |  |  | import org.springframework.transaction.annotation.Transactional; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.PathVariable; | 
|---|
|  |  |  | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | private SysShopInfoService shopInfoService; // 店铺Service | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | WeChatApiTools weChatApiTools; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/showList") | 
|---|
|  |  |  | @ResponseBody | 
|---|
|  |  |  | 
|---|
|  |  |  | AjaxResult creteSohopQrcode(@PathVariable("shopId") Long shopId) { | 
|---|
|  |  |  | SysShopInfo shopInfo = shopInfoService.findById(shopId); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | String qrcodeSavePath = WxacodeUtil.getWxacode(shopId + "", "pages/index/index", MD5Util.strToMD5(shopId + "")); | 
|---|
|  |  |  | String qrcodeSavePath = WxacodeUtil.getWxacode(shopId + "", "pages/index/index", MD5Util.strToMD5(shopId + "") | 
|---|
|  |  |  | ,weChatApiTools.getAppid(shopInfo.getCompanyId()),weChatApiTools.getSecret(shopInfo.getCompanyId())); | 
|---|
|  |  |  | LogUtil.debug("qrcodeSavePath={}", qrcodeSavePath); | 
|---|
|  |  |  | // 图片保存目录路径 | 
|---|
|  |  |  | String baseSavePath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH); | 
|---|