Browse Source

fix

master
lin 1 year ago
parent
commit
0dcee81947
2 changed files with 13 additions and 3 deletions
  1. +1
    -1
      gptCApi/pom.xml
  2. +12
    -2
      gptCApi/src/main/java/com/iformall/controller/WxProductController.java

+ 1
- 1
gptCApi/pom.xml View File

@@ -16,7 +16,7 @@
<groupId>com.iformall.gpt</groupId>
<artifactId>gptService</artifactId>
<version>1.0</version>
</dependency>
</dependency>
</dependencies>
<build>
<plugins>


+ 12
- 2
gptCApi/src/main/java/com/iformall/controller/WxProductController.java View File

@@ -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();
}
}



Loading…
Cancel
Save