Browse Source

管理员排序修改

anderx 7 years ago
parent
commit
368253bb54

+ 1 - 1
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -683,7 +683,7 @@
     <if test="province != null">
     	and a.province = #{province,jdbcType=VARCHAR}
     </if>
-    order by a.last_login_time desc,a.number 
+    order by a.last_login_time ,a.number 
     <if test="page_sql!=null">
 			${page_sql}
 	</if>

+ 8 - 2
src/main/java/com/goafanti/common/mapper/ScDemandMapper.xml

@@ -422,7 +422,10 @@
   		and a.`type`= #{type,jdbcType=VARCHAR}
   	</if>
   	<if test="name != null">
-  		and b.name  like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+  		and a.name  like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+  	</if>
+  	<if test="orgName != null">
+  		and b.name  like CONCAT('%',#{orgName,jdbcType=VARCHAR},'%')
   	</if>
   	<if test="reserveButtUnit != null">
   		and a.reserve_butt_unit like CONCAT('%',#{reserveButtUnit,jdbcType=VARCHAR},'%')
@@ -441,7 +444,10 @@
   		and a.`type`= #{type,jdbcType=VARCHAR}
   	</if>
   	<if test="name != null">
-  		and b.name  like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+  		and a.name  like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+  	</if>
+  	<if test="orgName != null">
+  		and b.name  like CONCAT('%',#{orgName,jdbcType=VARCHAR},'%')
   	</if>
   	<if test="reserveButtUnit != null">
   		and a.reserve_butt_unit = #{reserveButtUnit,jdbcType=VARCHAR}

+ 2 - 2
src/main/java/com/goafanti/sc/controller/ScDemandApiController.java

@@ -37,9 +37,9 @@ public class ScDemandApiController extends CertifyApiController {
      * 需求列表
      */
     @RequestMapping(value = "/demandList", method = RequestMethod.GET)
-    private Result demandList(String reserveButtUnit,String type,String name,Integer pageSize,Integer pageNo) {
+    private Result demandList(String reserveButtUnit,String type,String name,String orgName,Integer pageSize,Integer pageNo) {
         Result res = new Result();
-       res.setData(ScDemandService.DemandList(reserveButtUnit,type,name,pageSize,pageNo));
+       res.setData(ScDemandService.DemandList(reserveButtUnit,type,name,orgName,pageSize,pageNo));
        return res;
     }
    /**

+ 1 - 1
src/main/java/com/goafanti/sc/service/ScDemandService.java

@@ -18,7 +18,7 @@ public interface ScDemandService {
 
 	inputDemands demandDetails(String id);
 
-	Pagination<ScDemandListBo> DemandList(String reserveButtUnit, String type, String name, Integer pageSize, Integer pageNo);
+	Pagination<ScDemandListBo> DemandList(String reserveButtUnit, String type, String name, String orgName, Integer pageSize, Integer pageNo);
 
 
 

+ 2 - 1
src/main/java/com/goafanti/sc/service/impl/ScDmandServiceImpl.java

@@ -39,11 +39,12 @@ public class ScDmandServiceImpl extends BaseMybatisDao<ScDemandMapper> implement
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<ScDemandListBo> DemandList(String reserveButtUnit, String type, String name, Integer pSize, Integer pNo) {
+	public Pagination<ScDemandListBo> DemandList(String reserveButtUnit, String type, String name,String orgName, Integer pSize, Integer pNo) {
 		Map<String, Object> params =new HashMap<>();
 		if (pNo == null || pNo < 0)	pNo = 1;
 		if (pSize == null || pSize < 0 || pSize > 10) pSize = 10;
 		if(StringUtils.isNotBlank(name))params.put("name", name);
+		if(StringUtils.isNotBlank(orgName))params.put("orgName", orgName);
 		if(StringUtils.isNotBlank(reserveButtUnit))params.put("reserveButtUnit", reserveButtUnit);
 		if(StringUtils.isNotBlank(type))params.put("type", type);
 		Pagination<ScDemandListBo>	p=	(Pagination<ScDemandListBo>) findPage("findDemandListByPage",