Browse Source

[浮层广告][修改][C端访问]

release_toaliyun_real
gongbiao 6 years ago
parent
commit
35e01a58e9
3 changed files with 9 additions and 5 deletions
  1. +6
    -3
      mallinkCApi/src/main/java/com/iformall/controller/WxCuserFloatingLayerController.java
  2. +1
    -1
      mallinkService/src/main/java/com/iformall/service/WxCuserFloatingLayerService.java
  3. +2
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCuserFloatingLayerServiceImpl.java

+ 6
- 3
mallinkCApi/src/main/java/com/iformall/controller/WxCuserFloatingLayerController.java View File

@@ -7,6 +7,7 @@ import com.iformall.domain.po.WxFloatingLayer;
import com.iformall.service.WxCuserFloatingLayerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -30,9 +31,11 @@ public class WxCuserFloatingLayerController extends BaseController {
@AuthIgnore
@ApiOperation("获取浮层")
@GetMapping("/getFloatingLayer")
@ApiImplicitParam(name = "openId", value = "openId", dataType = "String", paramType = "query", required = true)
public ResultData getAppIcon(String openId) {
WxFloatingLayer wxFloatingLayer = wxCuserFloatingLayerService.getFloatingLayer(openId);
@ApiImplicitParams({
@ApiImplicitParam(name = "openId", value = "openId", dataType = "String", paramType = "query", required = true),
@ApiImplicitParam(name = "appId", value = "appId", dataType = "String", paramType = "query", required = true)})
public ResultData getAppIcon(String openId, String appId) {
WxFloatingLayer wxFloatingLayer = wxCuserFloatingLayerService.getFloatingLayer(openId, appId);
return new ResultData(Result.SUCCESS, "查询成功", wxFloatingLayer);
}



+ 1
- 1
mallinkService/src/main/java/com/iformall/service/WxCuserFloatingLayerService.java View File

@@ -7,6 +7,6 @@ import com.iformall.domain.po.WxFloatingLayer;
*/
public interface WxCuserFloatingLayerService {

WxFloatingLayer getFloatingLayer(String openId);
WxFloatingLayer getFloatingLayer(String openId, String appId);

}

+ 2
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxCuserFloatingLayerServiceImpl.java View File

@@ -35,10 +35,11 @@ public class WxCuserFloatingLayerServiceImpl implements WxCuserFloatingLayerServ


@Override
public WxFloatingLayer getFloatingLayer(String openId) {
public WxFloatingLayer getFloatingLayer(String openId, String appId) {
//1 查看是否存在用户,用户不存在 直接返回浮层信息
WxCUser user = new WxCUser();
user.setOpenId(openId);
user.setAppId(appId);
WxCUser byOpenId = wxCUserMapper.findByOpenId(user);
String tenantId = byOpenId.getTenantId();
if (byOpenId == null) {


Loading…
Cancel
Save