Commit a3162a4c authored by Administrator's avatar Administrator

Merge branch 'dev' of http://121.22.111.250:8000/zhangyusheng/YX_IDENT_REFACTORING into dev

# Conflicts:
#	src/main/java/com/yxproject/start/Main.java
#	src/main/java/com/yxproject/start/api/UserInfoApi.java
#	src/main/java/com/yxproject/start/config/MyShiroRealm.java
#	src/main/resources/application.properties
#	src/main/resources/mapper/SysPermissionMapper.xml
#	src/main/resources/mapper/SystemUserMapper.xml
parent de517937
......@@ -7,27 +7,24 @@ import com.yxproject.start.service.ProductionTaskListService;
import com.yxproject.start.service.SysPermissionService;
import com.yxproject.start.service.SysRoleService;
import com.yxproject.start.service.UserInfoService;
import com.yxproject.start.service.impl.UserInfoServiceImpl;
import com.yxproject.start.utils.Md5Utils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.IncorrectCredentialsException;
import org.apache.shiro.authc.UnknownAccountException;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.authz.Permission;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.*;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import java.util.*;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.UUID;
/**
......@@ -174,9 +171,9 @@ public class UserInfoApi {
* @return
*/
@RequestMapping("/getProductionTaskListByID")
@RequiresPermissions("userInfo.del")//权限管理;
public String getProductionTaskListByID(@QueryParam("id") String id){
return productionTaskListService.findProductionTaskListEntityByID(id).toString();
// @RequiresPermissions("userInfo.del")//权限管理;
public String getProductionTaskListByID(){
return productionTaskListService.findProductionTaskListEntityByID("20181016001").toString();
}
......
......@@ -29,7 +29,7 @@ public class MyShiroRealm extends AuthorizingRealm {
@Autowired
private ProductionTaskListService productionTaskListService;
@Autowired
private LoginService loginService;
@Override
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
......
......@@ -2,6 +2,7 @@ package com.yxproject.start.mapper;
import com.yxproject.start.entity.ProductionTaskListEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
/**
......@@ -11,5 +12,7 @@ import org.springframework.stereotype.Repository;
@Repository
public interface ProductionTaskListMapper {
ProductionTaskListEntity findProductionTaskListEntity(String productionTaskListId);
@Select("select * from PRODUCTION_TASK_LIST where PRODUCTION_TASK_LIST_ID=#{productionTaskListId}")
public ProductionTaskListEntity findProductionTaskListEntity(String productionTaskListId);
}
......@@ -13,7 +13,7 @@ import org.springframework.stereotype.Service;
public class ProductionTaskListServiceImpl implements ProductionTaskListService {
@Autowired
private ProductionTaskListMapper productionTaskListMapper;
public ProductionTaskListMapper productionTaskListMapper;
@Override
public ProductionTaskListEntity findProductionTaskListEntityByID(String productionTaskListId) {
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxproject.start.mapper.ProductionTaskListMapper">
<resultMap id="ProductionTaskListMap" type="com.yxproject.start.entity.ProductionTaskListEntity">
<id column="PRODUCTION_TASK_LIST_ID" property="productionTaskListId" />
<result column="MAKE_TYPE" property="makeType"/>
<result column="OLD_MAKE_TYPE" property="oldMakeType"/>
<result column="WORKSHOP" property="workshop"/>
<result column="SUBMIT_DATE" property="submitDate"/>
<result column="HANDOUT_DATE" property="handoutDate"/>
<result column="IS_PRINT" property="isPrint"/>
<result column="DOWNLOAD_DATE" property="downloadDate"/>
<result column="PRINT_OUT" property="printOut"/>
<result column="PERMANENT_POSITION_DATE" property="permanentPositionDate"/>
<result column="ROLL_OUT_WORKSHOP_DATE" property="rollOutWorkshopDate"/>
<result column="QUALITYINSPECTION_NAME" property="qualityinspectionName"/>
<result column="QUALITYINSPECTION_DATE" property="qualityinspectionDate"/>
<result column="EXCEPTION_INFORMATION" property="exceptionInformation"/>
<result column="OUTBOUND_DATE" property="outboundDate"/>
<result column="PUTINSTORAGE_DATE" property="putinstorageDate"/>
<!--<?xml version="1.0" encoding="UTF-8" ?>-->
<!--<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >-->
<!--<mapper namespace="com.yxproject.start.mapper.ProductionTaskListMapper">-->
<!--<resultMap id="ProductionTaskListMap" type="com.yxproject.start.entity.ProductionTaskListEntity">-->
<!--<id column="PRODUCTION_TASK_LIST_ID" property="productionTaskListId" />-->
<!--<result column="MAKE_TYPE" property="makeType"/>-->
<!--<result column="OLD_MAKE_TYPE" property="oldMakeType"/>-->
<!--<result column="WORKSHOP" property="workshop"/>-->
<!--<result column="SUBMIT_DATE" property="submitDate"/>-->
<!--<result column="HANDOUT_DATE" property="handoutDate"/>-->
<!--<result column="IS_PRINT" property="isPrint"/>-->
<!--<result column="DOWNLOAD_DATE" property="downloadDate"/>-->
<!--<result column="PRINT_OUT" property="printOut"/>-->
<!--<result column="PERMANENT_POSITION_DATE" property="permanentPositionDate"/>-->
<!--<result column="ROLL_OUT_WORKSHOP_DATE" property="rollOutWorkshopDate"/>-->
<!--<result column="QUALITYINSPECTION_NAME" property="qualityinspectionName"/>-->
<!--<result column="QUALITYINSPECTION_DATE" property="qualityinspectionDate"/>-->
<!--<result column="EXCEPTION_INFORMATION" property="exceptionInformation"/>-->
<!--<result column="OUTBOUND_DATE" property="outboundDate"/>-->
<!--<result column="PUTINSTORAGE_DATE" property="putinstorageDate"/>-->
</resultMap>
<!--</resultMap>-->
<select id="findProductionTaskListEntity" resultType="com.yxproject.start.entity.ProductionTaskListEntity" parameterType="String">
select * from PRODUCTION_TASK_LIST where PRODUCTION_TASK_LIST_ID=#{username}
</select>
<!--<select id="findProductionTaskListEntity" resultType="com.yxproject.start.entity.ProductionTaskListEntity" parameterType="String">-->
<!--select * from PRODUCTION_TASK_LIST where PRODUCTION_TASK_LIST_ID=#{productionTaskListId}-->
<!--</select>-->
</mapper>
\ No newline at end of file
<!--</mapper>-->
\ No newline at end of file
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