|
@@ -11,6 +11,7 @@ import com.iamberry.wechat.face.agentInfo.AgentInfoService;
|
|
|
import com.iamberry.wechat.face.agentInfo.AgentPurchaseOrderService;
|
|
|
import com.iamberry.wechat.face.member.MemberService;
|
|
|
import com.iamberry.wechat.face.order.CodeService;
|
|
|
+import com.iamberry.wechat.tools.NameUtils;
|
|
|
import com.iamberry.wechat.tools.ResponseJson;
|
|
|
import com.iamberry.wechat.tools.ResultInfo;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
@@ -18,8 +19,10 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -163,4 +166,19 @@ public class AgentToothHandler {
|
|
|
msg.setStatus(true);
|
|
|
return msg;
|
|
|
}
|
|
|
+
|
|
|
+ @RequestMapping("/go_agent_tooth")
|
|
|
+ public void goAgentTooth(HttpServletRequest req,HttpServletResponse res) throws Exception {
|
|
|
+ Member member = WechatUtils.getUserBySession(req);
|
|
|
+ AgentTooth tooth = new AgentTooth();
|
|
|
+ tooth.setAgentOpenid(member.getUserOpenid());
|
|
|
+ tooth.setAgentStatus(1);
|
|
|
+ //查询代理商信息
|
|
|
+ List<AgentTooth> toothList = agentInfoService.selectAllAgentinfo(tooth);
|
|
|
+ if (toothList == null || toothList.size() == 0) {
|
|
|
+ req.getRequestDispatcher(NameUtils.getConfig("WECHAT_AGENT_TOOT_ACTIVATE")).forward(req, res);
|
|
|
+ } else {
|
|
|
+ req.getRequestDispatcher(NameUtils.getConfig("WECHAT_AGENT_TOOT_CENTER")).forward(req, res);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|