Commit 853b03cd by 吴迪

【修改】政府采购

parent 83b5e092
package io.office.modules.manage.controller; package io.office.modules.manage.controller;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.common.annotation.SysLog; import io.office.common.annotation.SysLog;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
import io.office.modules.app.annotation.Login; import io.office.modules.app.annotation.Login;
import io.office.modules.manage.entity.DocEntity; import io.office.modules.manage.entity.DocEntity;
import io.office.modules.manage.entity.NewsEntity; import io.office.modules.manage.entity.NewsEntity;
import io.office.modules.manage.entity.dto.NewsParams; import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.service.DocService;
import io.office.modules.sys.controller.AbstractController; import io.office.modules.sys.controller.AbstractController;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.PathVariable;
import io.office.modules.manage.service.DocService; import org.springframework.web.bind.annotation.RequestBody;
import io.office.common.utils.PageUtils; import org.springframework.web.bind.annotation.RequestMapping;
import io.office.common.utils.R; import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
...@@ -28,7 +31,7 @@ import io.office.common.utils.R; ...@@ -28,7 +31,7 @@ import io.office.common.utils.R;
* ${comments} * ${comments}
* *
* @author wudi * @author wudi
* @email * @email
* @date 2021-11-14 14:32:42 * @date 2021-11-14 14:32:42
*/ */
@Slf4j @Slf4j
...@@ -150,4 +153,5 @@ public class DocController extends AbstractController { ...@@ -150,4 +153,5 @@ public class DocController extends AbstractController {
} }
} }
...@@ -134,7 +134,7 @@ public class NewtopicController extends AbstractController { ...@@ -134,7 +134,7 @@ public class NewtopicController extends AbstractController {
newtopicEntity.setChecktime(date); newtopicEntity.setChecktime(date);
newtopicEntity.setCheckflag(Integer.valueOf(params.getStatus())); newtopicEntity.setCheckflag(Integer.valueOf(params.getStatus()));
QueryWrapper<NewtopicEntity> newtopicEntityQueryWrapper = new QueryWrapper<>(); QueryWrapper<NewtopicEntity> newtopicEntityQueryWrapper = new QueryWrapper<>();
newtopicEntityQueryWrapper.eq("classid",newtopicEntity.getClassid()); newtopicEntityQueryWrapper.eq("classid",params.getId());
newtopicService.update(newtopicEntity,newtopicEntityQueryWrapper); newtopicService.update(newtopicEntity,newtopicEntityQueryWrapper);
return R.ok("审核通过!"); return R.ok("审核通过!");
} }
......
...@@ -3,7 +3,6 @@ package io.office.modules.manage.controller; ...@@ -3,7 +3,6 @@ package io.office.modules.manage.controller;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.common.annotation.SysLog;
import io.office.common.utils.PageUtils; import io.office.common.utils.PageUtils;
import io.office.common.utils.R; import io.office.common.utils.R;
import io.office.modules.app.annotation.Login; import io.office.modules.app.annotation.Login;
...@@ -72,7 +71,7 @@ public class TycpdmFirmController extends AbstractController { ...@@ -72,7 +71,7 @@ public class TycpdmFirmController extends AbstractController {
@RequestMapping("/api/test") @RequestMapping("/api/test")
@Login @Login
public void testRed(HttpServletResponse response) throws Exception { public void testRed(HttpServletResponse response) throws Exception {
response.sendRedirect("http://manage.gds.org.cn/Original/WWW/registerOrLoginFromAncc.aspx?uname=test_tru&pwd=88DA15B9F9F602F0D32D46808652B06DC6E939D1424CE39F69A2AC39743F7ED7591975685B543E1D&regist_or_login_from_ancc=d67626ce2c09cbb4c6867eb65c945b53&dept=-2"); response.sendRedirect("https://manage.gds.org.cn/Original/WWW/registerOrLoginFromAncc.aspx?uname=test_tru&pwd=88DA15B9F9F602F0D32D46808652B06DC6E939D1424CE39F69A2AC39743F7ED7591975685B543E1D&regist_or_login_from_ancc=d67626ce2c09cbb4c6867eb65c945b53&dept=-2");
} }
/** /**
......
...@@ -54,4 +54,8 @@ public class NewsParams extends PageParams { ...@@ -54,4 +54,8 @@ public class NewsParams extends PageParams {
private String clanguage; private String clanguage;
private List<Integer> ids; private List<Integer> ids;
@TableField(exist = false)
private Integer id;
} }
...@@ -36,7 +36,6 @@ import java.util.HashMap; ...@@ -36,7 +36,6 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.UUID; import java.util.UUID;
import java.util.regex.Pattern;
@Slf4j @Slf4j
@Service("tycpdmFirmService") @Service("tycpdmFirmService")
...@@ -602,7 +601,7 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm ...@@ -602,7 +601,7 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
} }
regist_or_login_from_ancc = dept + "{regist_or_login_from_ancc}"; regist_or_login_from_ancc = dept + "{regist_or_login_from_ancc}";
regist_or_login_from_ancc = MD5Util.md5Encrypt32Lower(regist_or_login_from_ancc); regist_or_login_from_ancc = MD5Util.md5Encrypt32Lower(regist_or_login_from_ancc);
String url = "http://manage.gds.org.cn/Original/WWW/registerOrLoginFromAncc.aspx?uname=" + username + "&pwd=" + pass + "&regist_or_login_from_ancc=" + regist_or_login_from_ancc + "&dept=" + dept; String url = "https://manage.gds.org.cn/Original/WWW/registerOrLoginFromAncc.aspx?uname=" + username + "&pwd=" + pass + "&regist_or_login_from_ancc=" + regist_or_login_from_ancc + "&dept=" + dept;
return url; return url;
} }
...@@ -647,7 +646,7 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm ...@@ -647,7 +646,7 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
} }
regist_or_login_from_ancc = dept + "{regist_or_login_from_ancc}"; regist_or_login_from_ancc = dept + "{regist_or_login_from_ancc}";
regist_or_login_from_ancc = MD5Util.md5Encrypt32Lower(regist_or_login_from_ancc); regist_or_login_from_ancc = MD5Util.md5Encrypt32Lower(regist_or_login_from_ancc);
String url = "http://manage.gds.org.cn/Original/WWW/registerOrLoginFromAncc.aspx?uname=" + username + "&pwd=" + pass + "&regist_or_login_from_ancc=" + regist_or_login_from_ancc + "&dept=" + dept; String url = "https://manage.gds.org.cn/Original/WWW/registerOrLoginFromAncc.aspx?uname=" + username + "&pwd=" + pass + "&regist_or_login_from_ancc=" + regist_or_login_from_ancc + "&dept=" + dept;
return url; return url;
} }
...@@ -748,4 +747,4 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm ...@@ -748,4 +747,4 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
} }
\ No newline at end of file
...@@ -26,12 +26,13 @@ import java.util.Map; ...@@ -26,12 +26,13 @@ import java.util.Map;
* *
* @author Mark sunlightcs@gmail.com * @author Mark sunlightcs@gmail.com
*/ */
@CrossOrigin
@RestController @RestController
@RequestMapping("/sys/config") @RequestMapping("/sys/config")
public class SysConfigController extends AbstractController { public class SysConfigController extends AbstractController {
@Autowired @Autowired
private SysConfigService sysConfigService; private SysConfigService sysConfigService;
/** /**
* 所有配置列表 * 所有配置列表
*/ */
...@@ -42,8 +43,8 @@ public class SysConfigController extends AbstractController { ...@@ -42,8 +43,8 @@ public class SysConfigController extends AbstractController {
return R.ok().put("page", page); return R.ok().put("page", page);
} }
/** /**
* 配置信息 * 配置信息
*/ */
...@@ -51,10 +52,10 @@ public class SysConfigController extends AbstractController { ...@@ -51,10 +52,10 @@ public class SysConfigController extends AbstractController {
@RequiresPermissions("sys:config:info") @RequiresPermissions("sys:config:info")
public R info(@PathVariable("id") Long id){ public R info(@PathVariable("id") Long id){
SysConfigEntity config = sysConfigService.getById(id); SysConfigEntity config = sysConfigService.getById(id);
return R.ok().put("config", config); return R.ok().put("config", config);
} }
/** /**
* 保存配置 * 保存配置
*/ */
...@@ -65,10 +66,10 @@ public class SysConfigController extends AbstractController { ...@@ -65,10 +66,10 @@ public class SysConfigController extends AbstractController {
ValidatorUtils.validateEntity(config); ValidatorUtils.validateEntity(config);
sysConfigService.saveConfig(config); sysConfigService.saveConfig(config);
return R.ok(); return R.ok();
} }
/** /**
* 修改配置 * 修改配置
*/ */
...@@ -77,12 +78,12 @@ public class SysConfigController extends AbstractController { ...@@ -77,12 +78,12 @@ public class SysConfigController extends AbstractController {
@RequiresPermissions("sys:config:update") @RequiresPermissions("sys:config:update")
public R update(@RequestBody SysConfigEntity config){ public R update(@RequestBody SysConfigEntity config){
ValidatorUtils.validateEntity(config); ValidatorUtils.validateEntity(config);
sysConfigService.update(config); sysConfigService.update(config);
return R.ok(); return R.ok();
} }
/** /**
* 删除配置 * 删除配置
*/ */
...@@ -91,8 +92,17 @@ public class SysConfigController extends AbstractController { ...@@ -91,8 +92,17 @@ public class SysConfigController extends AbstractController {
@RequiresPermissions("sys:config:delete") @RequiresPermissions("sys:config:delete")
public R delete(@RequestBody Long[] ids){ public R delete(@RequestBody Long[] ids){
sysConfigService.deleteBatch(ids); sysConfigService.deleteBatch(ids);
return R.ok(); return R.ok();
} }
@GetMapping("/api/config")
public R config(){
String IS_BLACK_WHITE = sysConfigService.getConfigObject("IS_BLACK_WHITE", String.class);
return R.ok().put("data", IS_BLACK_WHITE);
}
} }
...@@ -23,10 +23,12 @@ import org.apache.commons.lang.StringUtils; ...@@ -23,10 +23,12 @@ import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.CrossOrigin;
import java.util.Arrays; import java.util.Arrays;
import java.util.Map; import java.util.Map;
@CrossOrigin
@Service("sysConfigService") @Service("sysConfigService")
public class SysConfigServiceImpl extends ServiceImpl<SysConfigDao, SysConfigEntity> implements SysConfigService { public class SysConfigServiceImpl extends ServiceImpl<SysConfigDao, SysConfigEntity> implements SysConfigService {
@Autowired @Autowired
...@@ -87,7 +89,7 @@ public class SysConfigServiceImpl extends ServiceImpl<SysConfigDao, SysConfigEnt ...@@ -87,7 +89,7 @@ public class SysConfigServiceImpl extends ServiceImpl<SysConfigDao, SysConfigEnt
return config == null ? null : config.getParamValue(); return config == null ? null : config.getParamValue();
} }
@Override @Override
public <T> T getConfigObject(String key, Class<T> clazz) { public <T> T getConfigObject(String key, Class<T> clazz) {
String value = getValue(key); String value = getValue(key);
......
...@@ -80,4 +80,4 @@ ...@@ -80,4 +80,4 @@
</select> </select>
</mapper> </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