9 changed files with 183 additions and 39 deletions
@ -1,24 +0,0 @@ |
|||||
package com.qs.cost.module.controller; |
|
||||
|
|
||||
import com.qs.cost.common.dto.R; |
|
||||
import com.qs.cost.common.dto.u8.U8CallbackVo; |
|
||||
import com.qs.cost.common.utils.JsonUtil; |
|
||||
import lombok.AllArgsConstructor; |
|
||||
import org.springframework.web.bind.annotation.*; |
|
||||
|
|
||||
/** |
|
||||
* @author YenHex |
|
||||
* @since 2022/7/7 |
|
||||
*/ |
|
||||
@AllArgsConstructor |
|
||||
@RestController |
|
||||
@RequestMapping("/u8") |
|
||||
public class LzOrderController { |
|
||||
|
|
||||
@PostMapping("/callback") |
|
||||
public R callback(@RequestBody U8CallbackVo requestVo){ |
|
||||
System.out.println(JsonUtil.objectToJson(requestVo)); |
|
||||
return R.ok(); |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -0,0 +1,46 @@ |
|||||
|
package com.qs.cost.module.controller; |
||||
|
|
||||
|
import com.qs.cost.common.dto.R; |
||||
|
import com.qs.cost.common.dto.u8.U8CallbackVo; |
||||
|
import com.qs.cost.common.utils.JsonUtil; |
||||
|
import com.qs.cost.module.mapper.VmSupplierMapper; |
||||
|
import com.qs.cost.module.service.VmSupplierService; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2022/7/7 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@AllArgsConstructor |
||||
|
@RestController |
||||
|
@RequestMapping("/u8") |
||||
|
public class U8CallBackController { |
||||
|
|
||||
|
VmSupplierService vmSupplierService; |
||||
|
VmSupplierMapper vmSupplierMapper; |
||||
|
|
||||
|
@PostMapping("/callback") |
||||
|
public R callback(@RequestBody U8CallbackVo requestVo){ |
||||
|
log.debug("callback:{}",JsonUtil.objectToJson(requestVo)); |
||||
|
if(requestVo.getApiCmd().equals("BasicVendor")){ |
||||
|
String pk = requestVo.getApiPk(); |
||||
|
//回调更新状态
|
||||
|
log.info("回调更新状态,PK:{}",pk); |
||||
|
//vmSupplierMapper.updateSupplierFormState(pk);
|
||||
|
String testValue = vmSupplierMapper.testSupplierFormState(pk); |
||||
|
log.debug("testValue:{}",testValue); |
||||
|
} |
||||
|
return R.ok(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/test") |
||||
|
public R callback(){ |
||||
|
//String testValue = vmSupplierMapper.testSupplierFormState("202209280264");
|
||||
|
vmSupplierService.test(); |
||||
|
return R.ok(); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
<?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.qs.cost.module.mapper.VmSupplierMapper"> |
||||
|
|
||||
|
<update id="updateSupplierFormState"> |
||||
|
update f1 |
||||
|
set f1.field0004 = 1,f1.field0005 = GETDATE() |
||||
|
from [OAdata].[dbo].formmain_1681 f1 |
||||
|
where f1.field0001 = #{serialNumber} |
||||
|
</update> |
||||
|
<select id="testSupplierFormState" resultType="java.lang.String"> |
||||
|
select f1.field0004 |
||||
|
from [OAdata].[dbo].formmain_1681 f1 |
||||
|
where f1.field0001 = #{serialNumber} |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
</mapper> |
Loading…
Reference in new issue