|
|
|
@@ -19,6 +19,7 @@ import com.iformall.enums.EnumAppPlat; |
|
|
|
import com.iformall.enums.EnumCUserFrom; |
|
|
|
import com.iformall.enums.EnumEnableType; |
|
|
|
import com.iformall.enums.EnumLevelConfigDiscountStatus; |
|
|
|
import com.iformall.enums.EnumYesOrNo; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.service.*; |
|
|
|
import com.iformall.service.cuser.CUserServiceFactory; |
|
|
|
@@ -273,7 +274,7 @@ public class WxUserGrantController extends BaseController { |
|
|
|
} |
|
|
|
//处理登陆用户 |
|
|
|
cUser = cuserFactory.getCUserService(appPlat).handleLoginUser(cUser,wxCUserFrom); |
|
|
|
|
|
|
|
resultMap.put("agreeProtocol", cUser.getAgreeProtocol()); |
|
|
|
resultMap.put("token", cUser.getToken()); |
|
|
|
// request.setAttribute(Constant.LOGIN_USER_KEY, cUser.getId()); |
|
|
|
|
|
|
|
@@ -306,6 +307,41 @@ public class WxUserGrantController extends BaseController { |
|
|
|
// |
|
|
|
// return new ResultData(); |
|
|
|
// } |
|
|
|
|
|
|
|
@ApiOperation("是否需要强制弹协议窗口") |
|
|
|
@GetMapping("/needAgreeProtocol") |
|
|
|
public ResultData needAgreeProtocol() { |
|
|
|
SysConfig config = sysConfigService.getByKey(SysConfigConstant.need_agree_protocol, getCUser()); |
|
|
|
if (null == config || null == config.getConfigItemValue() || "0".equals(config.getConfigItemValue())) { |
|
|
|
return new ResultData(0); |
|
|
|
}else { |
|
|
|
return new ResultData(1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("appInfo") |
|
|
|
@GetMapping("/appInfoDetail") |
|
|
|
public ResultData appInfoDetail(String appId) { |
|
|
|
WxAppinfo wxAppinfo = wxAppinfoService.getOnlyByAppIdFromRedis(appId); |
|
|
|
if(wxAppinfo == null){ |
|
|
|
return new ResultData(ErrorCode.APP_ID_NOT_FOUND); |
|
|
|
} |
|
|
|
return new ResultData(wxAppinfo); |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping("/agreementProtocol") |
|
|
|
@ApiOperation(value = "同意协议scene", notes = "{}") |
|
|
|
public ResultData agreementProtocol(@RequestBody Map<String, String> map) { |
|
|
|
//logger.info(map.toString()); |
|
|
|
//String scene = map.get("openId"); |
|
|
|
CUser user = getCUser(); |
|
|
|
if (null == user.getAgreeProtocol() || |
|
|
|
user.getAgreeProtocol().intValue() == EnumYesOrNo.NO.getCode().intValue()) { |
|
|
|
cuserFactory.getCUserService(user.getAppPlat()).agreeProtocol(user); |
|
|
|
removeCacheCUser(); |
|
|
|
} |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping("/updateScene") |
|
|
|
@ApiOperation(value = "用户更新scene", notes = "{\"scene\":\"string\"}") |
|
|
|
|