Commit ad557816 authored by Administrator's avatar Administrator

添加修改1、  更改受理库中受理组的导入时间为当前时间

    2、  更改受理库中受理组的处理标志  为0、1、2、3   提交时间为当前时间
parent c4b02f89
package com.yxproject.start.api;
import com.yxproject.start.service.UtilService;
import org.apache.log4j.Logger;
import org.apache.log4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
/**
* Created by Administrator on 2019/6/18.
*/
@RestController
@RequestMapping("UtilApi")
public class UtilApi {
@Autowired
UtilService utilService;
Logger logger= Logger.getLogger(UtilApi.class);
/**
* 更新受理库导入时间
* @return
*/
@RequestMapping("updateImportTime")
public boolean updateImportTime(@RequestParam("groupNo") String groupNo, HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
try {
utilService.updateImportTime(groupNo);
}catch (Exception e){
logger.error("组号:" + groupNo);
logger.error("Exception 更新受理库导入时间异常", e);
}
return true;
}
/**
* 更新受理库处理标志
* @return
*/
@RequestMapping("updateDealFlag")
public boolean updateDealFlag(@RequestParam("dealFlag") String dealFlag, @RequestParam("groupNo") String groupNo, HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
try {
utilService.updateDealFlag(dealFlag,groupNo);
}catch (Exception e){
logger.error("处理标志:" + dealFlag + "组号:" + groupNo);
logger.error("Exception 更新受理库处理标志异常", e);
}
return true;
}
}
package com.yxproject.start.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
/**
* Created by Administrator on 2019/6/18.
*/
@Mapper
public interface UtilMapper {
/**
* 更新受理库导入时间
*/
@Update("UPDATE ACC_GROUP_T@ACCU_LINK SET IMPORT_TIME = SYSDATE WHERE GROUP_NO = #{groupNo}")
public boolean updateImportTime( String groupNo );
/**
* 更新受理库处理标志
*/
@Update("UPDATE ACC_GROUP_T@ACCU_LINK SET SUBMIT_DATE = SYSDATE, DEAL_FLAG = #{dealFlag} WHERE GROUP_NO = #{groupNo}")
public boolean updateDealFlag( @Param("dealFlag") String dealFlag, @Param("groupNo") String groupNo );
}
package com.yxproject.start.service;
/**
* Created by Administrator on 2019/6/18.
*/
public interface UtilService {
public boolean updateImportTime( String groupNo );
public boolean updateDealFlag( String dealFlag, String groupNo );
}
package com.yxproject.start.service.impl;
import com.yxproject.start.mapper.UtilMapper;
import com.yxproject.start.service.UtilService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Created by Administrator on 2019/6/18.
*/
@Service
public class UtilServiceImpl implements UtilService {
@Autowired
private UtilMapper utilMapper;
@Override
public boolean updateImportTime (String groupNo) {
utilMapper.updateImportTime(groupNo);
return true;
}
@Override
public boolean updateDealFlag(String dealFlag,String groupNo) {
utilMapper.updateDealFlag(dealFlag, groupNo);
return true;
}
}
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