Commit bb3215eb authored by 赵啸非's avatar 赵啸非

修改地址动态获取

parent f6fdfd30
......@@ -4,6 +4,7 @@ import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.NoticeStatusEnum;
import com.mortals.xhx.common.code.UserType;
import com.mortals.xhx.module.notice.model.NoticeEntity;
import com.mortals.xhx.module.notice.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -59,7 +60,10 @@ public class NoticeStudyController extends BaseCRUDJsonBodyMappingController<Not
@Override
protected void doListBefore(NoticeStudyEntity query, Map<String, Object> model, Context context) throws AppException {
super.doListBefore(query, model, context);
query.setUserId(this.service.getContextUserId(context));
Integer userType = context.getUser().getUserType();
if(!org.apache.commons.lang3.ObjectUtils.isEmpty(userType)&&userType== UserType.WORK_PERSON.getValue()){
query.setUserId(this.service.getContextUserId(context));
}
List<OrderCol> orderColList = new ArrayList<>();
orderColList.add(new OrderCol("top", OrderCol.DESCENDING));
orderColList.add(new OrderCol("noticeStatus", OrderCol.ASCENDING));
......
......@@ -7,8 +7,10 @@ import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.StudyStatusEnum;
import com.mortals.xhx.common.code.UserType;
import com.mortals.xhx.module.project.model.ProjectEntity;
import com.mortals.xhx.module.project.service.ProjectService;
import org.apache.commons.lang3.ObjectUtils;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -66,7 +68,11 @@ public class ProjectStudyController extends BaseCRUDJsonBodyMappingController<Pr
@Override
protected void doListBefore(ProjectStudyEntity query, Map<String, Object> model, Context context) throws AppException {
super.doListBefore(query, model, context);
query.setUserId(this.service.getContextUserId(context));
Integer userType = context.getUser().getUserType();
if(!ObjectUtils.isEmpty(userType)&&userType== UserType.WORK_PERSON.getValue()){
query.setUserId(this.service.getContextUserId(context));
}
List<OrderCol> orderColList = new ArrayList<>();
orderColList.add(new OrderCol("top", OrderCol.DESCENDING));
orderColList.add(new OrderCol("studyStatus", OrderCol.ASCENDING));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment