|
@@ -7,7 +7,7 @@ namespace app\txx\controller;
|
|
|
use app\admin\model\GoodSpec;
|
|
|
use app\txx\model\ActGood;
|
|
|
use app\txx\model\PlatformYouzan;
|
|
|
-use think\App;
|
|
|
+use app\txx\model\YzActivityPromoCode;use think\App;
|
|
|
use think\facade\Validate;
|
|
|
class Activity extends Base{
|
|
|
private $platform_id=[37,79];
|
|
@@ -192,4 +192,27 @@ class Activity extends Base{
|
|
|
}
|
|
|
$this->success("删除成功");
|
|
|
}
|
|
|
+
|
|
|
+ public function promocodeList(){
|
|
|
+ $param=$this->request->param(["title"=>"","status"=>"","start"=>"","end"=>"","page"=>1,"size"=>15],"post","trim");
|
|
|
+ $where=[["is_del","=",0]];
|
|
|
+ if($param['title']!==""){
|
|
|
+ $where[]=["title","like","%".$param['title']."%"];
|
|
|
+ }
|
|
|
+ if($param['status']!==""){
|
|
|
+ $where[]=["status","=",$param['status']];
|
|
|
+ }
|
|
|
+ if($param['start']!==""){
|
|
|
+ $where[]=["createTime",">=",startTime($param['start'])];
|
|
|
+ }
|
|
|
+ if($param['end']!==""){
|
|
|
+ $where[]=["createTime","<=",endTime($param['end'])];
|
|
|
+ }
|
|
|
+
|
|
|
+ $list= YzActivityPromoCode::with(["Good"])
|
|
|
+ ->where($where)
|
|
|
+ ->order("id desc")
|
|
|
+ ->paginate(["list_rows"=>$param['size'],"page"=>$param['page']]);
|
|
|
+ $this->success("获取成功",["list"=>$list->items(),"count"=>$list->total()]);
|
|
|
+ }
|
|
|
}
|