修改接口

master
username 10 months ago
parent 2292604da0
commit ca5cb4629a

@ -135,6 +135,9 @@ public class DfBizClueController extends BaseController {
} else if ("2".equals(dfBizClue.getClassify())) { } else if ("2".equals(dfBizClue.getClassify())) {
queryWrapper.in(DfBizClue::getDataType, "1"); queryWrapper.in(DfBizClue::getDataType, "1");
} }
if (Validator.isNotEmpty(dfBizClue.getBusinessLinks())) {
queryWrapper.eq(DfBizClue::getBusinessLinks, dfBizClue.getBusinessLinks());
}
List<DfBizClue> list = dfBizClueService.list(queryWrapper); List<DfBizClue> list = dfBizClueService.list(queryWrapper);
List<DfBizClue> uniqueList = list.stream() List<DfBizClue> uniqueList = list.stream()
.collect(Collectors.toMap( .collect(Collectors.toMap(

@ -182,7 +182,7 @@ public class DfOrderController extends BaseController {
dfOrder.setCreateTimeVo(date); dfOrder.setCreateTimeVo(date);
SecurityUtils.getTenantId(); SecurityUtils.getTenantId();
dfOrder.setTenantId(SecurityUtils.getTenantId()); dfOrder.setTenantId(SecurityUtils.getTenantId());
dfOrder.setCreateBy(SecurityUtils.getUserId()); // dfOrder.setCreateBy(SecurityUtils.getUserId());
dfOrder.setCreateDept(SecurityUtils.getDeptId()); dfOrder.setCreateDept(SecurityUtils.getDeptId());
return toAjax(dfOrderMapper.insertOrder(dfOrder)); return toAjax(dfOrderMapper.insertOrder(dfOrder));
} }

@ -1,8 +1,12 @@
package com.bs.df.controller; package com.bs.df.controller;
import java.util.List; import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.bs.common.annotation.Anonymous;
import com.bs.common.core.domain.model.LoginBody;
import com.bs.web.utils.WeiXinUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
@ -39,7 +43,6 @@ import javax.annotation.Resource;
public class DfUserBrokerController extends BaseController { public class DfUserBrokerController extends BaseController {
@Resource @Resource
private IDfUserBrokerService dfUserBrokerService; private IDfUserBrokerService dfUserBrokerService;
/** /**
* *
*/ */
@ -118,6 +121,7 @@ public class DfUserBrokerController extends BaseController {
return toAjax(dfUserBrokerService.removeBatchByIds(ids)); return toAjax(dfUserBrokerService.removeBatchByIds(ids));
} }
/** /**
* *
*/ */

@ -382,10 +382,10 @@ public class SysLoginController
*/ */
@PostMapping("/getConfig") @PostMapping("/getConfig")
@Anonymous @Anonymous
public Map<String, String> getConfig(LoginBody loginBody) public AjaxResult getConfig(@RequestBody LoginBody loginBody)
{ {
Map<String, String> config = weiXinUtil.getConfig(loginBody.getUrl()); Map<String, String> config = weiXinUtil.getConfig(loginBody.getUrl());
return config; return AjaxResult.success(config);
} }
} }

@ -237,7 +237,7 @@ public class SysUserController extends BaseController {
@Anonymous @Anonymous
public AjaxResult getUser(@PathVariable(value = "userId", required = false) Long userId) { public AjaxResult getUser(@PathVariable(value = "userId", required = false) Long userId) {
SysUser sysUser = userService.selectUserById(userId); SysUser sysUser = userService.selectUserById(userId);
List<CmAttach> attachVo = cmAttachService.list(new LambdaQueryWrapper<CmAttach>().eq(CmAttach::getFileId, userId)); List<CmAttach> attachVo = cmAttachService.list(new LambdaQueryWrapper<CmAttach>().eq(CmAttach::getFileId, "userId" + userId));
sysUser.setFiles(attachVo); sysUser.setFiles(attachVo);
return success(sysUser); return success(sysUser);
} }

@ -45,19 +45,19 @@ public class SignUtil {
String timestamp = create_timestamp(); String timestamp = create_timestamp();
String string1; String string1;
String signature = ""; String signature = "";
//注意这里参数名必须全部小写,且必须有序 //注意这里参数名必须全部小写,且必须有序
string1 = "jsapi_ticket=" + jsapi_ticket + string1 = "jsapi_ticket=" + jsapi_ticket +
"&noncestr=" + nonce_str + "&noncestr=" + nonce_str +
"&timestamp=" + timestamp + "&timestamp=" + timestamp +
"&url=" + url; "&url=" + url;
System.out.println(string1);
try try
{ {
MessageDigest crypt = MessageDigest.getInstance("SHA-1"); MessageDigest crypt = MessageDigest.getInstance("SHA-1");
crypt.reset(); crypt.reset();
crypt.update(string1.getBytes("UTF-8")); crypt.update(string1.getBytes("UTF-8"));
signature = byteToHex(crypt.digest()); signature = byteToHex(crypt.digest());
System.out.println("signature" + signature);
} }
catch (NoSuchAlgorithmException e) catch (NoSuchAlgorithmException e)
{ {
@ -67,7 +67,6 @@ public class SignUtil {
{ {
e.printStackTrace(); e.printStackTrace();
} }
ret.put("nonceStr", nonce_str); ret.put("nonceStr", nonce_str);
ret.put("timestamp", timestamp); ret.put("timestamp", timestamp);
ret.put("signature", signature); ret.put("signature", signature);

@ -42,17 +42,17 @@ public class WeiXinUtil {
private static SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); private static SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// 微信小程序appid // 微信小程序appid
//@Value("${wxConfig.appid}") //@Value("${wxConfig.appid}")
private static String appid="wx9e514cd1390086a8" ; private static String appid="wx750df5fec24d61c1" ;
// 微信小程序appsecret // 微信小程序appsecret
//@Value("${wxConfig.appsecret}") //@Value("${wxConfig.appsecret}")
private static String appsecret="e1e7395c8162f9d97487dae670faee5f"; private static String appsecret="fda079d4713bc3bdd5810ebb54dc7507";
// 微信公众号appid // 微信公众号appid
//@Value("${wxConfig.gzhappid}") //@Value("${wxConfig.gzhappid}")
private static String gzhappid="wx328dafbfac1bb1b6"; private static String gzhappid="wxe8539d3b62c9a06c";
// 微信公众号appsecret // 微信公众号appsecret
//@Value("${wxConfig.gzhappsecret}") //@Value("${wxConfig.gzhappsecret}")
private static String gzhappsecret="Dfjf3333"; private static String gzhappsecret="84f607283501d0177ca7595f709c20ca";
// 微信开放号appid // 微信开放号appid
private static String openAppid = ""; private static String openAppid = "";
@ -224,6 +224,7 @@ public class WeiXinUtil {
try { try {
String titcket = getTitcket(); String titcket = getTitcket();
sign = SignUtil.sign(titcket, url); sign = SignUtil.sign(titcket, url);
sign.put("titcket", titcket);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
@ -543,7 +544,9 @@ public class WeiXinUtil {
// 获取Access_token // 获取Access_token
public synchronized String getAccess_token(String appid, String appsecret) { public synchronized String getAccess_token(String appid, String appsecret) {
System.out.println("appid:" + appid + ".appsecret:" + appsecret);
String access_token = getSysConfig("access_token"); String access_token = getSysConfig("access_token");
System.out.println(access_token);
if (StringUtils.isNotEmpty(access_token)){ if (StringUtils.isNotEmpty(access_token)){
JSONObject jo = JSONObject.parseObject(access_token); JSONObject jo = JSONObject.parseObject(access_token);
jo.getString("expirettime"); jo.getString("expirettime");
@ -1024,7 +1027,8 @@ public class WeiXinUtil {
public String getTitcket() throws Exception { public String getTitcket() throws Exception {
String accessToken = getAccess_token(appid, appsecret); String accessToken = getAccess_token(gzhappid, gzhappsecret);
System.out.println(accessToken);
String url = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=" + accessToken + "&type=jsapi"; String url = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=" + accessToken + "&type=jsapi";
String returnValue = httpGet(url,null); String returnValue = httpGet(url,null);

@ -103,6 +103,7 @@
plain plain
size="mini" size="mini"
@click="shelves" @click="shelves"
:disabled="multiple"
v-hasPermi="['article:article:shelves']" v-hasPermi="['article:article:shelves']"
>上架 >上架
</el-button> </el-button>
@ -113,6 +114,7 @@
plain plain
size="mini" size="mini"
@click="offShelves" @click="offShelves"
:disabled="multiple"
v-hasPermi="['article:article:offShelves']" v-hasPermi="['article:article:offShelves']"
>下架 >下架
</el-button> </el-button>
@ -268,7 +270,7 @@
<script> <script>
import {pageListArticle, getArticle, delArticle, addArticle, updateArticle,changeStatusByArticle} from "@/api/article/article"; import {pageListArticle, getArticle, delArticle, addArticle, updateArticle,changeStatusByArticle} from "@/api/article/article";
import {changeStatus} from "@/api/product/info"; import {changeStatus} from "@/api/product/info";
import {addMoment, updateMoment} from "@/api/moment/moment"; import {addMoment, changeStatusByMoment, updateMoment} from "@/api/moment/moment";
export default { export default {
name: "Article", name: "Article",
@ -346,10 +348,17 @@ export default {
ids: ids, ids: ids,
status: "0" status: "0"
} }
changeStatusByArticle(param).then(response => { this.$modal.confirm('是否确认下架数据?').then(function () {
return changeStatusByArticle(param)
}).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("下架成功");
}).catch(() => {
}); });
// changeStatusByArticle(param).then(response => {
// this.getList();
// this.$modal.msgSuccess("");
// });
}, },
shelves(){ shelves(){
const ids = this.ids; const ids = this.ids;

@ -112,26 +112,26 @@
<el-table-column label="业务链接" align="center" prop="businessLinks" sortable='custom'/> <el-table-column label="业务链接" align="center" prop="businessLinks" sortable='custom'/>
<el-table-column label="头像链接" align="center" prop="avatarLink" sortable='custom' /> <el-table-column label="头像链接" align="center" prop="avatarLink" sortable='custom' />
<el-table-column label="手机号" align="center" prop="phone" sortable='custom' /> <el-table-column label="手机号" align="center" prop="phone" sortable='custom' />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<el-button <!-- <el-button-->
size="mini" <!-- size="mini"-->
type="text" <!-- type="text"-->
icon="el-icon-edit" <!-- icon="el-icon-edit"-->
@click="handleUpdate(scope.row)" <!-- @click="handleUpdate(scope.row)"-->
v-hasPermi="['biz:clue:edit']" <!-- v-hasPermi="['biz:clue:edit']"-->
>修改 <!-- >修改-->
</el-button> <!-- </el-button>-->
<el-button <!-- <el-button-->
size="mini" <!-- size="mini"-->
type="text" <!-- type="text"-->
icon="el-icon-delete" <!-- icon="el-icon-delete"-->
@click="handleDelete(scope.row)" <!-- @click="handleDelete(scope.row)"-->
v-hasPermi="['biz:clue:remove']" <!-- v-hasPermi="['biz:clue:remove']"-->
>删除 <!-- >删除-->
</el-button> <!-- </el-button>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
</el-table> </el-table>
<pagination <pagination

@ -76,6 +76,7 @@
plain plain
size="mini" size="mini"
@click="shelves" @click="shelves"
:disabled="multiple"
v-hasPermi="['moment:moment:shelves']" v-hasPermi="['moment:moment:shelves']"
>上架 >上架
</el-button> </el-button>
@ -86,6 +87,7 @@
plain plain
size="mini" size="mini"
@click="offShelves" @click="offShelves"
:disabled="multiple"
v-hasPermi="['moment:moment:offShelves']" v-hasPermi="['moment:moment:offShelves']"
>下架 >下架
</el-button> </el-button>
@ -292,9 +294,12 @@ export default {
ids: ids, ids: ids,
status: "0" status: "0"
} }
changeStatusByMoment(param).then(response => { this.$modal.confirm('是否确认下架数据?').then(function () {
return changeStatusByMoment(param)
}).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("下架成功");
}).catch(() => {
}); });
}, },
shelves(){ shelves(){

@ -100,6 +100,7 @@
plain plain
size="mini" size="mini"
@click="shelves" @click="shelves"
:disabled="multiple"
v-hasPermi="['poster:poster:shelves']" v-hasPermi="['poster:poster:shelves']"
>上架 >上架
</el-button> </el-button>
@ -110,6 +111,7 @@
plain plain
size="mini" size="mini"
@click="offShelves" @click="offShelves"
:disabled="multiple"
v-hasPermi="['poster:poster:offShelves']" v-hasPermi="['poster:poster:offShelves']"
>下架 >下架
</el-button> </el-button>
@ -250,6 +252,7 @@ import {pageListPoster, getPoster, delPoster, addPoster, updatePoster, changeSta
import {changeStatus, listInfo} from "@/api/product/info"; import {changeStatus, listInfo} from "@/api/product/info";
import {uploadFiles, getAttachList} from "@/api/common/file"; import {uploadFiles, getAttachList} from "@/api/common/file";
import {getToken} from "@/utils/auth"; import {getToken} from "@/utils/auth";
import {changeStatusByArticle} from "@/api/article/article";
export default { export default {
name: "Poster", name: "Poster",
@ -336,10 +339,17 @@ export default {
ids: ids, ids: ids,
status: "0" status: "0"
} }
changeStatusByPoster(param).then(response => { this.$modal.confirm('是否确认下架数据?').then(function () {
return changeStatusByPoster(param)
}).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("下架成功");
}).catch(() => {
}); });
// changeStatusByPoster(param).then(response => {
// this.getList();
// this.$modal.msgSuccess("");
// });
}, },
shelves() { shelves() {
const ids = this.ids; const ids = this.ids;

@ -167,6 +167,7 @@
plain plain
size="mini" size="mini"
@click="shelves" @click="shelves"
:disabled="multiple"
v-hasPermi="['product:info:shelves']" v-hasPermi="['product:info:shelves']"
>上架 >上架
</el-button> </el-button>
@ -177,6 +178,7 @@
plain plain
size="mini" size="mini"
@click="offShelves" @click="offShelves"
:disabled="multiple"
v-hasPermi="['product:info:offShelves']" v-hasPermi="['product:info:offShelves']"
>下架 >下架
</el-button> </el-button>
@ -427,6 +429,7 @@
<script> <script>
import {pageListInfo, getInfo, delInfo, addInfo, updateInfo, changeStatus, getBrokerNum} from "@/api/product/info"; import {pageListInfo, getInfo, delInfo, addInfo, updateInfo, changeStatus, getBrokerNum} from "@/api/product/info";
import {listArea} from "@/api/system/area"; import {listArea} from "@/api/system/area";
import {changeStatusByPoster} from "@/api/poster/poster";
// import Treeselect from "@riophae/vue-treeselect"; // import Treeselect from "@riophae/vue-treeselect";
export default { export default {
@ -541,10 +544,17 @@ export default {
ids: ids, ids: ids,
status: "0" status: "0"
} }
changeStatus(param).then(response => { this.$modal.confirm('是否确认下架数据?').then(function () {
return changeStatus(param)
}).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("下架成功");
}).catch(() => {
}); });
// changeStatus(param).then(response => {
// this.getList();
// this.$modal.msgSuccess("");
// });
}, },
shelves(){ shelves(){
const ids = this.ids; const ids = this.ids;

Loading…
Cancel
Save