Merge remote-tracking branch 'origin/pet' into pet

liujun-2024-05-23-接口漏洞修复
limingyu 2024-04-26 11:34:35 +08:00
commit 9222ba833b
3 changed files with 38 additions and 0 deletions

View File

@ -13,6 +13,9 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/**
* created by liu jun
*/
@Controller @Controller
@RequestMapping("/openApi/xfgUser") @RequestMapping("/openApi/xfgUser")
public class ApiXgfUserController extends BaseController { public class ApiXgfUserController extends BaseController {
@ -35,6 +38,27 @@ public class ApiXgfUserController extends BaseController {
} }
} }
@RequestMapping(value = "/syncPhoto")
@ResponseBody
public Object syncPhoto() throws Exception {
Map<String, Object> response = new HashMap<String, Object>();
try {
PageData request = this.getPageData();
xgfUserService.syncPhoto(request);
response.put("code","0");
response.put("result", "success");
return response;
} catch (Exception e) {
e.printStackTrace();
response.put("code","9999");
response.put("result", "success");
return response;
}
}
@RequestMapping(value = "/approvalApplication") @RequestMapping(value = "/approvalApplication")
@ResponseBody @ResponseBody
public Object approvalApplication() throws Exception { public Object approvalApplication() throws Exception {

View File

@ -44,4 +44,6 @@ public interface XgfUserService {
void approveMax(PageData request, MultipartFile[] chengNuoShu) throws Exception; void approveMax(PageData request, MultipartFile[] chengNuoShu) throws Exception;
List<PageData> getWorkTask(PageData condition) throws Exception; List<PageData> getWorkTask(PageData condition) throws Exception;
void syncPhoto(PageData request) throws Exception;
} }

View File

@ -1077,6 +1077,18 @@ public class XgfUserServiceImpl implements XgfUserService {
return xgfUserMapper.getWorkTask(condition); return xgfUserMapper.getWorkTask(condition);
} }
@Override
public void syncPhoto(PageData request) throws Exception {
PageData condition = new PageData();
condition.put("XGF_USER_DETAILS_ID",request.get("USER_ID"));
PageData detailEntity = xgfUserDetailsMapper.findById(condition);
if (detailEntity == null || detailEntity.size() == 0){
throw new RuntimeException("未找到该用户详细信息");
}
detailEntity.put("PHOTO",request.get("PHOTO"));
xgfUserDetailsMapper.edit(detailEntity);
}
private String getType(String corpInfoId) { private String getType(String corpInfoId) {
// created bu liu jun - 港务局要求,可以直接指定集团单位 // created bu liu jun - 港务局要求,可以直接指定集团单位
if ("1".equals(corpInfoId)) { if ("1".equals(corpInfoId)) {