Commit 59d72e24 authored by fuyunnan's avatar fuyunnan

Merge branch 'master' into develop

parents f233932c c81f753e
......@@ -64,4 +64,37 @@ class MessageHandler
$this->messageService->send($receiverIds, $application, 0, $sendUserId, [], $content);
}
/**
* 自动发送模板消息
* @param $receiverIds
* @param $templateId
* @param array $replace
* @throws HttpResponseException
*/
public function sendAutoTemp($receiverIds, $templateId, $replace = [])
{
$application = $this->config->get('app_name');
if (!$application) {
throw new HttpResponseException("请设置应用名app_name");
}
$receiverIds = is_array($receiverIds) ? $receiverIds : [$receiverIds];
$this->messageService->send($receiverIds, $application, $templateId, 0, $replace);
}
/**
* 定时任务专用 发送文本消息
* @param $receiverIds
* @param $content
* @throws HttpResponseException
*/
public function sendCrontabText($receiverIds, $content)
{
$application = $this->config->get('app_name');
if (!$application) {
throw new HttpResponseException("请设置应用名app_name");
}
$receiverIds = is_array($receiverIds) ? $receiverIds : [$receiverIds];
$this->messageService->send($receiverIds, $application, 0, 0, [], $content);
}
}
<?php
/**
* Created by PhpStorm.
* User: 王源
* Date: 2020/3/16
* Time: 15:07
*/
namespace Meibuyu\Micro\Service\Interfaces;
interface DatacenterServiceInterface
{
/**
* description:获取国家汇率 默认取最新一个汇率值
* author: fuyunnan
* @param int $currencyId 货币id
* @param array $field 字段
* @return array
* @throws
* Date: 2020/8/11
*/
public function getCurrencyRate($currencyId, $field = ['id', 'currency_id', 'rate_val']): array;
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: 梁俊杰
* Date: 2020/5/15
* Time: 15:07
*/
namespace Meibuyu\Micro\Service\Interfaces;
interface MaterialServiceInterface
{
/**
* 获取单个数据
* @param int $id 原料id
* @param array $columns 原料表的字段,默认显示全部
* @return array|null
*/
public function get($id, array $columns = ['*']);
/**
* 通过id列表获取原料数组
* @param array $idList 原料id的列表, 默认去重
* @param array $columns 原料表的字段,默认显示全部
* @return array 默认keyBy('id')
*/
public function getByIdList(array $idList, array $columns = ['*']): array;
/**
* 通过内部code列表获取原料列表
* @param array $codeList 默认去重
* @param array $columns
* @return array 默认keyBy('internal_code')
*/
public function getByCodeList(array $codeList, array $columns = ['id']);
/**
* 通过原料品名id列表获取原料品名数组
* @param array $idList 原料品名id的列表, 默认去重
* @param array $columns 原料品名表的字段,默认显示全部
* @return array 默认keyBy('id')
*/
public function getMaterialNamesByIdList(array $idList, array $columns = ['*']): array;
}
......@@ -39,7 +39,7 @@ interface MaterialServiceInterface
* 获取指定品名下所有的原料数据
* @param array $nameIds 默认去重
* @param array $columns
* @return array 默认keyBy('material_name_id')
* @return array 默认groupBy('material_name_id')
*/
public function getListByNameIds(array $nameIds, array $columns = ['*']);
......@@ -76,9 +76,17 @@ interface MaterialServiceInterface
/**
* 获取产品对应颜色绑定的原料
* @param $productId
* @param array $colorIds
* @param array $colorIds 默认去重
* @param bool $withMaterials
* @return array 默认keyBy('color_id')
*/
public function getProductColorMaterials($productId, array $colorIds, $withMaterials = false);
/**
* 获取维护完全原料数量的颜色id
* @param $productId
* @return array
*/
public function getProductColorMaterials($productId, array $colorIds);
public function getFullMaterialCountColorIds($productId);
}
......@@ -92,4 +92,12 @@ interface ProductChildServiceInterface
*/
public function getListByProductId(int $productId, $columns = ['id', 'child_sku']);
/**
* 模糊搜索仓库子sku,获取id数组
* @param string $childSku 仓库子sku
* @param array|null $limitIds 限制id数组,不传为不限制
* @return array
*/
public function getIdsByChildSku(string $childSku, array $limitIds = null);
}
......@@ -154,14 +154,14 @@ class Drawer
* @param int $h 图片高度
* @param string $p 单元格索引
* @param Worksheet $sheet
* @param bool $addBoard
* @param int $boardPx
*/
public function draw2Excel($path, $h, $p, $sheet, $addBoard = true)
public function draw2Excel($path, $h, $p, $sheet, $boardPx = 0)
{
try {
$path = $this->parseImagePath($path);
if ($addBoard) {
$path = $this->addBoard($path);
if ($boardPx) {
$path = $this->addBoard($path, $boardPx);
}
$drawing = new Drawing();
$drawing->setPath($path)->setCoordinates($p)->setHeight($h)->setWorksheet($sheet);
......
......@@ -116,7 +116,7 @@ class ExcelImporter
}
/**
* 必填检测数据
* 检测必填数据
* @param $requires
* @param $errorCount
* @throws \PhpOffice\PhpSpreadsheet\Exception
......@@ -136,7 +136,7 @@ class ExcelImporter
}
/**
* 必填检测数据
* 检测数字类型数据
* @param $data
* @param $errorCount
* @throws \PhpOffice\PhpSpreadsheet\Exception
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment