Commit 73caa835 authored by 赵啸非's avatar 赵啸非

添加优势

parent 9552130c
package com.mortals.xhx.module.type.web;
import com.alibaba.fastjson.JSON;
import com.mortals.framework.exception.AppException;
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.module.type.model.TypeDetailsEntity;
import com.mortals.xhx.module.type.model.TypeDetailsQuery;
import com.mortals.xhx.module.type.model.TypeQuery;
import com.mortals.xhx.module.type.service.TypeDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -64,4 +67,12 @@ public class TypeController extends BaseCRUDJsonBodyMappingController<TypeServic
entity.setTypeDetailsList(typeDetailsEntities);
return super.editAfter(id, model, entity, context);
}
public static void main(String[] args) {
TypeQuery typeQuery = new TypeQuery();
typeQuery.setOrderColList(Arrays.asList(new OrderCol("id","asc")));
System.out.println(JSON.toJSONString(typeQuery));
}
}
\ No newline at end of file
package com.mortals.xhx.module.type.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -41,6 +43,13 @@ public class TypeDetailsController extends BaseCRUDJsonBodyMappingController<Typ
super.setModuleDesc( "类型详细");
}
@Override
protected void doListBefore(TypeDetailsEntity query, Map<String, Object> model, Context context) throws AppException {
query.setOrderColList(Arrays.asList(new OrderCol("id")));
super.doListBefore(query, model, context);
}
@Override
protected void init(Map<String, Object> model, Context context) {
super.init(model, context);
......
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