Commit 0d3da822 authored by 谢希宇's avatar 谢希宇

Merge branch 'master' of http://106.14.62.141:8081/sa_aidea/aidea

parents f8d45e99 a09da3e8
...@@ -286,7 +286,7 @@ ...@@ -286,7 +286,7 @@
</select> </select>
<select id="listProduct" resultType="com.cftech.order.model.ProductOrder"> <select id="listProduct" resultType="com.cftech.order.model.ProductOrder">
SELECT id, product_name as productName,price FROM t_aidea_product SELECT id, product_name as productName,price FROM t_aidea_product where del_flag = 0
</select> </select>
<update id="update" parameterType="com.cftech.order.model.Order"> <update id="update" parameterType="com.cftech.order.model.Order">
...@@ -390,7 +390,7 @@ ...@@ -390,7 +390,7 @@
update t_order set del_flag=1 where id=#{id,jdbcType=BIGINT} update t_order set del_flag=1 where id=#{id,jdbcType=BIGINT}
</update> </update>
<select id="fetchProduct" resultType="com.cftech.order.model.ProductDto" parameterType="java.util.Map"> <select id="fetchProduct" resultType="com.cftech.order.model.ProductDto" parameterType="java.util.Map">
SELECT * FROM t_aidea_product WHERE id = #{productId} AND accounts_id=#{accountsId} SELECT * FROM t_aidea_product WHERE id = #{productId} AND accounts_id=#{accountsId} AND del_flag = 0
</select> </select>
<update id="updateDetill" parameterType="java.util.Map"> <update id="updateDetill" parameterType="java.util.Map">
update t_order_details update t_order_details
...@@ -411,7 +411,7 @@ ...@@ -411,7 +411,7 @@
where order_id =#{id} and id = #{idDetail} where order_id =#{id} and id = #{idDetail}
</update> </update>
<select id="fetcheDeta" parameterType="java.util.Map" resultType="java.lang.Integer"> <select id="fetcheDeta" parameterType="java.util.Map" resultType="java.lang.Integer">
select * from t_order_details where order_id =#{id} and accounts_id=#{accountsId} and drugs_id =#{productId} select * from t_order_details where order_id =#{id} and accounts_id=#{accountsId} and drugs_id =#{productId} and del_flag = 0
</select> </select>
<insert id="saveDetill" parameterType="com.cftech.order.model.OrderDetailDto"> <insert id="saveDetill" parameterType="com.cftech.order.model.OrderDetailDto">
insert into t_order_details insert into t_order_details
...@@ -432,7 +432,7 @@ ...@@ -432,7 +432,7 @@
) )
</insert> </insert>
<select id="fetchOrder" resultType="com.cftech.order.model.Order" parameterType="java.lang.Long"> <select id="fetchOrder" resultType="com.cftech.order.model.Order" parameterType="java.lang.Long">
select * from t_order where id= #{id} select * from t_order where id= #{id} and del_flag = 0
</select> </select>
<update id="updateOrder" parameterType="java.util.Map"> <update id="updateOrder" parameterType="java.util.Map">
...@@ -495,7 +495,7 @@ p.product_img AS productImg, ...@@ -495,7 +495,7 @@ p.product_img AS productImg,
p.format p.format
FROM t_order_details t LEFT JOIN t_aidea_product p FROM t_order_details t LEFT JOIN t_aidea_product p
ON t.drugs_id = p.id ON t.drugs_id = p.id
WHERE t.del_flag=0 WHERE t.del_flag=0 and p.del_flag=0
<if test="orderId!=null"> <if test="orderId!=null">
and t.order_id =#{orderId} and t.order_id =#{orderId}
</if> </if>
......
...@@ -100,6 +100,8 @@ ...@@ -100,6 +100,8 @@
<td>产品分类名称</td> <td>产品分类名称</td>
<td>产品分类编码</td> <td>产品分类编码</td>
<td>序号</td> <td>序号</td>
<td>分类级别</td>
<td>上级分类</td>
<td>banner图</td> <td>banner图</td>
<td>是否推荐</td> <td>是否推荐</td>
<td>备注</td> <td>备注</td>
...@@ -213,6 +215,14 @@ ...@@ -213,6 +215,14 @@
{ {
"mData":"sort" "mData":"sort"
}, },
{
"mData":"parentId"
}
,
{
"mData":"parentName"
}
,
{ {
"mData":"classifyImg" "mData":"classifyImg"
}, },
...@@ -235,6 +245,26 @@ ...@@ -235,6 +245,26 @@
}, },
{ {
"aTargets":[4], "aTargets":[4],
"mData":"parentId",
"mRender":function(a, b, c, d){
if (a==0){
return "一级";
}
return "二级";
}
},
{
"aTargets":[5],
"mData":"parentName",
"mRender":function(a, b, c, d){
if (a==0 || a==null){
return "";
}
return a;
}
},
{
"aTargets":[6],
"mData":"classifyImg", "mData":"classifyImg",
"mRender":function(a, b, c, d){ "mRender":function(a, b, c, d){
return "<img src='"+a+"' style='width: 80px;height: 80px;'>"; return "<img src='"+a+"' style='width: 80px;height: 80px;'>";
...@@ -242,7 +272,7 @@ ...@@ -242,7 +272,7 @@
}, },
{ {
"aTargets": [7], "aTargets": [9],
"mData": "createTime", "mData": "createTime",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
return formatDates(a, "yyyy-MM-dd HH:mm:ss"); return formatDates(a, "yyyy-MM-dd HH:mm:ss");
...@@ -250,7 +280,7 @@ ...@@ -250,7 +280,7 @@
} }
}, },
{ {
"aTargets": [8], "aTargets": [10],
"mData": "id", "mData": "id",
"mRender": function (a, b, c, d) {//a表示id对应的值,c表示当前记录行对象 "mRender": function (a, b, c, d) {//a表示id对应的值,c表示当前记录行对象
var html = '#if($shiro.hasPermission("qy:productclassify:edit"))';// var html = '#if($shiro.hasPermission("qy:productclassify:edit"))';//
...@@ -266,6 +296,7 @@ ...@@ -266,6 +296,7 @@
} }
jQuery(document).ready(function () { jQuery(document).ready(function () {
seachTable(); seachTable();
$('.datepicker').datepicker({ $('.datepicker').datepicker({
show: true, show: true,
......
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
FROM FROM
t_aidea_product_classify a t_aidea_product_classify a
LEFT JOIN t_aidea_product_classify b ON b.id = a.parent_id LEFT JOIN t_aidea_product_classify b ON b.id = a.parent_id
AND b.del_flag = '0' AND b.del_flag = '0' and a.del_flag= 0
<include refid="sqlWhere"/> <include refid="sqlWhere"/>
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if> <if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
<if test="limit>0">limit #{offset},#{limit}</if> <if test="limit>0">limit #{offset},#{limit}</if>
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
t.reading AS reading, t.reading AS reading,
c.classify_name AS classifyName c.classify_name AS classifyName
FROM t_aidea_product t LEFT JOIN t_aidea_product_classify c FROM t_aidea_product t LEFT JOIN t_aidea_product_classify c
ON c.id = t.classify_id WHERE t.del_flag=0 ON c.id = t.classify_id WHERE t.del_flag = 0 and c.del_flag = 0
<if test="productName !=null"> <if test="productName !=null">
and and
t.product_name like concat('%',#{productName},'%') t.product_name like concat('%',#{productName},'%')
...@@ -252,7 +252,7 @@ t.id, ...@@ -252,7 +252,7 @@ t.id,
t.classify_name AS classifyName, t.classify_name AS classifyName,
t.parent_id AS parentId, t.parent_id AS parentId,
a.dosaga_from AS dosagaFrom a.dosaga_from AS dosagaFrom
FROM t_aidea_product_classify t LEFT JOIN t_aidea_product a ON a.classify_id = t.id AND t.del_flag = 0 FROM t_aidea_product_classify t LEFT JOIN t_aidea_product a ON a.classify_id = t.id AND t.del_flag = 0 and a.del_flag=0
</select> </select>
<select id="hotproduct" resultType="com.cftech.productclassify.model.ProductVO"> <select id="hotproduct" resultType="com.cftech.productclassify.model.ProductVO">
SELECT SELECT
...@@ -261,6 +261,7 @@ product_name AS productName, ...@@ -261,6 +261,7 @@ product_name AS productName,
format, format,
product_img AS productImg product_img AS productImg
FROM t_aidea_product FROM t_aidea_product
where del_flag = 0
ORDER BY reading DESC ORDER BY reading DESC
LIMIT 0,4 LIMIT 0,4
</select> </select>
...@@ -271,7 +272,7 @@ product_name AS productName, ...@@ -271,7 +272,7 @@ product_name AS productName,
format, format,
product_img AS productImg product_img AS productImg
FROM t_aidea_product FROM t_aidea_product
WHERE size= 1 WHERE size= 1 and del_flag = 0
LIMIT 0,4 LIMIT 0,4
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -177,8 +177,8 @@ ...@@ -177,8 +177,8 @@
<div class="form-group form-md-line-input col-md-12"> <div class="form-group form-md-line-input col-md-12">
<label>是否展示大图文章</label> <label>是否展示大图文章</label>
<select class="form-control select2 releas" name="size" id="size"> <select class="form-control select2 releas" name="size" id="size">
<option id="options" name="options" value="1"></option> <option id="options" name="options" value="0"></option>
<option id="optiona" name="optiona" value="0"></option> <option id="optiona" name="optiona" value="1"></option>
</select> </select>
</div> </div>
......
...@@ -976,10 +976,7 @@ ...@@ -976,10 +976,7 @@
} else if (e.target.value == '1') { } else if (e.target.value == '1') {
e.target.value = '0' e.target.value = '0'
} }
save() save()
} }
function show() { function show() {
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
SELECT SELECT
<include refid="sqlColumns"/> <include refid="sqlColumns"/>
FROM wx_cms_cfarticle t FROM wx_cms_cfarticle t
WHERE t.id=#{id} WHERE t.id=#{id} and t.del_flag = 0
</select> </select>
<select id="count" parameterType="java.util.Map" resultType="java.lang.Integer"> <select id="count" parameterType="java.util.Map" resultType="java.lang.Integer">
...@@ -372,7 +372,7 @@ a.size ...@@ -372,7 +372,7 @@ a.size
FROM wx_cms_cfarticle a FROM wx_cms_cfarticle a
LEFT JOIN wx_cms_column b LEFT JOIN wx_cms_column b
ON b.id = a.`column` ON b.id = a.`column`
WHERE a.del_flag = 0 WHERE a.del_flag = 0 and b.del_flag = 0
<if test="id!=null"> <if test="id!=null">
and a.id = #{id} and a.id = #{id}
</if> </if>
...@@ -388,13 +388,13 @@ and a.id = #{id} ...@@ -388,13 +388,13 @@ and a.id = #{id}
where id =#{id} where id =#{id}
</update> </update>
<select id="saveReading" resultType="com.cftech.cms.cfarticle.model.CfarticleVO"> <select id="saveReading" resultType="com.cftech.cms.cfarticle.model.CfarticleVO">
SELECT * FROM wx_cms_cfarticle WHERE id =#{id} SELECT * FROM wx_cms_cfarticle WHERE id =#{id} and del_flag=0
</select> </select>
<select id="selectcom" resultType="java.lang.Integer"> <select id="selectcom" resultType="java.lang.Integer">
SELECT count(*) FROM wx_cms_cfarticle WHERE recommended= 1 SELECT count(*) FROM wx_cms_cfarticle WHERE recommended= 1 and del_flag=0
</select> </select>
<select id="selectBanner" resultType="java.lang.Integer"> <select id="selectBanner" resultType="java.lang.Integer">
SELECT count(*) FROM wx_cms_cfarticle WHERE whether_banner= 1 SELECT count(*) FROM wx_cms_cfarticle WHERE whether_banner= 1 and del_flag=0
</select> </select>
<select id="gateway" resultType="com.cftech.cms.cfarticle.model.Cfarticle"> <select id="gateway" resultType="com.cftech.cms.cfarticle.model.Cfarticle">
SELECT SELECT
...@@ -444,6 +444,7 @@ SELECT count(*) FROM wx_cms_cfarticle WHERE whether_banner= 1 ...@@ -444,6 +444,7 @@ SELECT count(*) FROM wx_cms_cfarticle WHERE whether_banner= 1
FROM wx_cms_column FROM wx_cms_column
WHERE del_flag = 0 WHERE del_flag = 0
</select> </select>
<select id="columnDetails" resultType="com.cftech.cms.cfarticle.model.CfarticleVO" > <select id="columnDetails" resultType="com.cftech.cms.cfarticle.model.CfarticleVO" >
select select
id, id,
......
...@@ -14,7 +14,9 @@ import com.cftech.core.generic.GenericServiceImpl; ...@@ -14,7 +14,9 @@ import com.cftech.core.generic.GenericServiceImpl;
import com.cftech.core.sql.Conds; import com.cftech.core.sql.Conds;
import com.cftech.core.sql.Sort; import com.cftech.core.sql.Sort;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.owasp.esapi.ESAPI;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -110,6 +112,13 @@ public class CfarticleServiceImpl extends GenericServiceImpl<Cfarticle> implemen ...@@ -110,6 +112,13 @@ public class CfarticleServiceImpl extends GenericServiceImpl<Cfarticle> implemen
MpAccountsEntity mpAccountsAppid = mpAccountsService.getMpAccountsAppid(appId); MpAccountsEntity mpAccountsAppid = mpAccountsService.getMpAccountsAppid(appId);
List<CfarticleVO> recommended = cfarticleMapper.recommended(id); List<CfarticleVO> recommended = cfarticleMapper.recommended(id);
if (recommended.size()>0) { if (recommended.size()>0) {
for (CfarticleVO cfarticleVO : recommended) {
// cfarticleVO.setContent(ESAPI.encoder().decodeForHTML(cfarticleVO.getContent()));
String content = cfarticleVO.getContent();
String s1 = StringEscapeUtils.unescapeHtml(content);
String all = s1.replaceAll("&quot;", "\"");
cfarticleVO.setContent(all);
}
rtnJson.put("errorNo", "0"); rtnJson.put("errorNo", "0");
rtnJson.put("data", recommended); rtnJson.put("data", recommended);
return rtnJson; return rtnJson;
...@@ -209,7 +218,8 @@ public class CfarticleServiceImpl extends GenericServiceImpl<Cfarticle> implemen ...@@ -209,7 +218,8 @@ public class CfarticleServiceImpl extends GenericServiceImpl<Cfarticle> implemen
return rtnJson; return rtnJson;
} }
rtnJson.put("errorNo", "0"); rtnJson.put("errorNo", "0");
rtnJson.put("errorMsg",cfarticleVOS); rtnJson.put("data",cfarticleVOS);
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
rtnJson.put("errorNo", "1"); rtnJson.put("errorNo", "1");
......
...@@ -2,9 +2,11 @@ package com.cftech.member.dao; ...@@ -2,9 +2,11 @@ package com.cftech.member.dao;
import com.cftech.core.generic.GenericDao; import com.cftech.core.generic.GenericDao;
import com.cftech.core.sql.Conds; import com.cftech.core.sql.Conds;
import com.cftech.member.model.FanssVO;
import com.cftech.member.model.Member; import com.cftech.member.model.Member;
import com.cftech.member.model.MemberDto; import com.cftech.member.model.MemberDto;
import com.cftech.member.model.MemberVO; import com.cftech.member.model.MemberVO;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -52,4 +54,12 @@ public interface MemberMapper extends GenericDao<Member> { ...@@ -52,4 +54,12 @@ public interface MemberMapper extends GenericDao<Member> {
* @return * @return
**/ **/
int updateMember(MemberVO memberVO); int updateMember(MemberVO memberVO);
/**
*
* 个人中心用户信息
*
* @Param
* @return
**/
FanssVO fanssChat(@Param("openid") String openid);
} }
\ No newline at end of file
...@@ -387,6 +387,11 @@ ...@@ -387,6 +387,11 @@
SELECT id,CONVERT(AES_DECRYPT(name,'aideakey') USING UTF8) AS memberName,sex,CONVERT(AES_DECRYPT(birthday,'aideakey')USING UTF8) birthday,imageurl,CONVERT(AES_DECRYPT(email,'aideakey')USING UTF8) AS mailbox,CONVERT(AES_DECRYPT(phone,'aideakey')USING UTF8) as phone SELECT id,CONVERT(AES_DECRYPT(name,'aideakey') USING UTF8) AS memberName,sex,CONVERT(AES_DECRYPT(birthday,'aideakey')USING UTF8) birthday,imageurl,CONVERT(AES_DECRYPT(email,'aideakey')USING UTF8) AS mailbox,CONVERT(AES_DECRYPT(phone,'aideakey')USING UTF8) as phone
FROM wx_mp_member WHERE id= #{id} and del_flag=0 FROM wx_mp_member WHERE id= #{id} and del_flag=0
</select> </select>
<select id="fanssChat" resultType="com.cftech.member.model.FanssVO">
SELECT openid,CONVERT(AES_DECRYPT(nickname,'aideakey') USING UTF8) nickname,headimgurl
FROM wx_mp_fanss WHERE openid = #{openid} and delflag=0
</select>
<!--个人信息修改 <!--个人信息修改
--> -->
<update id="updateMember" parameterType="com.cftech.member.model.MemberVO"> <update id="updateMember" parameterType="com.cftech.member.model.MemberVO">
......
package com.cftech.member.model;
import lombok.Data;
/**
* @author :licc
* @date :Created in 2020/11/4 19:41
* @description:
*/
@Data
public class FanssVO {
private String openid;
private String nickname;
private String headimgurl;
}
...@@ -60,4 +60,10 @@ public interface MemberService extends GenericService<Member> { ...@@ -60,4 +60,10 @@ public interface MemberService extends GenericService<Member> {
* @return * @return
**/ **/
JSONObject updateMember(MemberVO memberVO); JSONObject updateMember(MemberVO memberVO);
/**
* 个人中心用户信息
* @Param
* @return
**/
JSONObject fanssChat(String openid);
} }
...@@ -13,6 +13,7 @@ import com.cftech.core.sql.Sort; ...@@ -13,6 +13,7 @@ import com.cftech.core.sql.Sort;
import com.cftech.core.util.DateFormatUtils; import com.cftech.core.util.DateFormatUtils;
import com.cftech.core.util.StringUtils; import com.cftech.core.util.StringUtils;
import com.cftech.member.dao.MemberMapper; import com.cftech.member.dao.MemberMapper;
import com.cftech.member.model.FanssVO;
import com.cftech.member.model.Member; import com.cftech.member.model.Member;
import com.cftech.member.model.MemberDto; import com.cftech.member.model.MemberDto;
import com.cftech.member.model.MemberVO; import com.cftech.member.model.MemberVO;
...@@ -25,6 +26,7 @@ import com.mchange.v2.lang.ObjectUtils; ...@@ -25,6 +26,7 @@ import com.mchange.v2.lang.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import sun.plugin2.main.client.MessagePassingOneWayJSObject;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
...@@ -148,6 +150,28 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem ...@@ -148,6 +150,28 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem
return rtnJson; return rtnJson;
} }
@Override
public JSONObject fanssChat(String openid) {
JSONObject rtnJson = new JSONObject();
try {
if (StringUtils.isEmpty(openid)){
rtnJson.put("errorNo","1");
rtnJson.put("data","openid不能为空");
return rtnJson;
}
FanssVO fanssVO = memberMapper.fanssChat(openid);
if (fanssVO!=null){
rtnJson.put("errorNo","0");
rtnJson.put("data",fanssVO);
return rtnJson;
}
}catch (Exception e){
e.printStackTrace();
rtnJson.put("errorNo","1");
}
return rtnJson;
}
@Override @Override
public void updateworkshop(Member member, String invitcode) { public void updateworkshop(Member member, String invitcode) {
......
...@@ -45,4 +45,15 @@ public class MobileMemberController { ...@@ -45,4 +45,15 @@ public class MobileMemberController {
public JSONObject updateMember(MemberVO memberVO) { public JSONObject updateMember(MemberVO memberVO) {
return memberService.updateMember(memberVO); return memberService.updateMember(memberVO);
} }
/**
* @Author Licc
* @Description 个人中心用户信息
* @Date 19:36 2020/11/4
* @Param
* @return
**/
@RequestMapping(value = "/fanssChat", method = {RequestMethod.POST}, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public JSONObject fanssChat(String openid){
return memberService.fanssChat(openid);
}
} }
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