소스 검색

移除部分不需要的

laiguoran 4 년 전
부모
커밋
ee211fd921
2개의 변경된 파일0개의 추가작업 그리고 60개의 파일을 삭제
  1. 0 5
      app/controller/stage_controller.js
  2. 0 55
      app/service/cooperation_pwd.js

+ 0 - 5
app/controller/stage_controller.js

@@ -338,7 +338,6 @@ module.exports = app => {
                                         ctx.session.sessionUser.accountId : null);
                             responseData.data.cooperation = uid !== null ? await ctx.service.ledgerCooperation.getValidData(
                                 ctx.tender.id, uid) : [];
-                            // responseData.data.cooperationPwd = uid !== null ? await ctx.service.cooperationPwd.getValidData(ctx.tender.id, uid) : [];
                             const stageTimes = (ctx.stage.status === auditConst.status.checkNo && ctx.stage.user_id !== ctx.session.sessionUser.accountId) ? ctx.stage.times - 1 : ctx.stage.times;
                             responseData.data.cooperationConfirm = uid !== null ? await ctx.service.cooperationConfirm.getValidData(ctx.tender.id, ctx.stage.id, stageTimes, uid) : [];
                             break;
@@ -1839,10 +1838,6 @@ module.exports = app => {
                         await ctx.service.cooperationConfirm.del(data.postData);
                         responseData.data.cooperationConfirm = await ctx.service.cooperationConfirm.getValidData(ctx.tender.id, ctx.stage.id, ctx.stage.times, ctx.session.sessionUser.accountId);
                         break;
-                    // case 'save-pwd':
-                    //     const result = await ctx.service.cooperationPwd.save(data.postData);
-                    //     responseData.data.cooperationPwd = await ctx.service.cooperationPwd.getValidData(ctx.tender.id, ctx.session.sessionUser.accountId);
-                    //     break;
                     default:
                         throw '参数有误';
                 }

+ 0 - 55
app/service/cooperation_pwd.js

@@ -1,55 +0,0 @@
-'use strict';
-
-/**
- *
- *
- * @author Mai
- * @date 2018/6/1
- * @version
- */
-
-module.exports = app => {
-    class CooperationPwd extends app.BaseService {
-        /**
-         * 构造函数
-         *
-         * @param {Object} ctx - egg全局变量
-         * @return {void}
-         */
-        constructor(ctx) {
-            super(ctx);
-            this.tableName = 'cooperation_pwd';
-        }
-
-        async save(data) {
-            const info = await this.getDataByCondition({ tid: this.ctx.tender.id, ledger_id: data.ledger_id, uid: this.ctx.session.sessionUser.accountId });
-            if (info) {
-                const updateData = {
-                    id: info.id,
-                    pwd: data.pwd,
-                    create_time: new Date(),
-                };
-                return await this.db.update(this.tableName, updateData);
-            }
-            const insertData = {
-                tid: this.ctx.tender.id,
-                uid: this.ctx.session.sessionUser.accountId,
-                ledger_id: data.ledger_id,
-                pwd: data.pwd,
-                create_time: new Date(),
-            };
-            return await this.db.insert(this.tableName, insertData);
-        }
-
-        async getValidData(tid, uid) {
-            const condition = { where: { tid } };
-            if (uid) {
-                condition.where.uid = uid;
-                condition.colums = ['ledger_id', 'pwd'];
-            }
-            return await this.getAllDataByCondition(condition);
-        }
-    }
-
-    return CooperationPwd;
-};