|
|
@@ -4,9 +4,13 @@ import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.WxCUser; |
|
|
|
import com.iformall.domain.po.WxPayOrder; |
|
|
|
import com.iformall.service.*; |
|
|
|
import com.iformall.domain.po.WxProduct; |
|
|
|
import com.iformall.service.SysConfigService; |
|
|
|
import com.iformall.service.WxProductService; |
|
|
|
import com.iformall.service.wx.WxPayService; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.ArrayList; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@@ -36,7 +40,13 @@ public class WxProductController extends BaseController { |
|
|
|
if (null != page && null != page.getList() && page.getList().size() > 0 ) { |
|
|
|
return new ResultData(wxProductService.getCProductList(user)); |
|
|
|
}else { |
|
|
|
return new ResultData(wxProductService.getCFirstProduct(user)); |
|
|
|
WxProduct first = wxProductService.getCFirstProduct(user); |
|
|
|
if (null != first) { |
|
|
|
List<WxProduct> list = new ArrayList<WxProduct>(); |
|
|
|
list.add(first); |
|
|
|
return new ResultData(list); |
|
|
|
} |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|