Commit 962d52a3 by 魏文甫

update

1 parent dea580b7
...@@ -11,7 +11,11 @@ import java.util.Map; ...@@ -11,7 +11,11 @@ import java.util.Map;
public interface InformationMapper { public interface InformationMapper {
List<Map<String, Object>> categoryDetail(@Param("firstId") Long id); List<Map<String, Object>> categoryDetail(@Param("firstId") Long id);
List<Map<String, Object>> secondClassDetailInformation(Map<String,Object> param); List<Map<String, Object>> secondClassDetailInformation(Map<String, Object> param);
List<Map<String, Object>> secondClassDetailCourse(Map<String,Object> param); Integer secondClassDetailInformationTotal(Map<String, Object> param);
List<Map<String, Object>> secondClassDetailCourse(Map<String, Object> param);
Integer secondClassDetailCourseTotal(Map<String, Object> param);
} }
...@@ -58,15 +58,21 @@ public class InformationServiceImpl implements InformationService { ...@@ -58,15 +58,21 @@ public class InformationServiceImpl implements InformationService {
public Map<String, Object> secondClassDetail(Long secondId, Integer pageNo, Integer pageSize) { public Map<String, Object> secondClassDetail(Long secondId, Integer pageNo, Integer pageSize) {
TBaseSecondClass tBaseSecondClass = tBaseSecondClassMapper.selectByPrimaryKey(secondId); TBaseSecondClass tBaseSecondClass = tBaseSecondClassMapper.selectByPrimaryKey(secondId);
List<Map<String, Object>> list = null; List<Map<String, Object>> list = null;
Integer total = 0;
Map<String, Object> param = new HashMap<String, Object>(); Map<String, Object> param = new HashMap<String, Object>();
param.put("start", (pageNo - 1) * pageSize); param.put("start", (pageNo - 1) * pageSize);
param.put("pageSize", pageSize); param.put("pageSize", pageSize);
param.put("secondId", secondId); param.put("secondId", secondId);
if (tBaseSecondClass.getType() == 1) { if (tBaseSecondClass.getType() == 1) {
list = informationMapper.secondClassDetailInformation(param); list = informationMapper.secondClassDetailInformation(param);
total = informationMapper.secondClassDetailInformationTotal(param);
} else { } else {
list = informationMapper.secondClassDetailCourse(param); list = informationMapper.secondClassDetailCourse(param);
total = informationMapper.secondClassDetailCourseTotal(param);
} }
Map<String, Object> dataMap = new HashMap<String, Object>();
dataMap.put("list", list);
dataMap.put("total", total);
return returnMap("1", "", list); return returnMap("1", "", list);
} }
......
...@@ -75,11 +75,9 @@ public class UserController extends BaseController { ...@@ -75,11 +75,9 @@ public class UserController extends BaseController {
if (!CollectionUtils.isEmpty(users)) { if (!CollectionUtils.isEmpty(users)) {
TKzyUser user1 = users.get(0); TKzyUser user1 = users.get(0);
if (!StringUtils.isEmpty(user1.getWxOpenid()) && !wxOpenId.equals(user1.getWxOpenid())) { if (!StringUtils.isEmpty(user1.getWxOpenid()) && !wxOpenId.equals(user1.getWxOpenid())) {
return returnError("0", "该微信已绑定其他手机号", null); return returnError("0", "该手机号已绑定其他微信", null);
} }
} }
user.setWxOpenid(wxOpenId); user.setWxOpenid(wxOpenId);
user.setCreateDt(new Date()); user.setCreateDt(new Date());
user.setUserCategory(userCategory == null ? null : Integer.valueOf(userCategory)); user.setUserCategory(userCategory == null ? null : Integer.valueOf(userCategory));
...@@ -90,7 +88,6 @@ public class UserController extends BaseController { ...@@ -90,7 +88,6 @@ public class UserController extends BaseController {
user.setLastLoginDt(new Date()); user.setLastLoginDt(new Date());
userMapper.insertSelective(user); userMapper.insertSelective(user);
request.getSession().setAttribute(WX_USER_SESSION_KEY, user); request.getSession().setAttribute(WX_USER_SESSION_KEY, user);
return returnSuccess(user); return returnSuccess(user);
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!