MerchantRemarkService.php 678 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace biz\sj\services;
  3. use biz\base\services\BaseService;
  4. use biz\sj\classes\MerchantRemarkClass;
  5. use common\components\util;
  6. use Yii;
  7. use common\components\wxUtil;
  8. class MerchantRemarkService extends BaseService
  9. {
  10. public static $baseFile = '\biz\sj\classes\MerchantRemarkClass';
  11. //备注列表 ssh 2019.12.19
  12. public static function getRemarkList($userId)
  13. {
  14. return MerchantRemarkClass::getAllByCondition(['userId' => $userId], null, '*');
  15. }
  16. //备注验证 2019.12.19
  17. public static function valid($remark, $sjId)
  18. {
  19. if (empty($remark)) {
  20. util::fail('备注无效');
  21. }
  22. if ($remark['sjId'] != $sjId) {
  23. util::fail('您无法操作');
  24. }
  25. }
  26. }